[antlr-interest] help: Few questions about undocumented constructs

Marko Kukovec marko.kukovec at gmail.com
Sun Oct 1 02:43:48 PDT 2006


Hello!

I'm quite new to ANTLR. I have been using it from time to time, but do not
have the feeling for its full potential. I'm still using ANTLR 2.7.5. Here
are some constructs that I come across regularly, but I don't know exactly
what they mean:

- LA(n); I have seen its usage in both parsers and lexers. Is LA like "look
ahead" for some token type (in parser) and character (in lexer) and is used
in semantic predicates?

- LT(n); What about LT? What's its usage?

- AST construction; I have seen people using constructs like

assignment_list: assignment (COMMA! assignment)*
//add in new root
{
##=#(#[SELECT_LIST,"SELECT_LIST"],##);
}
;

What does "##" do? There is no mention of it in the documentation.


Thank you for all the help.

Regards,
Marko Kukovec



More information about the antlr-interest mailing list