diff options
author | Adam Chlipala <adam@chlipala.net> | 2011-11-05 12:32:20 -0400 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2011-11-05 12:32:20 -0400 |
commit | e548283b4060c3d43573a4678a5d8d637efeb3fb (patch) | |
tree | b5f87a64931ea06b6e1597e112dc1de60845bb94 | |
parent | 039c0459b9fd51337a2b17aea1618b423605e636 (diff) |
Adjust for different ml-lex behavior between SML/NJ and MLton
-rw-r--r-- | src/urweb.lex | 2 | ||||
-rw-r--r-- | tests/sigbug.ur | 3 | ||||
-rw-r--r-- | tests/sigbug.urs | 3 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/urweb.lex b/src/urweb.lex index 21e3d603..19f28738 100644 --- a/src/urweb.lex +++ b/src/urweb.lex @@ -416,7 +416,7 @@ xint = x[0-9a-fA-F][0-9a-fA-F]; <INITIAL> "structure" => (Tokens.STRUCTURE (pos yypos, pos yypos + size yytext)); <INITIAL> "signature" => (Tokens.SIGNATURE (pos yypos, pos yypos + size yytext)); <INITIAL> "struct" => (Tokens.STRUCT (pos yypos, pos yypos + size yytext)); -<INITIAL> "sig" => (if yypos = 2 then initialSig () else (); Tokens.SIG (pos yypos, pos yypos + size yytext)); +<INITIAL> "sig" => (if yypos <= 2 then initialSig () else (); Tokens.SIG (pos yypos, pos yypos + size yytext)); <INITIAL> "let" => (Tokens.LET (pos yypos, pos yypos + size yytext)); <INITIAL> "in" => (Tokens.IN (pos yypos, pos yypos + size yytext)); <INITIAL> "end" => (Tokens.END (pos yypos, pos yypos + size yytext)); diff --git a/tests/sigbug.ur b/tests/sigbug.ur new file mode 100644 index 00000000..ec00343c --- /dev/null +++ b/tests/sigbug.ur @@ -0,0 +1,3 @@ +val z = 3 +val x = 1 +val y = 2 diff --git a/tests/sigbug.urs b/tests/sigbug.urs new file mode 100644 index 00000000..81693932 --- /dev/null +++ b/tests/sigbug.urs @@ -0,0 +1,3 @@ +val x : inta +val y : into +val z : introx |