[antlr-interest] Column Identification

Neil Benn neil.benn at cambridgeantibody.com
Tue Nov 5 04:32:31 PST 2002


Hello,

	I'm very sorry to be posting so many questions, I'm afraid I
have another.  I'd also like to thank the people who have responded to
me!

	I'm looking to obtain column and line information for the
parser.  I have line information sorted out but am confused with the
column identification.  Looking at the jdocs for the antlr package
(2.7.0), the Token class has a getter/setter for Column.  However
calling this just results in a zero.  

	Looking at the docs on the antlr documentation page, they seem
to be out of date with my version as it talks about overriding consume
and providing a getColumn method.  
	The getColumn method is already there and looking at the FAQ
asking the same thing - it says - 'do not override consume'.  
	There is a comment later that I need to provide the input stream
in binary mode.  Therefore I have created a FileInputStream which
obtains a stream of bytes and sent this in but to no avail the column
number still sits at one. 

	These conflicting statements have confused me slightly - please
could you let me know the best way to provide column information on the
location of a token.

	Thanks, once again for your assistance.

Cheers,

Neil Benn
Senior Automation Informatics Scientist

Cambridge Antibody Technology
The Science Park
Melbourn
Cambridgeshire
SG8 6JJ, UK

Telephone: + 44 (0) 1763 263233
Facsimile + 44 (0) 1763 263413
Email: mailto:neil.benn at cambridgeantibody.com
http://www.cambridgeantibody.com

Cambridge Antibody Technology Limited *
Registered Office: The Science Park, Melbourn, Cambridgeshire, SG8 6JJ,
UK Registered in England and Wales number 2451177
(* Cambridge Antibody Technology Limited is a member of the Cambridge
Antibody Technology Group of Companies)

Confidentiality Note: This information and any attachments is
confidential and only for use by the individual or entity to whom it has
been sent. Any unauthorised dissemination, distribution or copying of
this message is strictly prohibited. If you are not the intended
recipient please inform the sender immediately by reply e-mail and
delete this message from your system. Thank you for your co-operation.


 

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



More information about the antlr-interest mailing list