Changeset a65d92e for src/Tests/SynTree
- Timestamp:
- Jun 5, 2015, 9:34:43 AM (10 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 59db689
- Parents:
- 44b5ca0
- Location:
- src/Tests/SynTree
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Tests/SynTree/Array.c
r44b5ca0 ra65d92e 10 10 11 11 int fred() { 12 13 14 15 12 int a1[]; 13 int a2[*]; 14 int a4[3]; 15 int T[3]; 16 16 } 17 17 18 18 int mary( int T[3], 19 int p1[const 3],20 int p2[static 3],21 int p3[static const 3]22 19 int p1[const 3], 20 int p2[static 3], 21 int p3[static const 3] 22 ) { 23 23 } 24 24 … … 27 27 28 28 int (*(jane)())( int T[3], 29 int p1[const 3],30 int p2[static 3],31 int p3[static const 3]32 29 int p1[const 3], 30 int p2[static 3], 31 int p3[static const 3] 32 ) { 33 33 } 34 35 // Local Variables: // 36 // tab-width: 4 // 37 // End: // -
src/Tests/SynTree/Context.c
r44b5ca0 ra65d92e 1 context has_q( type T ) 2 { 3 T q( T ); 1 context has_q( type T ) { 2 T q( T ); 4 3 }; 5 4 6 forall( type z | has_q( z ) ) 7 void f() 8 { 9 context has_r( type T, type U ) 10 { 11 T r( T, T (T,U) ); 12 }; 5 forall( type z | has_q( z ) ) void f() { 6 context has_r( type T, type U ) { 7 T r( T, T (T,U) ); 8 }; 13 9 14 extern type x, y | has_r( x, y ); 15 10 extern type x, y | has_r( x, y ); 16 11 } 12 13 // Local Variables: // 14 // tab-width: 4 // 15 // End: // -
src/Tests/SynTree/DeclarationErrors.c
r44b5ca0 ra65d92e 4 4 typedef int Int; 5 5 static Int volatile static const x28; // duplicate static 6 7 // Local Variables: // 8 // tab-width: 4 // 9 // End: // -
src/Tests/SynTree/DeclarationSpecifier.c
r44b5ca0 ra65d92e 85 85 static const Int inline volatile f48(); 86 86 87 // Local Variables: // 88 // tab-width: 4 // 89 // End: // -
src/Tests/SynTree/Enum.c
r44b5ca0 ra65d92e 1 1 enum Colors { 2 3 4 5 6 7 8 2 Red, 3 Yellow, 4 Pink, 5 Blue, 6 Purple, 7 Orange, 8 Green 9 9 }; 10 10 11 void f( void ) { 12 enum Fruits { 13 Apple, 14 Banana, 15 Pear, 16 Mango 17 } fruit = Mango; 18 } 11 19 12 void f( void ) 13 { 14 enum Fruits { 15 Apple, 16 Banana, 17 Pear, 18 Mango 19 } fruit = Mango; 20 } 20 // Local Variables: // 21 // tab-width: 4 // 22 // End: // -
src/Tests/SynTree/Forall.c
r44b5ca0 ra65d92e 2 2 3 3 forall( type T ) 4 4 void swap( T left, T right ) { 5 5 T temp = left; 6 6 left = right; 7 7 right = temp; 8 8 } 9 9 10 10 context sumable( type T ) { … … 16 16 17 17 type T1 | { const T1 0; T1 ?+?(T1, T1); T1 ?++(T1); [T1] ?+=?(T1,T1); }, 18 19 18 T2(type P1, type P2 ), 19 T3 | sumable(T3); 20 20 21 21 type T2(type P1, type P2) | sumable(T2(P1,P2)) = struct { P1 i; P2 j; }; … … 28 28 29 29 forall( type T | sumable( T ) ) 30 30 T sum( int n, T a[] ) { 31 31 T total = 0; 32 32 int i; … … 34 34 total = total + a[i]; 35 35 return total; 36 36 } 37 37 38 38 forall( type T | { const T 0; T ?+?(T, T); T ?++(T); [T] ?+=?(T,T); } ) 39 39 T twice( T t ) { 40 40 return t + t; 41 41 } 42 42 43 43 int main() { … … 50 50 sum( 10, a ); 51 51 } 52 53 // Local Variables: // 54 // tab-width: 4 // 55 // End: // -
src/Tests/SynTree/Functions.c
r44b5ca0 ra65d92e 4 4 5 5 int f ( 6 7 8 9 10 11 12 13 14 6 int (void), 7 int (int), 8 int ((void)), 9 int ((int)), 10 void g(void) 11 ) { 12 (*g)(); 13 g(); 14 g = h; 15 15 } 16 16 … … 93 93 int ( int, int p ), 94 94 [int](int) 95 96 97 98 95 ) { 96 int (*(*p)[][10])[][3]; 97 * [][10] * [][3] int p; 98 * [] * [int](int) p; 99 99 } 100 100 … … 108 108 109 109 int f( 110 110 int (), 111 111 112 113 114 115 112 int *(), 113 int **(), 114 int * const *(), 115 int * const * const (), 116 116 117 118 117 int ([]), 118 int ([10]), 119 119 120 121 122 123 124 125 126 127 128 120 int *([]), 121 int *([10]), 122 int **([]), 123 int **([10]), 124 int * const *([]), 125 int * const *([10]), 126 int * const * const ([]), 127 int * const * const ([10]) 128 ); 129 129 130 130 int f( 131 131 int (), 132 132 133 134 135 136 133 int *(), 134 int **(), 135 int * const *(), 136 int * const * const (), 137 137 138 139 138 int ([]), 139 int ([10]), 140 140 141 142 143 144 145 146 147 148 149 141 int *([]), 142 int *([10]), 143 int **([]), 144 int **([10]), 145 int * const *([]), 146 int * const *([10]), 147 int * const * const ([]), 148 int * const * const ([10]) 149 ) { 150 150 } 151 151 … … 153 153 154 154 int f( T (T), T T ) { 155 155 T (T); 156 156 } 157 157 … … 162 162 //int f[]() {} 163 163 //int ((*f15())())[] {} 164 165 // Local Variables: // 166 // tab-width: 4 // 167 // End: // -
src/Tests/SynTree/IdentFuncDeclarator.c
r44b5ca0 ra65d92e 1 1 int main() { 2 3 4 5 6 7 8 9 10 2 //int f0[](); 3 //int (f0[])(); 4 //int f0()[]; 5 //int f0()(); 6 //int (*f0)()(); 7 //int ((*f0())())[]; 8 9 int f1; 10 int (f2); 11 11 12 13 14 15 12 int *f3; 13 int **f4; 14 int * const *f5; 15 int * const * const f6; 16 16 17 18 19 20 17 int *(f7); 18 int **(f8); 19 int * const *(f9); 20 int * const * const (f10); 21 21 22 23 24 25 22 int (*f11); 23 int (**f12); 24 int (* const *f13); 25 int (* const * const f14); 26 26 27 28 29 30 27 int f15[]; 28 int f16[10]; 29 int (f17[]); 30 int (f18[10]); 31 31 32 33 34 35 36 37 38 39 32 int *f19[]; 33 int *f20[10]; 34 int **f21[]; 35 int **f22[10]; 36 int * const *f23[]; 37 int * const *f24[10]; 38 int * const * const f25[]; 39 int * const * const f26[10]; 40 40 41 42 43 44 45 46 47 48 41 int *(f27[]); 42 int *(f28[10]); 43 int **(f29[]); 44 int **(f30[10]); 45 int * const *(f31[]); 46 int * const *(f32[10]); 47 int * const * const (f33[]); 48 int * const * const (f34[10]); 49 49 50 51 52 53 54 55 56 57 50 int (*f35[]); 51 int (*f36[10]); 52 int (**f37[]); 53 int (**f38[10]); 54 int (* const *f39[]); 55 int (* const *f40[10]); 56 int (* const * const f41[]); 57 int (* const * const f42[10]); 58 58 59 60 61 62 63 64 59 int f43[][3]; 60 int f44[3][3]; 61 int (f45[])[3]; 62 int (f46[3])[3]; 63 int ((f47[]))[3]; 64 int ((f48[3]))[3]; 65 65 66 67 68 69 70 71 72 73 66 int *f49[][3]; 67 int *f50[3][3]; 68 int **f51[][3]; 69 int **f52[3][3]; 70 int * const *f53[][3]; 71 int * const *f54[3][3]; 72 int * const * const f55[][3]; 73 int * const * const f56[3][3]; 74 74 75 76 77 78 79 80 81 82 75 int (*f57[][3]); 76 int (*f58[3][3]); 77 int (**f59[][3]); 78 int (**f60[3][3]); 79 int (* const *f61[][3]); 80 int (* const *f62[3][3]); 81 int (* const * const f63[][3]); 82 int (* const * const f64[3][3]); 83 83 84 85 84 int f65(int); 85 int (f66)(int); 86 86 87 88 89 90 87 int *f67(int); 88 int **f68(int); 89 int * const *f69(int); 90 int * const * const f70(int); 91 91 92 93 94 95 92 int *(f71)(int); 93 int **(f72)(int); 94 int * const *(f73)(int); 95 int * const * const (f74)(int); 96 96 97 98 99 100 97 int (*f75)(int); 98 int (**f76)(int); 99 int (* const *f77)(int); 100 int (* const * const f78)(int); 101 101 102 103 104 102 int (*(*f79)(int))(); 103 int (*(* const f80)(int))(); 104 int (* const(* const f81)(int))(); 105 105 } 106 107 // Local Variables: // 108 // tab-width: 4 // 109 // End: // -
src/Tests/SynTree/IdentFuncParamDeclarator.c
r44b5ca0 ra65d92e 1 1 int fred( 2 3 4 5 6 7 8 9 10 2 //int f0[](), 3 //int (f0[])(), 4 //int f0()[], 5 //int f0()(), 6 //int (*f0)()(), 7 //int ((*f0())())[], 8 9 int f1, 10 int (f2), 11 11 12 13 14 15 12 int *f3, 13 int **f4, 14 int * const *f5, 15 int * const * const f6, 16 16 17 18 19 20 17 int *(f7), 18 int **(f8), 19 int * const *(f9), 20 int * const * const (f10), 21 21 22 23 24 25 22 int (*f11), 23 int (**f12), 24 int (* const *f13), 25 int (* const * const f14), 26 26 27 28 29 30 27 int f15[], 28 int f16[10], 29 int (f17[]), 30 int (f18[10]), 31 31 32 33 34 35 36 37 38 39 32 int *f19[], 33 int *f20[10], 34 int **f21[], 35 int **f22[10], 36 int * const *f23[], 37 int * const *f24[10], 38 int * const * const f25[], 39 int * const * const f26[10], 40 40 41 42 43 44 45 46 47 48 41 int *(f27[]), 42 int *(f28[10]), 43 int **(f29[]), 44 int **(f30[10]), 45 int * const *(f31[]), 46 int * const *(f32[10]), 47 int * const * const (f33[]), 48 int * const * const (f34[10]), 49 49 50 51 52 53 54 55 56 57 50 int (*f35[]), 51 int (*f36[10]), 52 int (**f37[]), 53 int (**f38[10]), 54 int (* const *f39[]), 55 int (* const *f40[10]), 56 int (* const * const f41[]), 57 int (* const * const f42[10]), 58 58 59 60 61 62 63 64 59 int f43[][3], 60 int f44[3][3], 61 int (f45[])[3], 62 int (f46[3])[3], 63 int ((f47[]))[3], 64 int ((f48[3]))[3], 65 65 66 67 68 69 70 71 72 73 66 int *f49[][3], 67 int *f50[3][3], 68 int **f51[][3], 69 int **f52[3][3], 70 int * const *f53[][3], 71 int * const *f54[3][3], 72 int * const * const f55[][3], 73 int * const * const f56[3][3], 74 74 75 76 77 78 79 80 81 82 75 int (*f57[][3]), 76 int (*f58[3][3]), 77 int (**f59[][3]), 78 int (**f60[3][3]), 79 int (* const *f61[][3]), 80 int (* const *f62[3][3]), 81 int (* const * const f63[][3]), 82 int (* const * const f64[3][3]), 83 83 84 85 84 int f65(int), 85 int (f66)(int), 86 86 87 88 89 90 87 int *f67(int), 88 int **f68(int), 89 int * const *f69(int), 90 int * const * const f70(int), 91 91 92 93 94 95 92 int *(f71)(int), 93 int **(f72)(int), 94 int * const *(f73)(int), 95 int * const * const (f74)(int), 96 96 97 98 99 100 97 int (*f75)(int), 98 int (**f76)(int), 99 int (* const *f77)(int), 100 int (* const * const f78)(int), 101 101 102 103 104 102 int (*(*f79)(int))(), 103 int (*(* const f80)(int))(), 104 int (* const(* const f81)(int))(), 105 105 106 107 108 109 106 int f82[const *], 107 int f83[const 3], 108 int f84[static 3], 109 int f85[static const 3], 110 110 111 112 113 114 111 int (f86[const *]), 112 int (f87[const 3]), 113 int (f88[static 3]), 114 int (f89[static const 3]), 115 115 116 117 118 119 120 116 int *f90[const *], 117 int *f91[const 3], 118 int **f92[static 3], 119 int * const *f93[static const 3], 120 int * const * const f94[static const 3], 121 121 122 123 124 125 126 122 int *(f95[const *]), 123 int *(f96[const 3]), 124 int **(f97[static 3]), 125 int * const *(f98[static const 3]), 126 int * const * const (f99[static const 3]), 127 127 128 129 130 131 128 int f100[const *][3], 129 int f101[const 3][3], 130 int f102[static 3][3], 131 int f103[static const 3][3], 132 132 133 134 135 136 133 int (f104[const *][3]), 134 int (f105[const 3][3]), 135 int (f106[static 3][3]), 136 int (f107[static const 3][3]), 137 137 138 139 140 141 142 138 int *f108[const *][3], 139 int *f109[const 3][3], 140 int **f110[static 3][3], 141 int * const *f111[static const 3][3], 142 int * const * const f112[static const 3][3], 143 143 144 145 146 147 148 149 144 int *(f113[const *][3]), 145 int *(f114[const 3][3]), 146 int **(f115[static 3][3]), 147 int * const *(f116[static const 3][3]), 148 int * const * const (f117[static const 3][3]) 149 ) { 150 150 } 151 152 // Local Variables: // 153 // tab-width: 4 // 154 // End: // -
src/Tests/SynTree/Initialization.c
r44b5ca0 ra65d92e 9 9 10 10 struct { 11 11 [int] w; 12 12 } a = { .w : [2] }; 13 13 … … 15 15 16 16 struct { 17 18 17 int f1, f2, f3; 18 struct { int g1, g2, g3; } f4[4]; 19 19 } v7 = { 20 21 22 23 .g1 : 3,24 g3 : 0,25 26 20 .f1 : 4, 21 f2 : 3, 22 .f4[2] : { 23 .g1 : 3, 24 g3 : 0, 25 }, 26 .f4[3].g3 : 7, 27 27 }; 28 29 // Local Variables: // 30 // tab-width: 4 // 31 // End: // -
src/Tests/SynTree/Scope.c
r44b5ca0 ra65d92e 8 8 9 9 y w(y y, u v) { 10 11 12 10 type x | { x t(u); }; 11 u u = y; 12 x z = t(u); 13 13 } 14 14 … … 17 17 context has_u( type z ) 18 18 { 19 19 z u(z); 20 20 }; 21 21 … … 23 23 y q( t the_t ) 24 24 { 25 25 t y = u( the_t ); 26 26 } 27 27 28 28 t f( y p ) { 29 30 29 int y; 30 typedef char x; 31 31 32 33 34 32 { 33 x y; 34 typedef x z; 35 35 36 37 38 39 40 36 { 37 z x; 38 typedef z y; 39 y z = x; 40 } 41 41 42 43 42 z x = y; 43 } 44 44 45 45 x q = y; 46 46 } 47 47 48 48 t g( void ) { 49 50 51 52 53 54 55 49 typedef char x; 50 try { 51 some_func(); 52 } catch ( x x ) { 53 t y = x; 54 } 55 x z; 56 56 } 57 57 58 y q( i)58 y q( i ) 59 59 int i; 60 60 { 61 switch (i) {62 63 case 0:64 65 default:66 67 61 switch ( i ) { 62 y q = i; 63 case 0: 64 return q; 65 default: 66 return i; 67 } 68 68 } 69 69 70 // Local Variables: // 71 // tab-width: 4 // 72 // End: // -
src/Tests/SynTree/ScopeErrors.c
r44b5ca0 ra65d92e 5 5 float thisIsNotAnError; 6 6 7 int thisIsAlsoNotAnError() 8 { 7 int thisIsAlsoNotAnError() { 9 8 int thisIsNotAnError; 10 9 } 11 10 12 int thisIsAlsoNotAnError( double x ) 13 { 11 int thisIsAlsoNotAnError( double x ) { 14 12 } 15 13 … … 17 15 double thisIsStillNotAnError( double ); 18 16 19 double butThisIsAnError( double ) 20 { 17 double butThisIsAnError( double ) { 21 18 } 22 19 23 double butThisIsAnError( double ) 24 { 20 double butThisIsAnError( double ) { 25 21 } 26 22 23 // Local Variables: // 24 // tab-width: 4 // 25 // End: // -
src/Tests/SynTree/StructMember.c
r44b5ca0 ra65d92e 2 2 3 3 struct S { 4 5 6 7 8 9 10 11 12 13 4 int m1:3, m2:4; 5 int :2; 6 int :3, :4; 7 int m3; 8 int m4, m5, m6; 9 int *m7, *m8, *m9; 10 int (*m10)(); 11 int *(*m11)(int); 12 T T; 13 T (T); 14 14 15 15 // Cforall extensions 16 16 17 18 19 20 21 22 23 24 25 26 17 * int m12, m13; 18 * [ * int ] (int) m14; 19 int ; 20 int , , ; 21 int * , , ; 22 int *, *, *; 23 * int , , ; 24 int (*)(); 25 int (**)( int ); 26 T ; 27 27 28 28 // errors … … 34 34 35 35 union U { 36 37 38 39 36 [5] int m1; 37 int m2[5]; 38 * int m3; 39 int *m4; 40 40 } u; 41 42 // Local Variables: // 43 // tab-width: 4 // 44 // End: // -
src/Tests/SynTree/Tuple.c
r44b5ca0 ra65d92e 4 4 5 5 struct inner { 6 6 int f2, f3; 7 7 }; 8 8 9 9 struct outer { 10 11 12 10 int f1; 11 struct inner i; 12 double f4; 13 13 } s, *sp; 14 14 … … 21 21 22 22 [ short x, unsigned y ] f1( int w ) { 23 23 [ y, x ] = [ x, y ] = [ w, 23 ]; 24 24 } 25 25 26 26 [ [ int, char, long, int ] r ] g1() { 27 28 29 27 short x, p; 28 unsigned int y; 29 [ int, int ] z; 30 30 31 32 31 [ x, y, z ] = [ p, f( 17 ), 3 ]; 32 r = [ x, y, z ]; 33 33 } 34 34 35 35 [ int rc ] main( int argc, ** char argv ) { 36 37 38 39 40 41 42 43 44 45 46 47 36 int a, b, c, d; 37 struct outer t = { .[ f1,f4 ] : [ 1,7.0 ] }; 38 f( [ 3,5 ] ); 39 g( [ 3,5 ], 3 ); 40 f( t1 ); 41 g( t1, 3 ); 42 [ 3,5 ]; 43 [ a,b ] = 3; 44 [ a,b ] = [ 4.6 ]; 45 [ a,b ] = [ c,d ] = [ 3,5 ]; 46 [ a,b,[ c ] ] = [ 2,[ a,b ] ]; 47 [ a,b ] = 3 > 4 ? [ b,6 ] : [ 7,8 ]; 48 48 49 50 51 52 53 54 55 49 t1 = [ a,b ]; 50 t1 = t2 = [ a,b ]; 51 [ a,b ] = [ c,d ] = d += c += 1; 52 [ a,b ] = [ c,d ] = t1; 53 [ a,b ] = t1 = [ c,d ]; 54 [ a,b ] = t1 = t2 = [ c,d ]; 55 t1 = [ 3,4 ] = [ 3,4 ] = t1 = [ 3,4 ]; 56 56 57 58 59 60 61 57 s.[ f1, i.[ f2, f3 ], f4 ] = [ 11, 12, 13, 3.14159 ]; 58 s.[ f1, i.[ f2, f3 ], f4 ] = h( 3, 3, 0, "abc" ); 59 sp->[ f4,f1 ] = sp->[ f1,f4 ]; 60 printf( "expecting 3, 17, 23, 4; got %d, %d, %d, %d\n", s.[ f4, i.[ f3,f2 ], f1 ] ); 61 rc = 0; 62 62 } 63 64 // Local Variables: // 65 // tab-width: 4 // 66 // End: // -
src/Tests/SynTree/TypeGenerator.c
r44b5ca0 ra65d92e 1 1 context addable(type T) { 2 2 T ?+?(T,T); 3 3 }; 4 4 … … 16 16 17 17 int main() { 18 18 (struct(int) node)my_list; 19 19 } 20 21 // Local Variables: // 22 // tab-width: 4 // 23 // End: // -
src/Tests/SynTree/Typedef.c
r44b5ca0 ra65d92e 2 2 3 3 void f( void ) { 4 5 4 int T( T ); 5 T( 3 ); 6 6 } 7 7 8 8 struct { 9 9 T (T); 10 10 } fred = { 3 }; 11 11 … … 14 14 15 15 int g(void) { 16 16 double a; 17 17 } 18 18 a c; … … 27 27 } 28 28 29 / * new-style function definitions */29 // new-style function definitions 30 30 31 31 typedef [10] * int arrayOf10Pointers; … … 40 40 typedef [ * [static 10] int ] t; 41 41 typedef [ * [static 10] int x ] f(); 42 43 // Local Variables: // 44 // tab-width: 4 // 45 // End: // -
src/Tests/SynTree/TypedefDeclarator.c
r44b5ca0 ra65d92e 1 1 typedef int 2 3 4 5 6 7 8 9 10 2 f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, 3 f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, 4 f20, f21, f22, f23, f24, f25, f26, f27, f28, f29, 5 f30, f31, f32, f33, f34, f35, f36, f37, f38, f39, 6 f40, f41, f42, f43, f44, f45, f46, f47, f48, f49, 7 f50, f51, f52, f53, f54, f55, f56, f57, f58, f59, 8 f60, f61, f62, f63, f64, f65, f66, f67, f68, f69, 9 f70, f71, f72, f73, f74, f75, f76, f77, f78, f79, 10 f80, f81, f82, f83, f84, f85, f86, f87, f88, f89; 11 11 12 12 int main() { 13 14 15 16 17 18 19 20 21 13 //int f0[](); 14 //int (f0[])(); 15 //int f0()[]; 16 //int f0()(); 17 //int (*f0)()(); 18 //int ((*f0())())[]; 19 20 int f1; 21 int (f2); 22 22 23 24 25 26 23 int *f3; 24 int **f4; 25 int * const *f5; 26 int * const * const f6; 27 27 28 29 30 31 28 int *(f7); 29 int **(f8); 30 int * const *(f9); 31 int * const * const (f10); 32 32 33 34 35 36 33 int (*f11); 34 int (**f12); 35 int (* const *f13); 36 int (* const * const f14); 37 37 38 39 40 41 38 int f15[]; 39 int f16[10]; 40 int (f17[]); 41 int (f18[10]); 42 42 43 44 45 46 47 48 49 50 43 int *f19[]; 44 int *f20[10]; 45 int **f21[]; 46 int **f22[10]; 47 int * const *f23[]; 48 int * const *f24[10]; 49 int * const * const f25[]; 50 int * const * const f26[10]; 51 51 52 53 54 55 56 57 58 59 52 int *(f27[]); 53 int *(f28[10]); 54 int **(f29[]); 55 int **(f30[10]); 56 int * const *(f31[]); 57 int * const *(f32[10]); 58 int * const * const (f33[]); 59 int * const * const (f34[10]); 60 60 61 62 63 64 65 66 67 68 61 int (*f35[]); 62 int (*f36[10]); 63 int (**f37[]); 64 int (**f38[10]); 65 int (* const *f39[]); 66 int (* const *f40[10]); 67 int (* const * const f41[]); 68 int (* const * const f42[10]); 69 69 70 71 72 73 74 75 70 int f43[][3]; 71 int f44[3][3]; 72 int (f45[])[3]; 73 int (f46[3])[3]; 74 int ((f47[]))[3]; 75 int ((f48[3]))[3]; 76 76 77 78 79 80 81 82 83 84 77 int *f49[][3]; 78 int *f50[3][3]; 79 int **f51[][3]; 80 int **f52[3][3]; 81 int * const *f53[][3]; 82 int * const *f54[3][3]; 83 int * const * const f55[][3]; 84 int * const * const f56[3][3]; 85 85 86 87 88 89 90 91 92 93 86 int (*f57[][3]); 87 int (*f58[3][3]); 88 int (**f59[][3]); 89 int (**f60[3][3]); 90 int (* const *f61[][3]); 91 int (* const *f62[3][3]); 92 int (* const * const f63[][3]); 93 int (* const * const f64[3][3]); 94 94 95 96 95 int f65(int); 96 int (f66)(int); 97 97 98 99 100 101 98 int *f67(int); 99 int **f68(int); 100 int * const *f69(int); 101 int * const * const f70(int); 102 102 103 104 105 106 103 int *(f71)(int); 104 int **(f72)(int); 105 int * const *(f73)(int); 106 int * const * const (f74)(int); 107 107 108 109 110 111 108 int (*f75)(int); 109 int (**f76)(int); 110 int (* const *f77)(int); 111 int (* const * const f78)(int); 112 112 113 114 115 113 int (*(*f79)(int))(); 114 int (*(* const f80)(int))(); 115 int (* const(* const f81)(int))(); 116 116 } 117 118 // Local Variables: // 119 // tab-width: 4 // 120 // End: // -
src/Tests/SynTree/TypedefParamDeclarator.c
r44b5ca0 ra65d92e 1 1 typedef int 2 3 4 5 6 7 8 9 10 11 12 13 2 f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, 3 f10, f11, f12, f13, f14, f15, f16, f17, f18, f19, 4 f20, f21, f22, f23, f24, f25, f26, f27, f28, f29, 5 f30, f31, f32, f33, f34, f35, f36, f37, f38, f39, 6 f40, f41, f42, f43, f44, f45, f46, f47, f48, f49, 7 f50, f51, f52, f53, f54, f55, f56, f57, f58, f59, 8 f60, f61, f62, f63, f64, f65, f66, f67, f68, f69, 9 f70, f71, f72, f73, f74, f75, f76, f77, f78, f79, 10 f80, f81, f82, f83, f84, f85, f86, f87, f88, f89, 11 f90, f91, f92, f93, f94, f95, f96, f97, f98, f99, 12 f100, f101, f102, f103, f104, f105, f106, f107, f108, f109, 13 f110, f111, f112, f113, f114, f115, f116, f117, f118, f119; 14 14 15 15 int fred( 16 16 /* 17 18 19 20 21 22 17 //int f0[](), 18 //int (f0[])(), 19 //int f0()[], 20 //int f0()(), 21 //int (*f0)()(), 22 //int ((*f0())())[], 23 23 */ 24 24 int f1, 25 25 26 27 28 29 26 int *f3, 27 int **f4, 28 int * const *f5, 29 int * const * const f6, 30 30 31 32 33 34 31 int (*f11), 32 int (**f12), 33 int (* const *f13), 34 int (* const * const f14), 35 35 36 37 36 int f15[], 37 int f16[10], 38 38 39 40 41 42 43 44 45 46 39 int *f19[], 40 int *f20[10], 41 int **f21[], 42 int **f22[10], 43 int * const *f23[], 44 int * const *f24[10], 45 int * const * const f25[], 46 int * const * const f26[10], 47 47 48 49 50 51 52 53 54 55 48 int (*f35[]), 49 int (*f36[10]), 50 int (**f37[]), 51 int (**f38[10]), 52 int (* const *f39[]), 53 int (* const *f40[10]), 54 int (* const * const f41[]), 55 int (* const * const f42[10]), 56 56 57 58 57 int f43[][3], 58 int f44[3][3], 59 59 /* 60 61 62 63 60 int (f45[])[3], 61 int (f46[3])[3], 62 int ((f47[]))[3], 63 int ((f48[3]))[3], 64 64 */ 65 66 67 68 69 70 71 72 65 int *f49[][3], 66 int *f50[3][3], 67 int **f51[][3], 68 int **f52[3][3], 69 int * const *f53[][3], 70 int * const *f54[3][3], 71 int * const * const f55[][3], 72 int * const * const f56[3][3], 73 73 74 75 76 77 78 79 80 81 74 int (*f57[][3]), 75 int (*f58[3][3]), 76 int (**f59[][3]), 77 int (**f60[3][3]), 78 int (* const *f61[][3]), 79 int (* const *f62[3][3]), 80 int (* const * const f63[][3]), 81 int (* const * const f64[3][3]), 82 82 83 83 int f65(int), 84 84 /* 85 85 int (f66)(int), 86 86 */ 87 88 89 90 87 int *f67(int), 88 int **f68(int), 89 int * const *f69(int), 90 int * const * const f70(int), 91 91 /* 92 93 94 95 92 int *(f71)(int), 93 int **(f72)(int), 94 int * const *(f73)(int), 95 int * const * const (f74)(int), 96 96 */ 97 98 99 100 97 int (*f75)(int), 98 int (**f76)(int), 99 int (* const *f77)(int), 100 int (* const * const f78)(int), 101 101 102 103 104 102 int (*(*f79)(int))(), 103 int (*(* const f80)(int))(), 104 int (* const(* const f81)(int))(), 105 105 106 107 108 109 106 int f82[const *], 107 int f83[const 3], 108 int f84[static 3], 109 int f85[static const 3], 110 110 111 112 113 114 111 int (f86[const *]), 112 int (f87[const 3]), 113 int (f88[static 3]), 114 int (f89[static const 3]), 115 115 116 117 118 119 120 116 int *f90[const *], 117 int *f91[const 3], 118 int **f92[static 3], 119 int * const *f93[static const 3], 120 int * const * const f94[static const 3], 121 121 122 123 124 125 126 122 int *(f95[const *]), 123 int *(f96[const 3]), 124 int **(f97[static 3]), 125 int * const *(f98[static const 3]), 126 int * const * const (f99[static const 3]), 127 127 128 129 130 131 128 int f100[const *][3], 129 int f101[const 3][3], 130 int f102[static 3][3], 131 int f103[static const 3][3], 132 132 133 134 135 136 133 int (f104[const *][3]), 134 int (f105[const 3][3]), 135 int (f106[static 3][3]), 136 int (f107[static const 3][3]), 137 137 138 139 140 141 142 138 int *f108[const *][3], 139 int *f109[const 3][3], 140 int **f110[static 3][3], 141 int * const *f111[static const 3][3], 142 int * const * const f112[static const 3][3], 143 143 144 145 146 147 148 149 144 int *(f113[const *][3]), 145 int *(f114[const 3][3]), 146 int **(f115[static 3][3]), 147 int * const *(f116[static const 3][3]), 148 int * const * const (f117[static const 3][3]) 149 ) { 150 150 } 151 152 // Local Variables: // 153 // tab-width: 4 // 154 // End: // -
src/Tests/SynTree/VariableDeclarator.c
r44b5ca0 ra65d92e 114 114 115 115 *[]*[]* [ *[]*[] int ]( *[]*[] int, *[]*[] int ) v3; 116 117 // Local Variables: // 118 // tab-width: 4 // 119 // End: //
Note:
See TracChangeset
for help on using the changeset viewer.