diff options
author | Adam Chlipala <adam@chlipala.net> | 2012-12-27 15:34:11 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2012-12-27 15:34:11 -0500 |
commit | 53c633b53e8825cb9058fb88e86d1ca7828b83e6 (patch) | |
tree | 94682452c654491c184a8e2d43d3dbfdb4e46cf9 /src/urweb.lex | |
parent | bf6fbd81d4e60a87b19f8c8149349217b4620360 (diff) |
Add some name-mangling rules to allow XML attribute 'name' and attributes with dashes
Diffstat (limited to 'src/urweb.lex')
-rw-r--r-- | src/urweb.lex | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/urweb.lex b/src/urweb.lex index 0994ecec..293c6dc6 100644 --- a/src/urweb.lex +++ b/src/urweb.lex @@ -177,6 +177,7 @@ fun unescape loc s = %s COMMENT STRING CHAR XML XMLTAG; id = [a-z_][A-Za-z0-9_']*; +xmlid = [A-Za-z][A-Za-z0-9-_]*; cid = [A-Z][A-Za-z0-9_]*; ws = [\ \t\012\r]; intconst = [0-9]+; @@ -313,7 +314,7 @@ xint = x[0-9a-fA-F][0-9a-fA-F]; <XMLTAG> {ws}+ => (lex ()); -<XMLTAG> {id} => (Tokens.SYMBOL (yytext, yypos, yypos + size yytext)); +<XMLTAG> {xmlid} => (Tokens.SYMBOL (yytext, yypos, yypos + size yytext)); <XMLTAG> "=" => (Tokens.EQ (yypos, yypos + size yytext)); <XMLTAG> {intconst} => (case Int64.fromString yytext of |