[REBOL] simple parse and copy question Re:
From: brett:codeconscious at: 5-Oct-2000 0:36
The "copy" you see in the parse rule is not the same as the copy at the
Parse rules are made up from a dialect specific to parse. That is, the
you find in a parse rule is not executed like ordinary script, it is
instead interpreted by the parse function. When the parse function
encounters the word "copy" in a parse rule it applies its own specific
meaning - just like you could if you had a function that processed words in
Check out the documentation on parse and you will find that the result of
using copy (in parse) is to copy the input stream from the current position
for as long as the next match pattern is valid.
In contrast, the bits of code you find in a parse rule between a "(" and a
are normal rebol commands. This allows you to have the power of rebol
script from within parse.
Another thing you will see in parse rules is a set-word like "here-i-am:".
Again, when parse encounters this set-word it applies its own specific
meaning, in this case it is to assign the word "here-i-am" to the current
location of the input-stream.
See the documentation for an example of this use.
Hope that explains it.