You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5298 Reporter: Feanor Status: closed (set by @xclerc on 2011-07-26T14:04:05Z) Resolution: not a bug Priority: normal Severity: major Version: 3.12.0 Category: ~DO NOT USE (was: OCaml general) Duplicate of:#5211
Original bug ID: 5298
Reporter: Feanor
Status: closed (set by @xclerc on 2011-07-26T14:04:05Z)
Resolution: not a bug
Priority: normal
Severity: major
Version: 3.12.0
Category: ~DO NOT USE (was: OCaml general)
Duplicate of: #5211
Bug description
When I use the standard example from the Genlex module of the O'Caml
manual, it results in syntax errors. This is so also on the manual page:
http://caml.inria.fr/pub/docs/manual-ocaml/manual003.html
#let rec parse_expr = parser
[< e1 = parse_mult; e = parse_more_adds e1 >] -> e
and parse_more_adds e1 = parser
[< ’Kwd "+"; e2 = parse_mult; e = parse_more_adds (Sum(e1, e2)) >] -> e
| [< ’Kwd "-"; e2 = parse_mult; e = parse_more_adds (Diff(e1, e2)) >] -> e
| [< >] -> e1
and parse_mult = parser
[< e1 = parse_simple; e = parse_more_mults e1 >] -> e
and parse_more_mults e1 = parser
[< ’Kwd "*"; e2 = parse_simple; e = parse_more_mults (Prod(e1, e2)) >] -> e
| [< ’Kwd "/"; e2 = parse_simple; e = parse_more_mults (Quot(e1, e2)) >] -> e
| [< >] -> e1
and parse_simple = parser
[< ’Ident s >] -> Var s
| [< ’Int i >] -> Const(float i)
| [< ’Float f >] -> Const f
| [< ’Kwd "("; e = parse_expr; ’Kwd ")" >] -> e;;
Error: Syntax error
The text was updated successfully, but these errors were encountered: