Home My Page Projects Code Snippets Project Openings SML/NJ Bugs
Summary Activity Tracker Lists

[#153] Enabling Successor ML features is delayed

Date:
2016-04-02 19:12
Priority:
3
State:
Closed
Submitted by:
Bug Submitter (webuser)
Assigned to:
John Reppy (jhr)
Machine Architecture:
None
Operating System:
Generic Unix
Component:
Compiler
Resolution:
Fixed
Severity:
Minor
OS Version:
SML/NJ Version:
110.79
Keywords:
successor-ml
URL:
Transcript (of reproduction):
Standard ML of New Jersey v110.79 [built: Sun Oct 4 14:45:06 2015] - Control.succML := true; val it = () : unit - val w = 0wb100; val w = 0wx4 : word - val x = 0b100; stdIn:2.10-2.14 Error: unbound variable or constructor: b100 stdIn:2.5-2.14 Error: operator is not a function [overload conflict] operator: [int ty] in expression: 0 <errorvar>
Source (for reproduction):
Control.succML := true; val w = 0wb100; (* works *) val x = 0b100;
Summary:
Enabling Successor ML features is delayed

Detailed description
The compiler does not recognize the "0b0110" syntax for integer
literals when in Successor ML mode. Binary word literals do
work as expected.
Submitted via web form by John Reppy <jhr@cs.uchicago.edu>

Comments:

Message  ↓
Date: 2016-09-13 01:24
Sender: John Reppy

Fixed for 110.81. We now use a function Control.setSuccML to switch to/from Successor ML mode in the REPL. The function resets the parser, so the next input will be correctly parsed.

Date: 2016-08-09 19:31
Sender: John Reppy

Changed summary of bug to reflect its true nature (was "Integer binary literals do not scan correctly")

Date: 2016-04-02 20:46
Sender: John Reppy

It turns out that the problem is not in scanning, but in switching from SML'97 mode to SuccessorML mode.

Attached Files:

Changes

Field Old Value Date By
status_idOpen2016-09-13 01:24jhr
close_dateNone2016-09-13 01:24jhr
ResolutionAccepted As Bug2016-09-13 01:24jhr
summaryInteger binary literals do not scan correctly2016-08-09 19:31jhr
summaryInteger binary literals to no scan correctly2016-04-07 13:08jhr
assigned_tonone2016-04-02 20:46jhr
detailsThe compiler does not recognize the "0b0110" syntax for integer literals when in Successor ML mode. Binary word literals do work as expected. Submitted via web form by John Reppy <jhr@cs.uchicago.edu> 2016-04-02 20:46jhr
ResolutionNone2016-04-02 20:46jhr
Transcript (of reproduction)Standard ML of New Jersey v110.79 [built: Sun Oct 4 14:45:06 2015] - Control.succML := true; val it = () : unit - val w = 0wb100; val w = 0wx4 : word - val x = 0b100; stdIn:2.10-2.14 Error: unbound variable or constructor: b100 stdIn:2.5-2.14 Error: operator is not a function [overload conflict] operator: [int ty] in expression: 0 <errorvar> 2016-04-02 20:46jhr
Source (for reproduction)Control.succML := true; val w = 0wb100; (* works *) val x = 0b100;2016-04-02 20:46jhr