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

World: r3wp

[REBOL Syntax] Discussions about REBOL syntax

Steeve
16-Feb-2012
[72]
=> 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
[112x2]
Well, this way it would accept some unacceptable strings, like "." 
in ".1" e.g.
However, the TERMINATION can be added to the whole word syntax combined 
from the partial syntax cases
Steeve
16-Feb-2012
[114x2]
Well there are some annoyng  cases when values are stuck together 
but valids.
>> [a< 1]
== [a < 1]
termination can't be used to the whole
Ladislav
16-Feb-2012
[116]
yes, needs some care
Steeve
16-Feb-2012
[117]
I need a pause :-)
Ladislav
16-Feb-2012
[118x2]
however, your example looks to be R2-specific
good night
Steeve
16-Feb-2012
[120x2]
gn
last attempt for tonight

word-syntax: [
	[#"." | #"+" not #"'" | #"-" not #"'" | not #"'" and c-word] 
	[
		c-word any [c-word | digit]
		| termination
	]
]

Too obfuscated maybe
Feel free to go on anyone