X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/blobdiff_plain/a6ec8b3f5bd19ad4a2a6fc950639cdff196eea2c..e38e83673b59b89d7af42f4c3f177aa0f6eafeb5:/doc/parsing.tex diff --git a/doc/parsing.tex b/doc/parsing.tex index 17f0ecb..cd0e12f 100644 --- a/doc/parsing.tex +++ b/doc/parsing.tex @@ -252,6 +252,7 @@ Some scanners support an additional \emph{place-capture} protocol which allows rewinding the scanner to an earlier point in the input so that it can be scanned again. + \subsection{Basic scanner protocol} \label{sec:parsing.scanner.basic} The basic protocol supports stepping the scanner forward through its input @@ -272,6 +273,7 @@ sequence, and detecting the end of the sequence. step the scanner. \end{describe} + \subsection{Place-capture scanner protocol} \label{sec:parsing.scanner.place} The place-capture protocol allows rewinding to an earlier point in the @@ -319,6 +321,7 @@ the scanner and read that data again. Therefore it's possible to return values are the values of the final @
. \end{describe} + \subsection{Scanner file-location protocol} \label{sec:parsing.scanner.floc} Some scanners participate in the file-location protocol @@ -352,6 +355,7 @@ here. return nil. \end{describe*} + \subsection{Character scanners} \label{sec:parsing.scanner.char} Character scanners are scanners which read sequences of characters. @@ -412,6 +416,7 @@ operations to the sequence of characters held by a character scanner. character scanner protocols is suitable. See @|make-scanner-stream|. \end{describe} + \subsection{String scanners} \label{sec:parsing.scanner.string} A \emph{string scanner} is a simple kind of character scanner which reads @@ -436,6 +441,7 @@ and place-capture protocols. to the end of the @). \end{describe} + \subsection{Character buffer scanners} \label{sec:parsing.scanner.charbuf} A \emph{character buffer scanner}, or \emph{charbuf scanner} for short, is an @@ -500,6 +506,7 @@ file-location protocols. at least once, or with $@ > @$. \end{describe} + \subsection{Token scanners} \label{sec:parsing.scanner.token} \begin{describe}{cls} @@ -522,6 +529,7 @@ file-location protocols. {token-scanner-place-p @ @> @} \end{describe} + \subsection{List scanners} \begin{describe}{ty}{list-scanner}