Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
menhir
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
10
Issues
10
List
Boards
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
POTTIER Francois
menhir
Commits
159fe729
Commit
159fe729
authored
Oct 05, 2015
by
POTTIER Francois
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modified the build rules for [calc-two] so as to avoid unused token warnings.
parent
a4611cf8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
demos/calc-two/_tags
demos/calc-two/_tags
+2
-0
demos/calc-two/myocamlbuild.ml
demos/calc-two/myocamlbuild.ml
+12
-6
No files found.
demos/calc-two/_tags
View file @
159fe729
<tokens.mlypack>: only_tokens
<algebraic.mlypack>: external_tokens(Tokens)
<reverse.mlypack>: external_tokens(Tokens)
<reverse.mly>: unused_token(LPAREN)
<reverse.mly>: unused_token(RPAREN)
demos/calc-two/myocamlbuild.ml
View file @
159fe729
open
Ocamlbuild_plugin
open
Command
(* Define ocamlbuild flags [only_tokens] and [external_tokens(Foo)] and
[unused_token(Bar)] which correspond to menhir's [--only-tokens] and
[--external-tokens Foo] and [--unused-token Bar]. When they are used, these
flags should be passed both to [menhir] and to [menhir --raw-depend]. *)
let
menhir_flags
()
=
(* Define two ocamlbuild flags [only_tokens] and [external_tokens(Foo)]
which correspond to menhir's [--only-tokens] and [--external-tokens Foo].
When they are used, these flags should be passed both to [menhir] and to
[menhir --raw-depend]. *)
List
.
iter
(
fun
mode
->
flag
[
mode
;
"only_tokens"
]
(
S
[
A
"--only-tokens"
]);
pflag
[
mode
]
"external_tokens"
(
fun
name
->
S
[
A
"--external-tokens"
;
A
name
]
);
pflag
[
mode
]
"unused_token"
(
fun
name
->
S
[
A
"--unused-token"
;
A
name
]
)
)
[
"menhir"
;
"menhir_ocamldep"
]
let
()
=
dispatch
(
fun
event
->
match
event
with
|
After_rules
->
menhir_flags
()
menhir_flags
()
|
_
->
()
)
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