diff options
Diffstat (limited to 'parsing/lexer.sh')
-rw-r--r-- | parsing/lexer.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/parsing/lexer.sh b/parsing/lexer.sh index 52aedea..e1d3aab 100644 --- a/parsing/lexer.sh +++ b/parsing/lexer.sh @@ -522,8 +522,10 @@ accept() done tok="T_FNAME${US}${tok#T_WORD${US}}" ;; - T_WORD) - if ! [ "x${tok%%${US}*}" = "x${t}" ]; then + T_CMDNAME) + # The first word of a simple command is to be checked + # for reserved words. + if ! [ "x${tok%%${US}*}" = 'xT_WORD' ]; then return 1 fi # Verify that the word doesn't match any reserved words. |