Type | Issue | Status | problem | Date | 4-Nov-2009 20:30 |
---|---|---|---|---|---|
Version | alpha 94 | Category | Syntax | Submitted by | meijeru |
Platform | All | Severity | minor | Priority | normal |
Summary | ] is not allowed as first character in tag, [ and ( ) are |
---|---|
Description | This seems somewhat arbitrary. All four signs are allowed in subsequent positions in tag literals. |
Example code |
>> type? <[> == tag! >> type? <]> ** Syntax error: missing "[" at "end-of-block" >> type? <a]> == tag! >> type? <(> == tag! >> type? <)> == tag! |
Assigned to | n/a | Fixed in | - | Last Update | 30-Mar-2015 00:49 |
---|
Comments | |
---|---|
(0003221)
BrianH 19-Feb-2012 17:45 |
Here is how it was in R2:
>> [>] == [>] >> [<] ** Syntax Error: Invalid tag -- < ** Near: (line 1) [<] You couldn't even avoid it by putting spaces around the < because this would inevitably happen: >> mold [ < ] == "[<]" ; Note that MOLD generates the non-loadable syntax. This was bad, so we changed it to this syntax interpretation in R3: >> [>] == [>] >> [<] == [<] If you allow ] as the first character in a tag, you disallow the word < as the last word in a block. [<] is useful in some code-generation code and some dialects, while <]> doesn't seem to be commonly used at all, so it's a good tradeoff. |
(0004617)
MarkI 30-Mar-2015 00:49 |
I'd love to hear the reasoning behind why this was not also changed at the same time:
>> [ ( < ) ] == [(<)] >> [(<)] ** Syntax error: invalid "tag" -- "<" ** Near: (line 1) [(<)] Seems MOLD still generates non-loadable syntax in this very similar case. |
Date | User | Field | Action | Change |
---|---|---|---|---|
30-Mar-2015 00:49 | MarkI | Comment : 0004617 | Added | - |
19-Feb-2012 17:52 | BrianH | Status | Modified | reviewed => problem |
19-Feb-2012 17:51 | BrianH | Comment : 0003221 | Modified | - |
19-Feb-2012 17:45 | BrianH | Comment : 0003221 | Added | - |
24-Nov-2009 04:39 | carl | Status | Modified | submitted => reviewed |
4-Nov-2009 20:45 | meijeru | Version | Modified | alpha 95 => alpha 94 |
4-Nov-2009 20:30 | meijeru | Summary | Modified | ] is not allowed as first character of in tag, [ and ( ) are => ] is not allowed as first character in tag, [ and ( ) are |
4-Nov-2009 20:30 | meijeru | Code | Modified | - |
4-Nov-2009 20:30 | meijeru | Ticket | Added | - |