I am having a difficult time distinguishing two legal lines of code:
ID = expression
and
ID(exp1, exp2, ...) = expression
I tried this rule:
stat: expr NEWLINE -> expr
| (ID OPENP .* CLOSEP GETS)
=> ID OPENP actualParameters CLOSEP GETS expr NEWLINE
-> ^(INDEX ID OPENP actualParameters CLOSEP expr)
| ID GETS expr NEWLINE -> ^(GETS ID expr)
| NEWLINE ->
;
But it says that alternatives 2 and 3 can never be matched. How do I
"reactivate" 2 and 3?
DMS
David M. Smith http://www.cc.gatech.edu/fac/David.Smith
Georgia Institute of Technology, College of Computing
Sent from my ASR-33 Teletype
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.