You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 4706 Reporter:@mjambon Assigned to: ertai Status: closed (set by @xavierleroy on 2012-09-25T18:06:17Z) Resolution: fixed Priority: normal Severity: trivial Version: 3.11.0 Fixed in version: 3.12.0 Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues Monitored by: tmeyer
Bug description
Trailing 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.
Original bug ID: 4706
Reporter: @mjambon
Assigned to: ertai
Status: closed (set by @xavierleroy on 2012-09-25T18:06:17Z)
Resolution: fixed
Priority: normal
Severity: trivial
Version: 3.11.0
Fixed in version: 3.12.0
Category: -for Camlp4 use https://github.com/ocaml/camlp4/issues
Monitored by: tmeyer
Bug description
Trailing 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])
The text was updated successfully, but these errors were encountered: