directory renames

This commit is contained in:
John Kerl 2016-12-02 20:07:02 -05:00
parent 2470ba61d2
commit bdbf82c275
104 changed files with 227 additions and 211 deletions

12
.gitignore vendored
View file

@ -42,12 +42,12 @@ gmon.out
.swo
.*.swp
.*.swo
c/dsls/lemon
c/dsls/mlr_dsl_lexer.c
c/dsls/mlr_dsl_lexer.h
c/dsls/mlr_dsl_parse.c
c/dsls/mlr_dsl_parse.h
c/dsls/mlr_dsl_parse.out
c/parsing/lemon
c/parsing/mlr_dsl_lexer.c
c/parsing/mlr_dsl_lexer.h
c/parsing/mlr_dsl_parse.c
c/parsing/mlr_dsl_parse.h
c/parsing/mlr_dsl_parse.out
c/reg_test/output
c/output/out
tags

View file

@ -1,4 +1,4 @@
SUBDIRS= lib cli stream input mapping containers output dsls experimental tools . unit_test reg_test
SUBDIRS= lib cli stream input dsl mapping containers output parsing experimental tools . unit_test reg_test
AM_CPPFLAGS= -I${srcdir}
AM_CFLAGS= -Wall -std=gnu99
@ -13,10 +13,11 @@ mlr_LDADD= \
containers/libcontainers.la \
stream/libstream.la \
input/libinput.la \
dsl/libdsl.la \
mapping/libmapping.la \
output/liboutput.la \
lib/libmlr.la \
dsls/libdsl.la \
parsing/libdsl.la \
-lm
# Other executable variants

View file

@ -41,14 +41,15 @@ NON_DSL_SRCS = \
containers/*.c \
stream/*.c \
input/*.c \
dsl/*.c \
mapping/*.c \
output/*.c
# DSL
DSL_OBJS = \
./dsls/mlr_dsl_parse.o \
./dsls/mlr_dsl_lexer.o \
./dsls/mlr_dsl_wrapper.o
./parsing/mlr_dsl_parse.o \
./parsing/mlr_dsl_lexer.o \
./parsing/mlr_dsl_wrapper.o
# Unit-test code
TEST_ARGPARSE_SRCS = \
@ -224,28 +225,28 @@ TEST_RVAL_EVALUATORS_SRCS = \
containers/loop_stack.c \
containers/local_stack.c \
containers/type_decl.c \
mapping/mlr_dsl_ast.c \
mapping/function_manager.c \
mapping/rval_expr_evaluators.c \
mapping/rxval_expr_evaluators.c \
mapping/rval_func_evaluators.c \
mapping/rval_list_evaluators.c \
mapping/mlr_dsl_stack_allocate.c \
mapping/mlr_dsl_blocked_ast.c \
mapping/mlr_dsl_cst.c \
mapping/mlr_dsl_cst_condish_statements.c \
mapping/mlr_dsl_cst_for_map_statements.c \
mapping/mlr_dsl_cst_for_srec_statements.c \
mapping/mlr_dsl_cst_func_subr.c \
mapping/mlr_dsl_cst_keywords.c \
mapping/mlr_dsl_cst_loop_control_statements.c \
mapping/mlr_dsl_cst_map_assignment_statements.c \
mapping/mlr_dsl_cst_output_statements.c \
mapping/mlr_dsl_cst_return_statements.c \
mapping/mlr_dsl_cst_scalar_assignment_statements.c \
mapping/mlr_dsl_cst_statements.c \
mapping/mlr_dsl_cst_triple_for_statements.c \
mapping/mlr_dsl_cst_unset_statements.c \
dsl/mlr_dsl_ast.c \
dsl/function_manager.c \
dsl/rval_expr_evaluators.c \
dsl/rxval_expr_evaluators.c \
dsl/rval_func_evaluators.c \
dsl/rval_list_evaluators.c \
dsl/mlr_dsl_stack_allocate.c \
dsl/mlr_dsl_blocked_ast.c \
dsl/mlr_dsl_cst.c \
dsl/mlr_dsl_cst_condish_statements.c \
dsl/mlr_dsl_cst_for_map_statements.c \
dsl/mlr_dsl_cst_for_srec_statements.c \
dsl/mlr_dsl_cst_func_subr.c \
dsl/mlr_dsl_cst_keywords.c \
dsl/mlr_dsl_cst_loop_control_statements.c \
dsl/mlr_dsl_cst_map_assignment_statements.c \
dsl/mlr_dsl_cst_output_statements.c \
dsl/mlr_dsl_cst_return_statements.c \
dsl/mlr_dsl_cst_scalar_assignment_statements.c \
dsl/mlr_dsl_cst_statements.c \
dsl/mlr_dsl_cst_triple_for_statements.c \
dsl/mlr_dsl_cst_unset_statements.c \
output/lrec_writer_csv.c \
output/lrec_writer_csvlite.c \
output/lrec_writer_dkvp.c \
@ -335,15 +336,15 @@ installhome: mlr tests
tags: .always
ctags -R .
mlr: .always dsls
mlr: .always parsing
$(CCOPT) $(NON_DSL_SRCS) $(DSL_OBJS) $(LFLAGS) -o mlr
mlr.static: .always dsls
mlr.static: .always parsing
$(CCOPT) -static $(NON_DSL_SRCS) $(DSL_OBJS) $(LFLAGS) -o mlr.static
dsls: .always
make -C dsls -f Makefile.no-autoconfig mlr_dsl_parse.o
make -C dsls -f Makefile.no-autoconfig mlr_dsl_lexer.o
make -C dsls -f Makefile.no-autoconfig mlr_dsl_wrapper.o
parsing: .always
make -C parsing -f Makefile.no-autoconfig mlr_dsl_parse.o
make -C parsing -f Makefile.no-autoconfig mlr_dsl_lexer.o
make -C parsing -f Makefile.no-autoconfig mlr_dsl_wrapper.o
two: mlr mlrg
@ -351,11 +352,11 @@ two: mlr mlrg
# Other executable variants
# Debug version
mlrg: .always dsls
mlrg: .always parsing
$(CCDEBUG) $(NON_DSL_SRCS) $(DSL_OBJS) $(LFLAGS) -o mlrg
# Debug version with local-stack verbosity
mlrt: .always dsls
mlrt: .always parsing
$(CCDEBUG) -DLOCAL_STACK_TRACE_ENABLE -DLOCAL_STACK_BOUNDS_CHECK_ENABLE \
$(NON_DSL_SRCS) $(DSL_OBJS) $(LFLAGS) -o mlrt
@ -364,7 +365,7 @@ mlrt: .always dsls
# * mlrp {arguments>
# * gprof mlrp gmon.out > myfile.txt
# Note: works on Linux; not on OSX.
mlrp: .always dsls
mlrp: .always parsing
$(CCDEBUG) -g -pg $(NON_DSL_SRCS) $(DSL_OBJS) $(LFLAGS) -o mlrp
# ================================================================
@ -451,7 +452,7 @@ json-vg-mem: .always
# ================================================================
clean:
@rm -vf mlr mlrd mlrg mlrp tester
@make -C dsls -f Makefile.no-autoconfig clean
@make -C parsing -f Makefile.no-autoconfig clean
perfclean profclean:
@rm -vf gmon.out perf.data perf.data.old

View file

@ -7,5 +7,5 @@ export CCDEBUG="clang -fsanitize=address -std=gnu99 -I. -I.. -Wall -Werror -g
export DSLCC="clang"
export DSLCFLAGS="-I.. -Wall -O2 -fsanitize=address"
make -e -f Makefile.no-autoconfig -C dsls clean
make -e -f Makefile.no-autoconfig -C parsing clean
make -e -f Makefile.no-autoconfig mlr mlrg

View file

@ -9,9 +9,9 @@
#include "containers/lhmss.h"
#include "containers/lhmsll.h"
#include "input/lrec_readers.h"
#include "dsl/function_manager.h"
#include "dsl/mlr_dsl_cst.h"
#include "mapping/mappers.h"
#include "mapping/function_manager.h"
#include "mapping/mlr_dsl_cst.h"
#include "output/lrec_writers.h"
#include "cli/mlrcli.h"
#include "cli/quoting.h"

View file

@ -8,5 +8,5 @@ export DSLCC="clang"
#export DSLCFLAGS="-I.. -Wall -O2"
export DSLCFLAGS="-I.. -Wall -O2 -g"
make -e -f Makefile.no-autoconfig -C dsls clean
make -e -f Makefile.no-autoconfig -C parsing clean
make -e -f Makefile.no-autoconfig mlr mlrg

42
c/dsl/Makefile.am Normal file
View file

@ -0,0 +1,42 @@
noinst_LTLIBRARIES= libdsl.la
libdsl_la_SOURCES= \
context_flags.h \
function_manager.h \
function_manager.c \
rval_evaluator.h \
rval_evaluators.h \
rval_expr_evaluators.c \
rxval_expr_evaluators.c \
rval_func_evaluators.c \
rval_list_evaluators.c \
mlr_dsl_ast.c \
mlr_dsl_ast.h \
mlr_dsl_blocked_ast.c \
mlr_dsl_blocked_ast.h \
mlr_dsl_cst.c \
mlr_dsl_cst.h \
mlr_dsl_cst_func_subr.c \
mlr_dsl_cst_keywords.c \
mlr_dsl_cst_statements.c \
mlr_dsl_cst_scalar_assignment_statements.c \
mlr_dsl_cst_map_assignment_statements.c \
mlr_dsl_cst_unset_statements.c \
mlr_dsl_cst_condish_statements.c \
mlr_dsl_cst_for_srec_statements.c \
mlr_dsl_cst_for_map_statements.c \
mlr_dsl_cst_triple_for_statements.c \
mlr_dsl_cst_loop_control_statements.c \
mlr_dsl_cst_return_statements.c \
mlr_dsl_cst_output_statements.c \
mlr_dsl_stack_allocate.c
libdsl_la_LIBADD= ../lib/libmlr.la ../cli/libcli.la ../input/libinput.la
# TODO: replace the interesting content with unit tests; jettison the rest
# TODO: Does not build
#noinst_PROGRAMS= evl
#evl_SOURCES= rval_evaluators.c
#evl_LDADD= libdsl.la ../containers/libcontainers.la ../lib/libmlr.la
#evl_CPPFLAGS= -D__LREC_EVALUATORS_MAIN__ ${AM_CPPFLAGS}
AM_CPPFLAGS= -I${srcdir}/../
AM_CFLAGS= -std=gnu99

View file

@ -1,8 +1,8 @@
#include "lib/mlr_globals.h"
#include "lib/mlrutil.h"
#include "mapping/function_manager.h"
#include "mapping/context_flags.h"
#include "mapping/rval_evaluators.h"
#include "dsl/function_manager.h"
#include "dsl/context_flags.h"
#include "dsl/rval_evaluators.h"
// ----------------------------------------------------------------
typedef enum _func_class_t {

View file

@ -4,9 +4,9 @@
#include "containers/mlrval.h"
#include "containers/lhmsv.h"
#include "containers/hss.h"
#include "mapping/mlr_dsl_ast.h"
#include "mapping/rval_evaluator.h"
#include "mapping/type_inference.h"
#include "dsl/mlr_dsl_ast.h"
#include "dsl/rval_evaluator.h"
#include "dsl/type_inference.h"
// ----------------------------------------------------------------
// Things a user-defined function (however it is implemented) needs in order to

View file

@ -1,6 +1,6 @@
#include <string.h>
#include "lib/mlrutil.h"
#include "mapping/mlr_dsl_ast.h"
#include "dsl/mlr_dsl_ast.h"
// ----------------------------------------------------------------
mlr_dsl_ast_t* mlr_dsl_ast_alloc() {

View file

@ -1,6 +1,6 @@
#include "lib/mlr_globals.h"
#include "lib/mlrutil.h"
#include "mapping/mlr_dsl_blocked_ast.h"
#include "dsl/mlr_dsl_blocked_ast.h"
// ----------------------------------------------------------------
blocked_ast_t* blocked_ast_alloc(mlr_dsl_ast_t* past) {

View file

@ -1,7 +1,7 @@
#ifndef MLR_DSL_BLOCKED_AST_H
#define MLR_DSL_BLOCKED_AST_H
#include "mapping/mlr_dsl_ast.h"
#include "dsl/mlr_dsl_ast.h"
#include "containers/sllv.h"
// ================================================================

View file

@ -6,11 +6,11 @@
#include "context_flags.h"
// ================================================================
// The Lemon parser in dsls/mlr_dsl_parse.y builds up an abstract syntax tree
// The Lemon parser in parsing/mlr_dsl_parse.y builds up an abstract syntax tree
// specifically for the CST builder here.
//
// For clearer visuals on what the ASTs look like:
// * See dsls/mlr_dsl_parse.y
// * See parsing/mlr_dsl_parse.y
// * See reg_test/run's filter -v and put -v outputs, e.g. in reg_test/expected/out
// * Do "mlr -n put -v 'your expression goes here'"
// ================================================================

View file

@ -2,14 +2,14 @@
#define MLR_DSL_CST_H
#include "cli/mlrcli.h"
#include "mapping/mlr_dsl_ast.h"
#include "containers/type_decl.h"
#include "containers/lhmsmv.h"
#include "containers/local_stack.h"
#include "containers/loop_stack.h"
#include "mapping/mlr_dsl_blocked_ast.h"
#include "mapping/rval_evaluators.h"
#include "mapping/function_manager.h"
#include "containers/type_decl.h"
#include "dsl/mlr_dsl_ast.h"
#include "dsl/mlr_dsl_blocked_ast.h"
#include "dsl/rval_evaluators.h"
#include "dsl/function_manager.h"
#include "output/multi_out.h"
#include "output/multi_lrec_writer.h"
@ -53,7 +53,7 @@
// ================================================================
// ----------------------------------------------------------------
// mapping/mlr_dsl_stack_allocate.c
// dsl/mlr_dsl_stack_allocate.c
// Two-pass stack allocator which operates on the block-structured AST
// before the CST is build (mlr_dsl_stack_allocate.c).
void blocked_ast_allocate_locals(blocked_ast_t* paast, int trace);
@ -248,7 +248,7 @@ void mlr_dsl_cst_handle_statement_list(
cst_outputs_t* pcst_outputs);
// ================================================================
// mapping/mlr_dsl_cst_func_subr.c
// dsl/mlr_dsl_cst_func_subr.c
// ----------------------------------------------------------------
// cst_udf_state_t is data needed to execute the body of a user-defined function which is implemented by CST statements.
@ -304,7 +304,7 @@ void mlr_dsl_cst_execute_subroutine(subr_defsite_t* pstate, variables_t* pvars,
// ================================================================
// For on-line help / manpage
// mapping/mlr_dsl_cst_keywords.c
// dsl/mlr_dsl_cst_keywords.c
void mlr_dsl_list_all_keywords_raw(FILE* output_stream);
@ -315,7 +315,7 @@ void mlr_dsl_keyword_usage(FILE* output_stream, char* keyword);
// Specific CST-statement subclasses
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// mapping/mlr_dsl_cst_condish_statements.c
// dsl/mlr_dsl_cst_condish_statements.c
mlr_dsl_cst_statement_allocator_t alloc_conditional_block;
mlr_dsl_cst_statement_allocator_t alloc_if_head;
mlr_dsl_cst_statement_allocator_t alloc_while;
@ -336,12 +336,12 @@ mlr_dsl_cst_statement_t* alloc_final_filter(
int context_flags);
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// mapping/mlr_dsl_cst_terminal_assignment_statements.c
// dsl/mlr_dsl_cst_terminal_assignment_statements.c
mlr_dsl_cst_statement_allocator_t alloc_srec_assignment;
mlr_dsl_cst_statement_allocator_t alloc_indirect_srec_assignment;
mlr_dsl_cst_statement_allocator_t alloc_env_assignment;
// mapping/mlr_dsl_cst_map_assignment_statements.c
// dsl/mlr_dsl_cst_map_assignment_statements.c
mlr_dsl_cst_statement_allocator_t alloc_full_srec_assignment;
mlr_dsl_cst_statement_t* alloc_local_variable_definition(
mlr_dsl_cst_t* pcst,
@ -355,15 +355,15 @@ mlr_dsl_cst_statement_allocator_t alloc_oosvar_assignment;
mlr_dsl_cst_statement_allocator_t alloc_full_oosvar_assignment;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// mapping/mlr_dsl_cst_unset_statements.c
// dsl/mlr_dsl_cst_unset_statements.c
mlr_dsl_cst_statement_allocator_t alloc_unset;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// mapping/mlr_dsl_cst_for_srec_statements.c
// dsl/mlr_dsl_cst_for_srec_statements.c
mlr_dsl_cst_statement_allocator_t alloc_for_srec;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// mapping/mlr_dsl_cst_for_map_statements.c
// dsl/mlr_dsl_cst_for_map_statements.c
mlr_dsl_cst_statement_allocator_t alloc_for_oosvar;
mlr_dsl_cst_statement_allocator_t alloc_for_oosvar_key_only;
mlr_dsl_cst_statement_allocator_t alloc_for_local_map;
@ -372,21 +372,21 @@ mlr_dsl_cst_statement_allocator_t alloc_for_map_literal;
mlr_dsl_cst_statement_allocator_t alloc_for_map_literal_key_only;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// mapping/mlr_dsl_cst_triple_for_statements.c
// dsl/mlr_dsl_cst_triple_for_statements.c
mlr_dsl_cst_statement_allocator_t alloc_triple_for;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// mapping/mlr_dsl_cst_loop_control_statements.c
// dsl/mlr_dsl_cst_loop_control_statements.c
mlr_dsl_cst_statement_allocator_t alloc_break;
mlr_dsl_cst_statement_allocator_t alloc_continue;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// mapping/mlr_dsl_cst_return_statements.c
// dsl/mlr_dsl_cst_return_statements.c
mlr_dsl_cst_statement_allocator_t alloc_return_void; // For subroutines
mlr_dsl_cst_statement_allocator_t alloc_return_value; // For UDFs
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// mapping/mlr_dsl_cst_output_statements.c
// dsl/mlr_dsl_cst_output_statements.c
mlr_dsl_cst_statement_t* alloc_print(
mlr_dsl_cst_t* pcst,
@ -416,7 +416,7 @@ mlr_dsl_cst_statement_t* alloc_emit_lashed(
mlr_dsl_cst_statement_allocator_t alloc_dump;
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// mapping/mlr_dsl_cst_func_subr.c
// dsl/mlr_dsl_cst_func_subr.c
// When we allocate a callsite we can do so before the callee has been defined.
// Hence the two-step process, with the second step being an object-binding step.

View file

@ -16,7 +16,7 @@ typedef void keyword_usage_func_t(FILE* ostream);
// NR
// PI
// Should match the keywords defined in dsls/mlr_dsl_lexer.l.
// Should match the keywords defined in parsing/mlr_dsl_lexer.l.
static keyword_usage_func_t mlr_dsl_all_keyword_usage;
static keyword_usage_func_t mlr_dsl_begin_keyword_usage;
@ -109,7 +109,7 @@ static int KEYWORD_USAGE_TABLE_SIZE = sizeof(KEYWORD_USAGE_TABLE)/sizeof(KEYWORD
// ================================================================
// Pass function_name == NULL to get usage for all keywords.
// Note keywords are defined in dsls/mlr_dsl_lexer.l.
// Note keywords are defined in parsing/mlr_dsl_lexer.l.
void mlr_dsl_keyword_usage(FILE* ostream, char* keyword) {
if (keyword == NULL) {
for (int i = 0; i < KEYWORD_USAGE_TABLE_SIZE; i++) {

View file

@ -5,11 +5,11 @@
#include "context_flags.h"
// ================================================================
// The Lemon parser in dsls/mlr_dsl_parse.y builds up an abstract syntax tree
// The Lemon parser in parsing/mlr_dsl_parse.y builds up an abstract syntax tree
// specifically for the CST builder here.
//
// For clearer visuals on what the ASTs look like:
// * See dsls/mlr_dsl_parse.y
// * See parsing/mlr_dsl_parse.y
// * See reg_test/run's filter -v and put -v outputs, e.g. in reg_test/expected/out
// * Do "mlr -n put -v 'your expression goes here'"
// ================================================================

View file

@ -3,8 +3,8 @@
#include "lib/mlrutil.h"
#include "containers/free_flags.h"
#include "containers/lhmsi.h"
#include "mapping/mlr_dsl_blocked_ast.h"
#include "mapping/context_flags.h"
#include "dsl/mlr_dsl_blocked_ast.h"
#include "dsl/context_flags.h"
// ================================================================
// This is a two-pass stack allocator for the Miller DSL.

View file

@ -2,9 +2,9 @@
#define RVAL_EVALUATORS_H
#include <stdio.h>
#include "mapping/mlr_dsl_ast.h"
#include "mapping/rval_evaluator.h"
#include "mapping/function_manager.h"
#include "dsl/mlr_dsl_ast.h"
#include "dsl/rval_evaluator.h"
#include "dsl/function_manager.h"
// ================================================================
// NOTES:

View file

@ -7,9 +7,9 @@
#include "lib/mlrregex.h"
#include "lib/mtrand.h"
#include "mapping/mapper.h"
#include "mapping/rval_evaluators.h"
#include "mapping/function_manager.h"
#include "mapping/context_flags.h"
#include "dsl/rval_evaluators.h"
#include "dsl/function_manager.h"
#include "dsl/context_flags.h"
// ================================================================
// See comments in rval_evaluators.h

View file

@ -7,8 +7,8 @@
#include "lib/mlrregex.h"
#include "lib/mtrand.h"
#include "mapping/mapper.h"
#include "mapping/context_flags.h"
#include "mapping/rval_evaluators.h"
#include "dsl/context_flags.h"
#include "dsl/rval_evaluators.h"
// ----------------------------------------------------------------
typedef struct _rval_evaluator_variadic_state_t {

View file

@ -7,7 +7,7 @@
#include "lib/mlrregex.h"
#include "lib/mtrand.h"
#include "mapping/mapper.h"
#include "mapping/rval_evaluators.h"
#include "dsl/rval_evaluators.h"
// ================================================================
// See comments in rval_evaluators.h

View file

@ -6,11 +6,11 @@
#include "lib/mlrutil.h"
#include "lib/mlrregex.h"
#include "lib/mtrand.h"
#include "dsl/mlr_dsl_cst.h" // xxx only for allocate_keylist_evaluators_from_ast_node -- xxx move
#include "dsl/context_flags.h"
#include "dsl/rval_evaluators.h"
#include "dsl/function_manager.h"
#include "mapping/mapper.h"
#include "mapping/rval_evaluators.h"
#include "mapping/function_manager.h"
#include "mapping/mlr_dsl_cst.h" // xxx only for allocate_keylist_evaluators_from_ast_node -- xxx move
#include "mapping/context_flags.h"
// ================================================================
// See comments in rval_evaluators.h

View file

@ -1,14 +1,5 @@
noinst_LTLIBRARIES= libmapping.la
libmapping_la_SOURCES= \
context_flags.h \
function_manager.h \
function_manager.c \
rval_evaluator.h \
rval_evaluators.h \
rval_expr_evaluators.c \
rxval_expr_evaluators.c \
rval_func_evaluators.c \
rval_list_evaluators.c \
mapper.h \
mapper_bar.c \
mapper_bootstrap.c \
@ -48,29 +39,8 @@ libmapping_la_SOURCES= \
mapper_top.c \
mapper_uniq.c \
mappers.h \
mlr_dsl_ast.c \
mlr_dsl_ast.h \
mlr_dsl_blocked_ast.c \
mlr_dsl_blocked_ast.h \
mlr_dsl_cst.c \
mlr_dsl_cst.h \
mlr_dsl_cst_func_subr.c \
mlr_dsl_cst_keywords.c \
mlr_dsl_cst_statements.c \
mlr_dsl_cst_scalar_assignment_statements.c \
mlr_dsl_cst_map_assignment_statements.c \
mlr_dsl_cst_unset_statements.c \
mlr_dsl_cst_condish_statements.c \
mlr_dsl_cst_for_srec_statements.c \
mlr_dsl_cst_for_map_statements.c \
mlr_dsl_cst_triple_for_statements.c \
mlr_dsl_cst_loop_control_statements.c \
mlr_dsl_cst_return_statements.c \
mlr_dsl_cst_output_statements.c \
mlr_dsl_stack_allocate.c \
stats1_accumulators.c \
stats1_accumulators.h \
type_inference.h
stats1_accumulators.h
libmapping_la_LIBADD= ../lib/libmlr.la ../cli/libcli.la ../input/libinput.la
# TODO: replace the interesting content with unit tests; jettison the rest

View file

@ -6,10 +6,10 @@
#include "containers/sllv.h"
#include "containers/lhmsv.h"
#include "containers/mlhmmv.h"
#include "parsing/mlr_dsl_wrapper.h"
#include "dsl/rval_evaluators.h"
#include "dsl/mlr_dsl_cst.h"
#include "mapping/mappers.h"
#include "mapping/rval_evaluators.h"
#include "dsls/mlr_dsl_wrapper.h"
#include "mlr_dsl_cst.h"
#define DEFAULT_OOSVAR_FLATTEN_SEPARATOR ":"

View file

@ -20,12 +20,12 @@ top: mlr_dsl_lexer.o mlr_dsl_parse.o mlr_dsl_wrapper.o
# ----------------------------------------------------------------
mlr_dsl_wrapper.o: mlr_dsl_wrapper.c mlr_dsl_wrapper.h mlr_dsl_parse.h \
../lib/mlrutil.h ../mapping/mlr_dsl_ast.h ../containers/sllv.h
../lib/mlrutil.h ../dsl/mlr_dsl_ast.h ../containers/sllv.h
$(CC) -Wall $(DSLCFLAGS) -c -std=gnu99 mlr_dsl_wrapper.c
mlr_dsl_parse.o: mlr_dsl_parse.c mlr_dsl_parse.h
$(CC) $(DSLCFLAGS) -c -std=gnu99 mlr_dsl_parse.c
mlr_dsl_parse.c mlr_dsl_parse.h: mlr_dsl_parse.y lemon ../mapping/mlr_dsl_ast.h ../containers/sllv.h
mlr_dsl_parse.c mlr_dsl_parse.h: mlr_dsl_parse.y lemon ../dsl/mlr_dsl_ast.h ../containers/sllv.h
./lemon -s mlr_dsl_parse.y
mv mlr_dsl_parse.c mlr_dsl_parse.c.tmp
sed \
@ -48,12 +48,12 @@ mlr_dsl_parse.c mlr_dsl_parse.h: mlr_dsl_parse.y lemon ../mapping/mlr_dsl_ast.h
mlr_dsl_lexer.o: mlr_dsl_lexer.c mlr_dsl_lexer.h mlr_dsl_parse.h
$(CC) $(DSLCFLAGS) -c -std=gnu99 mlr_dsl_lexer.c
mlr_dsl_lexer.c mlr_dsl_lexer.h: mlr_dsl_lexer.l ../mapping/mlr_dsl_ast.h
mlr_dsl_lexer.c mlr_dsl_lexer.h: mlr_dsl_lexer.l ../dsl/mlr_dsl_ast.h
flex --prefix=mlr_dsl_lexer_ --outfile=mlr_dsl_lexer.c --header-file=mlr_dsl_lexer.h mlr_dsl_lexer.l
mlr_dsl: mlr_dsl_wrapper_main.c mlr_dsl_wrapper.c mlr_dsl_wrapper.h mlr_dsl_parse.h mlr_dsl_lexer.o mlr_dsl_parse.o ../lib/mlrutil.c ../lib/mlrutil.h ../lib/mlr_globals.c ../lib/mlr_globals.h ./../mapping/mlr_dsl_ast.h \
../lib/mlrutil.c ../containers/sllv.c ./../mapping/mlr_dsl_ast.c
$(CC) -Wall $(DSLCFLAGS) -std=gnu99 mlr_dsl_wrapper_main.c mlr_dsl_wrapper.c mlr_dsl_lexer.o mlr_dsl_parse.o ../lib/mlrutil.c ../lib/mlr_globals.c ../containers/sllv.c ./../mapping/mlr_dsl_ast.c -o mlr_dsl
mlr_dsl: mlr_dsl_wrapper_main.c mlr_dsl_wrapper.c mlr_dsl_wrapper.h mlr_dsl_parse.h mlr_dsl_lexer.o mlr_dsl_parse.o ../lib/mlrutil.c ../lib/mlrutil.h ../lib/mlr_globals.c ../lib/mlr_globals.h ./../dsl/mlr_dsl_ast.h \
../lib/mlrutil.c ../containers/sllv.c ./../dsl/mlr_dsl_ast.c
$(CC) -Wall $(DSLCFLAGS) -std=gnu99 mlr_dsl_wrapper_main.c mlr_dsl_wrapper.c mlr_dsl_lexer.o mlr_dsl_parse.o ../lib/mlrutil.c ../lib/mlr_globals.c ../containers/sllv.c ./../dsl/mlr_dsl_ast.c -o mlr_dsl
# ----------------------------------------------------------------
ex0: ex0_wrapper.c ex0_wrapper.h ex0_parse.h ex0_lexer.o ex0_parse.o ../lib/mlrutil.c ../lib/mlrutil.h ../lib/mlr_globals.c ../lib/mlr_globals.h ./ex_ast.h \

View file

@ -2,11 +2,11 @@
#include "stdio.h" // for fileno() prototype
#include "string.h" // for strdup() prototype
#include "mlr_dsl_parse.h"
#include "../mapping/mlr_dsl_ast.h"
#include "../dsl/mlr_dsl_ast.h"
// http://flex.sourceforge.net/manual/Extra-Data.html
// NOTE: any new keywords defined here should also be documented
// in mapping/mlr_dsl_cst.c's mlr_dsl_keyword_usage() et al.
// in dsl/mlr_dsl_cst.c's mlr_dsl_keyword_usage() et al.
%}
%option reentrant

View file

@ -6,7 +6,7 @@
#include <string.h>
#include <math.h>
#include "../lib/mlrutil.h"
#include "../mapping/mlr_dsl_ast.h"
#include "../dsl/mlr_dsl_ast.h"
#include "../containers/sllv.h"
// ================================================================

View file

@ -4,7 +4,7 @@
#include "mlr_dsl_lexer.h"
#include "mlr_dsl_parse.h"
#include "../lib/mlrutil.h"
#include "../mapping/mlr_dsl_ast.h"
#include "../dsl/mlr_dsl_ast.h"
#include "../containers/sllv.h"
// These prototypes are copied out manually from mlr_dsl_parse.c. With some

View file

@ -1,6 +1,6 @@
#ifndef MLR_DSL_WRAPPER_H
#define MLR_DSL_WRAPPER_H
#include "../mapping/mlr_dsl_ast.h"
#include "../dsl/mlr_dsl_ast.h"
mlr_dsl_ast_t* mlr_dsl_parse(char* string, int trace_parse);

View file

@ -3,9 +3,9 @@
#include "mlr_dsl_wrapper.h"
#include "mlr_dsl_lexer.h"
#include "mlr_dsl_parse.h"
#include "../lib/mlrutil.h"
#include "../mapping/mlr_dsl_ast.h"
#include "../containers/sllv.h"
#include "../lib/mlrutil.h"
#include "../dsl/mlr_dsl_ast.h"
// ----------------------------------------------------------------
int main(int argc, char** argv) {

View file

@ -18,11 +18,11 @@ NON-RELEASE:
OTHER:
! linepart/parapart -> gh.jk/scx
! non-string =~ regex: coerce LHS to string
* mlr paste (sjackman)
* don't dump full help on unrecognized flag. WAY too much info. just print short, w/ info on how to get long.
* typeof -> include 'map' and 'srec'
* dump @records after @records[NR]=$*: json "1" rather than 1 indices are b04k3d
* rename dsls/ to parsers; mapping -> mappers & dsl ?
! 'Error code 1' -> clearer on regdiff fail

View file

@ -9,8 +9,8 @@ wc -l \
output/*.[ch] \
stream/*.[ch] \
unit_test/*.[ch] \
dsls/mlr*.[ly] \
dsls/mlr*wrapper*.[ch] \
parsing/mlr*.[ly] \
parsing/mlr*wrapper*.[ch] \
| sort -n
echo
@ -23,7 +23,7 @@ wc -c \
output/*.[ch] \
stream/*.[ch] \
unit_test/*.[ch] \
dsls/mlr*.[ly] \
dsls/mlr*wrapper*.[ch] \
parsing/mlr*.[ly] \
parsing/mlr*wrapper*.[ch] \
| sort -n | tail -n 5

View file

@ -19,9 +19,10 @@ AM_CFLAGS= -Wall -std=gnu99
all_ldadd= \
../lib/libmlr.la \
../containers/libcontainers.la \
../dsls/libdsl.la \
../parsing/libdsl.la \
../cli/libcli.la \
../input/libinput.la \
../dsl/libdsl.la \
../mapping/libmapping.la \
../output/liboutput.la \
../stream/libstream.la \

View file

@ -1,7 +1,7 @@
#include "lib/mlr_globals.h"
#include "lib/minunit.h"
#include "mapping/rval_evaluators.h"
#include "mapping/function_manager.h"
#include "dsl/rval_evaluators.h"
#include "dsl/function_manager.h"
// ----------------------------------------------------------------
int tests_run = 0;

View file

@ -17,13 +17,14 @@ LT_INIT
# TODO: better source handling for lemon sources?
# perhaps lemon can be improved to survive being called from the build dir
AC_CONFIG_LINKS([c/dsls/lempar.c:c/dsls/lempar.c])
AC_CONFIG_LINKS([c/dsls/mlr_dsl_parse.y:c/dsls/mlr_dsl_parse.y])
AC_CONFIG_LINKS([c/parsing/lempar.c:c/parsing/lempar.c])
AC_CONFIG_LINKS([c/parsing/mlr_dsl_parse.y:c/parsing/mlr_dsl_parse.y])
AC_CONFIG_FILES([Makefile
c/cli/Makefile
c/containers/Makefile
c/dsls/Makefile
c/parsing/Makefile
c/dsl/Makefile
c/experimental/Makefile
c/input/Makefile
c/lib/Makefile

Some files were not shown because too many files have changed in this diff Show more