summaryrefslogtreecommitdiffstats
path: root/eshtrans
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2017-02-08 23:15:41 (EST)
committer P. J. McDermott <pj@pehjota.net>2017-02-08 23:15:41 (EST)
commitbc9920000d09225536556a0ea4fc705101ceac67 (patch)
tree1b328ef399a2e64b066c741e17dcbe3446b33daf /eshtrans
parent958ce6861a0a174245e8a60379eeffa45c49bb87 (diff)
downloadeggshell-bc9920000d09225536556a0ea4fc705101ceac67.zip
eggshell-bc9920000d09225536556a0ea4fc705101ceac67.tar.gz
eggshell-bc9920000d09225536556a0ea4fc705101ceac67.tar.bz2
Revert "eshtrans/frontend: Replace printf calls with array"
This reverts commit 958ce6861a0a174245e8a60379eeffa45c49bb87.
Diffstat (limited to 'eshtrans')
-rw-r--r--eshtrans/frontend/lexer.esh14
1 files changed, 1 insertions, 13 deletions
diff --git a/eshtrans/frontend/lexer.esh b/eshtrans/frontend/lexer.esh
index 5854a35..8ce6510 100644
--- a/eshtrans/frontend/lexer.esh
+++ b/eshtrans/frontend/lexer.esh
@@ -30,7 +30,6 @@ here_queue=
here_awaiting_end=
here_awaiting_word=
tok=
-tokc=
#dbg()
#{
@@ -857,7 +856,6 @@ run_sublexer()
here_queue=''
here_awaiting_end=false
here_awaiting_word=false
- tokc=0
lbufi="${i}"
lsetc
@@ -874,10 +872,6 @@ run_sublexer()
;;
esac
- eval "printf '%s' \"$(printf '${tokv_%d}' $(awk \
- -v end=${tokc} \
- 'BEGIN { for (i = 0; i < end; ++i) print(i); }'))\""
-
printf "${RS}%d${RS}%d" ${lineno} ${lbufi}
return 0
}
@@ -900,7 +894,6 @@ run_lexer()
here_queue=''
here_awaiting_end=false
here_awaiting_word=false
- tokc=0
# Read file into array
eval "$(printf '%s' "${buf}" | awk -v FS='' -v j=0 \
@@ -929,10 +922,6 @@ run_lexer()
synexp ''
fi
- eval "printf '%s' \"$(printf '${tokv_%d}' $(awk \
- -v end=${tokc} \
- 'BEGIN { for (i = 0; i < end; ++i) print(i); }'))\""
-
return 0
}
@@ -1080,8 +1069,7 @@ accept()
esac
#dbg "accept $t"
- eval "tokv_${tokc}=\${tok}\${RS}"
- tokc=$((${tokc} + 1))
+ printf '%s' "${tok}${RS}"
next
return 0
}