From 2ed3ec329bf365669c473e334805672fa1dd9603 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Tue, 1 Mar 2016 08:03:22 -0500 Subject: [PATCH] unset iterate --- c/containers/mlhmmv.c | 2 +- c/containers/mlhmmv.h | 3 +-- c/dsls/mlr_dsl_parse.y | 8 -------- c/unit_test/test_mlhmmv.c | 4 ++-- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/c/containers/mlhmmv.c b/c/containers/mlhmmv.c index 39547e32f..8699a54a1 100644 --- a/c/containers/mlhmmv.c +++ b/c/containers/mlhmmv.c @@ -431,7 +431,7 @@ static void mlhmmv_level_enlarge(mlhmmv_level_t* plevel) { // xxx temp #define TEMP_FLATTEN_SEP ":" -void mlhmmv_to_lrecs(mlhmmv_t* pmap, sllmv_t* psubmap_indices, sllmv_t* pnames, sllv_t* poutrecs) { +void mlhmmv_to_lrecs(mlhmmv_t* pmap, sllmv_t* pnames, sllv_t* poutrecs) { lrec_t* ptemplate = lrec_unbacked_alloc(); if (pnames->phead == NULL) { fprintf(stderr, "%s: internal coding error detected in file %s at line %d\n", diff --git a/c/containers/mlhmmv.h b/c/containers/mlhmmv.h index d650a0a15..c9168d726 100644 --- a/c/containers/mlhmmv.h +++ b/c/containers/mlhmmv.h @@ -85,10 +85,9 @@ void mlhmmv_remove(mlhmmv_t* pmap, mv_t* pname_key, sllmv_t* pmvkeys); mlhmmv_level_entry_t* mlhmmv_get_next_level_entry(mlhmmv_level_t* pmap, mv_t* plevel_key, int* pindex); // xxx comment: -// * partial indices // * names // * these allocate unbacked lrecs -void mlhmmv_to_lrecs(mlhmmv_t* pmap, sllmv_t* psubmap_indices, sllmv_t* pnames, sllv_t* poutrecs); +void mlhmmv_to_lrecs(mlhmmv_t* pmap, sllmv_t* pnames, sllv_t* poutrecs); void mlhmmv_print_json_stacked(mlhmmv_t* pmap, int quote_values_always); void mlhmmv_print_json_single_line(mlhmmv_t* pmap, int quote_values_always); diff --git a/c/dsls/mlr_dsl_parse.y b/c/dsls/mlr_dsl_parse.y index 920cd8050..d67a22a41 100644 --- a/c/dsls/mlr_dsl_parse.y +++ b/c/dsls/mlr_dsl_parse.y @@ -506,14 +506,6 @@ md_emit(A) ::= MD_TOKEN_EMIT(O) md_oosvar_name(B) MD_TOKEN_COMMA md_emit_args(C) A = mlr_dsl_ast_node_set_function_name(B, O->text); } -md_emit(A) ::= MD_TOKEN_EMIT(O) md_keyed_oosvar_name(B). { - A = mlr_dsl_ast_node_alloc_unary(O->text, MD_AST_NODE_TYPE_EMIT, B); -} -md_emit(A) ::= MD_TOKEN_EMIT(O) md_keyed_oosvar_name(B) MD_TOKEN_COMMA md_emit_args(C). { - B = mlr_dsl_ast_node_prepend_arg(C, B); - A = mlr_dsl_ast_node_set_function_name(B, O->text); -} - md_emit_args(A) ::= md_rhs(B). { A = mlr_dsl_ast_node_alloc_unary("temp", MD_AST_NODE_TYPE_EMIT, B); } diff --git a/c/unit_test/test_mlhmmv.c b/c/unit_test/test_mlhmmv.c index 208ed4376..c0c3a4edd 100644 --- a/c/unit_test/test_mlhmmv.c +++ b/c/unit_test/test_mlhmmv.c @@ -395,7 +395,7 @@ static char* test_mlhmmv_to_lrecs() { // sllv_free(poutrecs); poutrecs = sllv_alloc(); - mlhmmv_to_lrecs(pmap, sllmv_single(smv("a")), sllmv_single(smv("first")), poutrecs); + mlhmmv_to_lrecs(pmap, sllmv_single(smv("first")), poutrecs); printf("outrecs (%lld):\n", poutrecs->length); for (sllve_t* pe = poutrecs->phead; pe != NULL; pe = pe->pnext) lrec_print(pe->pvvalue); @@ -405,7 +405,7 @@ static char* test_mlhmmv_to_lrecs() { sllv_free(poutrecs); poutrecs = sllv_alloc(); - mlhmmv_to_lrecs(pmap, sllmv_single(smv("a")), sllmv_double(smv("first"), smv("second")), poutrecs); + mlhmmv_to_lrecs(pmap, sllmv_double(smv("first"), smv("second")), poutrecs); printf("outrecs (%lld):\n", poutrecs->length); for (sllve_t* pe = poutrecs->phead; pe != NULL; pe = pe->pnext) lrec_print(pe->pvvalue);