X-Git-Url: https://git.distorted.org.uk/~mdw/sod/blobdiff_plain/1818107e8198734df843841a51bca3713bd37596..d610d8beaab27c822bd69bb857c3630b6a743b97:/doc/parsing.tex diff --git a/doc/parsing.tex b/doc/parsing.tex index 58959c0..c04ab56 100644 --- a/doc/parsing.tex +++ b/doc/parsing.tex @@ -7,7 +7,7 @@ %%%----- Licensing notice --------------------------------------------------- %%% -%%% This file is part of the Sensble Object Design, an object system for C. +%%% This file is part of the Sensible Object Design, an object system for C. %%% %%% SOD is free software; you can redistribute it and/or modify %%% it under the terms of the GNU General Public License as published by @@ -43,6 +43,13 @@ consumed any input items. \begin{describe}{fun}{combine-parser-failures @ @> @} \end{describe} +\begin{describe}{fun}{parse-empty \&optional @ @> @} +\end{describe} + +\begin{describe}{fun} + {parse-fail @ \&optional @ @> @} +\end{describe} + %%%-------------------------------------------------------------------------- \section{File locations} \label{sec:parsing.floc} @@ -124,11 +131,12 @@ consumed any input items. \end{describe*} \begin{describe}{mac} - {with-default-error-location (@) @^* @> @^*} + {with-default-error-location (@) @^* @
^* + @> @^*} \end{describe} \begin{describe}{mac} - {count-and-report-errors () @^* + {count-and-report-errors () @^* @^* @> @ @ @} \end{describe} @@ -209,7 +217,8 @@ the scanner and read that data again. Therefore it's possible to \end{describe} \begin{describe}{mac} - {with-scanner-place (@ @) @^* @> @^*} + {with-scanner-place (@ @) @^* @^* + @> @^*} Capture the @'s current position as a place, evaluate the @s as an implicit progn with the variable @ bound to the captured place. When control leaves the @s, the place is released. The return @@ -446,14 +455,16 @@ file-location protocols. \begin{describe}{mac} {defparse @ (@[[ :context (@ @) @]] @^*) \\ \ind - @^* \- + @[[ @^* @! @ @]] \\ + @^* \- \nlret @} \end{describe} \begin{describe}{mac} {with-parser-context (@ @{ @ @ @}^*) \\ \ind - @^* \- + @^* \\ + @^* \- \nlret @^*} \end{describe} @@ -461,6 +472,13 @@ file-location protocols. {parse @ @> @ @ @} \end{describe} +\begin{describe}{mac} + {parser @ + @[[ @^* @! @ @]] + @ + @> @} +\end{describe} + \begin{describe}{gf}{parser-at-eof-p @ @> @} \end{describe} @@ -482,7 +500,7 @@ file-location protocols. \begin{describe}{mac} {when-parse (@[@@]) @ \\ \ind - @^* \- + @^* \- \nlret @^*} \end{describe} @@ -563,7 +581,9 @@ file-location protocols. \end{describe} \begin{describe}{mac} - {define-pluggable-parser @ @ @ @^*} + {define-pluggable-parser @ @ @ + @[[ @^* @! @ @]] + @^*} \end{describe} \begin{describe}{gf}{parser-capture-place @ @> @} @@ -580,12 +600,17 @@ file-location protocols. \end{describe} \begin{describe}{mac} - {with-parser-place (@ @) @^*} + {with-parser-place (@ @) + @[[ @^* @! @ @]] + @^*} \end{describe} \begin{describe}{parseform}{peek @} \end{describe} +\begin{describe}{parseform}{commit} +\end{describe} + \begin{describe}{cls}{character-parser-context () \&key} \end{describe} @@ -704,14 +729,14 @@ file-location protocols. \begin{describe*} {\dhead{mac}{preop @ (@ @) - @^* + @^* @^* @> @} \dhead{mac}{postop @ (@ @ @[[ :rprec @ @]]) - @^* - @> @} + @^* @^* + \nlret @} \dhead{mac}{binop @ (@ @ @ @) - @^* + @^*@^* @> @}} \end{describe*}