You are viewing a single comment's thread. Return to all comments →
I'm finding myself a little confused by the grammar. According to it, "-+-3" is a valid expression; what should that mean?
For now, I'm going to assume the grammar allows at most one unary operator for each factor:
Term ::= Factor0 [*/] Term | Factor0 Factor0 ::= [+-] Factor | Factor Factor ::= Number | '(' Expression ')'
(Naming is not my strong point)
Seems like cookies are disabled on this browser, please enable them to open this website
Expressions V2
You are viewing a single comment's thread. Return to all comments →
I'm finding myself a little confused by the grammar. According to it, "-+-3" is a valid expression; what should that mean?
For now, I'm going to assume the grammar allows at most one unary operator for each factor:
(Naming is not my strong point)