summaryrefslogtreecommitdiff
path: root/src/urweb.lex
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2010-12-24 18:55:13 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2010-12-24 18:55:13 -0500
commit928db0bf3aa8a149d0e1632f07eb7672ec65add3 (patch)
tree236e0f667ec8db7a6605a4dcb8571a481038441f /src/urweb.lex
parent318b5ebe2d34aa2bd2496765695308976da9ea1e (diff)
JavaScript compilation of time comparison; fix lexing of XML that includes open parens
Diffstat (limited to 'src/urweb.lex')
-rw-r--r--src/urweb.lex4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/urweb.lex b/src/urweb.lex
index fa8c5dde..371d69a7 100644
--- a/src/urweb.lex
+++ b/src/urweb.lex
@@ -172,7 +172,7 @@ cid = [A-Z][A-Za-z0-9_]*;
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 @@ xint = x[0-9a-fA-F][0-9a-fA-F];
<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 ());