Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Parser: allow filename expansion characters | Mu Qiao | 2011-08-02 | 1 | -1/+3 | |
| | ||||||
* | Parser: remove tokens for += and -= | Mu Qiao | 2011-08-02 | 1 | -9/+9 | |
| | | | | This makes ${a:-=} and ${a:+=} work properly. | |||||
* | Parser: make the blanks before semicolon optional | Mu Qiao | 2011-08-02 | 1 | -3/+3 | |
| | | | | | This fixes case statement. The indentation for the rule is also fixed. Unnecessary syntactic predicate is removed. | |||||
* | Parser: allow blanks before semicolon for for_expr | Mu Qiao | 2011-08-02 | 1 | -1/+1 | |
| | ||||||
* | Parser: support '@' in non-quoted string | Mu Qiao | 2011-08-02 | 1 | -1/+1 | |
| | ||||||
* | Parser: support -a and -i option for local | Mu Qiao | 2011-08-02 | 1 | -1/+10 | |
| | ||||||
* | Parser: support == in arithmetic comparison | Mu Qiao | 2011-08-02 | 1 | -1/+13 | |
| | ||||||
* | Parser: allow empty value for sub-array expansion | Mu Qiao | 2011-08-02 | 1 | -2/+7 | |
| | | | | Expansion like ${var::3} is allowed now. | |||||
* | Parser: allow braces in command arguments | Mu Qiao | 2011-08-02 | 1 | -1/+7 | |
| | ||||||
* | Parser: fix builtin/keyword test | Mu Qiao | 2011-07-20 | 1 | -16/+25 | |
| | | | | Now more tests are uncommented or added. | |||||
* | Parser: fix delete expansion | Mu Qiao | 2011-07-20 | 1 | -2/+4 | |
| | ||||||
* | Parser: add rules to perform bash expansions | Mu Qiao | 2011-07-20 | 1 | -0/+7 | |
| | | | | | The rule will be called in the walker grammar to perform bash expansions on raw strings. | |||||
* | Parser: remove backtracking for double quoted string | Mu Qiao | 2011-07-20 | 1 | -7/+6 | |
| | ||||||
* | Parser: fix parameter expansion value | Mu Qiao | 2011-07-20 | 1 | -6/+21 | |
| | | | | | | Now the rule for expansion value follows bash manual. The delete expansion is fixed to use the replace pattern rule rather than the expansion value rule. | |||||
* | Parser: remove global backtracking | Mu Qiao | 2011-07-20 | 1 | -472/+674 | |
| | | | | | | | Now several tests are not working: var_expansion.bash, isolated_functions.bash, compound_command.bash, test_expr.bash, test/ast_printer_test.sh, and test/verify_bashs_test.sh. We will fix them in later commits. | |||||
* | Parser: remove blank for the start of pipeline rule | Mu Qiao | 2011-07-20 | 1 | -16/+17 | |
| | | | | Most rules that call pipeline will handle the leading blanks themselves. | |||||
* | Parser: handle command substitution in lexer rules | Mu Qiao | 2011-07-20 | 1 | -2/+30 | |
| | | | | | | | | Inside command substitution, many characters are allowed. For example, MY_PV="$(replace_version_separator 1 '')" will reserve the single quotes for command substitution. Now we support this by handling command substitution in the lexer rules and call back to parser in walker grammar. | |||||
* | Parser: fix a bug in escaped double quote handling | Mu Qiao | 2011-07-20 | 1 | -1/+6 | |
| | | | | | The internal lexer state for handling double quotes should be changed if the double quote is escaped. Now this is fixed. | |||||
* | Parser: support literal '$' in double quoted string | Mu Qiao | 2011-07-08 | 1 | -1/+1 | |
| | ||||||
* | Parser: reduce backtracking for command_atom | Mu Qiao | 2011-07-06 | 1 | -28/+24 | |
| | | | | | Backtracking is reduced by left refactoring function definition and bash command. | |||||
* | Parser: support ANSI-C Quoting | Mu Qiao | 2011-07-03 | 1 | -1/+3 | |
| | ||||||
* | Merge branch 'mu/native_code' | Mu Qiao | 2011-06-26 | 1 | -17/+97 | |
|\ | | | | | | | | | | | | | | | | | Conflicts: Makefile.am bashast/features_script/features.sh.ast bashast/gunit/simp_command.gunit scripts/command_execution.bash test/verify_error_output_test.sh | |||||
| * | Parser: use lexer rule to parse singled quoted string | Mu Qiao | 2011-06-25 | 1 | -8/+5 | |
| | | ||||||
| * | Parser: support '#' in double quoted string | Mu Qiao | 2011-06-25 | 1 | -2/+11 | |
| | | ||||||
| * | Parser: first support for here document | Mu Qiao | 2011-06-25 | 1 | -3/+70 | |
| | | | | | | | | | | Currently the grammar doesn't allow any white space between the command and the here document due to backtracking. | |||||
| * | Parser: support writing C++ code in the grammar | Mu Qiao | 2011-06-21 | 1 | -2/+11 | |
| | | ||||||
| * | Parser: remove the here_string_op rule | Mu Qiao | 2011-06-16 | 1 | -3/+1 | |
| | | ||||||
* | | Merge remote-tracking branch 'mu/fix_arithmetic' | Petteri Räty | 2011-06-25 | 1 | -5/+4 | |
|\ \ | ||||||
| * | | Parser: rename arith_comparison | Mu Qiao | 2011-06-22 | 1 | -5/+4 | |
| | | | | | | | | | | | | | | | The arith_comparison rule is renamed to arithmetic_expression as it's the name from bash manual. | |||||
* | | | Parser: simplify the AST of brace expansion | Mu Qiao | 2011-06-21 | 1 | -2/+1 | |
| | | | ||||||
* | | | Parser: support braces in command arguments | Mu Qiao | 2011-06-21 | 1 | -1/+5 | |
| | | | ||||||
* | | | Parser: fix comment handling at the end of if block | Mu Qiao | 2011-06-20 | 1 | -1/+1 | |
|/ / | ||||||
* | | Parser: support -a and -o in built-in test | Mu Qiao | 2011-06-19 | 1 | -2/+3 | |
| | | | | | | | | | | Note that we don't respect the operator precedence for now. Fixing that should have to involve semantic predicate. | |||||
* | | Parser: support regular expression in keyword test | Mu Qiao | 2011-06-16 | 1 | -1/+5 | |
|/ | ||||||
* | Parser: support escaped characters in double quotes | Mu Qiao | 2011-06-16 | 1 | -1/+3 | |
| | ||||||
* | Parser: Support redirection for all kinds of commands | Mu Qiao | 2011-06-14 | 1 | -5/+7 | |
| | | | | | | | Bash allows redirection to appear after any kind of command including compound command. Now the parser grammar is changed to reflect this. Note that we do not support redirection for commands other than simple built-in execution so the walker grammar is not changed. | |||||
* | Parser: fix bracket pattern match negation | Petteri Räty | 2011-06-14 | 1 | -10/+6 | |
| | | | | | | The negation operator is supposed to be right after the opening left bracket. The right bracket will come after it when it's part of the matched characters. | |||||
* | Parser: left factor bracket_pattern_match rule | Petteri Räty | 2011-06-14 | 1 | -4/+6 | |
| | ||||||
* | Parser: fix brace expansion inside bracket pattern | Petteri Räty | 2011-06-14 | 1 | -11/+8 | |
| | | | | | We now support expressions like [{a,b}-c]*. As a side benefit code complexity is reduced. | |||||
* | Parser: remove redundant word rule | Petteri Räty | 2011-06-11 | 1 | -10/+2 | |
| | ||||||
* | Parser: remove redundant case_pattern rule | Petteri Räty | 2011-06-11 | 1 | -6/+2 | |
| | ||||||
* | Merge remote-tracking branch 'mu/array_expansion' | Petteri Räty | 2011-06-11 | 1 | -5/+7 | |
|\ | ||||||
| * | Walker: support array offset expansion | Mu Qiao | 2011-06-11 | 1 | -5/+7 | |
| | | | | | | | | | | * is removed from var_name as most expansions don't support it. Parser grammar is adjusted to generate better AST. | |||||
* | | Parser: builtin test doesn't do && or || | Petteri Räty | 2011-06-10 | 1 | -1/+2 | |
| | | | | | | | | && and || are only available with [[. | |||||
* | | Parser: fix handling )) | Petteri Räty | 2011-06-10 | 1 | -5/+4 | |
| | | | | | | | | | | Having the special token confused statements like array=($(echo)) where the two parenthesis are part of different constructs. | |||||
* | | Parser: handle appending to arrays | Petteri Räty | 2011-06-10 | 1 | -3/+4 | |
| | | | | | | | | The parser couldn't handle array+=(a b c) syntax. | |||||
* | | Parser: fix {GNUmakefile,{M,m}akefile} | Petteri Räty | 2011-06-09 | 1 | -1/+0 | |
| | | | | | | | | | | The first alternative can match everything through fname so the second was just confusing ANTLR. | |||||
* | | Parser: trailing white space in command lists | Petteri Räty | 2011-06-09 | 1 | -8/+9 | |
| | | | | | | | | | | The redirect rule was stopping trailing white space from parsing properly. With refactoring our grammar handles it properly. | |||||
* | | Parser: fix ${var:-public_html} | Petteri Räty | 2011-06-09 | 1 | -5/+2 | |
|/ | | | | | | -p is no longer a special token. This makes things simpler as you don't need to prepare for it. When the time functionality is implemented in walker it can check the letter given. | |||||
* | Parser: support != in arithmetic expansion | Mu Qiao | 2011-06-09 | 1 | -1/+7 | |
| |