summaryrefslogtreecommitdiffstats
path: root/parser.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-06-12 21:17:20 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-06-12 21:17:20 -0700
commit034799fc0288388d08dcfbcf6230cb698942ba69 (patch)
treef0f3b487ea4e41dc67e01ccce735ee17e9a322c6 /parser.c
parentf2efe6c4cd019bea22717ac73734adb83e9176d5 (diff)
downloadtxr-034799fc0288388d08dcfbcf6230cb698942ba69.tar.gz
txr-034799fc0288388d08dcfbcf6230cb698942ba69.tar.bz2
txr-034799fc0288388d08dcfbcf6230cb698942ba69.zip
New @(push) directive.
@(push) is like @(output), but feeds back into input. Use carefully. * parser.y (PUSH): New token. (output_push): New nonterminal symbol. (output_clause): Handle OUTPUT or PUSH via output_push. Some logic moved to output_helper. (output_helper): New function. Transforms both @(output) and @(push) directives. Checks both for valid keywords; push has only :filter. * parser.l (grammar): Recognize @(push similarly to other directives. * lib.[ch] (push_s): New symbol variable. * match.c (v_output_keys): Internal linkage changes to external. (v_push): New function. (v_parallel): We must fix the max_line algorithm not to use an initial value of zero, because lines can go negative thanks to @(push). We end up rejecting the pushed data. (v_collect): We can no longer assert that the data line number doesn't retreat. (dir_tables_init): Register push directive in table of vertical directives. * match.h (append_k, continue_k, finish_k): Existing symbol variables declared. (v_output_keys): Declared. * y.tab.c.shipped, * y.tab.h.shipped, * lex.yy.c.shipped: Updated. * txr.1: Documented. * stdlib/doc-syms.tl: Updated.
Diffstat (limited to 'parser.c')
0 files changed, 0 insertions, 0 deletions