Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
POTTIER Francois
menhir
Commits
e3ba88ea
Commit
e3ba88ea
authored
Jan 07, 2015
by
POTTIER Francois
Browse files
Re-implemented the user-visible [lhs] function using the [lhs] table,
composed with the function [nonterminal].
parent
7e37ed9c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/tableFormat.ml
View file @
e3ba88ea
...
...
@@ -129,6 +129,9 @@ module type INSPECTION_TABLES = sig
val
lhs
:
PackedIntArray
.
t
val
terminal
:
int
->
xsymbol
val
nonterminal
:
int
->
xsymbol
(* A mapping of every (non-initial) state to its incoming symbol. *)
val
symbol
:
'
a
lr1state
->
'
a
symbol
...
...
src/tableInterpreter.ml
View file @
e3ba88ea
...
...
@@ -184,8 +184,8 @@ module MakeInspection (T : TableFormat.INSPECTION_TABLES) = struct
data
let
lhs
prod
=
let
lhs
,
_
=
production_def
prod
in
lhs
let
nt
=
PackedIntArray
.
get
T
.
lhs
prod
in
T
.
nonterminal
nt
let
rhs
prod
=
let
_
,
rhs
=
production_def
prod
in
...
...
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