parser: funktionsaufruf mit leerer parameterliste
authorBernhard Urban <lewurm@gmail.com>
Sat, 20 Mar 2010 18:28:59 +0000 (19:28 +0100)
committerBernhard Urban <lewurm@gmail.com>
Sat, 20 Mar 2010 18:28:59 +0000 (19:28 +0100)
parser/parser.y
test/parser/a.0

index c76131f8e7b202c11cae7dd6c87513d4ca2cb6fc..c6415a7ecd97ae97d86bd9fe76e3bdf8cd9640be 100644 (file)
@@ -89,8 +89,11 @@ Methcall:
        | Term '.' IDENT '(' Exprs ')'
        ;
 
+/* beachte dass hier auch "nichts" vorkommen kann
+ * sonst waer ein aufruf der art 'f()' nicht
+ * moeglich (leere parameterliste) */
 Exprs:
-         Expr
+       | Expr
        | Exprs ',' Expr
        ;
 
index c8626b76cb0a18fbbf9de1960d4c5bd34194c742..2d5724a5aa46a3ab58eb030aa11b947b5d1ee43e 100644 (file)
@@ -1,25 +1,29 @@
 struct mystruct end;
 method f ()
        var muh := 0x10;
-       muh := muh * -2;
+       muh := muh * (9 - 0x4);
        /* test comment */
        /* groeserer comemnt
 
        */
-       if (muh < -0x5) then
+       if (muh = -0x5) then
                muh := muh * -2;
        else
                muh := 0x55;
+               f();
        end;
 
        while (muh < 10) do
-               muh := muh * -2;
+               muh := muh *(-2);
        end;
 
        /* warum geht das nciht? */
        while (muh < 10) do
-               muh := muh - 2;
+               muh := muh--2;
        end;
 
+       mystruct.hu := muh;
+       mystruct.check_i_ned := muh;
+
        return muh;
 end;