This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2019/dev/Debian) (preloaded format=pdflatex 2021.6.6) 14 JUN 2021 22:33 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **\documentclass{article} *\usepackage{listings} (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2018/09/03 v1.4i Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo File: size10.clo 2018/09/03 v1.4i Standard LaTeX file (size option) ) \c@part=\count80 \c@section=\count81 \c@subsection=\count82 \c@subsubsection=\count83 \c@paragraph=\count84 \c@subparagraph=\count85 \c@figure=\count86 \c@table=\count87 \abovecaptionskip=\skip41 \belowcaptionskip=\skip42 \bibindent=\dimen102 ) *\usepackage[table]{xcolor} (/usr/share/texlive/texmf-dist/tex/latex/listings/listings.sty (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty Package: keyval 2014/10/28 v1.15 key=value parser (DPC) \KV@toks@=\toks14 ) \lst@mode=\count88 \lst@gtempboxa=\box27 \lst@token=\toks15 \lst@length=\count89 \lst@currlwidth=\dimen103 \lst@column=\count90 \lst@pos=\count91 \lst@lostspace=\dimen104 \lst@width=\dimen105 \lst@newlines=\count92 \lst@lineno=\count93 \lst@maxwidth=\dimen106 (/usr/share/texlive/texmf-dist/tex/latex/listings/lstmisc.sty File: lstmisc.sty 2018/09/02 1.7 (Carsten Heinz) \c@lstnumber=\count94 \lst@skipnumbers=\count95 \lst@framebox=\box28 ) (/usr/share/texlive/texmf-dist/tex/latex/listings/listings.cfg File: listings.cfg 2018/09/02 1.7 listings configuration )) Package: listings 2018/09/02 1.7 (Carsten Heinz) *\lstset{basicstyle=\ttfamily,numbers=left,frameround=ftft,frame=single} (/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty Package: xcolor 2016/05/11 v2.12 LaTeX color extensions (UK) (/usr/share/texlive/texmf-dist/tex/latex/graphics-cfg/color.cfg File: color.cfg 2016/01/02 v1.6 sample color configuration ) Package xcolor Info: Driver file: pdftex.def on input line 225. (/usr/share/texlive/texmf-dist/tex/latex/graphics-def/pdftex.def File: pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex ) (/usr/share/texlive/texmf-dist/tex/latex/colortbl/colortbl.sty Package: colortbl 2018/12/12 v1.0d Color table columns (DPC) (/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty Package: array 2018/12/30 v2.4k Tabular extension package (FMi) \col@sep=\dimen107 \ar@mcellbox=\box29 \extrarowheight=\dimen108 \NC@list=\toks16 \extratabsurround=\skip43 \backup@length=\skip44 \ar@cellbox=\box30 ) \everycr=\toks17 \minrowclearance=\skip45 ) \rownum=\count96 Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1348. Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1352. Package xcolor Info: Model `RGB' extended on input line 1364. Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1366. Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1367. Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1368. Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1369. Package xcolor Info: Model `Gray' substituted by `gray' on input line 1370. Package xcolor Info: Model `wave' substituted by `hsb' on input line 1371. ) *\begin{document} (./texput.aux) \openout1 = `texput.aux'. LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 0. LaTeX Font Info: ... okay on input line 0. LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 0. LaTeX Font Info: ... okay on input line 0. LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 0. LaTeX Font Info: ... okay on input line 0. LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 0. LaTeX Font Info: ... okay on input line 0. LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 0. LaTeX Font Info: ... okay on input line 0. LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 0. LaTeX Font Info: ... okay on input line 0. \c@lstlisting=\count97 (/usr/share/texlive/texmf-dist/tex/context/base/mkii/supp-pdf.mkii [Loading MPS to PDF converter (version 2006.09.02).] \scratchcounter=\count98 \scratchdimen=\dimen109 \scratchbox=\box31 \nofMPsegments=\count99 \nofMParguments=\count100 \everyMPshowfont=\toks18 \MPscratchCnt=\count101 \MPscratchDim=\dimen110 \MPnumerator=\count102 \makeMPintoPDFobject=\count103 \everyMPtoPDFconversion=\toks19 ) * (Please type a command or say `\end') * (Please type a command or say `\end') * ==* The Parsing Virtual Machine and Script Language * (Please type a command or say `\end') *\subsection{A D} * (Please type a command or say `\end') * (Please type a command or say `\end') *\section{AN OVERVIEW} * (Please type a command or say `\end') * This booklet is about the pattern-parsing virtual machine and script * language "pep". The executable file is /books/pars/pep and is compiled * from the c source code "gh.c" \texttt{/books/pars/gh.c} * (Please type a command or say `\end') * The virtual machine and language allows simple "LR" bottom-up shift * reduce parsers to be implemented in a limited script language with * a syntax which is very similar to the "sed" unix stream editor. * (Please type a command or say `\end') * [[ \texttt{img/pp.interactive.screenshot.png} "Pep in interactive mode" >> ]] * (Please type a command or say `\end') * As far as I am aware, this is a new approach to parsing context-free * languages and according to the scripts and tests so far written has * great potential. The script language is deliberately limited in * a number of ways (it does not have regular expressions, for example), but * it seems to be an interesting tool for learning about compiler techniques. * (Please type a command or say `\end') *\section{DOCUMENTATION} * (Please type a command or say `\end') * This file "pars-book.txt" is the principle documention about the * pattern-parser machine and language. This should also be available * as html at \url{http://bumble.sf.net/books/pars/pars-book.html} ! Undefined control sequence. <*> as html at \url {http://bumble.sf.net/books/pars/pars-book.html} ? * There is also a lot of documentation in the "gh.c" file (which implements * the virtual machine) as well as in the "compile.pss" file, which converts * scripts into machine assembler programs which can then be loaded by the * pep tool. * Overfull \hbox (95.40834pt too wide) detected at line 0 \OT1/cmr/m/n/10 ma-chine and lan-guage. This should also be avail-able as html at http://bumble.sf.net/books/pars/pars- [] (Please type a command or say `\end') * Also, most example scripts in the \texttt{/books/pars/eg/} folder also have * notes at the beginning of the script. * (Please type a command or say `\end') *\section{COMMAND LINE USAGE} * \begin{tabular}{} LaTeX Font Info: External font `cmex10' loaded for size (Font) <7> on input line 0. LaTeX Font Info: External font `cmex10' loaded for size (Font) <5> on input line 0. ! Package array Error: Empty preamble: `l' used. See the array package documentation for explanation. Type H for immediate help. ... <*> \begin{tabular}{} ? \emph{ specify script and input on the command line } \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{lstlisting}[breaklines] Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? * pep -e "read; print; print; clear;" -i "abcXYZ" * # prints "aabbccXXYYZZ" ! You can't use `macro parameter character #' in restricted horizontal mode. <*> # prints "aabbccXXYYZZ" ? * \end{lstlisting} ! Undefined control sequence. \lstlisting ->\def \lstenv@name {lstlisting}\begingroup \lst@setcatcodes \ca... <*> \end{lstlisting} ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Package Listings Error: Extra \endlstlisting. See the Listings package documentation for explanation. Type H for immediate help. ... <*> \end{lstlisting} ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ load a script from file and start an interactive session to view/debu g } \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} pep -If scriptfile somefile.txt \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! LaTeX Error: \begin{tabular} on input line 0 ended by \end{lstlisting}. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... <*> \end{lstlisting} ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ load an "assembly" file into the machines program and view/debug. } \ \ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} pep -Ia asmfile somefile.pss \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> \end{lstlisting} ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ convert a script to compilable java code} \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} pep -f translate.java.pss script \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> \end{lstlisting} ? ! Missing } inserted. } <*> \end{lstlisting} ? \section{ONE LINE EXAMPLES} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing $ inserted. $ <*> \end{lstlisting} ? The pep tool may have useful applications in unix "one-liners" but Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? its main power is in the implementation of simple context free Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? languages and compilers. Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ remove multiple consecutive instances of any character} \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} read; !(==) { put; print; } clear; \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> \end{lstlisting} ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ double space a text file} \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} pep -e "r;'\n'{a'\n';}t;d;" /usr/share/dict/words \end{ver batim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? * \begin{verbatim} pep -e "r;'\n'{t;}t;d;" /usr/share/dict/words # better \end{ verbatim} * (Please type a command or say `\end') * \begin{tabular}{} ! Package array Error: Empty preamble: `l' used. See the array package documentation for explanation. Type H for immediate help. ... <*> \begin{tabular}{} ? \emph{ the same as above with long command names. } \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} pep -e "read; '\n' { add '\n'; } print; clear;" someFile \e nd{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? * \begin{tabular}{} ! Package array Error: Empty preamble: `l' used. See the array package documentation for explanation. Type H for immediate help. ... <*> \begin{tabular}{} ? \emph{ print a string in reverse order} \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} read; get; put; clear; { get; print; } \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? * \begin{tabular}{} ! Package array Error: Empty preamble: `l' used. See the array package documentation for explanation. Type H for immediate help. ... <*> \begin{tabular}{} ? \emph{ convert tabs to 2 spaces } \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} read; [\t]{d;a ' ';} t;d; \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? * \begin{tabular}{} ! Package array Error: Empty preamble: `l' used. See the array package documentation for explanation. Type H for immediate help. ... <*> \begin{tabular}{} ? \emph{ print all dictionary words which end with "ess".} \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} pep -e 'r; ![:space:] { whilenot [:space:]; [a-z].E"ess"{ad d "\n";t; }} d;' /usr/share/dict/words \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? * \begin{tabular}{} ! Package array Error: Empty preamble: `l' used. See the array package documentation for explanation. Type H for immediate help. ... <*> \begin{tabular}{} ? \emph{ convert all whitespace (eg [ \r\n\t\f]) to dots} \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} read; [:space:] {d;a'.';} t;d; \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? * \begin{verbatim} read; [:space:] {clear; add '.';} print; clear; \end{verbat im} ! LaTeX Error: Something's wrong--perhaps a missing \item. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... <*> \begin{verbatim} read; [:space:] {clear; add '.';} print; clear; \end{... ? ! LaTeX Error: Something's wrong--perhaps a missing \item. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... <*> \begin{verbatim} read; [:space:] {clear; add '.';} print; clear; \end{... ? \begin{verbatim} read; [ \r\b\t\f] {clear; add '.';} print; clear; \end{ver batim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! LaTeX Error: Something's wrong--perhaps a missing \item. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... <*> \begin{verbatim} read; [:space:] {clear; add '.';} print; clear; \end{... ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ double every instance of vowels } \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} pep -e "read; [aeiou] { put; get; } print;clear;" -i "a tre e" \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \endgroup inserted. \endgroup <*> \begin{verbatim} read; [:space:] {clear; add '.';} print; clear; \end{... ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ Only print text within single quotes:} \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} read; "'" { until "'"; print; } clear; \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> \begin{verbatim} read; [:space:] {clear; add '.';} print; clear; \end{... ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ remove multiple consecutive instances of the character "a":} \\ \hlin e Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} read; print; "a" { while [a]; } clear; \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> \begin{verbatim} read; [:space:] {clear; add '.';} print; clear; \end{... ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ Number each line of the input:} \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} read; "\n" { lines; add " "; } print; clear; \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! LaTeX Error: Something's wrong--perhaps a missing \item. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... <*> ...ar; add '.';} print; clear; \end{verbatim} ? \begin{verbatim} read; "\n" { lines; a " "; } t; d; # the same, with short commands \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! LaTeX Error: \begin{tabular} on input line 0 ended by \end{verbatim}. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... <*> ...ar; add '.';} print; clear; \end{verbatim} ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ Count the number of lines in the input stream} \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} read; "\n" { a+; } clear; (eof) { add "lines: "; count; pri nt; } \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...ar; add '.';} print; clear; \end{verbatim} ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ Delete leading whitespace (spaces, tabs) from the start of each line: } \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} read; print; "\n" { while [:space:]; } clear; \end{verbati m} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing $ inserted. $ <*> ...ar; add '.';} print; clear; \end{verbatim} ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ Delete whitespace from the input stream} \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} r; ![:space:] {print;} d; \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...ar; add '.';} print; clear; \end{verbatim} ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ insert 5 blank spaces at beginning of each line (make page offset):} \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} r; "\n" { add ' '; } print; clear; \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? * \begin{tabular}{} ! Package array Error: Empty preamble: `l' used. See the array package documentation for explanation. Type H for immediate help. ... <*> \begin{tabular}{} ? \emph{ print only the first ten lines of the input stream} \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} read; print; clear; lines; "10" {quit;} clear; \end{verbat im} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? * \begin{tabular}{} ! Package array Error: Empty preamble: `l' used. See the array package documentation for explanation. Type H for immediate help. ... <*> \begin{tabular}{} ? \emph{ Delete trailing whitespace (spaces, tabs) from end of each line: } \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{lstlisting}[breaklines] Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? * read; * [ \t] { while [ \t\r]; read; E"\n" { clear; add "\n"; } } LaTeX Font Info: Try loading font information for OML+cmr on input line 0. (/usr/share/texlive/texmf-dist/tex/latex/base/omlcmr.fd File: omlcmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions ) LaTeX Font Info: Font shape `OML/cmr/m/n' in size <10> not available (Font) Font shape `OML/cmm/m/it' tried instead on input line 0. ! You can't use a prefix with `end-group character }'. \egroup <*> [ \t] { while [ \t\r ]; read; E"\n" { clear; add "\n"; } } ? print; clear; Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Undefined control sequence. <*> [ \t] { while [ \t\r]; read; E"\n " { clear; add "\n"; } } ? \end{lstlisting} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Undefined control sequence. <*> ...while [ \t\r]; read; E"\n" { clear; add "\n "; } } ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \section{DOWNLOAD} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? A ".tar.gz" archive file of the c source code can be downloaded from Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? the \url{https://sourceforge.net/projects/bumble/} folder. Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \section{COMPILING SOURCE CODE} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? I may, in the future, package this using "autotools" and "automake" to allo w Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? simple installation. The main folder, source file and booklet are Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? called \texttt{pars/} \texttt{gh.c} and \texttt{pars-book.txt} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ obtain, extract and compile the "pep" source code } \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{lstlisting}[breaklines] Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? # extract the tar ball Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? tar xvzf gh.tar.gz Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? cd pars/object Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? # compile the pep tool using the object files in the "object" folder. Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? make pep Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? cd .. Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? # create a symlink if you like into the bin folder. Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ln -s pep /usr/local/bin/pep Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \end{lstlisting} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? At the moment (August 2020) the pep executable looks for the file Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? 'asm.pp' in the same folder where it is run. This obviously needs Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? to be changed so that pep looks for \texttt{asm.pp} in some standard folder . Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \texttt{asm.pp} is necessary to compile and run scripts. Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? A very basic "Makefile" is available in the \texttt{/books/pars/object/} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? folder. Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ build the pep tool} \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} cd pars/object/; make pep \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ build the interactive script viewer/ machine debugger} \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} cd pars/object/; make ompp \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ manually rebuild the libmachine.a library file } \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{lstlisting}[breaklines] Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? cd gh/object Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? # rebuild all object files Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? gcc -c *.c Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? # not all of these files are really necessary. Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ar rcs libmachine.a buffer.o charclass.o colours.o command.o \ Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? exitcode.o instruction.o labeltable.o machine.o machine.interp.o \ Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? machine.methods.o parameter.o program.o tape.o tapecell.o Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \end{lstlisting} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? The libmachine.a file can be used when compiling executables from Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? c source code generated by the script "translate.c.pss" Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \section{TRANSFORMATIONS AND COMPILATIONS} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? The "pep" virtual machine and language is designed to Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? transform one textual (data) format into another, or compile/"transpile" Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? one context-free language into another. Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? Examples might be: Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? >* transform a csv (comma-separated-values) file into a Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? json data format. Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ convert from "infix" arithmetic notation to "postfix" notation.} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ compile a simple computer language into an assembly language.} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ properly indent a computer language source code file.} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \section{DEBUGGING} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? The pep virtual machine is more complicated than a "sed" (the unix stream Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? editor) virtual machine (sed only has 2 string registers, the Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? "work-space" and the "hold-space"). So you may find yourself needing to Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? debug a script. There are a number of ways to do this. Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ see how a particular script is compiled to "assembler" format} \\ \hl ine Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} pep -f compile.pss script \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? The compiled script will be printed to stdout and saved in \texttt{sav.pp} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ load a script and view/execute/step through it interactively } \\ \hl ine Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} pep -If someScript input.txt \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \begin{verbatim} pep -f someScript input.txt \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ interactively view how some script is being compiled by "asm.pp" } \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} pep -Ia asm.pp someScript \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \begin{verbatim} pep -a asm.pp someScript \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? (now you can step through the compiled program "asm.pp" and watch as Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? it parses and compiles "someScript". Generally, use "rr" to run the Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? whole script, and "rrw text" to run the script until the workspace Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? is some particular text. This helps to narrow down where the \texttt{asm.pp } Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? compiler is not parsing the input script correctly. Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? Once in an interactive "pep" session, there are many commands to Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? run and debug a script. For example: Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? n - execute the next instruction in the program Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? m - view the state of the machine (stack/workspace/registers/tape/program ) Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? rrw - run the script until the workspace is exactly some text. Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? rre - run script until the workspace ends with something Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? rr - run the whole script from the current instruction Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? M.r - reset the virtual machine and input stream Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? (but not the compiled program) Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \subsection{TECHNIQUES FOR DEBUGGING} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? The technique used in \texttt{eg/mark.latex.pss} is a very powerful method Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? to see how rules are being resolved. Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ see the stack when a reduction occurs} \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{lstlisting}[breaklines] Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? parse> Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? unstack; add "\n"; print; clip; stack; Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \end{lstlisting} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \subsection{COMMON BUGS} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ make sure that you are pushing as many times as there are tokens.} \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} add "noun*verb*noun*"; push; push; # << error, 3 tokens, 2 pushes \end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ make sure there is at least one read command in the script } \\ \hlin e Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} "."{ clear; } print; clear; # << error: no read in script \ end{verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \section{SCRIPT EXAMPLES} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ remove whitespace only at the beginning of the input stream} \\ \hlin e Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{verbatim} begin { while [:space:]; clear; } read; print; clear; \end{ verbatim} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ print alphanumeric words in input stream one per line} \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{lstlisting}[breaklines] Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? read; [:alpha:] { while [:alpha:]; add "\n"; print; clear; } Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? clear; Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \end{lstlisting} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ print assignments in the form abc:333 or val = 66} \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \begin{lstlisting}[breaklines] Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? r; Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ":","=" { add "*"; push; } Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? [:alpha:] { Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? while [:alpha:]; put; clear; add "id*"; push; .reparse Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? } Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? [0-9] { Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? while [0-9]; put; clear; add "num*"; push; .reparse Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? } Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? !"" {d;} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? parse> Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? pop; pop; pop; Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? "id*:*num*", "id*=*num*" { Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? clear; Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ++; ++; get; add " assigned to '"; --; --; get; Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? add "'\n"; print; clear; Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? } Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? push; push; push; Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing } inserted. } <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \end{lstlisting} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \end{tabular} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? ! Missing \cr inserted. \cr <*> ...[ \t\r]; read; E"\n" { clear; add "\n"; } } ? \begin{tabular}{} Type to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? \emph{ print the number of alphabetical words in the input stream} \\ \hline Type to proceed, S to scroll future error messages, R to run without stopping, Q t