-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (21 loc) · 706 Bytes
/
Makefile
File metadata and controls
30 lines (21 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Use jison bundled in node_modules.
# If installed globally, you could use simply: jison [args]
JISON = node node_modules/jison/lib/cli.js
MOCHA = node node_modules/mocha/bin/mocha
all: parser.js
parser.js: etc/grammar.jison etc/tokens.jisonlex
${JISON} $^ -o src/$@
test: parser.js
${MOCHA}
make test-samples
test-samples:
@for f in samples/*.php; do sh scripts/compare_outputs.sh $$f; done
test-lexer: parser.js
${MOCHA} test/lexer_test.js
test-parser: parser.js
${MOCHA} test/parser_test.js
test-runtime: parser.js
${MOCHA} test/runtime_test.js
test-interpreter: parser.js
${MOCHA} test/interpreter_test.js
.PHONY: test test-samples test-lexer test-parser test-runtime test-interpreter