This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id,name,account,date,type,state | |
00,chrisbra,github,06/12/2015,credit card,sale | |
00,chrisbra,github,06/13/2015,credit card,sale | |
00,chrisbra,github,06/14/2015,credit card,sale | |
00,chrisbra,github,06/15/2015,credit card,sale | |
00,chrisbra,github,06/17/2015,credit card,sale | |
00,chrisbra,github,06/18/2015,credit card,sale | |
00,chrisbra,github,06/19/2015,credit card,sale | |
00,chrisbra,github,06/20/2015,credit card,sale | |
00,chrisbra,github,06/21/2015,credit card,sale |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trans_count,trans_amount,portal_fee,sum | |
70,3.50,16.50,20 | |
291,14.55,5.45,20 | |
583,29.15,0,29.15 | |
694,34.70,0,34.7 | |
67,3.35,16.65,20 | |
4431,132.93,0,132.93 | |
142,7.10,12.90,20 | |
379,18.95,1.05,20 | |
22,1.10,18.90,20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Say I have data like this: | |
Merchant ID,Txn Type | |
30422,Sale | |
30430,Sale | |
30414,Sale | |
30391,Sale | |
30412,Sale | |
30402,Sale | |
30405,Sale |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
make | |
tclsh tools/assemble.tcl sqawk-dev.tcl > sqawk.tcl | |
tclsh tests.tcl | |
==== test1 Handle broken pipe, read from stdin FAILED | |
==== Contents of test case: | |
with-temp-files filename ch { | |
puts $ch "line 1\nline 2\nline 3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% make | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
make -C dsls put_dsl_parse.o | |
clang -o lemon lemon.c | |
lemon.c:2277:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] | |
static preprocess_input(char *z){ | |
~~~~~~ ^ | |
lemon.c:2327:1: warning: control may reach end of non-void function [-Wreturn-type] | |
} | |
^ | |
lemon.c:2863:6: warning: use of out-of-scope declaration of 'access' | |
if (access(buf,004)==0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% sh test/run | |
test/../mlr cat test/input/abixy | |
test/../mlr cat /dev/null | |
test/../mlr cut -f a,x test/input/abixy | |
test/../mlr cut --complement -f a,x test/input/abixy | |
test/../mlr having-fields --at-least a,b test/input/abixy | |
test/../mlr having-fields --at-least a,c test/input/abixy | |
test/../mlr having-fields --at-least a,b,i,x,y test/input/abixy | |
test/../mlr having-fields --which-are a,b,i,x test/input/abixy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ make | |
make -C dsls put_dsl_parse.o | |
make[1]: Entering directory '/home/jungle/bin/miller/c/dsls' | |
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' \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% make | |
tclsh tools/assemble.tcl sqawk-dev.tcl > sqawk.tcl | |
tclsh tests.tcl | |
==== test1 Handle broken pipe, read from stdin FAILED | |
==== Contents of test case: | |
with-temp-files filename ch { | |
puts $ch "line 1\nline 2\nline 3" |
OlderNewer