[antlr-interest] Parsing Question

mzukowski at yci.com mzukowski at yci.com
Mon Nov 4 09:28:23 PST 2002


Something like

RULE: ('a'..'z')* ':'! ('a'..'z')*;

The ! tells it to not add that text to the token.

Monty

-----Original Message-----
From: Neil Benn [mailto:neil.benn at cambridgeantibody.com]
Sent: Monday, November 04, 2002 9:20 AM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] Parsing Question


Hello,

	I'm attempting to parse something like:-

Comment: User , This is a comment
MachineID: System , fusion1

	I have worked out how to get the token split up with a lexer
that skips commas and newlines.  However I also want the system to
discard the colon character.  However if I use Token.SKIP then it
creates a new token for me - I don't want that - I just want the Lexer
to ignore the : and keep running on the same  token so that the parser
never sees the :.  However I can't work out how to do this.  

	Could anyone let me know of the correct syntax to use here.

	Thanks, in advance for your help.


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/ 


 

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



More information about the antlr-interest mailing list