author | lbessard |
Tue, 07 Oct 2008 14:33:52 +0200 | |
changeset 147 | f34f9084a20e |
parent 136 | 32bd7ef40897 |
child 175 | dadda1b5401e |
permissions | -rw-r--r-- |
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
1 |
/* |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
2 |
* (c) 2007 Mario de Sousa |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
3 |
* |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
4 |
* Offered to the public under the terms of the GNU General Public License |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
5 |
* as published by the Free Software Foundation; either version 2 of the |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
6 |
* License, or (at your option) any later version. |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
7 |
* |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
8 |
* This program is distributed in the hope that it will be useful, but |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
9 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
10 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
11 |
* Public License for more details. |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
12 |
* |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
13 |
* This code is made available on the understanding that it will not be |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
14 |
* used in safety-critical situations without a full and competent review. |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
15 |
*/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
16 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
17 |
/* |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
18 |
* An IEC 61131-3 IL and ST compiler. |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
19 |
* |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
20 |
* Based on the |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
21 |
* FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10) |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
22 |
* |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
23 |
*/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
24 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
25 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
26 |
/* |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
27 |
* The private interface to stage1_2.cc |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
28 |
*/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
29 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
30 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
31 |
|
20 | 32 |
/* !!! WARNING !!! |
33 |
* |
|
34 |
* Whoever includes this file (stage1_2_priv.hh) will need |
|
35 |
* to first inlcude iec.y.hh !! |
|
36 |
* |
|
37 |
* Read other comments further down to understand why we don't |
|
38 |
* include iec.y.hh in this file. |
|
39 |
*/ |
|
40 |
||
41 |
||
42 |
||
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
43 |
/* file with the declarations of symbol tables... */ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
44 |
#include "../util/symtable.hh" |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
45 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
46 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
47 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
48 |
/* |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
49 |
* This file includes the interface through which the lexical parser (stage 1 - flex) |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
50 |
* and the syntax analyser (stage 2 - bison) interact between themselves. |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
51 |
* |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
52 |
* This is mostly through direct access to shared global variables, however some |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
53 |
* of the global variables will only be accessed through some accessor functions. |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
54 |
* |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
55 |
* This file also includes some utility functions (strdupX() ) that are both used |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
56 |
* in the lexical and syntax analysers. |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
57 |
*/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
58 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
59 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
60 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
61 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
62 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
63 |
/*********************************************/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
64 |
/* print the include file stack to stderr... */ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
65 |
/*********************************************/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
66 |
/* This is a service that flex provides to bison... */ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
67 |
void print_include_stack(void); |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
68 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
69 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
70 |
/**************************************/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
71 |
/* The name of the file being parsed. */ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
72 |
/**************************************/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
73 |
/* The name of the file currently being parsed... |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
74 |
* Note that flex accesses and updates this global variable |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
75 |
* apropriately whenever it comes across an (*#include <filename> *) |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
76 |
* directive... |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
77 |
* ... and bison will use it when producing error messages. |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
78 |
* Note that bison also sets this variable correctly to the first |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
79 |
* file being parsed. |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
80 |
*/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
81 |
extern const char *current_filename; |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
82 |
|
136 | 83 |
#define MAX_BUFFER_LENGTH 1000 |
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
84 |
|
136 | 85 |
typedef struct { |
86 |
int eof; |
|
87 |
int lineNumber; |
|
88 |
int currentChar; |
|
89 |
int lineLength; |
|
90 |
int currentTokenStart; |
|
91 |
char* buffer; |
|
92 |
FILE *in_file; |
|
93 |
} tracking_t; |
|
94 |
||
95 |
int GetNextChar(char *b, int maxBuffer); |
|
96 |
tracking_t* GetNewTracking(FILE* in_file); |
|
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
97 |
|
68 | 98 |
/****************************************************/ |
99 |
/* Controlling the entry to the body_state in flex. */ |
|
100 |
/****************************************************/ |
|
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
101 |
void cmd_goto_body_state(void); |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
102 |
int get_goto_body_state(void); |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
103 |
void rst_goto_body_state(void); |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
104 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
105 |
|
68 | 106 |
/*************************************************************/ |
107 |
/* Controlling the entry to the sfc_qualifier_state in flex. */ |
|
108 |
/*************************************************************/ |
|
109 |
void cmd_goto_sfc_qualifier_state(void); |
|
110 |
int get_goto_sfc_qualifier_state(void); |
|
111 |
void rst_goto_sfc_qualifier_state(void); |
|
112 |
||
113 |
||
86
1988bf1634da
Adding support for use of PRIORITY as identifier inside SFC.
mario
parents:
74
diff
changeset
|
114 |
/*************************************************************/ |
1988bf1634da
Adding support for use of PRIORITY as identifier inside SFC.
mario
parents:
74
diff
changeset
|
115 |
/* Controlling the entry to the sfc_priority_state in flex. */ |
1988bf1634da
Adding support for use of PRIORITY as identifier inside SFC.
mario
parents:
74
diff
changeset
|
116 |
/*************************************************************/ |
1988bf1634da
Adding support for use of PRIORITY as identifier inside SFC.
mario
parents:
74
diff
changeset
|
117 |
void cmd_goto_sfc_priority_state(void); |
1988bf1634da
Adding support for use of PRIORITY as identifier inside SFC.
mario
parents:
74
diff
changeset
|
118 |
int get_goto_sfc_priority_state(void); |
1988bf1634da
Adding support for use of PRIORITY as identifier inside SFC.
mario
parents:
74
diff
changeset
|
119 |
void rst_goto_sfc_priority_state(void); |
1988bf1634da
Adding support for use of PRIORITY as identifier inside SFC.
mario
parents:
74
diff
changeset
|
120 |
|
1988bf1634da
Adding support for use of PRIORITY as identifier inside SFC.
mario
parents:
74
diff
changeset
|
121 |
|
74
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
68
diff
changeset
|
122 |
/*********************************************************/ |
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
68
diff
changeset
|
123 |
/* Controlling the entry to the task_init_state in flex. */ |
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
68
diff
changeset
|
124 |
/*********************************************************/ |
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
68
diff
changeset
|
125 |
void cmd_goto_task_init_state(void); |
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
68
diff
changeset
|
126 |
int get_goto_task_init_state(void); |
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
68
diff
changeset
|
127 |
void rst_goto_task_init_state(void); |
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
68
diff
changeset
|
128 |
|
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
68
diff
changeset
|
129 |
|
68 | 130 |
/****************************************************************/ |
131 |
/* Returning to state in flex previously pushed onto the stack. */ |
|
132 |
/****************************************************************/ |
|
133 |
void cmd_pop_state(void); |
|
134 |
int get_pop_state(void); |
|
135 |
void rst_pop_state(void); |
|
136 |
||
137 |
||
138 |
||
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
139 |
/*********************************/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
140 |
/* The global symbol tables... */ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
141 |
/*********************************/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
142 |
/* NOTE: only accessed indirectly by the lexical parser (flex) |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
143 |
* through the function get_identifier_token() |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
144 |
*/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
145 |
/* NOTE: BOGUS_TOKEN_ID is defined in the bison generated file iec.y.hh. |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
146 |
* We need this constant defined before we can declare the symbol tables. |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
147 |
* However, we cannot #include "iec.y.hh" in this file (stage1_2_priv.hh) directly |
20 | 148 |
* because of the way bison ver. 2.3 is copying all declarations in the prologue |
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
149 |
* of iec.y to the iec.y.hh file (including an #include stage1_2_priv.hh). |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
150 |
* So, if we were to include "iec.y.hh" here, we would get a circular include. |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
151 |
* All this means that whoever includes this file (stage1_2_priv.hh) will need |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
152 |
* to take care to first inlcude iec.y.hh !! |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
153 |
*/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
154 |
/* A symbol table to store all the library elements */ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
155 |
/* e.g.: <function_name , function_decl> |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
156 |
* <fb_name , fb_decl> |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
157 |
* <type_name , type_decl> |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
158 |
* <program_name , program_decl> |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
159 |
* <configuration_name , configuration_decl> |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
160 |
*/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
161 |
extern symtable_c<int, BOGUS_TOKEN_ID> library_element_symtable; |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
162 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
163 |
/* A symbol table to store the declared variables of |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
164 |
* the function currently being parsed... |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
165 |
*/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
166 |
extern symtable_c<int, BOGUS_TOKEN_ID> variable_name_symtable; |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
167 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
168 |
/* Function only called from within flex! |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
169 |
* |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
170 |
* search for a symbol in either of the two symbol tables |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
171 |
* declared above, and return the token id of the first |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
172 |
* symbol found. |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
173 |
* Searches first in the variables, and only if not found |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
174 |
* does it continue searching in the library elements |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
175 |
*/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
176 |
int get_identifier_token(const char *identifier_str); |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
177 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
178 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
179 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
180 |
/************************/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
181 |
/* Utility Functions... */ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
182 |
/************************/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
183 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
184 |
/* Join two strings together. Allocate space with malloc(3). */ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
185 |
char *strdup2(const char *a, const char *b); |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
186 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
187 |
/* Join three strings together. Allocate space with malloc(3). */ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
188 |
char *strdup3(const char *a, const char *b, const char *c); |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
189 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
190 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
diff
changeset
|
191 |