diff options
author | Mu Qiao <qiaomuf@gentoo.org> | 2011-06-20 18:57:45 +0800 |
---|---|---|
committer | Mu Qiao <qiaomuf@gentoo.org> | 2011-06-22 19:56:02 +0800 |
commit | b0c44f96d41a6127fe36ef200904d2c0f5ab65f0 (patch) | |
tree | 334df1f8a8fb1660ece24315fa4259be5fc14885 /bashast/bashast.g | |
parent | Walker: support shortcut capability for logic and (diff) | |
download | libbash-b0c44f96d41a6127fe36ef200904d2c0f5ab65f0.tar.gz libbash-b0c44f96d41a6127fe36ef200904d2c0f5ab65f0.tar.bz2 libbash-b0c44f96d41a6127fe36ef200904d2c0f5ab65f0.zip |
Parser: rename arith_comparison
The arith_comparison rule is renamed to arithmetic_expression as it's
the name from bash manual.
Diffstat (limited to 'bashast/bashast.g')
-rw-r--r-- | bashast/bashast.g | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/bashast/bashast.g b/bashast/bashast.g index 571ed54..ffb699f 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -36,7 +36,6 @@ tokens{ CASE_COMMAND; SUBSHELL; CURRENT_SHELL; - COMPOUND_ARITH; COMPOUND_COND; CFOR; FOR_INIT; @@ -200,7 +199,7 @@ compound_command | case_expr | subshell | current_shell - | arith_comparison + | arithmetic_expression | cond_comparison; //Expressions allowed inside a compound command for_expr: FOR BLANK+ name (wspace IN (BLANK+ fname)+)? semiel DO wspace* clist semiel DONE -> ^(FOR name (fname+)? clist) @@ -233,9 +232,9 @@ subshell: LPAREN wspace? clist (BLANK* SEMIC)? (BLANK* EOL)* BLANK* RPAREN -> ^( //A grouping of commands executed in the current shell current_shell : LBRACE wspace clist semiel wspace* RBRACE -> ^(CURRENT_SHELL clist); -//comparison using arithmetic -arith_comparison - : LLPAREN wspace? arithmetic wspace? RPAREN RPAREN -> ^(COMPOUND_ARITH arithmetic); +//Bash arithmetic expression (( expression )) +arithmetic_expression + : LLPAREN wspace? arithmetic wspace? RPAREN RPAREN -> ^(ARITHMETIC_EXPRESSION arithmetic); cond_comparison : cond_expr -> ^(COMPOUND_COND cond_expr); //Variables |