Last change
on this file since 3f37f5b was
fd54fef,
checked in by Michael Brooks <mlbrooks@…>, 4 years ago
|
Converting the project to use the new syntax for otype, dtype and ttytpe.
Changed prelude (gen), libcfa and test suite to use it. Added a simple deprecation rule of the old syntax to the parser; we might wish to support both syntaxes "officially," like with an extra CLI switch, but this measure should serve as a simple reminder for our team to try the new syntax.
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Rev | Line | |
---|
[40a7d9c] | 1 | typedef int TD; |
---|
| 2 | extern struct TTT {}; |
---|
[62edde5] | 3 | |
---|
| 4 | struct S { |
---|
| 5 | int m1:3, m2:4; |
---|
| 6 | int :2; |
---|
| 7 | int :3, :4; |
---|
| 8 | int m3; |
---|
| 9 | int m4, m5, m6; |
---|
| 10 | int *m7, *m8, *m9; |
---|
[40a7d9c] | 11 | __extension__ int (*m10)(); |
---|
| 12 | __extension__ int *(*m11)(int); |
---|
| 13 | // TD (TD); |
---|
[62edde5] | 14 | |
---|
[40a7d9c] | 15 | // Cforall declarations |
---|
[62edde5] | 16 | |
---|
| 17 | * int m12, m13; |
---|
| 18 | * [ * int ] (int) m14; |
---|
[40a7d9c] | 19 | |
---|
| 20 | // C anonymous declarations (padding) |
---|
| 21 | |
---|
| 22 | int :4; |
---|
| 23 | int :4, :6; |
---|
| 24 | |
---|
| 25 | // Cforall anonymous declarations (padding) |
---|
| 26 | |
---|
| 27 | int @; |
---|
| 28 | TD @; |
---|
| 29 | int @, @, @; |
---|
| 30 | int * @ , @, @; |
---|
| 31 | int * @, * @, * @; |
---|
| 32 | * int @, @, @; |
---|
| 33 | struct TTT @; |
---|
| 34 | TTT @, @; |
---|
| 35 | int @ :4, @ :6; |
---|
| 36 | * int @, @; |
---|
| 37 | int (*@)(); |
---|
| 38 | int (*@)(int), (*@)(int); |
---|
| 39 | * [int](int) @, @; |
---|
| 40 | int (**@)( int ); |
---|
| 41 | * * [int](int) @; |
---|
| 42 | |
---|
| 43 | // C aggregate open declarations |
---|
| 44 | |
---|
| 45 | __extension__ union { int i; }; |
---|
| 46 | struct T { int k; }; |
---|
| 47 | |
---|
| 48 | // Cforall forward declaration |
---|
| 49 | |
---|
| 50 | struct PPP; |
---|
| 51 | __extension__ struct QQQ; |
---|
| 52 | |
---|
| 53 | // C useless declarations |
---|
| 54 | |
---|
[66812dd] | 55 | #ifdef ERROR |
---|
[40a7d9c] | 56 | int; |
---|
| 57 | TD; |
---|
| 58 | unsigned int; |
---|
| 59 | __extension__ long double; |
---|
| 60 | _Complex; |
---|
| 61 | double _Complex; |
---|
| 62 | volatile zero_t; |
---|
| 63 | const one_t; |
---|
| 64 | S; |
---|
| 65 | .S; |
---|
| 66 | S.T; |
---|
| 67 | .S.T; |
---|
[fd54fef] | 68 | forall( S, T ) struct W { |
---|
[40a7d9c] | 69 | struct X {}; |
---|
| 70 | }; |
---|
| 71 | W(int); |
---|
| 72 | W(int).X; |
---|
[66812dd] | 73 | #endif // ERROR |
---|
[62edde5] | 74 | }; |
---|
| 75 | |
---|
| 76 | struct S s; |
---|
| 77 | |
---|
[40a7d9c] | 78 | // Cforall Plan 9 declarations |
---|
| 79 | |
---|
| 80 | struct UUU {}; |
---|
| 81 | extern struct SSS { |
---|
| 82 | inline struct WWW {}; |
---|
| 83 | inline UUU; |
---|
| 84 | inline UUU *, **; |
---|
| 85 | inline UUU (*)( int p ); |
---|
| 86 | inline int; |
---|
| 87 | inline int *; |
---|
| 88 | inline * int; |
---|
| 89 | inline int (*)( int p ); |
---|
| 90 | inline * [int](int p); |
---|
| 91 | }; |
---|
| 92 | |
---|
[62edde5] | 93 | union U { |
---|
| 94 | [5] int m1; |
---|
| 95 | int m2[5]; |
---|
| 96 | * int m3; |
---|
| 97 | int *m4; |
---|
| 98 | } u; |
---|
| 99 | |
---|
| 100 | // Local Variables: // |
---|
| 101 | // tab-width: 4 // |
---|
| 102 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.