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
9427a73d
Commit
9427a73d
authored
Feb 09, 2015
by
POTTIER Francois
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved calc-param to ocamlbuild.
parent
14833477
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
11 deletions
+55
-11
demos/calc-param/.gitignore
demos/calc-param/.gitignore
+2
-11
demos/calc-param/Makefile
demos/calc-param/Makefile
+24
-0
demos/calc-param/_tags
demos/calc-param/_tags
+2
-0
demos/calc-param/myocamlbuild.ml
demos/calc-param/myocamlbuild.ml
+25
-0
demos/calc-param/parser.mlypack
demos/calc-param/parser.mlypack
+1
-0
demos/calc-param/tokens.mlypack
demos/calc-param/tokens.mlypack
+1
-0
No files found.
demos/calc-param/.gitignore
View file @
9427a73d
calc
lexer.ml
parser.ml
parser.mli
*.cmi
*.cmo
*.cmx
*.o
*.d
tokens.ml
tokens.mli
calc.native
_build
demos/calc-param/Makefile
0 → 100644
View file @
9427a73d
.PHONY
:
all clean test
# Find Menhir.
ifndef
MENHIR
MENHIR
:=
$(
shell
../find-menhir.sh
)
endif
MENHIRFLAGS
:=
--infer
OCAMLBUILD
:=
ocamlbuild
-use-ocamlfind
-use-menhir
-menhir
"
$(MENHIR)
$(MENHIRFLAGS)
"
MAIN
:=
calc
all
:
$(OCAMLBUILD)
$(MAIN)
.native
clean
:
rm
-f
*
~ .
*
~
$(OCAMLBUILD)
-clean
test
:
all
@
echo
"The following command should print 42.0:"
echo
"(1 + 2 * 10) * 2"
| ./
$(MAIN)
.native
demos/calc-param/_tags
0 → 100644
View file @
9427a73d
<tokens.mlypack>: only_tokens
<parser.mlypack>: external_tokens(Tokens)
demos/calc-param/myocamlbuild.ml
0 → 100644
View file @
9427a73d
open
Ocamlbuild_plugin
open
Command
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
]
)
)
[
"menhir"
;
"menhir_ocamldep"
]
let
()
=
dispatch
(
fun
event
->
match
event
with
|
After_rules
->
menhir_flags
()
|
_
->
()
)
demos/calc-param/parser.mlypack
0 → 100644
View file @
9427a73d
Tokens Parser
demos/calc-param/tokens.mlypack
0 → 100644
View file @
9427a73d
Tokens
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