Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Genlex seems to be not working in v3.12 #5298

Closed
vicuna opened this issue Jun 22, 2011 · 1 comment
Closed

Genlex seems to be not working in v3.12 #5298

vicuna opened this issue Jun 22, 2011 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Jun 22, 2011

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

@vicuna
Copy link
Author

vicuna commented Jun 22, 2011

Comment author: Feanor

Ok, I found that I have to pre-processor with -camlp4. Sry, please close the ticket feel ashamed ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant