Hello, I am trying to program a "complex" math program and to process the user input I have been working in a grammar in antlr.
At this point it works almost as I want it to work but I am missing something: I do not want to process newlines always. Let me explain it better: when an expression is finished ( 4+5 ) you can find a semi-colon or a newline, in any case you just finished this expression. But what happens if the expression is incomplete: ( 4+5+ ) then if you find a semi-colon you have an error (you should not be able to parse this input) but if you find a newline you should look the next line to follow processing. What I want is a rule like: Newline is HIDDEN if some other token is need to finish the actual rule. I do not know if it is even possible to do this with antlr or I shall go to modify the output code. Thanks, Francesc Massanés 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.
