Mercurial > urweb
diff src/urweb.lex @ 1366:1595a738e4e9
JavaScript compilation of time comparison; fix lexing of XML that includes open parens
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 24 Dec 2010 18:55:13 -0500 |
parents | 3a845f2ce9e9 |
children | 7d024767b024 |
line wrap: on
line diff
--- a/src/urweb.lex Fri Dec 24 18:08:29 2010 -0500 +++ b/src/urweb.lex Fri Dec 24 18:55:13 2010 -0500 @@ -172,7 +172,7 @@ ws = [\ \t\012]; intconst = [0-9]+; realconst = [0-9]+\.[0-9]*; -notags = ([^<{\n(]|(\([^\*]))+; +notags = ([^<{\n(]|(\([^\*<{\n]))+; xcom = ([^\-]|(-[^\-]))+; oint = [0-9][0-9][0-9]; xint = x[0-9a-fA-F][0-9a-fA-F]; @@ -338,6 +338,8 @@ <XML> {notags} => (Tokens.NOTAGS (unescape (yypos, yypos + size yytext) yytext, yypos, yypos + size yytext)); +<XML> "(" => (Tokens.NOTAGS ("(", yypos, yypos + size yytext)); + <XML> . => (ErrorMsg.errorAt' (yypos, yypos) ("illegal XML character: \"" ^ yytext ^ "\""); continue ());