ModelDriven / Alf-Reference-Implementation

Open-source implementation of the Action Language for fUML (Alf) specification.
30 stars 2 forks source link

Non-printable characters in unrestricted names and String literals #90

Closed seidewitz closed 5 years ago

seidewitz commented 5 years ago

The Alf 1.1 specification states that, for an unrestricted name, "The characters within the single quotes may not include non-printable characters (including backspace, tab and newline). However, these characters may be included as part of the name itself through use of an escape sequence." (subclause 7.6). String literals do not have a similar statement, but a general reference is made back to 7.6: "The string value of the element is given as a sequence of characters, with escape characters resolving to their meaning as given in 7.6, surrounded by double quote characters (which are not included as part of the string value)."

The lexical grammar in the specification for unrestricted names and string literals is not consistent with this, allowing non-printable characters in unrestricted names and string literals. The Reference Implementation currently follows the lexical grammar. However, the intent seems to be that non-printable characters not be allowed, and this would help in the scoping of lexical errors resulting from a missing single or double quote.

seidewitz commented 5 years ago

Fixed in v1.1.0h.