diff options
author | P. J. McDermott <pj@pehjota.net> | 2016-02-19 23:51:10 (EST) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2016-02-20 00:05:12 (EST) |
commit | 6944e19e75467d92140174e979898f35659f9dc6 (patch) | |
tree | 04b3f41de56fa5f37e8ca0f08a8f8b40fb7f5dd4 /parsing | |
parent | 066cefc083a0538a5ecd9722eb22226b451d1845 (diff) | |
download | eggshell-6944e19e75467d92140174e979898f35659f9dc6.zip eggshell-6944e19e75467d92140174e979898f35659f9dc6.tar.gz eggshell-6944e19e75467d92140174e979898f35659f9dc6.tar.bz2 |
Fix T_LBRACE, T_RBRACE, and T_BANG recognition
Diffstat (limited to 'parsing')
-rw-r--r-- | parsing/lexer.sh | 4 | ||||
-rw-r--r-- | parsing/parse.sh | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/parsing/lexer.sh b/parsing/lexer.sh index 003ee30..52aedea 100644 --- a/parsing/lexer.sh +++ b/parsing/lexer.sh @@ -513,7 +513,7 @@ accept() # reserved words. for rw in T_IF T_THEN T_ELSE T_ELIF T_FI T_DO T_DONE \ T_CASE T_ESAC T_WHILE T_UNTIL T_FOR \ - T_IN; do + T_LBRACE T_RBRACE T_BANG T_IN; do if [ "x${tok#T_WORD${US}}" = \ "x$(tokname "${rw}")" ]; then tok="${rw}" @@ -529,7 +529,7 @@ accept() # Verify that the word doesn't match any reserved words. for rw in T_IF T_THEN T_ELSE T_ELIF T_FI T_DO T_DONE \ T_CASE T_ESAC T_WHILE T_UNTIL T_FOR \ - T_IN; do + T_LBRACE T_RBRACE T_BANG T_IN; do if [ "x${tok#T_WORD${US}}" = \ "x$(tokname "${rw}")" ]; then tok="${rw}" diff --git a/parsing/parse.sh b/parsing/parse.sh index 1f638e0..542f5ea 100644 --- a/parsing/parse.sh +++ b/parsing/parse.sh @@ -440,6 +440,6 @@ try() #try 'foo ${^}' #try 'foo `bar`' #try 'foo &&' -#try '{ foo ; }' +try '{ foo; }' #try '( foo )' -try 'for i in 1 2 3; do stuff; done' +#try 'for i in 1 2 3; do stuff; done' |