Hi,
I'm begging to get my bearings on this.... But the following gives two
"multiple alternatives" warnings.
How come?
Many thanks in advance,
Pavel
grammar PGTeX;
doc
:
(a=text{System.out.print(">"+$a.value+"<");}|b=command{System.out.print($b.value);})+
EOF;
command returns [ String value ]
:'\\' a=word '\{' b=word '\}' {$value=$a.value+"+"+$b.value;};
text returns[String value]
:{$value="";}(a=word{$value += $a.value;} | WS{$value += $WS.text;} )+;
word returns[String value]
:WORD {$value = $WORD.text;} ;
WS : ( ' '
| '\t'
| '\r'
| '\n'
)+;
WORD: ('a'..'z')+;
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.