]> git.saurik.com Git - bison.git/blobdiff - src/scan-code.l
Do not allow identifiers that start with a negative number.
[bison.git] / src / scan-code.l
index a5f570d790e09705351d26fba452c950a629dd26..ffc8b5d4173d394c3fa7fd5861da6e20a83831ac 100644 (file)
@@ -85,8 +85,8 @@ splice         (\\[ \f\t\v]*\n)*
 /* C style identifier. Must start with letter. Will be used for
    named symbol references. Shall be kept synchronized with
    scan-gram.l "letter" and "id". */
-letter   [-.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]
-id       {letter}({letter}|[0-9])*
+letter   [.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]
+id       -*(-|{letter}({letter}|[-0-9])*)
 ref      -?[0-9]+|{id}|"["{id}"]"|"$"
 
 %%