author | Mario de Sousa <msousa@fe.up.pt> |
Tue, 05 Apr 2011 17:12:12 +0100 | |
changeset 282 | 871edf12fe64 |
parent 279 | c0453b7f99df |
child 286 | a4f4990d5c66 |
permissions | -rwxr-xr-x |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1 |
/* |
261
db2ad6541d92
Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents:
69
diff
changeset
|
2 |
* matiec - a compiler for the programming languages defined in IEC 61131-3 |
db2ad6541d92
Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents:
69
diff
changeset
|
3 |
* Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt) |
279
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
261
diff
changeset
|
4 |
* Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant |
261
db2ad6541d92
Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents:
69
diff
changeset
|
5 |
* |
db2ad6541d92
Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents:
69
diff
changeset
|
6 |
* This program is free software: you can redistribute it and/or modify |
db2ad6541d92
Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents:
69
diff
changeset
|
7 |
* it under the terms of the GNU General Public License as published by |
db2ad6541d92
Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents:
69
diff
changeset
|
8 |
* the Free Software Foundation, either version 3 of the License, or |
db2ad6541d92
Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents:
69
diff
changeset
|
9 |
* (at your option) any later version. |
db2ad6541d92
Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents:
69
diff
changeset
|
10 |
* |
db2ad6541d92
Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents:
69
diff
changeset
|
11 |
* This program is distributed in the hope that it will be useful, |
db2ad6541d92
Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents:
69
diff
changeset
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
db2ad6541d92
Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents:
69
diff
changeset
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
db2ad6541d92
Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents:
69
diff
changeset
|
14 |
* GNU General Public License for more details. |
db2ad6541d92
Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents:
69
diff
changeset
|
15 |
* |
db2ad6541d92
Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents:
69
diff
changeset
|
16 |
* You should have received a copy of the GNU General Public License |
db2ad6541d92
Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents:
69
diff
changeset
|
17 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
db2ad6541d92
Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents:
69
diff
changeset
|
18 |
* |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
19 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
20 |
* This code is made available on the understanding that it will not be |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
21 |
* used in safety-critical situations without a full and competent review. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
22 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
23 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
24 |
/* |
261
db2ad6541d92
Updating licensing information.
Mario de Sousa <msousa@fe.up.pt>
parents:
69
diff
changeset
|
25 |
* An IEC 61131-3 compiler. |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
26 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
27 |
* Based on the |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
28 |
* FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
29 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
30 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
31 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
32 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
33 |
* Definition of the Abstract Syntax data structure components |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
34 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
35 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
36 |
#include <stdio.h> |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
37 |
#include <stdlib.h> /* required for exit() */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
38 |
#include <string.h> |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
39 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
40 |
#include "absyntax.hh" |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
41 |
//#include "../stage1_2/iec.hh" /* required for BOGUS_TOKEN_ID, etc... */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
42 |
#include "visitor.hh" |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
43 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
44 |
#define ABORT(str) {printf("ERROR: %s\n", str); exit(0);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
45 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
46 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
47 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
48 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
49 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
50 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
51 |
/* The base class of all symbols */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
52 |
symbol_c::symbol_c(void) { |
69 | 53 |
this->first_line = 0; |
54 |
this->first_column = 0; |
|
55 |
this->last_line = 0; |
|
56 |
this->last_column = 0; |
|
57 |
} |
|
58 |
||
59 |
symbol_c::symbol_c(int first_line, int first_column, int last_line, int last_column) { |
|
60 |
this->first_line = first_line; |
|
61 |
this->first_column = first_column; |
|
62 |
this->last_line = last_line; |
|
63 |
this->last_column = last_column; |
|
64 |
} |
|
65 |
||
66 |
||
67 |
||
68 |
token_c::token_c(const char *value, int fl, int fc, int ll, int lc) |
|
69 |
:symbol_c(fl, fc, ll, lc) { |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
70 |
this->value = value; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
71 |
// printf("New token: %s\n", value); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
72 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
73 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
74 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
75 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
76 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
77 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
78 |
|
69 | 79 |
list_c::list_c(int fl, int fc, int ll, int lc) |
80 |
:symbol_c(fl, fc, ll, lc) { |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
81 |
n = 0; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
82 |
elements = NULL; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
83 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
84 |
|
69 | 85 |
list_c::list_c(symbol_c *elem, int fl, int fc, int ll, int lc) |
86 |
:symbol_c(fl, fc, ll, lc) { |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
87 |
n = 0; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
88 |
elements = NULL; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
89 |
add_element(elem); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
90 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
91 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
92 |
/* insert a new element */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
93 |
void list_c::add_element(symbol_c *elem) { |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
94 |
//printf("list_c::add_element()\n"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
95 |
n++; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
96 |
elements = (symbol_c **)realloc(elements, n * sizeof(symbol_c *)); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
97 |
if (elements == NULL) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
98 |
ABORT("Out of memory"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
99 |
elements[n - 1] = elem; |
69 | 100 |
|
101 |
if (elem == NULL) |
|
102 |
return; |
|
103 |
||
104 |
/* adjust the location parameters, taking into account the new element. */ |
|
105 |
if ((first_line == elem->first_line) && |
|
106 |
(first_column > elem->first_column)) { |
|
107 |
first_column = elem->first_column; |
|
108 |
} |
|
109 |
if (first_line > elem->first_line) { |
|
110 |
first_line = elem->first_line; |
|
111 |
first_column = elem->first_column; |
|
112 |
} |
|
113 |
if ((last_line == elem->last_line) && |
|
114 |
(last_column < elem->last_column)) { |
|
115 |
last_column = elem->last_column; |
|
116 |
} |
|
117 |
if (last_line < elem->last_line) { |
|
118 |
last_line = elem->last_line; |
|
119 |
last_column = elem->last_column; |
|
120 |
} |
|
121 |
} |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
122 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
123 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
124 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
125 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
126 |
#define SYM_LIST(class_name_c) \ |
69 | 127 |
class_name_c::class_name_c(int fl, int fc, int ll, int lc) \ |
128 |
:list_c(fl, fc, ll, lc) {} \ |
|
129 |
class_name_c::class_name_c(symbol_c *elem, int fl, int fc, int ll, int lc) \ |
|
130 |
:list_c(elem, fl, fc, ll, lc) {} \ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
131 |
void *class_name_c::accept(visitor_c &visitor) {return visitor.visit(this);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
132 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
133 |
#define SYM_TOKEN(class_name_c) \ |
69 | 134 |
class_name_c::class_name_c(const char *value, int fl, int fc, int ll, int lc) \ |
135 |
:token_c(value, fl, fc, ll, lc) {} \ |
|
136 |
void *class_name_c::accept(visitor_c &visitor) {return visitor.visit(this);} |
|
137 |
||
138 |
#define SYM_REF0(class_name_c) \ |
|
139 |
class_name_c::class_name_c(int fl, int fc, \ |
|
140 |
int ll, int lc \ |
|
141 |
): symbol_c(fl, fc, ll, lc) {} \ |
|
142 |
void *class_name_c::accept(visitor_c &visitor) {return visitor.visit(this);} |
|
143 |
||
144 |
||
145 |
#define SYM_REF1(class_name_c, ref1) \ |
|
146 |
class_name_c::class_name_c(symbol_c *ref1, \ |
|
147 |
int fl, int fc, \ |
|
148 |
int ll, int lc \ |
|
149 |
): symbol_c(fl, fc, ll, lc) { \ |
|
150 |
this->ref1 = ref1; \ |
|
151 |
} \ |
|
152 |
void *class_name_c::accept(visitor_c &visitor) {return visitor.visit(this);} |
|
153 |
||
154 |
||
155 |
#define SYM_REF2(class_name_c, ref1, ref2) \ |
|
156 |
class_name_c::class_name_c(symbol_c *ref1, \ |
|
157 |
symbol_c *ref2, \ |
|
158 |
int fl, int fc, \ |
|
159 |
int ll, int lc \ |
|
160 |
): symbol_c(fl, fc, ll, lc) { \ |
|
161 |
this->ref1 = ref1; \ |
|
162 |
this->ref2 = ref2; \ |
|
163 |
} \ |
|
164 |
void *class_name_c::accept(visitor_c &visitor) {return visitor.visit(this);} |
|
165 |
||
166 |
||
167 |
#define SYM_REF3(class_name_c, ref1, ref2, ref3) \ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
168 |
class_name_c::class_name_c(symbol_c *ref1, \ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
169 |
symbol_c *ref2, \ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
170 |
symbol_c *ref3, \ |
69 | 171 |
int fl, int fc, \ |
172 |
int ll, int lc \ |
|
173 |
): symbol_c(fl, fc, ll, lc) { \ |
|
174 |
this->ref1 = ref1; \ |
|
175 |
this->ref2 = ref2; \ |
|
176 |
this->ref3 = ref3; \ |
|
177 |
} \ |
|
178 |
void *class_name_c::accept(visitor_c &visitor) {return visitor.visit(this);} |
|
179 |
||
180 |
||
181 |
#define SYM_REF4(class_name_c, ref1, ref2, ref3, ref4) \ |
|
182 |
class_name_c::class_name_c(symbol_c *ref1, \ |
|
183 |
symbol_c *ref2, \ |
|
184 |
symbol_c *ref3, \ |
|
185 |
symbol_c *ref4, \ |
|
186 |
int fl, int fc, \ |
|
187 |
int ll, int lc \ |
|
188 |
): symbol_c(fl, fc, ll, lc) { \ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
189 |
this->ref1 = ref1; \ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
190 |
this->ref2 = ref2; \ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
191 |
this->ref3 = ref3; \ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
192 |
this->ref4 = ref4; \ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
193 |
} \ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
194 |
void *class_name_c::accept(visitor_c &visitor) {return visitor.visit(this);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
195 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
196 |
|
69 | 197 |
#define SYM_REF5(class_name_c, ref1, ref2, ref3, ref4, ref5) \ |
198 |
class_name_c::class_name_c(symbol_c *ref1, \ |
|
199 |
symbol_c *ref2, \ |
|
200 |
symbol_c *ref3, \ |
|
201 |
symbol_c *ref4, \ |
|
202 |
symbol_c *ref5, \ |
|
203 |
int fl, int fc, \ |
|
204 |
int ll, int lc \ |
|
205 |
): symbol_c(fl, fc, ll, lc) { \ |
|
206 |
this->ref1 = ref1; \ |
|
207 |
this->ref2 = ref2; \ |
|
208 |
this->ref3 = ref3; \ |
|
209 |
this->ref4 = ref4; \ |
|
210 |
this->ref5 = ref5; \ |
|
211 |
} \ |
|
212 |
void *class_name_c::accept(visitor_c &visitor) {return visitor.visit(this);} |
|
213 |
||
214 |
||
215 |
||
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
216 |
#define SYM_REF6(class_name_c, ref1, ref2, ref3, ref4, ref5, ref6) \ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
217 |
class_name_c::class_name_c(symbol_c *ref1, \ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
218 |
symbol_c *ref2, \ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
219 |
symbol_c *ref3, \ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
220 |
symbol_c *ref4, \ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
221 |
symbol_c *ref5, \ |
69 | 222 |
symbol_c *ref6, \ |
223 |
int fl, int fc, \ |
|
224 |
int ll, int lc \ |
|
225 |
): symbol_c(fl, fc, ll, lc) { \ |
|
226 |
this->ref1 = ref1; \ |
|
227 |
this->ref2 = ref2; \ |
|
228 |
this->ref3 = ref3; \ |
|
229 |
this->ref4 = ref4; \ |
|
230 |
this->ref5 = ref5; \ |
|
231 |
this->ref6 = ref6; \ |
|
232 |
} \ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
233 |
void *class_name_c::accept(visitor_c &visitor) {return visitor.visit(this);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
234 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
235 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
236 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
237 |
#include "absyntax.def" |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
238 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
239 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
240 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
241 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
242 |
#undef SYM_LIST |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
243 |
#undef SYM_TOKEN |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
244 |
#undef SYM_TOKEN |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
245 |
#undef SYM_REF0 |
69 | 246 |
#undef SYM_REF1 |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
247 |
#undef SYM_REF2 |
69 | 248 |
#undef SYM_REF3 |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
249 |
#undef SYM_REF4 |
69 | 250 |
#undef SYM_REF5 |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
251 |
#undef SYM_REF6 |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
252 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
253 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
254 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
255 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
256 |