author | edouard |
Fri, 04 Dec 2009 15:11:16 +0100 | |
changeset 223 | a09ed6620a7d |
parent 177 | 697562a5da7c |
child 264 | 6facabd9c2cd |
permissions | -rw-r--r-- |
177
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
1 |
/* |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
2 |
* (c) 2009 Mario de Sousa |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
3 |
* |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
4 |
* Offered to the public under the terms of the GNU General Public License |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
5 |
* as published by the Free Software Foundation; either version 2 of the |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
6 |
* License, or (at your option) any later version. |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
7 |
* |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
8 |
* This program is distributed in the hope that it will be useful, but |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
9 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
10 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
11 |
* Public License for more details. |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
12 |
* |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
13 |
* This code is made available on the understanding that it will not be |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
14 |
* used in safety-critical situations without a full and competent review. |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
15 |
*/ |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
16 |
|
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
17 |
/* |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
18 |
* An IEC 61131-3 IL and ST compiler. |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
19 |
* |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
20 |
* Based on the |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
21 |
* FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10) |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
22 |
* |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
23 |
*/ |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
24 |
|
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
25 |
|
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
26 |
/* |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
27 |
* The public interface to stage1_2.cc |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
28 |
*/ |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
29 |
|
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
30 |
|
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
31 |
|
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
32 |
#ifndef _STAGE1_2_HH |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
33 |
#define _STAGE1_2_HH |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
34 |
|
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
35 |
|
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
36 |
|
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
37 |
/* |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
38 |
* This file includes the interface through which the main function accesses the stage1_2 services |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
39 |
*/ |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
40 |
|
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
41 |
|
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
42 |
|
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
43 |
typedef struct { |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
44 |
/******************************************************/ |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
45 |
/* whether we are suporting safe extensions */ |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
46 |
/* as defined in PLCopen - Technical Committee 5 */ |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
47 |
/* Safety Software Technical Specification, */ |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
48 |
/* Part 1: Concepts and Function Blocks, */ |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
49 |
/* Version 1.0 – Official Release */ |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
50 |
/******************************************************/ |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
51 |
bool safe_extensions; |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
52 |
/* error messages specify full token location */ |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
53 |
bool full_token_loc; |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
54 |
/* Include directory, where included files will be searched for... */ |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
55 |
const char *includedir; |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
56 |
} stage1_2_options_t; |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
57 |
|
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
58 |
|
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
59 |
int stage1_2(const char *filename, symbol_c **tree_root, stage1_2_options_t options); |
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
60 |
|
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
61 |
|
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
62 |
|
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
63 |
|
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
64 |
|
697562a5da7c
Adding support for SAFEBOOL. Some code generation yet to do...
mario
parents:
diff
changeset
|
65 |
#endif /* _STAGE1_2_HH */ |