Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
menhir
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
POTTIER Francois
menhir
Commits
074c6643
Commit
074c6643
authored
Oct 16, 2015
by
POTTIER Francois
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documented [supplier] and [lexer_lexbuf_to_supplier].
parent
6a9feb94
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
doc/main.tex
doc/main.tex
+24
-0
No files found.
doc/main.tex
View file @
074c6643
...
...
@@ -2066,6 +2066,30 @@ Although the type \verb+env+ is opaque, a parser state can be inspected via a
few accessor functions, which we are about to describe. Before we do so, we
give a few more type definitions.
%% type supplier
\begin{verbatim}
type supplier =
unit -> token * Lexing.position * Lexing.position
\end{verbatim}
A token supplier is a function of no arguments which delivers a new token
(together with its start and end positions) every time it is called. The
function
\verb
+
loop
+
and its variants, described below, expect a supplier
as an argument.
%% val lexer_lexbuf_to_supplier
\begin{verbatim}
val lexer
_
lexbuf
_
to
_
supplier:
(Lexing.lexbuf -> token) ->
Lexing.lexbuf ->
supplier
\end{verbatim}
The function
\verb
+
lexer_lexbuf_to_supplier
+
, applied to a lexer and to a
lexing buffer, produces a fresh supplier.
%% type 'a lr1state
\begin{verbatim}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment