summaryrefslogtreecommitdiff
path: root/grammar/c++/input.cc
blob: 83d51071d6b52d98082185d437cdfe51ea8edffa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
namespace ns1
{
	namespace sub1 { class A {}; }
	namespace sub2 { class B {}; }
}

namespace ns2
{
	int i = b;
	class C
	{
	};

	using namespace ns1;
}

ns2::sub1::A a;

struct A
{
	struct B {};
};

struct C
{
	struct D : virtual public A {};
};

C::D::A d;

C c;

struct C
{

};

enum E
{
	C,
	b
};

E e;

enum E
{
	C,
	b
};


int i;
class C
{
	int j;
};

class D
{
	int ~D();
};

int C::k;
int C::~C;

typedef int Int;

class C {};
void ~C( );
void C::operator +( int i );

int i;

//void operator C( void k );

class C
{
	
};

int C::f( int i, int j( void v ) );
class C 
{
	class D {};

	typedef C I;

	I::D i;
};

C c;

void function( int i, int j )
{
	function();
}



class B { class Find {}; };

typedef B T;

class C : public T
{
	Find find;
};


template <class X> struct Y
{
	X t;
	void f();
};

template <class X> void Y<X>::f();
template <class X> struct Y
{
	class Z {};
};

class Y<int>
{
	int i;
};

//void f( class C<int> i, int j );

int f( int (*) [](), void );
void f();
class C
{
	class D {};
	void g();
};

//typename C c;

class C
{
	class D {};
	int f();
};

int f()
{
}

int C::f()
{
	D d;
}