From b04f9d064a8aec90812df91be179f6bddb7f8174 Mon Sep 17 00:00:00 2001 From: Mu Qiao Date: Thu, 28 Jul 2011 17:04:34 +0800 Subject: Parser: split token compositions '<=' will generate one token so that some expressions cannot be fully parsed. Now '>=' and '<=' are split to parse these expressions. --- bashast/bashast.g | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bashast') diff --git a/bashast/bashast.g b/bashast/bashast.g index 8486619..7dc9ad5 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -121,6 +121,8 @@ tokens{ AND_ASSIGN; XOR_ASSIGN; OR_ASSIGN; + LEQ; + GEQ; NOT_EQUALS; EQUALS_TO; @@ -991,8 +993,8 @@ shifts compare : shifts (compare_operator^ BLANK!? shifts)?; compare_operator - : LEQ - | GEQ + : LESS_THAN EQUALS -> LEQ + | GREATER_THAN EQUALS -> GEQ | LESS_THAN | GREATER_THAN | EQUALS EQUALS -> EQUALS_TO @@ -1048,8 +1050,6 @@ MINUS : '-'; PLUS : '+'; EXP : '**'; AMP : '&'; -LEQ : '<='; -GEQ : '>='; CARET : '^'; LESS_THAN : '<'; GREATER_THAN : '>'; -- cgit v1.2.3-65-gdbad