# HG changeset patch # User Adam Chlipala # Date 1293234913 18000 # Node ID 1595a738e4e954227390052931bc66b05f60e8f8 # Parent b02cb9da568697e05e96f006142295f34fc820ed JavaScript compilation of time comparison; fix lexing of XML that includes open parens diff -r b02cb9da5686 -r 1595a738e4e9 src/settings.sml --- a/src/settings.sml Fri Dec 24 18:08:29 2010 -0500 +++ b/src/settings.sml Fri Dec 24 18:55:13 2010 -0500 @@ -211,7 +211,11 @@ ("toupper", "toUpper"), ("checkUrl", "checkUrl"), - ("bless", "bless")] + ("bless", "bless"), + + ("eq_time", "eq"), + ("lt_time", "lt"), + ("le_time", "le")] val jsFuncs = ref jsFuncsBase fun setJsFuncs ls = jsFuncs := foldl (fn ((k, v), m) => M.insert (m, k, v)) jsFuncsBase ls fun jsFunc x = M.find (!jsFuncs, x) diff -r b02cb9da5686 -r 1595a738e4e9 src/urweb.lex --- 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 @@ {notags} => (Tokens.NOTAGS (unescape (yypos, yypos + size yytext) yytext, yypos, yypos + size yytext)); + "(" => (Tokens.NOTAGS ("(", yypos, yypos + size yytext)); + . => (ErrorMsg.errorAt' (yypos, yypos) ("illegal XML character: \"" ^ yytext ^ "\""); continue ());