diff options
author | Mu Qiao <qiaomuf@gentoo.org> | 2011-07-20 19:52:21 +0800 |
---|---|---|
committer | Mu Qiao <qiaomuf@gentoo.org> | 2011-07-20 23:08:32 +0800 |
commit | cd7ac69edee15151ad178fc075817d126e77fa21 (patch) | |
tree | 129f8d11546c924bf5a0a02cef3cda627a460728 /bashast | |
parent | Parser: fix parameter expansion value (diff) | |
download | libbash-cd7ac69edee15151ad178fc075817d126e77fa21.tar.gz libbash-cd7ac69edee15151ad178fc075817d126e77fa21.tar.bz2 libbash-cd7ac69edee15151ad178fc075817d126e77fa21.zip |
Parser: remove backtracking for double quoted string
Diffstat (limited to 'bashast')
-rw-r--r-- | bashast/bashast.g | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/bashast/bashast.g b/bashast/bashast.g index 3ca2bf8..f712f2e 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -611,13 +611,12 @@ quoted_string double_quoted_string : DQUOTE double_quoted_string_part* DQUOTE -> ^(DOUBLE_QUOTED_STRING double_quoted_string_part*); double_quoted_string_part -options{ backtrack = true; memoize = true; } - : variable_reference - | command_substitution - | arithmetic_expansion - | ESC DQUOTE -> DQUOTE - | ESC TICK -> TICK - | ESC DOLLAR -> DOLLAR + : (DOLLAR (LBRACE|name|num|TIMES|AT|POUND|QMARK|MINUS|DOLLAR|BANG)) => variable_reference + | (command_substitution) => command_substitution + | (DOLLAR (LLPAREN|LSQUARE)) => arithmetic_expansion + | (ESC DQUOTE) => ESC DQUOTE -> DQUOTE + | (ESC TICK) => ESC TICK -> TICK + | (ESC DOLLAR) => ESC DOLLAR -> DOLLAR | ~(TICK|DQUOTE); string_part |