Comments on: PARSE: new keyword restrictions
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.
4 Comments Comments:
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. | Henrik 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.
|