LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Parsing of a simple expression. (https://www.linuxquestions.org/questions/programming-9/parsing-of-a-simple-expression-344405/)

KissDaFeetOfSean 07-18-2005 04:36 PM

Parsing of a simple expression.
 
Hi,

Ignoring the fact that the ++ operator is left associative and has higher precedence then the addition operator +, why is

a+++b;

evaluated as

(a++)+ b;

instead of as

a+(++b);

and what is a two token lookahead parser?

exvor 07-18-2005 04:45 PM

why not just use the () to make it clear what your trying to do rather then confusing anyone who's looking at your code.


but for your question im not sure why that occurs. :)


All times are GMT -5. The time now is 04:48 PM.