[antlr-interest] Get the line number in my deprecated messages

pwolleba pwolleba at hotmail.com
Sun May 30 03:51:35 PDT 2004


I am writing an ANTLR parser for a language developed by my firm. As 
in any languages this is also changing over time and some old syntax 
will have to be ruled out. I though a solution to this problem would 
be to print a deprecated message each time the "old" syntax is found, 
and by doing this give the users some time to remove them.
Since the files with the language syntax can easily be on several 
thousand lines, I would like to print the line number at the same 
time. I have however not succeeded to find any description to 
retrieve the line number from the parser; I guess it must be there 
somewhere since the exceptions that are thrown contain this 
information.

Any help will be appreciated!

Best regards,
Per




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

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



More information about the antlr-interest mailing list