r2188 - made closing brace be correctly processed right after a keyword
authorDenis Ovsienko <infrastation@yandex.ru>
Sat, 30 Aug 2008 11:19:59 +0000 (11:19 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Sat, 30 Aug 2008 11:19:59 +0000 (11:19 +0000)
ChangeLog
inc/code.php

index e96fd9e95480e7ea7c5dd877a3a57f85d4437f55..cb54756cb218d748e4273b420dce4b95cbd4d5c4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,7 @@
        bugfix: fix a typo in NAT rules displaying code (pointed out by Piotr Nowacki)
        bugfix: error message was broken in the installer (reported by Thomas Thep)
        bugfix: IPv4 network check sometimes failed to detect duplicate networks
+       bugfix: lexical scanner could mistakenly fail in some rare cases
 0.16.2 2008-08-21
        bugfix: IP address picker was broken
        bugfix: more message processing fixes
index 171ad5b444b8cf15f81386a96b5e79e345f2cbd7..fa469ff1f46152b806723cf3583066daa8d0a923 100644 (file)
@@ -110,6 +110,7 @@ function getLexemsFromRackCode ($text)
                                                $lineno++; // fall through
                                        case ($char == " "):
                                        case ($char == "\t"):
+                                       case ($char == ')'): // this will be handled below
                                                // got a word, sort it out
                                                switch ($buffer)
                                                {
@@ -134,6 +135,8 @@ function getLexemsFromRackCode ($text)
                                                        default:
                                                                return lexError2 ($buffer, $lineno);
                                                }
+                                               if ($char == ')')
+                                                       $ret[] = array ('type' => 'LEX_RBRACE', 'lineno' => $lineno);
                                                $newstate = 'ESOTSM';
                                                break;
                                        default: