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
58bd83c8
Commit
58bd83c8
authored
Oct 16, 2015
by
POTTIER Francois
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into merr
parents
a991d7cb
dcc89cc9
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
1 deletion
+23
-1
CHANGES
CHANGES
+1
-0
TODO
TODO
+1
-1
doc/main.tex
doc/main.tex
+8
-0
src/IncrementalEngine.ml
src/IncrementalEngine.ml
+4
-0
src/engineTypes.ml
src/engineTypes.ml
+4
-0
src/referenceInterpreter.ml
src/referenceInterpreter.ml
+3
-0
src/tableInterpreter.ml
src/tableInterpreter.ml
+2
-0
No files found.
CHANGES
View file @
58bd83c8
...
...
@@ -26,6 +26,7 @@ A [supplier] is a function that produces tokens on demand.
[lexer_lexbuf_to_supplier] turns a lexer and a lexbuf into a supplier.
[loop] is a ready-made made main parsing loop.
[loop_handle] is a variant of [loop] that lets the user do her own error handling.
[number] maps a state of the LR(1) automaton to its number.
2015/10/16:
Incompatible change of the incremental API: renamed the type ['a result]
...
...
TODO
View file @
58bd83c8
...
...
@@ -120,7 +120,7 @@
* Suite des patchs de Frédéric Bour.
API d'inspection complète.
Exposer le nombre d'états (pour la mémoisation)
et une conversion état -> entier
.
Exposer le nombre d'états (pour la mémoisation).
Idem pour les productions.
Fonctions d'affichage pour les types terminal, nonterminal, etc.?
Fonctions d'isomorphisme entre token et 'a terminal * 'a?
...
...
doc/main.tex
View file @
58bd83c8
...
...
@@ -2149,6 +2149,14 @@ The index \verb+'a+ is the type of the semantic values associated with $A$.
The role played by
\verb
+
'a
+
is clarified in the definition of the
type
\verb
+
element
+
, which follows.
%% val number
\begin{verbatim}
val number:
_
lr1state -> int
\end{verbatim}
The states of the LR(1) automaton are numbered (from 0 and up).
%% type element
\begin{verbatim}
...
...
src/IncrementalEngine.ml
View file @
58bd83c8
...
...
@@ -113,6 +113,10 @@ module type INCREMENTAL_ENGINE = sig
type
'
a
lr1state
(* The states of the LR(1) automaton are numbered (from 0 and up). *)
val
number
:
_
lr1state
->
int
(* An element is a pair of a non-initial state [s] and a semantic value [v]
associated with the incoming symbol of this state. The idea is, the value
[v] was pushed onto the stack just before the state [s] was entered. Thus,
...
...
src/engineTypes.ml
View file @
58bd83c8
...
...
@@ -84,6 +84,10 @@ module type TABLE = sig
type
state
(* States are numbered. *)
val
number
:
state
->
int
(* The type of tokens. These can be thought of as real tokens, that is,
tokens returned by the lexer. They carry a semantic value. This type
does not include the [error] pseudo-token. *)
...
...
src/referenceInterpreter.ml
View file @
58bd83c8
...
...
@@ -10,6 +10,9 @@ module T = struct
type
state
=
Lr1
.
node
let
number
=
Lr1
.
number
type
token
=
Terminal
.
t
...
...
src/tableInterpreter.ml
View file @
58bd83c8
...
...
@@ -5,6 +5,8 @@ module Make (T : TableFormat.TABLES)
type
state
=
int
let
number
s
=
s
type
token
=
T
.
token
...
...
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