[antlr-interest] rules with same token on both ends

cintyram <cintyram at yahoo.com> cintyram at yahoo.com
Mon Feb 10 08:09:42 PST 2003


hi ,
 how to implement a rule with the same starting and ending token;
eg:
decl ! : type:ID units:ID (ID)+ ;

now in the iput file being parsed a line like

electrical Volts Vin    Vout
electrical Current Iin  Iout

is not parsed properly as all the IDs on the second line are matched
by the rule as the trailing IDs for the first line!;

since the delimiter is newline, which is delimiter only for some
statements , please suggest how this situation can be handled ?

thanks in advance,
cheers
ram
ps: please also read messages #7408 and #7411 ;












 

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



More information about the antlr-interest mailing list