diff options
Diffstat (limited to 'parsing')
-rw-r--r-- | parsing/parse.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/parsing/parse.sh b/parsing/parse.sh index 654199b..da0b07f 100644 --- a/parsing/parse.sh +++ b/parsing/parse.sh @@ -21,7 +21,8 @@ complete_command() separator return 0 fi - return 1 + # Unexpected EOF + synexp '' } list() @@ -400,10 +401,9 @@ parse() init_lexer "${fn}" # If this returns (does not exit), there are no errors. - while complete_command; do :; done - if ! accept T_EOF; then - synexp '' - fi + while ! accept T_EOF; do + complete_command + done get_tokens @@ -441,7 +441,7 @@ try() #try 'foo ${#bar#}' #try 'foo ${^}' #try 'foo `bar`' -#try 'foo &&' -try '{ foo; }' +try 'foo &&' +#try '{ foo; }' #try '( foo )' #try 'for i in 1 2 3; do stuff; done' |