nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nitcc: add an example of a monkey-patching of a Lexer to add behavior.
[nit.git]
/
contrib
/
nitcc
/
src
/
Makefile
diff --git
a/contrib/nitcc/src/Makefile
b/contrib/nitcc/src/Makefile
index
f66a44e
..
ed5ba5d
100644
(file)
--- a/
contrib/nitcc/src/Makefile
+++ b/
contrib/nitcc/src/Makefile
@@
-1,6
+1,6
@@
-NITC=../../../bin/nitg
+NITC=../../../bin/nitc
-all: nitcc calc minilang
+all: nitcc calc minilang blob
nitcc_parser_gen: nitcc_parser_gen.nit
@echo "*** Compile the nitcc bootstrap parser generator -- level 0"
nitcc_parser_gen: nitcc_parser_gen.nit
@echo "*** Compile the nitcc bootstrap parser generator -- level 0"
@@
-33,15
+33,22
@@
minilang: nitcc ../examples/minilang.sablecc ../examples/minilang.nit
${NITC} ../examples/minilang.nit -v
printf "10\n42\n" | ./minilang ../examples/minilang.minilang
${NITC} ../examples/minilang.nit -v
printf "10\n42\n" | ./minilang ../examples/minilang.minilang
+blob: nitcc ../examples/blob.sablecc ../examples/blob.nit
+ @echo "*** Example program, blob"
+ cd ../examples && ../src/nitcc blob.sablecc
+ ${NITC} ../examples/blob.nit -v
+ ./blob -e "abc {{{ 1 }}} de {{{ 2 }}} { 3 }"
+
+check: tests
tests:
cd ../tests && ./run
clean:
tests:
cd ../tests && ./run
clean:
- rm -r .nit_compile \
+ rm -r \
*.dot *.out \
nitcc_lexer.nit nitcc_parser.nit nitcc_test_parser.nit nitcc_parser_gen \
nitcc0 nitcc1 \
*.dot *.out \
nitcc_lexer.nit nitcc_parser.nit nitcc_test_parser.nit nitcc_parser_gen \
nitcc0 nitcc1 \
- calc minilang \
+ calc minilang blob \
../examples/*.dot ../examples/*.out ../examples/*_lexer.nit ../examples/*_parser.nit ../examples/*_test_parser.nit \
2>/dev/null || true
../examples/*.dot ../examples/*.out ../examples/*_lexer.nit ../examples/*_parser.nit ../examples/*_test_parser.nit \
2>/dev/null || true