[:
'' and ``:]
'' instead of ``[<
'' and
``>]
''.Ocaml | Revised |
---|---|
[< '1; '2; s; '3 >] | [: `1; `2; s; `3 :] |
[
'' and
``]
'', like for ``fun
'', ``match
'' and
``try
''. If there is one case, the brackets are not mandatory:
Ocaml | Revised |
---|---|
parser | parser |
[< 'Foo >] -> e | [ [: `Foo :] -> e |
| [< p = f >] -> f | | [: p = f :] -> f ] |
parser [< 'x >] -> x | parser [ [: `x :] -> x ] |
parser [< 'x >] -> x | parser [: `x :] -> x |
Stream.
Failure
''
whichever parameter is applied, and the empty stream matching always
raising ``Stream.
Failure
'':
parser [] match e with parser []