% here's the example
\input generic.tex
\input bnf.tex
\begingrammar
%
: {$\phi$};
.\par
: "$\{$" "$\}$" [";"] ;
[";"] ;
";".
: ";" ;
.
: "if" "(" ")" ["else" ];
"case" "$\{$" "$\}$";
"for" "(" ";" ";" ")",
;
"while" "(" ")" ;
"do" "while" "(" ")";
"sum" "(" ";" ")" ;
"product" "(" ";" ")" ;
"break";
"continue";
"return" ;
"clear";
"load" ;
"save" ;
"release" ;
"show" ["variables" | "functions" | "set" | "all" | ];
"set" ["prompt" | "precision"] [];
.
: "case" ":" ;
"default:"
: "=" ;
"[" "]" = ;
= ;
.
: "," ;
",";
"," .
: "+" ;
"--" .
: .
.
: ;
"+" ;
"--" ;
"(" ")";
;
"[" "]";
;
;
.
: "++" | "--{\kern 1pt}--" | "$\sim$" | "!".
: "$\uparrow$"
| "**" ;
"++" | "--{\kern 1pt}--" | "!".
: "[" "]".
: "[" "]" [","] ;
"[" "]" [","] ;
.
: [ ] "," ;
[ ] .
: "(" ")".
: $\phi$;
"," ;
"\dots".
: " `` " " '' ".
: ;
"$\{$" "," "$\}$";
{$\backslash$}b[01][01]+;
{$\backslash$}o[07][07]+;
\$[0-9A-Fa-f][0-9A-Fa-f]+.
%: [\+--]?[0-9][0-9]+[\.[0-9]+]?[[eE][0-9][0-9]+].
: "*" | "/" | "$\backslash$" | "\%";
"==" | "!=" | "$>$" | "$<$"
| "$<$=" | "$>$=";
"\ul =" | "\ul !=" | "\ul $<$" | "\ul $>$"
| "\ul$<$=" | "\ul$>$=";
"\&" | "$\vert$" | "$\uparrow\uparrow$";
"\&\&" | "$\Vert$" | "\ul$\uparrow$".
\endgrammar
\bye