diff options
author | Adam Chlipala <adam@chlipala.net> | 2015-03-05 14:50:31 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2015-03-05 14:50:31 -0500 |
commit | fbbec2e6b041b89827bafaf1f2f82f42ab8ea508 (patch) | |
tree | e38dcdff1ea688721c9e94916034ca4b025e54ae /src/urweb.lex | |
parent | 4906733e1c12fd167a4236c63201a8f4e6daad63 (diff) |
Some new infix operators, contributed by Gabriel Riba
Diffstat (limited to 'src/urweb.lex')
-rw-r--r-- | src/urweb.lex | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/urweb.lex b/src/urweb.lex index 195fd735..716c44ba 100644 --- a/src/urweb.lex +++ b/src/urweb.lex @@ -376,6 +376,15 @@ xint = x[0-9a-fA-F][0-9a-fA-F]; <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)); |