[antlr-interest] Reusing the same rules again Antlt started g iving problem

mzukowski at yci.com mzukowski at yci.com
Tue Mar 18 08:06:14 PST 2003


Read the docs about protected lexer rules.  Look at the examples on how to
parse strings.  java.g is a good one.

Monty

-----Original Message-----
From: gitadut [mailto:gitadut at yahoo.co.uk]
Sent: Tuesday, March 18, 2003 3:55 AM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] Reusing the same rules again Antlt started
giving problem


Antlr behaves abnormally when I want to describe the production rules 
in Lexer part reusing some of the rules already defined by me. 

Like METASTRING :
((POP) | (STRING) | "/")
;
When I have defined POP in some way. Does the space after POP is a 
rule?

Next is how can I parse some string tokens by Antlr?
I've describes in Parser part 

Reserved :
(CIRCUIT)
;
Then in Lexer 

CIRCUIT
: "Circuit"
;
But it is not solving my problem. 
Are there any suggestions or comments from anyone?
Thanks in advance. 

Gita





 

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