bumble.sf.net language and parsing

plain text

## THE TRANSLATION FOLDER FOR THE PEP/NOM SYSTEM

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 [nom:translation.links]

### TRANSLATION EXAMPLES

Here are some examples of how to translate a script into a target language listed above.

translate an inline script to lua and print to stdout

 pep -f nom.tolua.pss -i "r;[\n]{lines;add ' ';}print;d;"

translate an inline script to lua and run with input 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 ,,,,

translate a nom script file to lua and run with input 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 nomsf://helpers.pars.sh to translate into a particular language.

translate inline script into ruby and run with input

 pep.rbs 'read;add".";print;clear;' 'abcd'