aboutsummaryrefslogtreecommitdiffstats
path: root/test_lexer.sh
diff options
context:
space:
mode:
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