=== modified file 'bin/aat_macros.sed' --- bin/aat_macros.sed 2013-09-28 19:59:05 +0000 +++ bin/aat_macros.sed 2013-09-16 23:15:18 +0000 @@ -7,7 +7,6 @@ s/^[[:space:]]*ENDIF[[:space:]]*$/}/ s/^[[:space:]]*@for[[:space:]]\+\([[:alnum:]]\+\)[[:space:]]\+in[[:space:]]\+\(.\+\)$/for(_loop_\1=loop_start("\2", "\1."); loop_iter(_loop_\1);) {/ -s/^[[:space:]]*@for[[:space:]]\+\([[:alnum:]]\+\)[[:space:]]\+var[[:space:]]\+\(.\+\)$/for(_loop_\1=loop_start(\2, "\1."); loop_iter(_loop_\1);) {/ s/^[[:space:]]*@endfor[[:space:]]*$/} loop_end()/ s/^[[:space:]]*@if[[:space:]]\+\(.\+\)$/if(\1) {\n/ s/^[[:space:]]*@elif[[:space:]]\+\(.\+\)$/} else if(\1) {\n/ === modified file 'data.awk' --- data.awk 2013-09-28 19:59:05 +0000 +++ data.awk 2013-09-16 23:15:18 +0000 @@ -27,7 +27,7 @@ next } -/^[a-zA-Z_][a-zA-Z0-9_.]*=\[$/ { +/^[a-zA-Z_][a-zA-Z0-9_]*=\[$/ { # start of field list state = 1 m = match($0, ident_re) @@ -35,7 +35,7 @@ next } -/^[a-zA-Z_][a-zA-Z0-9_.]*=/ { +/^[a-zA-Z_][a-zA-Z0-9_]*=/ { m = match($0, ident_re) varname = substr($0, m, RLENGTH) V[varname] = substr($0, m+1+RLENGTH) @@ -48,12 +48,9 @@ next } -/^#/ { next } -/^$/ { next } - { # TODO posix compliance - print "data.awk: unparseable line: '"$0"'" >"/dev/stderr" + print "unparseable line: " $0 >"/dev/stderr" exit 1 } @@ -115,10 +112,6 @@ return V[varname] } -function or_(a, b) { - return a ? a : b -} - # for testing it out, set TEST=1 on commandline END { if(TEST) {