=== modified file 'bin/query_awk' --- bin/query_awk 2015-09-15 20:54:55 +0000 +++ bin/query_awk 2015-09-15 19:46:32 +0000 @@ -1,2 +1,5 @@ #!/bin/zsh -exec $0:A:h:h/query.pl "$@" +i=$1:a +query=$0:A:h:h/query.pl +cd || exit $? +exec $query $input === modified file 'query.pl' --- query.pl 2015-09-15 20:54:55 +0000 +++ query.pl 2015-09-10 11:06:23 +0000 @@ -155,13 +155,7 @@ parse_file(InFile) :- - ( open(InFile, read, Fd), read_stream_to_codes(Fd, Codes) - -> true - ; throw(read_error(InFile)) - ), - ( - % phrase_from_file(query_awk(Awk), InFile) - phrase(query_awk(Awk), Codes) + ( phrase_from_file(query_awk(Awk), InFile) -> true ; throw(parsing_failed(InFile)) ), @@ -186,8 +180,6 @@ % (phrase(out_awk(Awk), Out) -> true ; throw(formatting_failed(Awk))), % format('~s', [Out]). -prolog:message(read_error(File)) --> - ['Unable to read file: ~w'-[File]]. prolog:message(parsing_failed(File)) --> ['Unable to parse AWK/query file: ~w'-[File]]. prolog:message(formatting_failed(File,_)) --> === modified file 'query.test' --- query.test 2015-09-15 20:54:55 +0000 +++ query.test 2015-09-15 15:53:38 +0000 @@ -489,11 +489,3 @@ # END: bar/inherit/example/data.aat >>>2 >>>= 0 - -./querytest tests/query21 -<<< - if(DEBUG) printf "got scalar: %s ⇒ %s (%d)\n", varname, V[varname], m >"/dev/stderr" ->>> - if(DEBUG) printf "got scalar: %s ⇒ %s (%d)\n", varname, V[varname], m >"/dev/stderr" ->>>2 ->>>= 0