Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003835OCamlOCaml generalpublic2005-11-04 14:382013-01-10 08:03
Reporteradministrator 
Assigned To 
PrioritylowSeveritytweakReproducibilityalways
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0003835: Camlp4 accepts illegal (?) code
DescriptionHi,

the following code snippet is accepted by camlp4 but produces a syntax
error with the parser used by OCaml:

----------
type t = [ `T ]
type u = [ t ]
----------

Maybe I'm wrong, but the above code, though inelegant, does not seem
unacceptable to me.

Best regards,
Markus

--
Markus Mottl http://www.ocaml.info [^] markus.mottl@gmail.com

TagsNo tags attached.
Attached Files

- Relationships
has duplicate 0005882closedgarrigue Too permissive BNF 
related to 0003957acknowledged [> {typexpr} as 't ] yields a syntax error with yacc syntax 

-  Notes
(0003054)
administrator (administrator)
2005-11-05 09:34

Camlp4 conforms to the spec here. - MM
(0003521)
doligez (administrator)
2006-01-24 14:50

This is a bug in the yacc parser, due to limitations of LR(1) parsing.
I can't find an easy fix, and I don't think it's worth the trouble.

Workaround: don't omit the optional vertical bar:

type u = [ | t ];;

- Issue History
Date Modified Username Field Change
2005-11-18 10:14 administrator New Issue
2006-01-23 18:57 mauny Relationship added related to 0003957
2006-01-24 14:50 doligez Note Added: 0003521
2006-01-24 14:50 doligez Priority normal => low
2006-01-24 14:50 doligez Severity minor => tweak
2006-01-24 14:50 doligez Status acknowledged => closed
2006-01-24 14:50 doligez Resolution open => won't fix
2006-01-24 14:50 doligez Description Updated
2013-01-10 08:03 garrigue Relationship added has duplicate 0005882


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker