[antlr-interest] Check brackets

Martina fossanu at yahoo.de
Tue May 15 02:20:50 PDT 2007


Hi ANTLR people,

I´ve wrote a lexer and a parser (ANTLRv3, output Java) for a small grammar. Everything works fine and the parser shows me all the syntactic errors. I also wrote some own methods in the @members section to check semantic errors. Now I want to check if a closing and a opening bracket exist around a special token.
Here is an example:

rulename = ( alternative1 | alternative2 );

How can I go backward and forward from the alternative ( '|' ) to check the brackets? 


Best regards,
fossanu
       
---------------------------------
Kennt man wirklich jeden über 3 Ecken? Die Antworten gibt's bei Yahoo! Clever.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070515/0b1387d9/attachment.html 


More information about the antlr-interest mailing list