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

[#129] Symbolic identifiers are allowed as strids

Date:
2014-11-14 16:50
Priority:
3
State:
Closed
Submitted by:
Bug Submitter (webuser)
Assigned to:
David MacQueen (dbm)
Machine Architecture:
None
Operating System:
Generic Unix
Component:
Compiler
Resolution:
Fixed
Severity:
Minor
OS Version:
any
SML/NJ Version:
110.77
Keywords:
syntax
URL:
Transcript (of reproduction):
jhr@valhalla sml Standard ML of New Jersey v110.77 [built: Sat Aug 23 09:49:47 2014] - structure ## = struct end; structure ## : sig end
Source (for reproduction):
structure ## = struct end
Summary:
Symbolic identifiers are allowed as strids

Detailed description
The definition states that stride must be alphanumeric, but
SML/NJ allows symbolic IDs as structure names too.
Additional comments:
Although the definition does not say so, I would think
that this restriction should apply to signature IDs too.

Submitted via web form by John Reppy jhr@cs.uchicago.edu

Comments:

Message  ↓
Date: 2017-05-03 00:41
Sender: David MacQueen

First a comment about the Defn: StrIds (structure identifiers) are specified to be alphanumeric in Sec 2.4 (p. 5). Functor and signature identifiers are specified as alphanumeric in Sec 3.2 (p 11).

The fix (contained in release 110.81, version 4330) involves splitting the ID token class into IDA (alphanumeric) and IDS (symbolic). Then in the grammar (Parse/parse/{ml.grm, sml.grm}) IDA is used in the rules for structure, functor, and signature bindings. Also, a nonterminal idtyc = IDA | IDS is introduced for tycon identifiers (a more precise category than id, since it excludes asterisk). This fix is in the lexical and grammar spec, so violations result in syntax errors during parsing, which are not very self-explanatory.

Attached Files:

Changes

Field Old Value Date By
status_idOpen2017-04-28 19:45jhr
close_dateNone2017-04-28 19:45jhr
detailsThe definition states that stride must be alphanumeric, but SML/NJ allows symbolic IDs as structure names too. Additional comments: Although the definition does not say so, I would think that this restriction should apply to signature IDs too. Submitted via web form by John Reppy jhr@cs.uchicago.edu 2017-04-28 19:45jhr
ResolutionNone2017-04-28 19:45jhr
assigned_tonone2014-11-25 21:39jhr