aboutsummaryrefslogtreecommitdiffstats
path: root/test_lexer.sh
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-02-06 11:02:43 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-02-06 11:02:43 +0000
commitbc3afbc163f176e6db5d935953908c8d00d917a5 (patch)
tree63d1f94e2aca71592eec1d43f73a5c326994c961 /test_lexer.sh
parent7c188eff520dc659f2ba324e0eb85174ea318c86 (diff)
downloadCompiler-bc3afbc163f176e6db5d935953908c8d00d917a5.tar.gz
Compiler-bc3afbc163f176e6db5d935953908c8d00d917a5.zip
adding all
Diffstat (limited to 'test_lexer.sh')
-rwxr-xr-xtest_lexer.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/test_lexer.sh b/test_lexer.sh
new file mode 100755
index 0000000..6093816
--- /dev/null
+++ b/test_lexer.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# script to test the lexer
+
+echo "========================================"
+echo " Cleaning the temporaries and outputs"
+make clean
+echo " Force building lexer"
+make bin/c_lexer -B
+
+if [[ "$?" -ne 0 ]]; then
+ echo "Build failed.";
+fi
+
+echo "========================================="
+echo " Testing lexer"
+
+cpp test/test_lex.c test/pre_processed_test_lex.c
+#cat test/pre_processed_test_lex.c | ./bin/c_lexer | tee test/output.json
+cat test/test_lex.c | ./bin/c_lexer | tee test/output.json