104494
|
1 /* What the SPP replace file would looklike with MACROS replaced.
|
|
2 */
|
|
3
|
|
4 /* TEST: The EMU keyword doesn't screw up the function defn. */
|
|
5 char parse_around_emu ()
|
|
6 {
|
|
7 }
|
|
8
|
|
9 /* TEST: A simple word can be replaced in a definition. */
|
|
10 float returnanfloat()
|
|
11 {
|
|
12 }
|
|
13
|
|
14 /* TEST: Punctuation an be replaced in a definition. */
|
|
15 int foo::bar ()
|
|
16 {
|
|
17 }
|
|
18
|
|
19 /* TEST: Multiple lexical characters in a definition */
|
|
20 int mysuper::baz ()
|
|
21 {
|
|
22 }
|
|
23
|
|
24 /* TEST: Macro replacement. */
|
|
25 int increment (int in) {
|
|
26 return in+1;
|
|
27 }
|
|
28
|
|
29 /* TEST: Macro replacement with complex args */
|
|
30 int myFcn1 ();
|
|
31
|
|
32 int myFcn2 (int a, int b);
|
|
33 int myFcn3 (int a, int b);
|
|
34
|
|
35 /* TEST: Multiple args to a macro. */
|
|
36 struct ma_struct { int moose; int penguin; int emu; };
|
|
37
|
|
38 /* TEST: Macro w/ args, but no body. */
|
|
39
|
|
40 /* TEST: Not a macro with args, but close. */
|
|
41 int not_with_args_fcn (moose)
|
|
42 {
|
|
43 }
|
|
44
|
|
45 /* TEST: macro w/ continuation. */
|
|
46 int continuation_symbol () { };
|
|
47
|
|
48 /* TEST: macros in a macro - tail processing */
|
|
49
|
|
50 int tail (int q) {}
|
|
51
|
|
52 /* TEST: macros used impropertly. */
|
|
53
|
|
54 int tail_fcn(int q);
|
|
55
|
|
56 /* TEST: feature of CPP from LSD <lsdsgster@...> */
|
|
57
|
|
58 int __gthrw_foo (int arg1) { }
|
|
59
|
|
60 /* TEST: macros using macros */
|
|
61 int foo;
|
|
62
|
|
63 /* TEST: macros with args using macros */
|
|
64 int noodle(int noodle);
|
|
65
|
|
66 /* TEST: Double macro using the argument stack. */
|
|
67 int that_foo(int i);
|
|
68 int this_foo(int i);
|
|
69
|
|
70 /* TEST: The G++ namespace macro hack. Not really part of SPP. */
|
|
71 namespace baz {
|
|
72
|
|
73 int bazfnc(int b) { }
|
|
74
|
|
75 }
|
|
76
|
|
77 namespace foo { namespace bar {
|
|
78
|
|
79 int foo_bar_func(int a) { }
|
|
80
|
|
81 }
|
|
82 }
|
|
83
|
|
84 /* TEST: The VC++ macro hack. */
|
|
85 namespace std {
|
|
86
|
|
87 int inside_std_namespace(int a) { }
|
|
88
|
|
89 }
|
|
90
|
|
91 /* TEST: Recursion prevention. CPP doesn't allow even 1 level of recursion. */
|
|
92 int MACROA () {
|
|
93
|
|
94 }
|
|
95
|
|
96
|
|
97 /* End */
|
105377
|
98
|
|
99 /* arch-tag: fbc5621d-769c-45d0-b924-6c56743189e5
|
|
100 (do not change this comment) */
|