diff options
-rw-r--r-- | parsing/lexer.sh | 12 | ||||
-rw-r--r-- | parsing/parse.sh | 9 |
2 files changed, 14 insertions, 7 deletions
diff --git a/parsing/lexer.sh b/parsing/lexer.sh index 53af926..292d2fa 100644 --- a/parsing/lexer.sh +++ b/parsing/lexer.sh @@ -451,9 +451,15 @@ scan_word() while :; do lgetc word="${word}${c}" - case "${c}" in \') - break - ;; + case "${c}" in + '') + synerr '%s %s' \ + 'Unterminated' \ + 'quoted string' + ;; + \') + break + ;; esac done ;; diff --git a/parsing/parse.sh b/parsing/parse.sh index c9e8000..dd340bd 100644 --- a/parsing/parse.sh +++ b/parsing/parse.sh @@ -665,7 +665,8 @@ try() #try 'foo <<\EOF' '$(bar)' 'EOF' #try 'foo <<EOF1; bar <<EOF2' 'baz' 'EOF1' 'qux' 'EOF2' #try '\foo' -try '"foo bar" baz' -try '"foo' -try 'foo\" bar' -try 'foo\' +#try '"foo bar" baz' +#try '"foo' +#try 'foo\" bar' +#try 'foo\' +try "foo'" |