Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004706OCamlCamlp4public2009-01-31 02:072012-09-25 20:06
ReporterMartin Jambon 
Assigned Toertai 
PrioritynormalSeveritytrivialReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.11.0 
Target VersionFixed in Version3.12.0 
Summary0004706: No trailing semicolon allowed in list and array patterns
DescriptionTrailing semicolons e.g. [ 1; ] in patterns for arrays and lists are not allowed by camlp4o.

The reference manual does not mention that it should be legal, but the compilers tolerate them everywhere (patterns and expressions), so it seems natural to allow them in the camlp4o parser as well.

(*
  This is foo.ml

  camlp4o -parser pa_foo.cmo -printer o foo.ml
  ocamlc -c -pp 'camlp4o -parser pa_foo.cmo' foo.ml
*)

match [| |] with
    [| 1; |] -> ()
  | _ -> ()

(**************************************)

$ camlp4o -printer o foo.ml
File "foo.ml", line 9, characters 8-9:
Parse error: [sem_patt] expected after ";" (in [sem_patt])
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2009-01-31 02:07 Martin Jambon New Issue
2009-03-28 17:18 xleroy Status new => assigned
2009-03-28 17:18 xleroy Assigned To => ertai
2011-02-15 12:11 xclerc Status assigned => resolved
2011-02-15 12:11 xclerc Fixed in Version => 3.12.0
2011-02-15 12:11 xclerc Resolution open => fixed
2012-09-25 20:06 xleroy Status resolved => closed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker