aboutsummaryrefslogtreecommitdiffstats
path: root/test_lexer.sh
blob: c9904ee4e840e078472d0cb84be811d4bed19819 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

# script to test the lexer

echo "========================================"
echo " Cleaning the temporaries and outputs"
make clean
echo " Force building lexer"
make -B bin/c_lexer

if [[ "$?" -ne 0 ]]; then
    echo "Build failed.";
fi

echo "========================================="
echo " Testing lexer"

cpp c_lexer/test/test_lex.c c_lexer/test/pre_processed_test_lex.c
cat c_lexer/test/pre_processed_test_lex.c | bin/c_lexer | tee c_lexer/test/output.json
#cat test/test_lex.c | ./bin/c_lexer | tee test/output.json