Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
b0741904
Commit
b0741904
authored
Mar 26, 2014
by
Julien Lopez
Browse files
[TESTS][EVAL][MINOR] Working on easier example; make debug added
parent
50e07446
Changes
2
Show whitespace changes
Inline
Side-by-side
tests/eval/Makefile
View file @
b0741904
...
...
@@ -3,8 +3,10 @@ ROOTDIR ?= ../..
SRCDIR
?=
src
EXTDIR
?=
$(SRCDIR)
/externals
LIBFLAGS
=
-libs
nums,pcre,netstring
-lflags
-I
,
`
ocamlfind query pcre
`
\
LIBFLAGS
?
=
-libs
nums,pcre,netstring
-lflags
-I
,
`
ocamlfind query pcre
`
\
-lflags
-I
,
`
ocamlfind query netstring
`
DEBUGFLAGS
?=
-cflags
-g
-lflags
-g
INEXTFILES
=
misc/custom.ml misc/encodings.ml types/ident.ml
\
compile/lambda.ml misc/ns.ml misc/ns.mli misc/upool.ml misc/upool.mli
\
types/sortedList.ml types/sortedList.mli types/compunit.ml types/compunit.mli
\
...
...
@@ -21,12 +23,16 @@ EXTFILES = $(INEXTFILES:%=$(ROOTDIR)/%)
RM
?=
rm
-f
OUT
?=
main.native
OUTDEBUG
?=
main.byte
.PHONY
:
clean check test _import
all
:
_import
$(COMPILER)
-use-ocamlfind
$(LIBFLAGS)
$(OUT)
debug
:
_import
$(COMPILER)
-use-ocamlfind
$(DEBUGFLAGS)
$(LIBFLAGS)
$(OUTDEBUG)
_import
:
@
echo
-n
"Copying external files..."
@
test
-d
$(EXTDIR)
||
mkdir
$(EXTDIR)
...
...
tests/eval/src/main.ml
View file @
b0741904
...
...
@@ -38,9 +38,9 @@ let load_file f =
s
;;
let
str
=
if
Array
.
length
Sys
.
argv
>
1
then
load_file
Sys
.
argv
.
(
1
)
else
"let z = 3 in fun firsts x y -> match x,y with
else
(*
"let z = 3 in fun firsts x y -> match x,y with
| (a,_),(b,_) -> a,b (* This (* is (* a nested *) *) comment *)
| _ -> x . z (* That doesn't make any sense *)"
in
| _ -> x . z (* That doesn't make any sense *)"
*)
"fun x -> x"
in
let
expr
=
ExprParser
.
of_string
str
in
(*printf "Original: %s\nExpr: " str;
print_expr expr;
...
...
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