[antlr-interest] Antlr 2.7.3 problem with LT(1)->getLine()?

Wigg, J D wiggjd at lsbu.ac.uk
Thu Nov 23 04:32:11 PST 2006


I now need to be able to use non-static character arrays in
productions used recursively to hold source code text passed up from
recursive calls. I assume this is the normal and safest way of dealing
with data from recursive calls.
 
Up till now I have been using static character arrays and not getting
all of the text. 
 
I currently obtain the appropriate line number for output for which I
use LT(1)->getLine() in printf statements.
 
However, when using non-static character arrays in productions used
recursively I am now finding that the use of LT(1)->getLine() totally
messes up the piece of text just returned which I want to print (with
the line number). 
 
Is there any obvious reason for this?
 
I am generating parser in C++ using Antlr 2.7.3
 
David.



This e-mail message may be confidential and is intended only for the use of the individual(s) to whom it is addressed.  It may contain information which is or may be confidential, non-public or legally privileged. Please do not disseminate or distribute this message other than to its intended recipient without permission of the author. You should not copy it or use it for any purpose nor disclose its contents to any other person. If you have received this message in error, please notify me by email immediately and delete the original message and all copies in your computer systems.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20061123/deab1311/attachment.html 


More information about the antlr-interest mailing list