Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005882OCamlOCaml documentationpublic2013-01-10 07:062013-01-10 08:08
Reporternorm 
Assigned Togarrigue 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionwon't fix 
PlatformMacOSOS XOS Version10.4.7
Product Version 
Target VersionFixed in Version 
Summary0005882: Too permissive BNF
DescriptionThe BNF produces "type s = [int]" which is probably a mistake.
See http://cap-lore.com/Languages/ocaml/bugs/a.html [^]
for the complete production tree.
Steps To Reproduce        OCaml version 4.00.1

# type s = [int];;
Error: Syntax error
#
TagsNo tags attached.
Attached Files

- Relationships
duplicate of 0003835closed Camlp4 accepts illegal (?) code 

-  Notes
(0008732)
garrigue (manager)
2013-01-10 08:08

As explained in PR#3835, this is actually valid for the specification, but not accepted due to a limitation of LR(1) parsing.
The workaround is to write
  type s = [ | int ]
(which will of course fail in this case since int is not a polymorphic variant type).

There is no incentive to fix this bug, as the above definition is not useful anyway.

- Issue History
Date Modified Username Field Change
2013-01-10 07:06 norm New Issue
2013-01-10 08:03 garrigue Relationship added duplicate of 0003835
2013-01-10 08:08 garrigue Note Added: 0008732
2013-01-10 08:08 garrigue Status new => closed
2013-01-10 08:08 garrigue Assigned To => garrigue
2013-01-10 08:08 garrigue Resolution open => won't fix


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker