Commit 0df79435 authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Document --inspection.

parent 1911b641
New option --inspection (added last January, documented only now). This
generates an inspection API which allows inspecting the automaton's stack,
among other things. This API can in principle be used to write custom code
for error reporting, error recovery, etc. It is not yet mature and may
change in the future.
Added the command line options --unused-token <symbol> and --unused-tokens.
......@@ -113,6 +113,7 @@
......@@ -176,6 +176,12 @@ and use \ocamlbuild, which has built-in knowledge of \menhir. Using
% in the toplevel context, but can change meaning when inserted into a local
% context.
\docswitch{\oinspection} This switch requires \otable. It causes \menhir to generate
not only the monolithic and incremental APIs (\sref{sec:monolithic},
\sref{sec:incremental}), but also the inspection API (\sref{sec:inspection}).
Activating this switch causes a few more tables to be produced, resulting in
somewhat larger code size.
\docswitch{\ointerpret} This switch causes \menhir to act as an interpreter,
rather than as a compiler. No \ocaml code is generated. Instead, \menhir
reads sentences off the standard input channel, parses them, and displays
......@@ -297,6 +303,9 @@ above, help do this.
The code-based back-end compiles the LR automaton directly into a nest of
mutually recursive \ocaml functions. In that case, \menhirlib is not required.
The incremental API (\sref{sec:incremental}) and the inspection API
(\sref{sec:inspection}) are made available only by the table-based back-end.
\docswitch{\otimings} This switch causes internal timing information to
be sent to the standard error channel.
......@@ -2134,7 +2143,8 @@ words, it is illegal to invoke it in an initial state.
\subsection{Inspection API}
To be written.
If \oinspection is set, \menhir offers an inspection API in addition to the
monolithic and incremental APIs.
% TEMPORARY document the inspection API
% document the modules that use the inspection API: Printers, ErrorReporting
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment