Merge Carl's preprocessor into the glcpp subdirectory.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
this is four tokens
|
||||
@@ -0,0 +1 @@
|
||||
this is four tokens
|
||||
@@ -0,0 +1,2 @@
|
||||
#define foo 1
|
||||
foo
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
1
|
||||
@@ -0,0 +1,3 @@
|
||||
#define foo 1
|
||||
#define bar foo
|
||||
bar
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
1
|
||||
@@ -0,0 +1,3 @@
|
||||
#define bar foo
|
||||
#define foo 1
|
||||
bar
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
1
|
||||
@@ -0,0 +1,6 @@
|
||||
#define foo bar
|
||||
#define bar baz
|
||||
#define baz foo
|
||||
foo
|
||||
bar
|
||||
baz
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
|
||||
foo
|
||||
bar
|
||||
baz
|
||||
@@ -0,0 +1,3 @@
|
||||
#define foo 1
|
||||
#define bar a foo
|
||||
bar
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
a 1
|
||||
@@ -0,0 +1,3 @@
|
||||
#define bar a foo
|
||||
#define foo 1
|
||||
bar
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
a 1
|
||||
@@ -0,0 +1,6 @@
|
||||
#define foo a bar
|
||||
#define bar b baz
|
||||
#define baz c foo
|
||||
foo
|
||||
bar
|
||||
baz
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
|
||||
a b c foo
|
||||
b c a bar
|
||||
c a b baz
|
||||
@@ -0,0 +1,2 @@
|
||||
#define foo
|
||||
foo
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#define foo 1
|
||||
foo
|
||||
#undef foo
|
||||
foo
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
1
|
||||
|
||||
foo
|
||||
@@ -0,0 +1,6 @@
|
||||
#define foo 1
|
||||
foo
|
||||
#undef foo
|
||||
foo
|
||||
#define foo 2
|
||||
foo
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
1
|
||||
|
||||
foo
|
||||
|
||||
2
|
||||
@@ -0,0 +1,2 @@
|
||||
#define foo()
|
||||
foo()
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
#define foo() bar
|
||||
foo()
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
bar
|
||||
@@ -0,0 +1,2 @@
|
||||
#define foo(x) 1
|
||||
foo(bar)
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
1
|
||||
@@ -0,0 +1,2 @@
|
||||
#define foo(x,y) 1
|
||||
foo(bar,baz)
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
1
|
||||
@@ -0,0 +1,4 @@
|
||||
#define foo ()1
|
||||
foo()
|
||||
#define bar ()2
|
||||
bar()
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
()1()
|
||||
|
||||
()2()
|
||||
@@ -0,0 +1,2 @@
|
||||
#define foo(x) ((x)+1)
|
||||
foo(bar)
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
((bar)+1)
|
||||
@@ -0,0 +1,2 @@
|
||||
#define foo(x,y) ((x)*(y))
|
||||
foo(bar,baz)
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
((bar)*(baz))
|
||||
@@ -0,0 +1,3 @@
|
||||
#define x 0
|
||||
#define foo(x) x
|
||||
foo(1)
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
1
|
||||
@@ -0,0 +1,2 @@
|
||||
#define foo(x) (x)
|
||||
foo(this is more than one word)
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
(this is more than one word)
|
||||
@@ -0,0 +1,2 @@
|
||||
#define foo(x,y) x,two fish,red fish,y
|
||||
foo(one fish, blue fish)
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
one fish,two fish,red fish,blue fish
|
||||
@@ -0,0 +1,3 @@
|
||||
#define bar(x) (1+(x))
|
||||
#define foo(y) (2*(y))
|
||||
foo(bar(3))
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
(2*((1+(3))))
|
||||
@@ -0,0 +1,2 @@
|
||||
#define foo(x) (x)
|
||||
foo(argument(including parens)for the win)
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
(argument(including parens)for the win)
|
||||
@@ -0,0 +1,8 @@
|
||||
#define noargs() 1
|
||||
# define onearg(foo) foo
|
||||
# define twoargs( x , y ) x y
|
||||
# define threeargs( a , b , c ) a b c
|
||||
noargs ( )
|
||||
onearg ( 2 )
|
||||
twoargs ( 3 , 4 )
|
||||
threeargs ( 5 , 6 , 7 )
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
1
|
||||
2
|
||||
3 4
|
||||
5 6 7
|
||||
@@ -0,0 +1,3 @@
|
||||
#define foo foo
|
||||
#define bar foo
|
||||
bar
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
foo
|
||||
@@ -0,0 +1,2 @@
|
||||
#define foo(bar) bar
|
||||
foo bar
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
foo bar
|
||||
@@ -0,0 +1,6 @@
|
||||
#define foo(a) bar
|
||||
|
||||
foo
|
||||
(
|
||||
1
|
||||
)
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
bar
|
||||
@@ -0,0 +1,3 @@
|
||||
#define failure() success
|
||||
#define foo failure()
|
||||
foo
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
success
|
||||
@@ -0,0 +1,3 @@
|
||||
#define success() failure
|
||||
#define foo success
|
||||
foo
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
success
|
||||
@@ -0,0 +1,3 @@
|
||||
#define bar(failure) failure
|
||||
#define foo bar(success)
|
||||
foo
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
success
|
||||
@@ -0,0 +1,4 @@
|
||||
#define baz(failure) failure
|
||||
#define bar(failure) failure
|
||||
#define foo bar(baz(success))
|
||||
foo
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
|
||||
|
||||
success
|
||||
@@ -0,0 +1,4 @@
|
||||
#define baz(failure) failure
|
||||
#define bar(failure) failure
|
||||
#define foo() bar(baz(success))
|
||||
foo()
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
|
||||
|
||||
success
|
||||
@@ -0,0 +1,2 @@
|
||||
#define foo(a) foo(2*(a))
|
||||
foo(3)
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
foo(2*(3))
|
||||
@@ -0,0 +1,2 @@
|
||||
#define foo(a) foo(2*(a))
|
||||
foo(foo(3))
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
foo(2*(foo(2*(3))))
|
||||
@@ -0,0 +1,2 @@
|
||||
#define foo(bar) bar
|
||||
foo(foo)
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
foo
|
||||
@@ -0,0 +1,2 @@
|
||||
#define foo(bar) bar
|
||||
foo(1+foo)
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
1+foo
|
||||
@@ -0,0 +1,3 @@
|
||||
#define bar success
|
||||
#define foo(x) x
|
||||
foo(more bar)
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
more success
|
||||
@@ -0,0 +1,3 @@
|
||||
#define expand(x) expand(x once)
|
||||
#define foo(x) x
|
||||
foo(expand(just))
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
expand(just once)
|
||||
@@ -0,0 +1,2 @@
|
||||
#define foo(x) success
|
||||
foo(argument (with,embedded , commas) -- tricky)
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
success
|
||||
@@ -0,0 +1,3 @@
|
||||
#define foo(a) (a)
|
||||
#define bar two,words
|
||||
foo(bar)
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
(two,words)
|
||||
@@ -0,0 +1,2 @@
|
||||
#define paste(a,b) a ## b
|
||||
paste(one , token)
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
onetoken
|
||||
@@ -0,0 +1,5 @@
|
||||
success_1
|
||||
#if 0
|
||||
failure
|
||||
#endif
|
||||
success_2
|
||||
@@ -0,0 +1,5 @@
|
||||
success_1
|
||||
|
||||
|
||||
|
||||
success_2
|
||||
@@ -0,0 +1,5 @@
|
||||
success_1
|
||||
#if 1
|
||||
success_2
|
||||
#endif
|
||||
success_3
|
||||
@@ -0,0 +1,5 @@
|
||||
success_1
|
||||
|
||||
success_2
|
||||
|
||||
success_3
|
||||
@@ -0,0 +1,7 @@
|
||||
success_1
|
||||
#if 0
|
||||
failure
|
||||
#else
|
||||
success_2
|
||||
#endif
|
||||
success_3
|
||||
@@ -0,0 +1,7 @@
|
||||
success_1
|
||||
|
||||
|
||||
|
||||
success_2
|
||||
|
||||
success_3
|
||||
@@ -0,0 +1,7 @@
|
||||
success_1
|
||||
#if 1
|
||||
success_2
|
||||
#else
|
||||
failure
|
||||
#endif
|
||||
success_3
|
||||
@@ -0,0 +1,7 @@
|
||||
success_1
|
||||
|
||||
success_2
|
||||
|
||||
|
||||
|
||||
success_3
|
||||
@@ -0,0 +1,11 @@
|
||||
success_1
|
||||
#if 0
|
||||
failure_1
|
||||
#elif 0
|
||||
failure_2
|
||||
#elif 1
|
||||
success_3
|
||||
#elif 1
|
||||
failure_3
|
||||
#endif
|
||||
success_4
|
||||
@@ -0,0 +1,11 @@
|
||||
success_1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
success_3
|
||||
|
||||
|
||||
|
||||
success_4
|
||||
@@ -0,0 +1,11 @@
|
||||
success_1
|
||||
#if 1
|
||||
success_2
|
||||
#elif 0
|
||||
failure_1
|
||||
#elif 1
|
||||
failure_2
|
||||
#elif 0
|
||||
failure_3
|
||||
#endif
|
||||
success_3
|
||||
@@ -0,0 +1,11 @@
|
||||
success_1
|
||||
|
||||
success_2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
success_3
|
||||
@@ -0,0 +1,11 @@
|
||||
success_1
|
||||
#if 0
|
||||
failure_1
|
||||
#elif 0
|
||||
failure_2
|
||||
#elif 0
|
||||
failure_3
|
||||
#else
|
||||
success_2
|
||||
#endif
|
||||
success_3
|
||||
@@ -0,0 +1,11 @@
|
||||
success_1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
success_2
|
||||
|
||||
success_3
|
||||
@@ -0,0 +1,11 @@
|
||||
success_1
|
||||
#if 0
|
||||
failure_1
|
||||
#if 1
|
||||
failure_2
|
||||
#else
|
||||
failure_3
|
||||
#endif
|
||||
failure_4
|
||||
#endif
|
||||
success_2
|
||||
@@ -0,0 +1,11 @@
|
||||
success_1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
success_2
|
||||
@@ -0,0 +1,5 @@
|
||||
#if 1 + 2 * 3 + - (25 % 17 - + 1)
|
||||
failure with operator precedence
|
||||
#else
|
||||
success
|
||||
#endif
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
|
||||
|
||||
success
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user