[antlr-interest] unary Operators

Henry Butowsky henryb at ntlworld.com
Wed Nov 16 07:44:51 PST 2005


Hi Guys,
    Im using a C like grammer and am having trouble getting unary 
operators to work

I have in the parser

unary_exp
	:primary_exp
	| (LNOT^ | MINUS^ |PLUS^) primary_exp
          ;
	
It works  OK with a single unary operator eg   !10 or -2.4
But put them together and nogo e.g !!20 or -!0

Regards Henry



More information about the antlr-interest mailing list