mapvar-emit iterate

This commit is contained in:
John Kerl 2016-11-13 09:21:37 -05:00
parent 9418aec148
commit 66b91ed2cb
3 changed files with 273 additions and 4 deletions

View file

@ -1252,9 +1252,21 @@ md_emitf_args(A) ::= . {
md_emitf_args(A) ::= md_oosvar_keylist(B). {
A = mlr_dsl_ast_node_alloc_unary("temp", MD_AST_NODE_TYPE_EMITF, B);
}
md_emitf_args(A) ::= md_nonindexed_local_variable(B). {
A = mlr_dsl_ast_node_alloc_unary("temp", MD_AST_NODE_TYPE_EMITF, B);
}
md_emitf_args(A) ::= md_indexed_local_variable(B). {
A = mlr_dsl_ast_node_alloc_unary("temp", MD_AST_NODE_TYPE_EMITF, B);
}
md_emitf_args(A) ::= md_emitf_args(B) MD_TOKEN_COMMA md_oosvar_keylist(C). {
A = mlr_dsl_ast_node_append_arg(B, C);
}
md_emitf_args(A) ::= md_emitf_args(B) MD_TOKEN_COMMA md_nonindexed_local_variable(C). {
A = mlr_dsl_ast_node_append_arg(B, C);
}
md_emitf_args(A) ::= md_emitf_args(B) MD_TOKEN_COMMA md_indexed_local_variable(C). {
A = mlr_dsl_ast_node_append_arg(B, C);
}
md_emitf_write(A) ::= MD_TOKEN_EMITF(O) MD_TOKEN_GT md_output_file(F) MD_TOKEN_COMMA md_emitf_args(B). {
B = mlr_dsl_ast_node_set_function_name(B, O->text);
@ -1309,6 +1321,28 @@ md_emitp(A) ::= MD_TOKEN_EMITP(O) md_oosvar_keylist(B) MD_TOKEN_COMMA md_emitp_n
mlr_dsl_ast_node_alloc_zary("stream", MD_AST_NODE_TYPE_STREAM));
}
md_emitp(A) ::= MD_TOKEN_EMITP(O) md_nonindexed_local_variable(B). {
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP,
mlr_dsl_ast_node_alloc_unary(O->text, MD_AST_NODE_TYPE_EMITP, B),
mlr_dsl_ast_node_alloc_zary("stream", MD_AST_NODE_TYPE_STREAM));
}
md_emitp(A) ::= MD_TOKEN_EMITP(O) md_nonindexed_local_variable(B) MD_TOKEN_COMMA md_emitp_namelist(C). {
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP,
mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP, B, C),
mlr_dsl_ast_node_alloc_zary("stream", MD_AST_NODE_TYPE_STREAM));
}
md_emitp(A) ::= MD_TOKEN_EMITP(O) md_indexed_local_variable(B). {
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP,
mlr_dsl_ast_node_alloc_unary(O->text, MD_AST_NODE_TYPE_EMITP, B),
mlr_dsl_ast_node_alloc_zary("stream", MD_AST_NODE_TYPE_STREAM));
}
md_emitp(A) ::= MD_TOKEN_EMITP(O) md_indexed_local_variable(B) MD_TOKEN_COMMA md_emitp_namelist(C). {
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP,
mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP, B, C),
mlr_dsl_ast_node_alloc_zary("stream", MD_AST_NODE_TYPE_STREAM));
}
md_emitp_write(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_GT md_output_file(F) MD_TOKEN_COMMA
MD_TOKEN_ALL(B).
{
@ -1341,6 +1375,7 @@ md_emitp_write(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_GT md_output_file(F) MD_TOKEN_C
mlr_dsl_ast_node_alloc_unary(">", MD_AST_NODE_TYPE_FILE_WRITE,
F));
}
md_emitp_write(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_GT md_output_file(F) MD_TOKEN_COMMA
md_oosvar_keylist(B).
{
@ -1358,6 +1393,40 @@ md_emitp_write(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_GT md_output_file(F) MD_TOKEN_C
F));
}
md_emitp_write(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_GT md_output_file(F) MD_TOKEN_COMMA
md_nonindexed_local_variable(B).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP,
mlr_dsl_ast_node_alloc_unary(O->text, MD_AST_NODE_TYPE_EMITP, B),
mlr_dsl_ast_node_alloc_unary(">", MD_AST_NODE_TYPE_FILE_WRITE,
F));
}
md_emitp_write(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_GT md_output_file(F) MD_TOKEN_COMMA
md_nonindexed_local_variable(B) MD_TOKEN_COMMA md_emitp_namelist(C).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP,
mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP, B, C),
mlr_dsl_ast_node_alloc_unary(">", MD_AST_NODE_TYPE_FILE_WRITE,
F));
}
md_emitp_write(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_GT md_output_file(F) MD_TOKEN_COMMA
md_indexed_local_variable(B).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP,
mlr_dsl_ast_node_alloc_unary(O->text, MD_AST_NODE_TYPE_EMITP, B),
mlr_dsl_ast_node_alloc_unary(">", MD_AST_NODE_TYPE_FILE_WRITE,
F));
}
md_emitp_write(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_GT md_output_file(F) MD_TOKEN_COMMA
md_indexed_local_variable(B) MD_TOKEN_COMMA md_emitp_namelist(C).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP,
mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP, B, C),
mlr_dsl_ast_node_alloc_unary(">", MD_AST_NODE_TYPE_FILE_WRITE,
F));
}
md_emitp_append(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_BITWISE_RSH md_output_file(F) MD_TOKEN_COMMA
MD_TOKEN_ALL(B).
@ -1391,6 +1460,7 @@ md_emitp_append(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_BITWISE_RSH md_output_file(F)
mlr_dsl_ast_node_alloc_unary(">>", MD_AST_NODE_TYPE_FILE_APPEND,
F));
}
md_emitp_append(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_BITWISE_RSH md_output_file(F) MD_TOKEN_COMMA
md_oosvar_keylist(B).
{
@ -1408,6 +1478,40 @@ md_emitp_append(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_BITWISE_RSH md_output_file(F)
F));
}
md_emitp_append(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_BITWISE_RSH md_output_file(F) MD_TOKEN_COMMA
md_nonindexed_local_variable(B).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP,
mlr_dsl_ast_node_alloc_unary(O->text, MD_AST_NODE_TYPE_EMITP, B),
mlr_dsl_ast_node_alloc_unary(">>", MD_AST_NODE_TYPE_FILE_APPEND,
F));
}
md_emitp_append(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_BITWISE_RSH md_output_file(F) MD_TOKEN_COMMA
md_nonindexed_local_variable(B) MD_TOKEN_COMMA md_emitp_namelist(C).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP,
mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP, B, C),
mlr_dsl_ast_node_alloc_unary(">>", MD_AST_NODE_TYPE_FILE_APPEND,
F));
}
md_emitp_append(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_BITWISE_RSH md_output_file(F) MD_TOKEN_COMMA
md_indexed_local_variable(B).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP,
mlr_dsl_ast_node_alloc_unary(O->text, MD_AST_NODE_TYPE_EMITP, B),
mlr_dsl_ast_node_alloc_unary(">>", MD_AST_NODE_TYPE_FILE_APPEND,
F));
}
md_emitp_append(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_BITWISE_RSH md_output_file(F) MD_TOKEN_COMMA
md_indexed_local_variable(B) MD_TOKEN_COMMA md_emitp_namelist(C).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP,
mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP, B, C),
mlr_dsl_ast_node_alloc_unary(">>", MD_AST_NODE_TYPE_FILE_APPEND,
F));
}
md_emitp_pipe(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_BITWISE_OR md_rhs(P) MD_TOKEN_COMMA
MD_TOKEN_ALL(B).
@ -1441,6 +1545,7 @@ md_emitp_pipe(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_BITWISE_OR md_rhs(P) MD_TOKEN_CO
mlr_dsl_ast_node_alloc_unary("|", MD_AST_NODE_TYPE_PIPE,
P));
}
md_emitp_pipe(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_BITWISE_OR md_rhs(P) MD_TOKEN_COMMA
md_oosvar_keylist(B).
{
@ -1458,6 +1563,40 @@ md_emitp_pipe(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_BITWISE_OR md_rhs(P) MD_TOKEN_CO
P));
}
md_emitp_pipe(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_BITWISE_OR md_rhs(P) MD_TOKEN_COMMA
md_nonindexed_local_variable(B).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP,
mlr_dsl_ast_node_alloc_unary(O->text, MD_AST_NODE_TYPE_EMITP, B),
mlr_dsl_ast_node_alloc_unary("|", MD_AST_NODE_TYPE_PIPE,
P));
}
md_emitp_pipe(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_BITWISE_OR md_rhs(P) MD_TOKEN_COMMA
md_nonindexed_local_variable(B) MD_TOKEN_COMMA md_emitp_namelist(C).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP,
mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP, B, C),
mlr_dsl_ast_node_alloc_unary("|", MD_AST_NODE_TYPE_PIPE,
P));
}
md_emitp_pipe(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_BITWISE_OR md_rhs(P) MD_TOKEN_COMMA
md_indexed_local_variable(B).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP,
mlr_dsl_ast_node_alloc_unary(O->text, MD_AST_NODE_TYPE_EMITP, B),
mlr_dsl_ast_node_alloc_unary("|", MD_AST_NODE_TYPE_PIPE,
P));
}
md_emitp_pipe(A) ::= MD_TOKEN_EMITP(O) MD_TOKEN_BITWISE_OR md_rhs(P) MD_TOKEN_COMMA
md_indexed_local_variable(B) MD_TOKEN_COMMA md_emitp_namelist(C).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP,
mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMITP, B, C),
mlr_dsl_ast_node_alloc_unary("|", MD_AST_NODE_TYPE_PIPE,
P));
}
md_emitp_namelist(A) ::= md_rhs(B). {
A = mlr_dsl_ast_node_alloc_unary("emitp_namelist", MD_AST_NODE_TYPE_EMITP, B);
}
@ -1499,6 +1638,28 @@ md_emit(A) ::= MD_TOKEN_EMIT(O) md_oosvar_keylist(B) MD_TOKEN_COMMA md_emit_name
mlr_dsl_ast_node_alloc_zary("stream", MD_AST_NODE_TYPE_STREAM));
}
md_emit(A) ::= MD_TOKEN_EMIT(O) md_nonindexed_local_variable(B). {
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT,
mlr_dsl_ast_node_alloc_unary(O->text, MD_AST_NODE_TYPE_EMIT, B),
mlr_dsl_ast_node_alloc_zary("stream", MD_AST_NODE_TYPE_STREAM));
}
md_emit(A) ::= MD_TOKEN_EMIT(O) md_nonindexed_local_variable(B) MD_TOKEN_COMMA md_emit_namelist(C). {
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT,
mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT, B, C),
mlr_dsl_ast_node_alloc_zary("stream", MD_AST_NODE_TYPE_STREAM));
}
md_emit(A) ::= MD_TOKEN_EMIT(O) md_indexed_local_variable(B). {
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT,
mlr_dsl_ast_node_alloc_unary(O->text, MD_AST_NODE_TYPE_EMIT, B),
mlr_dsl_ast_node_alloc_zary("stream", MD_AST_NODE_TYPE_STREAM));
}
md_emit(A) ::= MD_TOKEN_EMIT(O) md_indexed_local_variable(B) MD_TOKEN_COMMA md_emit_namelist(C). {
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT,
mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT, B, C),
mlr_dsl_ast_node_alloc_zary("stream", MD_AST_NODE_TYPE_STREAM));
}
// ----------------------------------------------------------------
md_emit_write(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_GT md_output_file(F) MD_TOKEN_COMMA
MD_TOKEN_ALL(B).
@ -1532,6 +1693,7 @@ md_emit_write(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_GT md_output_file(F) MD_TOKEN_COM
mlr_dsl_ast_node_alloc_unary(">", MD_AST_NODE_TYPE_FILE_WRITE,
F));
}
md_emit_write(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_GT md_output_file(F) MD_TOKEN_COMMA
md_oosvar_keylist(B).
{
@ -1549,6 +1711,40 @@ md_emit_write(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_GT md_output_file(F) MD_TOKEN_COM
F));
}
md_emit_write(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_GT md_output_file(F) MD_TOKEN_COMMA
md_nonindexed_local_variable(B).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT,
mlr_dsl_ast_node_alloc_unary(O->text, MD_AST_NODE_TYPE_EMIT, B),
mlr_dsl_ast_node_alloc_unary(">", MD_AST_NODE_TYPE_FILE_WRITE,
F));
}
md_emit_write(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_GT md_output_file(F) MD_TOKEN_COMMA
md_nonindexed_local_variable(B) MD_TOKEN_COMMA md_emit_namelist(C).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT,
mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT, B, C),
mlr_dsl_ast_node_alloc_unary(">", MD_AST_NODE_TYPE_FILE_WRITE,
F));
}
md_emit_write(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_GT md_output_file(F) MD_TOKEN_COMMA
md_indexed_local_variable(B).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT,
mlr_dsl_ast_node_alloc_unary(O->text, MD_AST_NODE_TYPE_EMIT, B),
mlr_dsl_ast_node_alloc_unary(">", MD_AST_NODE_TYPE_FILE_WRITE,
F));
}
md_emit_write(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_GT md_output_file(F) MD_TOKEN_COMMA
md_indexed_local_variable(B) MD_TOKEN_COMMA md_emit_namelist(C).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT,
mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT, B, C),
mlr_dsl_ast_node_alloc_unary(">", MD_AST_NODE_TYPE_FILE_WRITE,
F));
}
md_emit_append(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_BITWISE_RSH md_output_file(F) MD_TOKEN_COMMA
MD_TOKEN_ALL(B).
@ -1582,6 +1778,7 @@ md_emit_append(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_BITWISE_RSH md_output_file(F) MD
mlr_dsl_ast_node_alloc_unary(">>", MD_AST_NODE_TYPE_FILE_APPEND,
F));
}
md_emit_append(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_BITWISE_RSH md_output_file(F) MD_TOKEN_COMMA
md_oosvar_keylist(B).
{
@ -1599,6 +1796,40 @@ md_emit_append(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_BITWISE_RSH md_output_file(F) MD
F));
}
md_emit_append(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_BITWISE_RSH md_output_file(F) MD_TOKEN_COMMA
md_nonindexed_local_variable(B).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT,
mlr_dsl_ast_node_alloc_unary(O->text, MD_AST_NODE_TYPE_EMIT, B),
mlr_dsl_ast_node_alloc_unary(">>", MD_AST_NODE_TYPE_FILE_APPEND,
F));
}
md_emit_append(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_BITWISE_RSH md_output_file(F) MD_TOKEN_COMMA
md_nonindexed_local_variable(B) MD_TOKEN_COMMA md_emit_namelist(C).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT,
mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT, B, C),
mlr_dsl_ast_node_alloc_unary(">>", MD_AST_NODE_TYPE_FILE_APPEND,
F));
}
md_emit_append(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_BITWISE_RSH md_output_file(F) MD_TOKEN_COMMA
md_indexed_local_variable(B).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT,
mlr_dsl_ast_node_alloc_unary(O->text, MD_AST_NODE_TYPE_EMIT, B),
mlr_dsl_ast_node_alloc_unary(">>", MD_AST_NODE_TYPE_FILE_APPEND,
F));
}
md_emit_append(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_BITWISE_RSH md_output_file(F) MD_TOKEN_COMMA
md_indexed_local_variable(B) MD_TOKEN_COMMA md_emit_namelist(C).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT,
mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT, B, C),
mlr_dsl_ast_node_alloc_unary(">>", MD_AST_NODE_TYPE_FILE_APPEND,
F));
}
md_emit_pipe(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_BITWISE_OR md_rhs(P) MD_TOKEN_COMMA
MD_TOKEN_ALL(B).
@ -1632,6 +1863,7 @@ md_emit_pipe(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_BITWISE_OR md_rhs(P) MD_TOKEN_COMM
mlr_dsl_ast_node_alloc_unary("|", MD_AST_NODE_TYPE_PIPE,
P));
}
md_emit_pipe(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_BITWISE_OR md_rhs(P) MD_TOKEN_COMMA
md_oosvar_keylist(B).
{
@ -1649,6 +1881,40 @@ md_emit_pipe(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_BITWISE_OR md_rhs(P) MD_TOKEN_COMM
P));
}
md_emit_pipe(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_BITWISE_OR md_rhs(P) MD_TOKEN_COMMA
md_nonindexed_local_variable(B).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT,
mlr_dsl_ast_node_alloc_unary(O->text, MD_AST_NODE_TYPE_EMIT, B),
mlr_dsl_ast_node_alloc_unary("|", MD_AST_NODE_TYPE_PIPE,
P));
}
md_emit_pipe(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_BITWISE_OR md_rhs(P) MD_TOKEN_COMMA
md_nonindexed_local_variable(B) MD_TOKEN_COMMA md_emit_namelist(C).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT,
mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT, B, C),
mlr_dsl_ast_node_alloc_unary("|", MD_AST_NODE_TYPE_PIPE,
P));
}
md_emit_pipe(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_BITWISE_OR md_rhs(P) MD_TOKEN_COMMA
md_indexed_local_variable(B).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT,
mlr_dsl_ast_node_alloc_unary(O->text, MD_AST_NODE_TYPE_EMIT, B),
mlr_dsl_ast_node_alloc_unary("|", MD_AST_NODE_TYPE_PIPE,
P));
}
md_emit_pipe(A) ::= MD_TOKEN_EMIT(O) MD_TOKEN_BITWISE_OR md_rhs(P) MD_TOKEN_COMMA
md_indexed_local_variable(B) MD_TOKEN_COMMA md_emit_namelist(C).
{
A = mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT,
mlr_dsl_ast_node_alloc_binary(O->text, MD_AST_NODE_TYPE_EMIT, B, C),
mlr_dsl_ast_node_alloc_unary("|", MD_AST_NODE_TYPE_PIPE,
P));
}
// ----------------------------------------------------------------
md_emit_namelist(A) ::= md_rhs(B). {
A = mlr_dsl_ast_node_alloc_unary("emit_namelist", MD_AST_NODE_TYPE_EMIT, B);

View file

@ -1272,6 +1272,9 @@ static void handle_dump(
} else if (plevel != NULL) {
mlhmmv_level_print_stacked(plevel, 0, FALSE, FALSE, "", pstate->stdfp); // xxx mk simpler call w/ dfl args
}
if (pstate->pdump_target_ephemeral_freer != NULL) {
pstate->pdump_target_ephemeral_freer(pstate);
}
}
// ----------------------------------------------------------------

View file

@ -45,12 +45,12 @@ things which can be maps:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
mlr_dsl_cst_output_statements.c:
k dump w/ no args
? dump maplit -- ensure scalar-out is printed
? dump full-srec -- ensure scalar-out is printed
? dump full-oosvar -- ensure scalar-out is printed
k dump maplit -- ensure scalar-out is printed
k dump full-srec -- ensure scalar-out is printed
k dump full-oosvar -- ensure scalar-out is printed
k dump oosvar -- ensure scalar-out is printed
k dump localvar -- ensure scalar-out is printed
k dump func retval -- ensure scalar-out is printed
- dump func retval -- ensure scalar-out is printed
? emit maplit
? emit full oosvar
? emit oosvar