unset iterate

This commit is contained in:
John Kerl 2016-03-01 08:03:22 -05:00
parent e175bffe56
commit 2ed3ec329b
4 changed files with 4 additions and 13 deletions

View file

@ -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",

View file

@ -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);

View file

@ -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);
}

View file

@ -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);