[antlr-interest] Getting line and column numbers from a CommonTreeNodeStream
Jim Idle
jimi at temporal-wave.com
Tue Jun 9 10:57:32 PDT 2009
Damien Cassou wrote:
> Hi,
>
> my compiler is made of two grammars: one combined grammar parses the
> language and constructs a tree while the second pass verifies the
> tree. I would like to print error messages when there are semantic
> errors in the second pass. For example, referencing a variable that is
> not defined should result in:
>
Get the start token from a node, Get the stop token from the node. The
span is the first character of the start token to the last character of
the stop token.
Jim
More information about the antlr-interest
mailing list