[antlr-interest] tree parsing error messages
Joshua Davis
joshua.davis at kiodex.com
Tue Jan 4 12:43:02 PST 2005
I noticed that synthetic tokens don't produce nice line numbers, if it's
a simple change that sounds like a good idea.
joshua at hibernate.org
> -----Original Message-----
> From: Terence Parr [mailto:parrt at cs.usfca.edu]
> Sent: Tuesday, January 04, 2005 3:20 PM
> To: ANTLR Interest
> Subject: [antlr-interest] tree parsing error messages
>
> Howdy folks,
>
> It is common practice to create nodes in trees using
> imaginary tokens such as DECL or whatever. The problem is
> that, because they are not associated with an actual input
> token with a line number, they have no line number. Upon
> tree parse error you get "unexpected not DECL at 0:0". Not
> very helpful.
>
> For 2.7.5, how about if I change getLine() so that by default
> it looks at the first child and asks for it's line
> information? In one easy change, error messages should improve :)
>
> Ter
> --
> CS Professor & Grad Director, University of San Francisco
> Creator, ANTLR Parser Generator, http://www.antlr.org
> Cofounder, http://www.jguru.com Cofounder,
> http://www.knowspam.net enjoy email again!
>
>
>
>
> Disclaimer: This e-mail may contain confidential and
> privileged material for the sole use of the intended
> recipient(s). If you are not the intended recipient (or
> authorized to receive this e-mail for the recipient), please
> note that review, use, distribution or disclosure of any part
> of this e-mail is strictly prohibited, except that you should
> please contact the sender or notify Kiodex, Inc. at
> notices at kiodex.com that you have received this message in
> error, and delete all copies of the message. This e-mail and
> any attachments hereto are the property of Kiodex, Inc.
> and/or its relevant affiliate, and are not intended to be an
> offer or an acceptance, and do not create or evidence a
> binding and enforceable contract between Kiodex, Inc. or any
> of its affiliates and the intended recipient or any other
> party, and may not be relied on by anyone as the basis of a
> contract by estoppel or otherwise.
>
More information about the antlr-interest
mailing list