glcpp-parse.h
*.o
*~
-tests/*.expected
-tests/*.gcc
-tests/*.glcpp
tests/*.out
clean:
rm -f glcpp glcpp-lex.c glcpp-parse.c *.o *~
- rm -f tests/*.out tests/*.gcc tests/*.expected tests/*~
+ rm -f tests/*.out tests/*~
--- /dev/null
+this is four tokens
--- /dev/null
+
+
+
+foo
+bar
+baz
--- /dev/null
+
+
+
+a b c foo
+b c a bar
+c a b baz
--- /dev/null
+
+1
+
+foo
--- /dev/null
+
+1
+
+foo
+
+2
--- /dev/null
+
+()1()
+
+()2()
--- /dev/null
+
+((bar)+1)
--- /dev/null
+
+((bar)*(baz))
--- /dev/null
+
+(this is more than one word)
--- /dev/null
+
+one fish,two fish,red fish,blue fish
--- /dev/null
+
+
+(2*((1+(3))))
--- /dev/null
+
+(argument(including parens)for the win)
--- /dev/null
+
+
+
+
+1
+2
+3 4
+5 6 7
--- /dev/null
+
+
+success
--- /dev/null
+
+
+success
--- /dev/null
+
+
+success
--- /dev/null
+
+
+
+success
--- /dev/null
+
+
+
+success
--- /dev/null
+
+foo(2*(3))
--- /dev/null
+
+foo(2*(foo(2*(3))))
--- /dev/null
+
+
+more success
--- /dev/null
+
+
+expand(just once)
--- /dev/null
+
+
+(two,words)
--- /dev/null
+
+onetoken
--- /dev/null
+success_1
+
+
+
+success_2
--- /dev/null
+success_1
+
+success_2
+
+success_3
--- /dev/null
+success_1
+
+
+
+success_2
+
+success_3
--- /dev/null
+success_1
+
+success_2
+
+
+
+success_3
--- /dev/null
+success_1
+
+
+
+
+
+success_3
+
+
+
+success_4
--- /dev/null
+success_1
+
+success_2
+
+
+
+
+
+
+
+success_3
--- /dev/null
+success_1
+
+
+
+
+
+
+
+success_2
+
+success_3
--- /dev/null
+success_1
+
+
+
+
+
+
+
+
+
+success_2
--- /dev/null
+
+
+
+success
+
--- /dev/null
+
+
+
+success_1
+
+
+
+success_2
+
+
+
+
+
+
+
+success_3
+
--- /dev/null
+
+
+
+success_1
+
+
+
+success_2
+
+
+
+
+
+success_3
+
+
+
+
+
+success_3
+
+
+
+
+
+
+
+success_4
+
+
+
+success_5
+
+
+
--- /dev/null
+
+
+
+success_1
+
+
+success_2
+
+
+
+
+
+
+success_3
+
+
+success_4
+
+
+
--- /dev/null
+
+
+
+success_1
+
+
+success_2
+
+
+
+
+
+
+success_3
+
--- /dev/null
+
+
+
+
+
+
+
+success_1
+
+
+success_2
+
+
+
+
+success_3
+
+
+
+
+success_4
+
+
+
+
+
+
+success_5
+
+
+success_6
+
+
+
--- /dev/null
+
+
+success
--- /dev/null
+
+
+
+success
--- /dev/null
+
+success
+
+success
+
+success
--- /dev/null
+
+ab
+a
+b
+
--- /dev/null
+
+12
+1000
+identifier2
--- /dev/null
+
+
+
+
+success
--- /dev/null
+
+
+
+f = g /h;
+ l();
+m = n
++ p;
+
+more code here
+
+are not treated like comments.
+
+
--- /dev/null
+
+success_1 success_2 success_3
--- /dev/null
+
+
+
+
+
+
+
+
+
+
+
+
+
+f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1);
+f(2 * (2 +(3,4)-0,1)) | f(2 * (~ 5)) & f(2 * (0,1))^m(0,1);
+int i[] = { 1, 23, 4, 5, };
for test in *.c; do
echo "Testing $test"
- ../glcpp < $test > $test.glcpp
- grep -v '^ *$' < $test.glcpp > $test.out || true
- gcc -E $test -o $test.gcc
- grep -v '^#' < $test.gcc | grep -v '^$' | sed -r -e 's/^ +/ /' > $test.expected || true
+ ../glcpp < $test > $test.out
diff -u $test.expected $test.out
done