r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[REBOL Syntax] Discussions about REBOL syntax

Maxim
16-Feb-2012
[63]
I think it was mainly meant as a way to make / based ops   things 
like //  and  ///  .  I don't see why it should be removed.  it can 
only contain  "/"  characters.  otherwise its a refinement.
Steeve
16-Feb-2012
[64x3]
there's no way [///x] should be a valid refinement. It will fail 
when evaluated
But yeah it's another problem
I mixed things, but there is something wrong with the both datatypes 
in R2 (it"s why it has been corrected in R3)
Maxim
16-Feb-2012
[67x2]
yeah, except when we use refinements as such within dialects, then 
it doesn't matter, since they are not being used as paths.
but its ugly so,  ///x  shouldn't be "promoted"  IMHO.   if its an 
un-intended loophole in the lexical analysis, then it shouldn't be 
within the syntax.r code.
Steeve
16-Feb-2012
[69]
about the more-less-word rule:
>> and << are allowed
Ladislav
16-Feb-2012
[70]
thanks
Steeve
16-Feb-2012
[71x2]
>= also
=> as well
Ladislav
16-Feb-2012
[73]
the last one does not work in R3
Steeve
16-Feb-2012
[74]
Maybe we should begin to add notes somewhere when we encounter such 
differences
Ladislav
16-Feb-2012
[75]
There is already a method for that
Andreas
16-Feb-2012
[76]
We already have ALTERNATIVE-SYNTAX for that.
Steeve
16-Feb-2012
[77]
Oh I thought you would say : a new I-pad or I-phone :-)
Ladislav
16-Feb-2012
[78]
hmm, just tested, and load "=>" does not work in R2 either
Steeve
16-Feb-2012
[79x2]
Ah yeah sorry
in the [slash-word] rule, you don't need to fork the [termination] 
rule (no need to remove #"/")
Ladislav
16-Feb-2012
[81]
aha, correct
Andreas
16-Feb-2012
[82]
rebol-syntax comes now licensed under the terms of the "MIT License".
BrianH
16-Feb-2012
[83x3]
There are tickets about R3 syntax bugs that are still pending. Among 
those are one for the // etc. words.
http://issue.cc/r3/1477- Special-case / words not recognized in 
lit-word!,  get-word! or set-word! form

http://issue.cc/r3/1478- Special-case arrow-based words not recognized 
in set-word! or refinement! form

Those seem to be the last two unimplemented syntax fixes in R3, at 
least that I can find/remember.
However, it looks like R3's issue! syntax isn't final: http://issue.cc/r3/1657
- Define the valid lexical forms for ISSUE! datatype
Ladislav
16-Feb-2012
[86x2]
http://issue.cc/r3/1477- however, the slash-words can have neither 
the refinement-syntax nor the path-syntax; because of that they remain 
"problematic" anyway
how about the + and - words? Is there a ticket for the refinement 
syntax?
BrianH
16-Feb-2012
[88]
Yeah, an implemented one.
Andreas
16-Feb-2012
[89]
You mean http://issue.cc/r3/1856I assume?
BrianH
16-Feb-2012
[90]
Yup. I guess it's built for an unreleased version. I was wondering 
why it's not marked as tested.
Andreas
16-Feb-2012
[91x2]
Pity that A112 never came to be up until today, then.
(Same for http://issue.cc/r3/1855.But in that case, at least ////x 
still loads in R3 :)
Steeve
16-Feb-2012
[93]
Attempt for word datatype
 

c-word: complement union charset "()[]^"{}/;<>,\#$%:@'^@" whitespace
word-syntax: [
	  [#"." | not #"'"] c-word any [c-word | digit]
	  | #"."
]
Ladislav
16-Feb-2012
[94]
hmm, it looks that #"^@" "works" as "END LOAD"
Steeve
16-Feb-2012
[95x5]
??? I don't get it
Oh, I see. you mean that "^@" is a problem wherever it is placed 
in a script
It's not specific to the word! syntax
At first I thought it should be better in whitespace
better placed
Ladislav
16-Feb-2012
[100x2]
Check END-LOAD
Why did you put #"'" into the c-word definition?
Steeve
16-Feb-2012
[102x8]
I forgot to add #"'" in the charset.

c-word: complement union charset "()[]^"{}/;<>,\#$%:@^@" whitespace
Good, you saw it
you're fast
I also forgot to add the special cases for + and -
c-word: complement union charset "()[]^"{}/;<>,\#$%:@^@" whitespace
word-syntax: [
	  [#"." | #"+" | #"-" | not #"'"] c-word any [c-word | digit]
	  | #"." | #"+" | #"-"
]
Thanks to your notes
Well it's more complex than that.
+' and -' are invalid
Maybe
word-syntax: [
	[#"." | #"+" not #"'"| #"-" not #"'"| not #"'"] 
		c-word any [c-word | digit]
	| #"." | #"+" | #"-"
]
Ladislav
16-Feb-2012
[110]
lots of exceptions, indeed
Steeve
16-Feb-2012
[111]
Should that be enforced with [termination] also ?
Ladislav
16-Feb-2012
[112]
Well, this way it would accept some unacceptable strings, like "." 
in ".1" e.g.