Commit b0741904 authored by Julien Lopez's avatar Julien Lopez
Browse files

[TESTS][EVAL][MINOR] Working on easier example; make debug added

parent 50e07446
......@@ -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)
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment