=== modified file 'bin/aat.awk' --- bin/aat.awk 2013-10-29 09:19:34 +0000 +++ bin/aat.awk 2013-10-13 22:19:07 +0000 @@ -17,7 +17,7 @@ if(!content) return # concatenate tokens of same type if the previous one doesn't end in newline if((!tok_finished[tok_n]) && tok_n && tok_type == tok_types[tok_n]) { - if(DEBUG) printf "concat \"%s\" \"%s\"\n", tok_contents[tok_n], content >"/dev/stderr" + if(DEBUG) printf "concat \"%s\" \"%s\"\n", tok_contents[tok_n], content tok_contents[tok_n] = tok_contents[tok_n] content } else { tok_types[++tok_n] = tok_type === modified file 'bin/query.awk' --- bin/query.awk 2013-10-29 09:19:34 +0000 +++ bin/query.awk 2013-10-29 08:18:37 +0000 @@ -47,7 +47,7 @@ while(length(line)) { if(DEBUG) printf "%d: →%s←\n", in_string, line >"/dev/stderr" if(in_string) { - if(match(line, /^(\\.|[^"\\])+/)) { + if(match(line, /^(\\[^"]|[^"\\])+/)) { out(substr(line, 1, RLENGTH)) line = substr(line, RLENGTH+1) } @@ -65,9 +65,6 @@ if(DEBUG) printf "%d: →%s←\n", in_string, line >"/dev/stderr" exit 1 } - } else if(match(line, /^#/)) { - out(line) - line = "" } else if(match(line, /[<"]/)) { out(substr(line, 1, RSTART-1)) line = substr(line, RSTART) @@ -77,17 +74,13 @@ out("\"") } else { if(DEBUG) printf "q: →%s← →%s←\n", last_out, line >"/dev/stderr" - if(match(last_out, /[\n\t([ ]$/) && \ - match(line, /^<([a-zA-Z0-9._<>]|'[^']*')*>/)) { + if(match(last_out, /[\n\t([ ]$/) && match(line, /^<([a-zA-Z0-9._]|'[^']*')*>/)) { expand_remaining = substr(line, 2, RLENGTH-2) line = substr(line, RLENGTH+1) out(expand_query()) } else if(match(line, /^<[^<"]*/)) { - if(DEBUG) printf("SKIP: →%s← →%s← →%s←\n", last_out, \ - substr(line, 1, RLENGTH), substr(line, RLENGTH+1) \ - ) >"/dev/stderr" - out(substr(line, 1, RLENGTH)) - line = substr(line, RLENGTH+1) + out(substr(line, 1, RSTART-1)) + line = substr(line, RSTART) } else { out(line) line = ""