| Anonymous | Login | Signup for a new account | 2013-05-23 06:26 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 | |||
| 0002954 | OCaml | OCaml general | public | 2004-07-16 20:33 | 2010-04-29 14:26 | |||
| Reporter | administrator | |||||||
| Assigned To | ertai | |||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | ||||||||
| Target Version | Fixed in Version | 3.10.0 | ||||||
| Summary | 0002954: pos_lnum and pos_bol are worngs on exceptions from Grammar.Entry.parse | |||||||
| Description | Full_Name: Aleksey Nogin Version: OS: Submission from: charter-242-009.caltech.edu (131.215.242.9) I have a file that is being preprocessed by camlp4 with EXTEND'ed grammar. At some point (after the file is fully read), the code needs to parse a string (some of the quotations need to be parsed after the file is read in full), so it does Grammar.Entry.parse foo (Stream.of_string s) If parsing fails and Grammar.Entry.parse ends up raising Stream.Error wrapped in Stdpp.Exc_ocated, the loc in the exception will have a correct pos_cnum (relative position in the string s being parsed), but the pos_lnum and pos_bol seem to be inherited from the file that was originally parsed (in this case they point at the end of file). P.S. In addition to fixing Grammar.Entry.parse to start "counting" everything from 0, it would be nice to also have a version of Grammar.Entry.parse that would take an extra Lexing.position argument (representing the "offset" to start counting at). This would make it unnecessary to catch Stdpp.Exc_located fro it, re-raising them with a different (adjusted) loc. Thank you! | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0003005) administrator (administrator) 2005-01-04 16:10 |
see also PR#3407 Assigned to MM. |
|
(0004393) ertai (developer) 2007-12-17 15:12 |
This has been fixed during the upgrade of camlp4. Parsing functions now takes an extra location argument that represent the starting location. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2005-11-18 10:14 | administrator | New Issue | |
| 2005-12-15 15:34 | doligez | Relationship added | parent of 0003407 |
| 2007-12-12 16:24 | doligez | Summary | pos_lnum and pos_bol are worngs on exceptons from Grammar.Entry.parse => pos_lnum and pos_bol are worngs on exceptions from Grammar.Entry.parse |
| 2007-12-12 16:24 | doligez | Description Updated | |
| 2007-12-17 15:12 | ertai | Note Added: 0004393 | |
| 2007-12-17 15:12 | ertai | Assigned To | => ertai |
| 2007-12-17 15:12 | ertai | Status | acknowledged => resolved |
| 2007-12-17 15:12 | ertai | Resolution | open => fixed |
| 2007-12-17 15:12 | ertai | Fixed in Version | => 3.10.0 |
| 2010-04-29 14:26 | xleroy | Status | resolved => closed |
| Copyright © 2000 - 2011 MantisBT Group |