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

camlp4.macro fails to undefine a macro with an expression #5896

Closed
vicuna opened this issue Jan 19, 2013 · 2 comments
Closed

camlp4.macro fails to undefine a macro with an expression #5896

vicuna opened this issue Jan 19, 2013 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Jan 19, 2013

Original bug ID: 5896
Reporter: jm
Status: closed (set by @damiendoligez on 2015-01-13T18:38:47Z)
Resolution: suspended
Priority: normal
Severity: minor
Target version: undecided
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Monitored by: meyer

Bug description

% cat t.ml
DEFINE A = B
UNDEF A
% ocamlfind ocamlc -syntax camlp4o -package camlp4.macro t.ml
File "t.ml", line 2, characters 7-8:
Camlp4: Uncaught exception: Delete.Rule_not_found [...]

@vicuna
Copy link
Author

vicuna commented Jan 19, 2013

Comment author: @bobzhang

This is due to the fact that when you insert a grammar dynamically

EXTEND Gram
expr: LEVEL "simple"
[ [ UIDENT $x$ -> (new reloc _loc)#expr e ]]
;

its internal representation is normalized as 'UIDENT $x'

@vicuna
Copy link
Author

vicuna commented Jan 13, 2015

Comment author: @damiendoligez

Transferred to camlp4/camlp4#79

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