summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eshtrans/frontend/lexer.esh10
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