En casa del herrero, cuchillo de palo. (In the blacksmith's house, the spoon is wooden) Spanish saying
This folder contains a number of nom translation scripts which are also capable of translating themselves and other translation scripts as well.
The scripts which are currently working and reasonably debugged are rust | dart | lua | go | java | javascript | ruby | python | tcl | c
Here are some examples of how to translate a script into a target language listed above.
pep -f nom.tolua.pss -i "r;[\n]{lines;add ' ';}print;d;"
pep -f nom.tolua.pss -i "r;[\n]{lines;add ' ';}print;d;" > test.lua
echo -e "leaf \nbranch\n twig" | lua test.lua
# This will print each line numbered, or run with a file at input
# (but won't number the first line!)
cat /usr/share/dict/words | lua test.lua
pep -f tr/nom.tolua.pss eg/nom.syntax.reference.pss > syntax.lua
echo "read;add '/';print;clear;" | lua syntax.lua
# or run with a file at input
cat eg/palindrome.pss | lua syntax.lua
# or use the command line switches for input
# (but this is more for testing purposes)
lua syntax.lua --file eg/palindrome.pss
# or
lua syntax.lua --input "read;add '/';print;clear;"
You can also use the bash functions in bumble.sf.net/books/pars/helpers.pars.sh to translate into a particular language.
pep.rbs 'read;add".";print;clear;' 'abcd'