| Anonymous | Login | Signup for a new account | 2013-05-20 11:34 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0005116 | OCaml | Camlp4 | public | 2010-07-28 14:52 | 2012-09-19 13:48 | ||||||
| Reporter | ygrek | ||||||||||
| Assigned To | xclerc | ||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||||
| Status | assigned | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | 3.11.2 | ||||||||||
| Target Version | 4.01.0+dev | Fixed in Version | |||||||||
| Summary | 0005116: camlp4 relaxes syntax for records update : { expr with ... } | ||||||||||
| Description | Camlp4 accepts syntax which is rejected by ocamlc (requires parentheses around `Gc.get ()` ) : $ cat a.ml let _ = { Gc.get () with Gc.minor_heap_size = 2 * 1024 * 1024 } $ ocamlc -pp camlp4o -c a.ml $ ocamlc -c a.ml File "a.ml", line 1, characters 17-18: Error: Syntax error | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Notes |
|
|
(0005626) garrigue (manager) 2010-07-28 15:18 |
Since the syntax provided by camlp4o is already an extension of ocaml, I don't see any real problem here. By the way, the need for parentheses in ocaml is only a consequence of the limitations of LALR parsing. |
|
(0005627) ertai (developer) 2010-07-28 19:09 |
Camlp4 usual parsing technique is LL(something) and so cannot parse this either. However their is a backtracking hack in Camlp4 to make it work. Maybe we will switch to allowing only simple expressions here. |
|
(0005628) ygrek (reporter) 2010-07-29 08:31 |
I just expected camp4o to abide by the ocamlc syntax rules for regular ocaml code (without stream parsers or loaded extensions), otherwise it makes some minor surprises when moving code between files (which are not all processed by camlp4o). |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2010-07-28 14:52 | ygrek | New Issue | |
| 2010-07-28 14:52 | ygrek | Status | new => assigned |
| 2010-07-28 14:52 | ygrek | Assigned To | => ertai |
| 2010-07-28 15:18 | garrigue | Note Added: 0005626 | |
| 2010-07-28 19:09 | ertai | Note Added: 0005627 | |
| 2010-07-29 08:31 | ygrek | Note Added: 0005628 | |
| 2011-10-26 08:40 | ertai | Assigned To | ertai => xclerc |
| 2012-07-10 20:00 | doligez | Target Version | => 4.01.0+dev |
| 2012-07-31 13:36 | doligez | Target Version | 4.01.0+dev => 4.00.1+dev |
| 2012-09-19 13:48 | doligez | Target Version | 4.00.1+dev => 4.01.0+dev |
| Copyright © 2000 - 2011 MantisBT Group |