Comments on: PARSE: new keyword restrictions

Carl Sassenrath, CTO
REBOL Technologies
21-Sep-2009 0:35 GMT

Article #0245
Main page || Index || Prior Article [0244] || Next Article [0246] || 4 Comments || Send feedback

As part of the w:parse update, we are removing a few obscure word referencing capabilities:

You cannot use a variable to hold get and set word actions:

a: first [b:]
parse "abc" [a "abc"]  << an error now

You cannot use a variable to hold parse commands:

copie: 'copy
parse "abc" [copie here "abc"] << an error now

Keywords cannot be used as variables:

parse "abc" [copy: "abc"] << an error now

Please tell us immediately if this is a problem for you or your code.

Parse Summary updated.



Brian Hawley
21-Sep-2009 22:04:27
Thanks, those changes should be a huge relief. It was really disturbing to find out that those hacks were possible. It will be good for us that they go away.
Maxim Olivier-Adlhoch
21-Sep-2009 22:30:58
I agree, they really where side-effects and not really features.

The kind of thing that makes you go mad when you do so unknowingly, trying to figure out why the parse is going astray.

22-Sep-2009 2:06:54
So what kind of error is returned? If it's a bad error, then that may not help debugging much.
Carl Sassenrath
22-Sep-2009 11:53:58
Henrik, you are reading my mind. Better error messages will help a lot here if the user makes a mistake, so they will be added.

Also, interestingly, the above change made one of my tests break... because it used the word END to store the prior index of a parse expression!

Post a Comment:

You can post a comment here. Keep it on-topic.


Blog id:



 Note: HTML tags allowed for: b i u li ol ul font span div a p br pre tt blockquote

This is a technical blog related to the above topic. We reserve the right to remove comments that are off-topic, irrelevant links, advertisements, spams, personal attacks, politics, religion, etc.

Updated 15-Jun-2024 - Edit - Copyright REBOL Technologies -