Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004938OCamlCamlp4public2009-12-14 06:182012-03-24 15:01
Reporterfuruse 
Assigned Toertai 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.11.1 
Target VersionFixed in Version 
Summary0004938: CamlP4 does not like a pattern like [p;]
DescriptionThe following OCaml-valid pattern is rejected by CamlP4:

let f [ 0; ] = 0

The following patch should fix the problem, though it has a dup code:

--- a/camlp4/Camlp4Parsers/Camlp4OCamlRevisedParser.ml
+++ b/camlp4/Camlp4Parsers/Camlp4OCamlRevisedParser.ml
@@ -904,6 +904,7 @@
     ;
     sem_patt_for_list:
       [ [ p = patt; ";"; pl = SELF -> fun acc -> <:patt< [ $p$ :: $pl acc$ ] >>
+ | p = patt; ";" -> fun acc -> <:patt< [ $p$ :: $acc$ ] >>
         | p = patt -> fun acc -> <:patt< [ $p$ :: $acc$ ] >>
       ] ]
     ;
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0005241)
Gabriel (reporter)
2010-02-10 10:54

There's the same problem with arrays:

camlp4o -str 'let [| x; |] = [| 5; |]'
(0005557)
ertai (developer)
2010-06-16 11:38

Fixed. Thanks for the report.

- Issue History
Date Modified Username Field Change
2009-12-14 06:18 furuse New Issue
2009-12-14 06:18 furuse Status new => assigned
2009-12-14 06:18 furuse Assigned To => ertai
2010-02-10 10:54 Gabriel Note Added: 0005241
2010-06-16 11:38 ertai Note Added: 0005557
2010-06-16 11:38 ertai Status assigned => resolved
2010-06-16 11:38 ertai Resolution open => fixed
2012-03-24 15:01 xleroy Status resolved => closed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker