Also, rule based syntax modification is lexically scoped, which is definitely handy...
How exactly is that supposed to work? It seems a bit paradoxical to me. Allowing lexical modification of the parser would have to happen at run-time; the only problem being that run-time is after compile-time :) I was under the impression that the process would be more like:
- The code must be in a BEGIN block or be use'd (same thing).
- The BEGIN block is parsed, compiled, and run with the current parser.
- When it is evident that parser rules are being overwritten, a copy of the parser is made.
- Modifications to the parser are actually made on the copy.
- When the BEGIN block exits, the modified parser becomes the real parser.