|Anonymous | Login | Signup for a new account||2013-05-20 02:40 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||2012-05-07 15:33|
|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.
|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|
|Copyright © 2000 - 2011 MantisBT Group|