Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003787OCaml-for Camlp4 use 11:262016-12-07 18:25
Assigned To 
PlatformOSOS Version
Product Version 
Target Version4.00.1+devFixed in Version 
Summary0003787: camlp4 removes empty precedence levels on delete_rule
DescriptionFull_Name: Stefano Zacchiroli
Version: 3.08.3
OS: GNU/Linux
Submission from: (

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.


TagsNo tags attached.
Attached Files

- Relationships

-  Notes
doligez (administrator)
2012-09-11 10:27

This is about the old camlp4, which now lives as camlp5, and is not part of the core OCaml distribution.

- Issue History
Date Modified Username Field Change
2005-11-18 10:14 administrator New Issue
2008-10-05 19:06 ertai Category OCaml general => Camlp4
2008-10-05 19:06 ertai Description Updated
2012-07-11 17:03 doligez Target Version => 4.01.0+dev
2012-07-11 17:03 doligez Note Deleted: 0003040
2012-07-31 13:37 doligez Target Version 4.01.0+dev => 4.00.1+dev
2012-09-11 10:27 doligez Note Added: 0008059
2012-09-11 10:27 doligez Status acknowledged => resolved
2012-09-11 10:27 doligez Resolution open => suspended
2016-02-08 12:49 doligez Category Camlp4 => for Camlp4 use [^]
2016-02-08 12:50 doligez Category for Camlp4 use [^] => for Camlp4 use [^]
2016-12-07 18:25 dim Status resolved => closed
2017-02-23 16:43 doligez Category for Camlp4 use [^] => -for Camlp4 use [^]

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker