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
538a51d6
Commit
538a51d6
authored
Jan 07, 2015
by
POTTIER Francois
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added [T_error] to the type ['a terminal].
I had forgotten it until now.
parent
c3384297
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
src/tokenType.ml
src/tokenType.ml
+12
-1
No files found.
src/tokenType.ml
View file @
538a51d6
...
...
@@ -70,8 +70,19 @@ let tokentypedef grammar =
when [Settings.inspection] is false, we remain compatible with old versions
of OCaml, without GADTs. *)
(* Although the [token] type does not include the [error] token (because this
token is never produced by the lexer), the token GADT must include the
[error] token (because this GADT must describe all of the tokens that are
allowed to appear in a production). *)
let
tokengadtdef
grammar
=
assert
Settings
.
inspection
;
let
errordata
=
{
dataname
=
ttokengadtdata
"error"
;
datavalparams
=
[]
;
datatypeparams
=
Some
[
tunit
]
(* the [error] token has a semantic value of type [unit] *)
}
in
let
datadefs
=
StringMap
.
fold
(
fun
token
properties
defs
->
if
properties
.
tk_is_declared
then
...
...
@@ -89,7 +100,7 @@ let tokengadtdef grammar =
}
::
defs
else
defs
)
grammar
.
tokens
[]
)
grammar
.
tokens
[
errordata
]
in
[
IIComment
"The indexed type of terminal symbols."
;
...
...
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