Both single and double quotes may be used in scripts and they have exactly the same role in the syntax of the nom language. But quoted text which starts with a double quote (") must end with a double quote, and the same rules applies to single quotes.
Quoted text can also span multiple lines.
r; '"' { add "<< single quote!\n"; print; } d;
If using the negation operator “!” in an “in-line” script, then enclose the whole thing in single quotes, so that the shell does not substitute the “!” character (or other special characters).
pep -e '![u-z],"/",";"{print;} clear;' -i "axbycz/;"
Prints: abc/;
The pep/nom language syntax allows quoted text to span more than one line. No special syntax is required and all special characters have the same meaning. This is mainly only useful as the argument to the “add” command, in order to improve the readability of scrips
begin { add '
A multi-line
argument for "add".
';
} print; clear; quit;
It is not necessary to have any space between a command and any quoted argument. This is because the pep/nom language knows how to parse itself (see bumble.sf.net/books/pars/compile.pss for the amazing details). In fact, “white-space” (\n\t\s\r\f) is not really significant anywhere in a nom script - except within quotes.
read; add"."; # this is ok!
replace"."".."; # this is be ok too.
print;clear;
# if the input is 'abc' this should print 'a..b..c..'
“ESCAPING” WITHIN QUOTES
The until command automatically recognises “escaped” quote characters, so it will not stop reading the input stream when it encounters \\" or \\'
r; 'a' { add 'A'; print; } d;
Within quoted text, certain “escaped” characters have a special meaning. These characters have the same meaning in double and single quotes.
d/- \\n - represents a 'newline' character
read; "\t" { clear; add " "; } print; clear;
r; "\t" { d; a " "; } t;d;
pep -f tr/ ??translate.go.pss -i 'r;"\t"{d;a" ";}t;d;' > notabs.go
go build -o notabs notabs.go
echo -e "no\ttabs\tplease!" | ?? notabs
# should print 'no tabs please!'