Allow operators to use '\'

Fix #246
This commit is contained in:
Trevor Elliott 2015-06-21 01:53:52 +01:00
parent efc4443707
commit 5ff6005bed
4 changed files with 10 additions and 1 deletions

View File

@ -31,7 +31,7 @@ $unitick = \x7
@id_next = [a-zA-Z0-9_'] | $unilower | $uniupper | $unidigit | $unitick
@id = @id_first @id_next*
@op = ([\!\@\#\$\%\^\&\*\~\>\<\?\+\=\|\/] | $unisymbol)+
@op = ([\!\@\#\$\%\^\&\*\~\>\<\?\+\=\|\/\\] | $unisymbol)+
@qual = (@id $white* :: $white*)+
@qual_id = @qual @id

3
tests/parser/infix-3.cry Normal file
View File

@ -0,0 +1,3 @@
(/\) : Bool -> Bool -> Bool
p /\ q = p && q

View File

@ -0,0 +1,2 @@
:l infix-3.cry
:t (/\)

View File

@ -0,0 +1,4 @@
Loading module Cryptol
Loading module Cryptol
Loading module Main
(/\) : Bool -> Bool -> Bool