[antlr-interest] upper, lower case for tokens, rule names

Terence Parr parrt at cs.usfca.edu
Fri Jul 18 10:18:26 PDT 2003


Does anyone have an opinion on the whole "rule names start with lower 
case letter" and tokens start with upper case concept borrowed from 
yacc in the old days?

It's pretty easy to do two passes over the grammar to find all rule 
definitions and then walk the actual rules where you'd know that "x" is 
a rule if it's defined as a rule and a token if not defined.  Of course 
that makes it easy make lots of mistakes: undefined rule becomes a 
token definition etc...

Just a thought that occurred to me that we might do away with this 
"old" notion for a future version of the tool.

Terence
--
Professor Comp. Sci., University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Co-founder, http://www.jguru.com
Co-founder, http://www.knowspam.net enjoy email again!
Co-founder, http://www.peerscope.com pure link sharing




 

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




More information about the antlr-interest mailing list