|Anonymous | Login | Signup for a new account||2016-09-27 00:30 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005598||OCaml||OCaml general||public||2012-04-22 03:39||2015-12-11 19:25|
|Target Version||Fixed in Version||4.00.0+dev|
|Summary||0005598: Incompatibility between ocamllex and compiler|
|Description||It seems ocamllex and the compiler once shared the same parsing code for OCaml-strings, but have since slightly diverged even though the manual states that they both use the same syntax.|
lexer.mll for ocamllex defines "backslash_escapes" that are different from the inline pattern used in lexer.mll (rule "string") for the compiler: the latter adds a space character. Furthermore, ocamllex uses '\010' as a pattern for newlines where the compiler uses "newline", which also supports '\013' and DOS-newlines and has hence a different rule body.
ocamllex apparently has some catching up to do...
|Tags||No tags attached.|
For backslash-space, I've fixed ocamllex (commit 12418 in 4.00, commit 12419 in trunk).
For newlines, ocamllex supports both Unix and DOS because it ignores \013 and takes \010 as the newline character.
The \013-as-newline support in the compiler is a leftover from the last century (support for Mac OS 9), which will be removed from the compiler after the 4.00 release (commit 12420 in trunk).
edited on: 2012-05-02 17:10
It seems that the fix for this problem accidentally removed DOS-style newlines ("\013\010") rather than the Mac OS 9 "\013" from the definition of "newline" in parsing/lexer.mll. I guess this would lead to double counting of lines on Windows.
Update: "\013" may then probably need to be added to the definition of "blank" instead?
Oops, thanks for catching this. Fixed (commit 12424 in trunk).
I don't think we want to add \013 to the definition of blank. I don't see any point in allowing it in source files.
|I've changed my mind. Now I think the perfect solution would be to utterly ignore all occurrences of \013 everywhere in the source file (even within identifiers or string literals). But that would be too much work for such a small problem.|
Following the fix of 0006165, I have brought ocamllex in line with ocamlc/ocamlopt (commit 14406 in trunk).
|2012-04-22 03:39||mottl||New Issue|
|2012-05-02 16:41||doligez||Assigned To||=> doligez|
|2012-05-02 16:41||doligez||Status||new => assigned|
|2012-05-02 16:45||doligez||Note Added: 0007399|
|2012-05-02 16:45||doligez||Status||assigned => closed|
|2012-05-02 16:45||doligez||Resolution||open => fixed|
|2012-05-02 16:45||doligez||Fixed in Version||=> 4.00.0+dev|
|2012-05-02 17:07||mottl||Note Added: 0007401|
|2012-05-02 17:07||mottl||Status||closed => feedback|
|2012-05-02 17:07||mottl||Resolution||fixed => reopened|
|2012-05-02 17:10||mottl||Note Edited: 0007401||View Revisions|
|2012-05-03 13:52||doligez||Note Added: 0007407|
|2012-05-03 13:52||doligez||Status||feedback => resolved|
|2012-05-03 13:52||doligez||Resolution||reopened => fixed|
|2013-09-08 10:53||gasche||Relationship added||related to 0006165|
|2014-01-22 14:24||doligez||Note Added: 0010828|
|2014-01-22 14:33||doligez||Note Added: 0010829|
|2015-12-11 19:25||xleroy||Status||resolved => closed|
|Copyright © 2000 - 2011 MantisBT Group|