Commit f7c982c8 by POTTIER Francois

Document the fact that the type ['a env] is parameterized again.

parent 1cb3c349
......@@ -27,6 +27,9 @@
* Improved the syntax error message that is displayed when a `.mly` file
is incorrect: the previous and next token are shown.
* Possibly incompatible change in the incremental API: the type `'a env`
becomes parameterized.
* The type `stack` and the function `stack` in the incremental API are
deprecated. The new functions `top` and `pop` can be used instead to
inspect the parser's stack. The module `MenhirLib.General` is deprecated
......
......@@ -7,7 +7,6 @@
feed (inspection API)
production numbers (production_index, find_production)
current_state_number
menhirLib: possibly incompatible change of type 'a env
MenhirLib.Printers: incompatible type change of print_stack
MenhirLib.ErrorReports: new module
- Send CompCert pull request.
......
......@@ -2167,16 +2167,18 @@ chooses to open.
% Passons-le sous silence.
%% type env
%% type 'a env
\begin{verbatim}
type env
type 'a env
\end{verbatim}
The abstract type \verb+env+ represents the current state of the
The abstract type \verb+'a env+ represents the current state of the
parser. (That is, it contains the current state and stack of the LR
automaton.) Assuming that semantic values are immutable, it is a persistent
data structure: it can be stored and used multiple times, if desired.
The parameter \verb+'a+ is the type of the semantic value that will
eventually be produced if the parser succeeds.
%% type production
......@@ -2190,10 +2192,10 @@ The abstract type \verb+production+ represents a production of the grammar.
\begin{verbatim}
type 'a checkpoint = private
| InputNeeded of env
| Shifting of env * env * bool
| AboutToReduce of env * production
| HandlingError of env
| InputNeeded of 'a env
| Shifting of 'a env * 'a env * bool
| AboutToReduce of 'a env * production
| HandlingError of 'a env
| Accepted of 'a
| Rejected
\end{verbatim}
......@@ -2444,7 +2446,7 @@ tools for this purpose.
%% val positions
\begin{verbatim}
val positions: env -> position * position
val positions: 'a env -> position * position
\end{verbatim}
The function \verb+positions+ returns the start and end positions of the
......@@ -2455,7 +2457,7 @@ to \verb+main+.
%% val has_default_reduction
\begin{verbatim}
val has_default_reduction: env -> bool
val has_default_reduction: 'a env -> bool
\end{verbatim}
The function \verb+has_default_reduction+
......
Markdown is supported
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