| Anonymous | Login | Signup for a new account | 2013-05-25 20:20 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 | |||||||
| 0005387 | OCaml | Camlp4 | public | 2011-10-26 02:40 | 2012-01-05 10:47 | |||||||
| Reporter | furuse | |||||||||||
| Assigned To | dim | |||||||||||
| Priority | normal | Severity | tweak | Reproducibility | always | |||||||
| Status | resolved | Resolution | fixed | |||||||||
| Platform | OS | OS Version | ||||||||||
| Product Version | 3.12.1 | |||||||||||
| Target Version | Fixed in Version | 3.12.1+dev | ||||||||||
| Summary | 0005387: str_item and other syntactic elements with Nils are not very usable | |||||||||||
| Description | <:str_item< let x = 1 >> currently represents the following data structure: Ast.StSem (_loc, (Ast.StVal (_loc, Ast.ReNil, (Ast.BiEq (_loc, (Ast.PaId (_loc, (Ast.IdLid (_loc, "x")))), (Ast.ExInt (_loc, "1")))))), (Ast.StNil _loc)) The phrase is not parsed as one str_item but a list of str_items. This makes it impossible to use <:str_item< .. >> as a constructor/pattern for one single str_item. I do not know what is the best solution, but Jake Donham has seen the same issue and written a nice blog entry. It contains a workaround: http://ambassadortothecomputers.blogspot.com/2010/03/reading-camlp4-part-5-filters.html [^] | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
Notes |
|
|
(0006184) furuse (reporter) 2011-10-26 03:41 |
Some more info. For example, the following pattern function | <:str_item< module $modname$ = struct $sitems$ end >> -> ... never matches with code like: module M = struct ... end Since the former is StSem(.., StNil ..) but the latter lacks StNil. |
|
(0006594) dim (developer) 2012-01-05 10:47 |
Fixed for str_item, sig_item, class_str_item and class_sig_item. Now Ast.*Nil is not added when the quotation contains only one item. Commits 11985, 11986, 11987 and 11988. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-10-26 02:40 | furuse | New Issue | |
| 2011-10-26 02:40 | furuse | Status | new => assigned |
| 2011-10-26 02:40 | furuse | Assigned To | => ertai |
| 2011-10-26 03:41 | furuse | Note Added: 0006184 | |
| 2011-10-26 08:41 | ertai | Assigned To | ertai => xclerc |
| 2012-01-05 10:47 | dim | Note Added: 0006594 | |
| 2012-01-05 10:47 | dim | Assigned To | xclerc => dim |
| 2012-01-05 10:47 | dim | Status | assigned => resolved |
| 2012-01-05 10:47 | dim | Resolution | open => fixed |
| 2012-01-05 10:47 | dim | Fixed in Version | => 3.12.1+dev |
| Copyright © 2000 - 2011 MantisBT Group |