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: 3787 Reporter: administrator Status: closed (set by @diml on 2016-12-07T17:25:11Z) Resolution: suspended Priority: normal Severity: minor Target version: 4.00.1+dev Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
The camlp4 API permits, via "Grammar.extend" to create empty precedence level.
This is usefule since you can assign names to them and make assumptions on their
relative order in future extensions of the grammar.
If an empty level gets extended with a rule, the obtained level then contains
only one rule. When that rule is removed using "Gramext.delete_rule" the entire
precedence level is removed, making further extension of it failing with
something like:
No level labelled "10N" in entry "term"
Fatal error: exception Failure("Grammar.extend")
A work-around is to never have empty precedence level, always filling them with
a production on dummy tokens which are never generated by the lexer, ... but is
really a ugly hack.
TIA,
Cheers.
The text was updated successfully, but these errors were encountered:
Original bug ID: 3787
Reporter: administrator
Status: closed (set by @diml on 2016-12-07T17:25:11Z)
Resolution: suspended
Priority: normal
Severity: minor
Target version: 4.00.1+dev
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Bug description
Full_Name: Stefano Zacchiroli
Version: 3.08.3
OS: GNU/Linux
Submission from: tsunami.mowgli.cs.unibo.it (130.136.129.199)
The camlp4 API permits, via "Grammar.extend" to create empty precedence level.
This is usefule since you can assign names to them and make assumptions on their
relative order in future extensions of the grammar.
If an empty level gets extended with a rule, the obtained level then contains
only one rule. When that rule is removed using "Gramext.delete_rule" the entire
precedence level is removed, making further extension of it failing with
something like:
No level labelled "10N" in entry "term"
Fatal error: exception Failure("Grammar.extend")
A work-around is to never have empty precedence level, always filling them with
a production on dummy tokens which are never generated by the lexer, ... but is
really a ugly hack.
TIA,
Cheers.
The text was updated successfully, but these errors were encountered: