Mercurial > urweb
diff src/urweb.lex @ 2122:8cf40452c900
Some new infix operators, contributed by Gabriel Riba
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Thu, 05 Mar 2015 14:50:31 -0500 |
parents | d4ed20beb93b |
children | f3c24e6790ba |
line wrap: on
line diff
--- a/src/urweb.lex Tue Mar 03 15:55:00 2015 -0500 +++ b/src/urweb.lex Thu Mar 05 14:50:31 2015 -0500 @@ -376,6 +376,15 @@ <INITIAL> "&&" => (Tokens.ANDALSO (pos yypos, pos yypos + size yytext)); <INITIAL> "||" => (Tokens.ORELSE (pos yypos, pos yypos + size yytext)); +<INITIAL> "<<<" => (Tokens.COMPOSE (pos yypos, pos yypos + size yytext)); +<INITIAL> ">>>" => (Tokens.ANDTHEN (pos yypos, pos yypos + size yytext)); +<INITIAL> "<|" => (Tokens.FWDAPP (pos yypos, pos yypos + size yytext)); +<INITIAL> "|>" => (Tokens.REVAPP (pos yypos, pos yypos + size yytext)); + +<INITIAL> "`" ({cid} ".")* {id} "`" => (Tokens.BACKTICK_PATH ( (* strip backticks *) + substring (yytext,1,size yytext -2), + pos yypos, pos yypos + size yytext)); + <INITIAL> "=" => (Tokens.EQ (pos yypos, pos yypos + size yytext)); <INITIAL> "<>" => (Tokens.NE (pos yypos, pos yypos + size yytext)); <INITIAL> "<" => (Tokens.LT (pos yypos, pos yypos + size yytext));