aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Parser: allow filename expansion charactersMu Qiao2011-08-021-1/+3
|
* Parser: remove tokens for += and -=Mu Qiao2011-08-021-9/+9
| | | | This makes ${a:-=} and ${a:+=} work properly.
* Parser: make the blanks before semicolon optionalMu Qiao2011-08-021-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_exprMu Qiao2011-08-021-1/+1
|
* Parser: support '@' in non-quoted stringMu Qiao2011-08-021-1/+1
|
* Parser: support -a and -i option for localMu Qiao2011-08-021-1/+10
|
* Parser: support == in arithmetic comparisonMu Qiao2011-08-021-1/+13
|
* Parser: allow empty value for sub-array expansionMu Qiao2011-08-021-2/+7
| | | | Expansion like ${var::3} is allowed now.
* Parser: allow braces in command argumentsMu Qiao2011-08-021-1/+7
|
* Parser: fix builtin/keyword testMu Qiao2011-07-201-16/+25
| | | | Now more tests are uncommented or added.
* Parser: fix delete expansionMu Qiao2011-07-201-2/+4
|
* Parser: add rules to perform bash expansionsMu Qiao2011-07-201-0/+7
| | | | | The rule will be called in the walker grammar to perform bash expansions on raw strings.
* Parser: remove backtracking for double quoted stringMu Qiao2011-07-201-7/+6
|
* Parser: fix parameter expansion valueMu Qiao2011-07-201-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 backtrackingMu Qiao2011-07-201-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 ruleMu Qiao2011-07-201-16/+17
| | | | Most rules that call pipeline will handle the leading blanks themselves.
* Parser: handle command substitution in lexer rulesMu Qiao2011-07-201-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 handlingMu Qiao2011-07-201-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 stringMu Qiao2011-07-081-1/+1
|
* Parser: reduce backtracking for command_atomMu Qiao2011-07-061-28/+24
| | | | | Backtracking is reduced by left refactoring function definition and bash command.
* Parser: support ANSI-C QuotingMu Qiao2011-07-031-1/+3
|
* Merge branch 'mu/native_code'Mu Qiao2011-06-261-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 stringMu Qiao2011-06-251-8/+5
| |
| * Parser: support '#' in double quoted stringMu Qiao2011-06-251-2/+11
| |
| * Parser: first support for here documentMu Qiao2011-06-251-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 grammarMu Qiao2011-06-211-2/+11
| |
| * Parser: remove the here_string_op ruleMu Qiao2011-06-161-3/+1
| |
* | Merge remote-tracking branch 'mu/fix_arithmetic'Petteri Räty2011-06-251-5/+4
|\ \
| * | Parser: rename arith_comparisonMu Qiao2011-06-221-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 expansionMu Qiao2011-06-211-2/+1
| | |
* | | Parser: support braces in command argumentsMu Qiao2011-06-211-1/+5
| | |
* | | Parser: fix comment handling at the end of if blockMu Qiao2011-06-201-1/+1
|/ /
* | Parser: support -a and -o in built-in testMu Qiao2011-06-191-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 testMu Qiao2011-06-161-1/+5
|/
* Parser: support escaped characters in double quotesMu Qiao2011-06-161-1/+3
|
* Parser: Support redirection for all kinds of commandsMu Qiao2011-06-141-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 negationPetteri Räty2011-06-141-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 rulePetteri Räty2011-06-141-4/+6
|
* Parser: fix brace expansion inside bracket patternPetteri Räty2011-06-141-11/+8
| | | | | We now support expressions like [{a,b}-c]*. As a side benefit code complexity is reduced.
* Parser: remove redundant word rulePetteri Räty2011-06-111-10/+2
|
* Parser: remove redundant case_pattern rulePetteri Räty2011-06-111-6/+2
|
* Merge remote-tracking branch 'mu/array_expansion'Petteri Räty2011-06-111-5/+7
|\
| * Walker: support array offset expansionMu Qiao2011-06-111-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äty2011-06-101-1/+2
| | | | | | | | && and || are only available with [[.
* | Parser: fix handling ))Petteri Räty2011-06-101-5/+4
| | | | | | | | | | Having the special token confused statements like array=($(echo)) where the two parenthesis are part of different constructs.
* | Parser: handle appending to arraysPetteri Räty2011-06-101-3/+4
| | | | | | | | The parser couldn't handle array+=(a b c) syntax.
* | Parser: fix {GNUmakefile,{M,m}akefile}Petteri Räty2011-06-091-1/+0
| | | | | | | | | | The first alternative can match everything through fname so the second was just confusing ANTLR.
* | Parser: trailing white space in command listsPetteri Räty2011-06-091-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äty2011-06-091-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 expansionMu Qiao2011-06-091-1/+7
|