]> git.mdlowis.com Git - proto/obnc.git/commitdiff
reworked logical operators
authormike lowis <mike@mdlowis.com>
Tue, 13 Apr 2021 03:07:05 +0000 (23:07 -0400)
committermike lowis <mike@mdlowis.com>
Tue, 13 Apr 2021 03:07:05 +0000 (23:07 -0400)
15 files changed:
Oberon.html
lib/obnc/FilesTest.obn
lib/obnc/Strings.obn
lib/obnc/XYplaneTest.obn
src/Generate.c
src/Oberon.l
src/Oberon.y
src/Types.c
src/lex.yy.c
src/lex.yy.h
src/lex.yyTest.c
src/y.tab.c
src/y.tab.h
tests/obnc/passing/T4Expressions.obn
tests/scanner/tokens.txt

index 673b64917bc8fa1fab882161579aa483b3b1f94a..fa281864bae67a07cacb6c051178e35cd441f566 100644 (file)
                 <li>Removed PACK, ROR, UNPCK, ASR, LSL predeclared identifiers</li>
                 <li>Removed the SET types and associated operators</li>
                 <li>Changed not equal operator from '#' to '!='</li>
+                <li>Changed logical operators from & and ~ to "and" and "not"</li>
             </ul>
         </p>
 
@@ -257,89 +258,87 @@ digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9".
         <div class="table">
             <table>
                 <tbody><tr>
-                    <td class="first">+</td>
-                    <td>:=</td>
-                    <td>array</td>
-                    <td>import</td>
-                    <td class="last">then</td>
-                </tr>
-                <tr>
-                    <td class="first">-</td>
+                    <td>+</td>
+                    <td>-</td>
+                    <td>/</td>
+                    <td>*</td>
                     <td>^</td>
-                    <td>begin</td>
-                    <td>in</td>
-                    <td class="last">to</td>
                 </tr>
                 <tr>
-                    <td class="first">*</td>
                     <td>=</td>
-                    <td>by</td>
-                    <td>is</td>
-                    <td class="last">true</td>
+                    <td>:=</td>
+                    <td>!=</td>
+                    <td>&lt;</td>
+                    <td>&gt;</td>
                 </tr>
                 <tr>
-                    <td class="first">/</td>
-                    <td>!=</td>
-                    <td>case</td>
-                    <td>mod</td>
-                    <td class="last">type</td>
+                    <td>&lt;=</td>
+                    <td>&gt;=</td>
+                    <td>.</td>
+                    <td>,</td>
+                    <td>;</td>
                 </tr>
                 <tr>
-                    <td class="first">~</td>
-                    <td>&lt;</td>
-                    <td>const</td>
-                    <td>module</td>
-                    <td class="last">until</td>
+                    <td>..</td>
+                    <td>|</td>
+                    <td>:</td>
+                    <td>(</td>
+                    <td>)</td>
                 </tr>
                 <tr>
-                    <td class="first">&amp;</td>
-                    <td>&gt;</td>
-                    <td>div</td>
-                    <td>nil</td>
-                    <td class="last">var</td>
+                    <td>[</td>
+                    <td>]</td>
+                    <td>{</td>
+                    <td>}</td>
+                    <td>and</td>
                 </tr>
                 <tr>
-                    <td class="first">.</td>
-                    <td>&lt;=</td>
-                    <td>do</td>
-                    <td>of</td>
-                    <td class="last">while</td>
+                    <td>array</td>
+                    <td>begin</td>
+                    <td>by</td>
+                    <td>case</td>
+                    <td>const</td>
                 </tr>
                 <tr>
-                    <td class="first">,</td>
-                    <td>&gt;=</td>
+                    <td>div</td>
+                    <td>do</td>
                     <td>else</td>
-                    <td class="last">or</td>
+                    <td>elsif</td>
+                    <td>end</td>
                 </tr>
                 <tr>
-                    <td class="first">;</td>
-                    <td>..</td>
-                    <td>elsif</td>
-                    <td class="last">pointer</td>
+                    <td>false</td>
+                    <td>for</td>
+                    <td>if</td>
+                    <td>import</td>
+                    <td>in</td>
                 </tr>
                 <tr>
-                    <td class="first">|</td>
-                    <td>:</td>
-                    <td>end</td>
-                    <td class="last">procedure</td>
+                    <td>is</td>
+                    <td>mod</td>
+                    <td>module</td>
+                    <td>nil</td>
+                    <td>not</td>
                 </tr>
                 <tr>
-                    <td class="first">(</td>
-                    <td>)</td>
-                    <td>false</td>
-                    <td class="last">record</td>
+                    <td>of</td>
+                    <td>or</td>
+                    <td>pointer</td>
+                    <td>procedure</td>
+                    <td>record</td>
                 </tr>
                 <tr>
-                    <td class="first">[</td>
-                    <td>]</td>
-                    <td>for</td>
-                    <td class="last">repeat</td>
+                    <td>repeat</td>
+                    <td>return</td>
+                    <td>then</td>
+                    <td>to</td>
+                    <td>true</td>
                 </tr>
                 <tr>
-                    <td class="first">{</td>
-                    <td>}</td>
-                    <td>if</td>
-                    <td class="last">return</td>
+                    <td>type</td>
+                    <td>until</td>
+                    <td>var</td>
+                    <td>while</td>
                 </tr>
             </tbody></table>
         </div>
@@ -653,15 +652,15 @@ ActualParameters = "(" [ExpList] ")" .
                     <th class="last">result</th>
                 </tr>
                 <tr class="second">
-                    <td class="first">OR</td>
+                    <td class="first">or</td>
                     <td class="last">logical disjunction</td>
                 </tr>
                 <tr>
-                    <td class="first">&amp;</td>
+                    <td class="first">and</td>
                     <td class="last">logical conjunction</td>
                 </tr>
                 <tr>
-                    <td class="first">~</td>
+                    <td class="first">not</td>
                     <td class="last">negation</td>
                 </tr>
             </tbody></table>
@@ -672,17 +671,17 @@ ActualParameters = "(" [ExpList] ")" .
         <div class="table">
             <table>
                 <tbody><tr>
-                    <td class="first"><var>p</var> OR <var>q</var></td>
+                    <td class="first"><var>p</var> or <var>q</var></td>
                     <td>stands for</td>
-                    <td class="last">“if <var>p</var> then TRUE, else <var>q</var>”</td>
+                    <td class="last">“if <var>p</var> then true, else <var>q</var>”</td>
                 </tr>
                 <tr>
-                    <td class="first"><var>p</var> &amp; <var>q</var></td>
+                    <td class="first"><var>p</var> and <var>q</var></td>
                     <td>stands for</td>
-                    <td class="last">“if <var>p</var> then <var>q</var>, else FALSE”</td>
+                    <td class="last">“if <var>p</var> then <var>q</var>, else false”</td>
                 </tr>
                 <tr>
-                    <td class="first">~ <var>p</var></td>
+                    <td class="first">not <var>p</var></td>
                     <td>stands for</td>
                     <td class="last">“not <var>p</var>”</td>
                 </tr>
@@ -714,11 +713,11 @@ ActualParameters = "(" [ExpList] ")" .
                     <td class="last">quotient</td>
                 </tr>
                 <tr>
-                    <td class="first">DIV</td>
+                    <td class="first">div</td>
                     <td class="last">integer quotient</td>
                 </tr>
                 <tr>
-                    <td class="first">MOD</td>
+                    <td class="first">mod</td>
                     <td class="last">modulus</td>
                 </tr>
             </tbody></table>
@@ -726,7 +725,7 @@ ActualParameters = "(" [ExpList] ")" .
 
         <p>The operators +, −, *, and / apply to operands of numeric types. Both operands must be of the same type, which is also the type of the result. When used as unary operators, − denotes sign inversion and + denotes the identity operation.</p>
 
-        <p>The operators DIV and MOD apply to integer operands only. Let <var>q</var> = <var>x</var> DIV <var>y</var>, and <var>r</var> = <var>x</var> MOD <var>y</var>. Then quotient <var>q</var> and remainder <var>r</var> are defined by the equation</p>
+        <p>The operators div and mod apply to integer operands only. Let <var>q</var> = <var>x</var> div <var>y</var>, and <var>r</var> = <var>x</var> mod <var>y</var>. Then quotient <var>q</var> and remainder <var>r</var> are defined by the equation</p>
 
         <pre><var>x</var> = <var>q</var>*<var>y</var> + <var>r</var>       0 &lt;= <var>r</var> &lt; <var>y</var>
 </pre>
@@ -764,22 +763,22 @@ ActualParameters = "(" [ExpList] ")" .
                     <td class="last">greater or equal</td>
                 </tr>
                 <tr>
-                    <td class="first">IS</td>
+                    <td class="first">is</td>
                     <td class="last">type test</td>
                 </tr>
             </tbody></table>
         </div>
 
-        <p>Relations are Boolean. The ordering relations &lt;, &lt;=, &gt;, &gt;= apply to the numeric types, Char, and character arrays. The relations = and # also apply to the types Bool, SET, and to pointer and procedure types.</p>
+        <p>Relations are Boolean. The ordering relations &lt;, &lt;=, &gt;, &gt;= apply to the numeric types, Char, and character arrays. The relations = and != also apply to Bool types and to pointer and procedure types.</p>
 
-        <p><var>v</var> IS <var>T</var> stands for “<var>v</var> is of type <var>T</var>” and is called a <dfn>type test</dfn>. It is applicable, if</p>
+        <p><var>v</var> is <var>T</var> stands for “<var>v</var> is of type <var>T</var>” and is called a <dfn>type test</dfn>. It is applicable, if</p>
 
         <ol>
             <li><var>T</var> is an extension of the declared type <var>T0</var> of <var>v</var>, and if</li>
             <li><var>v</var> is a variable parameter of record type or <var>v</var> is a pointer.</li>
         </ol>
 
-        <p>Assuming, for instance, that <var>T</var> is an extension of <var>T0</var> and that <var>v</var> is a designator declared of type <var>T0</var>, then the test <var>v</var> IS <var>T</var> determines whether the actually designated variable is (not only a <var>T0</var>, but also) a <var>T</var>. The value of NIL IS <var>T</var> is undefined.</p>
+        <p>Assuming, for instance, that <var>T</var> is an extension of <var>T0</var> and that <var>v</var> is a designator declared of type <var>T0</var>, then the test <var>v</var> is <var>T</var> determines whether the actually designated variable is (not only a <var>T0</var>, but also) a <var>T</var>. The value of nil is <var>T</var> is undefined.</p>
 
         <p>Examples of expressions (refer to examples in <a href="#sec7">Ch. 7</a>):</p>
 
@@ -790,11 +789,11 @@ ActualParameters = "(" [ExpList] ")" .
                     <td class="last">(Int)</td>
                 </tr>
                 <tr>
-                    <td class="first">i DIV 3</td>
+                    <td class="first">i div 3</td>
                     <td class="last">(Int)</td>
                 </tr>
                 <tr>
-                    <td class="first">~p OR q</td>
+                    <td class="first">not p or q</td>
                     <td class="last">(Bool)</td>
                 </tr>
                 <tr>
@@ -814,7 +813,7 @@ ActualParameters = "(" [ExpList] ")" .
                     <td class="last">(Bool)</td>
                 </tr>
                 <tr>
-                    <td class="first">t IS CenterNode</td>
+                    <td class="first">t is CenterNode</td>
                     <td class="last">(Bool)</td>
                 </tr>
             </tbody></table>
index ff7e8a665c049e1310756452408c4974e9b5b208..351d51d220550f7f612f522d2e0c16cb1a52f087 100644 (file)
@@ -186,7 +186,7 @@ module FilesTest;
                f := Files.New("SetTest");
                Assert(f != nil);
                Files.SetPos(r, f, 0);
-               Assert(~r.eof)
+               Assert(not r.eof)
        end TestSetPos;
 
 
@@ -225,7 +225,7 @@ module FilesTest;
                Assert(Files.Length(f) = 1);
                Files.SetPos(r, f, 0);
                Files.Read(r, b);
-               Assert(~r.eof);
+               Assert(not r.eof);
                Assert(b = 65);
                Assert(Files.Pos(r) = 1)
        end TestReadWrite;
@@ -246,10 +246,10 @@ module FilesTest;
 
                Files.SetPos(r, f, 0);
                Files.ReadInt(r, i);
-               Assert(~r.eof);
+               Assert(not r.eof);
                Assert(i = 100);
                Files.ReadInt(r, i);
-               Assert(~r.eof);
+               Assert(not r.eof);
                Assert(i = -1000);
                Files.ReadInt(r, i);
                Assert(r.eof)
@@ -271,10 +271,10 @@ module FilesTest;
 
                Files.SetPos(r, f, 0);
                Files.ReadReal(r, x);
-               Assert(~r.eof);
+               Assert(not r.eof);
                Assert(Abs(x - 3.14) < 1.0E-6);
                Files.ReadReal(r, x);
-               Assert(~r.eof);
+               Assert(not r.eof);
                Assert(Abs(x - (-3.14)) < 1.0E-6);
                Files.ReadReal(r, x);
                Assert(r.eof)
@@ -296,10 +296,10 @@ module FilesTest;
 
                Files.SetPos(r, f, 0);
                Files.ReadNum(r, i);
-               Assert(~r.eof);
+               Assert(not r.eof);
                Assert(i = 100);
                Files.ReadNum(r, i);
-               Assert(~r.eof);
+               Assert(not r.eof);
                Assert(i = -1000);
                Files.ReadNum(r, i);
                Assert(r.eof)
@@ -322,13 +322,13 @@ module FilesTest;
 
                Files.SetPos(r, f, 0);
                Files.ReadString(r, s);
-               Assert(~r.eof);
+               Assert(not r.eof);
                Assert(s = "hello");
                Files.ReadString(r, s);
-               Assert(~r.eof);
+               Assert(not r.eof);
                Assert(s = "there");
                Files.ReadString(r, s);
-               Assert(~r.eof);
+               Assert(not r.eof);
                Assert(s = "");
                Files.ReadString(r, s);
                Assert(r.eof)
@@ -350,11 +350,11 @@ module FilesTest;
 
                Files.SetPos(r, f, 0);
                Files.ReadBool(r, b);
-               Assert(~r.eof);
+               Assert(not r.eof);
                Assert(b);
                Files.ReadBool(r, b);
-               Assert(~r.eof);
-               Assert(~b);
+               Assert(not r.eof);
+               Assert(not b);
                Files.ReadBool(r, b);
                Assert(r.eof)
        end TestReadWriteBool;
@@ -381,13 +381,13 @@ module FilesTest;
                Files.SetPos(r, f, 0);
 
                Files.ReadBytes(r, buf, Length(buf));
-               Assert(~r.eof);
+               Assert(not r.eof);
                for i := 0 to Length(buf) - 1 do
                        Assert(buf[i] = i + 1)
                end;
 
                Files.ReadBytes(r, buf, Length(buf));
-               Assert(~r.eof);
+               Assert(not r.eof);
                for i := 0 to Length(buf) - 1 do
                        Assert(buf[i] = i + 1)
                end;
index e41d5bd63062d8efe16e1e526ae11399158cfe15..30a016677acdb71180611865f5f4bd61fd97a7b8 100644 (file)
@@ -132,7 +132,7 @@ Implements the basic library module from "The Oakwood Guidelines for Oberon-2 Co
                repeat
                        Increment(idxs);
                        idxp := 0;
-                       while (pattern[idxp] != 0X) & (s[idxs + idxp] = pattern[idxp]) do
+                       while (pattern[idxp] != 0X) and (s[idxs + idxp] = pattern[idxp]) do
                                Increment(idxp)
                        end
                until (pattern[idxp] = 0X) or (s[idxs + idxp] = 0X);
@@ -143,7 +143,7 @@ Implements the basic library module from "The Oakwood Guidelines for Oberon-2 Co
                        result := -1
                end;
 
-               Assert((result = -1) or (result >= 0) & (result + idxp < Length(s)))
+               Assert((result = -1) or (result >= 0) and (result + idxp < Length(s)))
        return result
        end Pos;
 
@@ -154,7 +154,7 @@ Implements the basic library module from "The Oakwood Guidelines for Oberon-2 Co
        begin
                i := 0;
                while s[i] != 0X do
-                       if (s[i] >= "a") & (s[i] <= "z") then
+                       if (s[i] >= "a") and (s[i] <= "z") then
                                s[i] := AsChar(AsInt("A") + AsInt(s[i]) - AsInt("a"));
                        end;
                        Increment(i)
index c24111403c86ace608a8d96c63cd04a3620a641d..9d45b54844448d559fa51f25aefa1d03c40ec889 100644 (file)
@@ -22,14 +22,14 @@ module XYplaneTest;
        procedure TestPosition(x, y: Int);
                var withinBounds: Bool;
        begin
-               withinBounds := (x >= 0) & (x < XYplane.W)
-                       & (y >= 0) & (y < XYplane.H);
+               withinBounds := (x >= 0) and (x < XYplane.W)
+                       and (y >= 0) and (y < XYplane.H);
                XYplane.Clear;
                XYplane.Dot(x, y, XYplane.draw);
-               Assert(withinBounds & XYplane.IsDot(x, y)
-                       or ~withinBounds & ~XYplane.IsDot(x, y));
+               Assert(withinBounds and XYplane.IsDot(x, y)
+                       or not withinBounds and not XYplane.IsDot(x, y));
                XYplane.Dot(x, y, XYplane.erase);
-               Assert(~XYplane.IsDot(x, y))
+               Assert(not XYplane.IsDot(x, y))
        end TestPosition;
 
 
@@ -84,7 +84,7 @@ module XYplaneTest;
                XYplane.UseColor(0);
                XYplane.Dot(100, 100, XYplane.draw);
                Assert(XYplane.Color(100, 100) = 0);
-               Assert(~XYplane.IsDot(100, 100))
+               Assert(not XYplane.IsDot(100, 100))
        end Run;
 
 begin
index 6d2aebc68348a8fd809d3c520b78e9c426cce25d..aabd28c90d145bb3b1986ad1bf506bcf5329247d 100644 (file)
@@ -1014,7 +1014,7 @@ static void PrintCOperator(Trees_Node opNode, FILE *file)
                case NOT_EQ:
                        fprintf(file, "!=");
                        break;
-               case '&':
+               case AND:
                        fprintf(file, "&&");
                        break;
                case '*':
@@ -1038,8 +1038,8 @@ static void PrintCOperator(Trees_Node opNode, FILE *file)
                case '>':
                        fprintf(file, ">");
                        break;
-               case '~':
-                       fprintf(file, "! ");
+               case NOT:
+                       fprintf(file, "!");
                        break;
                case OR:
                        fprintf(file, "||");
@@ -2610,7 +2610,7 @@ static void Generate(Trees_Node node, FILE *file, int indent)
                symbol = Trees_Symbol(node);
                switch (symbol) {
                        case NOT_EQ:
-                       case '&':
+                       case AND:
                        case '*':
                        case '+':
                        case '-':
@@ -2618,7 +2618,7 @@ static void Generate(Trees_Node node, FILE *file, int indent)
                        case '<':
                        case '=':
                        case '>':
-                       case '~':
+                       case NOT:
                        case DIV:
                        case MOD:
                        case OR:
index cb93125ec63db7fb8e2154392bcdce95c6bb2444..dc7bb386ed455f21001c2c10a1573278cf890a22 100644 (file)
@@ -61,9 +61,10 @@ ORDINAL-STRING [0-9][0-9A-F]*X
 "<=" return LE;
 
 ">=" return GE;
+
 "!=" return NOT_EQ;
 
-[][*+/&~.,;|({^:)}=<>-] return yytext[0];
+[][*+/.,;|({^:)}=<>-] return yytext[0];
 
 {WORD} {
        int token;
@@ -196,9 +197,9 @@ static int Cmp(const void *word, const void *keywordPtr)
 
 static int KeywordToken(const char word[])
 {
-       static const char *keywords[] = {"array", "begin", "by", "case", "const", "div", "do", "else", "elsif", "end", "false", "for", "if", "import", "is", "mod", "module", "nil", "of", "or", "pointer", "procedure", "record", "repeat", "return", "then", "to", "true", "type", "until", "var", "while"};
+       static const char *keywords[] = {"and", "array", "begin", "by", "case", "const", "div", "do", "else", "elsif", "end", "false", "for", "if", "import", "is", "mod", "module", "nil", "not", "of", "or", "pointer", "procedure", "record", "repeat", "return", "then", "to", "true", "type", "until", "var", "while"};
 
-       static const int keywordTokens[] = {ARRAY, BEGIN_, BY, CASE, CONST, DIV, DO, ELSE, ELSIF, END, FALSE, FOR, IF, IMPORT, IS, MOD, MODULE, NIL, OF, OR, POINTER, PROCEDURE, RECORD, REPEAT, RETURN, THEN, TO, TRUE, TYPE, UNTIL, VAR, WHILE};
+       static const int keywordTokens[] = { AND, ARRAY, BEGIN_, BY, CASE, CONST, DIV, DO, ELSE, ELSIF, END, FALSE, FOR, IF, IMPORT, IS, MOD, MODULE, NIL, NOT, OF, OR, POINTER, PROCEDURE, RECORD, REPEAT, RETURN, THEN, TO, TRUE, TYPE, UNTIL, VAR, WHILE};
 
        const char **keywordPtr;
        ptrdiff_t pos;
index ea1cfa55c29ee978b11cbd6f5661ab8db35c88ab..4fe55288c64fdf35fd93cd68ece3bf11d5104250 100644 (file)
@@ -115,7 +115,7 @@ static void ExportSymbolTable(const char symfilePath[]);
 %token TOKEN_START
 
 /*reserved words (underscore avoids name clash)*/
-%token ARRAY BEGIN_ BY CASE CONST DIV DO ELSE ELSIF END FALSE FOR IF IMPORT IS MOD MODULE NIL OF OR POINTER PROCEDURE RECORD REPEAT RETURN THEN TO TRUE TYPE UNTIL VAR WHILE
+%token AND ARRAY BEGIN_ BY CASE CONST DIV DO ELSE ELSIF END FALSE FOR IF IMPORT IS MOD MODULE NIL NOT OF OR POINTER PROCEDURE RECORD REPEAT RETURN THEN TO TRUE TYPE UNTIL VAR WHILE
 
 /*two-character operators and delimiters*/
 %token BECOMES DOTDOT GE LE NOT_EQ
@@ -897,9 +897,9 @@ MulOperator:
        {
                $$ = MOD;
        }
-       | '&'
+       | AND
        {
-               $$ = '&';
+               $$ = AND;
        }
        ;
 
@@ -948,19 +948,19 @@ factor:
                CheckIsValueExpression($2);
                $$ = $2;
        }
-       | '~' factor
+       | NOT factor
        {
                $$ = NULL;
                CheckIsValueExpression($2);
-               if (Types_ExpressionCompatible('~', Trees_Type($2), NULL)) {
+               if (Types_ExpressionCompatible(NOT, Trees_Type($2), NULL)) {
                        if (IsBoolean($2)) {
                                $$ = Trees_NewBoolean(! Trees_Boolean($2));
                        } else {
-                               $$ = Trees_NewNode('~', $2, NULL);
+                               $$ = Trees_NewNode(NOT, $2, NULL);
                                Trees_SetType(Trees_NewLeaf(TREES_BOOLEAN_TYPE), $$);
                        }
                } else {
-                       Oberon_PrintError("error: incompatible type in operation \"~\": %s", TypeString(Trees_Type($2)));
+                       Oberon_PrintError("error: incompatible type in operation \"not\": %s", TypeString(Trees_Type($2)));
                        YYABORT;
                }
                assert($$ != NULL);
@@ -3082,7 +3082,7 @@ static Trees_Node TermConstValue(int operator, Trees_Node expA, Trees_Node expB)
                                }
                        }
                        break;
-               case '&':
+               case AND:
                        if (IsBoolean(expA) && IsBoolean(expB)) {
                                if (Trees_Symbol(expA) == TRUE) {
                                        result = expB;
@@ -3139,11 +3139,11 @@ static const char *OperatorString(int operator)
                case OR:
                        result = "OR";
                        break;
-               case '&':
-                       result = "&";
+               case AND:
+                       result = "AND";
                        break;
-               case '~':
-                       result = "~";
+               case NOT:
+                       result = "not";
                        break;
                case '=':
                        result = "=";
index c1f5c651aa715e977a46dc653415eb8d9f21106b..d27dc9a8be97650c0901b2415264d1a21002a71f 100644 (file)
@@ -680,10 +680,10 @@ int Types_ExpressionCompatible(int operator, Trees_Node firstType, Trees_Node se
                        result = Types_IsInteger(firstType) && Types_IsInteger(secondType);
                        break;
                case OR:
-               case '&':
+               case AND:
                        result = (firstTypeSym == TREES_BOOLEAN_TYPE) && Types_Same(firstType, secondType);
                        break;
-               case '~':
+               case NOT:
                        result = firstTypeSym == TREES_BOOLEAN_TYPE;
                        break;
                case '=':
index 473da9c0b34e70a91cbfe3354caf2eb916cc1935..3200d1d5a4d1b670a5d88dc33f4aa7105b366bb3 100644 (file)
@@ -383,17 +383,17 @@ static const YY_CHAR yy_ec[256] =
         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
         1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
-        1,    2,    4,    5,    1,    1,    1,    6,    1,    7,
-        6,    8,    9,    6,    9,   10,    6,   11,   11,   11,
-       11,   11,   11,   11,   11,   11,   11,   12,    6,   13,
+        1,    2,    4,    5,    1,    1,    1,    1,    1,    6,
+        7,    8,    9,    7,    9,   10,    7,   11,   11,   11,
+       11,   11,   11,   11,   11,   11,   11,   12,    7,   13,
        14,   15,    1,    1,   16,   16,   16,   16,   17,   16,
        18,   19,   18,   18,   18,   18,   18,   18,   18,   18,
        18,   18,   18,   18,   18,   18,   18,   20,   18,   18,
-        6,    1,    6,    6,   21,    1,   18,   18,   18,   18,
+        7,    1,    7,    7,   21,    1,   18,   18,   18,   18,
 
        18,   18,   18,   18,   18,   18,   18,   18,   18,   18,
        18,   18,   18,   18,   18,   18,   18,   18,   18,   18,
-       18,   18,    6,    6,    6,    6,    1,    1,    1,    1,
+       18,   18,    7,    7,    7,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
@@ -419,7 +419,7 @@ static const YY_CHAR yy_meta[22] =
 
 static const flex_int16_t yy_base[42] =
     {   0,
-        0,    0,   57,   58,   54,   58,   41,   49,   58,   45,
+        0,    0,   57,   58,   54,   58,   41,   49,   45,   58,
        42,   12,   37,   36,   35,   27,   45,   58,   41,   58,
        58,   58,   16,    0,   14,   35,   58,   58,   58,   58,
        23,   22,   58,   19,   26,   32,   30,   28,   58,   37,
@@ -437,8 +437,8 @@ static const flex_int16_t yy_def[42] =
 
 static const flex_int16_t yy_nxt[80] =
     {   0,
-        4,    5,    6,    7,    8,    9,   10,    9,    9,   11,
-       12,   13,   14,    9,   15,   16,   16,   16,   16,   16,
+        4,    5,    6,    7,    8,    9,   10,   10,   10,   11,
+       12,   13,   14,   10,   15,   16,   16,   16,   16,   16,
         4,   23,   24,   39,   25,   33,   34,   25,   25,   34,
        26,   27,   35,   31,   37,   35,   38,   19,   38,   19,
        38,   33,   39,   32,   36,   20,   17,   32,   30,   29,
@@ -454,7 +454,7 @@ static const flex_int16_t yy_chk[80] =
         1,   12,   12,   25,   25,   23,   23,   12,   12,   34,
        12,   12,   23,   41,   35,   34,   35,   40,   38,   40,
        37,   36,   32,   31,   26,   19,   17,   16,   15,   14,
-       13,   11,   10,    8,    7,    5,    3,   39,   39,   39,
+       13,   11,    9,    8,    7,    5,    3,   39,   39,   39,
        39,   39,   39,   39,   39,   39,   39,   39,   39,   39,
        39,   39,   39,   39,   39,   39,   39,   39,   39
     } ;
@@ -861,17 +861,17 @@ return GE;
        YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 64 "Oberon.l"
+#line 65 "Oberon.l"
 return NOT_EQ;
        YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 66 "Oberon.l"
+#line 67 "Oberon.l"
 return yytext[0];
        YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 68 "Oberon.l"
+#line 69 "Oberon.l"
 {
        int token;
        char *lexeme;
@@ -888,7 +888,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 82 "Oberon.l"
+#line 83 "Oberon.l"
 {
        int base;
        unsigned long int max, lexeme;
@@ -910,7 +910,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 101 "Oberon.l"
+#line 102 "Oberon.l"
 {
        int n = sscanf(yytext, "%" OBNC_REAL_MOD_R "f", &yylval.real);
        if (n != 1) {
@@ -921,7 +921,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 109 "Oberon.l"
+#line 110 "Oberon.l"
 {
        int lexemeLen;
        char *lexeme;
@@ -936,7 +936,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 121 "Oberon.l"
+#line 122 "Oberon.l"
 {
        long ordinalNumber;
        char *lexeme;
@@ -959,7 +959,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 141 "Oberon.l"
+#line 142 "Oberon.l"
 {
        int linenoStart, level, ch;
 
@@ -1001,7 +1001,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 180 "Oberon.l"
+#line 181 "Oberon.l"
 {
        if (isprint(yytext[0])) {
                Oberon_PrintError("error: unexpected character: %c", yytext[0]);
@@ -1013,7 +1013,7 @@ YY_RULE_SETUP
        YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 189 "Oberon.l"
+#line 190 "Oberon.l"
 ECHO;
        YY_BREAK
 #line 1020 "lex.yy.c"
@@ -1994,7 +1994,7 @@ void yyfree (void * ptr )
 
 #define YYTABLES_NAME "yytables"
 
-#line 189 "Oberon.l"
+#line 190 "Oberon.l"
 
 
 static int Cmp(const void *word, const void *keywordPtr)
@@ -2005,9 +2005,9 @@ static int Cmp(const void *word, const void *keywordPtr)
 
 static int KeywordToken(const char word[])
 {
-       static const char *keywords[] = {"array", "begin", "by", "case", "const", "div", "do", "else", "elsif", "end", "false", "for", "if", "import", "is", "mod", "module", "nil", "of", "or", "pointer", "procedure", "record", "repeat", "return", "then", "to", "true", "type", "until", "var", "while"};
+       static const char *keywords[] = {"and", "array", "begin", "by", "case", "const", "div", "do", "else", "elsif", "end", "false", "for", "if", "import", "is", "mod", "module", "nil", "not", "of", "or", "pointer", "procedure", "record", "repeat", "return", "then", "to", "true", "type", "until", "var", "while"};
 
-       static const int keywordTokens[] = {ARRAY, BEGIN_, BY, CASE, CONST, DIV, DO, ELSE, ELSIF, END, FALSE, FOR, IF, IMPORT, IS, MOD, MODULE, NIL, OF, OR, POINTER, PROCEDURE, RECORD, REPEAT, RETURN, THEN, TO, TRUE, TYPE, UNTIL, VAR, WHILE};
+       static const int keywordTokens[] = { AND, ARRAY, BEGIN_, BY, CASE, CONST, DIV, DO, ELSE, ELSIF, END, FALSE, FOR, IF, IMPORT, IS, MOD, MODULE, NIL, NOT, OF, OR, POINTER, PROCEDURE, RECORD, REPEAT, RETURN, THEN, TO, TRUE, TYPE, UNTIL, VAR, WHILE};
 
        const char **keywordPtr;
        ptrdiff_t pos;
index 76ea7a85887c30777f7c63e1d8eca07ed20d50c0..963e9ca0dc77eb716b4d8f2b267ca71ad1bb333a 100644 (file)
@@ -464,7 +464,7 @@ extern int yylex (void);
 #undef yyTABLES_NAME
 #endif
 
-#line 189 "Oberon.l"
+#line 190 "Oberon.l"
 
 
 #line 471 "lex.yy.h"
index 4312cc6302f6c02a4556ff9ab95e81b333c03597..6d21ebf1fa09fc4aeaed6df452d59ee13bed4bcd 100644 (file)
@@ -51,8 +51,8 @@ static struct { int token; const char *value; } expectedOutput[] = {
        {'-', ""},
        {'*', ""},
        {'/', ""},
-       {'~', ""},
-       {'&', ""},
+       {NOT, ""},
+       {AND, ""},
        {'.', ""},
        {',', ""},
        {';', ""},
index 33277e4d3e90185ada0ba727cb0a76a29dfec187..e3a78cdf5cae61117b361b1eb04333576a4e9d9a 100644 (file)
@@ -204,94 +204,98 @@ extern int yydebug;
   enum yytokentype
   {
     TOKEN_START = 258,
-    ARRAY = 259,
-    BEGIN_ = 260,
-    BY = 261,
-    CASE = 262,
-    CONST = 263,
-    DIV = 264,
-    DO = 265,
-    ELSE = 266,
-    ELSIF = 267,
-    END = 268,
-    FALSE = 269,
-    FOR = 270,
-    IF = 271,
-    IMPORT = 272,
-    IS = 273,
-    MOD = 274,
-    MODULE = 275,
-    NIL = 276,
-    OF = 277,
-    OR = 278,
-    POINTER = 279,
-    PROCEDURE = 280,
-    RECORD = 281,
-    REPEAT = 282,
-    RETURN = 283,
-    THEN = 284,
-    TO = 285,
-    TRUE = 286,
-    TYPE = 287,
-    UNTIL = 288,
-    VAR = 289,
-    WHILE = 290,
-    BECOMES = 291,
-    DOTDOT = 292,
-    GE = 293,
-    LE = 294,
-    NOT_EQ = 295,
-    IDENT = 296,
-    INTEGER = 297,
-    REAL = 298,
-    STRING = 299,
-    TOKEN_END = 300
+    AND = 259,
+    ARRAY = 260,
+    BEGIN_ = 261,
+    BY = 262,
+    CASE = 263,
+    CONST = 264,
+    DIV = 265,
+    DO = 266,
+    ELSE = 267,
+    ELSIF = 268,
+    END = 269,
+    FALSE = 270,
+    FOR = 271,
+    IF = 272,
+    IMPORT = 273,
+    IS = 274,
+    MOD = 275,
+    MODULE = 276,
+    NIL = 277,
+    NOT = 278,
+    OF = 279,
+    OR = 280,
+    POINTER = 281,
+    PROCEDURE = 282,
+    RECORD = 283,
+    REPEAT = 284,
+    RETURN = 285,
+    THEN = 286,
+    TO = 287,
+    TRUE = 288,
+    TYPE = 289,
+    UNTIL = 290,
+    VAR = 291,
+    WHILE = 292,
+    BECOMES = 293,
+    DOTDOT = 294,
+    GE = 295,
+    LE = 296,
+    NOT_EQ = 297,
+    IDENT = 298,
+    INTEGER = 299,
+    REAL = 300,
+    STRING = 301,
+    TOKEN_END = 302
   };
 #endif
 /* Tokens.  */
 #define TOKEN_START 258
-#define ARRAY 259
-#define BEGIN_ 260
-#define BY 261
-#define CASE 262
-#define CONST 263
-#define DIV 264
-#define DO 265
-#define ELSE 266
-#define ELSIF 267
-#define END 268
-#define FALSE 269
-#define FOR 270
-#define IF 271
-#define IMPORT 272
-#define IS 273
-#define MOD 274
-#define MODULE 275
-#define NIL 276
-#define OF 277
-#define OR 278
-#define POINTER 279
-#define PROCEDURE 280
-#define RECORD 281
-#define REPEAT 282
-#define RETURN 283
-#define THEN 284
-#define TO 285
-#define TRUE 286
-#define TYPE 287
-#define UNTIL 288
-#define VAR 289
-#define WHILE 290
-#define BECOMES 291
-#define DOTDOT 292
-#define GE 293
-#define LE 294
-#define NOT_EQ 295
-#define IDENT 296
-#define INTEGER 297
-#define REAL 298
-#define STRING 299
-#define TOKEN_END 300
+#define AND 259
+#define ARRAY 260
+#define BEGIN_ 261
+#define BY 262
+#define CASE 263
+#define CONST 264
+#define DIV 265
+#define DO 266
+#define ELSE 267
+#define ELSIF 268
+#define END 269
+#define FALSE 270
+#define FOR 271
+#define IF 272
+#define IMPORT 273
+#define IS 274
+#define MOD 275
+#define MODULE 276
+#define NIL 277
+#define NOT 278
+#define OF 279
+#define OR 280
+#define POINTER 281
+#define PROCEDURE 282
+#define RECORD 283
+#define REPEAT 284
+#define RETURN 285
+#define THEN 286
+#define TO 287
+#define TRUE 288
+#define TYPE 289
+#define UNTIL 290
+#define VAR 291
+#define WHILE 292
+#define BECOMES 293
+#define DOTDOT 294
+#define GE 295
+#define LE 296
+#define NOT_EQ 297
+#define IDENT 298
+#define INTEGER 299
+#define REAL 300
+#define STRING 301
+#define TOKEN_END 302
 
 /* Value type.  */
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
@@ -305,7 +309,7 @@ union YYSTYPE
        const char *string;
        Trees_Node node;
 
-#line 309 "y.tab.c"
+#line 313 "y.tab.c"
 
 };
 typedef union YYSTYPE YYSTYPE;
@@ -636,7 +640,7 @@ union yyalloc
 #define YYNSTATES  272
 
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   300
+#define YYMAXUTOK   302
 
 
 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
@@ -651,16 +655,16 @@ static const yytype_int8 yytranslate[] =
        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,    59,     2,
-      50,    51,    47,    56,    49,    57,    46,    58,     2,     2,
-       2,     2,     2,     2,     2,     2,     2,     2,    53,    52,
-      54,    48,    55,     2,     2,     2,     2,     2,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+      52,    53,    49,    58,    51,    59,    48,    60,     2,     2,
+       2,     2,     2,     2,     2,     2,     2,     2,    55,    54,
+      56,    50,    57,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,    61,     2,    62,    63,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
-       2,     2,     2,     2,    64,     2,    60,     2,     2,     2,
+       2,     2,     2,     2,    64,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -678,7 +682,7 @@ static const yytype_int8 yytranslate[] =
       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
-      45
+      45,    46,    47
 };
 
 #if YYDEBUG
@@ -711,14 +715,14 @@ static const yytype_int16 yyrline[] =
    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
 static const char *const yytname[] =
 {
-  "$end", "error", "$undefined", "TOKEN_START", "ARRAY", "BEGIN_", "BY",
-  "CASE", "CONST", "DIV", "DO", "ELSE", "ELSIF", "END", "FALSE", "FOR",
-  "IF", "IMPORT", "IS", "MOD", "MODULE", "NIL", "OF", "OR", "POINTER",
-  "PROCEDURE", "RECORD", "REPEAT", "RETURN", "THEN", "TO", "TRUE", "TYPE",
-  "UNTIL", "VAR", "WHILE", "BECOMES", "DOTDOT", "GE", "LE", "NOT_EQ",
-  "IDENT", "INTEGER", "REAL", "STRING", "TOKEN_END", "'.'", "'*'", "'='",
-  "','", "'('", "')'", "';'", "':'", "'<'", "'>'", "'+'", "'-'", "'/'",
-  "'&'", "'~'", "'['", "']'", "'^'", "'|'", "$accept", "qualident",
+  "$end", "error", "$undefined", "TOKEN_START", "AND", "ARRAY", "BEGIN_",
+  "BY", "CASE", "CONST", "DIV", "DO", "ELSE", "ELSIF", "END", "FALSE",
+  "FOR", "IF", "IMPORT", "IS", "MOD", "MODULE", "NIL", "NOT", "OF", "OR",
+  "POINTER", "PROCEDURE", "RECORD", "REPEAT", "RETURN", "THEN", "TO",
+  "TRUE", "TYPE", "UNTIL", "VAR", "WHILE", "BECOMES", "DOTDOT", "GE", "LE",
+  "NOT_EQ", "IDENT", "INTEGER", "REAL", "STRING", "TOKEN_END", "'.'",
+  "'*'", "'='", "','", "'('", "')'", "';'", "':'", "'<'", "'>'", "'+'",
+  "'-'", "'/'", "'['", "']'", "'^'", "'|'", "$accept", "qualident",
   "identdef", "ExportMarkOpt", "number", "ConstDeclaration",
   "ConstExpression", "TypeDeclaration", "TypeIdentDef", "type",
   "ArrayType", "ArrayLengthOf", "LengthRep", "length", "RecordType",
@@ -756,13 +760,13 @@ static const yytype_int16 yytoknum[] =
      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
-     295,   296,   297,   298,   299,   300,    46,    42,    61,    44,
-      40,    41,    59,    58,    60,    62,    43,    45,    47,    38,
-     126,    91,    93,    94,   124
+     295,   296,   297,   298,   299,   300,   301,   302,    46,    42,
+      61,    44,    40,    41,    59,    58,    60,    62,    43,    45,
+      47,    91,    93,    94,   124
 };
 # endif
 
-#define YYPACT_NINF (-124)
+#define YYPACT_NINF (-129)
 
 #define yypact_value_is_default(Yyn) \
   ((Yyn) == YYPACT_NINF)
@@ -776,34 +780,34 @@ static const yytype_int16 yytoknum[] =
      STATE-NUM.  */
 static const yytype_int16 yypact[] =
 {
-       8,    -3,    19,    -2,  -124,  -124,    49,    28,    69,  -124,
-      48,     3,  -124,  -124,    89,    75,    71,  -124,    28,  -124,
-      76,    38,  -124,   103,  -124,    84,  -124,  -124,  -124,    77,
-      78,    73,    30,    82,    30,    38,    30,  -124,    91,  -124,
-    -124,  -124,  -124,    79,  -124,  -124,  -124,  -124,  -124,    87,
-    -124,  -124,    76,  -124,  -124,    30,  -124,  -124,  -124,  -124,
-      65,    20,   107,    94,   104,  -124,   106,    99,   123,   -26,
-      30,    38,    90,    76,   112,    92,    86,     6,  -124,  -124,
-    -124,  -124,  -124,  -124,  -124,  -124,  -124,  -124,  -124,  -124,
-      30,    20,  -124,  -124,  -124,  -124,  -124,  -124,    30,    20,
-    -124,    -1,  -124,  -124,    67,    30,    30,    38,    30,    38,
-      98,   -34,    30,  -124,  -124,  -124,  -124,  -124,  -124,   -10,
-      93,    76,    95,    96,   101,  -124,  -124,    30,   111,  -124,
-     105,    97,  -124,  -124,  -124,     6,  -124,    76,  -124,     6,
-    -124,   101,    33,    -1,   108,  -124,  -124,  -124,  -124,  -124,
-    -124,    20,  -124,  -124,  -124,    -4,  -124,    18,  -124,   109,
-    -124,  -124,   136,  -124,  -124,  -124,  -124,  -124,  -124,   -22,
-     -36,    76,     6,  -124,  -124,  -124,    69,   -20,  -124,  -124,
-    -124,    -7,  -124,  -124,   113,  -124,   115,  -124,   131,   110,
-    -124,    42,  -124,  -124,  -124,  -124,  -124,    67,    67,    38,
-      67,    30,   139,    81,   102,    30,  -124,  -124,  -124,  -124,
-      89,  -124,   114,   116,  -124,   117,  -124,    30,  -124,   118,
-    -124,  -124,    76,     6,  -124,  -124,  -124,  -124,  -124,    38,
-      38,    30,   144,    30,  -124,  -124,   132,   119,   127,  -124,
-      57,  -124,  -124,  -124,  -124,   150,  -124,   138,  -124,   160,
-      30,   161,   113,  -124,  -124,   135,  -124,  -124,    38,    38,
-    -124,   137,  -124,  -124,  -124,     7,  -124,  -124,  -124,   151,
-    -124,  -124
+      -7,   -14,    19,   -17,  -129,  -129,    31,    28,    53,  -129,
+      35,   -16,  -129,  -129,    71,    50,    45,  -129,    28,  -129,
+      47,    95,  -129,    77,  -129,    56,  -129,  -129,  -129,    44,
+      59,    40,    21,    67,    21,    95,    21,  -129,    75,  -129,
+    -129,  -129,  -129,    61,  -129,  -129,  -129,  -129,  -129,    74,
+    -129,  -129,    47,  -129,  -129,    21,  -129,  -129,  -129,  -129,
+      64,    85,    92,    81,    93,  -129,    96,    91,   122,   -31,
+      21,    95,    86,    47,   108,    89,    82,    15,  -129,  -129,
+    -129,  -129,  -129,  -129,  -129,  -129,  -129,  -129,  -129,  -129,
+      21,    85,  -129,  -129,    85,  -129,  -129,  -129,  -129,    21,
+    -129,     6,  -129,  -129,    24,    21,    21,    95,    21,    95,
+      97,    -2,    21,  -129,  -129,  -129,  -129,  -129,  -129,   -27,
+      87,    47,    88,    90,    94,  -129,  -129,    21,   111,  -129,
+      99,   100,  -129,  -129,  -129,    15,  -129,    47,  -129,    15,
+    -129,    94,   -12,     6,  -129,   101,  -129,  -129,  -129,  -129,
+    -129,    85,  -129,  -129,  -129,    -5,  -129,   -24,  -129,   106,
+    -129,  -129,   140,  -129,  -129,  -129,  -129,  -129,  -129,    10,
+     -28,    47,    15,  -129,  -129,  -129,    53,   -21,  -129,  -129,
+    -129,    -6,  -129,  -129,   112,  -129,   113,  -129,   135,   103,
+    -129,    -3,  -129,  -129,  -129,  -129,  -129,    24,    24,    95,
+      24,    21,   147,    41,    73,    21,  -129,  -129,  -129,  -129,
+      71,  -129,   107,   105,  -129,   118,  -129,    21,  -129,   109,
+    -129,  -129,    47,    15,  -129,  -129,  -129,  -129,  -129,    95,
+      95,    21,   149,    21,  -129,  -129,   137,   110,   132,  -129,
+       9,  -129,  -129,  -129,  -129,   155,  -129,   139,  -129,   161,
+      21,   159,   112,  -129,  -129,   131,  -129,  -129,    95,    95,
+    -129,   133,  -129,  -129,  -129,     7,  -129,  -129,  -129,   153,
+    -129,  -129
 };
 
   /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
@@ -820,13 +824,13 @@ static const yytype_uint8 yydefact[] =
       42,     0,     0,     0,     0,    98,     0,     0,     0,    74,
       55,    91,     0,   142,   132,     0,     0,     0,     9,    10,
       50,    58,    49,    47,    45,    44,    46,    48,    56,    57,
-      55,     0,    70,    68,    69,     7,     8,    67,    55,     0,
+      55,     0,    70,    68,     0,    69,     7,     8,    67,    55,
       66,    51,    59,    71,   108,    55,    55,    91,    55,    91,
        0,    55,    55,    79,    75,    92,    96,   163,    33,     0,
        0,     0,     0,     0,    40,    12,   140,    55,     0,    38,
       26,     2,    13,    11,    14,     0,    15,    29,    16,     0,
-      17,    40,    43,    52,     0,    73,    63,    64,    61,    62,
-      65,     0,   113,   114,   115,     0,   105,     0,   109,   111,
+      17,    40,    43,    52,    73,     0,    65,    63,    64,    61,
+      62,     0,   113,   114,   115,     0,   105,     0,   109,   111,
      121,   122,   124,   100,   119,   118,    77,    81,    82,     0,
        0,     0,     0,   144,   127,   146,   134,   150,   126,    39,
       22,     0,    20,    36,     0,    24,     0,    18,     0,    28,
@@ -844,16 +848,16 @@ static const yytype_uint8 yydefact[] =
   /* YYPGOTO[NTERM-NUM].  */
 static const yytype_int16 yypgoto[] =
 {
-    -124,   -99,   -19,  -124,  -124,  -124,   -51,  -124,  -124,  -123,
-    -124,  -124,  -124,   -40,  -124,  -124,  -124,  -124,  -124,  -124,
-     -43,   120,  -124,  -124,  -124,  -124,    39,  -124,   -30,  -124,
-     100,  -124,  -124,   121,  -124,   -92,   -55,  -124,  -124,    70,
-     125,  -124,  -124,   -35,  -124,  -124,   -33,  -124,  -124,  -124,
-    -124,  -124,   -16,  -124,   -15,   -14,  -124,  -124,  -124,  -124,
-    -124,  -124,  -124,  -124,  -124,  -124,   -25,  -124,    12,  -124,
-    -124,  -124,  -124,  -124,  -124,  -124,  -124,  -124,  -124,  -124,
-    -124,   -54,  -124,  -124,  -124,  -124,  -124,  -124,  -124,  -124,
-    -124,   171,  -124,  -124
+    -129,   -99,   -19,  -129,  -129,  -129,   -51,  -129,  -129,  -128,
+    -129,  -129,  -129,   -39,  -129,  -129,  -129,  -129,  -129,  -129,
+     -43,   115,  -129,  -129,  -129,  -129,    39,  -129,   -30,  -129,
+     102,  -129,  -129,    98,  -129,   -86,   -55,  -129,  -129,    69,
+     114,  -129,  -129,   -35,  -129,  -129,   -33,  -129,  -129,  -129,
+    -129,  -129,   -15,  -129,    -8,    -9,  -129,  -129,  -129,  -129,
+    -129,  -129,  -129,  -129,  -129,  -129,   -26,  -129,    17,  -129,
+    -129,  -129,  -129,  -129,  -129,  -129,  -129,  -129,  -129,  -129,
+    -129,   -52,  -129,  -129,  -129,  -129,  -129,  -129,  -129,  -129,
+    -129,   165,  -129,  -129
 };
 
   /* YYDEFGOTO[NTERM-NUM].  */
@@ -876,55 +880,55 @@ static const yytype_int16 yydefgoto[] =
      number is the opposite.  If YYTABLE_NINF, syntax error.  */
 static const yytype_int16 yytable[] =
 {
-      67,    30,    59,    68,    78,   154,   103,   145,   146,   196,
-     127,   269,   187,   205,   211,   216,   192,   167,   147,     5,
-     110,  -157,    57,    58,   111,    79,   207,   205,     1,   206,
-     128,   129,   130,    75,    92,   112,   103,   113,     4,   171,
-     115,    93,   217,   172,   103,    32,   148,   131,   131,   209,
-       6,    94,    18,    33,    34,    19,    81,   149,   150,   195,
-     197,    37,    95,    96,    97,    35,     7,   198,   144,    10,
-      98,   199,   163,    36,   165,   160,   161,    13,   164,    37,
-      99,   168,   168,    80,    16,   218,    57,    58,    81,    88,
-      89,   171,   230,   231,    21,   223,   103,    79,   154,   154,
-     244,   154,   174,    82,    83,    84,   255,    24,   131,   152,
-     256,   153,    27,    85,   233,   234,    49,    29,    50,    86,
-      87,    88,    89,    63,    53,    56,    55,    70,    72,   104,
-     105,    71,   108,   109,   106,   107,   117,   121,   126,   166,
-     125,   183,   201,   186,   221,   173,   200,   175,   176,   229,
-     228,   177,   208,   262,   131,   184,   220,   248,   239,   194,
-     250,   211,   222,   257,   226,   237,   270,   258,   238,   242,
-     259,    79,   252,   271,   261,   235,   263,   241,   268,   243,
-     193,   224,   170,   225,   254,   236,   227,    79,   210,    28,
-     142,     0,     0,   119,   245,   246,   116,     0,   247,     0,
+      67,    30,    59,    68,    78,   154,   103,   187,   144,   196,
+     146,   192,   269,    81,     1,   211,   147,   110,   216,     5,
+     127,   111,  -157,   205,   171,    79,   148,   198,   172,     4,
+     112,   199,   113,    75,   207,    18,   103,     6,    19,   103,
+     115,   128,   129,   130,   209,   217,    88,    89,   171,     7,
+     131,   167,   223,   230,   231,   149,    57,    58,   131,   197,
+     255,   205,    13,   206,   256,   195,   150,   131,   152,   145,
+     153,    10,   163,    16,   165,   160,   161,    21,   164,    57,
+      58,   168,   168,    80,    24,   218,   233,   234,    27,    81,
+      29,    49,    50,    53,    56,   244,   103,    79,   154,   154,
+      92,   154,   174,    32,    82,    83,    84,    93,    94,    55,
+      63,    33,    34,    70,    85,    71,   104,    72,    95,   105,
+      86,    87,    88,    89,    35,   106,   108,   107,    37,    96,
+      97,    98,    36,   109,   117,   121,   126,    99,    37,   125,
+     166,   173,   175,   183,   176,   200,   177,   201,   186,   221,
+     228,   184,   208,   262,   194,   131,   220,   222,   229,   238,
+     237,   239,   242,   248,   226,   252,   270,   250,   211,   257,
+     258,    79,   259,   261,   263,   235,   268,   271,   241,   243,
+     193,   170,   224,    28,   236,   116,   254,    79,   119,   143,
+     225,   227,   142,   210,   245,   246,     0,     0,   247,     0,
      249,     0,     0,     0,     0,     0,     0,     0,     0,     0,
-       0,     0,   143,     0,     0,     0,     0,     0,     0,     0,
+       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      260,     0,     0,   266,   267
 };
 
 static const yytype_int16 yycheck[] =
 {
-      35,    20,    32,    36,    55,   104,    61,    99,     9,    13,
-       4,     4,   135,    49,    34,    22,   139,    51,    19,     0,
-      46,    41,    56,    57,    50,    55,    62,    49,    20,    51,
-      24,    25,    26,    52,    14,    61,    91,    63,    41,    49,
-      70,    21,    49,    53,    99,     7,    47,    41,    41,   172,
-      52,    31,    49,    15,    16,    52,    23,    58,    59,   151,
-      64,    41,    42,    43,    44,    27,    17,    49,    98,    41,
-      50,    53,   107,    35,   109,   105,   106,     8,   108,    41,
-      60,   111,   112,    18,    36,   184,    56,    57,    23,    56,
-      57,    49,    11,    12,     5,    53,   151,   127,   197,   198,
-     223,   200,   121,    38,    39,    40,    49,    32,    41,    42,
-      53,    44,    41,    48,    12,    13,    13,    41,    34,    54,
-      55,    56,    57,    41,    47,    52,    48,    36,    41,    22,
-      36,    52,    33,    10,    30,    29,    46,    25,    52,    41,
-      48,    30,     6,    46,    13,    52,    37,    52,    52,    10,
-     201,    50,   171,   252,    41,    50,    41,    13,    41,    51,
-      28,    34,    52,    13,   199,    51,   265,    29,    52,    51,
-      10,   201,    53,    22,    13,   205,    41,   217,    41,   222,
-     141,   197,   112,   198,   238,   210,   200,   217,   176,    18,
-      90,    -1,    -1,    73,   229,   230,    71,    -1,   231,    -1,
+      35,    20,    32,    36,    55,   104,    61,   135,    94,    14,
+       4,   139,     5,    25,    21,    36,    10,    48,    24,     0,
+       5,    52,    43,    51,    51,    55,    20,    51,    55,    43,
+      61,    55,    63,    52,    62,    51,    91,    54,    54,    94,
+      70,    26,    27,    28,   172,    51,    58,    59,    51,    18,
+      43,    53,    55,    12,    13,    49,    58,    59,    43,    64,
+      51,    51,     9,    53,    55,   151,    60,    43,    44,    99,
+      46,    43,   107,    38,   109,   105,   106,     6,   108,    58,
+      59,   111,   112,    19,    34,   184,    13,    14,    43,    25,
+      43,    14,    36,    49,    54,   223,   151,   127,   197,   198,
+      15,   200,   121,     8,    40,    41,    42,    22,    23,    50,
+      43,    16,    17,    38,    50,    54,    24,    43,    33,    38,
+      56,    57,    58,    59,    29,    32,    35,    31,    43,    44,
+      45,    46,    37,    11,    48,    27,    54,    52,    43,    50,
+      43,    54,    54,    32,    54,    39,    52,     7,    48,    14,
+     201,    52,   171,   252,    53,    43,    43,    54,    11,    54,
+      53,    43,    53,    14,   199,    55,   265,    30,    36,    14,
+      31,   201,    11,    14,    43,   205,    43,    24,   217,   222,
+     141,   112,   197,    18,   210,    71,   238,   217,    73,    91,
+     198,   200,    90,   176,   229,   230,    -1,    -1,   231,    -1,
      233,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
-      -1,    -1,    91,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      250,    -1,    -1,   258,   259
 };
 
@@ -932,34 +936,34 @@ static const yytype_int16 yycheck[] =
      symbol of state STATE-NUM.  */
 static const yytype_uint8 yystos[] =
 {
-       0,    20,   151,   152,    41,     0,    52,    17,   153,   154,
-      41,   155,   156,     8,   133,   134,    36,   157,    49,    52,
-     135,     5,   131,   158,    32,   136,   137,    41,   156,    41,
-      67,    70,     7,    15,    16,    27,    35,    41,   101,   105,
-     106,   107,   108,   109,   110,   114,   121,   123,   124,    13,
-      34,   139,   138,    47,    68,    48,    52,    56,    57,    93,
-      95,    96,   115,    41,   125,    93,   111,   108,   111,   102,
-      36,    52,    41,   140,   141,    67,    72,    73,    71,    93,
-      18,    23,    38,    39,    40,    48,    54,    55,    56,    57,
-      94,    97,    14,    21,    31,    42,    43,    44,    50,    60,
-      69,    98,   100,   101,    22,    36,    30,    29,    33,    10,
-      46,    50,    61,    63,   103,    93,   105,    46,    67,    86,
-      92,    25,   128,   129,   130,    48,    52,     4,    24,    25,
-      26,    41,    66,    74,    75,    76,    79,    80,    87,    88,
-      89,    90,    95,    98,    93,   100,     9,    19,    47,    58,
-      59,    99,    42,    44,    66,   116,   117,   118,   119,   120,
-      93,    93,   126,   108,    93,   108,    41,    51,    93,   104,
-     104,    49,    53,    52,    67,    52,    52,    50,    91,   142,
-      71,    77,    78,    30,    50,    81,    46,    74,    83,    84,
-      85,    86,    74,    91,    51,   100,    13,    64,    49,    53,
-      37,     6,   127,   112,   122,    49,    51,    62,    67,    74,
-     133,    34,   143,   144,   146,   147,    22,    49,    66,    82,
-      41,    13,    52,    53,   117,   119,   108,   120,    71,    10,
-      11,    12,   113,    12,    13,    93,   131,    51,    52,    41,
-     148,    78,    51,    85,    74,   108,   108,   111,    13,   111,
-      28,   132,    53,   145,   146,    49,    53,    13,    29,    10,
-      93,    13,    66,    41,   149,   150,   108,   108,    41,     4,
-      66,    22
+       0,    21,   151,   152,    43,     0,    54,    18,   153,   154,
+      43,   155,   156,     9,   133,   134,    38,   157,    51,    54,
+     135,     6,   131,   158,    34,   136,   137,    43,   156,    43,
+      67,    70,     8,    16,    17,    29,    37,    43,   101,   105,
+     106,   107,   108,   109,   110,   114,   121,   123,   124,    14,
+      36,   139,   138,    49,    68,    50,    54,    58,    59,    93,
+      95,    96,   115,    43,   125,    93,   111,   108,   111,   102,
+      38,    54,    43,   140,   141,    67,    72,    73,    71,    93,
+      19,    25,    40,    41,    42,    50,    56,    57,    58,    59,
+      94,    97,    15,    22,    23,    33,    44,    45,    46,    52,
+      69,    98,   100,   101,    24,    38,    32,    31,    35,    11,
+      48,    52,    61,    63,   103,    93,   105,    48,    67,    86,
+      92,    27,   128,   129,   130,    50,    54,     5,    26,    27,
+      28,    43,    66,    74,    75,    76,    79,    80,    87,    88,
+      89,    90,    95,    98,   100,    93,     4,    10,    20,    49,
+      60,    99,    44,    46,    66,   116,   117,   118,   119,   120,
+      93,    93,   126,   108,    93,   108,    43,    53,    93,   104,
+     104,    51,    55,    54,    67,    54,    54,    52,    91,   142,
+      71,    77,    78,    32,    52,    81,    48,    74,    83,    84,
+      85,    86,    74,    91,    53,   100,    14,    64,    51,    55,
+      39,     7,   127,   112,   122,    51,    53,    62,    67,    74,
+     133,    36,   143,   144,   146,   147,    24,    51,    66,    82,
+      43,    14,    54,    55,   117,   119,   108,   120,    71,    11,
+      12,    13,   113,    13,    14,    93,   131,    53,    54,    43,
+     148,    78,    53,    85,    74,   108,   108,   111,    14,   111,
+      30,   132,    55,   145,   146,    51,    55,    14,    31,    11,
+      93,    14,    66,    43,   149,   150,   108,   108,    43,     5,
+      66,    24
 };
 
   /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
@@ -1705,7 +1709,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewIdent((yyvsp[0].ident));
        }
-#line 1709 "y.tab.c"
+#line 1713 "y.tab.c"
     break;
 
   case 3:
@@ -1713,7 +1717,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewIdent(Util_String("%s.%s", (yyvsp[-2].ident), (yyvsp[0].ident)));
        }
-#line 1717 "y.tab.c"
+#line 1721 "y.tab.c"
     break;
 
   case 4:
@@ -1732,7 +1736,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 1736 "y.tab.c"
+#line 1740 "y.tab.c"
     break;
 
   case 5:
@@ -1740,7 +1744,7 @@ yyreduce:
         {
                (yyval.integer) = 1;
        }
-#line 1744 "y.tab.c"
+#line 1748 "y.tab.c"
     break;
 
   case 6:
@@ -1748,7 +1752,7 @@ yyreduce:
         {
                (yyval.integer) = 0;
        }
-#line 1752 "y.tab.c"
+#line 1756 "y.tab.c"
     break;
 
   case 7:
@@ -1756,7 +1760,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewInteger((yyvsp[0].integer));
        }
-#line 1760 "y.tab.c"
+#line 1764 "y.tab.c"
     break;
 
   case 8:
@@ -1764,7 +1768,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewReal((yyvsp[0].real));
        }
-#line 1768 "y.tab.c"
+#line 1772 "y.tab.c"
     break;
 
   case 9:
@@ -1781,7 +1785,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 1785 "y.tab.c"
+#line 1789 "y.tab.c"
     break;
 
   case 10:
@@ -1794,7 +1798,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 1798 "y.tab.c"
+#line 1802 "y.tab.c"
     break;
 
   case 11:
@@ -1818,7 +1822,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 1822 "y.tab.c"
+#line 1826 "y.tab.c"
     break;
 
   case 12:
@@ -1829,7 +1833,7 @@ yyreduce:
                Table_Put((yyvsp[-1].node));
                (yyval.node) = (yyvsp[-1].node);
        }
-#line 1833 "y.tab.c"
+#line 1837 "y.tab.c"
     break;
 
   case 18:
@@ -1850,7 +1854,7 @@ yyreduce:
                        exit(EXIT_FAILURE);
                }
        }
-#line 1854 "y.tab.c"
+#line 1858 "y.tab.c"
     break;
 
   case 19:
@@ -1861,7 +1865,7 @@ yyreduce:
                }
                (yyval.node) = (yyvsp[-1].node);
        }
-#line 1865 "y.tab.c"
+#line 1869 "y.tab.c"
     break;
 
   case 20:
@@ -1869,7 +1873,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewNode(TREES_NOSYM, (yyvsp[0].node), NULL);
        }
-#line 1873 "y.tab.c"
+#line 1877 "y.tab.c"
     break;
 
   case 21:
@@ -1877,7 +1881,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewNode(TREES_NOSYM, (yyvsp[0].node), (yyvsp[-2].node));
        }
-#line 1881 "y.tab.c"
+#line 1885 "y.tab.c"
     break;
 
   case 22:
@@ -1898,7 +1902,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 1902 "y.tab.c"
+#line 1906 "y.tab.c"
     break;
 
   case 23:
@@ -1907,7 +1911,7 @@ yyreduce:
                recordDeclarationStack = Trees_Right(recordDeclarationStack);
                (yyval.node) = Types_NewRecord(Types_RecordBaseType((yyvsp[-2].node)), (yyvsp[-1].node));
        }
-#line 1911 "y.tab.c"
+#line 1915 "y.tab.c"
     break;
 
   case 24:
@@ -1919,7 +1923,7 @@ yyreduce:
                }
                recordDeclarationStack = Trees_NewNode(TREES_NOSYM, (yyval.node), recordDeclarationStack);
        }
-#line 1923 "y.tab.c"
+#line 1927 "y.tab.c"
     break;
 
   case 25:
@@ -1927,7 +1931,7 @@ yyreduce:
         {
                (yyval.node) = (yyvsp[-1].node);
        }
-#line 1931 "y.tab.c"
+#line 1935 "y.tab.c"
     break;
 
   case 26:
@@ -1935,7 +1939,7 @@ yyreduce:
         {
                (yyval.node) = NULL;
        }
-#line 1939 "y.tab.c"
+#line 1943 "y.tab.c"
     break;
 
   case 27:
@@ -1977,7 +1981,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 1981 "y.tab.c"
+#line 1985 "y.tab.c"
     break;
 
   case 28:
@@ -1986,7 +1990,7 @@ yyreduce:
                Trees_ReverseList(&(yyvsp[0].node)); /*correct order*/
                (yyval.node) = (yyvsp[0].node);
        }
-#line 1990 "y.tab.c"
+#line 1994 "y.tab.c"
     break;
 
   case 29:
@@ -1994,7 +1998,7 @@ yyreduce:
         {
                (yyval.node) = NULL;
        }
-#line 1998 "y.tab.c"
+#line 2002 "y.tab.c"
     break;
 
   case 30:
@@ -2002,7 +2006,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewNode(TREES_FIELD_LIST_SEQUENCE, (yyvsp[0].node), NULL);
        }
-#line 2006 "y.tab.c"
+#line 2010 "y.tab.c"
     break;
 
   case 31:
@@ -2031,7 +2035,7 @@ yyreduce:
                }
                (yyval.node) = Trees_NewNode(TREES_FIELD_LIST_SEQUENCE, (yyvsp[0].node), (yyvsp[-2].node));
        }
-#line 2035 "y.tab.c"
+#line 2039 "y.tab.c"
     break;
 
   case 32:
@@ -2081,7 +2085,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 2085 "y.tab.c"
+#line 2089 "y.tab.c"
     break;
 
   case 33:
@@ -2089,7 +2093,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewNode(TREES_IDENT_LIST, (yyvsp[0].node), NULL);
        }
-#line 2093 "y.tab.c"
+#line 2097 "y.tab.c"
     break;
 
   case 34:
@@ -2100,7 +2104,7 @@ yyreduce:
                reversedIdents = Trees_NewNode(TREES_IDENT_LIST, (yyvsp[0].node), (yyvsp[-2].node));
                (yyval.node) = reversedIdents;
        }
-#line 2104 "y.tab.c"
+#line 2108 "y.tab.c"
     break;
 
   case 35:
@@ -2136,7 +2140,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 2140 "y.tab.c"
+#line 2144 "y.tab.c"
     break;
 
   case 36:
@@ -2146,7 +2150,7 @@ yyreduce:
                        Trees_SetType(Types_NewPointer(NULL), currentTypeIdentdef); /*incomplete type*/
                }
        }
-#line 2150 "y.tab.c"
+#line 2154 "y.tab.c"
     break;
 
   case 37:
@@ -2154,7 +2158,7 @@ yyreduce:
         {
                (yyval.node) = (yyvsp[0].node);
        }
-#line 2158 "y.tab.c"
+#line 2162 "y.tab.c"
     break;
 
   case 38:
@@ -2162,7 +2166,7 @@ yyreduce:
         {
                (yyval.node) = NULL;
        }
-#line 2166 "y.tab.c"
+#line 2170 "y.tab.c"
     break;
 
   case 40:
@@ -2170,7 +2174,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewLeaf(PROCEDURE);
        }
-#line 2174 "y.tab.c"
+#line 2178 "y.tab.c"
     break;
 
   case 41:
@@ -2206,7 +2210,7 @@ yyreduce:
                        exit(EXIT_FAILURE);
                }
        }
-#line 2210 "y.tab.c"
+#line 2214 "y.tab.c"
     break;
 
   case 43:
@@ -2254,7 +2258,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 2258 "y.tab.c"
+#line 2262 "y.tab.c"
     break;
 
   case 44:
@@ -2262,7 +2266,7 @@ yyreduce:
         {
                (yyval.integer) = '=';
        }
-#line 2266 "y.tab.c"
+#line 2270 "y.tab.c"
     break;
 
   case 45:
@@ -2270,7 +2274,7 @@ yyreduce:
         {
                (yyval.integer) = NOT_EQ;
        }
-#line 2274 "y.tab.c"
+#line 2278 "y.tab.c"
     break;
 
   case 46:
@@ -2278,7 +2282,7 @@ yyreduce:
         {
                (yyval.integer) = '<';
        }
-#line 2282 "y.tab.c"
+#line 2286 "y.tab.c"
     break;
 
   case 47:
@@ -2286,7 +2290,7 @@ yyreduce:
         {
                (yyval.integer) = LE;
        }
-#line 2290 "y.tab.c"
+#line 2294 "y.tab.c"
     break;
 
   case 48:
@@ -2294,7 +2298,7 @@ yyreduce:
         {
                (yyval.integer) = '>';
        }
-#line 2298 "y.tab.c"
+#line 2302 "y.tab.c"
     break;
 
   case 49:
@@ -2302,7 +2306,7 @@ yyreduce:
         {
                (yyval.integer) = GE;
        }
-#line 2306 "y.tab.c"
+#line 2310 "y.tab.c"
     break;
 
   case 50:
@@ -2310,7 +2314,7 @@ yyreduce:
         {
                (yyval.integer) = IS;
        }
-#line 2314 "y.tab.c"
+#line 2318 "y.tab.c"
     break;
 
   case 51:
@@ -2336,7 +2340,7 @@ yyreduce:
                        }
                }
        }
-#line 2340 "y.tab.c"
+#line 2344 "y.tab.c"
     break;
 
   case 52:
@@ -2366,7 +2370,7 @@ yyreduce:
                }
                assert((yyval.node) != NULL);
        }
-#line 2370 "y.tab.c"
+#line 2374 "y.tab.c"
     break;
 
   case 53:
@@ -2374,7 +2378,7 @@ yyreduce:
         {
                (yyval.integer) = '+';
        }
-#line 2378 "y.tab.c"
+#line 2382 "y.tab.c"
     break;
 
   case 54:
@@ -2382,7 +2386,7 @@ yyreduce:
         {
                (yyval.integer) = '-';
        }
-#line 2386 "y.tab.c"
+#line 2390 "y.tab.c"
     break;
 
   case 55:
@@ -2390,7 +2394,7 @@ yyreduce:
         {
                (yyval.integer) = -1;
        }
-#line 2394 "y.tab.c"
+#line 2398 "y.tab.c"
     break;
 
   case 56:
@@ -2398,7 +2402,7 @@ yyreduce:
         {
                (yyval.integer) = '+';
        }
-#line 2402 "y.tab.c"
+#line 2406 "y.tab.c"
     break;
 
   case 57:
@@ -2406,7 +2410,7 @@ yyreduce:
         {
                (yyval.integer) = '-';
        }
-#line 2410 "y.tab.c"
+#line 2414 "y.tab.c"
     break;
 
   case 58:
@@ -2414,7 +2418,7 @@ yyreduce:
         {
                (yyval.integer) = OR;
        }
-#line 2418 "y.tab.c"
+#line 2422 "y.tab.c"
     break;
 
   case 60:
@@ -2445,7 +2449,7 @@ yyreduce:
 
                assert((yyval.node) != NULL);
        }
-#line 2449 "y.tab.c"
+#line 2453 "y.tab.c"
     break;
 
   case 61:
@@ -2453,7 +2457,7 @@ yyreduce:
         {
                (yyval.integer) = '*';
        }
-#line 2457 "y.tab.c"
+#line 2461 "y.tab.c"
     break;
 
   case 62:
@@ -2461,7 +2465,7 @@ yyreduce:
         {
                (yyval.integer) = '/';
        }
-#line 2465 "y.tab.c"
+#line 2469 "y.tab.c"
     break;
 
   case 63:
@@ -2469,7 +2473,7 @@ yyreduce:
         {
                (yyval.integer) = DIV;
        }
-#line 2473 "y.tab.c"
+#line 2477 "y.tab.c"
     break;
 
   case 64:
@@ -2477,15 +2481,15 @@ yyreduce:
         {
                (yyval.integer) = MOD;
        }
-#line 2481 "y.tab.c"
+#line 2485 "y.tab.c"
     break;
 
   case 65:
 #line 901 "Oberon.y"
         {
-               (yyval.integer) = '&';
+               (yyval.integer) = AND;
        }
-#line 2489 "y.tab.c"
+#line 2493 "y.tab.c"
     break;
 
   case 67:
@@ -2493,7 +2497,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewString((yyvsp[0].string));
        }
-#line 2497 "y.tab.c"
+#line 2501 "y.tab.c"
     break;
 
   case 68:
@@ -2502,7 +2506,7 @@ yyreduce:
                (yyval.node) = Trees_NewLeaf(NIL);
                Trees_SetType(Trees_NewLeaf(TREES_NIL_TYPE), (yyval.node));
        }
-#line 2506 "y.tab.c"
+#line 2510 "y.tab.c"
     break;
 
   case 69:
@@ -2510,7 +2514,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewBoolean(1);
        }
-#line 2514 "y.tab.c"
+#line 2518 "y.tab.c"
     break;
 
   case 70:
@@ -2518,7 +2522,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewBoolean(0);
        }
-#line 2522 "y.tab.c"
+#line 2526 "y.tab.c"
     break;
 
   case 71:
@@ -2542,7 +2546,7 @@ yyreduce:
                }
                assert((yyval.node) != NULL);
        }
-#line 2546 "y.tab.c"
+#line 2550 "y.tab.c"
     break;
 
   case 72:
@@ -2551,7 +2555,7 @@ yyreduce:
                CheckIsValueExpression((yyvsp[-1].node));
                (yyval.node) = (yyvsp[-1].node);
        }
-#line 2555 "y.tab.c"
+#line 2559 "y.tab.c"
     break;
 
   case 73:
@@ -2559,20 +2563,20 @@ yyreduce:
         {
                (yyval.node) = NULL;
                CheckIsValueExpression((yyvsp[0].node));
-               if (Types_ExpressionCompatible('~', Trees_Type((yyvsp[0].node)), NULL)) {
+               if (Types_ExpressionCompatible(NOT, Trees_Type((yyvsp[0].node)), NULL)) {
                        if (IsBoolean((yyvsp[0].node))) {
                                (yyval.node) = Trees_NewBoolean(! Trees_Boolean((yyvsp[0].node)));
                        } else {
-                               (yyval.node) = Trees_NewNode('~', (yyvsp[0].node), NULL);
+                               (yyval.node) = Trees_NewNode(NOT, (yyvsp[0].node), NULL);
                                Trees_SetType(Trees_NewLeaf(TREES_BOOLEAN_TYPE), (yyval.node));
                        }
                } else {
-                       Oberon_PrintError("error: incompatible type in operation \"~\": %s", TypeString(Trees_Type((yyvsp[0].node))));
+                       Oberon_PrintError("error: incompatible type in operation \"not\": %s", TypeString(Trees_Type((yyvsp[0].node))));
                        YYABORT;
                }
                assert((yyval.node) != NULL);
        }
-#line 2576 "y.tab.c"
+#line 2580 "y.tab.c"
     break;
 
   case 74:
@@ -2593,7 +2597,7 @@ yyreduce:
                        (yyval.node) = designator;
                }
        }
-#line 2597 "y.tab.c"
+#line 2601 "y.tab.c"
     break;
 
   case 75:
@@ -2615,7 +2619,7 @@ yyreduce:
                        (yyval.node) = Trees_NewNode(Trees_Symbol((yyvsp[0].node)), Trees_Left((yyvsp[0].node)), (yyvsp[-1].node));
                }
        }
-#line 2619 "y.tab.c"
+#line 2623 "y.tab.c"
     break;
 
   case 76:
@@ -2623,7 +2627,7 @@ yyreduce:
         {
                (yyval.node) = NULL;
        }
-#line 2627 "y.tab.c"
+#line 2631 "y.tab.c"
     break;
 
   case 77:
@@ -2635,7 +2639,7 @@ yyreduce:
                Trees_SetKind(TREES_FIELD_KIND, field);
                (yyval.node) = Trees_NewNode('.', field, NULL);
        }
-#line 2639 "y.tab.c"
+#line 2643 "y.tab.c"
     break;
 
   case 78:
@@ -2657,7 +2661,7 @@ yyreduce:
                        curr = Trees_Right(curr);
                } while (curr != NULL);
        }
-#line 2661 "y.tab.c"
+#line 2665 "y.tab.c"
     break;
 
   case 79:
@@ -2665,7 +2669,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewNode('^', NULL, NULL);
        }
-#line 2669 "y.tab.c"
+#line 2673 "y.tab.c"
     break;
 
   case 80:
@@ -2674,7 +2678,7 @@ yyreduce:
                Trees_ReverseList(&(yyvsp[-1].node)); /*correct order*/
                (yyval.node) = Trees_NewNode('(', (yyvsp[-1].node), NULL);
        }
-#line 2678 "y.tab.c"
+#line 2682 "y.tab.c"
     break;
 
   case 81:
@@ -2682,7 +2686,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewNode('(', NULL, NULL);
        }
-#line 2686 "y.tab.c"
+#line 2690 "y.tab.c"
     break;
 
   case 82:
@@ -2691,7 +2695,7 @@ yyreduce:
                (yyval.node) = Trees_NewNode(TREES_EXP_LIST, (yyvsp[0].node), NULL);
                Trees_SetType(Trees_Type((yyvsp[0].node)), (yyval.node));
        }
-#line 2695 "y.tab.c"
+#line 2699 "y.tab.c"
     break;
 
   case 83:
@@ -2703,7 +2707,7 @@ yyreduce:
                (yyval.node) = reversedList;
                Trees_SetType(Trees_Type((yyvsp[0].node)), (yyval.node));
        }
-#line 2707 "y.tab.c"
+#line 2711 "y.tab.c"
     break;
 
   case 91:
@@ -2711,7 +2715,7 @@ yyreduce:
         {
                (yyval.node) = NULL;
        }
-#line 2715 "y.tab.c"
+#line 2719 "y.tab.c"
     break;
 
   case 92:
@@ -2754,7 +2758,7 @@ yyreduce:
                                assert(0);
                }
        }
-#line 2758 "y.tab.c"
+#line 2762 "y.tab.c"
     break;
 
   case 93:
@@ -2773,7 +2777,7 @@ yyreduce:
                HandleProcedureCall(designator, actualParameters, isFunctionCall, &(yyval.node));
                assert((yyval.node) != NULL);
        }
-#line 2777 "y.tab.c"
+#line 2781 "y.tab.c"
     break;
 
   case 94:
@@ -2782,7 +2786,7 @@ yyreduce:
                Trees_ReverseList(&(yyvsp[0].node)); /*correct order*/
                (yyval.node) = (yyvsp[0].node);
        }
-#line 2786 "y.tab.c"
+#line 2790 "y.tab.c"
     break;
 
   case 95:
@@ -2794,7 +2798,7 @@ yyreduce:
                        (yyval.node) = Trees_NewNode(TREES_STATEMENT_SEQUENCE, (yyvsp[0].node), NULL);
                }
        }
-#line 2798 "y.tab.c"
+#line 2802 "y.tab.c"
     break;
 
   case 96:
@@ -2806,7 +2810,7 @@ yyreduce:
                        (yyval.node) = (yyvsp[-2].node);
                }
        }
-#line 2810 "y.tab.c"
+#line 2814 "y.tab.c"
     break;
 
   case 97:
@@ -2830,7 +2834,7 @@ yyreduce:
                        (yyval.node) = Trees_NewNode(IF, (yyvsp[-5].node), Trees_NewNode(THEN, (yyvsp[-3].node), (yyval.node)));
                }
        }
-#line 2834 "y.tab.c"
+#line 2838 "y.tab.c"
     break;
 
   case 98:
@@ -2844,7 +2848,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 2848 "y.tab.c"
+#line 2852 "y.tab.c"
     break;
 
   case 99:
@@ -2852,7 +2856,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewNode(ELSIF, (yyvsp[-2].node), Trees_NewNode(THEN, (yyvsp[0].node), (yyvsp[-4].node)));
        }
-#line 2856 "y.tab.c"
+#line 2860 "y.tab.c"
     break;
 
   case 100:
@@ -2860,7 +2864,7 @@ yyreduce:
         {
                (yyval.node) = NULL;
        }
-#line 2864 "y.tab.c"
+#line 2868 "y.tab.c"
     break;
 
   case 101:
@@ -2868,7 +2872,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewNode(ELSE, (yyvsp[0].node), NULL);
        }
-#line 2872 "y.tab.c"
+#line 2876 "y.tab.c"
     break;
 
   case 102:
@@ -2876,7 +2880,7 @@ yyreduce:
         {
                (yyval.node) = NULL;
        }
-#line 2880 "y.tab.c"
+#line 2884 "y.tab.c"
     break;
 
   case 103:
@@ -2898,7 +2902,7 @@ yyreduce:
                }
                (yyval.node) = Trees_NewNode(CASE, (yyvsp[-3].node), (yyvsp[-1].node));
        }
-#line 2902 "y.tab.c"
+#line 2906 "y.tab.c"
     break;
 
   case 104:
@@ -2937,7 +2941,7 @@ yyreduce:
                                YYABORT;
                }
        }
-#line 2941 "y.tab.c"
+#line 2945 "y.tab.c"
     break;
 
   case 105:
@@ -2949,7 +2953,7 @@ yyreduce:
                        (yyval.node) = NULL;
                }
        }
-#line 2953 "y.tab.c"
+#line 2957 "y.tab.c"
     break;
 
   case 106:
@@ -2965,7 +2969,7 @@ yyreduce:
                        (yyval.node) = NULL;
                }
        }
-#line 2969 "y.tab.c"
+#line 2973 "y.tab.c"
     break;
 
   case 107:
@@ -2974,7 +2978,7 @@ yyreduce:
                Trees_ReverseList(&(yyvsp[-2].node)); /*correct order*/
                (yyval.node) = Trees_NewNode(TREES_CASE, (yyvsp[-2].node), (yyvsp[0].node));
        }
-#line 2978 "y.tab.c"
+#line 2982 "y.tab.c"
     break;
 
   case 108:
@@ -2982,7 +2986,7 @@ yyreduce:
         {
                (yyval.node) = NULL;
        }
-#line 2986 "y.tab.c"
+#line 2990 "y.tab.c"
     break;
 
   case 109:
@@ -2990,7 +2994,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewNode(TREES_CASE_LABEL_LIST, (yyvsp[0].node), NULL);
        }
-#line 2994 "y.tab.c"
+#line 2998 "y.tab.c"
     break;
 
   case 110:
@@ -3007,7 +3011,7 @@ yyreduce:
                                YYABORT;
                }
        }
-#line 3011 "y.tab.c"
+#line 3015 "y.tab.c"
     break;
 
   case 111:
@@ -3020,7 +3024,7 @@ yyreduce:
                        Trees_NewNode(TREES_NOSYM, (yyvsp[0].node), Trees_Left(caseLabelsStack)),
                        Trees_Right(caseLabelsStack));
        }
-#line 3024 "y.tab.c"
+#line 3028 "y.tab.c"
     break;
 
   case 112:
@@ -3068,7 +3072,7 @@ yyreduce:
                        Trees_NewNode(TREES_NOSYM, (yyval.node), Trees_Left(caseLabelsStack)),
                        Trees_Right(caseLabelsStack));
        }
-#line 3072 "y.tab.c"
+#line 3076 "y.tab.c"
     break;
 
   case 113:
@@ -3081,7 +3085,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 3085 "y.tab.c"
+#line 3089 "y.tab.c"
     break;
 
   case 114:
@@ -3099,7 +3103,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 3103 "y.tab.c"
+#line 3107 "y.tab.c"
     break;
 
   case 115:
@@ -3185,7 +3189,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 3189 "y.tab.c"
+#line 3193 "y.tab.c"
     break;
 
   case 116:
@@ -3193,7 +3197,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewNode(WHILE, (yyvsp[-4].node), Trees_NewNode(DO, (yyvsp[-2].node), (yyvsp[-1].node)));
        }
-#line 3197 "y.tab.c"
+#line 3201 "y.tab.c"
     break;
 
   case 117:
@@ -3201,7 +3205,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewNode(ELSIF, (yyvsp[-2].node), Trees_NewNode(THEN, (yyvsp[0].node), (yyvsp[-4].node)));
        }
-#line 3205 "y.tab.c"
+#line 3209 "y.tab.c"
     break;
 
   case 118:
@@ -3209,7 +3213,7 @@ yyreduce:
         {
                (yyval.node) = NULL;
        }
-#line 3213 "y.tab.c"
+#line 3217 "y.tab.c"
     break;
 
   case 119:
@@ -3224,7 +3228,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 3228 "y.tab.c"
+#line 3232 "y.tab.c"
     break;
 
   case 120:
@@ -3243,7 +3247,7 @@ yyreduce:
                                (yyvsp[-4].node),
                                Trees_NewNode(BY, byExp, (yyvsp[-1].node))));
        }
-#line 3247 "y.tab.c"
+#line 3251 "y.tab.c"
     break;
 
   case 121:
@@ -3271,7 +3275,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 3275 "y.tab.c"
+#line 3279 "y.tab.c"
     break;
 
   case 122:
@@ -3283,7 +3287,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 3287 "y.tab.c"
+#line 3291 "y.tab.c"
     break;
 
   case 123:
@@ -3304,7 +3308,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 3308 "y.tab.c"
+#line 3312 "y.tab.c"
     break;
 
   case 124:
@@ -3312,7 +3316,7 @@ yyreduce:
         {
                (yyval.node) = NULL;
        }
-#line 3316 "y.tab.c"
+#line 3320 "y.tab.c"
     break;
 
   case 125:
@@ -3363,7 +3367,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 3367 "y.tab.c"
+#line 3371 "y.tab.c"
     break;
 
   case 126:
@@ -3385,7 +3389,7 @@ yyreduce:
                Generate_ProcedureHeading((yyvsp[-1].node));
                (yyval.node) = (yyvsp[-1].node);
        }
-#line 3389 "y.tab.c"
+#line 3393 "y.tab.c"
     break;
 
   case 127:
@@ -3401,7 +3405,7 @@ yyreduce:
                }
                (yyval.node) = (yyvsp[0].node);
        }
-#line 3405 "y.tab.c"
+#line 3409 "y.tab.c"
     break;
 
   case 128:
@@ -3409,7 +3413,7 @@ yyreduce:
         {
                (yyval.node) = (yyvsp[0].node);
        }
-#line 3413 "y.tab.c"
+#line 3417 "y.tab.c"
     break;
 
   case 129:
@@ -3417,7 +3421,7 @@ yyreduce:
         {
                (yyval.node) = NULL;
        }
-#line 3421 "y.tab.c"
+#line 3425 "y.tab.c"
     break;
 
   case 130:
@@ -3425,7 +3429,7 @@ yyreduce:
         {
                (yyval.node) = (yyvsp[0].node);
        }
-#line 3429 "y.tab.c"
+#line 3433 "y.tab.c"
     break;
 
   case 131:
@@ -3433,7 +3437,7 @@ yyreduce:
         {
                (yyval.node) = NULL;
        }
-#line 3437 "y.tab.c"
+#line 3441 "y.tab.c"
     break;
 
   case 137:
@@ -3448,7 +3452,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 3452 "y.tab.c"
+#line 3456 "y.tab.c"
     break;
 
   case 138:
@@ -3456,7 +3460,7 @@ yyreduce:
         {
                (yyval.node) = NULL;
        }
-#line 3460 "y.tab.c"
+#line 3464 "y.tab.c"
     break;
 
   case 139:
@@ -3464,7 +3468,7 @@ yyreduce:
         {
                unresolvedPointerTypes = NULL;
        }
-#line 3468 "y.tab.c"
+#line 3472 "y.tab.c"
     break;
 
   case 148:
@@ -3472,7 +3476,7 @@ yyreduce:
         {
                (yyval.node) = Types_NewProcedure((yyvsp[-2].node), (yyvsp[0].node));
        }
-#line 3476 "y.tab.c"
+#line 3480 "y.tab.c"
     break;
 
   case 149:
@@ -3481,7 +3485,7 @@ yyreduce:
                Trees_ReverseList(&(yyvsp[0].node)); /*correct order*/
                (yyval.node) = (yyvsp[0].node);
        }
-#line 3485 "y.tab.c"
+#line 3489 "y.tab.c"
     break;
 
   case 150:
@@ -3489,7 +3493,7 @@ yyreduce:
         {
                (yyval.node) = NULL;
        }
-#line 3493 "y.tab.c"
+#line 3497 "y.tab.c"
     break;
 
   case 151:
@@ -3498,7 +3502,7 @@ yyreduce:
                (yyval.node) = (yyvsp[0].node);
                Trees_ReverseList(&(yyval.node));
        }
-#line 3502 "y.tab.c"
+#line 3506 "y.tab.c"
     break;
 
   case 152:
@@ -3532,7 +3536,7 @@ yyreduce:
                } while (p != NULL);
                /*$$ in reversed order*/
        }
-#line 3536 "y.tab.c"
+#line 3540 "y.tab.c"
     break;
 
   case 153:
@@ -3555,7 +3559,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 3559 "y.tab.c"
+#line 3563 "y.tab.c"
     break;
 
   case 154:
@@ -3563,7 +3567,7 @@ yyreduce:
         {
                (yyval.node) = NULL;
        }
-#line 3567 "y.tab.c"
+#line 3571 "y.tab.c"
     break;
 
   case 155:
@@ -3583,7 +3587,7 @@ yyreduce:
 
                (yyval.node) = (yyvsp[-2].node);
        }
-#line 3587 "y.tab.c"
+#line 3591 "y.tab.c"
     break;
 
   case 156:
@@ -3591,7 +3595,7 @@ yyreduce:
         {
                (yyval.integer) = TREES_VAR_PARAM_KIND;
        }
-#line 3595 "y.tab.c"
+#line 3599 "y.tab.c"
     break;
 
   case 157:
@@ -3599,7 +3603,7 @@ yyreduce:
         {
                (yyval.integer) = TREES_VALUE_PARAM_KIND;
        }
-#line 3603 "y.tab.c"
+#line 3607 "y.tab.c"
     break;
 
   case 158:
@@ -3607,7 +3611,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewNode(TREES_IDENT_LIST, Trees_NewIdent((yyvsp[0].ident)), NULL);
        }
-#line 3611 "y.tab.c"
+#line 3615 "y.tab.c"
     break;
 
   case 159:
@@ -3629,7 +3633,7 @@ yyreduce:
 
                (yyval.node) = Trees_NewNode(TREES_IDENT_LIST, Trees_NewIdent((yyvsp[0].ident)), (yyvsp[-2].node));
        }
-#line 3633 "y.tab.c"
+#line 3637 "y.tab.c"
     break;
 
   case 160:
@@ -3646,7 +3650,7 @@ yyreduce:
                        exit(EXIT_FAILURE);
                }
        }
-#line 3650 "y.tab.c"
+#line 3654 "y.tab.c"
     break;
 
   case 161:
@@ -3654,7 +3658,7 @@ yyreduce:
         {
                (yyval.node) = Trees_NewNode(ARRAY, NULL, (yyvsp[-2].node));
        }
-#line 3658 "y.tab.c"
+#line 3662 "y.tab.c"
     break;
 
   case 162:
@@ -3662,7 +3666,7 @@ yyreduce:
         {
                (yyval.node) = NULL;
        }
-#line 3666 "y.tab.c"
+#line 3670 "y.tab.c"
     break;
 
   case 163:
@@ -3689,7 +3693,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 3693 "y.tab.c"
+#line 3697 "y.tab.c"
     break;
 
   case 164:
@@ -3704,7 +3708,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 3708 "y.tab.c"
+#line 3712 "y.tab.c"
     break;
 
   case 165:
@@ -3714,7 +3718,7 @@ yyreduce:
                        YYACCEPT;
                }
        }
-#line 3718 "y.tab.c"
+#line 3722 "y.tab.c"
     break;
 
   case 166:
@@ -3724,7 +3728,7 @@ yyreduce:
                        YYACCEPT;
                }
        }
-#line 3728 "y.tab.c"
+#line 3732 "y.tab.c"
     break;
 
   case 167:
@@ -3761,7 +3765,7 @@ yyreduce:
                        }
                }
        }
-#line 3765 "y.tab.c"
+#line 3769 "y.tab.c"
     break;
 
   case 168:
@@ -3773,7 +3777,7 @@ yyreduce:
                        (yyval.node) = NULL;
                }
        }
-#line 3777 "y.tab.c"
+#line 3781 "y.tab.c"
     break;
 
   case 169:
@@ -3785,7 +3789,7 @@ yyreduce:
                        (yyval.node) = (yyvsp[-2].node);
                }
        }
-#line 3789 "y.tab.c"
+#line 3793 "y.tab.c"
     break;
 
   case 170:
@@ -3861,7 +3865,7 @@ yyreduce:
                        YYABORT;
                }
        }
-#line 3865 "y.tab.c"
+#line 3869 "y.tab.c"
     break;
 
   case 171:
@@ -3869,7 +3873,7 @@ yyreduce:
         {
                (yyval.ident) = (yyvsp[0].ident);
        }
-#line 3873 "y.tab.c"
+#line 3877 "y.tab.c"
     break;
 
   case 172:
@@ -3877,7 +3881,7 @@ yyreduce:
         {
                (yyval.ident) = NULL;
        }
-#line 3881 "y.tab.c"
+#line 3885 "y.tab.c"
     break;
 
   case 173:
@@ -3885,11 +3889,11 @@ yyreduce:
         {
                Generate_ModuleStatements((yyvsp[0].node));
        }
-#line 3889 "y.tab.c"
+#line 3893 "y.tab.c"
     break;
 
 
-#line 3893 "y.tab.c"
+#line 3897 "y.tab.c"
 
       default: break;
     }
@@ -5037,7 +5041,7 @@ static Trees_Node TermConstValue(int operator, Trees_Node expA, Trees_Node expB)
                                }
                        }
                        break;
-               case '&':
+               case AND:
                        if (IsBoolean(expA) && IsBoolean(expB)) {
                                if (Trees_Symbol(expA) == TRUE) {
                                        result = expB;
@@ -5094,11 +5098,11 @@ static const char *OperatorString(int operator)
                case OR:
                        result = "OR";
                        break;
-               case '&':
-                       result = "&";
+               case AND:
+                       result = "AND";
                        break;
-               case '~':
-                       result = "~";
+               case NOT:
+                       result = "not";
                        break;
                case '=':
                        result = "=";
index 99c9937eebf799371e5cc04f2b35413a0a8f3309..25f59a6e144ebf52e5e670ff7d8d486ebb1831de 100644 (file)
@@ -50,94 +50,98 @@ extern int yydebug;
   enum yytokentype
   {
     TOKEN_START = 258,
-    ARRAY = 259,
-    BEGIN_ = 260,
-    BY = 261,
-    CASE = 262,
-    CONST = 263,
-    DIV = 264,
-    DO = 265,
-    ELSE = 266,
-    ELSIF = 267,
-    END = 268,
-    FALSE = 269,
-    FOR = 270,
-    IF = 271,
-    IMPORT = 272,
-    IS = 273,
-    MOD = 274,
-    MODULE = 275,
-    NIL = 276,
-    OF = 277,
-    OR = 278,
-    POINTER = 279,
-    PROCEDURE = 280,
-    RECORD = 281,
-    REPEAT = 282,
-    RETURN = 283,
-    THEN = 284,
-    TO = 285,
-    TRUE = 286,
-    TYPE = 287,
-    UNTIL = 288,
-    VAR = 289,
-    WHILE = 290,
-    BECOMES = 291,
-    DOTDOT = 292,
-    GE = 293,
-    LE = 294,
-    NOT_EQ = 295,
-    IDENT = 296,
-    INTEGER = 297,
-    REAL = 298,
-    STRING = 299,
-    TOKEN_END = 300
+    AND = 259,
+    ARRAY = 260,
+    BEGIN_ = 261,
+    BY = 262,
+    CASE = 263,
+    CONST = 264,
+    DIV = 265,
+    DO = 266,
+    ELSE = 267,
+    ELSIF = 268,
+    END = 269,
+    FALSE = 270,
+    FOR = 271,
+    IF = 272,
+    IMPORT = 273,
+    IS = 274,
+    MOD = 275,
+    MODULE = 276,
+    NIL = 277,
+    NOT = 278,
+    OF = 279,
+    OR = 280,
+    POINTER = 281,
+    PROCEDURE = 282,
+    RECORD = 283,
+    REPEAT = 284,
+    RETURN = 285,
+    THEN = 286,
+    TO = 287,
+    TRUE = 288,
+    TYPE = 289,
+    UNTIL = 290,
+    VAR = 291,
+    WHILE = 292,
+    BECOMES = 293,
+    DOTDOT = 294,
+    GE = 295,
+    LE = 296,
+    NOT_EQ = 297,
+    IDENT = 298,
+    INTEGER = 299,
+    REAL = 300,
+    STRING = 301,
+    TOKEN_END = 302
   };
 #endif
 /* Tokens.  */
 #define TOKEN_START 258
-#define ARRAY 259
-#define BEGIN_ 260
-#define BY 261
-#define CASE 262
-#define CONST 263
-#define DIV 264
-#define DO 265
-#define ELSE 266
-#define ELSIF 267
-#define END 268
-#define FALSE 269
-#define FOR 270
-#define IF 271
-#define IMPORT 272
-#define IS 273
-#define MOD 274
-#define MODULE 275
-#define NIL 276
-#define OF 277
-#define OR 278
-#define POINTER 279
-#define PROCEDURE 280
-#define RECORD 281
-#define REPEAT 282
-#define RETURN 283
-#define THEN 284
-#define TO 285
-#define TRUE 286
-#define TYPE 287
-#define UNTIL 288
-#define VAR 289
-#define WHILE 290
-#define BECOMES 291
-#define DOTDOT 292
-#define GE 293
-#define LE 294
-#define NOT_EQ 295
-#define IDENT 296
-#define INTEGER 297
-#define REAL 298
-#define STRING 299
-#define TOKEN_END 300
+#define AND 259
+#define ARRAY 260
+#define BEGIN_ 261
+#define BY 262
+#define CASE 263
+#define CONST 264
+#define DIV 265
+#define DO 266
+#define ELSE 267
+#define ELSIF 268
+#define END 269
+#define FALSE 270
+#define FOR 271
+#define IF 272
+#define IMPORT 273
+#define IS 274
+#define MOD 275
+#define MODULE 276
+#define NIL 277
+#define NOT 278
+#define OF 279
+#define OR 280
+#define POINTER 281
+#define PROCEDURE 282
+#define RECORD 283
+#define REPEAT 284
+#define RETURN 285
+#define THEN 286
+#define TO 287
+#define TRUE 288
+#define TYPE 289
+#define UNTIL 290
+#define VAR 291
+#define WHILE 292
+#define BECOMES 293
+#define DOTDOT 294
+#define GE 295
+#define LE 296
+#define NOT_EQ 297
+#define IDENT 298
+#define INTEGER 299
+#define REAL 300
+#define STRING 301
+#define TOKEN_END 302
 
 /* Value type.  */
 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
@@ -151,7 +155,7 @@ union YYSTYPE
        const char *string;
        Trees_Node node;
 
-#line 155 "y.tab.h"
+#line 159 "y.tab.h"
 
 };
 typedef union YYSTYPE YYSTYPE;
index d7f7d1b4835277e723888e7597de4ca1803f3d20..795393b5b2b9c7e1e6ebdfeada775cbc0a1556d5 100644 (file)
@@ -185,10 +185,10 @@ module T4Expressions;
                Assert("qux" >= str);
                strs[0] := "";
                strs[1] := "bar";
-               Assert(~(str = strs[1]));
+               Assert(not (str = strs[1]));
                Assert(str != strs[1]);
-               Assert(~(str < strs[1]));
-               Assert(~(str <= strs[1]));
+               Assert(not (str < strs[1]));
+               Assert(not (str <= strs[1]));
                Assert(str > strs[1]);
                Assert(str >= strs[1]);
                str[0] := 7FX; str[1] := 0X;
@@ -201,7 +201,7 @@ module T4Expressions;
                Assert(t = t1);
                Assert(t1 = t);
                t := nil;
-               Assert((t is T) or ~(t is T)) (*The value of nil is T is undefined.*)
+               Assert((t is T) or not (t is T)) (*The value of nil is T is undefined.*)
        end TestRelationalOperations;
 
 
@@ -271,9 +271,9 @@ module T4Expressions;
                        y: Byte;
        begin
                (*booleans*)
-               Assert(true & true);
+               Assert(true and true);
                b := true;
-               Assert(b & true);
+               Assert(b and true);
 
                (*integers*)
                Assert(9 * 2 = 18);
index 9a3875fd60ab5f49ee663b7ef020d7d276670519..555190d66805d6924f07b5aa7318b901925c2a7e 100644 (file)
@@ -19,8 +19,8 @@ firstLetter
 -
 *
 /
-~
-&
+not
+and
 .
 ,
 ;