> Several expression parsers are limited to handling the binary operator > portion of the expression. In addition to the obvious limitations, it > poses an additional problem for languages like C++ where the assignment > operators are split (in precedence) from the rest of the binary > operators by the ternary operator (?:). My most complicated production > ANTLR grammar (parses the UnrealScript language) currently uses a > completely new expression parser that offers a great deal more > flexibility than the previous approaches I tried. I don't think it's the > end-all solution for integrating expression parsing into ANTLR for v4, > but I believe it's a worthwhile example to show what's possible. Here > are some pros and cons of the implementation: > ... > > I'm very interested in any feedback y'all may have on this. >
As a layman in expression parsing I don't feel qualified to comment on if your solution lacks certain features, but the way you define the operators looks clean to me. One knows immediately how operators work in a given language. The only not obvious thing is if the precedence is ascending or descending. I guess ascending from my knowledge of C#. BTW, which tokens are encoded as CATEQ and CAT2EQ? Johannes -- Preisknaller: GMX DSL Flatrate für nur 16,99 Euro/mtl.! http://portal.gmx.net/de/go/dsl02 List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
-- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
