REBOL3 tracker
  0.9.12 beta
Ticket #0001421 User: anonymous

Project:



rss
TypeIssue Statustested Date10-Jan-2010 10:20
Versionalpha 95 CategorySyntax Submitted bymeijeru
PlatformAll Severityminor Prioritynormal

Summary More subtleties with < and >
Description In many cases, the sign < or > following another lexical item without intervening whitespace is correctly recognized as a word of its own. In other cases, it is not. I have not yet fathomed the logic.
Example code
>> length? [a<]
== 2
>> length? [a>]
** Syntax error: invalid "word" -- "a>"
>> length? [a+<]
== 2
>> length? [1<]
** Syntax error: invalid "integer" -- "1<"
>> length? [+<]
** Syntax error: invalid "word" -- "+<"

Assigned ton/a Fixed inalpha 97 Last Update8-Feb-2010 03:16


Comments
(0001977)
Carl
6-Feb-2010 17:41

What you are seeing here is that some of the lexical classes overlap. In such overlap cases, explicit code must be used to disambiguate the usage. There are still a few holes here and there, so you found one.

The way to understand the difference between a< and +< comes from the fact that a is of word-class and + is of special-class (because it's allowed within various other datatype forms, such as +1234.)

This ticket will be fixed, but I wanted to make this special note for future reference.
(0002006)
BrianH
8-Feb-2010 03:16

Note: As of alpha 97 the above examples that didn't generate syntax errors now do so.

Date User Field Action Change
8-Feb-2010 03:16 BrianH Comment : 0002006 Added -
8-Feb-2010 03:15 BrianH Status Modified built => tested
6-Feb-2010 18:47 Carl Fixedin Modified => alpha 97
6-Feb-2010 18:47 Carl Status Modified reviewed => built
6-Feb-2010 17:41 Carl Comment : 0001977 Added -
12-Jan-2010 20:53 carl Code Modified -
12-Jan-2010 20:53 carl Status Modified submitted => reviewed
10-Jan-2010 10:20 meijeru Ticket Added -