[antlr-interest] line numbers in errors

Edward Povazan epovazan at telus.net
Tue Nov 25 15:27:31 PST 2003


Hello,

Ok, I know that I need a custom AST node if I want to report errors with
line numbers/source file in my tree parser.
The fact that this isn't supported automatically makes me wonder if I am
doing things in the wrong place.
I have my parser parsing my language nicely now.
I want my type checking and other semantic checks in the tree parser.
And then another tree parser generates my code.
I haven't dealt with parsers for a decade - where do you guys put most of
your error checking? Or do you create a custom AST for decent error
messages. If I use the tree parser I will need 2 passes before code
generation. I just don't see it as easy with the parser.

Thanks
-Ed


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list