[antlr-interest] parsing include files, filename info in treewalker
Klaas Hofstra
antlr at klaashofstra.com
Tue Sep 13 02:10:15 PDT 2005
Hi,
I've had a look at the includeFile example in order to give me an idea about
handling input files that have an #include like functionality.
If I understand correctly, filename + line + column will be available at the
parsing and lexing stage so error messages can give the location of the
problem in the input.
In the treewalker however, the nodes only have line + column info so when I
come across an error in the walker stage and want to print an error message,
I can't give the file in which the error occurred.
Does anyone know how to solve this elegantly?
Cheers,
Klaas
More information about the antlr-interest
mailing list