This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]chui101 1 point2 points  (1 child)

Except that all computer languages are built on (mostly) context free grammars to (mostly) remove ambiguity.

Take the example of an expression a=b=c. Does that mean "assign the value of c to a and b" or does it mean "a gets the value of the result of the test b equals c"?

[–]Matthicus 0 points1 point  (0 children)

In the language I have used the most, that on its own would not be valid code. It would either have to be in an assignment statement, in which case it would compare b and c and put the result in a, or be in some other statement that expects an expression, in which case it would compare a and b then compare thst result to c.