Hi!
I'm trying to implement ruby like grammar:
def func
if x < 1<NL>
print ""
end
end
In if statement there has to be new line <NL>, otherwise I get
problems with expression rules, also ruby requires new line there.
However I want to ignore new lines in all other cases. I did something
like this with flex and bison, and solution was to make a global flag
and it would be set in bison grammar file after expression to true and
lexer would return token otherwise it would skip it. Shall I use
similar approach with antlr or is there better solution? I'm trying to
avoid any code in the grammar because I develop it with antlrworks
which works only with java code but I need to generate C code.
Thanks.
br,
Sergiy
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.