swp-uebersetzerbau-ss13 / common

Shared files between teams.
1 stars 0 forks source link

Test Programs #25

Closed Tkrauss closed 11 years ago

Tkrauss commented 11 years ago

The issue about the assignment.prog:

 \# returns 10
 \# prints nothing
 long a;
 long b;
 long c;

 a = 4; 
 b = 3; 
 c = 2;

 a = b = 4; 
 c = a + b + c;

return c;

The statement "a=b=4" is not a valid statement according to the given grammar, but "a=(b=4); " is. Is this behavior wanted or it is just a typo? what do you mean?

slomo commented 11 years ago

If it is not allowed, it is a typo. I will check this a soon as possible and update the example if needed.

Tkrauss commented 11 years ago

Sorry for the trouble, false alarm;). The parser implementation seems to be much smart as i am... . The productions "assign -> loc = assign -> loc = loc = assign -> loc = loc = bool ..." work and all of them are valid.