Tokay's current implementation runs the provided program separately on every input file: tokay program.tok -- file1 file2 file3 runs tokay.tok on file1, file2 and file3 separately and sequentially. This might not always be intended.
This behavior should be customizable and moved into the VM/Parselet-main layer. awks way, for example, is to run the provided PROGRAM on all files. The nextfile instruction forces to continue the program flow on the next file.
Additionally, tokays current way of running a program sequentially and separately on all provided files could be improved to run on all files simultaneously and in parallel.
This should be configured by command-line switches, and needs further investigation.
So these 3 modes could be useful:
Run PROGRAM on files separately and sequentially (current behavior)
Run PROGRAM on files separately and in parallel (improvement of current behavior)
Run PROGRAM once on all files, sequentially, but keeping the runtime context. This might also require for a awk-style nextfile function or similar.
Tokay's current implementation runs the provided program separately on every input file:
tokay program.tok -- file1 file2 file3
runstokay.tok
onfile1
,file2
andfile3
separately and sequentially. This might not always be intended.This behavior should be customizable and moved into the VM/Parselet-main layer.
awk
s way, for example, is to run the provided PROGRAM on all files. Thenextfile
instruction forces to continue the program flow on the next file.Additionally,
tokay
s current way of running a program sequentially and separately on all provided files could be improved to run on all files simultaneously and in parallel.This should be configured by command-line switches, and needs further investigation.
So these 3 modes could be useful:
nextfile
function or similar.