author | Mario de Sousa <msousa@fe.up.pt> |
Wed, 30 Aug 2017 22:13:26 +0100 | |
changeset 1060 | 01c48180af05 |
parent 1046 | 292b7dcf14f6 |
permissions | -rw-r--r-- |
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" |
596
4efb11e44065
Add ERROR_MSG macro && move extract_XXX() functions to constant_folding.cc
Mario de Sousa <msousa@fe.up.pt>
parents:
569
diff
changeset
|
43 |
#include "../main.hh" // required for ERROR() and ERROR_MSG() macros. |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
44 |
|
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 |
|
965
c9eeb67ba939
Small code re-organization of how const values are stored in symbol_c (can now be accessed through member functions, instead of macros)
mjsousa
parents:
958
diff
changeset
|
47 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
48 |
/* The base class of all symbols */ |
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
49 |
symbol_c::symbol_c( |
287
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
50 |
int first_line, int first_column, const char *ffile, long int first_order, |
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
51 |
int last_line, int last_column, const char *lfile, long int last_order ) { |
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
52 |
this->first_file = ffile, |
69 | 53 |
this->first_line = first_line; |
54 |
this->first_column = first_column; |
|
287
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
55 |
this->first_order = first_order; |
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
56 |
this->last_file = lfile, |
69 | 57 |
this->last_line = last_line; |
58 |
this->last_column = last_column; |
|
287
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
59 |
this->last_order = last_order; |
936
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
60 |
this->parent = NULL; |
1043
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
61 |
this->token = NULL; |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
350
diff
changeset
|
62 |
this->datatype = NULL; |
889
5f380b99e95e
Correctly handle structured variables that include FB and external FBs (example: FB1.FB2.extFB3.FB4.extFB5.extFB6.structvar.field1 := 42;) (this commit fixes only ST code. TODO: IL and SFC)
mjsousa
parents:
779
diff
changeset
|
63 |
this->scope = NULL; |
69 | 64 |
} |
65 |
||
66 |
||
67 |
||
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
68 |
token_c::token_c(const char *value, |
287
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
69 |
int fl, int fc, const char *ffile, long int forder, |
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
70 |
int ll, int lc, const char *lfile, long int lorder) |
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
71 |
:symbol_c(fl, fc, ffile, forder, ll, lc, lfile, lorder) { |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
72 |
this->value = value; |
1043
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
73 |
this->token = this; // every token is its own reference token. |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
74 |
// 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
|
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 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
79 |
|
654
7421cb63defa
list_c: initial capacity. ERROR_MSG(msg,...) supports optional arguments now.
agraeper
parents:
612
diff
changeset
|
80 |
# define LIST_CAP_INIT 8 |
7421cb63defa
list_c: initial capacity. ERROR_MSG(msg,...) supports optional arguments now.
agraeper
parents:
612
diff
changeset
|
81 |
# define LIST_CAP_INCR 8 |
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 |
|
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
83 |
list_c::list_c( |
287
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
84 |
int fl, int fc, const char *ffile, long int forder, |
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
85 |
int ll, int lc, const char *lfile, long int lorder) |
655 | 86 |
:symbol_c(fl, fc, ffile, forder, ll, lc, lfile, lorder),c(LIST_CAP_INIT) { |
87 |
n = 0; |
|
1043
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
88 |
elements = (element_entry_t*)malloc(LIST_CAP_INIT*sizeof(element_entry_t)); |
655 | 89 |
if (NULL == elements) ERROR_MSG("out of memory"); |
90 |
} |
|
91 |
||
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
92 |
|
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
93 |
list_c::list_c(symbol_c *elem, |
287
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
94 |
int fl, int fc, const char *ffile, long int forder, |
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
95 |
int ll, int lc, const char *lfile, long int lorder) |
655 | 96 |
:symbol_c(fl, fc, ffile, forder, ll, lc, lfile, lorder),c(LIST_CAP_INIT) { |
97 |
n = 0; |
|
1043
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
98 |
elements = (element_entry_t*)malloc(LIST_CAP_INIT*sizeof(element_entry_t)); |
655 | 99 |
if (NULL == elements) ERROR_MSG("out of memory"); |
100 |
add_element(elem); |
|
101 |
} |
|
102 |
||
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
103 |
|
1043
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
104 |
/*******************************************/ |
1041
56ebe2a31b5b
Access elements[] in list_c through a new get_element() method.
Mario de Sousa <msousa@fe.up.pt>
parents:
965
diff
changeset
|
105 |
/* get element in position pos of the list */ |
1043
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
106 |
/*******************************************/ |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
107 |
symbol_c *list_c::get_element(int pos) {return elements[pos].symbol;} |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
108 |
|
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
109 |
|
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
110 |
|
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
111 |
/******************************************/ |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
112 |
/* find element associated to token value */ |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
113 |
/******************************************/ |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
114 |
symbol_c *list_c::find_element(symbol_c *token) { |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
115 |
token_c *t = dynamic_cast<token_c *>(token); |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
116 |
if (t == NULL) ERROR; |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
117 |
return find_element((const char *)t->value); |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
118 |
} |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
119 |
|
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
120 |
symbol_c *list_c::find_element(const char *token_value) { |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
121 |
// We could use strcasecmp(), but it's best to always use the same |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
122 |
// method of string comparison throughout matiec |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
123 |
nocasecmp_c ncc; |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
124 |
for (int i = 0; i < n; i++) |
1046
292b7dcf14f6
fix bug in symbol_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1043
diff
changeset
|
125 |
if (!ncc(elements[i].token_value, token_value)) |
1043
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
126 |
return elements[i].symbol; |
1046
292b7dcf14f6
fix bug in symbol_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1043
diff
changeset
|
127 |
|
1043
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
128 |
return NULL; // not found |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
129 |
} |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
130 |
|
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
131 |
|
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
132 |
/***********************************************/ |
350
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
133 |
/* append a new element to the end of the list */ |
1043
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
134 |
/***********************************************/ |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
135 |
void list_c::add_element(symbol_c *elem) {add_element(elem, elem);} |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
136 |
|
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
137 |
void list_c::add_element(symbol_c *elem, symbol_c *token) { |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
138 |
token_c *t = (token == NULL)? NULL : token->token; |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
139 |
add_element(elem, (t == NULL)? NULL : t->value); |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
140 |
} |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
141 |
|
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
142 |
void list_c::add_element(symbol_c *elem, const char *token_value) { |
655 | 143 |
if (c <= n) |
1043
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
144 |
if (!(elements=(element_entry_t*)realloc(elements,(c+=LIST_CAP_INCR)*sizeof(element_entry_t)))) |
655 | 145 |
ERROR_MSG("out of memory"); |
1043
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
146 |
//elements[n++] = {token_value, elem}; // only available from C++11 onwards, best not use it for now. |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
147 |
elements[n].symbol = elem; |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
148 |
elements[n].token_value = token_value; |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
149 |
n++; |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
150 |
|
655 | 151 |
if (NULL == elem) return; |
936
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
152 |
/* Sometimes add_element() is called in stage3 or stage4 to temporarily add an AST symbol to the list. |
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
153 |
* Since this symbol already belongs in some other place in the aST, it will have the 'parent' pointer set, |
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
154 |
* and so we must not overwrite it. We only set the 'parent' pointer on new symbols that have the 'parent' |
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
155 |
* pointer still set to NULL. |
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
156 |
*/ |
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
157 |
if (NULL == elem->parent) elem->parent = this; |
69 | 158 |
|
159 |
/* adjust the location parameters, taking into account the new element. */ |
|
779
2ed03e0e0e41
Update symbol_c::first_file/last_file entries in list_c::add_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
655
diff
changeset
|
160 |
if (NULL == first_file) { |
2ed03e0e0e41
Update symbol_c::first_file/last_file entries in list_c::add_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
655
diff
changeset
|
161 |
first_file = elem->first_file; |
2ed03e0e0e41
Update symbol_c::first_file/last_file entries in list_c::add_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
655
diff
changeset
|
162 |
first_line = elem->first_line; |
2ed03e0e0e41
Update symbol_c::first_file/last_file entries in list_c::add_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
655
diff
changeset
|
163 |
first_column = elem->first_column; |
2ed03e0e0e41
Update symbol_c::first_file/last_file entries in list_c::add_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
655
diff
changeset
|
164 |
} |
2ed03e0e0e41
Update symbol_c::first_file/last_file entries in list_c::add_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
655
diff
changeset
|
165 |
if ((first_line == elem->first_line) && (first_column > elem->first_column)) { |
69 | 166 |
first_column = elem->first_column; |
167 |
} |
|
168 |
if (first_line > elem->first_line) { |
|
169 |
first_line = elem->first_line; |
|
170 |
first_column = elem->first_column; |
|
171 |
} |
|
779
2ed03e0e0e41
Update symbol_c::first_file/last_file entries in list_c::add_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
655
diff
changeset
|
172 |
if (NULL == last_file) { |
2ed03e0e0e41
Update symbol_c::first_file/last_file entries in list_c::add_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
655
diff
changeset
|
173 |
last_file = elem->last_file; |
2ed03e0e0e41
Update symbol_c::first_file/last_file entries in list_c::add_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
655
diff
changeset
|
174 |
last_line = elem->last_line; |
2ed03e0e0e41
Update symbol_c::first_file/last_file entries in list_c::add_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
655
diff
changeset
|
175 |
last_column = elem->last_column; |
2ed03e0e0e41
Update symbol_c::first_file/last_file entries in list_c::add_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
655
diff
changeset
|
176 |
} |
69 | 177 |
if ((last_line == elem->last_line) && |
178 |
(last_column < elem->last_column)) { |
|
179 |
last_column = elem->last_column; |
|
180 |
} |
|
181 |
if (last_line < elem->last_line) { |
|
182 |
last_line = elem->last_line; |
|
183 |
last_column = elem->last_column; |
|
184 |
} |
|
185 |
} |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
186 |
|
1043
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
187 |
|
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
188 |
/*********************************************/ |
350
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
189 |
/* insert a new element before position pos. */ |
1043
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
190 |
/*********************************************/ |
350
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
191 |
/* To insert into the begining of list, call with pos=0 */ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
192 |
/* To insert into the end of list, call with pos=list->n */ |
1043
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
193 |
|
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
194 |
void list_c::insert_element(symbol_c *elem, int pos) {insert_element(elem, elem, pos);} |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
195 |
|
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
196 |
void list_c::insert_element(symbol_c *elem, symbol_c *token, int pos) { |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
197 |
token_c *t = (token == NULL)? NULL : token->token; |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
198 |
insert_element(elem, (t == NULL)? NULL : t->value, pos); |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
199 |
} |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
200 |
|
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
201 |
void list_c::insert_element(symbol_c *elem, const char *token_value, int pos) { |
654
7421cb63defa
list_c: initial capacity. ERROR_MSG(msg,...) supports optional arguments now.
agraeper
parents:
612
diff
changeset
|
202 |
if((pos<0) || (n<pos)) ERROR; |
350
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
203 |
|
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
204 |
/* add new element to end of list. Basically alocate required memory... */ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
205 |
/* will also increment n by 1 ! */ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
206 |
add_element(elem); |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
207 |
/* if not inserting into end position, shift all elements up one position, to open up a slot in pos for new element */ |
654
7421cb63defa
list_c: initial capacity. ERROR_MSG(msg,...) supports optional arguments now.
agraeper
parents:
612
diff
changeset
|
208 |
if(pos < (n-1)){ |
7421cb63defa
list_c: initial capacity. ERROR_MSG(msg,...) supports optional arguments now.
agraeper
parents:
612
diff
changeset
|
209 |
for(int i=n-2 ; i>=pos ; --i) elements[i+1] = elements[i]; |
1043
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
210 |
elements[pos].symbol = elem; |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
211 |
elements[pos].token_value = token_value; |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
212 |
} |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
213 |
} |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
214 |
|
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
215 |
|
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
216 |
/***********************************/ |
438
744b125d911e
Add support for semantic verification of function calls in IL.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
217 |
/* remove element at position pos. */ |
1043
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
218 |
/***********************************/ |
438
744b125d911e
Add support for semantic verification of function calls in IL.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
219 |
void list_c::remove_element(int pos) { |
654
7421cb63defa
list_c: initial capacity. ERROR_MSG(msg,...) supports optional arguments now.
agraeper
parents:
612
diff
changeset
|
220 |
if((pos<0) || (n<=pos)) ERROR; |
438
744b125d911e
Add support for semantic verification of function calls in IL.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
221 |
|
744b125d911e
Add support for semantic verification of function calls in IL.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
222 |
/* Shift all elements down one position, starting at the entry to delete. */ |
744b125d911e
Add support for semantic verification of function calls in IL.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
223 |
for (int i = pos; i < n-1; i++) elements[i] = elements[i+1]; |
654
7421cb63defa
list_c: initial capacity. ERROR_MSG(msg,...) supports optional arguments now.
agraeper
parents:
612
diff
changeset
|
224 |
/* corrent the new size */ |
438
744b125d911e
Add support for semantic verification of function calls in IL.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
225 |
n--; |
1043
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
226 |
/* elements = (symbol_c **)realloc(elements, n * sizeof(element_entry_t)); */ |
958
7474d2cd1d6e
Add a new pou_typename_c object to the AST to store references to previously declared Functions, FB, and Programs.
mjsousa
parents:
936
diff
changeset
|
227 |
/* TODO: adjust the location parameters, taking into account the removed element. */ |
7474d2cd1d6e
Add a new pou_typename_c object to the AST to store references to previously declared Functions, FB, and Programs.
mjsousa
parents:
936
diff
changeset
|
228 |
} |
7474d2cd1d6e
Add a new pou_typename_c object to the AST to store references to previously declared Functions, FB, and Programs.
mjsousa
parents:
936
diff
changeset
|
229 |
|
7474d2cd1d6e
Add a new pou_typename_c object to the AST to store references to previously declared Functions, FB, and Programs.
mjsousa
parents:
936
diff
changeset
|
230 |
|
1043
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
231 |
/**********************************/ |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
232 |
/* Remove all elements from list. */ |
4165b7189c32
Add token reference to all symbol_c, and add list_c::find_element()
Mario de Sousa <msousa@fe.up.pt>
parents:
1041
diff
changeset
|
233 |
/**********************************/ |
958
7474d2cd1d6e
Add a new pou_typename_c object to the AST to store references to previously declared Functions, FB, and Programs.
mjsousa
parents:
936
diff
changeset
|
234 |
void list_c::clear(void) { |
7474d2cd1d6e
Add a new pou_typename_c object to the AST to store references to previously declared Functions, FB, and Programs.
mjsousa
parents:
936
diff
changeset
|
235 |
n = 0; |
7474d2cd1d6e
Add a new pou_typename_c object to the AST to store references to previously declared Functions, FB, and Programs.
mjsousa
parents:
936
diff
changeset
|
236 |
/* TODO: adjust the location parameters, taking into account the removed element. */ |
7474d2cd1d6e
Add a new pou_typename_c object to the AST to store references to previously declared Functions, FB, and Programs.
mjsousa
parents:
936
diff
changeset
|
237 |
} |
7474d2cd1d6e
Add a new pou_typename_c object to the AST to store references to previously declared Functions, FB, and Programs.
mjsousa
parents:
936
diff
changeset
|
238 |
|
350
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
239 |
|
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
240 |
#define SYM_LIST(class_name_c, ...) \ |
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
241 |
class_name_c::class_name_c( \ |
287
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
242 |
int fl, int fc, const char *ffile, long int forder, \ |
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
243 |
int ll, int lc, const char *lfile, long int lorder) \ |
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
244 |
:list_c(fl, fc, ffile, forder, ll, lc, lfile, lorder) {} \ |
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
245 |
class_name_c::class_name_c(symbol_c *elem, \ |
287
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
246 |
int fl, int fc, const char *ffile, long int forder, \ |
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
247 |
int ll, int lc, const char *lfile, long int lorder) \ |
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
248 |
:list_c(elem, fl, fc, ffile, forder, ll, lc, lfile, lorder) {} \ |
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
249 |
void *class_name_c::accept(visitor_c &visitor) {return visitor.visit(this);} |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
250 |
|
350
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
251 |
#define SYM_TOKEN(class_name_c, ...) \ |
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
252 |
class_name_c::class_name_c(const char *value, \ |
287
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
253 |
int fl, int fc, const char *ffile, long int forder, \ |
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
254 |
int ll, int lc, const char *lfile, long int lorder) \ |
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
255 |
:token_c(value, fl, fc, ffile, forder, ll, lc, lfile, lorder) {} \ |
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
256 |
void *class_name_c::accept(visitor_c &visitor) {return visitor.visit(this);} |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
257 |
|
350
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
258 |
#define SYM_REF0(class_name_c, ...) \ |
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
259 |
class_name_c::class_name_c( \ |
287
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
260 |
int fl, int fc, const char *ffile, long int forder, \ |
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
261 |
int ll, int lc, const char *lfile, long int lorder) \ |
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
262 |
:symbol_c(fl, fc, ffile, forder, ll, lc, lfile, lorder) {} \ |
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
263 |
void *class_name_c::accept(visitor_c &visitor) {return visitor.visit(this);} |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
264 |
|
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
265 |
|
350
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
266 |
#define SYM_REF1(class_name_c, ref1, ...) \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
267 |
class_name_c::class_name_c(symbol_c *ref1, \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
268 |
int fl, int fc, const char *ffile, long int forder, \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
269 |
int ll, int lc, const char *lfile, long int lorder) \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
270 |
:symbol_c(fl, fc, ffile, forder, ll, lc, lfile, lorder) { \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
271 |
this->ref1 = ref1; \ |
936
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
272 |
if (NULL != ref1) ref1->parent = this; \ |
350
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
273 |
} \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
274 |
void *class_name_c::accept(visitor_c &visitor) {return visitor.visit(this);} |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
275 |
|
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
276 |
|
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
277 |
#define SYM_REF2(class_name_c, ref1, ref2, ...) \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
278 |
class_name_c::class_name_c(symbol_c *ref1, \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
279 |
symbol_c *ref2, \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
280 |
int fl, int fc, const char *ffile, long int forder, \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
281 |
int ll, int lc, const char *lfile, long int lorder) \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
282 |
:symbol_c(fl, fc, ffile, forder, ll, lc, lfile, lorder) { \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
283 |
this->ref1 = ref1; \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
284 |
this->ref2 = ref2; \ |
936
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
285 |
if (NULL != ref1) ref1->parent = this; \ |
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
286 |
if (NULL != ref2) ref2->parent = this; \ |
350
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
287 |
} \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
288 |
void *class_name_c::accept(visitor_c &visitor) {return visitor.visit(this);} |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
289 |
|
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
290 |
|
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
291 |
#define SYM_REF3(class_name_c, ref1, ref2, ref3, ...) \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
292 |
class_name_c::class_name_c(symbol_c *ref1, \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
293 |
symbol_c *ref2, \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
294 |
symbol_c *ref3, \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
295 |
int fl, int fc, const char *ffile, long int forder, \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
296 |
int ll, int lc, const char *lfile, long int lorder) \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
297 |
:symbol_c(fl, fc, ffile, forder, ll, lc, lfile, lorder) { \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
298 |
this->ref1 = ref1; \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
299 |
this->ref2 = ref2; \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
300 |
this->ref3 = ref3; \ |
936
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
301 |
if (NULL != ref1) ref1->parent = this; \ |
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
302 |
if (NULL != ref2) ref2->parent = this; \ |
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
303 |
if (NULL != ref3) ref3->parent = this; \ |
350
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
304 |
} \ |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
305 |
void *class_name_c::accept(visitor_c &visitor) {return visitor.visit(this);} |
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
306 |
|
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
307 |
|
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
308 |
#define SYM_REF4(class_name_c, ref1, ref2, ref3, ref4, ...) \ |
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
309 |
class_name_c::class_name_c(symbol_c *ref1, \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
310 |
symbol_c *ref2, \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
311 |
symbol_c *ref3, \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
312 |
symbol_c *ref4, \ |
287
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
313 |
int fl, int fc, const char *ffile, long int forder, \ |
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
314 |
int ll, int lc, const char *lfile, long int lorder) \ |
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
315 |
:symbol_c(fl, fc, ffile, forder, ll, lc, lfile, lorder) { \ |
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
316 |
this->ref1 = ref1; \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
317 |
this->ref2 = ref2; \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
318 |
this->ref3 = ref3; \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
319 |
this->ref4 = ref4; \ |
936
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
320 |
if (NULL != ref1) ref1->parent = this; \ |
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
321 |
if (NULL != ref2) ref2->parent = this; \ |
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
322 |
if (NULL != ref3) ref3->parent = this; \ |
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
323 |
if (NULL != ref4) ref4->parent = this; \ |
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
324 |
} \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
325 |
void *class_name_c::accept(visitor_c &visitor) {return visitor.visit(this);} |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
326 |
|
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
327 |
|
350
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
328 |
#define SYM_REF5(class_name_c, ref1, ref2, ref3, ref4, ref5, ...) \ |
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
329 |
class_name_c::class_name_c(symbol_c *ref1, \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
330 |
symbol_c *ref2, \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
331 |
symbol_c *ref3, \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
332 |
symbol_c *ref4, \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
333 |
symbol_c *ref5, \ |
287
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
334 |
int fl, int fc, const char *ffile, long int forder, \ |
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
335 |
int ll, int lc, const char *lfile, long int lorder) \ |
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
336 |
:symbol_c(fl, fc, ffile, forder, ll, lc, lfile, lorder) { \ |
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
337 |
this->ref1 = ref1; \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
338 |
this->ref2 = ref2; \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
339 |
this->ref3 = ref3; \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
340 |
this->ref4 = ref4; \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
341 |
this->ref5 = ref5; \ |
936
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
342 |
if (NULL != ref1) ref1->parent = this; \ |
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
343 |
if (NULL != ref2) ref2->parent = this; \ |
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
344 |
if (NULL != ref3) ref3->parent = this; \ |
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
345 |
if (NULL != ref4) ref4->parent = this; \ |
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
346 |
if (NULL != ref5) ref5->parent = this; \ |
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
347 |
} \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
348 |
void *class_name_c::accept(visitor_c &visitor) {return visitor.visit(this);} |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
349 |
|
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
350 |
|
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
351 |
|
350
2c3c4dc34979
Support for semantic verification of calls to standard functions.
Mario de Sousa <msousa@fe.up.pt>
parents:
287
diff
changeset
|
352 |
#define SYM_REF6(class_name_c, ref1, ref2, ref3, ref4, ref5, ref6, ...) \ |
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
353 |
class_name_c::class_name_c(symbol_c *ref1, \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
354 |
symbol_c *ref2, \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
355 |
symbol_c *ref3, \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
356 |
symbol_c *ref4, \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
357 |
symbol_c *ref5, \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
358 |
symbol_c *ref6, \ |
287
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
359 |
int fl, int fc, const char *ffile, long int forder, \ |
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
360 |
int ll, int lc, const char *lfile, long int lorder) \ |
9df7fcb9bde5
Added tracking of order by which tokens are processed by lexical analyser.
Mario de Sousa <msousa@fe.up.pt>
parents:
286
diff
changeset
|
361 |
:symbol_c(fl, fc, ffile, forder, ll, lc, lfile, lorder) { \ |
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
362 |
this->ref1 = ref1; \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
363 |
this->ref2 = ref2; \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
364 |
this->ref3 = ref3; \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
365 |
this->ref4 = ref4; \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
366 |
this->ref5 = ref5; \ |
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
367 |
this->ref6 = ref6; \ |
936
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
368 |
if (NULL != ref1) ref1->parent = this; \ |
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
369 |
if (NULL != ref2) ref2->parent = this; \ |
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
370 |
if (NULL != ref3) ref3->parent = this; \ |
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
371 |
if (NULL != ref4) ref4->parent = this; \ |
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
372 |
if (NULL != ref5) ref5->parent = this; \ |
0f7bcc160568
Fix bug: Add support for de-referencing pointers to struct (struct_ptr^.elem1) when used inside FB.
mjsousa
parents:
889
diff
changeset
|
373 |
if (NULL != ref6) ref6->parent = this; \ |
286
a4f4990d5c66
Adding tracking of filename in which token is located.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
374 |
} \ |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
375 |
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
|
376 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
377 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
378 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
379 |
#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
|
380 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
381 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
382 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
383 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
384 |
#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
|
385 |
#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
|
386 |
#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
|
387 |
#undef SYM_REF0 |
69 | 388 |
#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
|
389 |
#undef SYM_REF2 |
69 | 390 |
#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
|
391 |
#undef SYM_REF4 |
69 | 392 |
#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
|
393 |
#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
|
394 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
395 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
396 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
397 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
398 |