Type | Issue | Status | built | Date | 17-Feb-2011 07:57 |
---|---|---|---|---|---|
Version | alpha 110 | Category | Syntax | Submitted by | BrianH |
Platform | All | Severity | minor | Priority | normal |
Summary | Words starting with +, - or . won't load in refinement form |
---|---|
Description |
The syntax of refinements has a conflict with that of numbers. If you have a word that begins with +, - or . then adding a preceding / makes it treat the +, - or . as a delimiter, as it it were the start of a number instead of a word. The syntax processor would need to look ahead another character to determine one way or the other. This might be the result of the order of the syntax recognition rules. It is also possible that this is unavoidable, that the syntax rules can't be rearranged. This needs fixing or documenting. |
Example code |
>> load "/+" == [/ +] ; /+ would be expected >> load "/-" == [/ -] ; /- would be expected >> load "/." == [/ .] ; /. would be expected |
Assigned to | n/a | Fixed in | alpha 112 | Last Update | 28-Mar-2011 20:38 |
---|
Comments | |
---|---|
(0003113)
BrianH 17-Feb-2011 10:01 |
This is split off of part of #980. The rest was added to #1478. |
(0003151)
Carl 21-Mar-2011 02:33 |
Ok, it's allowed now in A112, but still needs some documenting because these are all refinements, never numbers (similar to #+123 for issues.)
>> type? /+ == refinement! >> type? /+123 == refinement! >> type? /.123 == refinement! |
(0003153)
BrianH 28-Mar-2011 20:38 |
That seems to be getting into the "The syntax processor would need to look ahead another character to determine one way or the other." range, since this was part of an attempt to make the refinement syntax more closely match the corresponding word syntax. +123 doesn't correspond to a word, so it seems a little weird to have /+123 correspond to a refinement. The request was to make just the words starting with + - and . load in refinement form, not the numbers starting with those characters. This would also make refinement syntax more consistent with path syntax.
On the other hand, /1 is a valid refinement as well, so this would be more internally consistent. Refinements are already a superset of words, so making them a strict superset would be better. As long as it's documented, we're cool. |
Date | User | Field | Action | Change |
---|---|---|---|---|
28-Mar-2011 20:56 | BrianH | Comment : 0003153 | Modified | - |
28-Mar-2011 20:38 | BrianH | Comment : 0003153 | Added | - |
21-Mar-2011 02:33 | carl | Description | Modified | - |
21-Mar-2011 02:33 | carl | Code | Modified | - |
21-Mar-2011 02:33 | carl | Fixedin | Modified | => alpha 112 |
21-Mar-2011 02:33 | carl | Status | Modified | submitted => built |
21-Mar-2011 02:33 | carl | Comment : 0003151 | Added | - |
17-Feb-2011 10:01 | BrianH | Comment : 0003113 | Added | - |
17-Feb-2011 07:57 | BrianH | Ticket | Added | - |