diff options
author | Mu Qiao <qiaomuf@gentoo.org> | 2011-07-28 17:04:34 +0800 |
---|---|---|
committer | Mu Qiao <qiaomuf@gentoo.org> | 2011-08-02 15:52:19 +0800 |
commit | b04f9d064a8aec90812df91be179f6bddb7f8174 (patch) | |
tree | 0d1a5d1a2707117b97efdadd25c80567338f10cd /bashast | |
parent | Parser: make spaces around < and > optional (diff) | |
download | libbash-b04f9d064a8aec90812df91be179f6bddb7f8174.tar.gz libbash-b04f9d064a8aec90812df91be179f6bddb7f8174.tar.bz2 libbash-b04f9d064a8aec90812df91be179f6bddb7f8174.zip |
Parser: split token compositions
'<=' will generate one token so that some expressions cannot be fully
parsed. Now '>=' and '<=' are split to parse these expressions.
Diffstat (limited to 'bashast')
-rw-r--r-- | bashast/bashast.g | 8 |
1 files changed, 4 insertions, 4 deletions
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 : '>'; |