diff options
author | P. J. McDermott <pj@pehjota.net> | 2016-02-21 15:00:00 (EST) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2016-02-21 15:00:00 (EST) |
commit | 6774514bcfc8b4b447237f144dba68fed74688aa (patch) | |
tree | 4266089d67e6ee173a0609643e1f8a7266f433b5 | |
parent | 89ee6884b4d825d1d47b62380bdde93dd1842fa5 (diff) | |
download | eggshell-6774514bcfc8b4b447237f144dba68fed74688aa.zip eggshell-6774514bcfc8b4b447237f144dba68fed74688aa.tar.gz eggshell-6774514bcfc8b4b447237f144dba68fed74688aa.tar.bz2 |
eshtrans/frontend: Fix validation patterns in accept()
-rw-r--r-- | eshtrans/frontend/lexer.esh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/eshtrans/frontend/lexer.esh b/eshtrans/frontend/lexer.esh index 069f36b..3c8cb27 100644 --- a/eshtrans/frontend/lexer.esh +++ b/eshtrans/frontend/lexer.esh @@ -939,9 +939,10 @@ accept() fi # Validate name. case "${tok#*${US}}" in - [A-Za-z_][0-9A-Za-z_]*) + [!A-Za-z_]*) + return 1 ;; - *) + *[!0-9A-Za-z_]*) return 1 ;; esac @@ -954,9 +955,10 @@ accept() fi # Validate name. case "${tok#*${US}}" in - [A-Za-z_][0-9A-Za-z_]*) + [!A-Za-z_]*) + return 1 ;; - *) + *[!0-9A-Za-z_]*) return 1 ;; esac |