[antlr-interest] Simple (should be) lexer Q
Terence Parr
parrt at cs.usfca.edu
Fri Jun 10 11:17:30 PDT 2005
On Jun 10, 2005, at 9:47 AM, Gerald B. Rosenberg wrote:
Hi. What does the -traceLexer option tell you? I guess you're
saying that it never chooses the 2nd alternative. What is your k
level? Is WS a single char or can it be multiple?
Ter
> NAME:
> ( CAPWORD (WS CAPWORD)* COMMA WS CAPWORD ) => CAPWORD (WS
> CAPWORD)* COMMA WS CAPWORD
> | ( CAPWORD (WS CAPWORD)+ ) => CAPWORD (WS CAPWORD)+
> | CAPWORD
> ;
>
>
> protected
> CAPWORD:
> UPPERLETTER (LETTER)* (PERIOD)?
> ;
>
> protected
> LETTER:
> UPPERLETTER | LOWERLETTER
> ;
>
> protected
> UPPERLETTER:
> 'A'..'Z'
> ;
>
> protected
> LOWERLETTER:
> 'a'..'z'
> ;
>
> protected
> PERIOD '.';
>
> ----
> Gerald B. Rosenberg, Esq.
> NewTechLaw
> 285 Hamilton Avenue, Suite 520
> Palo Alto, CA 94301-2576
>
> 650.325.2100 (office) / 650.703.1724 (cell)
> 650.325.2107 (fax)
>
> www.newtechlaw.com
--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com
More information about the antlr-interest
mailing list