Mercurial > urweb
diff src/urweb.lex @ 1840:146ec8e90063
Add some name-mangling rules to allow XML attribute 'name' and attributes with dashes
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Thu, 27 Dec 2012 15:34:11 -0500 |
parents | 818d4097e2ed |
children | 403f0cc65b9c |
line wrap: on
line diff
--- a/src/urweb.lex Thu Dec 13 17:51:34 2012 -0500 +++ b/src/urweb.lex Thu Dec 27 15:34:11 2012 -0500 @@ -177,6 +177,7 @@ %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 @@ <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