[antlr-interest] Comments

Marcel Cerveny mcerveny at gmail.com
Mon Feb 21 01:32:40 PST 2005


Hello there!

I'm a complete newbie to antlr. I need to parse files with reasonably
simple structure. So far so good.
However, some issues popped up.

1. When creating an abstract syntax tree (I'm a lamer and all I know
is what I read in a few examples/papers on Internet) it seems to me
that AST can have only the form of a binary tree. Is that right?

2. If AST can be also non-binary tree, Is there any possibility to say
to AST that I do not care about the order of say leaves (i.e. function
parameters etc.) For example having function definition "void foo (int
a, int b, int c);" where the order does not matter?

3. Is there a nice antlr template for parsing and consequentially
skipping single- and multi-line comment? If yes or if someone
experienced can give me hints, I'd really appreciate it.

Thank you in advance for your answers.

Marcel Cerveny


More information about the antlr-interest mailing list