diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-03-13 22:02:48 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-03-13 22:02:48 -0700 |
commit | 7f0f22c4e455f457d37ddf542b36c49db20d16af (patch) | |
tree | ae4b2ed4afa05a8714c86f80ce5a9d4a8d4afe05 /parser.l | |
parent | be33de3909100a204726cdde52bf6077e890ca6d (diff) | |
download | txr-7f0f22c4e455f457d37ddf542b36c49db20d16af.tar.gz txr-7f0f22c4e455f457d37ddf542b36c49db20d16af.tar.bz2 txr-7f0f22c4e455f457d37ddf542b36c49db20d16af.zip |
Change: @(block) requires @(end) from now on.
Blocks no longer extend to the end of the surrounding
scope.
* match.c (v_block): Rewrite for new syntax.
* parser.l (BLOCK): New token type handled.
* parser.y (BLOCK): New token.
(block_clause): New nonterminal grammar symbol.
(clause): Collateral fix: replaced a bunch of
list(X, nao) forms with cons(X, nil).
Introduced block_clause as a constituent of clause.
* txr.1: Revamped documentation of block, and
wrote about using blocks for reducing nested
skips and reducing backtracking in general.
Diffstat (limited to 'parser.l')
-rw-r--r-- | parser.l | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -257,6 +257,12 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} return CASES; } +<SPECIAL>\({WS}block/{ID_END} { + yy_push_state(NESTED); + yylval.lineno = lineno; + return BLOCK; +} + <SPECIAL>\({WS}choose/{ID_END} { yy_push_state(NESTED); yylval.lineno = lineno; |