tock-mirror/testcases/ambiguity-output.occ
Adam Sampson feefcfd017 Resolve the c ! x ambiguity outside the parser.
Unfortunately there appears to be exactly one place you can do this, and it
turns out to be inside inferTypes (because you need to know the type of c
completely, and you can't type-infer x until you know if it's a tag or a
variable). It's definitely nicer than doing it in the parser, though.

I've also started adding "-- AMBIGUITY" comments in the parser.
2008-04-06 17:47:41 +00:00

13 lines
107 B
Plaintext

PROTOCOL FOO
CASE
x
:
PROC P ()
INT x:
SEQ
CHAN INT c:
c ! x
CHAN FOO c:
c ! x
: