Skip to content

Instantly share code, notes, and snippets.

@jungle-boogie
Created August 21, 2015 22:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jungle-boogie/334cf40130db8c410a03 to your computer and use it in GitHub Desktop.
Save jungle-boogie/334cf40130db8c410a03 to your computer and use it in GitHub Desktop.
make -C dsls put_dsl_parse.o
gcc -o lemon lemon.c
./lemon put_dsl_parse.y
mv put_dsl_parse.c put_dsl_parse.c.tmp
sed -e 's/ParseTrace/put_dsl_ParseTrace/g' -e 's/ParseTokenName/put_dsl_ParseTokenName/g' -e 's/lemon_parser_alloc/put_dsl_lemon_parser_alloc/g' -e 's/lemon_parser_free/put_dsl_lemon_parser_free/g' -e 's/lemon_parser_parse_token/put_dsl_lemon_parser_parse_token/g' -e 's/yy_destructor/put_dsl_yy_destructor/g' put_dsl_parse.c.tmp > put_dsl_parse.c
rm -f put_dsl_parse.c.tmp
gcc -I.. -O3 -c -std=gnu99 put_dsl_parse.c
make -C dsls put_dsl_lexer.o
flex --prefix=put_dsl_lexer_ --outfile=put_dsl_lexer.c --header-file=put_dsl_lexer.h put_dsl_lexer.l
gcc -I.. -O3 -c -std=gnu99 put_dsl_lexer.c
make -C dsls put_dsl_wrapper.o
gcc -Wall -I.. -O3 -c -std=gnu99 put_dsl_wrapper.c
put_dsl_wrapper.c: In function 'put_dsl_parse_inner':
put_dsl_wrapper.c:24:3: warning: implicit declaration of function 'put_dsl_lemon_parser_parse_token' [-Wimplicit-function-declaration]
parse_code = put_dsl_lemon_parser_parse_token(pvparser, lex_code, plexed_node, pasts);
^
put_dsl_wrapper.c: In function 'put_dsl_parse':
put_dsl_wrapper.c:61:2: warning: implicit declaration of function 'put_dsl_lemon_parser_free' [-Wimplicit-function-declaration]
put_dsl_lemon_parser_free(pvparser, free);
^
make -C dsls filter_dsl_parse.o
./lemon filter_dsl_parse.y
mv filter_dsl_parse.c filter_dsl_parse.c.tmp
sed -e 's/ParseTrace/filter_dsl_ParseTrace/g' -e 's/ParseTokenName/filter_dsl_ParseTokenName/g' -e 's/lemon_parser_alloc/filter_dsl_lemon_parser_alloc/g' -e 's/lemon_parser_free/filter_dsl_lemon_parser_free/g' -e 's/lemon_parser_parse_token/filter_dsl_lemon_parser_parse_token/g' -e 's/yy_destructor/filter_dsl_yy_destructor/g' filter_dsl_parse.c.tmp > filter_dsl_parse.c
rm -f filter_dsl_parse.c.tmp
gcc -I.. -O3 -c -std=gnu99 filter_dsl_parse.c
make -C dsls filter_dsl_lexer.o
flex --prefix=filter_dsl_lexer_ --outfile=filter_dsl_lexer.c --header-file=filter_dsl_lexer.h filter_dsl_lexer.l
gcc -I.. -O3 -c -std=gnu99 filter_dsl_lexer.c
make -C dsls filter_dsl_wrapper.o
gcc -Wall -I.. -O3 -c -std=gnu99 filter_dsl_wrapper.c
filter_dsl_wrapper.c: In function 'filter_dsl_parse_inner':
filter_dsl_wrapper.c:23:3: warning: implicit declaration of function 'filter_dsl_lemon_parser_parse_token' [-Wimplicit-function-declaration]
parse_code = filter_dsl_lemon_parser_parse_token(pvparser, lex_code, plexed_node, past);
^
filter_dsl_wrapper.c: In function 'filter_dsl_parse':
filter_dsl_wrapper.c:59:2: warning: implicit declaration of function 'filter_dsl_lemon_parser_free' [-Wimplicit-function-declaration]
filter_dsl_lemon_parser_free(pvparser, free);
^
clang -std=gnu99 -I. -Wall -Werror -O3 *.c cli/*.c lib/*.c containers/*.c stream/*.c input/*.c mapping/*.c output/*.c ./dsls/put_dsl_parse.o ./dsls/put_dsl_lexer.o ./dsls/put_dsl_wrapper.o ./dsls/filter_dsl_parse.o ./dsls/filter_dsl_lexer.o ./dsls/filter_dsl_wrapper.o -lm -o mlr
clang -g -std=gnu99 -I. -Wall -Werror -D__TEST_MLRUTIL_MAIN__ lib/mlrutil.c lib/test_mlrutil.c -o test-mlrutil
clang -g -std=gnu99 -I. -Wall -Werror -D__TEST_LREC_MAIN__ lib/mlrutil.c lib/mlr_globals.c containers/lrec.c containers/header_keeper.c containers/sllv.c containers/slls.c containers/lhmslv.c input/file_reader_mmap.c input/file_reader_stdio.c input/lrec_reader_mmap_csv.c input/lrec_reader_stdio_csv.c input/lrec_reader_mmap_csvlite.c input/lrec_reader_stdio_csvlite.c input/lrec_reader_mmap_dkvp.c input/lrec_reader_stdio_dkvp.c input/lrec_reader_mmap_nidx.c input/lrec_reader_stdio_nidx.c input/lrec_reader_mmap_xtab.c input/lrec_reader_stdio_xtab.c containers/test_lrec.c -o test-lrec
clang -g -std=gnu99 -I. -Wall -Werror -D__TEST_JOIN_BUCKET_KEEPER_MAIN__ lib/mlrutil.c lib/mlr_globals.c mapping/context.c containers/lrec.c containers/sllv.c containers/slls.c containers/lhmslv.c containers/hss.c containers/mixutil.c containers/header_keeper.c containers/join_bucket_keeper.c input/lrec_reader_in_memory.c input/lrec_readers.c input/lrec_reader_mmap_csv.c input/lrec_reader_stdio_csv.c input/lrec_reader_mmap_csvlite.c input/lrec_reader_stdio_csvlite.c input/lrec_reader_mmap_dkvp.c input/lrec_reader_stdio_dkvp.c input/lrec_reader_mmap_nidx.c input/lrec_reader_stdio_nidx.c input/lrec_reader_mmap_xtab.c input/lrec_reader_stdio_xtab.c input/file_reader_mmap.c input/file_reader_stdio.c containers/test_join_bucket_keeper.c -o test-join-bucket-keeper
./test-mlrutil
TEST_MLRUTIL: ALL UNIT TESTS PASSED
Tests passed: 3 of 3
Assertions passed: 22 of 22
./test-lrec
Before rename:
field_count = 3
| phead: 0x800e15060 | ptail 0x800e15030
| prev: 0x0 curr: 0x800e15060 next: 0x800e150c0 | key: 2 | value: b |
| prev: 0x800e15060 curr: 0x800e150c0 next: 0x800e15030 | key: 3 | value: c |
| prev: 0x800e150c0 curr: 0x800e15030 next: 0x0 | key: 4 | value: d |
After rename:
field_count = 3
| phead: 0x800e15060 | ptail 0x800e15030
| prev: 0x0 curr: 0x800e15060 next: 0x800e150c0 | key: u | value: b |
| prev: 0x800e15060 curr: 0x800e150c0 next: 0x800e15030 | key: 3 | value: c |
| prev: 0x800e150c0 curr: 0x800e15030 next: 0x0 | key: 4 | value: d |
Before rename:
field_count = 3
| phead: 0x800e15060 | ptail 0x800e15030
| prev: 0x0 curr: 0x800e15060 next: 0x800e150c0 | key: u | value: b |
| prev: 0x800e15060 curr: 0x800e150c0 next: 0x800e15030 | key: 3 | value: c |
| prev: 0x800e150c0 curr: 0x800e15030 next: 0x0 | key: 4 | value: d |
After rename:
field_count = 2
| phead: 0x800e15060 | ptail 0x800e150c0
| prev: 0x0 curr: 0x800e15060 next: 0x800e150c0 | key: u | value: b |
| prev: 0x800e15060 curr: 0x800e150c0 next: 0x0 | key: 4 | value: c |
TEST_LREC: ALL UNIT TESTS PASSED
Tests passed: 5 of 5
Assertions passed: 84 of 84
./test-join-bucket-keeper
----------------------------------------------------------------
test00 enter
left records:
paired is null with rval="(eof)"; ok
unpaired length=0 with rval="(eof)"; ok:
test00 exit
----------------------------------------------------------------
test01 enter
left records:
paired is null with rval="0"; ok
unpaired is null with rval="0"; ok
paired is null with rval="(eof)"; ok
unpaired length=0 with rval="(eof)"; ok:
test01 exit
----------------------------------------------------------------
test0 enter
left records:
l=1,b=10
l=1,b=11
l=3,b=12
l=3,b=13
l=3,b=14
l=5,b=15
paired is null with rval="(eof)"; ok
unpaired length=6 with rval="(eof)"; ok:
l=1,b=10
l=1,b=11
l=3,b=12
l=3,b=13
l=3,b=14
l=5,b=15
test0 exit
----------------------------------------------------------------
test1 enter
left records:
l=1,b=10
l=1,b=11
l=3,b=12
l=3,b=13
l=3,b=14
l=5,b=15
paired is null with rval="0"; ok
unpaired is null with rval="0"; ok
paired is null with rval="(eof)"; ok
unpaired length=6 with rval="(eof)"; ok:
l=1,b=10
l=1,b=11
l=3,b=12
l=3,b=13
l=3,b=14
l=5,b=15
test1 exit
----------------------------------------------------------------
test2 enter
left records:
l=1,b=10
l=1,b=11
l=3,b=12
l=3,b=13
l=3,b=14
l=5,b=15
paired is null with rval="6"; ok
unpaired length=6 with rval="6"; ok:
l=1,b=10
l=1,b=11
l=3,b=12
l=3,b=13
l=3,b=14
l=5,b=15
paired is null with rval="(eof)"; ok
unpaired length=0 with rval="(eof)"; ok:
test2 exit
----------------------------------------------------------------
test3 enter
left records:
l=1,b=10
l=1,b=11
l=3,b=12
l=3,b=13
l=3,b=14
l=5,b=15
paired is null with rval="0"; ok
unpaired is null with rval="0"; ok
paired length=2 with rval="1"; ok:
l=1,b=10
l=1,b=11
unpaired is null with rval="1"; ok
paired length=2 with rval="1"; ok:
l=1,b=10
l=1,b=11
unpaired is null with rval="1"; ok
paired is null with rval="(eof)"; ok
unpaired length=4 with rval="(eof)"; ok:
l=3,b=12
l=3,b=13
l=3,b=14
l=5,b=15
test3 exit
----------------------------------------------------------------
test4 enter
left records:
l=1,b=10
l=1,b=11
l=3,b=12
l=3,b=13
l=3,b=14
l=5,b=15
paired is null with rval="2"; ok
unpaired length=2 with rval="2"; ok:
l=1,b=10
l=1,b=11
paired is null with rval="2"; ok
unpaired is null with rval="2"; ok
paired length=3 with rval="3"; ok:
l=3,b=12
l=3,b=13
l=3,b=14
unpaired is null with rval="3"; ok
paired is null with rval="(eof)"; ok
unpaired length=1 with rval="(eof)"; ok:
l=5,b=15
test4 exit
----------------------------------------------------------------
test5 enter
left records:
l=1,b=10
l=1,b=11
l=3,b=12
l=3,b=13
l=3,b=14
l=5,b=15
paired is null with rval="0"; ok
unpaired is null with rval="0"; ok
paired is null with rval="0"; ok
unpaired is null with rval="0"; ok
paired length=2 with rval="1"; ok:
l=1,b=10
l=1,b=11
unpaired is null with rval="1"; ok
paired length=2 with rval="1"; ok:
l=1,b=10
l=1,b=11
unpaired is null with rval="1"; ok
paired is null with rval="2"; ok
unpaired is null with rval="2"; ok
paired is null with rval="2"; ok
unpaired is null with rval="2"; ok
paired length=3 with rval="3"; ok:
l=3,b=12
l=3,b=13
l=3,b=14
unpaired is null with rval="3"; ok
paired length=3 with rval="3"; ok:
l=3,b=12
l=3,b=13
l=3,b=14
unpaired is null with rval="3"; ok
paired is null with rval="4"; ok
unpaired is null with rval="4"; ok
paired is null with rval="4"; ok
unpaired is null with rval="4"; ok
paired length=1 with rval="5"; ok:
l=5,b=15
unpaired is null with rval="5"; ok
paired length=1 with rval="5"; ok:
l=5,b=15
unpaired is null with rval="5"; ok
paired is null with rval="6"; ok
unpaired is null with rval="6"; ok
paired is null with rval="6"; ok
unpaired is null with rval="6"; ok
paired is null with rval="(eof)"; ok
unpaired length=0 with rval="6"; ok:
test5 exit
TEST_JOIN_BUCKET_KEEPER: ALL UNIT TESTS PASSED
Tests passed: 8 of 8
Assertions passed: 62 of 62
DONE
./test/run
make: exec(./test/run) failed (No such file or directory)
*** Error code 1
Stop.
make: stopped in /home/sean/bin/miller/c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment