author | etisserant |
Mon, 04 Aug 2008 15:14:25 +0200 | |
changeset 135 | 0f3f6714b938 |
parent 134 | 0e43c556cd2d |
child 136 | 32bd7ef40897 |
permissions | -rwxr-xr-x |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1 |
/* |
91 | 2 |
* (c) 2003-2007 Mario de Sousa |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4 |
* Offered to the public under the terms of the GNU General Public License |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5 |
* as published by the Free Software Foundation; either version 2 of the |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6 |
* License, or (at your option) any later version. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8 |
* This program is distributed in the hope that it will be useful, but |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9 |
* WITHOUT ANY WARRANTY; without even the implied warranty of |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
10 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
11 |
* Public License for more details. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
12 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
13 |
* 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
|
14 |
* 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
|
15 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
16 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
17 |
/* |
91 | 18 |
* An IEC 61131-3 IL, ST and SFC 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
|
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 |
* 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
|
21 |
* 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
|
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 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
25 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
26 |
* Stage 2 |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
27 |
* ======= |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
28 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
29 |
* This file contains the syntax definition of the textual |
91 | 30 |
* languages IL and ST, as well as the textual version of SFC. |
31 |
* The syntax parser, comprising the 2nd stage of the overall |
|
32 |
* compiler, is generated by runing bison on this file. |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
33 |
*/ |
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 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
37 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
38 |
/**********************************************************************/ |
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 |
/**********************************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
41 |
/**********************************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
42 |
/******* *******/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
43 |
/******* The following syntax does not have any conflicts. *******/ |
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 |
/******* P L E A S E K E E P I T T H A T W A Y ! *******/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
46 |
/******* =================================================== *******/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
47 |
/******* *******/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
48 |
/**********************************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
49 |
/**********************************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
50 |
/**********************************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
51 |
/**********************************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
52 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
53 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
54 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
55 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
56 |
%{ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
57 |
#include <string.h> /* required for strdup() */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
58 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
59 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
60 |
/* declare the token parser generated by flex... */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
61 |
int yylex(void); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
62 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
63 |
/* declare the error handler defined at the end of this file */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
64 |
void yyerror (const char *error_msg); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
65 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
66 |
/* produce a more verbose parsing error message */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
67 |
#define YYERROR_VERBOSE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
68 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
69 |
/* Include debuging code. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
70 |
* Printing of debug info must then be activated by setting |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
71 |
* the variable yydebug to 1. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
72 |
*/ |
41
8998c8b24b60
First working IEC std lib test, actually test from string and to_string functions.
etisserant
parents:
40
diff
changeset
|
73 |
#define YYDEBUG 0 |
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 |
|
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 |
/* file with declaration of absyntax classes... */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
77 |
#include "../absyntax/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
|
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 |
/* file with declaration of token constants. Generated by bison! */ |
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
80 |
// #include "iec.y.hh" |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
81 |
|
68 | 82 |
/* The interface through which bison and flex interact. */ |
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
83 |
#include "stage1_2_priv.hh" |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
84 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
85 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
86 |
/* an ugly hack!! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
87 |
* We will probably not need it when we decide |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
88 |
* to cut down the abstract syntax down to size. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
89 |
* We keep it as it is until we get to write |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
90 |
* stages 3 and 4 of the compiler. Who knows, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
91 |
* we might just find out that we really do need |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
92 |
* the abstract syntax tree to stay as it is |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
93 |
* afterall! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
94 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
95 |
/* for each element <elem> in list_c * <list> |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
96 |
* execute the code <code> |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
97 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
98 |
#define FOR_EACH_ELEMENT(elem, list, code) { \ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
99 |
symbol_c *elem; \ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
100 |
for(int i = 0; i < list->n; i++) { \ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
101 |
elem = list->elements[i]; \ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
102 |
code; \ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
103 |
} \ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
104 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
105 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
106 |
|
68 | 107 |
|
108 |
/* Macros used to pass the line and column locations when |
|
109 |
* creating a new object for the abstract syntax tree. |
|
110 |
*/ |
|
111 |
#define locloc(foo) foo.first_line, foo.first_column, foo.last_line, foo.last_column |
|
112 |
#define locf(foo) foo.first_line, foo.first_column |
|
113 |
#define locl(foo) foo.last_line, foo.last_column |
|
114 |
||
115 |
||
116 |
||
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
117 |
/* A macro for printing out internal parser errors... */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
118 |
#define ERROR error_exit(__FILE__,__LINE__) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
119 |
/* function defined in main.cc */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
120 |
extern void error_exit(const char *file_name, int line_no); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
121 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
122 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
123 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
124 |
/*************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
125 |
/* global variables... */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
126 |
/*************************/ |
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
127 |
/* NOTE: For some strange reason bison ver 2.3 is including these declarations |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
128 |
* in the iec.y.hh file, which is in turn included by flex. |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
129 |
* We cannot therefore define any variables over here, but merely declare |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
130 |
* their existance (otherwise we get errors when linking the code, since we |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
131 |
* would get a new variable defined each time iec.y.hh is included!). |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
132 |
* Even though the variables are declared 'extern' over here, they will in |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
133 |
* fact be defined towards the end of this same file (i.e. in the prologue) |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
134 |
*/ |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
135 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
136 |
/* A global flag used to tell the parser if overloaded funtions should be allowed. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
137 |
* The IEC 61131-3 standard allows overloaded funtions in the standard library, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
138 |
* but disallows them in user code... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
139 |
*/ |
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
140 |
extern bool allow_function_overloading; |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
141 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
142 |
/* A pointer to the root of the parsing tree that will be generated |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
143 |
* by bison. |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
144 |
*/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
145 |
extern symbol_c *tree_root; |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
146 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
147 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
148 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
149 |
/************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
150 |
/* forward declarations */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
151 |
/************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
152 |
/* The functions declared here are defined at the end of this file... */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
153 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
154 |
/* Convert an il_operator_c into an identifier_c */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
155 |
symbol_c *il_operator_c_2_identifier_c(symbol_c *il_operator); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
156 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
157 |
/* print an error message */ |
95 | 158 |
void print_err_msg(const char *filename, |
159 |
int first_line, |
|
160 |
int first_column, |
|
161 |
int last_line, |
|
162 |
int last_column, |
|
163 |
const char *additional_error_msg); |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
164 |
%} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
165 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
166 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
167 |
|
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
168 |
|
20 | 169 |
// %glr-parser |
13 | 170 |
// %expect-rr 1 |
171 |
||
172 |
||
173 |
||
174 |
||
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
175 |
%union { |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
176 |
symbol_c *leaf; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
177 |
list_c *list; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
178 |
char *ID; /* token value */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
179 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
180 |
|
68 | 181 |
/* |
182 |
TODO: DO we need to define a destructor do free |
|
183 |
memory when recovering from errors, or do the |
|
184 |
class destructors already handle this? |
|
185 |
Following is example on how to define |
|
186 |
detructors, using the syntax: |
|
187 |
%destructor { CODE } SYMBOLS |
|
188 |
%union |
|
189 |
{ |
|
190 |
char *string; |
|
191 |
} |
|
192 |
%token <string> STRING |
|
193 |
%type <string> string |
|
194 |
%destructor { free ($$); } STRING string |
|
195 |
*/ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
196 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
197 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
198 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
199 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
200 |
/*****************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
201 |
/* Prelimenary constructs... */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
202 |
/*****************************/ |
73 | 203 |
/* A token used to identify the very end of the input file |
204 |
* after all includes have already been processed. |
|
205 |
* |
|
206 |
* Flex automatically returns the token with value 0 |
|
74
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
207 |
* at the end of the file. We therefore specify here |
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
208 |
* a token with that exact same value here, so we can use it |
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
209 |
* to detect the very end of the input files. |
73 | 210 |
*/ |
211 |
%token END_OF_INPUT 0 |
|
212 |
||
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
213 |
/* A bogus token that, in principle, flex MUST NEVER generate */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
214 |
/* USE 1: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
215 |
* ====== |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
216 |
* This token is currently also being used as the default |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
217 |
* initialisation value of the token_id member in |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
218 |
* the symbol_c base class. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
219 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
220 |
* USE 2 |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
221 |
* ===== |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
222 |
* This token may also be used in the future to remove |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
223 |
* mysterious reduce/reduce conflicts due to the fact |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
224 |
* that our grammar may not be LALR(1) but merely LR(1). |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
225 |
* This means that bison cannot handle it without some |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
226 |
* caoxing from ourselves. We will then need this token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
227 |
* to do the coaxing... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
228 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
229 |
%token BOGUS_TOKEN_ID |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
230 |
|
68 | 231 |
%type <leaf> start |
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
232 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
233 |
%type <leaf> any_identifier |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
234 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
235 |
%token <ID> prev_declared_variable_name_token |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
236 |
%token <ID> prev_declared_fb_name_token |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
237 |
%type <leaf> prev_declared_variable_name |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
238 |
%type <leaf> prev_declared_fb_name |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
239 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
240 |
%token <ID> prev_declared_simple_type_name_token |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
241 |
%token <ID> prev_declared_subrange_type_name_token |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
242 |
%token <ID> prev_declared_enumerated_type_name_token |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
243 |
%token <ID> prev_declared_array_type_name_token |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
244 |
%token <ID> prev_declared_structure_type_name_token |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
245 |
%token <ID> prev_declared_string_type_name_token |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
246 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
247 |
%type <leaf> prev_declared_simple_type_name |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
248 |
%type <leaf> prev_declared_subrange_type_name |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
249 |
%type <leaf> prev_declared_enumerated_type_name |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
250 |
%type <leaf> prev_declared_array_type_name |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
251 |
%type <leaf> prev_declared_structure_type_name |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
252 |
%type <leaf> prev_declared_string_type_name |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
253 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
254 |
%token <ID> prev_declared_derived_function_name_token |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
255 |
%token <ID> prev_declared_derived_function_block_name_token |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
256 |
%token <ID> prev_declared_program_type_name_token |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
257 |
%type <leaf> prev_declared_derived_function_name |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
258 |
%type <leaf> prev_declared_derived_function_block_name |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
259 |
%type <leaf> prev_declared_program_type_name |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
260 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
261 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
262 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
263 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
264 |
/* The pragmas... */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
265 |
%token <ID> pragma_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
266 |
%type <leaf> pragma |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
267 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
268 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
269 |
/* Where do these tokens belong ?? */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
270 |
/* TODO: get the syntax parser to handle these tokens... */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
271 |
%token EN |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
272 |
%token ENO |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
273 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
274 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
275 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
276 |
/***************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
277 |
/* B 0 - Programming Model */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
278 |
/***************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
279 |
%type <list> library |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
280 |
%type <leaf> library_element_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
281 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
282 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
283 |
/*******************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
284 |
/* B 1.1 - Letters, digits and identifiers */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
285 |
/*******************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
286 |
/* Done totally within flex... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
287 |
letter |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
288 |
digit |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
289 |
octal_digit |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
290 |
hex_digit |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
291 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
292 |
%token <ID> identifier_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
293 |
%type <leaf> identifier |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
294 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
295 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
296 |
/*********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
297 |
/* B 1.2 - Constants */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
298 |
/*********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
299 |
%type <leaf> constant |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
300 |
/* a helper symbol for expression */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
301 |
%type <leaf> non_negative_constant |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
302 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
303 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
304 |
/******************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
305 |
/* B 1.2.1 - Numeric Literals */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
306 |
/******************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
307 |
/* Done totally within flex... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
308 |
bit |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
309 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
310 |
%type <leaf> numeric_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
311 |
/* helper symbol for non_negative_constant */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
312 |
%type <leaf> non_negative_numeric_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
313 |
%type <leaf> integer_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
314 |
%type <leaf> signed_integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
315 |
/* a helper symbol for non_negative_constant */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
316 |
%type <leaf> non_negative_signed_integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
317 |
%token <ID> integer_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
318 |
%type <leaf> integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
319 |
%token <ID> binary_integer_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
320 |
%type <leaf> binary_integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
321 |
%token <ID> octal_integer_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
322 |
%type <leaf> octal_integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
323 |
%token <ID> hex_integer_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
324 |
%type <leaf> hex_integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
325 |
%token <ID> real_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
326 |
%type <leaf> real |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
327 |
%type <leaf> signed_real |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
328 |
/* helper symbol for non_negative_real_literal */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
329 |
%type <leaf> non_negative_signed_real |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
330 |
%type <leaf> real_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
331 |
/* helper symbol for non_negative_numeric_literal */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
332 |
%type <leaf> non_negative_real_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
333 |
// %type <leaf> exponent |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
334 |
%type <leaf> bit_string_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
335 |
%type <leaf> boolean_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
336 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
337 |
%token FALSE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
338 |
%token TRUE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
339 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
340 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
341 |
/*******************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
342 |
/* B 1.2.2 - Character Strings */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
343 |
/*******************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
344 |
%token <ID> single_byte_character_string_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
345 |
%token <ID> double_byte_character_string_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
346 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
347 |
%type <leaf> character_string |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
348 |
%type <leaf> single_byte_character_string |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
349 |
%type <leaf> double_byte_character_string |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
350 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
351 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
352 |
/***************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
353 |
/* B 1.2.3 - Time Literals */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
354 |
/***************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
355 |
%type <leaf> time_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
356 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
357 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
358 |
/************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
359 |
/* B 1.2.3.1 - Duration */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
360 |
/************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
361 |
%type <leaf> duration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
362 |
%type <leaf> interval |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
363 |
%type <leaf> days |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
364 |
%type <leaf> fixed_point |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
365 |
%type <leaf> hours |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
366 |
%type <leaf> minutes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
367 |
%type <leaf> seconds |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
368 |
%type <leaf> milliseconds |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
369 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
370 |
%type <leaf> integer_d |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
371 |
%type <leaf> integer_h |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
372 |
%type <leaf> integer_m |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
373 |
%type <leaf> integer_s |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
374 |
%type <leaf> integer_ms |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
375 |
%type <leaf> fixed_point_d |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
376 |
%type <leaf> fixed_point_h |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
377 |
%type <leaf> fixed_point_m |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
378 |
%type <leaf> fixed_point_s |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
379 |
%type <leaf> fixed_point_ms |
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 |
%token <ID> fixed_point_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
382 |
%token <ID> fixed_point_d_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
383 |
%token <ID> integer_d_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
384 |
%token <ID> fixed_point_h_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
385 |
%token <ID> integer_h_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 |
%token <ID> fixed_point_m_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 |
%token <ID> integer_m_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
388 |
%token <ID> fixed_point_s_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
389 |
%token <ID> integer_s_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
390 |
%token <ID> fixed_point_ms_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
391 |
%token <ID> integer_ms_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
392 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
393 |
%token TIME |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
394 |
%token T_SHARP |
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 |
/* B 1.2.3.2 - Time of day and Date */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
399 |
/************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
400 |
%type <leaf> time_of_day |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
401 |
%type <leaf> daytime |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
402 |
%type <leaf> day_hour |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
403 |
%type <leaf> day_minute |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
404 |
%type <leaf> day_second |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
405 |
%type <leaf> date |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
406 |
%type <leaf> date_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
407 |
%type <leaf> year |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
408 |
%type <leaf> month |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
409 |
%type <leaf> day |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
410 |
%type <leaf> date_and_time |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
411 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
412 |
%token TIME_OF_DAY |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
413 |
%token DATE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
414 |
%token D_SHARP |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
415 |
%token DATE_AND_TIME |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
416 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
417 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
418 |
/**********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
419 |
/* B 1.3 - Data Types */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
420 |
/**********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
421 |
/* Strangely, the following symbol does seem to be required! */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
422 |
// %type <leaf> data_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
423 |
%type <leaf> non_generic_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
424 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
425 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
426 |
/***********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
427 |
/* B 1.3.1 - Elementary Data Types */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
428 |
/***********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
429 |
/* NOTES: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
430 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
431 |
* - To make the definition of bit_string_literal more |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
432 |
* concise, it is useful to use an extra non-terminal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
433 |
* symbol (i.e. a grouping or construct) that groups the |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
434 |
* following elements (BYTE, WORD, DWORD, LWORD). |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
435 |
* Note that the definition of bit_string_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
436 |
* (according to the spec) includes the above elements |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
437 |
* and an extra BOOL. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
438 |
* We could use an extra construct with the first four |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
439 |
* elements to be used solely in the definition of |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
440 |
* bit_string_literal, but with the objective of not |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
441 |
* having to replicate the actions (if we ever need |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
442 |
* to change them, they would need to be changed in both |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
443 |
* bit_string_type_name and the extra grouping), we |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
444 |
* have re-defined bit_string_type_name as only including |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
445 |
* the first four elements. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
446 |
* In order to have our parser implement the specification |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
447 |
* correctly we have augmented every occurence of |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
448 |
* bit_string_type_name in other rules with the BOOL |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
449 |
* token. Since bit_string_type_name only appears in |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
450 |
* the rule for elementary_type_name, this does not |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
451 |
* seem to be a big concession to make! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
452 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
453 |
* - We have added a helper symbol to concentrate the |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
454 |
* instantiation of STRING and WSTRING into a single |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
455 |
* location (elementary_string_type_name). |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
456 |
* These two elements show up in several other rules, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
457 |
* but we want to create the equivalent abstract syntax |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
458 |
* in a single location of this file, in order to make |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
459 |
* possible future changes easier to edit... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
460 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
461 |
%type <leaf> elementary_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
462 |
%type <leaf> numeric_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
463 |
%type <leaf> integer_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
464 |
%type <leaf> signed_integer_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
465 |
%type <leaf> unsigned_integer_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
466 |
%type <leaf> real_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
467 |
%type <leaf> date_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
468 |
%type <leaf> bit_string_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
469 |
/* helper symbol to concentrate the instantiation |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
470 |
* of STRING and WSTRING into a single location |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
471 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
472 |
%type <leaf> elementary_string_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
473 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
474 |
%token BYTE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
475 |
%token WORD |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
476 |
%token DWORD |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
477 |
%token LWORD |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
478 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
479 |
%token LREAL |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
480 |
%token REAL |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
481 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
482 |
%token SINT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
483 |
%token INT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
484 |
%token DINT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
485 |
%token LINT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
486 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
487 |
%token USINT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
488 |
%token UINT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
489 |
%token UDINT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
490 |
%token ULINT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
491 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
492 |
%token WSTRING |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
493 |
%token STRING |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
494 |
%token BOOL |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
495 |
|
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
496 |
// %token TIME |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
497 |
// %token DATE |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
498 |
// %token DATE_AND_TIME |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
499 |
%token DT |
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
500 |
// %token TIME_OF_DAY |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
501 |
%token TOD |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
502 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
503 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
504 |
/********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
505 |
/* B 1.3.2 - Generic data types */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
506 |
/********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
507 |
/* Strangely, the following symbol does seem to be required! */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
508 |
// %type <leaf> generic_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
509 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
510 |
/* The following tokens do not seem to be used either |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
511 |
* but we declare them so they become reserved words... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
512 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
513 |
%token ANY |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
514 |
%token ANY_DERIVED |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
515 |
%token ANY_ELEMENTARY |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
516 |
%token ANY_MAGNITUDE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
517 |
%token ANY_NUM |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
518 |
%token ANY_REAL |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
519 |
%token ANY_INT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
520 |
%token ANY_BIT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
521 |
%token ANY_STRING |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
522 |
%token ANY_DATE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
523 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
524 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
525 |
/********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
526 |
/* B 1.3.3 - Derived data types */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
527 |
/********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
528 |
%type <leaf> derived_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
529 |
%type <leaf> single_element_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
530 |
// %type <leaf> simple_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
531 |
// %type <leaf> subrange_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
532 |
// %type <leaf> enumerated_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
533 |
// %type <leaf> array_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
534 |
// %type <leaf> structure_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
535 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
536 |
%type <leaf> data_type_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
537 |
/* helper symbol for data_type_declaration */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
538 |
%type <list> type_declaration_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
539 |
%type <leaf> type_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
540 |
%type <leaf> single_element_type_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
541 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
542 |
%type <leaf> simple_type_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
543 |
%type <leaf> simple_spec_init |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
544 |
%type <leaf> simple_specification |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
545 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
546 |
%type <leaf> subrange_type_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
547 |
%type <leaf> subrange_spec_init |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
548 |
%type <leaf> subrange_specification |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
549 |
%type <leaf> subrange |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
550 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
551 |
%type <leaf> enumerated_type_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
552 |
%type <leaf> enumerated_spec_init |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
553 |
%type <leaf> enumerated_specification |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
554 |
/* helper symbol for enumerated_value */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
555 |
%type <list> enumerated_value_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
556 |
%type <leaf> enumerated_value |
85 | 557 |
//%type <leaf> enumerated_value_without_identifier |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
558 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
559 |
%type <leaf> array_type_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
560 |
%type <leaf> array_spec_init |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
561 |
%type <leaf> array_specification |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
562 |
/* helper symbol for array_specification */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
563 |
%type <list> array_subrange_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
564 |
%type <leaf> array_initialization |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
565 |
/* helper symbol for array_initialization */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
566 |
%type <list> array_initial_elements_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
567 |
%type <leaf> array_initial_elements |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
568 |
%type <leaf> array_initial_element |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
569 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
570 |
%type <leaf> structure_type_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
571 |
%type <leaf> structure_specification |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
572 |
%type <leaf> initialized_structure |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
573 |
%type <leaf> structure_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
574 |
/* helper symbol for structure_declaration */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
575 |
%type <list> structure_element_declaration_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
576 |
%type <leaf> structure_element_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
577 |
%type <leaf> structure_element_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
578 |
%type <leaf> structure_initialization |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
579 |
/* helper symbol for structure_initialization */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
580 |
%type <list> structure_element_initialization_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
581 |
%type <leaf> structure_element_initialization |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
582 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
583 |
//%type <leaf> string_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
584 |
%type <leaf> string_type_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
585 |
/* helper symbol for string_type_declaration */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
586 |
%type <leaf> string_type_declaration_size |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
587 |
/* helper symbol for string_type_declaration */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
588 |
%type <leaf> string_type_declaration_init |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
589 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
590 |
%token ASSIGN |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
591 |
%token DOTDOT /* ".." */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
592 |
%token TYPE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
593 |
%token END_TYPE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
594 |
%token ARRAY |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
595 |
%token OF |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
596 |
%token STRUCT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
597 |
%token END_STRUCT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
598 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
599 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
600 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
601 |
/*********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
602 |
/* B 1.4 - Variables */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
603 |
/*********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
604 |
%type <leaf> variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
605 |
%type <leaf> symbolic_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
606 |
/* helper symbol for prog_cnxn */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
607 |
%type <leaf> any_symbolic_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
608 |
%type <leaf> variable_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
609 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
610 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
611 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
612 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
613 |
/********************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
614 |
/* B.1.4.1 Directly Represented Variables */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
615 |
/********************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
616 |
/* Done totally within flex... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
617 |
location_prefix |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
618 |
size_prefix |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
619 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
620 |
%token <ID> direct_variable_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
621 |
%type <leaf> direct_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
622 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
623 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
624 |
/*************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
625 |
/* B.1.4.2 Multi-element Variables */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
626 |
/*************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
627 |
%type <leaf> multi_element_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
628 |
/* helper symbol for any_symbolic_variable */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
629 |
%type <leaf> any_multi_element_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
630 |
%type <leaf> array_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
631 |
/* helper symbol for any_symbolic_variable */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
632 |
%type <leaf> any_array_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
633 |
%type <leaf> subscripted_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
634 |
/* helper symbol for any_symbolic_variable */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
635 |
%type <leaf> any_subscripted_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
636 |
%type <list> subscript_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
637 |
%type <leaf> subscript |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
638 |
%type <leaf> structured_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
639 |
/* helper symbol for any_symbolic_variable */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
640 |
%type <leaf> any_structured_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
641 |
%type <leaf> record_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
642 |
/* helper symbol for any_symbolic_variable */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
643 |
%type <leaf> any_record_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
644 |
%type <leaf> field_selector |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
645 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
646 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
647 |
/******************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
648 |
/* B 1.4.3 - Declaration & Initialisation */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
649 |
/******************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
650 |
%type <leaf> input_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
651 |
/* helper symbol for input_declarations */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
652 |
%type <list> input_declaration_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
653 |
%type <leaf> input_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
654 |
%type <leaf> edge_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
655 |
%type <leaf> var_init_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
656 |
%type <leaf> var1_init_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
657 |
%type <list> var1_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
658 |
%type <leaf> array_var_init_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
659 |
%type <leaf> structured_var_init_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
660 |
%type <leaf> fb_name_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
661 |
/* helper symbol for fb_name_decl */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
662 |
%type <list> fb_name_list_with_colon |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
663 |
/* helper symbol for fb_name_list_with_colon */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
664 |
%type <list> var1_list_with_colon |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
665 |
// %type <list> fb_name_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
666 |
// %type <leaf> fb_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
667 |
%type <leaf> output_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
668 |
%type <leaf> input_output_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
669 |
/* helper symbol for input_output_declarations */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
670 |
%type <list> var_declaration_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
671 |
%type <leaf> var_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
672 |
%type <leaf> temp_var_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
673 |
%type <leaf> var1_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
674 |
%type <leaf> array_var_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
675 |
%type <leaf> structured_var_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
676 |
%type <leaf> var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
677 |
%type <leaf> retentive_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
678 |
%type <leaf> located_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
679 |
/* helper symbol for located_var_declarations */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
680 |
%type <list> located_var_decl_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
681 |
%type <leaf> located_var_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
682 |
%type <leaf> external_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
683 |
/* helper symbol for external_var_declarations */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
684 |
%type <list> external_declaration_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
685 |
%type <leaf> external_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
686 |
%type <leaf> global_var_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
687 |
%type <leaf> global_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
688 |
/* helper symbol for global_var_declarations */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
689 |
%type <list> global_var_decl_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
690 |
%type <leaf> global_var_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
691 |
%type <leaf> global_var_spec |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
692 |
%type <leaf> located_var_spec_init |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
693 |
%type <leaf> location |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
694 |
%type <list> global_var_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
695 |
%type <leaf> string_var_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
696 |
%type <leaf> single_byte_string_var_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
697 |
%type <leaf> single_byte_string_spec |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
698 |
%type <leaf> double_byte_string_var_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
699 |
%type <leaf> double_byte_string_spec |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
700 |
%type <leaf> incompl_located_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
701 |
/* helper symbol for incompl_located_var_declarations */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
702 |
%type <list> incompl_located_var_decl_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
703 |
%type <leaf> incompl_located_var_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
704 |
%type <leaf> incompl_location |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
705 |
%type <leaf> var_spec |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
706 |
/* helper symbol for var_spec */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
707 |
%type <leaf> string_spec |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
708 |
/* intermediate helper symbol for: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
709 |
* - non_retentive_var_decls |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
710 |
* - output_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
711 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
712 |
%type <list> var_init_decl_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
713 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
714 |
%token <ID> incompl_location_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
715 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
716 |
%token VAR_INPUT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
717 |
%token VAR_OUTPUT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
718 |
%token VAR_IN_OUT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
719 |
%token VAR_EXTERNAL |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
720 |
%token VAR_GLOBAL |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
721 |
%token END_VAR |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
722 |
%token RETAIN |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
723 |
%token NON_RETAIN |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
724 |
%token R_EDGE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
725 |
%token F_EDGE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
726 |
%token AT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
727 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
728 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
729 |
/***********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
730 |
/* B 1.5.1 - Functions */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
731 |
/***********************/ |
68 | 732 |
// %type <leaf> function_name |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
733 |
/* helper symbol for IL language */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
734 |
%type <leaf> function_name_no_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
735 |
%type <leaf> function_name_simpleop_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
736 |
//%type <leaf> function_name_expression_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
737 |
/* helper symbols for ST language */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
738 |
//%type <leaf> function_name_NOT_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
739 |
%type <leaf> function_name_no_NOT_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
740 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
741 |
//%type <leaf> standard_function_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
742 |
/* helper symbols for IL language */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
743 |
%type <leaf> standard_function_name_no_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
744 |
%type <leaf> standard_function_name_simpleop_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
745 |
%type <leaf> standard_function_name_expression_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
746 |
/* helper symbols for ST language */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
747 |
%type <leaf> standard_function_name_NOT_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
748 |
%type <leaf> standard_function_name_no_NOT_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
749 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
750 |
%type <leaf> derived_function_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
751 |
%type <leaf> function_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
752 |
/* helper symbol for function_declaration */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
753 |
%type <leaf> function_name_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
754 |
%type <leaf> io_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
755 |
%type <leaf> function_var_decls |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
756 |
%type <leaf> function_body |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
757 |
%type <leaf> var2_init_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
758 |
/* intermediate helper symbol for function_declaration */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
759 |
%type <list> io_OR_function_var_declarations_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
760 |
/* intermediate helper symbol for function_var_decls */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
761 |
%type <list> var2_init_decl_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
762 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
763 |
%token <ID> standard_function_name_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
764 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
765 |
%token FUNCTION |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
766 |
%token END_FUNCTION |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
767 |
%token CONSTANT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
768 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
769 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
770 |
/*****************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
771 |
/* B 1.5.2 - Function Blocks */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
772 |
/*****************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
773 |
%type <leaf> function_block_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
774 |
%type <leaf> standard_function_block_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
775 |
%type <leaf> derived_function_block_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
776 |
%type <leaf> function_block_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
777 |
%type <leaf> other_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
778 |
%type <leaf> temp_var_decls |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
779 |
%type <leaf> non_retentive_var_decls |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
780 |
%type <leaf> function_block_body |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
781 |
/* intermediate helper symbol for function_declaration */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
782 |
%type <list> io_OR_other_var_declarations_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
783 |
/* intermediate helper symbol for temp_var_decls */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
784 |
%type <list> temp_var_decls_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
785 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
786 |
%token <ID> standard_function_block_name_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
787 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
788 |
%token FUNCTION_BLOCK |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
789 |
%token END_FUNCTION_BLOCK |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
790 |
%token VAR_TEMP |
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
791 |
// %token END_VAR |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
792 |
%token VAR |
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
793 |
// %token NON_RETAIN |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
794 |
// %token END_VAR |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
795 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
796 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
797 |
/**********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
798 |
/* B 1.5.3 - Programs */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
799 |
/**********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
800 |
%type <leaf> program_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
801 |
%type <leaf> program_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
802 |
/* helper symbol for program_declaration */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
803 |
%type <list> program_var_declarations_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
804 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
805 |
%token PROGRAM |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
806 |
%token END_PROGRAM |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
807 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
808 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
809 |
/********************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
810 |
/* B 1.6 Sequential Function Chart elements */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
811 |
/********************************************/ |
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
812 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
813 |
%type <list> sequential_function_chart |
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
814 |
%type <list> sfc_network |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
815 |
%type <leaf> initial_step |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
816 |
%type <leaf> step |
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
817 |
%type <list> action_association_list |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
818 |
%type <leaf> step_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
819 |
%type <leaf> action_association |
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
820 |
/* helper symbol for action_association */ |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
821 |
%type <list> indicator_name_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
822 |
%type <leaf> action_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
823 |
%type <leaf> action_qualifier |
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
824 |
%type <leaf> qualifier |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
825 |
%type <leaf> timed_qualifier |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
826 |
%type <leaf> action_time |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
827 |
%type <leaf> indicator_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
828 |
%type <leaf> transition |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
829 |
%type <leaf> steps |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
830 |
%type <list> step_name_list |
131 | 831 |
%type <leaf> transition_priority |
85 | 832 |
%type <leaf> transition_condition |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
833 |
%type <leaf> action |
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
834 |
%type <leaf> transition_name |
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
835 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
836 |
|
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
837 |
// %token ASSIGN |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
838 |
%token ACTION |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
839 |
%token END_ACTION |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
840 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
841 |
%token TRANSITION |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
842 |
%token END_TRANSITION |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
843 |
%token FROM |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
844 |
%token TO |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
845 |
%token PRIORITY |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
846 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
847 |
%token INITIAL_STEP |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
848 |
%token STEP |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
849 |
%token END_STEP |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
850 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
851 |
%token L |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
852 |
%token D |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
853 |
%token SD |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
854 |
%token DS |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
855 |
%token SL |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
856 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
857 |
%token N |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
858 |
%token P |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
859 |
/* NOTE: the following two clash with the R and S IL operators. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
860 |
* It will have to be handled when we include parsing of SFC... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
861 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
862 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
863 |
%token R |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
864 |
%token S |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
865 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
866 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
867 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
868 |
/********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
869 |
/* B 1.7 Configuration elements */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
870 |
/********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
871 |
%type <leaf> configuration_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
872 |
%type <leaf> resource_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
873 |
%type <leaf> configuration_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
874 |
// helper symbol for |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
875 |
// - configuration_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
876 |
// - resource_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
877 |
// |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
878 |
%type <leaf> optional_global_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
879 |
// helper symbol for configuration_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
880 |
%type <leaf> optional_access_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
881 |
// helper symbol for configuration_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
882 |
%type <leaf> optional_instance_specific_initializations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
883 |
// helper symbol for configuration_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
884 |
%type <list> resource_declaration_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
885 |
%type <leaf> resource_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
886 |
%type <leaf> single_resource_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
887 |
// helper symbol for single_resource_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
888 |
%type <list> task_configuration_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
889 |
// helper symbol for single_resource_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
890 |
%type <list> program_configuration_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
891 |
%type <leaf> resource_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
892 |
// %type <leaf> access_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
893 |
// helper symbol for access_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
894 |
// %type <leaf> access_declaration_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
895 |
// %type <leaf> access_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
896 |
// %type <leaf> access_path |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
897 |
// helper symbol for access_path |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
898 |
%type <list> any_fb_name_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
899 |
%type <leaf> global_var_reference |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
900 |
// %type <leaf> access_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
901 |
%type <leaf> program_output_reference |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
902 |
%type <leaf> program_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
903 |
// %type <leaf> direction |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
904 |
%type <leaf> task_configuration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
905 |
%type <leaf> task_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
906 |
%type <leaf> task_initialization |
74
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
907 |
// 3 helper symbols for task_initialization |
75 | 908 |
%type <leaf> task_initialization_single |
909 |
%type <leaf> task_initialization_interval |
|
910 |
%type <leaf> task_initialization_priority |
|
74
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
911 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
912 |
%type <leaf> data_source |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
913 |
%type <leaf> program_configuration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
914 |
// helper symbol for program_configuration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
915 |
%type <leaf> optional_task_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
916 |
// helper symbol for program_configuration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
917 |
%type <leaf> optional_prog_conf_elements |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
918 |
%type <list> prog_conf_elements |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
919 |
%type <leaf> prog_conf_element |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
920 |
%type <leaf> fb_task |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
921 |
%type <leaf> prog_cnxn |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
922 |
%type <leaf> prog_data_source |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
923 |
%type <leaf> data_sink |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
924 |
%type <leaf> instance_specific_initializations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
925 |
// helper symbol for instance_specific_initializations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
926 |
%type <list> instance_specific_init_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
927 |
%type <leaf> instance_specific_init |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
928 |
// helper symbol for instance_specific_init |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
929 |
%type <leaf> fb_initialization |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
930 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
931 |
%type <leaf> prev_declared_global_var_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
932 |
%token <ID> prev_declared_global_var_name_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
933 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
934 |
%type <leaf> prev_declared_program_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
935 |
%token <ID> prev_declared_program_name_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
936 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
937 |
%type <leaf> prev_declared_resource_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
938 |
%token <ID> prev_declared_resource_name_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
939 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
940 |
%token <ID> prev_declared_configuration_name_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
941 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
942 |
// %type <leaf> prev_declared_task_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
943 |
// %token <ID> prev_declared_task_name_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
944 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
945 |
%token CONFIGURATION |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
946 |
%token END_CONFIGURATION |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
947 |
%token TASK |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
948 |
%token RESOURCE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
949 |
%token ON |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
950 |
%token END_RESOURCE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
951 |
%token VAR_CONFIG |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
952 |
%token VAR_ACCESS |
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
953 |
// %token END_VAR |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
954 |
%token WITH |
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
955 |
// %token PROGRAM |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
956 |
// %token RETAIN |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
957 |
// %token NON_RETAIN |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
958 |
// %token PRIORITY |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
959 |
%token SINGLE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
960 |
%token INTERVAL |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
961 |
%token READ_WRITE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
962 |
%token READ_ONLY |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
963 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
964 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
965 |
/***********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
966 |
/* B 2.1 Instructions and Operands */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
967 |
/***********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
968 |
%type <list> instruction_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
969 |
%type <leaf> il_instruction |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
970 |
%type <leaf> il_incomplete_instruction |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
971 |
%type <leaf> label |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
972 |
%type <leaf> il_simple_operation |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
973 |
// helper symbol for il_simple_operation |
91 | 974 |
//%type <tmp_symbol> il_simple_operator_clash_il_operand |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
975 |
%type <leaf> il_expression |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
976 |
%type <leaf> il_jump_operation |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
977 |
%type <leaf> il_fb_call |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
978 |
%type <leaf> il_formal_funct_call |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
979 |
// helper symbol for il_formal_funct_call |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
980 |
%type <leaf> il_expr_operator_clash_eol_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
981 |
%type <leaf> il_operand |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
982 |
%type <list> il_operand_list |
91 | 983 |
// helper symbol for il_simple_operation |
984 |
%type <list> il_operand_list2 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
985 |
%type <list> simple_instr_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
986 |
%type <leaf> il_simple_instruction |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
987 |
%type <list> il_param_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
988 |
%type <list> il_param_instruction_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
989 |
%type <leaf> il_param_instruction |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
990 |
%type <leaf> il_param_last_instruction |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
991 |
%type <leaf> il_param_assignment |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
992 |
%type <leaf> il_param_out_assignment |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
993 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
994 |
%token EOL |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
995 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
996 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
997 |
/*******************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
998 |
/* B 2.2 Operators */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
999 |
/*******************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1000 |
%token <ID> sendto_identifier_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1001 |
%type <leaf> sendto_identifier |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1002 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1003 |
%type <leaf> LD_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1004 |
%type <leaf> LDN_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1005 |
%type <leaf> ST_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1006 |
%type <leaf> STN_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1007 |
%type <leaf> NOT_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1008 |
%type <leaf> S_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1009 |
%type <leaf> R_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1010 |
%type <leaf> S1_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1011 |
%type <leaf> R1_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1012 |
%type <leaf> CLK_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1013 |
%type <leaf> CU_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1014 |
%type <leaf> CD_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1015 |
%type <leaf> PV_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1016 |
%type <leaf> IN_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1017 |
%type <leaf> PT_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1018 |
%type <leaf> AND_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1019 |
%type <leaf> AND2_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1020 |
%type <leaf> OR_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1021 |
%type <leaf> XOR_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1022 |
%type <leaf> ANDN_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1023 |
%type <leaf> ANDN2_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1024 |
%type <leaf> ORN_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1025 |
%type <leaf> XORN_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1026 |
%type <leaf> ADD_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1027 |
%type <leaf> SUB_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1028 |
%type <leaf> MUL_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1029 |
%type <leaf> DIV_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1030 |
%type <leaf> MOD_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1031 |
%type <leaf> GT_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1032 |
%type <leaf> GE_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1033 |
%type <leaf> EQ_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1034 |
%type <leaf> LT_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1035 |
%type <leaf> LE_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1036 |
%type <leaf> NE_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1037 |
%type <leaf> CAL_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1038 |
%type <leaf> CALC_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1039 |
%type <leaf> CALCN_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1040 |
%type <leaf> RET_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1041 |
%type <leaf> RETC_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1042 |
%type <leaf> RETCN_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1043 |
%type <leaf> JMP_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1044 |
%type <leaf> JMPC_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1045 |
%type <leaf> JMPCN_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1046 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1047 |
%type <leaf> il_simple_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1048 |
%type <leaf> il_simple_operator_clash |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1049 |
%type <leaf> il_simple_operator_clash1 |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1050 |
%type <leaf> il_simple_operator_clash2 |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1051 |
%type <leaf> il_simple_operator_noclash |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1052 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1053 |
//%type <leaf> il_expr_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1054 |
%type <leaf> il_expr_operator_clash |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1055 |
%type <leaf> il_expr_operator_noclash |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1056 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1057 |
%type <leaf> il_assign_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1058 |
%type <leaf> il_assign_out_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1059 |
%type <leaf> il_call_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1060 |
%type <leaf> il_return_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1061 |
%type <leaf> il_jump_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1062 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1063 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1064 |
%token LD |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1065 |
%token LDN |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1066 |
%token ST |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1067 |
%token STN |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1068 |
%token NOT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1069 |
%token S |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1070 |
%token R |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1071 |
%token S1 |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1072 |
%token R1 |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1073 |
%token CLK |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1074 |
%token CU |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1075 |
%token CD |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1076 |
%token PV |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1077 |
%token IN |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1078 |
%token PT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1079 |
%token AND |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1080 |
%token AND2 /* character '&' in the source code*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1081 |
%token OR |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1082 |
%token XOR |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1083 |
%token ANDN |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1084 |
%token ANDN2 /* characters '&N' in the source code */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1085 |
%token ORN |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1086 |
%token XORN |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1087 |
%token ADD |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1088 |
%token SUB |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1089 |
%token MUL |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1090 |
%token DIV |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1091 |
%token MOD |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1092 |
%token GT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1093 |
%token GE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1094 |
%token EQ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1095 |
%token LT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1096 |
%token LE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1097 |
%token NE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1098 |
%token CAL |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1099 |
%token CALC |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1100 |
%token CALCN |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1101 |
%token RET |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1102 |
%token RETC |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1103 |
%token RETCN |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1104 |
%token JMP |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1105 |
%token JMPC |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1106 |
%token JMPCN |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1107 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1108 |
%token SENDTO /* "=>" */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1109 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1110 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1111 |
/***********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1112 |
/* B 3.1 - Expressions */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1113 |
/***********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1114 |
/* NOTE: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1115 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1116 |
* - unary_operator, multiply_operator, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1117 |
* add_operator and comparison_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1118 |
* are not required. Their values are integrated |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1119 |
* directly into other rules... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1120 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1121 |
%type <leaf> expression |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1122 |
%type <leaf> xor_expression |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1123 |
%type <leaf> and_expression |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1124 |
%type <leaf> comparison |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1125 |
%type <leaf> equ_expression |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1126 |
// %type <leaf> comparison_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1127 |
%type <leaf> add_expression |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1128 |
// %type <leaf> add_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1129 |
%type <leaf> term |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1130 |
// %type <leaf> multiply_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1131 |
%type <leaf> power_expression |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1132 |
%type <leaf> unary_expression |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1133 |
// %type <leaf> unary_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1134 |
%type <leaf> primary_expression |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1135 |
/* intermediate helper symbol for primary_expression */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1136 |
%type <leaf> function_invocation |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1137 |
|
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
1138 |
// %token AND |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
1139 |
// %token XOR |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
1140 |
// %token OR |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
1141 |
// %token MOD |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
1142 |
// %token NOT |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1143 |
%token OPER_NE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1144 |
%token OPER_GE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1145 |
%token OPER_LE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1146 |
%token OPER_EXP |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1147 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1148 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1149 |
/********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1150 |
/* B 3.2 Statements */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1151 |
/********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1152 |
%type <list> statement_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1153 |
%type <leaf> statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1154 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1155 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1156 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1157 |
/*********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1158 |
/* B 3.2.1 Assignment Statements */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1159 |
/*********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1160 |
%type <leaf> assignment_statement |
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
1161 |
// %token ASSIGN /* ":=" */ |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1162 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1163 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1164 |
/*****************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1165 |
/* B 3.2.2 Subprogram Control Statements */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1166 |
/*****************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1167 |
%type <leaf> subprogram_control_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1168 |
%type <leaf> return_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1169 |
%type <leaf> fb_invocation |
85 | 1170 |
// %type <leaf> param_assignment |
1171 |
%type <leaf> param_assignment_formal |
|
1172 |
%type <leaf> param_assignment_nonformal |
|
1173 |
/* helper symbols for fb_invocation */ |
|
1174 |
%type <list> param_assignment_formal_list |
|
1175 |
%type <list> param_assignment_nonformal_list |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1176 |
|
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
1177 |
// %token ASSIGN |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
1178 |
// %token SENDTO /* "=>" */ |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1179 |
%token RETURN |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1180 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1181 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1182 |
/********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1183 |
/* B 3.2.3 Selection Statements */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1184 |
/********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1185 |
%type <leaf> selection_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1186 |
%type <leaf> if_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1187 |
%type <leaf> case_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1188 |
%type <leaf> case_element |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1189 |
%type <list> case_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1190 |
%type <leaf> case_list_element |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1191 |
/* helper symbol for if_statement */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1192 |
%type <list> elseif_statement_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1193 |
/* helper symbol for elseif_statement_list */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1194 |
%type <leaf> elseif_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1195 |
/* helper symbol for case_statement */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1196 |
%type <list> case_element_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1197 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1198 |
%token IF |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1199 |
%token THEN |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1200 |
%token ELSIF |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1201 |
%token ELSE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1202 |
%token END_IF |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1203 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1204 |
%token CASE |
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
1205 |
// %token OF |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
1206 |
// %token ELSE |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1207 |
%token END_CASE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1208 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1209 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1210 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1211 |
/********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1212 |
/* B 3.2.4 Iteration Statements */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1213 |
/********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1214 |
%type <leaf> iteration_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1215 |
%type <leaf> for_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1216 |
%type <leaf> control_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1217 |
%type <leaf> while_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1218 |
%type <leaf> repeat_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1219 |
%type <leaf> exit_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1220 |
/* Integrated directly into for_statement */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1221 |
// %type <leaf> for_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1222 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1223 |
%token FOR |
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
1224 |
// %token ASSIGN |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
1225 |
// %token TO |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1226 |
%token BY |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1227 |
%token DO |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1228 |
%token END_FOR |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1229 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1230 |
%token WHILE |
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
1231 |
// %token DO |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1232 |
%token END_WHILE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1233 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1234 |
%token REPEAT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1235 |
%token UNTIL |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1236 |
%token END_REPEAT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1237 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1238 |
%token EXIT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1239 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1240 |
%% |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1241 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1242 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1243 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1244 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1245 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1246 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1247 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1248 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1249 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1250 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1251 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1252 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1253 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1254 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1255 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1256 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1257 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1258 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1259 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1260 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1261 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1262 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1263 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1264 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1265 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1266 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1267 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1268 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1269 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1270 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1271 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1272 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1273 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1274 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1275 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1276 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1277 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1278 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1279 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1280 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1281 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1282 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1283 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1284 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1285 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1286 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1287 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1288 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1289 |
/********************************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1290 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1291 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1292 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1293 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1294 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1295 |
/*****************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1296 |
/* Prelimenary constructs... */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1297 |
/*****************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1298 |
start: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1299 |
library {$$ = $1;} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1300 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1301 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1302 |
/* the pragmas... */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1303 |
pragma: |
68 | 1304 |
pragma_token {$$ = new pragma_c($1, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1305 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1306 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1307 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1308 |
/* NOTE: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1309 |
* short version: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1310 |
* identifier is used for previously undeclared identifiers |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1311 |
* any_identifier is used when any identifier, previously |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1312 |
* declared or not, is required in the syntax. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1313 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1314 |
* long version: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1315 |
* When flex comes across an identifier, it first |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1316 |
* searches through the currently declared variables, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1317 |
* functions, types, etc... to determine if it has |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1318 |
* been previously declared. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1319 |
* Only if the identifier has not yet been declared |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1320 |
* will it return an identifier_token (later turned into |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1321 |
* an identifier symbol by the bison generated syntax parser). |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1322 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1323 |
* Some constructs in the syntax, such as when calling |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1324 |
* a function 'F(var1 := 1; var2 := 2);', will accept _any_ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1325 |
* identifier in 'var1', even if it has been previously |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1326 |
* declared in the current scope, since var1 belongs to |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1327 |
* another scope (the variables declared in function F). |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1328 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1329 |
* For the above reason, we need to define the symbol |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1330 |
* any_identifier. All the symbols that may become an |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1331 |
* any_identifier are expected to be stored in the |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1332 |
* abstract syntax as a identifier_c |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1333 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1334 |
/* NOTE: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1335 |
* Type names, function names, function block type names and |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1336 |
* program type names are considerd keywords once they are defined, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1337 |
* so may no longer be used for variable names! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1338 |
* BUT the spec is confusing on this issue, as it is not clear when |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1339 |
* a function name should be considered as defined. If it is to be |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1340 |
* considered defined only from the location from where it is declared |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1341 |
* and onwards, it means that before it is declared its name may be |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1342 |
* used for variable names! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1343 |
* This means that we must allow names previously used for functions |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1344 |
* (et. al.) to also constitue an any_identifier! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1345 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1346 |
any_identifier: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1347 |
identifier |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1348 |
| prev_declared_fb_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1349 |
| prev_declared_variable_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1350 |
/**/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1351 |
| prev_declared_enumerated_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1352 |
| prev_declared_simple_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1353 |
| prev_declared_subrange_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1354 |
| prev_declared_array_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1355 |
| prev_declared_structure_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1356 |
| prev_declared_string_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1357 |
| prev_declared_derived_function_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1358 |
| prev_declared_derived_function_block_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1359 |
| prev_declared_program_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1360 |
/**/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1361 |
| prev_declared_resource_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1362 |
| prev_declared_program_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1363 |
| prev_declared_global_var_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1364 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1365 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1366 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1367 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1368 |
|
68 | 1369 |
prev_declared_variable_name: prev_declared_variable_name_token {$$ = new identifier_c($1, locloc(@$));}; |
1370 |
prev_declared_fb_name: prev_declared_fb_name_token {$$ = new identifier_c($1, locloc(@$));}; |
|
1371 |
||
1372 |
prev_declared_simple_type_name: prev_declared_simple_type_name_token {$$ = new identifier_c($1, locloc(@$));}; |
|
1373 |
prev_declared_subrange_type_name: prev_declared_subrange_type_name_token {$$ = new identifier_c($1, locloc(@$));}; |
|
1374 |
prev_declared_enumerated_type_name: prev_declared_enumerated_type_name_token {$$ = new identifier_c($1, locloc(@$));}; |
|
1375 |
prev_declared_array_type_name: prev_declared_array_type_name_token {$$ = new identifier_c($1, locloc(@$));}; |
|
1376 |
prev_declared_structure_type_name: prev_declared_structure_type_name_token {$$ = new identifier_c($1, locloc(@$));}; |
|
1377 |
prev_declared_string_type_name: prev_declared_string_type_name_token {$$ = new identifier_c($1, locloc(@$));}; |
|
1378 |
||
1379 |
prev_declared_derived_function_name: prev_declared_derived_function_name_token {$$ = new identifier_c($1, locloc(@$));}; |
|
1380 |
prev_declared_derived_function_block_name: prev_declared_derived_function_block_name_token {$$ = new identifier_c($1, locloc(@$));}; |
|
1381 |
prev_declared_program_type_name: prev_declared_program_type_name_token {$$ = new identifier_c($1, locloc(@$));}; |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1382 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1383 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1384 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1385 |
/***************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1386 |
/* B 0 - Programming Model */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1387 |
/***************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1388 |
library: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1389 |
/* empty */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1390 |
{if (tree_root == NULL) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1391 |
tree_root = new library_c(); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1392 |
$$ = (list_c *)tree_root; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1393 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1394 |
| library library_element_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1395 |
{$$ = $1; $$->add_element($2);} |
77 | 1396 |
/* ERROR_CHECK_BEGIN */ |
73 | 1397 |
| library error END_OF_INPUT |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1398 |
{$$ = NULL; |
131 | 1399 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown syntax error."); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1400 |
yyerrok; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1401 |
} |
77 | 1402 |
/* ERROR_CHECK_END */ |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1403 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1404 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1405 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1406 |
library_element_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1407 |
data_type_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1408 |
| function_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1409 |
| function_block_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1410 |
| program_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1411 |
| configuration_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1412 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1413 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1414 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1415 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1416 |
/*******************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1417 |
/* B 1.1 - Letters, digits and identifiers */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1418 |
/*******************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1419 |
/* NOTE: the spec defines identifier as: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1420 |
* identifier ::= (letter|('_' (letter|digit))) {['_'] (letter|digit)} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1421 |
* In essence, any sequence of letters or digits, starting with a letter |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1422 |
* or '_'. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1423 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1424 |
* On section 2.1.3 (pg 26) , the spec states |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1425 |
* "The keywords listed in annex C shall not be used for any other purpose, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1426 |
* e.g., variable names or extensions as defined in 1.5.1." |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1427 |
* (NOTE: the spec itself does not follow this rule, as it defines standard |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1428 |
* functions with names identidal to keywords, e.g. 'MOD', 'NOT' !!. This is |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1429 |
* another issue altogether, and is worked around somewhere else...) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1430 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1431 |
* This means that we must re-define indentifier so as to exclude |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1432 |
* any keywords defined in annex C. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1433 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1434 |
* Note also that the list includes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1435 |
* - Data type names |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1436 |
* - Function names |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1437 |
* - Function Block names |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1438 |
* This means that any named used for a function name, data type name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1439 |
* or function block name, essentially becomes a keyword, and may therefore |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1440 |
* no longer be re-used for any other use! (see NOTE 2) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1441 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1442 |
* In our case, excluding the keywords is achieved in the lexical parser, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1443 |
* by two mechanisms: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1444 |
* (1) giving higher priority to the keywords (tokens) than to identifiers, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1445 |
* so when the lexical parser finds a keyword it will be parsed as a |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1446 |
* token before being parsed as an identifier. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1447 |
* (2) when an identifier is found that is not a keyword, the lexical parser |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1448 |
* then looks in the global symbol table, and will not return an identifier |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1449 |
* if the name has been previously used as a data type name, function name, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1450 |
* or function block name! (In these cases it will return a |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1451 |
* prev_declared_function_name_token, etc...). |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1452 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1453 |
* Unfortunately, the language (especially IL) uses tokens that are |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1454 |
* not defined as keywords in the spec (e.g. 'IN', 'R1', 'S1', 'PT', etc...)! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1455 |
* This means that it is valid to name a function 'IN', a variable 'PT', etc... |
78
aead91ec37cd
removing 'identifier' from definition of symbolic_variable
mario
parents:
77
diff
changeset
|
1456 |
* In order to solve this potential ambiguity, flex only parses the above |
aead91ec37cd
removing 'identifier' from definition of symbolic_variable
mario
parents:
77
diff
changeset
|
1457 |
* identifiers as keywords / tokens if we are currently parsing IL code. |
aead91ec37cd
removing 'identifier' from definition of symbolic_variable
mario
parents:
77
diff
changeset
|
1458 |
* When parsing all code other than IL code, the above identifiers are treated |
aead91ec37cd
removing 'identifier' from definition of symbolic_variable
mario
parents:
77
diff
changeset
|
1459 |
* just like any other identifier. |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1460 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1461 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1462 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1463 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1464 |
* NOTE 2: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1465 |
* I (Mario) find it strange that the writers of the spec really want |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1466 |
* names previously used for function names, data type names or function |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1467 |
* block names, to become full fledged keywords. I understand that they |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1468 |
* do not want these names being used as variable names, but how about |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1469 |
* enumeration values? How about structure element names? |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1470 |
* If we interpret the spec literally, these would not be accepted, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1471 |
* which would probably burden the programmer quite a bit, in making sure |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1472 |
* all these name don't clash! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1473 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1474 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1475 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1476 |
* NOTE 3: The keywords, as specified in Annex C are... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1477 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1478 |
* - Data type names |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1479 |
* - Function names |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1480 |
* - Function Block names |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1481 |
* - ACTION...END_ACTION |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1482 |
* - ARRAY...OF |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1483 |
* - AT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1484 |
* - CASE...OF...ELSE...END_CASE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1485 |
* - CONFIGURATION...END_CONFIGURATION |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1486 |
* - CONSTANT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1487 |
* - EN, ENO |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1488 |
* - EXIT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1489 |
* - FALSE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1490 |
* - F_EDGE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1491 |
* - FOR...TO...BY...DO...END_FOR |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1492 |
* - FUNCTION...END_FUNCTION |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1493 |
* - FUNCTION_BLOCK...END_FUNCTION_BLOCK |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1494 |
* - IF...THEN...ELSIF...ELSE...END_IF |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1495 |
* - INITIAL_STEP...END_STEP |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1496 |
* - NOT, MOD, AND, XOR, OR |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1497 |
* - PROGRAM...WITH... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1498 |
* - PROGRAM...END_PROGRAM |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1499 |
* - R_EDGE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1500 |
* - READ_ONLY, READ_WRITE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1501 |
* - REPEAT...UNTIL...END_REPEAT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1502 |
* - RESOURCE...ON...END_RESOURCE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1503 |
* - RETAIN, NON_RETAIN |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1504 |
* - RETURN |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1505 |
* - STEP...END_STEP |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1506 |
* - STRUCT...END_STRUCT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1507 |
* - TASK |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1508 |
* - TRANSITION...FROM...TO...END_TRANSITION |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1509 |
* - TRUE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1510 |
* - TYPE...END_TYPE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1511 |
* - VAR...END_VAR |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1512 |
* - VAR_INPUT...END_VAR |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1513 |
* - VAR_OUTPUT...END_VAR |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1514 |
* - VAR_IN_OUT...END_VAR |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1515 |
* - VAR_TEMP...END_VAR |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1516 |
* - VAR_EXTERNAL...END_VAR |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1517 |
* - VAR_ACCESS...END_VAR |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1518 |
* - VAR_CONFIG...END_VAR |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1519 |
* - VAR_GLOBAL...END_VAR |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1520 |
* - WHILE...DO...END_WHILE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1521 |
* - WITH |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1522 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1523 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1524 |
identifier: |
68 | 1525 |
identifier_token {$$ = new identifier_c($1, locloc(@$));} |
78
aead91ec37cd
removing 'identifier' from definition of symbolic_variable
mario
parents:
77
diff
changeset
|
1526 |
; |
aead91ec37cd
removing 'identifier' from definition of symbolic_variable
mario
parents:
77
diff
changeset
|
1527 |
|
aead91ec37cd
removing 'identifier' from definition of symbolic_variable
mario
parents:
77
diff
changeset
|
1528 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1529 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1530 |
/*********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1531 |
/* B 1.2 - Constants */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1532 |
/*********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1533 |
constant: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1534 |
numeric_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1535 |
| character_string |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1536 |
| time_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1537 |
| bit_string_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1538 |
| boolean_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1539 |
/* NOTE: in order to remove reduce/reduce conflicts, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1540 |
* unsigned_integer, signed_integer, binary_integer, octal_integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1541 |
* and hex_integer have been integrated directly into |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1542 |
* the constants construct, instead of belonging to |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1543 |
* either the bit_string_literal or integer_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1544 |
* construct. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1545 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1546 |
/* NOTE: unsigned_integer, although used in some |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1547 |
* rules, is not defined in the spec! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1548 |
* We therefore replaced unsigned_integer as integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1549 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1550 |
/*| integer {} */ /* i.e. an unsigned_integer */ /* NOTE: already included as a signed integer! */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1551 |
| signed_integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1552 |
| binary_integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1553 |
| octal_integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1554 |
| hex_integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1555 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1556 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1557 |
/* a helper symbol for expression */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1558 |
/* A constant without any preceding '-', but may |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1559 |
* include a preceding '+' ! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1560 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1561 |
non_negative_constant: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1562 |
non_negative_numeric_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1563 |
| character_string |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1564 |
| time_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1565 |
| bit_string_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1566 |
| boolean_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1567 |
| non_negative_signed_integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1568 |
| binary_integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1569 |
| octal_integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1570 |
| hex_integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1571 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1572 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1573 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1574 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1575 |
/******************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1576 |
/* B 1.2.1 - Numeric Literals */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1577 |
/******************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1578 |
/* NOTES: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1579 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1580 |
* - integer is parsed by flex, but signed_integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1581 |
* is parsed by bison. Flex cannot parse a signed |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1582 |
* integer correctly! For example: '123+456' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1583 |
* would be parsed by flex as an {integer} {signed_integer} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1584 |
* instead of {integer} '+' {integer} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1585 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1586 |
* - Neither flex nor bison can parse a real_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1587 |
* completely (and correctly). |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1588 |
* Note that we cannot use the definition of real in bison as |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1589 |
* real: signed_integer '.' integer [exponent] |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1590 |
* exponent: {'E'|'e'} ['+'|'-'] integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1591 |
* because 123e45 would be parsed by flex as |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1592 |
* integer (123) identifier (e45). |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1593 |
* I.e., flex never hands over an 'e' directly to |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1594 |
* bison, but rather interprets it as an identifier. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1595 |
* I guess we could jump through hoops and get it |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1596 |
* working in bison, but the following alternative |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1597 |
* seems more straight forward... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1598 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1599 |
* We therefore had to break up the definition of |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1600 |
* real_literal in discrete parts: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1601 |
* real_literal: [real_type_name '#'] singned_real |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1602 |
* signed_real: ['+'|'-'] real |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1603 |
* Flex handles real, while bison handles signed_real |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1604 |
* and real_literal. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1605 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1606 |
* - According to the spec, intger '.' integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1607 |
* may be reduced to either a real or a fixed_point. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1608 |
* It is nevertheless possible to figure out from the |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1609 |
* context which of the two rules should be used in |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1610 |
* the reduction. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1611 |
* Unfortunately, due to the issue described above |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1612 |
* regarding the exponent of a real, the syntax |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1613 |
* integer '.' integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1614 |
* must be parsed by flex as a single token (i.e. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1615 |
* fixed_point_token). This means we must add fixed_point |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1616 |
* to the definition of real! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1617 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1618 |
* - The syntax also uses a construct |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1619 |
* fixed_point: integer ['.' integer] |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1620 |
* Notice that real is not defined based on fixed point, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1621 |
* but rather off integer thus: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1622 |
* real: integer '.' integer [exponent] |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1623 |
* This means that a real may not be composed of a single |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1624 |
* integer, unlike the construct fixed_point! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1625 |
* This also means that a |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1626 |
* integer '.' integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1627 |
* could be reduced to either a real or a fixed_point |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1628 |
* construct. It is probably possible to decide by looking |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1629 |
* at the context, BUT: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1630 |
* Unfortunatley, due to the reasons explained way above, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1631 |
* a real (with an exponent) has to be handled by flex as a |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1632 |
* whole. This means that we cannot leave to bison (the syntax |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1633 |
* parser) the decision of how to reduce an |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1634 |
* integer '.' integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1635 |
* (either to real or to fixed_point) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1636 |
* The decision on how to reduce it would need to be done by |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1637 |
* ther lexical analyser (i.e. flex). But flex cannot do this |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1638 |
* sort of thing. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1639 |
* The solution I (Mario) adopted is to have flex return |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1640 |
* a real_token on (notice that exponent is no longer optional) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1641 |
* integer '.' integer exponent |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1642 |
* and to return a fixed_point_token when it finds |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1643 |
* integer '.' integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1644 |
* We now redefine real and fixed_point to be |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1645 |
* fixed_point: fixed_point_token | integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1646 |
* real: real_token | fixed_point_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1647 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1648 |
real: |
68 | 1649 |
real_token {$$ = new real_c($1, locloc(@$));} |
1650 |
| fixed_point_token {$$ = new real_c($1, locloc(@$));} |
|
1651 |
; |
|
1652 |
||
1653 |
integer: integer_token {$$ = new integer_c($1, locloc(@$));}; |
|
1654 |
binary_integer: binary_integer_token {$$ = new binary_integer_c($1, locloc(@$));}; |
|
1655 |
octal_integer: octal_integer_token {$$ = new octal_integer_c($1, locloc(@$));}; |
|
1656 |
hex_integer: hex_integer_token {$$ = new hex_integer_c($1, locloc(@$));}; |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1657 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1658 |
numeric_literal: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1659 |
integer_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1660 |
| real_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1661 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1662 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1663 |
/* helper symbol for non_negative_constant */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1664 |
non_negative_numeric_literal: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1665 |
integer_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1666 |
| non_negative_real_literal |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1667 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1668 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1669 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1670 |
integer_literal: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1671 |
integer_type_name '#' signed_integer |
68 | 1672 |
{$$ = new integer_literal_c($1, $3, locf(@1), locl(@3));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1673 |
| integer_type_name '#' binary_integer |
68 | 1674 |
{$$ = new integer_literal_c($1, $3, locf(@1), locl(@3));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1675 |
| integer_type_name '#' octal_integer |
68 | 1676 |
{$$ = new integer_literal_c($1, $3, locf(@1), locl(@3));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1677 |
| integer_type_name '#' hex_integer |
68 | 1678 |
{$$ = new integer_literal_c($1, $3, locf(@1), locl(@3));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1679 |
/* NOTE: see note in the definition of constant for reason |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1680 |
* why signed_integer, binary_integer, octal_integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1681 |
* and hex_integer are missing here! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1682 |
*/ |
131 | 1683 |
/* ERROR_CHECK_BEGIN */ |
1684 |
| integer_type_name signed_integer |
|
1685 |
{$$ = NULL; |
|
1686 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1687 |
print_err_msg(current_filename, locl(@1), locf(@2), "'#' missing between integer type name and value in integer literal."); |
131 | 1688 |
} |
1689 |
| integer_type_name binary_integer |
|
1690 |
{$$ = NULL; |
|
1691 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1692 |
print_err_msg(current_filename, locl(@1), locf(@2), "'#' missing between integer type name and value in integer literal."); |
131 | 1693 |
} |
1694 |
| integer_type_name octal_integer |
|
1695 |
{$$ = NULL; |
|
1696 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1697 |
print_err_msg(current_filename, locl(@1), locf(@2), "'#' missing between integer type name and value in integer literal."); |
131 | 1698 |
} |
1699 |
| integer_type_name hex_integer |
|
1700 |
{$$ = NULL; |
|
1701 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1702 |
print_err_msg(current_filename, locl(@1), locf(@2), "'#' missing between integer type name and value in integer literal."); |
131 | 1703 |
} |
1704 |
| integer_type_name error signed_integer |
|
1705 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1706 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '#' between integer type name and value in integer literal."); |
131 | 1707 |
yyerrok; |
1708 |
} |
|
1709 |
| integer_type_name error binary_integer |
|
1710 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1711 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '#' between integer type name and value in integer literal."); |
131 | 1712 |
yyerrok; |
1713 |
} |
|
1714 |
| integer_type_name error octal_integer |
|
1715 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1716 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '#' between integer type name and value in integer literal."); |
131 | 1717 |
yyerrok; |
1718 |
} |
|
1719 |
| integer_type_name error hex_integer |
|
1720 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1721 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '#' between integer type name and value in integer literal."); |
131 | 1722 |
yyerrok; |
1723 |
} |
|
1724 |
| integer_type_name '#' error |
|
1725 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1726 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid value for integer literal."); |
131 | 1727 |
yyerrok; |
1728 |
} |
|
1729 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1730 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1731 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1732 |
signed_integer: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1733 |
integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1734 |
| '+' integer {$$ = $2;} |
118
d4cf7ea933a4
Problem with negated literals while compiling generated C file on 32bits systems fixed
lbessard
parents:
98
diff
changeset
|
1735 |
| '-' integer {$$ = new neg_literal_c($2, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1736 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1737 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1738 |
/* a helper symbol for non_negative_constant */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1739 |
/* A integer without any preceding '-', but may |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1740 |
* include a preceding '+' ! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1741 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1742 |
non_negative_signed_integer: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1743 |
integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1744 |
| '+' integer {$$ = $2;} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1745 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1746 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1747 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1748 |
real_literal: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1749 |
signed_real |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1750 |
| real_type_name '#' signed_real |
68 | 1751 |
{$$ = new real_literal_c($1, $3, locf(@1), locl(@3));} |
131 | 1752 |
/* ERROR_CHECK_BEGIN */ |
1753 |
| real_type_name signed_real |
|
1754 |
{$$ = NULL; |
|
1755 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1756 |
print_err_msg(current_filename, locl(@1), locf(@2), "'#' missing between real type name and value in real literal."); |
131 | 1757 |
} |
1758 |
| real_type_name error signed_real |
|
1759 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1760 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '#' between real type name and value in real literal."); |
131 | 1761 |
yyerrok; |
1762 |
} |
|
1763 |
| real_type_name '#' error |
|
1764 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1765 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid value for real literal."); |
131 | 1766 |
yyerrok; |
1767 |
} |
|
1768 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1769 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1770 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1771 |
/* helper symbol for non_negative_numeric_literal */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1772 |
non_negative_real_literal: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1773 |
non_negative_signed_real |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1774 |
| real_type_name '#' signed_real |
68 | 1775 |
{$$ = new real_literal_c($1, $3, locf(@1), locl(@3));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1776 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1777 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1778 |
signed_real: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1779 |
real |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1780 |
| '+' real {$$ = $2;} |
118
d4cf7ea933a4
Problem with negated literals while compiling generated C file on 32bits systems fixed
lbessard
parents:
98
diff
changeset
|
1781 |
| '-' real {$$ = new neg_literal_c($2, locloc(@2));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1782 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1783 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1784 |
/* helper symbol for non_negative_real_literal */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1785 |
non_negative_signed_real: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1786 |
real |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1787 |
| '+' real {$$ = $2;} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1788 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1789 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1790 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1791 |
bit_string_literal: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1792 |
bit_string_type_name '#' integer /* i.e. unsigned_integer */ |
68 | 1793 |
{$$ = new bit_string_literal_c($1, $3, locf(@1), locl(@3));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1794 |
| bit_string_type_name '#' binary_integer |
68 | 1795 |
{$$ = new bit_string_literal_c($1, $3, locf(@1), locl(@3));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1796 |
| bit_string_type_name '#' octal_integer |
68 | 1797 |
{$$ = new bit_string_literal_c($1, $3, locf(@1), locl(@3));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1798 |
| bit_string_type_name '#' hex_integer |
68 | 1799 |
{$$ = new bit_string_literal_c($1, $3, locf(@1), locl(@3));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1800 |
/* NOTE: see note in the definition of constant for reason |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1801 |
* why unsigned_integer, binary_integer, octal_integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1802 |
* and hex_integer are missing here! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1803 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1804 |
/* NOTE: see note under the B 1.2.1 section of token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1805 |
* and grouping type definition for reason why the use of |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1806 |
* bit_string_type_name, although seemingly incorrect, is |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1807 |
* really correct here! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1808 |
*/ |
131 | 1809 |
/* ERROR_CHECK_BEGIN */ |
1810 |
| bit_string_type_name integer |
|
1811 |
{$$ = NULL; |
|
1812 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1813 |
print_err_msg(current_filename, locl(@1), locf(@2), "'#' missing between bit string type name and value in bit string literal."); |
131 | 1814 |
} |
1815 |
| bit_string_type_name binary_integer |
|
1816 |
{$$ = NULL; |
|
1817 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1818 |
print_err_msg(current_filename, locl(@1), locf(@2), "'#' missing between bit string type name and value in bit string literal."); |
131 | 1819 |
} |
1820 |
| bit_string_type_name octal_integer |
|
1821 |
{$$ = NULL; |
|
1822 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1823 |
print_err_msg(current_filename, locl(@1), locf(@2), "'#' missing between bit string type name and value in bit string literal."); |
131 | 1824 |
} |
1825 |
| bit_string_type_name hex_integer |
|
1826 |
{$$ = NULL; |
|
1827 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1828 |
print_err_msg(current_filename, locl(@1), locf(@2), "'#' missing between bit string type name and value in bit string literal."); |
131 | 1829 |
} |
1830 |
| bit_string_type_name error integer |
|
1831 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1832 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '#' between bit string type name and value in bit string literal."); |
131 | 1833 |
yyerrok; |
1834 |
} |
|
1835 |
| bit_string_type_name error binary_integer |
|
1836 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1837 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '#' between bit string type name and value in bit string literal."); |
131 | 1838 |
yyerrok; |
1839 |
} |
|
1840 |
| bit_string_type_name error octal_integer |
|
1841 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1842 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '#' between bit string type name and value in bit string literal."); |
131 | 1843 |
yyerrok; |
1844 |
} |
|
1845 |
| bit_string_type_name error hex_integer |
|
1846 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1847 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '#' between bit string type name and value in bit string literal."); |
131 | 1848 |
yyerrok; |
1849 |
} |
|
1850 |
| bit_string_type_name '#' error |
|
1851 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1852 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid value for bit string literal."); |
131 | 1853 |
yyerrok; |
1854 |
} |
|
1855 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1856 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1857 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1858 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1859 |
boolean_literal: |
68 | 1860 |
TRUE {$$ = new boolean_literal_c(new bool_type_name_c(locloc(@$)), |
1861 |
new boolean_true_c(locloc(@$)), |
|
1862 |
locloc(@$));} |
|
1863 |
| FALSE {$$ = new boolean_literal_c(new bool_type_name_c(locloc(@$)), |
|
1864 |
new boolean_false_c(locloc(@$)), |
|
1865 |
locloc(@$));} |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1866 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1867 |
| BOOL '#' '1' {} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1868 |
| BOOL '#' '0' {} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1869 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1870 |
/* NOTE: the rules |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1871 |
* BOOL '#' '1' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1872 |
* and |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1873 |
* BOOL '#' '0' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1874 |
* do not work as expected... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1875 |
* Consider that we are using 'BOOL' and '#' as tokens |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1876 |
* that flex hands over to bison (yacc). Because flex would |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1877 |
* then parse the single '1' or '0' as an integer, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1878 |
* the rule in bison would have to be |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1879 |
* BOOL '#' integer, followed by verifying of the |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1880 |
* integer has the correct value! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1881 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1882 |
* We therefore have flex return TRUE whenever it |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1883 |
* comes across 'TRUE' or 'BOOL#1', and FALSE whenever |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1884 |
* it comes across 'FALSE' or 'BOOL#0'. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1885 |
* Note that this means that flex will parse "BOOL#01" |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1886 |
* as FALSE followed by an integer ('1'). |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1887 |
* Bison should detect this as an error, so we should |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1888 |
* be OK. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1889 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1890 |
* Another option would be to change the rules to accept |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1891 |
* BOOL '#' integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1892 |
* but then check whether the integer has a correct |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1893 |
* value! At the moment I feel that the first option |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1894 |
* is more straight forward. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1895 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1896 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1897 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1898 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1899 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1900 |
/*******************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1901 |
/* B 1.2.2 - Character Strings */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1902 |
/*******************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1903 |
/* Transform the tokens given us by flex into leafs */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1904 |
single_byte_character_string: single_byte_character_string_token |
68 | 1905 |
{$$ = new single_byte_character_string_c($1, locloc(@$));}; |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1906 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1907 |
double_byte_character_string: double_byte_character_string_token |
68 | 1908 |
{$$ = new double_byte_character_string_c($1, locloc(@$));}; |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1909 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1910 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1911 |
character_string: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1912 |
single_byte_character_string |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1913 |
| double_byte_character_string |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1914 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1915 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1916 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1917 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1918 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1919 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1920 |
/***************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1921 |
/* B 1.2.3 - Time Literals */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1922 |
/***************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1923 |
time_literal: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1924 |
time_of_day |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1925 |
| date |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1926 |
| date_and_time |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1927 |
| duration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1928 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1929 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1930 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1931 |
/************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1932 |
/* B 1.2.3.1 - Duration */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1933 |
/************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1934 |
duration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1935 |
/* (T | TIME) '#' ['-'] interval */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1936 |
/* NOTE: since TIME is also a data type, it is a keyword |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1937 |
* and may therefore be handled by a token. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1938 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1939 |
* Unfortunately T is not a data type, and therefore |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1940 |
* not a keyword. This means that we may have variables named T! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1941 |
* Flex cannot return the token TIME when it comes across a single T! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1942 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1943 |
* We therefore have flex returning the token T_SHARP |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1944 |
* when it comes across 'T#' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1945 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1946 |
TIME '#' interval |
68 | 1947 |
{$$ = new duration_c(NULL, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1948 |
| TIME '#' '-' interval |
68 | 1949 |
{$$ = new duration_c(new neg_time_c(locloc(@$)), $4, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1950 |
| T_SHARP interval |
68 | 1951 |
{$$ = new duration_c(NULL, $2, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1952 |
| T_SHARP '-' interval |
68 | 1953 |
{$$ = new duration_c(new neg_time_c(locloc(@$)), $3, locloc(@$));} |
131 | 1954 |
/* ERROR_CHECK_BEGIN */ |
1955 |
| TIME interval |
|
1956 |
{$$ = NULL; |
|
1957 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1958 |
print_err_msg(current_filename, locl(@1), locf(@2), "'#' missing between 'TIME' and interval in duration."); |
131 | 1959 |
} |
1960 |
| TIME '-' interval |
|
1961 |
{$$ = NULL; |
|
1962 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1963 |
print_err_msg(current_filename, locl(@1), locf(@2), "'#' missing between 'TIME' and interval in duration."); |
131 | 1964 |
} |
1965 |
| TIME error interval |
|
1966 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1967 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '#' between 'TIME' and interval in duration."); |
131 | 1968 |
yyerrok; |
1969 |
} |
|
1970 |
| TIME error '-' interval |
|
1971 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1972 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '#' between 'TIME' and interval in duration."); |
131 | 1973 |
yyerrok; |
1974 |
} |
|
1975 |
| TIME '#' error |
|
1976 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1977 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid value for duration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1978 |
yyerrok; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1979 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1980 |
| T_SHARP error |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
1981 |
{$$ = NULL; |
131 | 1982 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid value for duration."); |
1983 |
yyerrok; |
|
1984 |
} |
|
1985 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1986 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1987 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1988 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1989 |
interval: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1990 |
days |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1991 |
| hours |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1992 |
| minutes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1993 |
| seconds |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1994 |
| milliseconds |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1995 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
1996 |
|
68 | 1997 |
integer_d: integer_d_token {$$ = new integer_c($1, locloc(@$));}; |
1998 |
integer_h: integer_h_token {$$ = new integer_c($1, locloc(@$));}; |
|
1999 |
integer_m: integer_m_token {$$ = new integer_c($1, locloc(@$));}; |
|
2000 |
integer_s: integer_s_token {$$ = new integer_c($1, locloc(@$));}; |
|
2001 |
integer_ms: integer_ms_token {$$ = new integer_c($1, locloc(@$));}; |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2002 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2003 |
fixed_point_d: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2004 |
fixed_point_d_token |
68 | 2005 |
{$$ = new fixed_point_c($1, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2006 |
| integer_d |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2007 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2008 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2009 |
fixed_point_h: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2010 |
fixed_point_h_token |
68 | 2011 |
{$$ = new fixed_point_c($1, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2012 |
| integer_h |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2013 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2014 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2015 |
fixed_point_m: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2016 |
fixed_point_m_token |
68 | 2017 |
{$$ = new fixed_point_c($1, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2018 |
| integer_m |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2019 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2020 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2021 |
fixed_point_s: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2022 |
fixed_point_s_token |
68 | 2023 |
{$$ = new fixed_point_c($1, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2024 |
| integer_s |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2025 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2026 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2027 |
fixed_point_ms: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2028 |
fixed_point_ms_token |
68 | 2029 |
{$$ = new fixed_point_c($1, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2030 |
| integer_ms |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2031 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2032 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2033 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2034 |
fixed_point: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2035 |
fixed_point_token |
68 | 2036 |
{$$ = new fixed_point_c($1, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2037 |
| integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2038 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2039 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2040 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2041 |
days: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2042 |
/* fixed_point ('d') */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2043 |
fixed_point_d |
68 | 2044 |
{$$ = new days_c($1, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2045 |
/*| integer ('d') ['_'] hours */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2046 |
| integer_d hours |
68 | 2047 |
{$$ = new days_c($1, $2, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2048 |
| integer_d '_' hours |
68 | 2049 |
{$$ = new days_c($1, $3, locloc(@$));} |
131 | 2050 |
/* ERROR_CHECK_BEGIN */ |
2051 |
| integer_d '_' error |
|
2052 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2053 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid value for hours in duration."); |
131 | 2054 |
yyerrok; |
2055 |
} |
|
2056 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2057 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2058 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2059 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2060 |
hours: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2061 |
/* fixed_point ('h') */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2062 |
fixed_point_h |
68 | 2063 |
{$$ = new hours_c($1, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2064 |
/*| integer ('h') ['_'] minutes */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2065 |
| integer_h minutes |
68 | 2066 |
{$$ = new hours_c($1, $2, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2067 |
| integer_h '_' minutes |
68 | 2068 |
{$$ = new hours_c($1, $3, locloc(@$));} |
131 | 2069 |
/* ERROR_CHECK_BEGIN */ |
2070 |
| integer_h '_' error |
|
2071 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2072 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid value for minutes in duration."); |
131 | 2073 |
yyerrok; |
2074 |
} |
|
2075 |
/* ERROR_CHECK_END */ |
|
2076 |
||
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2077 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2078 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2079 |
minutes: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2080 |
/* fixed_point ('m') */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2081 |
fixed_point_m |
68 | 2082 |
{$$ = new minutes_c($1, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2083 |
/*| integer ('m') ['_'] seconds */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2084 |
| integer_m seconds |
68 | 2085 |
{$$ = new minutes_c($1, $2, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2086 |
| integer_m '_' seconds |
68 | 2087 |
{$$ = new minutes_c($1, $3, locloc(@$));} |
131 | 2088 |
/* ERROR_CHECK_BEGIN */ |
2089 |
| integer_m '_' error |
|
2090 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2091 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid value for seconds in duration."); |
131 | 2092 |
yyerrok; |
2093 |
} |
|
2094 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2095 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2096 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2097 |
seconds: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2098 |
/* fixed_point ('s') */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2099 |
fixed_point_s |
68 | 2100 |
{$$ = new seconds_c($1, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2101 |
/*| integer ('s') ['_'] milliseconds */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2102 |
| integer_s milliseconds |
68 | 2103 |
{$$ = new seconds_c($1, $2, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2104 |
| integer_s '_' milliseconds |
68 | 2105 |
{$$ = new seconds_c($1, $3, locloc(@$));} |
131 | 2106 |
/* ERROR_CHECK_BEGIN */ |
2107 |
| integer_s '_' error |
|
2108 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2109 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid value for milliseconds in duration."); |
131 | 2110 |
yyerrok; |
2111 |
} |
|
2112 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2113 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2114 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2115 |
milliseconds: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2116 |
/* fixed_point ('ms') */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2117 |
fixed_point_ms |
68 | 2118 |
{$$ = new milliseconds_c($1, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2119 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2120 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2121 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2122 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2123 |
/************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2124 |
/* B 1.2.3.2 - Time of day and Date */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2125 |
/************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2126 |
time_of_day: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2127 |
TIME_OF_DAY '#' daytime |
68 | 2128 |
{$$ = new time_of_day_c($3, locloc(@$));} |
131 | 2129 |
/* ERROR_CHECK_BEGIN */ |
2130 |
| TIME_OF_DAY daytime |
|
2131 |
{$$ = NULL; |
|
2132 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2133 |
print_err_msg(current_filename, locl(@1), locf(@2), "'#' missing between 'TIME_OF_DAY' and daytime in time of day."); |
131 | 2134 |
} |
2135 |
| TIME_OF_DAY error daytime |
|
2136 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2137 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '#' between 'TIME_OF_DAY' and daytime in time of day."); |
131 | 2138 |
yyerrok; |
2139 |
} |
|
2140 |
| TIME_OF_DAY '#' error |
|
2141 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2142 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid value for time of day."); |
131 | 2143 |
yyerrok; |
2144 |
} |
|
2145 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2146 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2147 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2148 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2149 |
daytime: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2150 |
day_hour ':' day_minute ':' day_second |
68 | 2151 |
{$$ = new daytime_c($1, $3, $5, locloc(@$));} |
131 | 2152 |
/* ERROR_CHECK_BEGIN */ |
2153 |
| day_hour day_minute ':' day_second |
|
2154 |
{$$ = NULL; |
|
2155 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2156 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between hours and minutes in daytime."); |
131 | 2157 |
} |
2158 |
| day_hour error day_minute ':' day_second |
|
2159 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2160 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting ':' between hours and minutes in daytime."); |
131 | 2161 |
yyerrok; |
2162 |
} |
|
2163 |
| day_hour ':' ':' day_second |
|
2164 |
{$$ = NULL; |
|
2165 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2166 |
print_err_msg(current_filename, locl(@2), locf(@3), "no minutes defined in daytime."); |
131 | 2167 |
} |
2168 |
| day_hour ':' error ':' day_second |
|
2169 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2170 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid value for minutes in daytime."); |
131 | 2171 |
yyerrok; |
2172 |
} |
|
2173 |
| day_hour ':' day_minute day_second |
|
2174 |
{$$ = NULL; |
|
2175 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2176 |
print_err_msg(current_filename, locl(@3), locf(@4), "':' missing between minutes and seconds in daytime."); |
131 | 2177 |
} |
2178 |
| day_hour ':' day_minute error day_second |
|
2179 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2180 |
print_err_msg(current_filename, locf(@4), locl(@4), "expecting ':' between minutes and seconds in daytime."); |
131 | 2181 |
yyerrok; |
2182 |
} |
|
2183 |
| day_hour ':' day_minute ':' error |
|
2184 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2185 |
print_err_msg(current_filename, locf(@5), locl(@5), "invalid value for seconds in daytime."); |
131 | 2186 |
yyerrok; |
2187 |
} |
|
2188 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2189 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2190 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2191 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2192 |
day_hour: integer; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2193 |
day_minute: integer; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2194 |
day_second: fixed_point; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2195 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2196 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2197 |
date: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2198 |
DATE '#' date_literal |
68 | 2199 |
{$$ = new date_c($3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2200 |
| D_SHARP date_literal |
68 | 2201 |
{$$ = new date_c($2, locloc(@$));} |
131 | 2202 |
/* ERROR_CHECK_BEGIN */ |
2203 |
| DATE date_literal |
|
2204 |
{$$ = NULL; |
|
2205 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2206 |
print_err_msg(current_filename, locl(@1), locf(@2), "'#' missing between 'DATE' and date literal in date."); |
131 | 2207 |
} |
2208 |
| DATE error date_literal |
|
2209 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2210 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '#' between 'DATE' and date literal in date."); |
131 | 2211 |
yyerrok; |
2212 |
} |
|
2213 |
| DATE '#' error |
|
2214 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2215 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid value for date."); |
131 | 2216 |
yyerrok; |
2217 |
} |
|
2218 |
| D_SHARP error |
|
2219 |
{$$ = NULL; |
|
2220 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid value for date."); |
|
2221 |
yyerrok; |
|
2222 |
} |
|
2223 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2224 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2225 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2226 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2227 |
date_literal: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2228 |
year '-' month '-' day |
68 | 2229 |
{$$ = new date_literal_c($1, $3, $5, locloc(@$));} |
131 | 2230 |
/* ERROR_CHECK_BEGIN */ |
2231 |
| year month '-' day |
|
2232 |
{$$ = NULL; |
|
2233 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2234 |
print_err_msg(current_filename, locl(@1), locf(@2), "'-' missing between year and month in date literal."); |
131 | 2235 |
} |
2236 |
| year error month '-' day |
|
2237 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2238 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '-' between year and month in date literal."); |
131 | 2239 |
yyerrok; |
2240 |
} |
|
2241 |
| year '-' '-' day |
|
2242 |
{$$ = NULL; |
|
2243 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2244 |
print_err_msg(current_filename, locl(@2), locf(@3), "no month defined in date literal."); |
131 | 2245 |
} |
2246 |
| year '-' error '-' day |
|
2247 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2248 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid value for month in date literal."); |
131 | 2249 |
yyerrok; |
2250 |
} |
|
2251 |
| year '-' month day |
|
2252 |
{$$ = NULL; |
|
2253 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2254 |
print_err_msg(current_filename, locl(@3), locf(@4), "':' missing between month and day in date literal."); |
131 | 2255 |
} |
2256 |
| year ':' month error day |
|
2257 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2258 |
print_err_msg(current_filename, locf(@4), locl(@4), "expecting ':' between month and day in date literal."); |
131 | 2259 |
yyerrok; |
2260 |
} |
|
2261 |
| year ':' month ':' error |
|
2262 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2263 |
print_err_msg(current_filename, locf(@5), locl(@5), "invalid value for day in date literal."); |
131 | 2264 |
yyerrok; |
2265 |
} |
|
2266 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2267 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2268 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2269 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2270 |
year: integer; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2271 |
month: integer; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2272 |
day: integer; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2273 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2274 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2275 |
date_and_time: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2276 |
DATE_AND_TIME '#' date_literal '-' daytime |
68 | 2277 |
{$$ = new date_and_time_c($3, $5, locloc(@$));} |
131 | 2278 |
/* ERROR_CHECK_BEGIN */ |
2279 |
| DATE_AND_TIME date_literal '-' daytime |
|
2280 |
{$$ = NULL; |
|
2281 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2282 |
print_err_msg(current_filename, locl(@1), locf(@2), "'#' missing between 'DATE_AND_TIME' and date literal in date and time."); |
131 | 2283 |
} |
2284 |
| DATE_AND_TIME error date_literal '-' daytime |
|
2285 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2286 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '#' between 'DATE_AND_TIME' and date literal in date and time."); |
131 | 2287 |
yyerrok; |
2288 |
} |
|
2289 |
| DATE_AND_TIME '#' '-' daytime |
|
2290 |
{$$ = NULL; |
|
2291 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2292 |
print_err_msg(current_filename, locl(@2), locf(@3), "no value defined for date literal in date and time."); |
131 | 2293 |
} |
2294 |
| DATE_AND_TIME '#' error '-' daytime |
|
2295 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2296 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid value for date literal in date and time."); |
131 | 2297 |
yyerrok; |
2298 |
} |
|
2299 |
| DATE_AND_TIME '#' date_literal daytime |
|
2300 |
{$$ = NULL; |
|
2301 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2302 |
print_err_msg(current_filename, locl(@3), locf(@4), "'-' missing between date literal and daytime in date and time."); |
131 | 2303 |
} |
2304 |
| DATE_AND_TIME '#' date_literal error daytime |
|
2305 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2306 |
print_err_msg(current_filename, locf(@4), locl(@4), "expecting '-' between date literal and daytime in date and time."); |
131 | 2307 |
yyerrok; |
2308 |
} |
|
2309 |
| DATE_AND_TIME '#' date_literal '-' error |
|
2310 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2311 |
print_err_msg(current_filename, locf(@5), locl(@5), "invalid value for daytime in date and time."); |
131 | 2312 |
yyerrok; |
2313 |
} |
|
2314 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2315 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2316 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2317 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2318 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2319 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2320 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2321 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2322 |
/**********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2323 |
/* B 1.3 - Data Types */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2324 |
/**********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2325 |
/* Strangely, the following symbol does seem to be required! */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2326 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2327 |
data_type_name: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2328 |
non_generic_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2329 |
| generic_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2330 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2331 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2332 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2333 |
non_generic_type_name: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2334 |
elementary_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2335 |
| derived_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2336 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2337 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2338 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2339 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2340 |
/***********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2341 |
/* B 1.3.1 - Elementary Data Types */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2342 |
/***********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2343 |
elementary_type_name: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2344 |
numeric_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2345 |
| date_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2346 |
| bit_string_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2347 |
| elementary_string_type_name |
68 | 2348 |
| TIME {$$ = new time_type_name_c(locloc(@$));} |
2349 |
| BOOL {$$ = new bool_type_name_c(locloc(@$));} |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2350 |
/* NOTE: see note under the B 1.2.1 section of token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2351 |
* and grouping type definition for reason why BOOL |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2352 |
* was added to this definition. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2353 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2354 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2355 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2356 |
numeric_type_name: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2357 |
integer_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2358 |
| real_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2359 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2360 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2361 |
integer_type_name: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2362 |
signed_integer_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2363 |
| unsigned_integer_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2364 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2365 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2366 |
signed_integer_type_name: |
68 | 2367 |
SINT {$$ = new sint_type_name_c(locloc(@$));} |
2368 |
| INT {$$ = new int_type_name_c(locloc(@$));} |
|
2369 |
| DINT {$$ = new dint_type_name_c(locloc(@$));} |
|
2370 |
| LINT {$$ = new lint_type_name_c(locloc(@$));} |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2371 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2372 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2373 |
unsigned_integer_type_name: |
68 | 2374 |
USINT {$$ = new usint_type_name_c(locloc(@$));} |
2375 |
| UINT {$$ = new uint_type_name_c(locloc(@$));} |
|
2376 |
| UDINT {$$ = new udint_type_name_c(locloc(@$));} |
|
2377 |
| ULINT {$$ = new ulint_type_name_c(locloc(@$));} |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2378 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2379 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2380 |
real_type_name: |
68 | 2381 |
REAL {$$ = new real_type_name_c(locloc(@$));} |
2382 |
| LREAL {$$ = new lreal_type_name_c(locloc(@$));} |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2383 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2384 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2385 |
date_type_name: |
68 | 2386 |
DATE {$$ = new date_type_name_c(locloc(@$));} |
2387 |
| TIME_OF_DAY {$$ = new tod_type_name_c(locloc(@$));} |
|
2388 |
| TOD {$$ = new tod_type_name_c(locloc(@$));} |
|
2389 |
| DATE_AND_TIME {$$ = new dt_type_name_c(locloc(@$));} |
|
2390 |
| DT {$$ = new dt_type_name_c(locloc(@$));} |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2391 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2392 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2393 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2394 |
bit_string_type_name: |
68 | 2395 |
BYTE {$$ = new byte_type_name_c(locloc(@$));} |
2396 |
| WORD {$$ = new word_type_name_c(locloc(@$));} |
|
2397 |
| DWORD {$$ = new dword_type_name_c(locloc(@$));} |
|
2398 |
| LWORD {$$ = new lword_type_name_c(locloc(@$));} |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2399 |
/* NOTE: see note under the B 1.2.1 section of token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2400 |
* and grouping type definition for reason why the BOOL |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2401 |
* was omitted from this definition. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2402 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2403 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2404 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2405 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2406 |
/* Helper symbol to concentrate the instantiation |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2407 |
* of STRING and WSTRING into a single location. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2408 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2409 |
* These two elements show up in several other rules, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2410 |
* but we want to create the equivalent abstract syntax |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2411 |
* in a single location of this file, in order to make |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2412 |
* possible future changes easier to edit... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2413 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2414 |
elementary_string_type_name: |
68 | 2415 |
STRING {$$ = new string_type_name_c(locloc(@$));} |
2416 |
| WSTRING {$$ = new wstring_type_name_c(locloc(@$));} |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2417 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2418 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2419 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2420 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2421 |
/********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2422 |
/* B 1.3.2 - Generic data types */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2423 |
/********************************/ |
68 | 2424 |
/* Strangely, the following symbol does not seem to be required! */ |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2425 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2426 |
generic_type_name: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2427 |
ANY |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2428 |
| ANY_DERIVED |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2429 |
| ANY_ELEMENTARY |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2430 |
| ANY_MAGNITUDE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2431 |
| ANY_NUM |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2432 |
| ANY_REAL |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2433 |
| ANY_INT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2434 |
| ANY_BIT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2435 |
| ANY_STRING |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2436 |
| ANY_DATE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2437 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2438 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2439 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2440 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2441 |
/********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2442 |
/* B 1.3.3 - Derived data types */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2443 |
/********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2444 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2445 |
derived_type_name: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2446 |
single_element_type_name |
68 | 2447 |
| prev_declared_array_type_name |
2448 |
| prev_declared_structure_type_name |
|
2449 |
| prev_declared_string_type_name |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2450 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2451 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2452 |
single_element_type_name: |
68 | 2453 |
prev_declared_simple_type_name |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2454 |
/* Include the following if arrays of function blocks are to be allowed! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2455 |
* Since the standard does not allow them, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2456 |
* we leave it commented out for the time being... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2457 |
*/ |
68 | 2458 |
//| prev_declared_derived_function_block_name |
2459 |
| prev_declared_subrange_type_name |
|
2460 |
| prev_declared_enumerated_type_name |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2461 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2462 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2463 |
/* NOTE: in order to remove a reduce/reduce conflict, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2464 |
* all occurences of simple_type_name, etc... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2465 |
* have been replaced with identifier! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2466 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2467 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2468 |
simple_type_name: identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2469 |
subrange_type_name: identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2470 |
enumerated_type_name: identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2471 |
array_type_name: identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2472 |
structure_type_name: identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2473 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2474 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2475 |
data_type_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2476 |
TYPE type_declaration_list END_TYPE |
68 | 2477 |
{$$ = new data_type_declaration_c($2, locloc(@$));} |
131 | 2478 |
/* ERROR_CHECK_BEGIN */ |
2479 |
| TYPE END_TYPE |
|
2480 |
{$$ = NULL; |
|
2481 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2482 |
print_err_msg(current_filename, locl(@1), locf(@2), "no data type declared in data type(s) declaration."); |
131 | 2483 |
} |
2484 |
| TYPE error type_declaration_list END_TYPE |
|
2485 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2486 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected token after 'TYPE' in data type(s) declaration."); |
131 | 2487 |
yyerrok; |
2488 |
} |
|
2489 |
| TYPE error END_TYPE |
|
2490 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2491 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in data type(s) declaration."); |
131 | 2492 |
yyerrok; |
2493 |
} |
|
2494 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2495 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2496 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2497 |
/* helper symbol for data_type_declaration */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2498 |
type_declaration_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2499 |
type_declaration ';' |
68 | 2500 |
{$$ = new type_declaration_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2501 |
| type_declaration_list type_declaration ';' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2502 |
{$$ = $1; $$->add_element($2);} |
131 | 2503 |
/* ERROR_CHECK_BEGIN */ |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2504 |
| error ';' |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2505 |
{$$ = new type_declaration_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2506 |
print_err_msg(current_filename, locf(@1), locl(@1), "invalid data type declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2507 |
yyerrok; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2508 |
} |
131 | 2509 |
| type_declaration error |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2510 |
{$$ = new type_declaration_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2511 |
print_err_msg(current_filename, locl(@1), locf(@2), "';' missing at end of data type declaration."); |
131 | 2512 |
yyerrok; |
2513 |
} |
|
2514 |
| type_declaration_list type_declaration error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2515 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2516 |
print_err_msg(current_filename, locl(@2), locf(@3), "';' missing at end of data type declaration."); |
131 | 2517 |
yyerrok; |
2518 |
} |
|
133 | 2519 |
| type_declaration_list error ';' |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2520 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2521 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid data type declaration."); |
133 | 2522 |
yyerrok; |
2523 |
} |
|
131 | 2524 |
| type_declaration_list ';' |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2525 |
{$$ = $1; |
131 | 2526 |
yynerrs++; |
2527 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after data type declaration."); |
|
2528 |
} |
|
2529 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2530 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2531 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2532 |
type_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2533 |
single_element_type_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2534 |
| array_type_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2535 |
| structure_type_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2536 |
| string_type_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2537 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2538 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2539 |
single_element_type_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2540 |
simple_type_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2541 |
| subrange_type_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2542 |
| enumerated_type_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2543 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2544 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2545 |
simple_type_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2546 |
/* simple_type_name ':' simple_spec_init */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2547 |
identifier ':' simple_spec_init |
68 | 2548 |
{$$ = new simple_type_declaration_c($1, $3, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2549 |
library_element_symtable.insert($1, prev_declared_simple_type_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2550 |
} |
131 | 2551 |
/* ERROR_CHECK_BEGIN */ |
2552 |
| identifier simple_spec_init |
|
2553 |
{$$ = NULL; |
|
2554 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2555 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between data type name and specification in simple type declaration."); |
131 | 2556 |
} |
2557 |
| identifier ':' identifier |
|
2558 |
{$$ = NULL; |
|
2559 |
yynerrs++; |
|
2560 |
print_err_msg(current_filename, locf(@3), locl(@3), "unknown data type defined in specification for data type declaration."); |
|
2561 |
} |
|
2562 |
| identifier ':' error |
|
2563 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2564 |
print_err_msg(current_filename, locf(@3), locl(@3), "no specification defined in data type declaration."); |
131 | 2565 |
yyerrok; |
2566 |
} |
|
2567 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2568 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2569 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2570 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2571 |
simple_spec_init: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2572 |
simple_specification |
68 | 2573 |
/* The following commented line was changed to the |
2574 |
* next two lines so that we wouldn't |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2575 |
* have the first element of a simple_spec_init_c() |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2576 |
* pointing to another simple_spec_init_c! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2577 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2578 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2579 |
| simple_specification ASSIGN constant |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2580 |
{$$ = new simple_spec_init_c($1, $3);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2581 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2582 |
| elementary_type_name ASSIGN constant |
68 | 2583 |
{$$ = new simple_spec_init_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2584 |
| prev_declared_simple_type_name ASSIGN constant |
68 | 2585 |
{$$ = new simple_spec_init_c($1, $3, locloc(@$));} |
131 | 2586 |
/* ERROR_CHECK_BEGIN */ |
2587 |
| elementary_type_name constant |
|
2588 |
{$$ = NULL; |
|
2589 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2590 |
print_err_msg(current_filename, locl(@1), locf(@2), "':=' missing in specification with initialization."); |
131 | 2591 |
} |
2592 |
| prev_declared_simple_type_name constant |
|
2593 |
{$$ = NULL; |
|
2594 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2595 |
print_err_msg(current_filename, locl(@1), locf(@2), "':=' missing in specification with initialization."); |
131 | 2596 |
} |
2597 |
| identifier ASSIGN constant |
|
2598 |
{$$ = NULL; |
|
2599 |
yynerrs++; |
|
2600 |
print_err_msg(current_filename, locf(@1), locl(@1), "unknown type defined in specification."); |
|
2601 |
} |
|
2602 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2603 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2604 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2605 |
/* When converting to C/C++, we need to know whether |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2606 |
* the elementary_type_name is being used in a variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2607 |
* declaration or elsewhere (ex. declaration of a derived |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2608 |
* type), so the abstract syntax has the elementary_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2609 |
* wrapped inside a simple_spec_init_c. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2610 |
* The exact same thing occurs with prev_declared_simple_type_name. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2611 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2612 |
* This is why in the definition of simple_spec_init, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2613 |
* simple_specification was brocken up into its |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2614 |
* constituent components... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2615 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2616 |
simple_specification: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2617 |
// elementary_type_name | simple_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2618 |
elementary_type_name |
68 | 2619 |
{$$ = new simple_spec_init_c($1, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2620 |
| prev_declared_simple_type_name |
68 | 2621 |
{$$ = new simple_spec_init_c($1, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2622 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2623 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2624 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2625 |
subrange_type_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2626 |
/* subrange_type_name ':' subrange_spec_init */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2627 |
identifier ':' subrange_spec_init |
68 | 2628 |
{$$ = new subrange_type_declaration_c($1, $3, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2629 |
library_element_symtable.insert($1, prev_declared_subrange_type_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2630 |
} |
131 | 2631 |
/* ERROR_CHECK_BEGIN */ |
2632 |
| identifier subrange_spec_init |
|
2633 |
{$$ = NULL; |
|
2634 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2635 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between data type name and specification in subrange type declaration."); |
131 | 2636 |
} |
2637 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2638 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2639 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2640 |
subrange_spec_init: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2641 |
subrange_specification |
68 | 2642 |
{$$ = new subrange_spec_init_c($1, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2643 |
| subrange_specification ASSIGN signed_integer |
68 | 2644 |
{$$ = new subrange_spec_init_c($1, $3, locloc(@$));} |
131 | 2645 |
/* ERROR_CHECK_BEGIN */ |
2646 |
| subrange_specification signed_integer |
|
2647 |
{$$ = NULL; |
|
2648 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2649 |
print_err_msg(current_filename, locl(@1), locf(@2), "':=' missing in subrange specification with initialization."); |
131 | 2650 |
} |
2651 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2652 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2653 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2654 |
subrange_specification: |
131 | 2655 |
integer_type_name '(' subrange ')' |
68 | 2656 |
{$$ = new subrange_specification_c($1, $3, locloc(@$));} |
2657 |
| prev_declared_subrange_type_name |
|
98 | 2658 |
{$$ = new subrange_specification_c($1, NULL, locloc(@$));} |
131 | 2659 |
/* ERROR_CHECK_BEGIN */ |
2660 |
| integer_type_name '(' ')' |
|
2661 |
{$$ = NULL; |
|
2662 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2663 |
print_err_msg(current_filename, locl(@2), locf(@3), "no subrange defined in subrange specification."); |
131 | 2664 |
} |
2665 |
| integer_type_name '(' error ')' |
|
2666 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2667 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid subrange defined in subrange specification."); |
131 | 2668 |
yyerrok; |
2669 |
} |
|
2670 |
| integer_type_name '(' subrange error |
|
2671 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2672 |
print_err_msg(current_filename, locl(@3), locf(@4), "')' missing after subrange defined in subrange specification."); |
131 | 2673 |
yyerrok; |
2674 |
} |
|
2675 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2676 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2677 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2678 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2679 |
subrange: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2680 |
signed_integer DOTDOT signed_integer |
68 | 2681 |
{$$ = new subrange_c($1, $3, locloc(@$));} |
131 | 2682 |
/* ERROR_CHECK_BEGIN */ |
2683 |
| signed_integer signed_integer |
|
2684 |
{$$ = NULL; |
|
2685 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2686 |
print_err_msg(current_filename, locl(@1), locf(@2), "'..' missing between bounds in subrange definition."); |
131 | 2687 |
} |
2688 |
| signed_integer error signed_integer |
|
2689 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2690 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '..' between bounds in subrange definition."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2691 |
yyerrok; |
131 | 2692 |
} |
2693 |
| signed_integer DOTDOT error |
|
2694 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2695 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid value for upper bound in subrange definition."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2696 |
yyerrok; |
131 | 2697 |
} |
2698 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2699 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2700 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2701 |
enumerated_type_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2702 |
/* enumerated_type_name ':' enumerated_spec_init */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2703 |
identifier ':' enumerated_spec_init |
68 | 2704 |
{$$ = new enumerated_type_declaration_c($1, $3, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2705 |
library_element_symtable.insert($1, prev_declared_enumerated_type_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2706 |
} |
131 | 2707 |
/* ERROR_CHECK_BEGIN */ |
2708 |
| identifier enumerated_spec_init |
|
2709 |
{$$ = NULL; |
|
2710 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2711 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between data type name and specification in enumerated type declaration."); |
131 | 2712 |
} |
2713 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2714 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2715 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2716 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2717 |
enumerated_spec_init: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2718 |
enumerated_specification |
68 | 2719 |
{$$ = new enumerated_spec_init_c($1, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2720 |
| enumerated_specification ASSIGN enumerated_value |
68 | 2721 |
{$$ = new enumerated_spec_init_c($1, $3, locloc(@$));} |
131 | 2722 |
/* ERROR_CHECK_BEGIN */ |
2723 |
| enumerated_specification enumerated_value |
|
2724 |
{$$ = NULL; |
|
2725 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2726 |
print_err_msg(current_filename, locl(@1), locf(@2), "':=' missing in enumerated specification with initialization."); |
131 | 2727 |
} |
2728 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2729 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2730 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2731 |
enumerated_specification: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2732 |
'(' enumerated_value_list ')' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2733 |
{$$ = $2;} |
68 | 2734 |
| prev_declared_enumerated_type_name |
131 | 2735 |
/* ERROR_CHECK_BEGIN */ |
2736 |
| '(' ')' |
|
2737 |
{$$ = NULL; |
|
2738 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2739 |
print_err_msg(current_filename, locl(@1), locf(@2), "no enumerated value list defined in enumerated specification."); |
131 | 2740 |
} |
2741 |
| '(' error ')' |
|
2742 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2743 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid enumerated value list defined in enumerated specification."); |
131 | 2744 |
yyerrok; |
2745 |
} |
|
2746 |
| '(' enumerated_value_list error |
|
2747 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2748 |
print_err_msg(current_filename, locl(@2), locf(@3), "')' missing at the end of enumerated specification."); |
131 | 2749 |
yyerrok; |
2750 |
} |
|
2751 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2752 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2753 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2754 |
/* helper symbol for enumerated_specification */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2755 |
enumerated_value_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2756 |
enumerated_value |
68 | 2757 |
{$$ = new enumerated_value_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2758 |
| enumerated_value_list ',' enumerated_value |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2759 |
{$$ = $1; $$->add_element($3);} |
131 | 2760 |
/* ERROR_CHECK_BEGIN */ |
2761 |
| enumerated_value_list enumerated_value |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2762 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2763 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2764 |
print_err_msg(current_filename, locl(@1), locf(@2), "',' missing in enumerated value list."); |
131 | 2765 |
} |
2766 |
| enumerated_value_list ',' error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2767 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2768 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid value in enumerated value list."); |
131 | 2769 |
yyerrok; |
2770 |
} |
|
2771 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2772 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2773 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2774 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2775 |
enumerated_value: |
85 | 2776 |
identifier |
121
9e8ce092e169
Adding support for POU struct definition in POUS.h
lbessard
parents:
118
diff
changeset
|
2777 |
{$$ = new enumerated_value_c(NULL, $1, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2778 |
| prev_declared_enumerated_type_name '#' any_identifier |
68 | 2779 |
{$$ = new enumerated_value_c($1, $3, locloc(@$));} |
131 | 2780 |
/* ERROR_CHECK_BEGIN */ |
2781 |
| prev_declared_enumerated_type_name any_identifier |
|
2782 |
{$$ = NULL; |
|
2783 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2784 |
print_err_msg(current_filename, locl(@1), locf(@2), "'#' missing between enumerated type name and value in enumerated literal."); |
131 | 2785 |
} |
2786 |
| prev_declared_enumerated_type_name error any_identifier |
|
2787 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2788 |
print_err_msg(current_filename, locl(@1), locf(@3), "expecting '#' between enumerated type name and value in enumerated literal."); |
131 | 2789 |
yyerrok; |
2790 |
} |
|
2791 |
| prev_declared_enumerated_type_name '#' error |
|
2792 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2793 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid value for enumerated literal."); |
131 | 2794 |
yyerrok; |
2795 |
} |
|
2796 |
| identifier '#' any_identifier |
|
2797 |
{$$ = NULL; |
|
2798 |
yynerrs++; |
|
2799 |
print_err_msg(current_filename, locf(@1), locl(@1), "unknown type name for typed literal."); |
|
2800 |
} |
|
2801 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2802 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2803 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2804 |
|
85 | 2805 |
/* |
13 | 2806 |
enumerated_value_without_identifier: |
2807 |
prev_declared_enumerated_type_name '#' any_identifier |
|
68 | 2808 |
{$$ = new enumerated_value_c($1, $3, locloc(@$));} |
13 | 2809 |
; |
85 | 2810 |
*/ |
13 | 2811 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2812 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2813 |
array_type_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2814 |
/* array_type_name ':' array_spec_init */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2815 |
identifier ':' array_spec_init |
68 | 2816 |
{$$ = new array_type_declaration_c($1, $3, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2817 |
library_element_symtable.insert($1, prev_declared_array_type_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2818 |
} |
131 | 2819 |
/* ERROR_CHECK_BEGIN */ |
2820 |
| identifier array_spec_init |
|
2821 |
{$$ = NULL; |
|
2822 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2823 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between data type name and specification in array type declaration."); |
131 | 2824 |
} |
2825 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2826 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2827 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2828 |
array_spec_init: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2829 |
array_specification |
68 | 2830 |
{$$ = new array_spec_init_c($1, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2831 |
| array_specification ASSIGN array_initialization |
68 | 2832 |
{$$ = new array_spec_init_c($1, $3, locloc(@$));} |
131 | 2833 |
/* ERROR_CHECK_BEGIN */ |
2834 |
| array_specification array_initialization |
|
2835 |
{$$ = NULL; |
|
2836 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2837 |
print_err_msg(current_filename, locl(@1), locf(@2), "':=' missing in array specification with initialization."); |
131 | 2838 |
} |
2839 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2840 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2841 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2842 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2843 |
array_specification: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2844 |
prev_declared_array_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2845 |
| ARRAY '[' array_subrange_list ']' OF non_generic_type_name |
68 | 2846 |
{$$ = new array_specification_c($3, $6, locloc(@$));} |
131 | 2847 |
/* ERROR_CHECK_BEGIN */ |
2848 |
| ARRAY array_subrange_list ']' OF non_generic_type_name |
|
2849 |
{$$ = NULL; |
|
2850 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2851 |
print_err_msg(current_filename, locl(@1), locf(@2), "'[' missing before subrange list in array specification."); |
131 | 2852 |
} |
2853 |
| ARRAY error array_subrange_list ']' OF non_generic_type_name |
|
2854 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2855 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '[' after 'ARRAY' in array specification."); |
131 | 2856 |
yyerrok; |
2857 |
} |
|
2858 |
| ARRAY '[' ']' OF non_generic_type_name |
|
2859 |
{$$ = NULL; |
|
2860 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2861 |
print_err_msg(current_filename, locl(@2), locf(@3), "no subrange list defined in array specification."); |
131 | 2862 |
} |
2863 |
| ARRAY '[' error ']' OF non_generic_type_name |
|
2864 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2865 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid subrange list defined in array specification."); |
131 | 2866 |
yyerrok; |
2867 |
} |
|
2868 |
| ARRAY OF non_generic_type_name |
|
2869 |
{$$ = NULL; |
|
2870 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2871 |
print_err_msg(current_filename, locl(@1), locf(@2), "no subrange list defined in array specification."); |
131 | 2872 |
} |
2873 |
| ARRAY error OF non_generic_type_name |
|
2874 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2875 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid subrange list defined in array specification."); |
131 | 2876 |
yyerrok; |
2877 |
} |
|
2878 |
| ARRAY '[' array_subrange_list OF non_generic_type_name |
|
2879 |
{$$ = NULL; |
|
2880 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2881 |
print_err_msg(current_filename, locl(@3), locf(@4), "']' missing after subrange list in array specification."); |
131 | 2882 |
} |
2883 |
| ARRAY '[' array_subrange_list error OF non_generic_type_name |
|
2884 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2885 |
print_err_msg(current_filename, locf(@4), locl(@4), "expecting '[' after subrange list in array specification."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2886 |
yyerrok; |
131 | 2887 |
} |
2888 |
| ARRAY '[' array_subrange_list ']' non_generic_type_name |
|
2889 |
{$$ = NULL; |
|
2890 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2891 |
print_err_msg(current_filename, locl(@4), locf(@5), "'OF' missing between subrange list and item type name in array specification."); |
131 | 2892 |
} |
2893 |
| ARRAY '[' array_subrange_list ']' error non_generic_type_name |
|
2894 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2895 |
print_err_msg(current_filename, locf(@5), locl(@5), "expecting 'OF' between subrange list and item type name in array specification."); |
131 | 2896 |
yyerrok; |
2897 |
} |
|
2898 |
| ARRAY '[' array_subrange_list ']' OF error |
|
2899 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2900 |
print_err_msg(current_filename, locf(@6), locl(@6), "no item data type defined in array specification."); |
131 | 2901 |
yyerrok; |
2902 |
} |
|
2903 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2904 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2905 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2906 |
/* helper symbol for array_specification */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2907 |
array_subrange_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2908 |
subrange |
68 | 2909 |
{$$ = new array_subrange_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2910 |
| array_subrange_list ',' subrange |
98 | 2911 |
{$$ = $1; $$->add_element($3);} |
131 | 2912 |
/* ERROR_CHECK_BEGIN */ |
2913 |
| array_subrange_list subrange |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2914 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2915 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2916 |
print_err_msg(current_filename, locl(@1), locf(@2), "',' missing in subrange list."); |
131 | 2917 |
} |
2918 |
| array_subrange_list ',' error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2919 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2920 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid subrange in subrange list."); |
131 | 2921 |
yyerrok; |
2922 |
} |
|
2923 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2924 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2925 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2926 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2927 |
array_initialization: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2928 |
'[' array_initial_elements_list ']' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2929 |
{$$ = $2;} |
131 | 2930 |
/* ERROR_CHECK_BEGIN */ |
2931 |
| '[' ']' |
|
2932 |
{$$ = NULL; |
|
2933 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2934 |
print_err_msg(current_filename, locl(@1), locf(@2), "no initial values list defined in array initialization."); |
131 | 2935 |
} |
2936 |
| '[' error ']' |
|
2937 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2938 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid initial values list defined in array initialization."); |
131 | 2939 |
yyerrok; |
2940 |
} |
|
2941 |
| '[' array_initial_elements_list error |
|
2942 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2943 |
print_err_msg(current_filename, locl(@2), locf(@3), "']' missing at the end of array initialization."); |
131 | 2944 |
yyerrok; |
2945 |
} |
|
2946 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2947 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2948 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2949 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2950 |
/* helper symbol for array_initialization */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2951 |
array_initial_elements_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2952 |
array_initial_elements |
68 | 2953 |
{$$ = new array_initial_elements_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2954 |
| array_initial_elements_list ',' array_initial_elements |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2955 |
{$$ = $1; $$->add_element($3);} |
131 | 2956 |
/* ERROR_CHECK_BEGIN |
2957 |
| array_initial_elements_list ',' error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2958 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2959 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid array initial value in array initial values list."); |
131 | 2960 |
yyerrok; |
2961 |
} |
|
2962 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2963 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2964 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2965 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2966 |
array_initial_elements: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2967 |
array_initial_element |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2968 |
| integer '(' ')' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2969 |
| integer '(' array_initial_element ')' |
68 | 2970 |
{$$ = new array_initial_elements_c($1, $3, locloc(@$));} |
131 | 2971 |
/* ERROR_CHECK_BEGIN |
2972 |
| integer '(' error ')' |
|
2973 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2974 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid array initial value in array initial values list."); |
131 | 2975 |
yyerrok; |
2976 |
} |
|
2977 |
| integer '(' array_initial_element error |
|
2978 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
2979 |
print_err_msg(current_filename, locl(@3), locf(@4), "')' missing at the end of array initial value in array initial values list."); |
131 | 2980 |
yyerrok; |
2981 |
} |
|
2982 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2983 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2984 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2985 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2986 |
array_initial_element: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2987 |
constant |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2988 |
| enumerated_value |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2989 |
| structure_initialization |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2990 |
| array_initialization |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2991 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2992 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2993 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2994 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2995 |
structure_type_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2996 |
/* structure_type_name ':' structure_specification */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2997 |
identifier ':' structure_specification |
68 | 2998 |
{$$ = new structure_type_declaration_c($1, $3, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
2999 |
library_element_symtable.insert($1, prev_declared_structure_type_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3000 |
} |
131 | 3001 |
/* ERROR_CHECK_BEGIN */ |
3002 |
| identifier structure_specification |
|
3003 |
{$$ = NULL; |
|
3004 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3005 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between data type name and specification in structure type declaration."); |
131 | 3006 |
} |
3007 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3008 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3009 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3010 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3011 |
structure_specification: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3012 |
structure_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3013 |
| initialized_structure |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3014 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3015 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3016 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3017 |
initialized_structure: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3018 |
prev_declared_structure_type_name |
68 | 3019 |
{$$ = new initialized_structure_c($1, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3020 |
| prev_declared_structure_type_name ASSIGN structure_initialization |
68 | 3021 |
{$$ = new initialized_structure_c($1, $3, locloc(@$));} |
131 | 3022 |
/* ERROR_CHECK_BEGIN */ |
3023 |
| prev_declared_structure_type_name structure_initialization |
|
3024 |
{$$ = NULL; |
|
3025 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3026 |
print_err_msg(current_filename, locl(@1), locf(@2), "':=' missing in structure specification with initialization."); |
131 | 3027 |
} |
3028 |
| identifier ASSIGN structure_initialization |
|
3029 |
{$$ = NULL; |
|
3030 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3031 |
print_err_msg(current_filename, locf(@1), locl(@1), "unknown type name for structure specification with initialization."); |
131 | 3032 |
} |
3033 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3034 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3035 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3036 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3037 |
structure_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3038 |
STRUCT structure_element_declaration_list END_STRUCT |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3039 |
{$$ = $2;} |
131 | 3040 |
/* ERROR_CHECK_BEGIN */ |
3041 |
| STRUCT END_STRUCT |
|
3042 |
{$$ = NULL; |
|
3043 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3044 |
print_err_msg(current_filename, locl(@1), locf(@2), "no structure element declared in structure type declaration."); |
131 | 3045 |
} |
3046 |
| STRUCT error structure_element_declaration_list END_STRUCT |
|
3047 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3048 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected token after 'STRUCT' in structure type declaration."); |
131 | 3049 |
yyerrok; |
3050 |
} |
|
3051 |
| STRUCT error END_STRUCT |
|
3052 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3053 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in structure type declaration."); |
131 | 3054 |
yyerrok; |
3055 |
} |
|
3056 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3057 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3058 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3059 |
/* helper symbol for structure_declaration */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3060 |
structure_element_declaration_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3061 |
structure_element_declaration ';' |
68 | 3062 |
{$$ = new structure_element_declaration_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3063 |
| structure_element_declaration_list structure_element_declaration ';' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3064 |
{$$ = $1; $$->add_element($2);} |
131 | 3065 |
/* ERROR_CHECK_BEGIN */ |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3066 |
| error ';' |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3067 |
{$$ = new structure_element_declaration_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3068 |
print_err_msg(current_filename, locf(@1), locl(@1), "invalid structure element declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3069 |
yyerrok; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3070 |
} |
131 | 3071 |
| structure_element_declaration error |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3072 |
{$$ = new structure_element_declaration_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3073 |
print_err_msg(current_filename, locl(@1), locf(@2), "';' missing at end of structure element declaration."); |
131 | 3074 |
yyerrok; |
3075 |
} |
|
3076 |
| structure_element_declaration_list structure_element_declaration error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3077 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3078 |
print_err_msg(current_filename, locl(@2), locf(@3), "';' missing at end of structure element declaration."); |
131 | 3079 |
yyerrok; |
3080 |
} |
|
133 | 3081 |
| structure_element_declaration_list error ';' |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3082 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3083 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid structure element declaration."); |
133 | 3084 |
yyerrok; |
3085 |
} |
|
131 | 3086 |
| structure_element_declaration_list ';' |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3087 |
{$$ = $1; |
131 | 3088 |
yynerrs++; |
3089 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after structure element declaration."); |
|
3090 |
} |
|
3091 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3092 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3093 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3094 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3095 |
structure_element_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3096 |
structure_element_name ':' simple_spec_init |
68 | 3097 |
{$$ = new structure_element_declaration_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3098 |
| structure_element_name ':' subrange_spec_init |
68 | 3099 |
{$$ = new structure_element_declaration_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3100 |
| structure_element_name ':' enumerated_spec_init |
68 | 3101 |
{$$ = new structure_element_declaration_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3102 |
| structure_element_name ':' array_spec_init |
68 | 3103 |
{$$ = new structure_element_declaration_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3104 |
| structure_element_name ':' initialized_structure |
68 | 3105 |
{$$ = new structure_element_declaration_c($1, $3, locloc(@$));} |
131 | 3106 |
/* ERROR_CHECK_BEGIN */ |
3107 |
| structure_element_name simple_spec_init |
|
3108 |
{$$ = NULL; |
|
3109 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3110 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between structure element name and simple specification."); |
131 | 3111 |
} |
3112 |
| structure_element_name subrange_spec_init |
|
3113 |
{$$ = NULL; |
|
3114 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3115 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between structure element name and subrange specification."); |
131 | 3116 |
} |
3117 |
| structure_element_name enumerated_spec_init |
|
3118 |
{$$ = NULL; |
|
3119 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3120 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between structure element name and enumerated specification."); |
131 | 3121 |
} |
3122 |
| structure_element_name array_spec_init |
|
3123 |
{$$ = NULL; |
|
3124 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3125 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between structure element name and array specification."); |
131 | 3126 |
} |
3127 |
| structure_element_name initialized_structure |
|
3128 |
{$$ = NULL; |
|
3129 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3130 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between structure element name and structure specification."); |
131 | 3131 |
} |
3132 |
| structure_element_name ':' identifier |
|
3133 |
{$$ = NULL; |
|
3134 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3135 |
print_err_msg(current_filename, locf(@3), locl(@3), "unknown variable type defined in structure element declaration."); |
131 | 3136 |
} |
3137 |
| structure_element_name ':' error |
|
3138 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3139 |
print_err_msg(current_filename, locl(@2), locf(@3), "no specification defined in structure element declaration."); |
131 | 3140 |
yyerrok; |
3141 |
} |
|
3142 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3143 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3144 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3145 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3146 |
structure_element_name: any_identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3147 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3148 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3149 |
structure_initialization: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3150 |
'(' structure_element_initialization_list ')' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3151 |
{$$ = $2;} |
131 | 3152 |
/* ERROR_CHECK_BEGIN */ |
3153 |
| '(' error ')' |
|
3154 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3155 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid structure element initialization list in structure initialization."); |
131 | 3156 |
yyerrok; |
3157 |
} |
|
3158 |
| '(' structure_element_initialization_list error |
|
3159 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3160 |
print_err_msg(current_filename, locl(@2), locf(@3), "expecting ')' at the end of structure element initialization list in structure initialization."); |
131 | 3161 |
yyerrok; |
3162 |
} |
|
3163 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3164 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3165 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3166 |
/* helper symbol for structure_initialization */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3167 |
structure_element_initialization_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3168 |
structure_element_initialization |
68 | 3169 |
{$$ = new structure_element_initialization_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3170 |
| structure_element_initialization_list ',' structure_element_initialization |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3171 |
{$$ = $1; $$->add_element($3);} |
131 | 3172 |
/* ERROR_CHECK_BEGIN |
3173 |
| structure_element_initialization_list structure_element_initialization |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3174 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3175 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3176 |
print_err_msg(current_filename, locl(@1), locf(@2), "',' missing in structure element initialization list in structure initialization."); |
131 | 3177 |
} |
3178 |
| structure_element_initialization_list ',' error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3179 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3180 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid structure element initialization in structure initialization."); |
131 | 3181 |
yyerrok; |
3182 |
} |
|
3183 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3184 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3185 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3186 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3187 |
structure_element_initialization: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3188 |
structure_element_name ASSIGN constant |
68 | 3189 |
{$$ = new structure_element_initialization_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3190 |
| structure_element_name ASSIGN enumerated_value |
68 | 3191 |
{$$ = new structure_element_initialization_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3192 |
| structure_element_name ASSIGN array_initialization |
68 | 3193 |
{$$ = new structure_element_initialization_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3194 |
| structure_element_name ASSIGN structure_initialization |
68 | 3195 |
{$$ = new structure_element_initialization_c($1, $3, locloc(@$));} |
131 | 3196 |
/* ERROR_CHECK_BEGIN */ |
3197 |
| structure_element_name constant |
|
3198 |
{$$ = NULL; |
|
3199 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3200 |
print_err_msg(current_filename, locl(@1), locf(@2), "':=' missing in structure element initialization."); |
131 | 3201 |
} |
3202 |
| structure_element_name enumerated_value |
|
3203 |
{$$ = NULL; |
|
3204 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3205 |
print_err_msg(current_filename, locl(@1), locf(@2), "':=' missing in enumerated structure element initialization."); |
131 | 3206 |
} |
3207 |
| structure_element_name array_initialization |
|
3208 |
{$$ = NULL; |
|
3209 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3210 |
print_err_msg(current_filename, locl(@1), locf(@2), "':=' missing in array structure element initialization."); |
131 | 3211 |
} |
3212 |
| structure_element_name structure_initialization |
|
3213 |
{$$ = NULL; |
|
3214 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3215 |
print_err_msg(current_filename, locl(@1), locf(@2), "':=' missing in structured structure element initialization."); |
131 | 3216 |
} |
3217 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3218 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3219 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3220 |
/* NOTE: in order to remove a reduce/reduce conflict, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3221 |
* all occurences of string_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3222 |
* have been replaced with identifier! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3223 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3224 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3225 |
string_type_name: identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3226 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3227 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3228 |
string_type_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3229 |
/* string_type_name ':' elementary_string_type_name string_type_declaration_size string_type_declaration_init */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3230 |
identifier ':' elementary_string_type_name string_type_declaration_size string_type_declaration_init |
68 | 3231 |
{$$ = new string_type_declaration_c($1, $3, $4, $5, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3232 |
library_element_symtable.insert($1, prev_declared_string_type_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3233 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3234 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3235 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3236 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3237 |
/* helper symbol for string_type_declaration */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3238 |
string_type_declaration_size: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3239 |
'[' integer ']' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3240 |
{$$ = $2;} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3241 |
/* REMOVED !! */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3242 |
//| /* empty */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3243 |
// {$$ = NULL;} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3244 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3245 |
/* The syntax contains a reduce/reduce conflict. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3246 |
* The optional '[' <size> ']' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3247 |
* has been changed to become mandatory to remove the conflict. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3248 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3249 |
* The conflict arises because |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3250 |
* new_str_type : STRING := "hello!" |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3251 |
* may be reduced to a string_type_declaration OR |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3252 |
* a simple_type_declaration. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3253 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3254 |
* Our change forces it to be reduced to a |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3255 |
* simple_type_declaration! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3256 |
* We chose this option because changing the definition |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3257 |
* of simple_spec_init would force us to change all the other |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3258 |
* rules in which it appears. The change we made has no |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3259 |
* side-effects! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3260 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3261 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3262 |
/* helper symbol for string_type_declaration */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3263 |
string_type_declaration_init: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3264 |
/* empty */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3265 |
{$$ = NULL;} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3266 |
| ASSIGN character_string |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3267 |
{$$ = $2;} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3268 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3269 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3270 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3271 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3272 |
/*********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3273 |
/* B 1.4 - Variables */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3274 |
/*********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3275 |
variable: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3276 |
symbolic_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3277 |
| direct_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3278 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3279 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3280 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3281 |
symbolic_variable: |
68 | 3282 |
/* NOTE: To be entirely correct, variable_name must be replacemed by |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3283 |
* prev_declared_variable_name | prev_declared_fb_name | prev_declared_global_var_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3284 |
*/ |
78
aead91ec37cd
removing 'identifier' from definition of symbolic_variable
mario
parents:
77
diff
changeset
|
3285 |
prev_declared_fb_name |
68 | 3286 |
{$$ = new symbolic_variable_c($1, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3287 |
| prev_declared_global_var_name |
68 | 3288 |
{$$ = new symbolic_variable_c($1, locloc(@$));} |
13 | 3289 |
| prev_declared_variable_name |
68 | 3290 |
{$$ = new symbolic_variable_c($1, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3291 |
| multi_element_variable |
78
aead91ec37cd
removing 'identifier' from definition of symbolic_variable
mario
parents:
77
diff
changeset
|
3292 |
/* |
aead91ec37cd
removing 'identifier' from definition of symbolic_variable
mario
parents:
77
diff
changeset
|
3293 |
| identifier |
aead91ec37cd
removing 'identifier' from definition of symbolic_variable
mario
parents:
77
diff
changeset
|
3294 |
{$$ = new symbolic_variable_c($1, locloc(@$));} |
aead91ec37cd
removing 'identifier' from definition of symbolic_variable
mario
parents:
77
diff
changeset
|
3295 |
*/ |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3296 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3297 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3298 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3299 |
/* NOTE: in section B 1.7, when configuring a program, symbolic_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3300 |
* is used. Nevertheless, during the parsing of a configuration, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3301 |
* the variables in question are out of scope, so we should |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3302 |
* be allowing any_identifier instead of prev_declared_variable_name! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3303 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3304 |
* We therefore need a new any_symbolic_variable construct that |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3305 |
* allows the use of any_identifier instead of previously declared |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3306 |
* variables, function blocks, etc... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3307 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3308 |
any_symbolic_variable: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3309 |
// variable_name -> replaced by any_identifier |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3310 |
any_identifier |
68 | 3311 |
{$$ = new symbolic_variable_c($1, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3312 |
| any_multi_element_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3313 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3314 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3315 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3316 |
/* for yet undeclared variable names ! */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3317 |
variable_name: identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3318 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3319 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3320 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3321 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3322 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3323 |
/********************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3324 |
/* B.1.4.1 Directly Represented Variables */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3325 |
/********************************************/ |
68 | 3326 |
direct_variable: direct_variable_token {$$ = new direct_variable_c($1, locloc(@$));}; |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3327 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3328 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3329 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3330 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3331 |
/*************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3332 |
/* B.1.4.2 Multi-element Variables */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3333 |
/*************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3334 |
multi_element_variable: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3335 |
array_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3336 |
| structured_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3337 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3338 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3339 |
/* please see note above any_symbolic_variable */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3340 |
any_multi_element_variable: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3341 |
any_array_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3342 |
| any_structured_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3343 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3344 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3345 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3346 |
array_variable: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3347 |
subscripted_variable '[' subscript_list ']' |
68 | 3348 |
{$$ = new array_variable_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3349 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3350 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3351 |
/* please see note above any_symbolic_variable */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3352 |
any_array_variable: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3353 |
any_subscripted_variable '[' subscript_list ']' |
68 | 3354 |
{$$ = new array_variable_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3355 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3356 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3357 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3358 |
subscripted_variable: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3359 |
symbolic_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3360 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3361 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3362 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3363 |
/* please see note above any_symbolic_variable */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3364 |
any_subscripted_variable: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3365 |
any_symbolic_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3366 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3367 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3368 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3369 |
subscript_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3370 |
subscript |
68 | 3371 |
{$$ = new subscript_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3372 |
| subscript_list ',' subscript |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3373 |
{$$ = $1; $$->add_element($3);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3374 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3375 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3376 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3377 |
subscript: expression; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3378 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3379 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3380 |
structured_variable: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3381 |
record_variable '.' field_selector |
68 | 3382 |
{$$ = new structured_variable_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3383 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3384 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3385 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3386 |
/* please see note above any_symbolic_variable */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3387 |
any_structured_variable: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3388 |
any_record_variable '.' field_selector |
68 | 3389 |
{$$ = new structured_variable_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3390 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3391 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3392 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3393 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3394 |
record_variable: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3395 |
symbolic_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3396 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3397 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3398 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3399 |
/* please see note above any_symbolic_variable */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3400 |
any_record_variable: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3401 |
any_symbolic_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3402 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3403 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3404 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3405 |
field_selector: any_identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3406 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3407 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3408 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3409 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3410 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3411 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3412 |
/******************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3413 |
/* B 1.4.3 - Declaration & Initialisation */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3414 |
/******************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3415 |
input_declarations: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3416 |
VAR_INPUT input_declaration_list END_VAR |
68 | 3417 |
{$$ = new input_declarations_c(NULL, $2, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3418 |
| VAR_INPUT RETAIN input_declaration_list END_VAR |
68 | 3419 |
{$$ = new input_declarations_c(new retain_option_c(locloc(@2)), $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3420 |
| VAR_INPUT NON_RETAIN input_declaration_list END_VAR |
68 | 3421 |
{$$ = new input_declarations_c(new non_retain_option_c(locloc(@2)), $3, locloc(@$));} |
95 | 3422 |
/* ERROR_CHECK_BEGIN */ |
131 | 3423 |
| VAR_INPUT END_VAR |
3424 |
{$$ = NULL; |
|
3425 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3426 |
print_err_msg(current_filename, locl(@1), locf(@2), "no variable declared in input variable(s) declaration."); |
131 | 3427 |
} |
3428 |
| VAR_INPUT RETAIN END_VAR |
|
3429 |
{$$ = NULL; |
|
3430 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3431 |
print_err_msg(current_filename, locl(@2), locf(@3), "no variable declared in retentive input variable(s) declaration."); |
131 | 3432 |
} |
3433 |
| VAR_INPUT NON_RETAIN END_VAR |
|
3434 |
{$$ = NULL; |
|
3435 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3436 |
print_err_msg(current_filename, locl(@2), locf(@3), "no variable declared in non-retentive input variable(s) declaration."); |
131 | 3437 |
} |
3438 |
| VAR_INPUT error input_declaration_list END_VAR |
|
3439 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3440 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected token after 'VAR_INPUT' in input variable(s) declaration."); |
131 | 3441 |
yyerrok; |
3442 |
} |
|
3443 |
| VAR_INPUT RETAIN error input_declaration_list END_VAR |
|
3444 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3445 |
print_err_msg(current_filename, locf(@3), locl(@3), "unexpected token after 'RETAIN' in retentive input variable(s) declaration."); |
131 | 3446 |
yyerrok; |
3447 |
} |
|
3448 |
| VAR_INPUT NON_RETAIN error input_declaration_list END_VAR |
|
3449 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3450 |
print_err_msg(current_filename, locf(@3), locl(@3), "unexpected token after 'NON_RETAIN' in non-retentive input variable(s) declaration."); |
131 | 3451 |
yyerrok; |
3452 |
} |
|
95 | 3453 |
| VAR_INPUT error END_VAR |
3454 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3455 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in input variable(s) declaration."); |
131 | 3456 |
yyerrok; |
3457 |
} |
|
3458 |
| VAR_INPUT RETAIN error END_VAR |
|
3459 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3460 |
print_err_msg(current_filename, locf(@3), locl(@3), "unknown error in retentive input variable(s) declaration."); |
131 | 3461 |
yyerrok; |
3462 |
} |
|
3463 |
| VAR_INPUT NON_RETAIN error END_VAR |
|
3464 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3465 |
print_err_msg(current_filename, locf(@3), locl(@3), "unknown error in non-retentive input variable(s) declaration."); |
95 | 3466 |
yyerrok; |
3467 |
} |
|
3468 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3469 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3470 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3471 |
/* helper symbol for input_declarations */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3472 |
input_declaration_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3473 |
input_declaration ';' |
68 | 3474 |
{$$ = new input_declaration_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3475 |
| input_declaration_list input_declaration ';' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3476 |
{$$ = $1; $$->add_element($2);} |
131 | 3477 |
/* ERROR_CHECK_BEGIN */ |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3478 |
| error ';' |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3479 |
{$$ = new input_declaration_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3480 |
print_err_msg(current_filename, locf(@1), locl(@1), "invalid input variable(s) declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3481 |
yyerrok; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3482 |
} |
131 | 3483 |
| input_declaration error |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3484 |
{$$ = new input_declaration_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3485 |
print_err_msg(current_filename, locl(@1), locf(@2), "';' missing at end of input variable(s) declaration."); |
131 | 3486 |
yyerrok; |
3487 |
} |
|
3488 |
| input_declaration_list input_declaration error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3489 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3490 |
print_err_msg(current_filename, locl(@2), locf(@3), "';' missing at end of input variable(s) declaration."); |
133 | 3491 |
yyerrok; |
3492 |
} |
|
3493 |
| input_declaration_list error ';' |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3494 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3495 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid input variable(s) declaration."); |
131 | 3496 |
yyerrok; |
3497 |
} |
|
3498 |
| input_declaration_list ';' |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3499 |
{$$ = $1; |
131 | 3500 |
yynerrs++; |
133 | 3501 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after input variable(s) declaration."); |
131 | 3502 |
} |
3503 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3504 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3505 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3506 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3507 |
input_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3508 |
var_init_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3509 |
| edge_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3510 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3511 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3512 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3513 |
edge_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3514 |
var1_list ':' BOOL R_EDGE |
68 | 3515 |
{$$ = new edge_declaration_c(new raising_edge_option_c(locloc(@3)), $1, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3516 |
| var1_list ':' BOOL F_EDGE |
68 | 3517 |
{$$ = new edge_declaration_c(new falling_edge_option_c(locloc(@3)), $1, locloc(@$));} |
131 | 3518 |
/* ERROR_CHECK_BEGIN */ |
3519 |
| var1_list BOOL R_EDGE |
|
3520 |
{$$ = NULL; |
|
3521 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3522 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between variable list and specification."); |
131 | 3523 |
} |
3524 |
| var1_list BOOL F_EDGE |
|
3525 |
{$$ = NULL; |
|
3526 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3527 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between variable list and specification."); |
131 | 3528 |
} |
3529 |
| var1_list ':' BOOL R_EDGE F_EDGE |
|
3530 |
{$$ = NULL; |
|
3531 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3532 |
print_err_msg(current_filename, locf(@5), locl(@5), "'R_EDGE' and 'F_EDGE' can't be present at the same time in edge declaration."); |
131 | 3533 |
} |
3534 |
| var1_list ':' R_EDGE |
|
3535 |
{$$ = NULL; |
|
3536 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3537 |
print_err_msg(current_filename, locl(@2), locf(@3), "'BOOL' missing in edge declaration."); |
131 | 3538 |
} |
3539 |
| var1_list ':' F_EDGE |
|
3540 |
{$$ = NULL; |
|
3541 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3542 |
print_err_msg(current_filename, locl(@2), locf(@3), "'BOOL' missing in edge declaration."); |
131 | 3543 |
} |
3544 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3545 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3546 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3547 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3548 |
var_init_decl: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3549 |
var1_init_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3550 |
| array_var_init_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3551 |
| structured_var_init_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3552 |
| fb_name_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3553 |
| string_var_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3554 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3555 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3556 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3557 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3558 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3559 |
var1_init_decl: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3560 |
var1_list ':' simple_spec_init |
68 | 3561 |
{$$ = new var1_init_decl_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3562 |
| var1_list ':' subrange_spec_init |
68 | 3563 |
{$$ = new var1_init_decl_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3564 |
| var1_list ':' enumerated_spec_init |
68 | 3565 |
{$$ = new var1_init_decl_c($1, $3, locloc(@$));} |
131 | 3566 |
/* ERROR_CHECK_BEGIN */ |
3567 |
| var1_list simple_spec_init |
|
3568 |
{$$ = NULL; |
|
3569 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3570 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between variable list and simple specification."); |
131 | 3571 |
} |
3572 |
| var1_list subrange_spec_init |
|
3573 |
{$$ = NULL; |
|
3574 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3575 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between variable list and subrange specification."); |
131 | 3576 |
} |
3577 |
| var1_list enumerated_spec_init |
|
3578 |
{$$ = NULL; |
|
3579 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3580 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between variable list and enumerated specification."); |
131 | 3581 |
} |
3582 |
| var1_list ':' identifier |
|
3583 |
{$$ = NULL; |
|
3584 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3585 |
print_err_msg(current_filename, locf(@3), locl(@3), "unknown variable type defined in variable declaration."); |
131 | 3586 |
} |
3587 |
| var1_list ':' error |
|
3588 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3589 |
print_err_msg(current_filename, locl(@2), locf(@3), "no specification defined in variable declaration."); |
131 | 3590 |
yyerrok; |
3591 |
} |
|
3592 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3593 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3594 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3595 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3596 |
var1_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3597 |
variable_name |
68 | 3598 |
{$$ = new var1_list_c(locloc(@$)); $$->add_element($1); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3599 |
variable_name_symtable.insert($1, prev_declared_variable_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3600 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3601 |
| var1_list ',' variable_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3602 |
{$$ = $1; $$->add_element($3); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3603 |
variable_name_symtable.insert($3, prev_declared_variable_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3604 |
} |
131 | 3605 |
/* ERROR_CHECK_BEGIN */ |
3606 |
| var1_list variable_name |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3607 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3608 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3609 |
print_err_msg(current_filename, locl(@1), locf(@2), "',' missing in variable list."); |
131 | 3610 |
} |
3611 |
| var1_list ',' error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3612 |
{$$ = $1; |
131 | 3613 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ',' in variable declaration."); |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3614 |
yyerrok; |
131 | 3615 |
} |
3616 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3617 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3618 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3619 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3620 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3621 |
array_var_init_decl: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3622 |
var1_list ':' array_spec_init |
68 | 3623 |
{$$ = new array_var_init_decl_c($1, $3, locloc(@$));} |
131 | 3624 |
/* ERROR_CHECK_BEGIN */ |
3625 |
| var1_list array_spec_init |
|
3626 |
{$$ = NULL; |
|
3627 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3628 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between variable list and array specification."); |
131 | 3629 |
} |
3630 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3631 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3632 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3633 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3634 |
structured_var_init_decl: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3635 |
var1_list ':' initialized_structure |
68 | 3636 |
{$$ = new structured_var_init_decl_c($1, $3, locloc(@$));} |
131 | 3637 |
/* ERROR_CHECK_BEGIN */ |
3638 |
| var1_list initialized_structure |
|
3639 |
{$$ = NULL; |
|
3640 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3641 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between variable list and structured specification."); |
131 | 3642 |
} |
3643 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3644 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3645 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3646 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3647 |
/* NOTE: see notes above fb_name_list and var1_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3648 |
* for reason why ':' was removed from this rule! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3649 |
* In essence, to remove a shift/reduce conflict, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3650 |
* the ':' was moved to var1_list and fb_name_list! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3651 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3652 |
fb_name_decl: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3653 |
/* fb_name_list ':' function_block_type_name */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3654 |
fb_name_list_with_colon function_block_type_name |
68 | 3655 |
{$$ = new fb_name_decl_c($1, $2, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3656 |
/*| fb_name_list ':' function_block_type_name ASSIGN structure_initialization */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3657 |
| fb_name_list_with_colon function_block_type_name ASSIGN structure_initialization |
68 | 3658 |
{$$ = new fb_name_decl_c($1, $2, $4, locloc(@$));} |
131 | 3659 |
/* ERROR_CHECK_BEGIN */ |
3660 |
| fb_name_list_with_colon ASSIGN structure_initialization |
|
3661 |
{$$ = NULL; |
|
3662 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3663 |
print_err_msg(current_filename, locl(@1), locf(@2), "no function block type name defined in function block declaration with initialization."); |
131 | 3664 |
} |
3665 |
| fb_name_list_with_colon function_block_type_name structure_initialization |
|
3666 |
{$$ = NULL; |
|
3667 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3668 |
print_err_msg(current_filename, locl(@2), locf(@3), "':=' missing in function block declaration with initialization."); |
131 | 3669 |
} |
3670 |
| fb_name_list_with_colon function_block_type_name ASSIGN error |
|
3671 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3672 |
print_err_msg(current_filename, locf(@4), locl(@4), "invalid initialization in function block declaration."); |
131 | 3673 |
yyerrok; |
3674 |
} |
|
3675 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3676 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3677 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3678 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3679 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3680 |
/* NOTE: In order to remove a reduce/reduce conflict between |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3681 |
* var1_list and fb_name_list, which are identical to each |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3682 |
* other, fb_name_list has been redefined to be a var1_list. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3683 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3684 |
* In order to remove a further shift/reduce conflict, var1_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3685 |
* is imediately transfomred into var1_list_with_colon |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3686 |
* (i.e. it includes the ':' following the list), which |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3687 |
* means that fb_name_list is built from a |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3688 |
* var1_list_with_colon after all! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3689 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3690 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3691 |
fb_name_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3692 |
(* fb_name *) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3693 |
identifier |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3694 |
{$$ = new fb_name_list_c($1); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3695 |
variable_name_symtable.insert($1, prev_declared_fb_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3696 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3697 |
(* | fb_name_list ',' fb_name *) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3698 |
| fb_name_list ',' identifier |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3699 |
{$$ = $1; $$->add_element($3); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3700 |
variable_name_symtable.insert($3, prev_declared_fb_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3701 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3702 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3703 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3704 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3705 |
fb_name_list_with_colon: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3706 |
var1_list_with_colon |
68 | 3707 |
{$$ = new fb_name_list_c(locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3708 |
/* fill up the new fb_name_list_c object with the references |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3709 |
* contained in the var1_list_c object. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3710 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3711 |
FOR_EACH_ELEMENT(elem, $1, {$$->add_element(elem);}); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3712 |
delete $1; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3713 |
/* change the tokens associated with the symbols stored in |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3714 |
* the variable name symbol table from prev_declared_variable_name_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3715 |
* to prev_declared_fb_name_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3716 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3717 |
FOR_EACH_ELEMENT(elem, $$, {variable_name_symtable.set(elem, prev_declared_fb_name_token);}); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3718 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3719 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3720 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3721 |
/* helper symbol for fb_name_list_with_colon */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3722 |
var1_list_with_colon: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3723 |
var1_list ':' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3724 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3725 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3726 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3727 |
// fb_name: identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3728 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3729 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3730 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3731 |
output_declarations: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3732 |
VAR_OUTPUT var_init_decl_list END_VAR |
68 | 3733 |
{$$ = new output_declarations_c(NULL, $2, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3734 |
| VAR_OUTPUT RETAIN var_init_decl_list END_VAR |
68 | 3735 |
{$$ = new output_declarations_c(new retain_option_c(locloc(@2)), $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3736 |
| VAR_OUTPUT NON_RETAIN var_init_decl_list END_VAR |
68 | 3737 |
{$$ = new output_declarations_c(new non_retain_option_c(locloc(@2)), $3, locloc(@$));} |
96 | 3738 |
/* ERROR_CHECK_BEGIN */ |
131 | 3739 |
| VAR_OUTPUT END_VAR |
3740 |
{$$ = NULL; |
|
3741 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3742 |
print_err_msg(current_filename, locl(@1), locf(@2), "no variable declared in output variable(s) declaration."); |
131 | 3743 |
} |
3744 |
| VAR_OUTPUT RETAIN END_VAR |
|
3745 |
{$$ = NULL; |
|
3746 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3747 |
print_err_msg(current_filename, locl(@2), locf(@3), "no variable declared in retentive output variable(s) declaration."); |
131 | 3748 |
} |
3749 |
| VAR_OUTPUT NON_RETAIN END_VAR |
|
3750 |
{$$ = NULL; |
|
3751 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3752 |
print_err_msg(current_filename, locl(@2), locf(@3), "no variable declared in non-retentive output variable(s) declaration."); |
131 | 3753 |
} |
3754 |
| VAR_OUTPUT error var_init_decl_list END_VAR |
|
3755 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3756 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected token after 'VAR_OUPUT' in output variable(s) declaration."); |
131 | 3757 |
yyerrok; |
3758 |
} |
|
3759 |
| VAR_OUTPUT RETAIN error var_init_decl_list END_VAR |
|
3760 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3761 |
print_err_msg(current_filename, locf(@3), locl(@3), "unexpected token after 'RETAIN' in retentive output variable(s) declaration."); |
131 | 3762 |
yyerrok; |
3763 |
} |
|
3764 |
| VAR_OUTPUT NON_RETAIN error var_init_decl_list END_VAR |
|
3765 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3766 |
print_err_msg(current_filename, locf(@3), locl(@3), "unexpected token after 'NON_RETAIN' in non-retentive output variable(s) declaration."); |
131 | 3767 |
yyerrok; |
3768 |
} |
|
96 | 3769 |
| VAR_OUTPUT error END_VAR |
3770 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3771 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in output variable(s) declaration."); |
131 | 3772 |
yyerrok; |
3773 |
} |
|
3774 |
| VAR_OUTPUT RETAIN error END_VAR |
|
3775 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3776 |
print_err_msg(current_filename, locf(@3), locl(@3), "unknown error in retentive output variable(s) declaration."); |
131 | 3777 |
yyerrok; |
3778 |
} |
|
3779 |
| VAR_OUTPUT NON_RETAIN error END_VAR |
|
3780 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3781 |
print_err_msg(current_filename, locf(@3), locl(@3), "unknown error in non-retentive output variable(s) declaration."); |
96 | 3782 |
yyerrok; |
3783 |
} |
|
3784 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3785 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3786 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3787 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3788 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3789 |
input_output_declarations: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3790 |
VAR_IN_OUT var_declaration_list END_VAR |
68 | 3791 |
{$$ = new input_output_declarations_c($2, locloc(@$));} |
96 | 3792 |
/* ERROR_CHECK_BEGIN */ |
131 | 3793 |
| VAR_IN_OUT END_VAR |
3794 |
{$$ = NULL; |
|
3795 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3796 |
print_err_msg(current_filename, locl(@1), locf(@2), "no variable declared in in_out variable(s) declaration."); |
131 | 3797 |
} |
96 | 3798 |
| VAR_IN_OUT error END_VAR |
3799 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3800 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in in_out variable(s) declaration."); |
96 | 3801 |
yyerrok; |
3802 |
} |
|
3803 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3804 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3805 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3806 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3807 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3808 |
/* helper symbol for input_output_declarations */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3809 |
var_declaration_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3810 |
var_declaration ';' |
68 | 3811 |
{$$ = new var_declaration_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3812 |
| var_declaration_list var_declaration ';' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3813 |
{$$ = $1; $$->add_element($2);} |
131 | 3814 |
/* ERROR_CHECK_BEGIN */ |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3815 |
| error ';' |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3816 |
{$$ = new var_declaration_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3817 |
print_err_msg(current_filename, locf(@1), locl(@1), "invalid variable(s) declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3818 |
yyerrok; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3819 |
} |
131 | 3820 |
| var_declaration error |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3821 |
{$$ = new var_declaration_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3822 |
print_err_msg(current_filename, locl(@1), locf(@2), "';' missing at end of variable(s) declaration."); |
131 | 3823 |
yyerrok; |
3824 |
} |
|
3825 |
| var_declaration_list var_declaration error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3826 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3827 |
print_err_msg(current_filename, locl(@2), locf(@3), "';' missing at end of variable(s) declaration."); |
133 | 3828 |
yyerrok; |
3829 |
} |
|
3830 |
| var_declaration_list error ';' |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3831 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3832 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid variable(s) declaration."); |
131 | 3833 |
yyerrok; |
3834 |
} |
|
3835 |
| var_declaration_list ';' |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3836 |
{$$ = $1; |
131 | 3837 |
yynerrs++; |
133 | 3838 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after variable(s) declaration."); |
131 | 3839 |
} |
3840 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3841 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3842 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3843 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3844 |
var_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3845 |
temp_var_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3846 |
| fb_name_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3847 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3848 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3849 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3850 |
temp_var_decl: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3851 |
var1_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3852 |
| array_var_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3853 |
| structured_var_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3854 |
| string_var_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3855 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3856 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3857 |
var1_declaration: |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3858 |
var1_list ':' simple_specification |
68 | 3859 |
{$$ = new var1_init_decl_c($1, $3, locloc(@$));} |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3860 |
| var1_list ':' subrange_specification |
68 | 3861 |
{$$ = new var1_init_decl_c($1, $3, locloc(@$));} |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3862 |
| var1_list ':' enumerated_specification |
68 | 3863 |
{$$ = new var1_init_decl_c($1, $3, locloc(@$));} |
131 | 3864 |
/* ERROR_CHECK_BEGIN */ |
3865 |
| var1_list simple_specification |
|
3866 |
{$$ = NULL; |
|
3867 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3868 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between variable list and simple specification."); |
131 | 3869 |
} |
3870 |
| var1_list subrange_specification |
|
3871 |
{$$ = NULL; |
|
3872 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3873 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between variable list and subrange specification."); |
131 | 3874 |
} |
3875 |
| var1_list enumerated_specification |
|
3876 |
{$$ = NULL; |
|
3877 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3878 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between variable list and enumerated specification."); |
131 | 3879 |
} |
3880 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3881 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3882 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3883 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3884 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3885 |
array_var_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3886 |
var1_list ':' array_specification |
68 | 3887 |
{$$ = new array_var_declaration_c($1, $3, locloc(@$));} |
131 | 3888 |
/* ERROR_CHECK_BEGIN */ |
3889 |
| var1_list array_specification |
|
3890 |
{$$ = NULL; |
|
3891 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3892 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between variable list and array specification."); |
131 | 3893 |
} |
3894 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3895 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3896 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3897 |
structured_var_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3898 |
var1_list ':' prev_declared_structure_type_name |
68 | 3899 |
{$$ = new structured_var_declaration_c($1, $3, locloc(@$));} |
131 | 3900 |
/* ERROR_CHECK_BEGIN */ |
3901 |
| var1_list prev_declared_structure_type_name |
|
3902 |
{$$ = NULL; |
|
3903 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3904 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between variable list and structured specification."); |
131 | 3905 |
} |
3906 |
| var1_list ':' identifier |
|
3907 |
{$$ = NULL; |
|
3908 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3909 |
print_err_msg(current_filename, locf(@3), locl(@3), "unknown type name in structured variable declaration."); |
131 | 3910 |
} |
3911 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3912 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3913 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3914 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3915 |
var_declarations: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3916 |
VAR var_init_decl_list END_VAR |
68 | 3917 |
{$$ = new var_declarations_c(NULL, $2, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3918 |
| VAR CONSTANT var_init_decl_list END_VAR |
68 | 3919 |
{$$ = new var_declarations_c(new constant_option_c(locloc(@2)), $3, locloc(@$));} |
131 | 3920 |
/* ERROR_CHECK_BEGIN */ |
3921 |
| VAR END_VAR |
|
3922 |
{$$ = NULL; |
|
3923 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3924 |
print_err_msg(current_filename, locl(@1), locf(@2), "no variable declared in variable(s) declaration."); |
131 | 3925 |
} |
3926 |
| VAR CONSTANT END_VAR |
|
3927 |
{$$ = NULL; |
|
3928 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3929 |
print_err_msg(current_filename, locl(@2), locf(@3), "no variable declared in constant variable(s) declaration."); |
131 | 3930 |
} |
3931 |
| VAR error var_init_decl_list END_VAR |
|
3932 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3933 |
print_err_msg(current_filename, locl(@1), locf(@3), "unexpected token after 'VAR' in variable(s) declaration."); |
131 | 3934 |
yyerrok; |
3935 |
} |
|
3936 |
| VAR CONSTANT error var_init_decl_list END_VAR |
|
3937 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3938 |
print_err_msg(current_filename, locf(@3), locl(@3), "unexpected token after 'CONSTANT' in constant variable(s) declaration."); |
131 | 3939 |
yyerrok; |
3940 |
} |
|
3941 |
| VAR error END_VAR |
|
3942 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3943 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in variable(s) declaration."); |
131 | 3944 |
yyerrok; |
3945 |
} |
|
3946 |
| VAR CONSTANT error END_VAR |
|
3947 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3948 |
print_err_msg(current_filename, locf(@3), locl(@3), "unknown error in constant variable(s) declaration."); |
131 | 3949 |
yyerrok; |
3950 |
} |
|
3951 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3952 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3953 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3954 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3955 |
retentive_var_declarations: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3956 |
VAR RETAIN var_init_decl_list END_VAR |
68 | 3957 |
{$$ = new retentive_var_declarations_c($3, locloc(@$));} |
96 | 3958 |
/* ERROR_CHECK_BEGIN */ |
131 | 3959 |
| VAR RETAIN END_VAR |
3960 |
{$$ = NULL; |
|
3961 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3962 |
print_err_msg(current_filename, locl(@2), locf(@3), "no variable declared in retentive variable(s) declaration."); |
131 | 3963 |
} |
3964 |
| VAR RETAIN error var_init_decl_list END_VAR |
|
3965 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3966 |
print_err_msg(current_filename, locf(@3), locl(@3), "unexpected token after 'RETAIN' in retentive variable(s) declaration."); |
131 | 3967 |
yyerrok; |
3968 |
} |
|
96 | 3969 |
| VAR RETAIN error END_VAR |
3970 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3971 |
print_err_msg(current_filename, locf(@3), locl(@3), "unknown error in retentive variable(s) declaration."); |
96 | 3972 |
yyerrok; |
3973 |
} |
|
3974 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3975 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3976 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3977 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3978 |
located_var_declarations: |
131 | 3979 |
VAR located_var_decl_list END_VAR |
68 | 3980 |
{$$ = new located_var_declarations_c(NULL, $2, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3981 |
| VAR CONSTANT located_var_decl_list END_VAR |
68 | 3982 |
{$$ = new located_var_declarations_c(new constant_option_c(locloc(@2)), $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3983 |
| VAR RETAIN located_var_decl_list END_VAR |
68 | 3984 |
{$$ = new located_var_declarations_c(new retain_option_c(locloc(@2)), $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
3985 |
| VAR NON_RETAIN located_var_decl_list END_VAR |
68 | 3986 |
{$$ = new located_var_declarations_c(new non_retain_option_c(locloc(@2)), $3, locloc(@$));} |
131 | 3987 |
/* ERROR_CHECK_BEGIN */ |
3988 |
| VAR NON_RETAIN END_VAR |
|
3989 |
{$$ = NULL; |
|
3990 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3991 |
print_err_msg(current_filename, locl(@2), locf(@3), "no variable declared in non-retentive located variable(s) declaration."); |
131 | 3992 |
} |
3993 |
| VAR error located_var_decl_list END_VAR |
|
3994 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
3995 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected token after 'VAR' in located variable(s) declaration."); |
131 | 3996 |
yyerrok; |
3997 |
} |
|
3998 |
| VAR CONSTANT error located_var_decl_list END_VAR |
|
3999 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4000 |
print_err_msg(current_filename, locf(@3), locl(@3), "unexpected token after 'CONSTANT' in constant located variable(s) declaration."); |
131 | 4001 |
yyerrok; |
4002 |
} |
|
4003 |
| VAR RETAIN error located_var_decl_list END_VAR |
|
4004 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4005 |
print_err_msg(current_filename, locf(@3), locl(@3), "unexpected token after 'RETAIN' in retentive located variable(s) declaration."); |
131 | 4006 |
yyerrok; |
4007 |
} |
|
4008 |
| VAR NON_RETAIN error located_var_decl_list END_VAR |
|
4009 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4010 |
print_err_msg(current_filename, locf(@3), locl(@3), "unexpected token after 'NON_RETAIN' in non-retentive located variable(s) declaration."); |
131 | 4011 |
yyerrok; |
4012 |
} |
|
4013 |
| VAR NON_RETAIN error END_VAR |
|
4014 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4015 |
print_err_msg(current_filename, locf(@3), locl(@3), "unknown error in non retentive variable(s) declaration."); |
131 | 4016 |
yyerrok; |
4017 |
} |
|
4018 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4019 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4020 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4021 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4022 |
/* helper symbol for located_var_declarations */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4023 |
located_var_decl_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4024 |
located_var_decl ';' |
68 | 4025 |
{$$ = new located_var_decl_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4026 |
| located_var_decl_list located_var_decl ';' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4027 |
{$$ = $1; $$->add_element($2);} |
131 | 4028 |
/* ERROR_CHECK_BEGIN */ |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4029 |
| error ';' |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4030 |
{$$ = new located_var_decl_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4031 |
print_err_msg(current_filename, locf(@1), locl(@1), "invalid located variable declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4032 |
yyerrok; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4033 |
} |
131 | 4034 |
| located_var_decl error |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4035 |
{$$ = new located_var_decl_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4036 |
print_err_msg(current_filename, locl(@1), locf(@2), "';' missing at end of located variable declaration."); |
131 | 4037 |
yyerrok; |
4038 |
} |
|
4039 |
| located_var_decl_list located_var_decl error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4040 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4041 |
print_err_msg(current_filename, locl(@2), locf(@3), "';' missing at end of located variable declaration."); |
131 | 4042 |
yyerrok; |
4043 |
} |
|
133 | 4044 |
| located_var_decl_list error ';' |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4045 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4046 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid located variable declaration."); |
133 | 4047 |
yyerrok; |
4048 |
} |
|
131 | 4049 |
| located_var_decl_list ';' |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4050 |
{$$ = $1; |
131 | 4051 |
yynerrs++; |
4052 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after located variable declaration."); |
|
4053 |
} |
|
4054 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4055 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4056 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4057 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4058 |
located_var_decl: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4059 |
variable_name location ':' located_var_spec_init |
68 | 4060 |
{$$ = new located_var_decl_c($1, $2, $4, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4061 |
variable_name_symtable.insert($1, prev_declared_variable_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4062 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4063 |
| location ':' located_var_spec_init |
68 | 4064 |
{$$ = new located_var_decl_c(NULL, $1, $3, locloc(@$));} |
131 | 4065 |
/* ERROR_CHECK_BEGIN */ |
4066 |
| variable_name location located_var_spec_init |
|
4067 |
{$$ = NULL; |
|
4068 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4069 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between located variable location and specification."); |
131 | 4070 |
} |
4071 |
| location located_var_spec_init |
|
4072 |
{$$ = NULL; |
|
4073 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4074 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between located variable location and specification."); |
131 | 4075 |
} |
4076 |
| variable_name location ':' error |
|
4077 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4078 |
print_err_msg(current_filename, locl(@2), locf(@3), "no specification defined in located variable declaration."); |
131 | 4079 |
yyerrok; |
4080 |
} |
|
4081 |
| location ':' error |
|
4082 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4083 |
print_err_msg(current_filename, locl(@2), locf(@3), "no specification defined in located variable declaration."); |
131 | 4084 |
yyerrok; |
4085 |
} |
|
4086 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4087 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4088 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4089 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4090 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4091 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4092 |
external_var_declarations: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4093 |
VAR_EXTERNAL external_declaration_list END_VAR |
68 | 4094 |
{$$ = new external_var_declarations_c(NULL, $2, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4095 |
| VAR_EXTERNAL CONSTANT external_declaration_list END_VAR |
68 | 4096 |
{$$ = new external_var_declarations_c(new constant_option_c(locloc(@2)), $3, locloc(@$));} |
96 | 4097 |
/* ERROR_CHECK_BEGIN */ |
131 | 4098 |
| VAR_EXTERNAL END_VAR |
4099 |
{$$ = NULL; |
|
4100 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4101 |
print_err_msg(current_filename, locl(@1), locf(@2), "no variable declared in external variable(s) declaration."); |
131 | 4102 |
} |
4103 |
| VAR_EXTERNAL CONSTANT END_VAR |
|
4104 |
{$$ = NULL; |
|
4105 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4106 |
print_err_msg(current_filename, locl(@2), locf(@3), "no variable declared in constant external variable(s) declaration."); |
131 | 4107 |
} |
4108 |
| VAR_EXTERNAL error external_declaration_list END_VAR |
|
4109 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4110 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected token after 'VAR_EXTERNAL' in external variable(s) declaration."); |
131 | 4111 |
yyerrok; |
4112 |
} |
|
4113 |
| VAR_EXTERNAL CONSTANT error external_declaration_list END_VAR |
|
4114 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4115 |
print_err_msg(current_filename, locf(@3), locl(@3), "unexpected token after 'CONSTANT' in constant external variable(s) declaration."); |
131 | 4116 |
yyerrok; |
4117 |
} |
|
96 | 4118 |
| VAR_EXTERNAL error END_VAR |
4119 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4120 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in external variable(s) declaration."); |
131 | 4121 |
yyerrok; |
4122 |
} |
|
4123 |
| VAR_EXTERNAL CONSTANT error END_VAR |
|
4124 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4125 |
print_err_msg(current_filename, locf(@3), locl(@3), "unknown error in constant external variable(s) declaration."); |
96 | 4126 |
yyerrok; |
4127 |
} |
|
4128 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4129 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4130 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4131 |
/* helper symbol for external_var_declarations */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4132 |
external_declaration_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4133 |
external_declaration ';' |
68 | 4134 |
{$$ = new external_declaration_list_c(locloc(@$)); $$->add_element($1);} |
131 | 4135 |
| external_declaration_list external_declaration ';' |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4136 |
{$$ = $1; $$->add_element($2);} |
131 | 4137 |
/* ERROR_CHECK_BEGIN */ |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4138 |
| error ';' |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4139 |
{$$ = new external_declaration_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4140 |
print_err_msg(current_filename, locf(@1), locl(@1), "invalid external variable declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4141 |
yyerrok; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4142 |
} |
131 | 4143 |
| external_declaration error |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4144 |
{$$ = new external_declaration_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4145 |
print_err_msg(current_filename, locl(@1), locf(@2), "';' missing at end of external variable declaration."); |
131 | 4146 |
yyerrok; |
4147 |
} |
|
4148 |
| external_declaration_list external_declaration error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4149 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4150 |
print_err_msg(current_filename, locl(@2), locf(@3), "';' missing at end of external variable declaration."); |
131 | 4151 |
yyerrok; |
4152 |
} |
|
133 | 4153 |
| external_declaration_list error ';' |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4154 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4155 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid external variable declaration."); |
133 | 4156 |
yyerrok; |
4157 |
} |
|
131 | 4158 |
| external_declaration_list ';' |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4159 |
{$$ = $1; |
131 | 4160 |
yynerrs++; |
4161 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after external variable declaration."); |
|
4162 |
} |
|
4163 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4164 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4165 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4166 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4167 |
external_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4168 |
global_var_name ':' simple_specification |
68 | 4169 |
{$$ = new external_declaration_c($1, $3, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4170 |
variable_name_symtable.insert($1, prev_declared_variable_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4171 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4172 |
| global_var_name ':' subrange_specification |
68 | 4173 |
{$$ = new external_declaration_c($1, $3, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4174 |
variable_name_symtable.insert($1, prev_declared_variable_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4175 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4176 |
| global_var_name ':' enumerated_specification |
68 | 4177 |
{$$ = new external_declaration_c($1, $3, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4178 |
variable_name_symtable.insert($1, prev_declared_variable_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4179 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4180 |
| global_var_name ':' array_specification |
68 | 4181 |
{$$ = new external_declaration_c($1, $3, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4182 |
variable_name_symtable.insert($1, prev_declared_variable_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4183 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4184 |
| global_var_name ':' prev_declared_structure_type_name |
68 | 4185 |
{$$ = new external_declaration_c($1, $3, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4186 |
variable_name_symtable.insert($1, prev_declared_variable_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4187 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4188 |
| global_var_name ':' function_block_type_name |
68 | 4189 |
{$$ = new external_declaration_c($1, $3, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4190 |
variable_name_symtable.insert($1, prev_declared_fb_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4191 |
} |
131 | 4192 |
/* ERROR_CHECK_BEGIN */ |
4193 |
| global_var_name simple_specification |
|
4194 |
{$$ = NULL; |
|
4195 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4196 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between external variable name and simple specification."); |
131 | 4197 |
} |
4198 |
| global_var_name subrange_specification |
|
4199 |
{$$ = NULL; |
|
4200 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4201 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between external variable name and subrange specification."); |
131 | 4202 |
} |
4203 |
| global_var_name enumerated_specification |
|
4204 |
{$$ = NULL; |
|
4205 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4206 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between external variable name and enumerated specification."); |
131 | 4207 |
} |
4208 |
| global_var_name array_specification |
|
4209 |
{$$ = NULL; |
|
4210 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4211 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between external variable name and array specification."); |
131 | 4212 |
} |
4213 |
| global_var_name prev_declared_structure_type_name |
|
4214 |
{$$ = NULL; |
|
4215 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4216 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between external variable name and structured specification."); |
131 | 4217 |
} |
4218 |
| global_var_name function_block_type_name |
|
4219 |
{$$ = NULL; |
|
4220 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4221 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between external variable name and function block type specification."); |
131 | 4222 |
} |
4223 |
| global_var_name ':' identifier |
|
4224 |
{$$ = NULL; |
|
4225 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4226 |
print_err_msg(current_filename, locf(@3), locl(@3), "unknown type name in external variable declaration."); |
131 | 4227 |
} |
4228 |
| global_var_name ':' error |
|
4229 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4230 |
print_err_msg(current_filename, locl(@2), locf(@3), "no specification defined in external variable declaration."); |
131 | 4231 |
yyerrok; |
4232 |
} |
|
4233 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4234 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4235 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4236 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4237 |
global_var_name: identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4238 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4239 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4240 |
global_var_declarations: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4241 |
VAR_GLOBAL global_var_decl_list END_VAR |
68 | 4242 |
{$$ = new global_var_declarations_c(NULL, $2, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4243 |
| VAR_GLOBAL CONSTANT global_var_decl_list END_VAR |
68 | 4244 |
{$$ = new global_var_declarations_c(new constant_option_c(locloc(@2)), $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4245 |
| VAR_GLOBAL RETAIN global_var_decl_list END_VAR |
68 | 4246 |
{$$ = new global_var_declarations_c(new retain_option_c(locloc(@2)), $3, locloc(@$));} |
96 | 4247 |
/* ERROR_CHECK_BEGIN */ |
131 | 4248 |
| VAR_GLOBAL END_VAR |
4249 |
{$$ = NULL; |
|
4250 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4251 |
print_err_msg(current_filename, locl(@1), locf(@2), "no variable declared in global variable(s) declaration."); |
131 | 4252 |
} |
4253 |
| VAR_GLOBAL CONSTANT END_VAR |
|
4254 |
{$$ = NULL; |
|
4255 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4256 |
print_err_msg(current_filename, locl(@2), locf(@3), "no variable declared in constant global variable(s) declaration."); |
131 | 4257 |
} |
4258 |
| VAR_GLOBAL RETAIN END_VAR |
|
4259 |
{$$ = NULL; |
|
4260 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4261 |
print_err_msg(current_filename, locl(@2), locf(@3), "no variable declared in retentive global variable(s) declaration."); |
131 | 4262 |
} |
4263 |
| VAR_GLOBAL error global_var_decl_list END_VAR |
|
4264 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4265 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected token after 'VAR_GLOBAL' in global variable(s) declaration."); |
131 | 4266 |
yyerrok; |
4267 |
} |
|
4268 |
| VAR_GLOBAL CONSTANT error global_var_decl_list END_VAR |
|
4269 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4270 |
print_err_msg(current_filename, locf(@3), locl(@3), "unexpected token after 'CONSTANT' in constant global variable(s) declaration."); |
131 | 4271 |
yyerrok; |
4272 |
} |
|
4273 |
| VAR_GLOBAL RETAIN error global_var_decl_list END_VAR |
|
4274 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4275 |
print_err_msg(current_filename, locf(@3), locl(@3), "unexpected token after 'RETAIN' in retentive global variable(s) declaration."); |
131 | 4276 |
yyerrok; |
4277 |
} |
|
96 | 4278 |
| VAR_GLOBAL error END_VAR |
4279 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4280 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in global variable(s) declaration."); |
131 | 4281 |
yyerrok; |
4282 |
} |
|
4283 |
| VAR_GLOBAL CONSTANT error END_VAR |
|
4284 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4285 |
print_err_msg(current_filename, locf(@3), locl(@3), "unknown error in constant global variable(s) declaration."); |
131 | 4286 |
yyerrok; |
4287 |
} |
|
4288 |
| VAR_GLOBAL RETAIN error END_VAR |
|
4289 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4290 |
print_err_msg(current_filename, locf(@3), locl(@3), "unknown error in constant global variable(s) declaration."); |
96 | 4291 |
yyerrok; |
4292 |
} |
|
4293 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4294 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4295 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4296 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4297 |
/* helper symbol for global_var_declarations */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4298 |
global_var_decl_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4299 |
global_var_decl ';' |
68 | 4300 |
{$$ = new global_var_decl_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4301 |
| global_var_decl_list global_var_decl ';' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4302 |
{$$ = $1; $$->add_element($2);} |
131 | 4303 |
/* ERROR_CHECK_BEGIN */ |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4304 |
| error ';' |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4305 |
{$$ = new global_var_decl_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4306 |
print_err_msg(current_filename, locf(@1), locl(@1), "invalid global variable(s) declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4307 |
yyerrok; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4308 |
} |
131 | 4309 |
| global_var_decl error |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4310 |
{$$ = new global_var_decl_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4311 |
print_err_msg(current_filename, locl(@1), locf(@2), "';' missing at end of global variable(s) declaration."); |
131 | 4312 |
yyerrok; |
4313 |
} |
|
4314 |
| global_var_decl_list global_var_decl error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4315 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4316 |
print_err_msg(current_filename, locl(@1), locf(@2), "';' missing at end of global variable(s) declaration."); |
133 | 4317 |
yyerrok; |
4318 |
} |
|
4319 |
| global_var_decl_list error ';' |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4320 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4321 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid global variable(s) declaration."); |
131 | 4322 |
yyerrok; |
4323 |
} |
|
4324 |
| global_var_decl_list ';' |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4325 |
{$$ = $1; |
131 | 4326 |
yynerrs++; |
133 | 4327 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after global variable(s) declaration."); |
131 | 4328 |
} |
4329 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4330 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4331 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4332 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4333 |
global_var_decl: |
131 | 4334 |
/* NOTE : This possibility defined in standard has no sense and generate a conflict (disabled) |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4335 |
global_var_spec ':' |
68 | 4336 |
{$$ = new global_var_decl_c($1, NULL, locloc(@$));} |
131 | 4337 |
*/ |
4338 |
global_var_spec ':' located_var_spec_init |
|
68 | 4339 |
{$$ = new global_var_decl_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4340 |
| global_var_spec ':' function_block_type_name |
68 | 4341 |
{$$ = new global_var_decl_c($1, $3, locloc(@$));} |
131 | 4342 |
/* ERROR_CHECK_BEGIN */ |
4343 |
| global_var_list located_var_spec_init |
|
4344 |
{$$ = NULL; |
|
4345 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4346 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between global variable list and type specification."); |
131 | 4347 |
} |
4348 |
| global_var_name location located_var_spec_init |
|
4349 |
{$$ = NULL; |
|
4350 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4351 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between global variable specification and type specification."); |
131 | 4352 |
} |
4353 |
| global_var_spec function_block_type_name |
|
4354 |
{$$ = NULL; |
|
4355 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4356 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between global variable specification and function block type specification."); |
131 | 4357 |
} |
4358 |
| global_var_spec ':' identifier |
|
4359 |
{$$ = NULL; |
|
4360 |
yynerrs++; |
|
4361 |
print_err_msg(current_filename, locf(@3), locl(@3), "unknown variable type defined in global variable declaration."); |
|
4362 |
} |
|
4363 |
| global_var_spec ':' error |
|
4364 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4365 |
print_err_msg(current_filename, locl(@2), locf(@3), "no specification defined in global variable declaration."); |
131 | 4366 |
yyerrok; |
4367 |
} |
|
4368 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4369 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4370 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4371 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4372 |
global_var_spec: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4373 |
global_var_list {$$ = $1;} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4374 |
| location |
68 | 4375 |
{$$ = new global_var_spec_c(NULL, $1, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4376 |
| global_var_name location |
68 | 4377 |
{$$ = new global_var_spec_c($1, $2, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4378 |
variable_name_symtable.insert($1, prev_declared_global_var_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4379 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4380 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4381 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4382 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4383 |
located_var_spec_init: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4384 |
simple_spec_init |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4385 |
| subrange_spec_init |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4386 |
| enumerated_spec_init |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4387 |
| array_spec_init |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4388 |
| initialized_structure |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4389 |
| single_byte_string_spec |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4390 |
| double_byte_string_spec |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4391 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4392 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4393 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4394 |
location: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4395 |
AT direct_variable |
68 | 4396 |
{$$ = new location_c($2, locloc(@$));} |
131 | 4397 |
/* ERROR_CHECK_BEGIN */ |
4398 |
| AT error |
|
4399 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4400 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid location in location declaration."); |
131 | 4401 |
yyerrok; |
4402 |
} |
|
4403 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4404 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4405 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4406 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4407 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4408 |
global_var_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4409 |
global_var_name |
68 | 4410 |
{$$ = new global_var_list_c(locloc(@$)); $$->add_element($1); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4411 |
variable_name_symtable.insert($1, prev_declared_global_var_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4412 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4413 |
| global_var_list ',' global_var_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4414 |
{$$ = $1; $$->add_element($3); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4415 |
variable_name_symtable.insert($3, prev_declared_global_var_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4416 |
} |
131 | 4417 |
/* ERROR_CHECK_BEGIN */ |
4418 |
| global_var_list global_var_name |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4419 |
{$$ = new global_var_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4420 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4421 |
print_err_msg(current_filename, locl(@1), locf(@2), "',' missing in global variable list."); |
131 | 4422 |
} |
4423 |
| global_var_list ',' error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4424 |
{$$ = $1; |
131 | 4425 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ',' in global variable declaration."); |
4426 |
yyerrok; |
|
4427 |
} |
|
4428 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4429 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4430 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4431 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4432 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4433 |
string_var_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4434 |
single_byte_string_var_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4435 |
| double_byte_string_var_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4436 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4437 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4438 |
single_byte_string_var_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4439 |
var1_list ':' single_byte_string_spec |
68 | 4440 |
{$$ = new single_byte_string_var_declaration_c($1, $3, locloc(@$));} |
131 | 4441 |
/* ERROR_CHECK_BEGIN */ |
4442 |
| var1_list single_byte_string_spec |
|
4443 |
{$$ = NULL; |
|
4444 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4445 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between variable list and string type specification."); |
131 | 4446 |
} |
4447 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4448 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4449 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4450 |
/* NOTE: The constructs |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4451 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4452 |
* [W]STRING |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4453 |
* and |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4454 |
* [W]STRING ASSIGN single_byte_character_string |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4455 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4456 |
* were removed as they are already contained |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4457 |
* within a other constructs. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4458 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4459 |
* single_byte_string_spec is used in: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4460 |
* - single_byte_string_var_declaration -> |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4461 |
* -> string_var_declaration ---> var_init_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4462 |
* |--> temp_var_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4463 |
* |--> var2_init_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4464 |
* - located_var_spec_init |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4465 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4466 |
* STRING [ASSIGN string_constant] -> elementary_string_type_name -> |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4467 |
* -> simple_spec -> simple_specification -> simple_spec_init -> |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4468 |
* -> located_var_spec_init |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4469 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4470 |
* STRING [ASSIGN string_constant] -> elementary_string_type_name -> |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4471 |
* -> simple_spec -> simple_specification -> simple_spec_init -> |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4472 |
* -> var1_init_decl -> var_init_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4473 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4474 |
* STRING [ASSIGN string_constant] -> elementary_string_type_name -> |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4475 |
* -> simple_spec -> simple_specification -> simple_spec_init -> |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4476 |
* -> var1_init_decl -> var2_init_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4477 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4478 |
* STRING [ASSIGN string_constant] -> elementary_string_type_name -> |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4479 |
* -> simple_spec -> simple_specification -> |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4480 |
* -> var1_declaration -> temp_var_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4481 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4482 |
single_byte_string_spec: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4483 |
/* STRING |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4484 |
{$$ = new single_byte_string_spec_c(NULL, NULL);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4485 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4486 |
STRING '[' integer ']' |
68 | 4487 |
{$$ = new single_byte_string_spec_c($3, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4488 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4489 |
| STRING ASSIGN single_byte_character_string |
68 | 4490 |
{$$ = new single_byte_string_spec_c(NULL, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4491 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4492 |
| STRING '[' integer ']' ASSIGN single_byte_character_string |
68 | 4493 |
{$$ = new single_byte_string_spec_c($3, $6, locloc(@$));} |
131 | 4494 |
/* ERROR_CHECK_BEGIN */ |
4495 |
| STRING '[' error ']' |
|
4496 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4497 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid length value for limited string type specification."); |
131 | 4498 |
yyerrok; |
4499 |
} |
|
4500 |
| STRING '[' error ']' ASSIGN single_byte_character_string |
|
4501 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4502 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid length value for limited string type specification."); |
131 | 4503 |
yyerrok; |
4504 |
} |
|
4505 |
| STRING '[' ']' |
|
4506 |
{$$ = NULL; |
|
4507 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4508 |
print_err_msg(current_filename, locl(@2), locf(@3), "missing length value for limited string type specification."); |
131 | 4509 |
} |
4510 |
| STRING '[' ']' ASSIGN single_byte_character_string |
|
4511 |
{$$ = NULL; |
|
4512 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4513 |
print_err_msg(current_filename, locl(@2), locf(@3), "missing length value for limited string type specification."); |
131 | 4514 |
} |
4515 |
| STRING '[' integer error |
|
4516 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4517 |
print_err_msg(current_filename, locl(@3), locf(@4), "expecting ']' after length definition for limited string type specification."); |
131 | 4518 |
yyerrok; |
4519 |
} |
|
4520 |
| STRING '[' integer error ASSIGN single_byte_character_string |
|
4521 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4522 |
print_err_msg(current_filename, locf(@4), locl(@4), "expecting ']' after length definition for limited string type specification."); |
131 | 4523 |
yyerrok; |
4524 |
} |
|
4525 |
| STRING '[' integer ']' single_byte_character_string |
|
4526 |
{$$ = NULL; |
|
4527 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4528 |
print_err_msg(current_filename, locl(@4), locf(@5), "':=' missing before limited string type initialization."); |
131 | 4529 |
} |
4530 |
| STRING '[' integer ']' ASSIGN error |
|
4531 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4532 |
print_err_msg(current_filename, locf(@6), locl(@6), "invalid value for limited string type initialization."); |
131 | 4533 |
yyerrok; |
4534 |
} |
|
4535 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4536 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4537 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4538 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4539 |
double_byte_string_var_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4540 |
var1_list ':' double_byte_string_spec |
68 | 4541 |
{$$ = new double_byte_string_var_declaration_c($1, $3, locloc(@$));} |
131 | 4542 |
/* ERROR_CHECK_BEGIN */ |
4543 |
| var1_list double_byte_string_spec |
|
4544 |
{$$ = NULL; |
|
4545 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4546 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between variable list and double byte string type specification."); |
131 | 4547 |
} |
4548 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4549 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4550 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4551 |
double_byte_string_spec: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4552 |
/* WSTRING |
68 | 4553 |
{$$ = new double_byte_string_spec_c(NULL, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4554 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4555 |
WSTRING '[' integer ']' |
68 | 4556 |
{$$ = new double_byte_string_spec_c($3, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4557 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4558 |
| WSTRING ASSIGN double_byte_character_string |
68 | 4559 |
{$$ = new double_byte_string_spec_c(NULL, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4560 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4561 |
| WSTRING '[' integer ']' ASSIGN double_byte_character_string |
68 | 4562 |
{$$ = new double_byte_string_spec_c($3, $6, locloc(@$));} |
131 | 4563 |
/* ERROR_CHECK_BEGIN */ |
4564 |
| WSTRING '[' error ']' |
|
4565 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4566 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid length value for limited double byte string type specification."); |
131 | 4567 |
yyerrok; |
4568 |
} |
|
4569 |
| WSTRING '[' error ']' ASSIGN single_byte_character_string |
|
4570 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4571 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid length value for limited double byte string type specification."); |
131 | 4572 |
yyerrok; |
4573 |
} |
|
4574 |
| WSTRING '[' ']' |
|
4575 |
{$$ = NULL; |
|
4576 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4577 |
print_err_msg(current_filename, locl(@2), locf(@3), "missing length value for limited double byte string type specification."); |
131 | 4578 |
} |
4579 |
| WSTRING '[' ']' ASSIGN single_byte_character_string |
|
4580 |
{$$ = NULL; |
|
4581 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4582 |
print_err_msg(current_filename, locl(@2), locf(@3), "missing length value for limited double byte string type specification."); |
131 | 4583 |
} |
4584 |
| WSTRING '[' integer error |
|
4585 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4586 |
print_err_msg(current_filename, locl(@3), locf(@4), "expecting ']' after length definition for limited double byte string type specification."); |
131 | 4587 |
yyerrok; |
4588 |
} |
|
4589 |
| WSTRING '[' integer error ASSIGN single_byte_character_string |
|
4590 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4591 |
print_err_msg(current_filename, locf(@4), locl(@4), "expecting ']' after length definition for limited double byte string type specification."); |
131 | 4592 |
yyerrok; |
4593 |
} |
|
4594 |
| WSTRING '[' integer ']' single_byte_character_string |
|
4595 |
{$$ = NULL; |
|
4596 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4597 |
print_err_msg(current_filename, locl(@4), locf(@5), "':=' missing before limited double byte string type initialization."); |
131 | 4598 |
} |
4599 |
| WSTRING '[' integer ']' ASSIGN error |
|
4600 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4601 |
print_err_msg(current_filename, locf(@6), locl(@6), "invalid value for limited double byte string type initialization."); |
131 | 4602 |
yyerrok; |
4603 |
} |
|
4604 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4605 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4606 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4607 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4608 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4609 |
incompl_located_var_declarations: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4610 |
VAR incompl_located_var_decl_list END_VAR |
68 | 4611 |
{$$ = new incompl_located_var_declarations_c(NULL, $2, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4612 |
| VAR RETAIN incompl_located_var_decl_list END_VAR |
68 | 4613 |
{$$ = new incompl_located_var_declarations_c(new retain_option_c(locloc(@2)), $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4614 |
| VAR NON_RETAIN incompl_located_var_decl_list END_VAR |
68 | 4615 |
{$$ = new incompl_located_var_declarations_c(new non_retain_option_c(locloc(@2)), $3, locloc(@$));} |
131 | 4616 |
/* ERROR_CHECK_BEGIN */ |
4617 |
| VAR error incompl_located_var_decl_list END_VAR |
|
4618 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4619 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected token after 'VAR' in incomplete located variable(s) declaration."); |
131 | 4620 |
yyerrok; |
4621 |
} |
|
4622 |
| VAR RETAIN error incompl_located_var_decl_list END_VAR |
|
4623 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4624 |
print_err_msg(current_filename, locf(@3), locl(@3), "unexpected token after 'RETAIN' in retentive located variable(s) declaration."); |
131 | 4625 |
yyerrok; |
4626 |
} |
|
4627 |
| VAR NON_RETAIN error incompl_located_var_decl_list END_VAR |
|
4628 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4629 |
print_err_msg(current_filename, locf(@3), locl(@3), "unexpected token after 'NON_RETAIN' in non-retentive located variable(s) declaration."); |
131 | 4630 |
yyerrok; |
4631 |
} |
|
4632 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4633 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4634 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4635 |
/* helper symbol for incompl_located_var_declarations */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4636 |
incompl_located_var_decl_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4637 |
incompl_located_var_decl ';' |
68 | 4638 |
{$$ = new incompl_located_var_decl_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4639 |
| incompl_located_var_decl_list incompl_located_var_decl ';' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4640 |
{$$ = $1; $$->add_element($2);} |
131 | 4641 |
/* ERROR_CHECK_BEGIN */ |
4642 |
| incompl_located_var_decl error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4643 |
{$$ = new incompl_located_var_decl_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4644 |
print_err_msg(current_filename, locl(@1), locf(@2), "';' missing at end of incomplete located variable declaration."); |
131 | 4645 |
yyerrok; |
4646 |
} |
|
4647 |
| incompl_located_var_decl_list incompl_located_var_decl error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4648 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4649 |
print_err_msg(current_filename, locl(@2), locf(@3), "';' missing at end of incomplete located variable declaration."); |
131 | 4650 |
yyerrok; |
4651 |
} |
|
133 | 4652 |
| incompl_located_var_decl_list error ';' |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4653 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4654 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid incomplete located variable declaration."); |
133 | 4655 |
yyerrok; |
4656 |
} |
|
131 | 4657 |
| incompl_located_var_decl_list ';' |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4658 |
{$$ = $1; |
131 | 4659 |
yynerrs++; |
4660 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after incomplete located variable declaration."); |
|
4661 |
} |
|
4662 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4663 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4664 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4665 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4666 |
incompl_located_var_decl: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4667 |
variable_name incompl_location ':' var_spec |
68 | 4668 |
{$$ = new incompl_located_var_decl_c($1, $2, $4, locloc(@$));} |
131 | 4669 |
/* ERROR_CHECK_BEGIN */ |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4670 |
| variable_name incompl_location var_spec |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4671 |
{$$ = NULL; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4672 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4673 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing between incomplete located variable and type specification."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4674 |
} |
131 | 4675 |
| variable_name incompl_location ':' error |
4676 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4677 |
print_err_msg(current_filename, locl(@2), locf(@3), "no specification defined in incomplete located variable declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4678 |
yyerrok; |
131 | 4679 |
} |
4680 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4681 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4682 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4683 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4684 |
incompl_location: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4685 |
AT incompl_location_token |
68 | 4686 |
{$$ = new incompl_location_c($2, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4687 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4688 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4689 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4690 |
var_spec: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4691 |
simple_specification |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4692 |
| subrange_specification |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4693 |
| enumerated_specification |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4694 |
| array_specification |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4695 |
| prev_declared_structure_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4696 |
| string_spec |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4697 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4698 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4699 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4700 |
/* helper symbol for var_spec */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4701 |
/* NOTE: The constructs |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4702 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4703 |
* STRING |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4704 |
* and |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4705 |
* WSTRING |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4706 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4707 |
* were removed as they are already contained |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4708 |
* within a simple_specification. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4709 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4710 |
string_spec: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4711 |
/* STRING |
68 | 4712 |
{$$ = new single_byte_string_spec_c(NULL, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4713 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4714 |
STRING '[' integer ']' |
68 | 4715 |
{$$ = new single_byte_string_spec_c($3, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4716 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4717 |
| WSTRING |
68 | 4718 |
{$$ = new double_byte_string_spec_c(NULL, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4719 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4720 |
| WSTRING '[' integer ']' |
68 | 4721 |
{$$ = new double_byte_string_spec_c($3, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4722 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4723 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4724 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4725 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4726 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4727 |
/* intermediate helper symbol for: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4728 |
* - non_retentive_var_decls |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4729 |
* - output_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4730 |
* - var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4731 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4732 |
var_init_decl_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4733 |
var_init_decl ';' |
68 | 4734 |
{$$ = new var_init_decl_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4735 |
| var_init_decl_list var_init_decl ';' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4736 |
{$$ = $1; $$->add_element($2);} |
131 | 4737 |
/* ERROR_CHECK_BEGIN */ |
4738 |
| var_init_decl_list var_init_decl error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4739 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4740 |
print_err_msg(current_filename, locl(@2), locf(@3), "';' missing at end of variable(s) declaration."); |
133 | 4741 |
yyerrok; |
4742 |
} |
|
4743 |
| var_init_decl_list error ';' |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4744 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4745 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid variable(s) declaration."); |
131 | 4746 |
yyerrok; |
4747 |
} |
|
4748 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4749 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4750 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4751 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4752 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4753 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4754 |
/***********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4755 |
/* B 1.5.1 - Functions */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4756 |
/***********************/ |
68 | 4757 |
/* |
4758 |
function_name: |
|
4759 |
prev_declared_derived_function_name |
|
4760 |
| standard_function_name |
|
4761 |
; |
|
4762 |
*/ |
|
4763 |
||
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4764 |
/* The following rules should be set such as: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4765 |
* function_name: function_name_no_clashes | function_name_simpleop_clashes | function_name_expression_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4766 |
* function_name: function_name_no_NOT_clashes | function_name_NOT_clashes; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4767 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4768 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4769 |
function_name_no_clashes: prev_declared_derived_function_name | standard_function_name_no_clashes; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4770 |
function_name_simpleop_clashes: standard_function_name_simpleop_clashes; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4771 |
//function_name_expression_clashes: standard_function_name_expression_clashes; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4772 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4773 |
function_name_no_NOT_clashes: prev_declared_derived_function_name | standard_function_name_no_NOT_clashes; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4774 |
//function_name_NOT_clashes: standard_function_name_NOT_clashes; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4775 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4776 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4777 |
/* NOTE: The list of standard function names |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4778 |
* includes the standard functions MOD(), NOT() |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4779 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4780 |
* Strangely enough, MOD and NOT are reserved keywords, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4781 |
* so shouldn't be used for function names. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4782 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4783 |
* The specification contradicts itself! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4784 |
* Our workaround is to treat MOD as a token, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4785 |
* but to include this token as a |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4786 |
* standard_function_name. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4787 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4788 |
* The names of all other standard functions get |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4789 |
* preloaded into the library_element_symbol_table |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4790 |
* with the token value of |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4791 |
* standard_function_name_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4792 |
* Actually, simply for completeness, MOD is also |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4793 |
* loaded into the library_element_symbol_table, but |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4794 |
* it is irrelevant since flex will catch MOD as a |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4795 |
* token, before it interprets it as an identifier, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4796 |
* and looks in the library_element_symbol_table to check |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4797 |
* whether it has been previously declared. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4798 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4799 |
* NOTE: The same as the above also occurs with the IL |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4800 |
* operators NOT AND OR XOR ADD SUB MUL DIV MOD |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4801 |
* GT GE EQ LT LE NE. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4802 |
* Note that MOD is once again in the list! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4803 |
* Anyway, we give these the same treatement as |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4804 |
* MOD, since we are writing a parser for ST and |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4805 |
* IL simultaneously. If this were not the case, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4806 |
* the ST parser would not need the tokens NOT AND ... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4807 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4808 |
* NOTE: Note that 'NOT' is special, as it conflicts |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4809 |
* with two operators: the IL 'NOT' operator, and |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4810 |
* the unary operator 'NOT' in ST!! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4811 |
* |
78
aead91ec37cd
removing 'identifier' from definition of symbolic_variable
mario
parents:
77
diff
changeset
|
4812 |
* NOTE: The IL language is ambiguous, since using NOT, AND, ... |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4813 |
* may be interpreted as either an IL operator, or |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4814 |
* as a standard function call! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4815 |
* I (Mario) opted to interpret it as an IL operator. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4816 |
* This requires changing the syntax for IL language |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4817 |
* function calling, to exclude all function with |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4818 |
* names that clash with IL operators. I therefore |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4819 |
* created the constructs |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4820 |
* function_name_without_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4821 |
* standard_function_name_without_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4822 |
* to include all function names, except those that clash |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4823 |
* with IL operators. These constructs are only used |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4824 |
* within the IL language! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4825 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4826 |
/* The following rules should be set such as: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4827 |
* standard_function_name: standard_function_name_no_clashes | standard_function_name_simpleop_clashes | standard_function_name_expression_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4828 |
* standard_function_name: standard_function_name_no_NOT_clashes | standard_function_name_NOT_clashes; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4829 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4830 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4831 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4832 |
standard_function_name: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4833 |
standard_function_name_no_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4834 |
| standard_function_name_expression_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4835 |
| standard_function_name_NOT_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4836 |
//| standard_function_name_simpleop_only_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4837 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4838 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4839 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4840 |
standard_function_name_no_NOT_clashes: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4841 |
standard_function_name_no_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4842 |
| standard_function_name_expression_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4843 |
//| standard_function_name_simpleop_only_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4844 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4845 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4846 |
standard_function_name_no_clashes: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4847 |
standard_function_name_token |
68 | 4848 |
{$$ = new identifier_c($1, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4849 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4850 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4851 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4852 |
standard_function_name_simpleop_clashes: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4853 |
standard_function_name_NOT_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4854 |
//| standard_function_name_simpleop_only_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4855 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4856 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4857 |
standard_function_name_NOT_clashes: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4858 |
NOT |
68 | 4859 |
{$$ = new identifier_c(strdup("NOT"), locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4860 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4861 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4862 |
/* Add here any other IL simple operators that collide |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4863 |
* with standard function names! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4864 |
* Don't forget to uncomment the equivalent lines in |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4865 |
* - standard_function_name_simpleop_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4866 |
* - standard_function_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4867 |
* - standard_function_name_no_NOT_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4868 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4869 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4870 |
standard_function_name_simpleop_only_clashes: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4871 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4872 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4873 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4874 |
standard_function_name_expression_clashes: |
91 | 4875 |
AND {$$ = new identifier_c(strdup("AND"), locloc(@$));} |
4876 |
| OR {$$ = new identifier_c(strdup("OR"), locloc(@$));} |
|
4877 |
| XOR {$$ = new identifier_c(strdup("XOR"), locloc(@$));} |
|
4878 |
| ADD {$$ = new identifier_c(strdup("ADD"), locloc(@$));} |
|
4879 |
| SUB {$$ = new identifier_c(strdup("SUB"), locloc(@$));} |
|
4880 |
| MUL {$$ = new identifier_c(strdup("MUL"), locloc(@$));} |
|
4881 |
| DIV {$$ = new identifier_c(strdup("DIV"), locloc(@$));} |
|
4882 |
| MOD {$$ = new identifier_c(strdup("MOD"), locloc(@$));} |
|
4883 |
| GT {$$ = new identifier_c(strdup("GT"), locloc(@$));} |
|
4884 |
| GE {$$ = new identifier_c(strdup("GE"), locloc(@$));} |
|
4885 |
| EQ {$$ = new identifier_c(strdup("EQ"), locloc(@$));} |
|
4886 |
| LT {$$ = new identifier_c(strdup("LT"), locloc(@$));} |
|
4887 |
| LE {$$ = new identifier_c(strdup("LE"), locloc(@$));} |
|
4888 |
| NE {$$ = new identifier_c(strdup("NE"), locloc(@$));} |
|
4889 |
/* |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4890 |
AND_operator {$$ = il_operator_c_2_identifier_c($1);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4891 |
//NOTE: AND2 (corresponding to the source code string '&') does not clash |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4892 |
// with a standard function name, so should be commented out! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4893 |
//| AND2_operator {$$ = il_operator_c_2_identifier_c($1);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4894 |
| OR_operator {$$ = il_operator_c_2_identifier_c($1);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4895 |
| XOR_operator {$$ = il_operator_c_2_identifier_c($1);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4896 |
| ADD_operator {$$ = il_operator_c_2_identifier_c($1);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4897 |
| SUB_operator {$$ = il_operator_c_2_identifier_c($1);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4898 |
| MUL_operator {$$ = il_operator_c_2_identifier_c($1);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4899 |
| DIV_operator {$$ = il_operator_c_2_identifier_c($1);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4900 |
| MOD_operator {$$ = il_operator_c_2_identifier_c($1);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4901 |
| GT_operator {$$ = il_operator_c_2_identifier_c($1);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4902 |
| GE_operator {$$ = il_operator_c_2_identifier_c($1);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4903 |
| EQ_operator {$$ = il_operator_c_2_identifier_c($1);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4904 |
| LT_operator {$$ = il_operator_c_2_identifier_c($1);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4905 |
| LE_operator {$$ = il_operator_c_2_identifier_c($1);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4906 |
| NE_operator {$$ = il_operator_c_2_identifier_c($1);} |
91 | 4907 |
*/ |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4908 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4909 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4910 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4911 |
derived_function_name: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4912 |
identifier |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4913 |
| prev_declared_derived_function_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4914 |
{$$ = $1; |
77 | 4915 |
if (not(allow_function_overloading)) { |
4916 |
fprintf(stderr, "Function overloading not allowed. Invalid identifier %s\n", ((token_c *)($1))->value); |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4917 |
ERROR; |
77 | 4918 |
} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4919 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4920 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4921 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4922 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4923 |
function_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4924 |
/* FUNCTION derived_function_name ':' elementary_type_name io_OR_function_var_declarations_list function_body END_FUNCTION */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4925 |
function_name_declaration ':' elementary_type_name io_OR_function_var_declarations_list function_body END_FUNCTION |
68 | 4926 |
{$$ = new function_declaration_c($1, $3, $4, $5, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4927 |
variable_name_symtable.pop(); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4928 |
if (allow_function_overloading) { |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4929 |
switch (library_element_symtable.find_value($1)) { |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4930 |
case prev_declared_derived_function_name_token: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4931 |
/* do nothing, already in map. */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4932 |
break; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4933 |
case BOGUS_TOKEN_ID: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4934 |
/* Not yet in map. Must insert...*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4935 |
library_element_symtable.insert($1, prev_declared_derived_function_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4936 |
break; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4937 |
default: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4938 |
/* Already in map but associated with something else other than a funtion name! */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4939 |
ERROR; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4940 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4941 |
} else { |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4942 |
library_element_symtable.insert($1, prev_declared_derived_function_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4943 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4944 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4945 |
/* | FUNCTION derived_function_name ':' derived_type_name io_OR_function_var_declarations_list function_body END_FUNCTION */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4946 |
| function_name_declaration ':' derived_type_name io_OR_function_var_declarations_list function_body END_FUNCTION |
68 | 4947 |
{$$ = new function_declaration_c($1, $3, $4, $5, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4948 |
variable_name_symtable.pop(); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4949 |
if (allow_function_overloading) { |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4950 |
switch (library_element_symtable.find_value($1)) { |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4951 |
case prev_declared_derived_function_name_token: /* do nothing, already in map. */ break; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4952 |
case BOGUS_TOKEN_ID: library_element_symtable.insert($1, prev_declared_derived_function_name_token); break; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4953 |
default: ERROR; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4954 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4955 |
} else { |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4956 |
library_element_symtable.insert($1, prev_declared_derived_function_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4957 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
4958 |
} |
68 | 4959 |
/* ERROR_CHECK_BEGIN */ |
131 | 4960 |
| function_name_declaration elementary_type_name io_OR_function_var_declarations_list function_body END_FUNCTION |
4961 |
{$$ = NULL; |
|
4962 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4963 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing after function name in function declaration."); |
131 | 4964 |
} |
4965 |
| function_name_declaration derived_type_name io_OR_function_var_declarations_list function_body END_FUNCTION |
|
4966 |
{$$ = NULL; |
|
4967 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4968 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing after function name in function declaration."); |
131 | 4969 |
} |
4970 |
| function_name_declaration error derived_type_name io_OR_function_var_declarations_list function_body END_FUNCTION |
|
4971 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4972 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting ':' after function name in function declaration."); |
131 | 4973 |
yyerrok; |
4974 |
} |
|
4975 |
| function_name_declaration ':' io_OR_function_var_declarations_list function_body END_FUNCTION |
|
4976 |
{$$ = NULL; |
|
4977 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4978 |
print_err_msg(current_filename, locl(@2), locf(@3), "no return type defined in function declaration."); |
131 | 4979 |
} |
4980 |
| function_name_declaration ':' error io_OR_function_var_declarations_list function_body END_FUNCTION |
|
4981 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4982 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid return type defined in function declaration."); |
131 | 4983 |
yyerrok; |
4984 |
} |
|
4985 |
| function_name_declaration ':' identifier io_OR_function_var_declarations_list function_body END_FUNCTION |
|
4986 |
{$$ = NULL; |
|
4987 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4988 |
print_err_msg(current_filename, locf(@3), locl(@3), "unknown return type defined in function declaration."); |
131 | 4989 |
} |
4990 |
| function_name_declaration ':' elementary_type_name function_body END_FUNCTION |
|
4991 |
{$$ = NULL; |
|
4992 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4993 |
print_err_msg(current_filename, locl(@3), locf(@4), "no variable(s) declared in function declaration."); |
131 | 4994 |
} |
4995 |
| function_name_declaration ':' derived_type_name function_body END_FUNCTION |
|
4996 |
{$$ = NULL; |
|
4997 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
4998 |
print_err_msg(current_filename, locl(@3), locf(@4), "no variable(s) declared in function declaration."); |
131 | 4999 |
} |
5000 |
| function_name_declaration ':' elementary_type_name io_OR_function_var_declarations_list END_FUNCTION |
|
5001 |
{$$ = NULL; |
|
5002 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5003 |
print_err_msg(current_filename, locl(@4), locf(@5), "no body defined in function declaration."); |
131 | 5004 |
} |
5005 |
| function_name_declaration ':' derived_type_name io_OR_function_var_declarations_list END_FUNCTION |
|
5006 |
{$$ = NULL; |
|
5007 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5008 |
print_err_msg(current_filename, locl(@4), locf(@5), "no body defined in function declaration."); |
131 | 5009 |
} |
5010 |
| function_name_declaration ':' elementary_type_name END_FUNCTION |
|
5011 |
{$$ = NULL; |
|
5012 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5013 |
print_err_msg(current_filename, locl(@3), locf(@4), "no variable(s) declared and body defined in function declaration."); |
131 | 5014 |
} |
5015 |
| function_name_declaration ':' derived_type_name END_FUNCTION |
|
5016 |
{$$ = NULL; |
|
5017 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5018 |
print_err_msg(current_filename, locl(@3), locf(@4), "no variable(s) declared and body defined in function declaration."); |
131 | 5019 |
} |
5020 |
| function_name_declaration error END_FUNCTION |
|
5021 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5022 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in function declaration."); |
68 | 5023 |
yyerrok; |
5024 |
} |
|
5025 |
/* ERROR_CHECK_END */ |
|
5026 |
; |
|
5027 |
||
5028 |
||
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5029 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5030 |
/* helper symbol for function_declaration */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5031 |
/* NOTE: due to reduce/reduce conflicts between identifiers |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5032 |
* being reduced to either a variable or an enumerator value, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5033 |
* we were forced to keep a symbol table of the names |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5034 |
* of all declared variables. Variables are no longer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5035 |
* created from simple identifier_token, but from |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5036 |
* prev_declared_variable_name_token. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5037 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5038 |
* BUT, in functions the function name itself may be used as |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5039 |
* a variable! In order to be able to parse this correctly, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5040 |
* the token parser (flex) must return a prev_declared_variable_name_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5041 |
* when it comes across the function name, while parsing |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5042 |
* the function itself. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5043 |
* We do this by inserting the function name into the variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5044 |
* symbol table, and having flex return a prev_declared_variable_name_token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5045 |
* whenever it comes across it. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5046 |
* When we finish parsing the function the variable name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5047 |
* symbol table is cleared of all entries, and the function |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5048 |
* name is inserted into the library element symbol table. This |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5049 |
* means that from then onwards flex will return a |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5050 |
* derived_function_name_token whenever it comes across the |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5051 |
* function name. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5052 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5053 |
* In order to insert the function name into the variable_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5054 |
* symbol table BEFORE the function body gets parsed, we |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5055 |
* need the parser to reduce a construct that contains the |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5056 |
* the function name. That is why we created this extra |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5057 |
* construct (function_name_declaration), i.e. to force |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5058 |
* the parser to reduce it, before parsing the function body! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5059 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5060 |
function_name_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5061 |
FUNCTION derived_function_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5062 |
{$$ = $2; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5063 |
/* the function name functions as a |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5064 |
* variable within the function itself! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5065 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5066 |
* Remember that the variable_name_symtable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5067 |
* is cleared once the end of the function |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5068 |
* is parsed. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5069 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5070 |
variable_name_symtable.insert($2, prev_declared_variable_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5071 |
} |
131 | 5072 |
/* ERROR_CHECK_BEGIN */ |
5073 |
| FUNCTION error |
|
5074 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5075 |
print_err_msg(current_filename, locl(@1), locf(@2), "no function name defined in function declaration."); |
131 | 5076 |
yyerrok; |
5077 |
} |
|
5078 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5079 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5080 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5081 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5082 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5083 |
/* intermediate helper symbol for function_declaration */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5084 |
io_OR_function_var_declarations_list: |
131 | 5085 |
io_var_declarations |
5086 |
{$$ = new var_declarations_list_c(locloc(@1));$$->add_element($1);} |
|
5087 |
| function_var_decls |
|
5088 |
{$$ = new var_declarations_list_c(locloc(@1));$$->add_element($1);} |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5089 |
| io_OR_function_var_declarations_list io_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5090 |
{$$ = $1; $$->add_element($2);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5091 |
| io_OR_function_var_declarations_list function_var_decls |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5092 |
{$$ = $1; $$->add_element($2);} |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5093 |
/* ERROR_CHECK_BEGIN */ |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5094 |
| io_OR_function_var_declarations_list retentive_var_declarations |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5095 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5096 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5097 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected retentive variable(s) declaration in function declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5098 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5099 |
| io_OR_function_var_declarations_list located_var_declarations |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5100 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5101 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5102 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected located variable(s) declaration in function declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5103 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5104 |
| io_OR_function_var_declarations_list external_var_declarations |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5105 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5106 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5107 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected external variable(s) declaration in function declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5108 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5109 |
| io_OR_function_var_declarations_list global_var_declarations |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5110 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5111 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5112 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected global variable(s) declaration in function declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5113 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5114 |
| io_OR_function_var_declarations_list incompl_located_var_declarations |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5115 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5116 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5117 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected incomplete located variable(s) declaration in function declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5118 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5119 |
| io_OR_function_var_declarations_list temp_var_decls |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5120 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5121 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5122 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected temporary located variable(s) declaration in function declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5123 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5124 |
| io_OR_function_var_declarations_list non_retentive_var_decls |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5125 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5126 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5127 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected non-retentive variable(s) declaration in function declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5128 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5129 |
/*| io_OR_function_var_declarations_list access_declarations |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5130 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5131 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5132 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected access variable(s) declaration in function declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5133 |
}*/ |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5134 |
| io_OR_function_var_declarations_list instance_specific_initializations |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5135 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5136 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5137 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected instance specific initialization(s) in function declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5138 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5139 |
/* ERROR_CHECK_END */ |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5140 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5141 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5142 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5143 |
io_var_declarations: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5144 |
input_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5145 |
| output_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5146 |
| input_output_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5147 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5148 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5149 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5150 |
function_var_decls: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5151 |
VAR CONSTANT var2_init_decl_list END_VAR |
68 | 5152 |
{$$ = new function_var_decls_c(new constant_option_c(locloc(@2)), $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5153 |
| VAR var2_init_decl_list END_VAR |
68 | 5154 |
{$$ = new function_var_decls_c(NULL, $2, locloc(@$));} |
131 | 5155 |
/* ERROR_CHECK_BEGIN */ |
5156 |
| VAR error var_init_decl_list END_VAR |
|
5157 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5158 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected token after 'VAR' in function variable(s) declaration."); |
131 | 5159 |
yyerrok; |
5160 |
} |
|
5161 |
| VAR CONSTANT error var_init_decl_list END_VAR |
|
5162 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5163 |
print_err_msg(current_filename, locf(@3), locl(@3), "unexpected token after 'CONSTANT' in constant function variable(s) declaration."); |
131 | 5164 |
yyerrok; |
5165 |
} |
|
5166 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5167 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5168 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5169 |
/* intermediate helper symbol for function_var_decls */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5170 |
var2_init_decl_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5171 |
var2_init_decl ';' |
68 | 5172 |
{$$ = new var2_init_decl_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5173 |
| var2_init_decl_list var2_init_decl ';' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5174 |
{$$ = $1; $$->add_element($2);} |
131 | 5175 |
/* ERROR_CHECK_BEGIN */ |
5176 |
| var2_init_decl error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5177 |
{$$ = new var2_init_decl_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5178 |
print_err_msg(current_filename, locl(@1), locf(@2), "';' missing at end of function variable(s) declaration."); |
131 | 5179 |
yyerrok; |
5180 |
} |
|
5181 |
| var2_init_decl_list var2_init_decl error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5182 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5183 |
print_err_msg(current_filename, locl(@2), locf(@3), "';' missing at end of function variable(s) declaration."); |
131 | 5184 |
yyerrok; |
5185 |
} |
|
133 | 5186 |
| var2_init_decl_list error ';' |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5187 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5188 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid function variable(s) declaration."); |
133 | 5189 |
yyerrok; |
5190 |
} |
|
131 | 5191 |
| var2_init_decl_list ';' |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5192 |
{$$ = $1; |
131 | 5193 |
yynerrs++; |
5194 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after function variable(s) declaration."); |
|
5195 |
} |
|
5196 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5197 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5198 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5199 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5200 |
function_body: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5201 |
statement_list {$$ = $1;} /* if we leave it for the default action we get a type clash! */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5202 |
| instruction_list {$$ = $1;} /* if we leave it for the default action we get a type clash! */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5203 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5204 |
| ladder_diagram |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5205 |
| function_block_diagram |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5206 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5207 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5208 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5209 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5210 |
var2_init_decl: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5211 |
var1_init_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5212 |
| array_var_init_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5213 |
| structured_var_init_decl |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5214 |
| string_var_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5215 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5216 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5217 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5218 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5219 |
/*****************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5220 |
/* B 1.5.2 - Function Blocks */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5221 |
/*****************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5222 |
function_block_type_name: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5223 |
prev_declared_derived_function_block_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5224 |
| standard_function_block_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5225 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5226 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5227 |
|
68 | 5228 |
standard_function_block_name: standard_function_block_name_token {$$ = new identifier_c($1, locloc(@$));}; |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5229 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5230 |
derived_function_block_name: identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5231 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5232 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5233 |
function_block_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5234 |
FUNCTION_BLOCK derived_function_block_name io_OR_other_var_declarations_list function_block_body END_FUNCTION_BLOCK |
68 | 5235 |
{$$ = new function_block_declaration_c($2, $3, $4, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5236 |
library_element_symtable.insert($2, prev_declared_derived_function_block_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5237 |
/* Clear the variable_name_symtable. Since |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5238 |
* we have finished parsing the function block, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5239 |
* the variable names are now out of scope, so |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5240 |
* are no longer valid! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5241 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5242 |
variable_name_symtable.pop(); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5243 |
} |
68 | 5244 |
/* ERROR_CHECK_BEGIN */ |
131 | 5245 |
| FUNCTION_BLOCK io_OR_other_var_declarations_list function_block_body END_FUNCTION_BLOCK |
5246 |
{$$ = NULL; |
|
5247 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5248 |
print_err_msg(current_filename, locl(@1), locf(@2), "no function block name defined in function block declaration."); |
131 | 5249 |
} |
5250 |
| FUNCTION_BLOCK error io_OR_other_var_declarations_list function_block_body END_FUNCTION_BLOCK |
|
5251 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5252 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid function block name in function block declaration."); |
131 | 5253 |
yyerrok; |
5254 |
} |
|
5255 |
| FUNCTION_BLOCK derived_function_block_name function_block_body END_FUNCTION_BLOCK |
|
5256 |
{$$ = NULL; |
|
5257 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5258 |
print_err_msg(current_filename, locl(@2), locf(@3), "no variable(s) declared in function declaration."); |
131 | 5259 |
} |
5260 |
| FUNCTION_BLOCK derived_function_block_name io_OR_other_var_declarations_list END_FUNCTION_BLOCK |
|
5261 |
{$$ = NULL; |
|
5262 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5263 |
print_err_msg(current_filename, locl(@3), locf(@4), "no body defined in function block declaration."); |
131 | 5264 |
} |
5265 |
| FUNCTION_BLOCK derived_function_block_name END_FUNCTION_BLOCK |
|
5266 |
{$$ = NULL; |
|
5267 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5268 |
print_err_msg(current_filename, locl(@2), locf(@3), "no variable(s) declared and body defined in function block declaration."); |
131 | 5269 |
} |
68 | 5270 |
| FUNCTION_BLOCK error END_FUNCTION_BLOCK |
5271 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5272 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in function block declaration."); |
68 | 5273 |
yyerrok; |
5274 |
} |
|
5275 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5276 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5277 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5278 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5279 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5280 |
/* intermediate helper symbol for function_declaration */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5281 |
/* { io_var_declarations | other_var_declarations } */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5282 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5283 |
* NOTE: we re-use the var_declarations_list_c |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5284 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5285 |
io_OR_other_var_declarations_list: |
131 | 5286 |
io_var_declarations |
5287 |
{$$ = new var_declarations_list_c(locloc(@$));$$->add_element($1);} |
|
5288 |
| other_var_declarations |
|
5289 |
{$$ = new var_declarations_list_c(locloc(@$));$$->add_element($1);} |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5290 |
| io_OR_other_var_declarations_list io_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5291 |
{$$ = $1; $$->add_element($2);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5292 |
| io_OR_other_var_declarations_list other_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5293 |
{$$ = $1; $$->add_element($2);} |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5294 |
/* ERROR_CHECK_BEGIN */ |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5295 |
| io_OR_other_var_declarations_list located_var_declarations |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5296 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5297 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5298 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected located variable(s) declaration in function block declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5299 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5300 |
| io_OR_other_var_declarations_list global_var_declarations |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5301 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5302 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5303 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected global variable(s) declaration in function block declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5304 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5305 |
/*| io_OR_other_var_declarations_list access_declarations |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5306 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5307 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5308 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected access variable(s) declaration in function block declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5309 |
}*/ |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5310 |
| io_OR_other_var_declarations_list instance_specific_initializations |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5311 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5312 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5313 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected instance specific initialization(s) in function block declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5314 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5315 |
/* ERROR_CHECK_END */ |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5316 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5317 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5318 |
/* NOTE: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5319 |
* The IEC specification gives the following definition: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5320 |
* other_var_declarations ::= |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5321 |
* external_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5322 |
* | var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5323 |
* | retentive_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5324 |
* | non_retentive_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5325 |
* | temp_var_decls |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5326 |
* | incompl_located_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5327 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5328 |
* Nvertheless, the symbol non_retentive_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5329 |
* is not defined in the spec. This seems to me (Mario) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5330 |
* to be a typo, so non_retentive_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5331 |
* has been replaced with non_retentive_var_decls |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5332 |
* in the following rule! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5333 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5334 |
other_var_declarations: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5335 |
temp_var_decls |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5336 |
| non_retentive_var_decls |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5337 |
| external_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5338 |
| var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5339 |
| retentive_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5340 |
| incompl_located_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5341 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5342 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5343 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5344 |
temp_var_decls: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5345 |
VAR_TEMP temp_var_decls_list END_VAR |
68 | 5346 |
{$$ = new temp_var_decls_c($2, locloc(@$));} |
131 | 5347 |
/* ERROR_CHECK_BEGIN */ |
5348 |
| VAR_TEMP END_VAR |
|
5349 |
{$$ = NULL; |
|
5350 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5351 |
print_err_msg(current_filename, locl(@1), locf(@2), "no variable declared in temporary variable(s) declaration."); |
131 | 5352 |
} |
5353 |
| VAR_TEMP error temp_var_decls_list END_VAR |
|
5354 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5355 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected token after 'VAR_TEMP' in function variable(s) declaration."); |
131 | 5356 |
yyerrok; |
5357 |
} |
|
5358 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5359 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5360 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5361 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5362 |
/* intermediate helper symbol for temp_var_decls */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5363 |
temp_var_decls_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5364 |
temp_var_decl ';' |
68 | 5365 |
{$$ = new temp_var_decls_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5366 |
| temp_var_decls_list temp_var_decl ';' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5367 |
{$$ = $1; $$->add_element($2);} |
131 | 5368 |
/* ERROR_CHECK_BEGIN */ |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5369 |
| error ';' |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5370 |
{$$ = new temp_var_decls_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5371 |
print_err_msg(current_filename, locf(@1), locl(@1), "invalid temporary variable(s) declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5372 |
yyerrok; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5373 |
} |
131 | 5374 |
| temp_var_decl error |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5375 |
{$$ = new temp_var_decls_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5376 |
print_err_msg(current_filename, locl(@1), locf(@2), "';' missing at end of temporary variable(s) declaration."); |
131 | 5377 |
yyerrok; |
5378 |
} |
|
5379 |
| temp_var_decls_list temp_var_decl error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5380 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5381 |
print_err_msg(current_filename, locl(@2), locf(@3), "';' missing at end of temporary variable(s) declaration."); |
133 | 5382 |
yyerrok; |
5383 |
} |
|
5384 |
| temp_var_decls_list error ';' |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5385 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5386 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid temporary variable(s) declaration."); |
131 | 5387 |
yyerrok; |
5388 |
} |
|
5389 |
| temp_var_decls_list ';' |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5390 |
{$$ = $1; |
131 | 5391 |
yynerrs++; |
133 | 5392 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after temporary variable(s) declaration."); |
131 | 5393 |
} |
5394 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5395 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5396 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5397 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5398 |
non_retentive_var_decls: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5399 |
VAR NON_RETAIN var_init_decl_list END_VAR |
68 | 5400 |
{$$ = new non_retentive_var_decls_c($3, locloc(@$));} |
131 | 5401 |
/* ERROR_CHECK_BEGIN */ |
5402 |
| VAR NON_RETAIN error var_init_decl_list END_VAR |
|
5403 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5404 |
print_err_msg(current_filename, locf(@3), locl(@3), "unexpected token after 'NON_RETAIN' in non-retentive temporary variable(s) declaration."); |
131 | 5405 |
yyerrok; |
5406 |
} |
|
5407 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5408 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5409 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5410 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5411 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5412 |
function_block_body: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5413 |
statement_list {$$ = $1;} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5414 |
| instruction_list {$$ = $1;} |
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5415 |
| sequential_function_chart {$$ = $1;} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5416 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5417 |
| ladder_diagram |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5418 |
| function_block_diagram |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5419 |
| <other languages> |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5420 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5421 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5422 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5423 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5424 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5425 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5426 |
/**********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5427 |
/* B 1.5.3 - Programs */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5428 |
/**********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5429 |
program_type_name: identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5430 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5431 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5432 |
program_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5433 |
PROGRAM program_type_name program_var_declarations_list function_block_body END_PROGRAM |
68 | 5434 |
{$$ = new program_declaration_c($2, $3, $4, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5435 |
library_element_symtable.insert($2, prev_declared_program_type_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5436 |
/* Clear the variable_name_symtable. Since |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5437 |
* we have finished parsing the program declaration, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5438 |
* the variable names are now out of scope, so |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5439 |
* are no longer valid! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5440 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5441 |
variable_name_symtable.pop(); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5442 |
} |
68 | 5443 |
/* ERROR_CHECK_BEGIN */ |
131 | 5444 |
| PROGRAM program_var_declarations_list function_block_body END_PROGRAM |
5445 |
{$$ = NULL; |
|
5446 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5447 |
print_err_msg(current_filename, locl(@1), locf(@2), "no program name defined in program declaration."); |
131 | 5448 |
} |
5449 |
| PROGRAM error program_var_declarations_list function_block_body END_PROGRAM |
|
5450 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5451 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid program name in program declaration."); |
131 | 5452 |
yyerrok; |
5453 |
} |
|
5454 |
| PROGRAM program_type_name function_block_body END_PROGRAM |
|
5455 |
{$$ = NULL; |
|
5456 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5457 |
print_err_msg(current_filename, locl(@2), locf(@3), "no variable(s) declared in program declaration."); |
131 | 5458 |
} |
5459 |
| PROGRAM program_type_name program_var_declarations_list END_PROGRAM |
|
5460 |
{$$ = NULL; |
|
5461 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5462 |
print_err_msg(current_filename, locl(@3), locf(@4), "no body defined in program declaration."); |
131 | 5463 |
} |
5464 |
| PROGRAM program_type_name END_PROGRAM |
|
5465 |
{$$ = NULL; |
|
5466 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5467 |
print_err_msg(current_filename, locl(@2), locf(@3), "no variable(s) declared and body defined in program declaration."); |
131 | 5468 |
} |
68 | 5469 |
| PROGRAM error END_PROGRAM |
5470 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5471 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in program declaration."); |
68 | 5472 |
yyerrok; |
5473 |
} |
|
5474 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5475 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5476 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5477 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5478 |
/* helper symbol for program_declaration */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5479 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5480 |
* NOTE: we re-use the var_declarations_list_c |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5481 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5482 |
program_var_declarations_list: |
131 | 5483 |
io_var_declarations |
5484 |
{$$ = new var_declarations_list_c(locloc(@$)); $$->add_element($1);} |
|
5485 |
| other_var_declarations |
|
5486 |
{$$ = new var_declarations_list_c(locloc(@$)); $$->add_element($1);} |
|
5487 |
| located_var_declarations |
|
5488 |
{$$ = new var_declarations_list_c(locloc(@$)); $$->add_element($1);} |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5489 |
| program_var_declarations_list io_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5490 |
{$$ = $1; $$->add_element($2);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5491 |
| program_var_declarations_list other_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5492 |
{$$ = $1; $$->add_element($2);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5493 |
| program_var_declarations_list located_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5494 |
{$$ = $1; $$->add_element($2);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5495 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5496 |
| program_var_declarations_list program_access_decls |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5497 |
{$$ = $1; $$->add_element($2);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5498 |
*/ |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5499 |
/* ERROR_CHECK_BEGIN */ |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5500 |
| program_var_declarations_list global_var_declarations |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5501 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5502 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5503 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected global variable(s) declaration in function block declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5504 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5505 |
/*| program_var_declarations_list access_declarations |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5506 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5507 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5508 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected access variable(s) declaration in function block declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5509 |
}*/ |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5510 |
| program_var_declarations_list instance_specific_initializations |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5511 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5512 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5513 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected instance specific initialization(s) in function block declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5514 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5515 |
/* ERROR_CHECK_END */ |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5516 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5517 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5518 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5519 |
/* TODO ... */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5520 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5521 |
program_access_decls: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5522 |
VAR_ACCESS program_access_decl_list END_VAR |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5523 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5524 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5525 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5526 |
/* helper symbol for program_access_decls */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5527 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5528 |
program_access_decl_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5529 |
program_access_decl ';' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5530 |
| program_access_decl_list program_access_decl ';' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5531 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5532 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5533 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5534 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5535 |
program_access_decl: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5536 |
access_name ':' symbolic_variable ':' non_generic_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5537 |
| access_name ':' symbolic_variable ':' non_generic_type_name direction |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5538 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5539 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5540 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5541 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5542 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5543 |
/********************************************/ |
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5544 |
/* B 1.6 Sequential Function Chart elements * |
3 | 5545 |
/********************************************/ |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5546 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5547 |
sequential_function_chart: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5548 |
sfc_network |
68 | 5549 |
{$$ = new sequential_function_chart_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5550 |
| sequential_function_chart sfc_network |
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5551 |
{$$ = $1; $$->add_element($2);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5552 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5553 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5554 |
sfc_network: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5555 |
initial_step |
68 | 5556 |
{$$ = new sfc_network_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5557 |
| sfc_network step |
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5558 |
{$$ = $1; $$->add_element($2);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5559 |
| sfc_network transition |
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5560 |
{$$ = $1; $$->add_element($2);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5561 |
| sfc_network action |
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5562 |
{$$ = $1; $$->add_element($2);} |
131 | 5563 |
/* ERROR_CHECK_BEGIN */ |
5564 |
| sfc_network error |
|
5565 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5566 |
print_err_msg(current_filename, locl(@1), locf(@2), "unexpected token after SFC network in sequencial function chart."); |
131 | 5567 |
yyerrok; |
5568 |
} |
|
5569 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5570 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5571 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5572 |
initial_step: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5573 |
INITIAL_STEP step_name ':' action_association_list END_STEP |
13 | 5574 |
// INITIAL_STEP identifier ':' action_association_list END_STEP |
68 | 5575 |
{$$ = new initial_step_c($2, $4, locloc(@$));} |
131 | 5576 |
/* ERROR_CHECK_BEGIN */ |
5577 |
| INITIAL_STEP ':' action_association_list END_STEP |
|
5578 |
{$$ = NULL; |
|
5579 |
yynerrs++; |
|
5580 |
print_err_msg(current_filename, locf(@1), locl(@2), "no step name defined in initial step declaration."); |
|
5581 |
} |
|
5582 |
| INITIAL_STEP error ':' action_association_list END_STEP |
|
5583 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5584 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid step name defined in initial step declaration."); |
131 | 5585 |
yyerrok; |
5586 |
} |
|
5587 |
| INITIAL_STEP step_name action_association_list END_STEP |
|
5588 |
{$$ = NULL; |
|
5589 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5590 |
print_err_msg(current_filename, locl(@2), locf(@3), "':' missing after step name in initial step declaration."); |
131 | 5591 |
} |
5592 |
| INITIAL_STEP step_name error action_association_list END_STEP |
|
5593 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5594 |
print_err_msg(current_filename, locf(@3), locl(@3), "expecting ':' after step name in initial step declaration."); |
131 | 5595 |
yyerrok; |
5596 |
} |
|
5597 |
| INITIAL_STEP step_name ':' error END_STEP |
|
5598 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5599 |
print_err_msg(current_filename, locf(@4), locl(@4), "invalid action association list in initial step declaration."); |
131 | 5600 |
yyerrok; |
5601 |
} |
|
5602 |
| INITIAL_STEP error END_STEP |
|
5603 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5604 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in initial step declaration."); |
131 | 5605 |
yyerrok; |
5606 |
} |
|
5607 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5608 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5609 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5610 |
step: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5611 |
STEP step_name ':' action_association_list END_STEP |
13 | 5612 |
// STEP identifier ':' action_association_list END_STEP |
68 | 5613 |
{$$ = new step_c($2, $4, locloc(@$));} |
131 | 5614 |
/* ERROR_CHECK_BEGIN */ |
5615 |
| STEP ':' action_association_list END_STEP |
|
5616 |
{$$ = NULL; |
|
5617 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5618 |
print_err_msg(current_filename, locl(@1), locf(@2), "no step name defined in step declaration."); |
131 | 5619 |
} |
5620 |
| STEP error ':' action_association_list END_STEP |
|
5621 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5622 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid step name defined in step declaration."); |
131 | 5623 |
yyerrok; |
5624 |
} |
|
5625 |
| STEP step_name action_association_list END_STEP |
|
5626 |
{$$ = NULL; |
|
5627 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5628 |
print_err_msg(current_filename, locl(@2), locf(@3), "':' missing after step name in step declaration."); |
131 | 5629 |
} |
5630 |
| STEP step_name error action_association_list END_STEP |
|
5631 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5632 |
print_err_msg(current_filename, locf(@3), locl(@3), "expecting ':' after step name in step declaration."); |
131 | 5633 |
yyerrok; |
5634 |
} |
|
5635 |
| STEP step_name ':' error END_STEP |
|
5636 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5637 |
print_err_msg(current_filename, locf(@4), locl(@4), "invalid action association list in step declaration."); |
131 | 5638 |
yyerrok; |
5639 |
} |
|
5640 |
| STEP error END_STEP |
|
5641 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5642 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in step declaration."); |
131 | 5643 |
yyerrok; |
5644 |
} |
|
5645 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5646 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5647 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5648 |
/* helper symbol for: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5649 |
* - initial_step |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5650 |
* - step |
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5651 |
*/ |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5652 |
action_association_list: |
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5653 |
/* empty */ |
68 | 5654 |
{$$ = new action_association_list_c(locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5655 |
| action_association_list action_association ';' |
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5656 |
{$$ = $1; $$->add_element($2);} |
131 | 5657 |
/* ERROR_CHECK_BEGIN */ |
5658 |
| action_association_list action_association error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5659 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5660 |
print_err_msg(current_filename, locl(@2), locf(@3), "';' missing at end of action association declaration."); |
131 | 5661 |
yyerrok; |
5662 |
} |
|
5663 |
| action_association_list ';' |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5664 |
{$$ = $1; |
131 | 5665 |
yynerrs++; |
5666 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after action association declaration."); |
|
5667 |
} |
|
5668 |
/* ERROR_CHECK_END */ |
|
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5669 |
; |
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5670 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5671 |
|
13 | 5672 |
// step_name: identifier; |
5673 |
step_name: any_identifier; |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5674 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5675 |
action_association: |
68 | 5676 |
action_name '(' {cmd_goto_sfc_qualifier_state()} action_qualifier {cmd_pop_state()} indicator_name_list ')' |
5677 |
{$$ = new action_association_c($1, $4, $6, locloc(@$));} |
|
131 | 5678 |
/* ERROR_CHECK_BEGIN */ |
5679 |
/*| action_name '(' error indicator_name_list ')' |
|
5680 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5681 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid qualifier defined in action association."); |
131 | 5682 |
yyerrok; |
5683 |
}*/ |
|
5684 |
/* ERROR_CHECK_END */ |
|
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5685 |
; |
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5686 |
|
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5687 |
/* helper symbol for action_association */ |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5688 |
indicator_name_list: |
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5689 |
/* empty */ |
68 | 5690 |
{$$ = new indicator_name_list_c(locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5691 |
| indicator_name_list ',' indicator_name |
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5692 |
{$$ = $1; $$->add_element($3);} |
131 | 5693 |
/* ERROR_CHECK_BEGIN */ |
5694 |
| indicator_name_list indicator_name |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5695 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5696 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5697 |
print_err_msg(current_filename, locl(@1), locf(@2), "',' missing at end of action association declaration."); |
131 | 5698 |
} |
5699 |
| indicator_name_list ',' error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5700 |
{$$ = $1; |
131 | 5701 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected token after ',' in indicator list."); |
5702 |
yyerrok; |
|
5703 |
} |
|
5704 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5705 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5706 |
|
13 | 5707 |
// action_name: identifier; |
5708 |
action_name: any_identifier; |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5709 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5710 |
action_qualifier: |
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5711 |
/* empty */ |
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5712 |
{$$ = NULL;} |
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5713 |
| qualifier |
68 | 5714 |
{$$ = new action_qualifier_c($1, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5715 |
| timed_qualifier ',' action_time |
68 | 5716 |
{$$ = new action_qualifier_c($1, $3, locloc(@$));} |
131 | 5717 |
/* ERROR_CHECK_BEGIN */ |
5718 |
| timed_qualifier action_time |
|
5719 |
{$$ = NULL; |
|
5720 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5721 |
print_err_msg(current_filename, locl(@1), locf(@2), "',' missing between timed qualifier and action time in action qualifier."); |
131 | 5722 |
} |
5723 |
| timed_qualifier ',' error |
|
5724 |
{$$ = NULL; |
|
5725 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected token after ',' in action qualifier."); |
|
5726 |
yyerrok; |
|
5727 |
} |
|
5728 |
/* ERROR_CHECK_END */ |
|
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5729 |
; |
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5730 |
|
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5731 |
qualifier: |
94 | 5732 |
N {$$ = new qualifier_c(strdup("N"), locloc(@$));} |
68 | 5733 |
| R {$$ = new qualifier_c(strdup("R"), locloc(@$));} |
5734 |
| S {$$ = new qualifier_c(strdup("S"), locloc(@$));} |
|
5735 |
| P {$$ = new qualifier_c(strdup("P"), locloc(@$));} |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5736 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5737 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5738 |
timed_qualifier: |
94 | 5739 |
L {$$ = new timed_qualifier_c(strdup("L"), locloc(@$));} |
68 | 5740 |
| D {$$ = new timed_qualifier_c(strdup("D"), locloc(@$));} |
5741 |
| SD {$$ = new timed_qualifier_c(strdup("SD"), locloc(@$));} |
|
5742 |
| DS {$$ = new timed_qualifier_c(strdup("DS"), locloc(@$));} |
|
5743 |
| SL {$$ = new timed_qualifier_c(strdup("SL"), locloc(@$));} |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5744 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5745 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5746 |
action_time: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5747 |
duration |
10 | 5748 |
| variable |
5749 |
; |
|
5750 |
||
5751 |
indicator_name: variable; |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5752 |
|
13 | 5753 |
// transition_name: identifier; |
5754 |
transition_name: any_identifier; |
|
5755 |
||
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5756 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5757 |
steps: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5758 |
step_name |
68 | 5759 |
{$$ = new steps_c($1, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5760 |
| '(' step_name_list ')' |
68 | 5761 |
{$$ = new steps_c(NULL, $2, locloc(@$));} |
131 | 5762 |
/* ERROR_CHECK_BEGIN */ |
5763 |
| '(' step_name_list error |
|
5764 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5765 |
print_err_msg(current_filename, locl(@2), locf(@3), "expecting ')' at the end of step list in transition declaration."); |
131 | 5766 |
yyerrok; |
5767 |
} |
|
5768 |
| '(' error ')' |
|
5769 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5770 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid step list in transition declaration."); |
131 | 5771 |
yyerrok; |
5772 |
} |
|
5773 |
/* ERROR_CHECK_END */ |
|
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5774 |
; |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5775 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5776 |
step_name_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5777 |
step_name ',' step_name |
68 | 5778 |
{$$ = new step_name_list_c(locloc(@$)); $$->add_element($1); $$->add_element($3);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5779 |
| step_name_list ',' step_name |
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5780 |
{$$ = $1; $$->add_element($3);} |
131 | 5781 |
/* ERROR_CHECK_BEGIN */ |
5782 |
| step_name_list step_name |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5783 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5784 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5785 |
print_err_msg(current_filename, locl(@1), locf(@2), "',' missing in step list."); |
131 | 5786 |
} |
5787 |
| step_name_list ',' error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5788 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5789 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ',' in step list."); |
131 | 5790 |
yyerrok; |
5791 |
} |
|
5792 |
/* ERROR_CHECK_END */ |
|
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5793 |
; |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5794 |
|
13 | 5795 |
|
85 | 5796 |
/* NOTE: flex will automatically pop() out of body_state to previous state. |
94 | 5797 |
* We do not need to give a command from bison to return to previous flex state, |
5798 |
* after forcing flex to go to body_state. |
|
85 | 5799 |
*/ |
5800 |
transition: |
|
131 | 5801 |
TRANSITION transition_priority |
85 | 5802 |
FROM steps TO steps |
5803 |
{cmd_goto_body_state();} transition_condition |
|
5804 |
END_TRANSITION |
|
131 | 5805 |
{$$ = new transition_c(NULL, $2, $4, $6, $8, locloc(@$));} |
85 | 5806 |
//| TRANSITION identifier FROM steps TO steps ... |
131 | 5807 |
| TRANSITION transition_name transition_priority |
85 | 5808 |
FROM steps TO steps |
5809 |
{cmd_goto_body_state();} transition_condition |
|
5810 |
END_TRANSITION |
|
131 | 5811 |
{$$ = new transition_c($2, $3, $5, $7, $9, locloc(@$));} |
5812 |
/* ERROR_CHECK_BEGIN */ |
|
5813 |
| TRANSITION error transition_priority FROM steps TO steps {cmd_goto_body_state();} transition_condition END_TRANSITION |
|
5814 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5815 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid transition name defined in transition declaration."); |
131 | 5816 |
yyerrok; |
5817 |
} |
|
5818 |
| TRANSITION transition_name error FROM steps TO steps {cmd_goto_body_state();} transition_condition END_TRANSITION |
|
5819 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5820 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid transition priority defined in transition declaration."); |
131 | 5821 |
yyerrok; |
5822 |
} |
|
5823 |
| TRANSITION transition_priority FROM TO steps {cmd_goto_body_state();} transition_condition END_TRANSITION |
|
5824 |
{$$ = NULL; |
|
5825 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5826 |
print_err_msg(current_filename, locl(@3), locf(@4), "no origin step(s) defined in transition declaration."); |
131 | 5827 |
} |
5828 |
| TRANSITION transition_name transition_priority FROM TO steps {cmd_goto_body_state();} transition_condition END_TRANSITION |
|
5829 |
{$$ = NULL; |
|
5830 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5831 |
print_err_msg(current_filename, locl(@4), locf(@5), "no origin step(s) defined in transition declaration."); |
131 | 5832 |
} |
5833 |
| TRANSITION transition_priority FROM error TO steps {cmd_goto_body_state();} transition_condition END_TRANSITION |
|
5834 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5835 |
print_err_msg(current_filename, locf(@4), locl(@4), "invalid origin step(s) defined in transition declaration."); |
131 | 5836 |
yyerrok; |
5837 |
} |
|
5838 |
| TRANSITION transition_name transition_priority FROM error TO steps {cmd_goto_body_state();} transition_condition END_TRANSITION |
|
5839 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5840 |
print_err_msg(current_filename, locf(@5), locl(@5), "invalid origin step(s) defined in transition declaration."); |
131 | 5841 |
yyerrok; |
5842 |
} |
|
5843 |
| TRANSITION transition_priority FROM steps steps {cmd_goto_body_state();} transition_condition END_TRANSITION |
|
5844 |
{$$ = NULL; |
|
5845 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5846 |
print_err_msg(current_filename, locl(@4), locf(@5), "'TO' missing between origin step(s) and destination step(s) in transition declaration."); |
131 | 5847 |
} |
5848 |
| TRANSITION transition_name transition_priority FROM steps steps {cmd_goto_body_state();} transition_condition END_TRANSITION |
|
5849 |
{$$ = NULL; |
|
5850 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5851 |
print_err_msg(current_filename, locl(@5), locf(@6), "'TO' missing between origin step(s) and destination step(s) in transition declaration."); |
131 | 5852 |
} |
5853 |
| TRANSITION transition_priority FROM steps error steps {cmd_goto_body_state();} transition_condition END_TRANSITION |
|
5854 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5855 |
print_err_msg(current_filename, locf(@5), locl(@5), "expecting 'TO' between origin step(s) and destination step(s) in transition declaration."); |
131 | 5856 |
yyerrok; |
5857 |
} |
|
5858 |
| TRANSITION transition_name transition_priority FROM steps error steps {cmd_goto_body_state();} transition_condition END_TRANSITION |
|
5859 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5860 |
print_err_msg(current_filename, locf(@6), locl(@6), "expecting 'TO' between origin step(s) and destination step(s) in transition declaration."); |
131 | 5861 |
yyerrok; |
5862 |
} |
|
5863 |
| TRANSITION transition_priority FROM steps TO {cmd_goto_body_state();} transition_condition END_TRANSITION |
|
5864 |
{$$ = NULL; |
|
5865 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5866 |
print_err_msg(current_filename, locl(@5), locf(@7), "no destination step(s) defined in transition declaration."); |
131 | 5867 |
} |
5868 |
| TRANSITION transition_name transition_priority FROM steps TO {cmd_goto_body_state();} transition_condition END_TRANSITION |
|
5869 |
{$$ = NULL; |
|
5870 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5871 |
print_err_msg(current_filename, locl(@6), locf(@8), "no destination step(s) defined in transition declaration."); |
131 | 5872 |
} |
5873 |
| TRANSITION transition_priority FROM steps TO error {cmd_goto_body_state();} transition_condition END_TRANSITION |
|
5874 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5875 |
print_err_msg(current_filename, locf(@6), locl(@6), "invalid destination step(s) defined in transition declaration."); |
131 | 5876 |
yyerrok; |
5877 |
} |
|
5878 |
| TRANSITION transition_name transition_priority FROM steps TO error {cmd_goto_body_state();} transition_condition END_TRANSITION |
|
5879 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5880 |
print_err_msg(current_filename, locf(@7), locl(@7), "invalid destination step(s) defined in transition declaration."); |
131 | 5881 |
yyerrok; |
5882 |
} |
|
5883 |
| TRANSITION transition_priority {cmd_goto_body_state();} transition_condition END_TRANSITION |
|
5884 |
{$$ = NULL; |
|
5885 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5886 |
print_err_msg(current_filename, locl(@2), locf(@4), "no origin and destination step(s) defined in transition declaration."); |
131 | 5887 |
} |
5888 |
| TRANSITION transition_name transition_priority {cmd_goto_body_state();} transition_condition END_TRANSITION |
|
5889 |
{$$ = NULL; |
|
5890 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5891 |
print_err_msg(current_filename, locl(@3), locf(@5), "no origin and destination step(s) defined in transition declaration."); |
131 | 5892 |
} |
5893 |
| TRANSITION error END_TRANSITION |
|
5894 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5895 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in transition declaration."); |
131 | 5896 |
yyerrok; |
5897 |
} |
|
5898 |
/* ERROR_CHECK_END */ |
|
5899 |
; |
|
5900 |
||
5901 |
transition_priority: |
|
5902 |
/* empty */ |
|
5903 |
{$$ = NULL;} |
|
5904 |
| '(' {cmd_goto_sfc_priority_state();} PRIORITY {cmd_pop_state();} ASSIGN integer ')' |
|
5905 |
{$$ = $6;} |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5906 |
/* ERROR_CHECK_BEGIN */ |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5907 |
| '(' ASSIGN integer ')' |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5908 |
{$$ = NULL; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5909 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5910 |
print_err_msg(current_filename, locl(@1), locf(@2), "'PRIORITY' missing between '(' and ':=' in transition declaration with priority."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5911 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5912 |
| '(' error ASSIGN integer ')' |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5913 |
{$$ = NULL; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5914 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting 'PRIORITY' between '(' and ':=' in transition declaration with priority."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5915 |
yyerrok; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5916 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5917 |
//* ERROR_CHECK_END */ |
131 | 5918 |
; |
85 | 5919 |
|
5920 |
||
5921 |
transition_condition: |
|
10 | 5922 |
':' eol_list simple_instr_list |
88 | 5923 |
{$$ = new transition_condition_c($3, NULL, locloc(@$));} |
85 | 5924 |
| ASSIGN expression ';' |
88 | 5925 |
{$$ = new transition_condition_c(NULL, $2, locloc(@$));} |
131 | 5926 |
/* ERROR_CHECK_BEGIN */ |
5927 |
| eol_list simple_instr_list |
|
5928 |
{$$ = NULL; |
|
5929 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5930 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing before IL condition in transition declaration."); |
131 | 5931 |
} |
5932 |
| ':' eol_list error |
|
5933 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5934 |
print_err_msg(current_filename, locl(@2), locf(@3), "no instructions defined in IL condition of transition declaration."); |
131 | 5935 |
yyerrok; |
5936 |
} |
|
5937 |
| ASSIGN ';' |
|
5938 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5939 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5940 |
print_err_msg(current_filename, locl(@1), locf(@2), "no expression defined in ST condition of transition declaration."); |
131 | 5941 |
} |
5942 |
| ASSIGN error ';' |
|
5943 |
{$$ = NULL; |
|
5944 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid expression defined in ST condition of transition declaration."); |
|
5945 |
yyerrok; |
|
5946 |
} |
|
5947 |
| ASSIGN expression error |
|
5948 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5949 |
print_err_msg(current_filename, locl(@2), locf(@3), "expecting ';' after expression defined in ST condition of transition declaration."); |
131 | 5950 |
yyerrok; |
5951 |
} |
|
5952 |
/* ERROR_CHECK_END */ |
|
10 | 5953 |
; |
3 | 5954 |
|
68 | 5955 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5956 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5957 |
action: |
85 | 5958 |
// ACTION identifier ':' ... |
5959 |
ACTION action_name ':' {cmd_goto_body_state();} function_block_body END_ACTION |
|
5960 |
{$$ = new action_c($2, $5, locloc(@$));} |
|
131 | 5961 |
/* ERROR_CHECK_BEGIN */ |
5962 |
| ACTION ':' {cmd_goto_body_state();} function_block_body END_ACTION |
|
5963 |
{$$ = NULL; |
|
5964 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5965 |
print_err_msg(current_filename, locl(@1), locf(@2), "no action name defined in action declaration."); |
131 | 5966 |
} |
5967 |
| ACTION error ':' {cmd_goto_body_state();} function_block_body END_ACTION |
|
5968 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5969 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid action name defined in action declaration."); |
131 | 5970 |
yyerrok; |
5971 |
} |
|
5972 |
| ACTION action_name {cmd_goto_body_state();} function_block_body END_ACTION |
|
5973 |
{$$ = NULL; |
|
5974 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5975 |
print_err_msg(current_filename, locl(@2), locf(@4), "':' missing after action name in action declaration."); |
131 | 5976 |
} |
5977 |
| ACTION action_name ':' END_ACTION |
|
5978 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5979 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5980 |
print_err_msg(current_filename, locl(@3), locf(@4), "no body defined in action declaration."); |
131 | 5981 |
} |
5982 |
| ACTION error END_ACTION |
|
5983 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
5984 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in action declaration."); |
131 | 5985 |
yyerrok; |
5986 |
} |
|
5987 |
/* ERROR_CHECK_END */ |
|
1
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5988 |
; |
5d893a68be6e
Changes made since Mario visit at LOLITECH. Thanks again !
etisserant
parents:
0
diff
changeset
|
5989 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5990 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5991 |
/********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5992 |
/* B 1.7 Configuration elements */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5993 |
/********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5994 |
/* NOTE: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5995 |
* It is not clear from reading the specification to which namespace |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5996 |
* the names of resources, tasks and programs belong to. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5997 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5998 |
* The following syntax assumes that resource and program names belong to the |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
5999 |
* same namespace as the variables defined within |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6000 |
* the resource/configuration (i.e. VAR_GLOBAL). |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6001 |
* Task names belong to a namespace all of their own, since they don't |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6002 |
* produce conflicts in the syntax parser, so we might just as well |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6003 |
* leave them be! ;-) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6004 |
* The above decision was made taking into |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6005 |
* account that inside a VAR_CONFIG declaration global variables |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6006 |
* may be referenced starting off from the resource name as: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6007 |
* resource_name.program_name.variable_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6008 |
* Notice how resource names and program names are used in a very similar |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6009 |
* manner as are variable names. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6010 |
* Using a single namespace for all the above mentioned names |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6011 |
* also makes it easier to write the syntax parser!! ;-) Using a private |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6012 |
* namespace for each of the name types (resource names, program names, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6013 |
* global varaiable names), i.e. letting the names be re-used across |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6014 |
* each of the groups (resource, program, global variables), produces |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6015 |
* reduce/reduce conflicts in the syntax parser. Actually, it is only |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6016 |
* the resource names that need to be distinguished into a |
131 | 6017 |
* prev_declared_resource_name so as not to conflict with [gloabl] variable |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6018 |
* names in the 'data' construct. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6019 |
* The program names are only tracked to make sure that two programs do not |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6020 |
* get the same name. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6021 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6022 |
* Using a single namespace does have the drawback that the user will |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6023 |
* not be able to re-use names for resources or programs if these |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6024 |
* have already been used to name a variable! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6025 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6026 |
* If it ever becomes necessary to change this interpretation of |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6027 |
* the syntax, then this section of the syntax parser must be updated! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6028 |
*/ |
68 | 6029 |
prev_declared_global_var_name: prev_declared_global_var_name_token {$$ = new identifier_c($1, locloc(@$));}; |
6030 |
prev_declared_resource_name: prev_declared_resource_name_token {$$ = new identifier_c($1, locloc(@$));}; |
|
6031 |
prev_declared_program_name: prev_declared_program_name_token {$$ = new identifier_c($1, locloc(@$));}; |
|
6032 |
// prev_declared_task_name: prev_declared_task_name_token {$$ = new identifier_c($1, locloc(@$));}; |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6033 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6034 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6035 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6036 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6037 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6038 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6039 |
configuration_name: identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6040 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6041 |
/* NOTE: The specification states that valid resource type names |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6042 |
* are implementation defined, i.e. each implementaion will define |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6043 |
* what resource types it supports. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6044 |
* We are implementing this syntax parser to be used by any |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6045 |
* implementation, so at the moment we accept any identifier |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6046 |
* as a resource type name. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6047 |
* This implementation should probably be changed in the future. We |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6048 |
* should probably have a resource_type_name_token, and let the |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6049 |
* implementation load the global symbol library with the |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6050 |
* accepted resource type names before parsing the code. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6051 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6052 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6053 |
resource_type_name: any_identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6054 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6055 |
configuration_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6056 |
CONFIGURATION configuration_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6057 |
optional_global_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6058 |
single_resource_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6059 |
{variable_name_symtable.pop();} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6060 |
optional_access_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6061 |
optional_instance_specific_initializations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6062 |
END_CONFIGURATION |
68 | 6063 |
{$$ = new configuration_declaration_c($2, $3, $4, $6, $7, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6064 |
library_element_symtable.insert($2, prev_declared_configuration_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6065 |
variable_name_symtable.pop(); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6066 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6067 |
| CONFIGURATION configuration_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6068 |
optional_global_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6069 |
resource_declaration_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6070 |
optional_access_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6071 |
optional_instance_specific_initializations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6072 |
END_CONFIGURATION |
68 | 6073 |
{$$ = new configuration_declaration_c($2, $3, $4, $5, $6, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6074 |
library_element_symtable.insert($2, prev_declared_configuration_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6075 |
variable_name_symtable.pop(); |
85 | 6076 |
} |
68 | 6077 |
/* ERROR_CHECK_BEGIN */ |
131 | 6078 |
| CONFIGURATION |
6079 |
optional_global_var_declarations |
|
6080 |
single_resource_declaration |
|
6081 |
{variable_name_symtable.pop();} |
|
6082 |
optional_access_declarations |
|
6083 |
optional_instance_specific_initializations |
|
6084 |
END_CONFIGURATION |
|
6085 |
{$$ = NULL; |
|
6086 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6087 |
print_err_msg(current_filename, locl(@1), locf(@2), "no configuration name defined in configuration declaration."); |
131 | 6088 |
} |
6089 |
| CONFIGURATION |
|
6090 |
optional_global_var_declarations |
|
6091 |
resource_declaration_list |
|
6092 |
optional_access_declarations |
|
6093 |
optional_instance_specific_initializations |
|
6094 |
END_CONFIGURATION |
|
6095 |
{$$ = NULL; |
|
6096 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6097 |
print_err_msg(current_filename, locl(@1), locf(@2), "no configuration name defined in configuration declaration."); |
131 | 6098 |
} |
6099 |
| CONFIGURATION error |
|
6100 |
optional_global_var_declarations |
|
6101 |
single_resource_declaration |
|
6102 |
{variable_name_symtable.pop();} |
|
6103 |
optional_access_declarations |
|
6104 |
optional_instance_specific_initializations |
|
6105 |
END_CONFIGURATION |
|
6106 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6107 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid configuration name defined in configuration declaration."); |
131 | 6108 |
yyerrok; |
6109 |
} |
|
6110 |
| CONFIGURATION error |
|
6111 |
optional_global_var_declarations |
|
6112 |
resource_declaration_list |
|
6113 |
optional_access_declarations |
|
6114 |
optional_instance_specific_initializations |
|
6115 |
END_CONFIGURATION |
|
6116 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6117 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid configuration name defined in configuration declaration."); |
131 | 6118 |
yyerrok; |
6119 |
} |
|
6120 |
| CONFIGURATION configuration_name |
|
6121 |
optional_global_var_declarations |
|
6122 |
optional_access_declarations |
|
6123 |
optional_instance_specific_initializations |
|
6124 |
END_CONFIGURATION |
|
6125 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6126 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6127 |
print_err_msg(current_filename, locl(@3), locf(@4), "no resource(s) defined in configuration declaration."); |
131 | 6128 |
} |
6129 |
| CONFIGURATION configuration_name |
|
6130 |
optional_global_var_declarations |
|
6131 |
error |
|
6132 |
optional_access_declarations |
|
6133 |
optional_instance_specific_initializations |
|
6134 |
END_CONFIGURATION |
|
6135 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6136 |
print_err_msg(current_filename, locf(@4), locl(@4), "invalid resource(s) defined in configuration declaration."); |
131 | 6137 |
yyerrok; |
6138 |
} |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6139 |
| CONFIGURATION error END_CONFIGURATION |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6140 |
{$$ = NULL; |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6141 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in configuration declaration."); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6142 |
yyerrok; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6143 |
} |
68 | 6144 |
/* ERROR_CHECK_END */ |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6145 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6146 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6147 |
// helper symbol for |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6148 |
// - configuration_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6149 |
// - resource_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6150 |
// |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6151 |
optional_global_var_declarations: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6152 |
// empty |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6153 |
{$$ = NULL;} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6154 |
| global_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6155 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6156 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6157 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6158 |
// helper symbol for configuration_declaration // |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6159 |
optional_access_declarations: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6160 |
// empty |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6161 |
{$$ = NULL;} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6162 |
//| access_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6163 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6164 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6165 |
// helper symbol for configuration_declaration // |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6166 |
optional_instance_specific_initializations: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6167 |
// empty |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6168 |
{$$ = NULL;} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6169 |
| instance_specific_initializations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6170 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6171 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6172 |
// helper symbol for configuration_declaration // |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6173 |
resource_declaration_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6174 |
resource_declaration |
68 | 6175 |
{$$ = new resource_declaration_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6176 |
| resource_declaration_list resource_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6177 |
{$$ = $1; $$->add_element($2);} |
131 | 6178 |
/* ERROR_CHECK_BEGIN */ |
6179 |
| resource_declaration_list error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6180 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6181 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected token after resource declaration."); |
131 | 6182 |
yyerrok; |
6183 |
} |
|
6184 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6185 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6186 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6187 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6188 |
resource_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6189 |
RESOURCE {variable_name_symtable.push();} resource_name ON resource_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6190 |
optional_global_var_declarations |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6191 |
single_resource_declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6192 |
END_RESOURCE |
68 | 6193 |
{$$ = new resource_declaration_c($3, $5, $6, $7, locloc(@$)); |
13 | 6194 |
variable_name_symtable.pop(); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6195 |
variable_name_symtable.insert($3, prev_declared_resource_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6196 |
} |
131 | 6197 |
/* ERROR_CHECK_BEGIN */ |
6198 |
| RESOURCE {variable_name_symtable.push();} ON resource_type_name |
|
6199 |
optional_global_var_declarations |
|
6200 |
single_resource_declaration |
|
6201 |
END_RESOURCE |
|
6202 |
{$$ = NULL; |
|
6203 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6204 |
print_err_msg(current_filename, locl(@1), locf(@3), "no resource name defined in resource declaration."); |
131 | 6205 |
} |
6206 |
| RESOURCE error END_RESOURCE |
|
6207 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6208 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in resource declaration."); |
131 | 6209 |
yyerrok; |
6210 |
} |
|
6211 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6212 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6213 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6214 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6215 |
single_resource_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6216 |
task_configuration_list program_configuration_list |
68 | 6217 |
{$$ = new single_resource_declaration_c($1, $2, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6218 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6219 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6220 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6221 |
// helper symbol for single_resource_declaration // |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6222 |
task_configuration_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6223 |
// empty |
68 | 6224 |
{$$ = new task_configuration_list_c(locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6225 |
| task_configuration_list task_configuration ';' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6226 |
{$$ = $1; $$->add_element($2);} |
131 | 6227 |
/* ERROR_CHECK_BEGIN */ |
6228 |
| task_configuration_list task_configuration error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6229 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6230 |
print_err_msg(current_filename, locl(@1), locf(@2), "';' missing at the end of task configuration in resource declaration."); |
131 | 6231 |
yyerrok; |
6232 |
} |
|
6233 |
| task_configuration_list ';' |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6234 |
{$$ = $1; |
131 | 6235 |
yynerrs++; |
133 | 6236 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after task configuration in resource declaration."); |
131 | 6237 |
} |
6238 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6239 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6240 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6241 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6242 |
// helper symbol for single_resource_declaration // |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6243 |
program_configuration_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6244 |
program_configuration ';' |
68 | 6245 |
{$$ = new program_configuration_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6246 |
| program_configuration_list program_configuration ';' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6247 |
{$$ = $1; $$->add_element($2);} |
131 | 6248 |
/* ERROR_CHECK_BEGIN */ |
6249 |
| program_configuration error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6250 |
{$$ = new program_configuration_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6251 |
print_err_msg(current_filename, locl(@1), locf(@2), "';' missing at the end of program configuration in resource declaration."); |
131 | 6252 |
yyerrok; |
6253 |
} |
|
6254 |
| program_configuration_list program_configuration error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6255 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6256 |
print_err_msg(current_filename, locl(@2), locf(@3), "';' missing at the end of program configuration in resource declaration."); |
131 | 6257 |
yyerrok; |
6258 |
} |
|
133 | 6259 |
| program_configuration_list error ';' |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6260 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6261 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid program configuration in resource declaration."); |
133 | 6262 |
yyerrok; |
6263 |
} |
|
131 | 6264 |
| program_configuration_list ';' |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6265 |
{$$ = $1; |
131 | 6266 |
yynerrs++; |
6267 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after program configuration in resource declaration."); |
|
6268 |
} |
|
6269 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6270 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6271 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6272 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6273 |
resource_name: identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6274 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6275 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6276 |
access_declarations: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6277 |
VAR_ACCESS access_declaration_list END_VAR |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6278 |
{$$ = NULL;} |
131 | 6279 |
// ERROR_CHECK_BEGIN // |
6280 |
| VAR_ACCESS END_VAR |
|
6281 |
{$$ = NULL; |
|
6282 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6283 |
print_err_msg(current_filename, locl(@1), locf(@2), "no variable declared in access variable(s) declaration."); |
131 | 6284 |
} |
6285 |
| VAR_ACCESS error access_declaration_list END_VAR |
|
6286 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6287 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected token after 'VAR_ACCESS' in access variable(s) declaration."); |
131 | 6288 |
yyerrok; |
6289 |
} |
|
6290 |
| VAR_ACCESS error END_VAR |
|
6291 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6292 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in access variable(s) declaration."); |
131 | 6293 |
yyerrok; |
6294 |
} |
|
6295 |
// ERROR_CHECK_END // |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6296 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6297 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6298 |
// helper symbol for access_declarations // |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6299 |
access_declaration_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6300 |
access_declaration ';' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6301 |
| access_declaration_list access_declaration ';' |
131 | 6302 |
// ERROR_CHECK_BEGIN // |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6303 |
| error ';' |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6304 |
{$$ = // create a new list //; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6305 |
print_err_msg(current_filename, locf(@1), locl(@1), "invalid access variable declaration."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6306 |
yyerrok; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6307 |
} |
131 | 6308 |
| access_declaration error |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6309 |
{$$ = // create a new list //; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6310 |
print_err_msg(current_filename, locl(@1), locf(@2), "';' missing at the end of access variable declaration."); |
131 | 6311 |
yyerrok; |
6312 |
} |
|
6313 |
| access_declaration_list access_declaration error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6314 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6315 |
print_err_msg(current_filename, locl(@2), locf(@3), "';' missing at the end of access variable declaration."); |
131 | 6316 |
yyerrok; |
6317 |
} |
|
133 | 6318 |
| access_declaration_list error ';' |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6319 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6320 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid access variable declaration."); |
133 | 6321 |
yyerrok; |
6322 |
} |
|
131 | 6323 |
| access_declaration_list ';' |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6324 |
{$$ = $1; |
131 | 6325 |
yynerrs++; |
6326 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after access variable declaration."); |
|
6327 |
} |
|
6328 |
// ERROR_CHECK_END // |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6329 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6330 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6331 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6332 |
access_declaration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6333 |
access_name ':' access_path ':' non_generic_type_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6334 |
| access_name ':' access_path ':' non_generic_type_name direction |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6335 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6336 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6337 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6338 |
access_path: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6339 |
direct_variable |
131 | 6340 |
| prev_declared_resource_name '.' direct_variable |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6341 |
| any_fb_name_list symbolic_variable |
131 | 6342 |
| prev_declared_resource_name '.' any_fb_name_list symbolic_variable |
6343 |
| prev_declared_program_name '.' any_fb_name_list symbolic_variable |
|
6344 |
| prev_declared_resource_name '.' prev_declared_program_name '.' any_fb_name_list symbolic_variable |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6345 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6346 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6347 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6348 |
// helper symbol for |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6349 |
// - access_path |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6350 |
// - instance_specific_init |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6351 |
// |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6352 |
/* NOTE: The fb_name_list refers to funtion block variables |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6353 |
* that have been declared in a scope outside the one we are |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6354 |
* currently parsing, so we must accept them to be any_identifier! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6355 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6356 |
* Beware that other locations of this syntax parser also require |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6357 |
* a fb_name_list. In those locations the function blocks are being declared, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6358 |
* so only currently un-used identifiers (i.e. identifier) may be accepted. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6359 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6360 |
* In order to distinguish the two, here we use any_fb_name_list, while |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6361 |
* in the the locations we simply use fb_name_list! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6362 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6363 |
any_fb_name_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6364 |
// empty |
68 | 6365 |
{$$ = new any_fb_name_list_c(locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6366 |
//| fb_name_list fb_name '.' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6367 |
| any_fb_name_list any_identifier '.' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6368 |
{$$ = $1; $$->add_element($2);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6369 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6370 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6371 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6372 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6373 |
global_var_reference: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6374 |
// [resource_name '.'] global_var_name ['.' structure_element_name] // |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6375 |
prev_declared_global_var_name |
68 | 6376 |
{$$ = new global_var_reference_c(NULL, $1, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6377 |
| prev_declared_global_var_name '.' structure_element_name |
68 | 6378 |
{$$ = new global_var_reference_c(NULL, $1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6379 |
| prev_declared_resource_name '.' prev_declared_global_var_name |
68 | 6380 |
{$$ = new global_var_reference_c($1, $3, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6381 |
| prev_declared_resource_name '.' prev_declared_global_var_name '.' structure_element_name |
68 | 6382 |
{$$ = new global_var_reference_c($1, $3, $5, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6383 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6384 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6385 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6386 |
//access_name: identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6387 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6388 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6389 |
program_output_reference: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6390 |
/* NOTE: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6391 |
* program_output_reference is merely used within data_source. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6392 |
* data_source is merely used within task_initialization |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6393 |
* task_initialization appears in a configuration declaration |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6394 |
* _before_ the programs are declared, so we cannot use |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6395 |
* prev_declared_program_name, as what might seem correct at first. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6396 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6397 |
* The semantic checker must later check whether the identifier |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6398 |
* used really refers to a program declared after the task |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6399 |
* initialization! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6400 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6401 |
// prev_declared_program_name '.' symbolic_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6402 |
program_name '.' symbolic_variable |
68 | 6403 |
{$$ = new program_output_reference_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6404 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6405 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6406 |
program_name: identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6407 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6408 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6409 |
direction: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6410 |
READ_WRITE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6411 |
{$$ = NULL;} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6412 |
| READ_ONLY |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6413 |
{$$ = NULL;} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6414 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6415 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6416 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6417 |
task_configuration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6418 |
TASK task_name task_initialization |
68 | 6419 |
{$$ = new task_configuration_c($2, $3, locloc(@$));} |
131 | 6420 |
/* ERROR_CHECK_BEGIN */ |
6421 |
| TASK task_initialization |
|
6422 |
{$$ = NULL; |
|
6423 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6424 |
print_err_msg(current_filename, locl(@1), locf(@2), "no task name defined in task declaration."); |
131 | 6425 |
} |
6426 |
| TASK error task_initialization |
|
6427 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6428 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid task name defined in task declaration."); |
131 | 6429 |
yyerrok; |
6430 |
} |
|
6431 |
| TASK task_name error |
|
6432 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6433 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid task initialization in task declaration."); |
131 | 6434 |
yyerrok; |
6435 |
} |
|
6436 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6437 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6438 |
|
75 | 6439 |
/* NOTE: The specification does not mention the namespace to which task names |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6440 |
* should belong to. Unlike resource and program names, for the moment we |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6441 |
* let the task names belong to their own private namespace, as they do not |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6442 |
* produce any conflicts in the syntax parser. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6443 |
* If in the future our interpretation of the spec. turns out to be incorrect, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6444 |
* the definition of task_name may have to be changed! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6445 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6446 |
task_name: any_identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6447 |
|
74
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
6448 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6449 |
task_initialization: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6450 |
// '(' [SINGLE ASSIGN data_source ','] [INTERVAL ASSIGN data_source ','] PRIORITY ASSIGN integer ')' // |
75 | 6451 |
'(' {cmd_goto_task_init_state();} task_initialization_single task_initialization_interval task_initialization_priority ')' |
6452 |
{$$ = new task_initialization_c($3, $4, $5, locloc(@$));} |
|
74
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
6453 |
; |
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
6454 |
|
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
6455 |
|
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
6456 |
task_initialization_single: |
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
6457 |
// [SINGLE ASSIGN data_source ','] |
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
6458 |
/* empty */ |
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
6459 |
{$$ = NULL;} |
75 | 6460 |
| SINGLE ASSIGN {cmd_pop_state();} data_source ',' {cmd_goto_task_init_state();} |
6461 |
{$$ = $4;} |
|
131 | 6462 |
/* ERROR_CHECK_BEGIN */ |
6463 |
| SINGLE {cmd_pop_state();} data_source ',' {cmd_goto_task_init_state();} |
|
6464 |
{$$ = NULL; |
|
6465 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6466 |
print_err_msg(current_filename, locl(@1), locf(@3), "':=' missing after 'SINGLE' in task initialization."); |
131 | 6467 |
} |
6468 |
| SINGLE error {cmd_pop_state();} data_source ',' {cmd_goto_task_init_state();} |
|
6469 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6470 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting ':=' after 'SINGLE' in task initialization."); |
131 | 6471 |
yyerrok; |
6472 |
} |
|
6473 |
| SINGLE ASSIGN {cmd_pop_state();} ',' {cmd_goto_task_init_state();} |
|
6474 |
{$$ = NULL; |
|
6475 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6476 |
print_err_msg(current_filename, locl(@2), locf(@4), "no data source defined in 'SINGLE' statement of task initialization."); |
131 | 6477 |
} |
6478 |
| SINGLE ASSIGN {cmd_pop_state();} error ',' {cmd_goto_task_init_state();} |
|
6479 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6480 |
print_err_msg(current_filename, locf(@4), locl(@4), "invalid data source defined in 'SINGLE' statement of task initialization."); |
131 | 6481 |
yyerrok; |
6482 |
} |
|
6483 |
/* ERROR_CHECK_END */ |
|
74
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
6484 |
; |
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
6485 |
|
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
6486 |
|
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
6487 |
task_initialization_interval: |
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
6488 |
// [INTERVAL ASSIGN data_source ','] |
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
6489 |
/* empty */ |
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
6490 |
{$$ = NULL;} |
75 | 6491 |
| INTERVAL ASSIGN {cmd_pop_state();} data_source ',' {cmd_goto_task_init_state();} |
6492 |
{$$ = $4;} |
|
131 | 6493 |
/* ERROR_CHECK_BEGIN */ |
6494 |
| INTERVAL {cmd_pop_state();} data_source ',' {cmd_goto_task_init_state();} |
|
6495 |
{$$ = NULL; |
|
6496 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6497 |
print_err_msg(current_filename, locl(@1), locf(@3), "':=' missing after 'INTERVAL' in task initialization."); |
131 | 6498 |
} |
6499 |
| INTERVAL error {cmd_pop_state();} data_source ',' {cmd_goto_task_init_state();} |
|
6500 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6501 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting ':=' after 'INTERVAL' in task initialization."); |
131 | 6502 |
yyerrok; |
6503 |
} |
|
6504 |
| INTERVAL ASSIGN {cmd_pop_state();} ',' {cmd_goto_task_init_state();} |
|
6505 |
{$$ = NULL; |
|
6506 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6507 |
print_err_msg(current_filename, locl(@2), locf(@4), "no data source defined in 'INTERVAL' statement of task initialization."); |
131 | 6508 |
} |
6509 |
| INTERVAL ASSIGN {cmd_pop_state();} error ',' {cmd_goto_task_init_state();} |
|
6510 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6511 |
print_err_msg(current_filename, locf(@4), locl(@4), "invalid data source defined in 'INTERVAL' statement of task initialization."); |
131 | 6512 |
yyerrok; |
6513 |
} |
|
6514 |
/* ERROR_CHECK_END */ |
|
75 | 6515 |
; |
6516 |
||
74
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
6517 |
|
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
6518 |
|
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
6519 |
task_initialization_priority: |
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
6520 |
// PRIORITY ASSIGN integer |
75 | 6521 |
PRIORITY ASSIGN {cmd_pop_state();} integer |
6522 |
{$$ = $4;} |
|
131 | 6523 |
/* ERROR_CHECK_BEGIN */ |
6524 |
| PRIORITY {cmd_pop_state();} integer |
|
6525 |
{$$ = NULL; |
|
6526 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6527 |
print_err_msg(current_filename, locl(@1), locf(@3), "':=' missing after 'PRIORITY' in task initialization."); |
131 | 6528 |
} |
6529 |
| PRIORITY error {cmd_pop_state();} integer |
|
6530 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6531 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting ':=' after 'PRIORITY' in task initialization."); |
131 | 6532 |
yyerrok; |
6533 |
} |
|
6534 |
| PRIORITY ASSIGN {cmd_pop_state();} error |
|
6535 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6536 |
print_err_msg(current_filename, locl(@2), locf(@4), "no priority number defined in 'PRIORITY' statement of task initialization."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6537 |
yyerrok; |
131 | 6538 |
} |
6539 |
/* ERROR_CHECK_END */ |
|
75 | 6540 |
; |
6541 |
||
74
85af9521bf63
fixing identifier issues of PRIORITY, SINGLE, and INTERVAL
mario
parents:
73
diff
changeset
|
6542 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6543 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6544 |
data_source: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6545 |
constant |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6546 |
| global_var_reference |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6547 |
| program_output_reference |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6548 |
| direct_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6549 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6550 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6551 |
program_configuration: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6552 |
// PROGRAM [RETAIN | NON_RETAIN] program_name [WITH task_name] ':' program_type_name ['(' prog_conf_elements ')'] // |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6553 |
PROGRAM program_name optional_task_name ':' prev_declared_program_type_name optional_prog_conf_elements |
68 | 6554 |
{$$ = new program_configuration_c(NULL, $2, $3, $5, $6, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6555 |
variable_name_symtable.insert($2, prev_declared_program_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6556 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6557 |
| PROGRAM RETAIN program_name optional_task_name ':' prev_declared_program_type_name optional_prog_conf_elements |
68 | 6558 |
{$$ = new program_configuration_c(new retain_option_c(locloc(@2)), $3, $4, $6, $7, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6559 |
variable_name_symtable.insert($3, prev_declared_program_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6560 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6561 |
| PROGRAM NON_RETAIN program_name optional_task_name ':' prev_declared_program_type_name optional_prog_conf_elements |
68 | 6562 |
{$$ = new program_configuration_c(new non_retain_option_c(locloc(@2)), $3, $4, $6, $7, locloc(@$)); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6563 |
variable_name_symtable.insert($3, prev_declared_program_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6564 |
} |
131 | 6565 |
/* ERROR_CHECK_BEGIN */ |
6566 |
| PROGRAM program_name optional_task_name ':' identifier optional_prog_conf_elements |
|
6567 |
{$$ = NULL; |
|
6568 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6569 |
print_err_msg(current_filename, locf(@5), locl(@5), "unknown program type name after ':' in program configuration."); |
131 | 6570 |
} |
6571 |
| PROGRAM RETAIN program_name optional_task_name ':' identifier optional_prog_conf_elements |
|
6572 |
{$$ = NULL; |
|
6573 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6574 |
print_err_msg(current_filename, locf(@6), locl(@6), "unknown program type name after ':' in program configuration."); |
131 | 6575 |
} |
6576 |
| PROGRAM NON_RETAIN program_name optional_task_name ':' identifier optional_prog_conf_elements |
|
6577 |
{$$ = NULL; |
|
6578 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6579 |
print_err_msg(current_filename, locf(@6), locl(@6), "unknown program type name after ':' in program configuration."); |
131 | 6580 |
} |
6581 |
| PROGRAM error program_name optional_task_name ':' prev_declared_program_type_name optional_prog_conf_elements |
|
6582 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6583 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected token after 'PROGRAM' in program configuration."); |
131 | 6584 |
yyerrok; |
6585 |
} |
|
6586 |
| PROGRAM RETAIN error program_name optional_task_name ':' prev_declared_program_type_name optional_prog_conf_elements |
|
6587 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6588 |
print_err_msg(current_filename, locf(@3), locl(@3), "unexpected token after 'RETAIN' in retentive program configuration."); |
131 | 6589 |
yyerrok; |
6590 |
} |
|
6591 |
| PROGRAM NON_RETAIN error program_name optional_task_name ':' prev_declared_program_type_name optional_prog_conf_elements |
|
6592 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6593 |
print_err_msg(current_filename, locf(@3), locl(@3), "unexpected token after 'NON_RETAIN' in non-retentive program configuration."); |
131 | 6594 |
yyerrok; |
6595 |
} |
|
6596 |
| PROGRAM optional_task_name ':' prev_declared_program_type_name optional_prog_conf_elements |
|
6597 |
{$$ = NULL; |
|
6598 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6599 |
print_err_msg(current_filename, locl(@1), locf(@2), "no program name defined in program configuration."); |
131 | 6600 |
} |
6601 |
| PROGRAM RETAIN optional_task_name ':' prev_declared_program_type_name optional_prog_conf_elements |
|
6602 |
{$$ = NULL; |
|
6603 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6604 |
print_err_msg(current_filename, locl(@2), locf(@3), "no program name defined in retentive program configuration."); |
131 | 6605 |
} |
6606 |
| PROGRAM NON_RETAIN optional_task_name ':' prev_declared_program_type_name optional_prog_conf_elements |
|
6607 |
{$$ = NULL; |
|
6608 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6609 |
print_err_msg(current_filename, locl(@2), locf(@3), "no program name defined in non-retentive program configuration."); |
131 | 6610 |
} |
6611 |
| PROGRAM error optional_task_name ':' prev_declared_program_type_name optional_prog_conf_elements |
|
6612 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6613 |
print_err_msg(current_filename, locf(@2), locl(@2), "no program name defined in program configuration."); |
131 | 6614 |
yyerrok; |
6615 |
} |
|
6616 |
| PROGRAM RETAIN error optional_task_name ':' prev_declared_program_type_name optional_prog_conf_elements |
|
6617 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6618 |
print_err_msg(current_filename, locf(@3), locl(@3), "no program name defined in retentive program configuration."); |
131 | 6619 |
yyerrok; |
6620 |
} |
|
6621 |
| PROGRAM NON_RETAIN error optional_task_name ':' prev_declared_program_type_name optional_prog_conf_elements |
|
6622 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6623 |
print_err_msg(current_filename, locf(@3), locl(@3), "no program name defined in non-retentive program configuration."); |
131 | 6624 |
yyerrok; |
6625 |
} |
|
6626 |
| PROGRAM program_name optional_task_name prev_declared_program_type_name optional_prog_conf_elements |
|
6627 |
{$$ = NULL; |
|
6628 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6629 |
print_err_msg(current_filename, locl(@3), locf(@4), "':' missing after program name or optional task name in program configuration."); |
131 | 6630 |
} |
6631 |
| PROGRAM RETAIN program_name optional_task_name prev_declared_program_type_name optional_prog_conf_elements |
|
6632 |
{$$ = NULL; |
|
6633 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6634 |
print_err_msg(current_filename, locl(@4), locf(@5), "':' missing after program name or optional task name in program configuration."); |
131 | 6635 |
} |
6636 |
| PROGRAM NON_RETAIN program_name optional_task_name prev_declared_program_type_name optional_prog_conf_elements |
|
6637 |
{$$ = NULL; |
|
6638 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6639 |
print_err_msg(current_filename, locl(@4), locf(@5), "':' missing after program name or optional task name in program configuration."); |
131 | 6640 |
} |
6641 |
| PROGRAM program_name optional_task_name error prev_declared_program_type_name optional_prog_conf_elements |
|
6642 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6643 |
print_err_msg(current_filename, locf(@4), locl(@4), "expecting ':' after program name or optional task name in program configuration."); |
131 | 6644 |
yyerrok; |
6645 |
} |
|
6646 |
| PROGRAM RETAIN program_name optional_task_name error prev_declared_program_type_name optional_prog_conf_elements |
|
6647 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6648 |
print_err_msg(current_filename, locf(@5), locl(@5), "expecting ':' after program name or optional task name in program configuration."); |
131 | 6649 |
yyerrok; |
6650 |
} |
|
6651 |
| PROGRAM NON_RETAIN program_name optional_task_name error prev_declared_program_type_name optional_prog_conf_elements |
|
6652 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6653 |
print_err_msg(current_filename, locf(@5), locl(@5), "expecting ':' after program name or optional task name in program configuration."); |
131 | 6654 |
yyerrok; |
6655 |
} |
|
6656 |
| PROGRAM program_name optional_task_name ':' optional_prog_conf_elements |
|
6657 |
{$$ = NULL; |
|
6658 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6659 |
print_err_msg(current_filename, locl(@4), locf(@5), "no program type defined in program configuration."); |
131 | 6660 |
} |
6661 |
| PROGRAM RETAIN program_name optional_task_name ':' optional_prog_conf_elements |
|
6662 |
{$$ = NULL; |
|
6663 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6664 |
print_err_msg(current_filename, locl(@5), locf(@6), "no program type defined in program configuration."); |
131 | 6665 |
} |
6666 |
| PROGRAM NON_RETAIN program_name optional_task_name ':' optional_prog_conf_elements |
|
6667 |
{$$ = NULL; |
|
6668 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6669 |
print_err_msg(current_filename, locl(@5), locf(@6), "no program type defined in program configuration."); |
131 | 6670 |
} |
6671 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6672 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6673 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6674 |
// helper symbol for program_configuration // |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6675 |
optional_task_name: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6676 |
// empty // |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6677 |
{$$ = NULL;} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6678 |
| WITH task_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6679 |
{$$ = $2;} |
131 | 6680 |
/* ERROR_CHECK_BEGIN */ |
6681 |
| WITH error |
|
6682 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6683 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid tack name in optional task name of program configuration."); |
131 | 6684 |
yyerrok; |
6685 |
} |
|
6686 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6687 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6688 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6689 |
// helper symbol for program_configuration // |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6690 |
optional_prog_conf_elements: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6691 |
// empty // |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6692 |
{$$ = NULL;} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6693 |
| '(' prog_conf_elements ')' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6694 |
{$$ = $2;} |
131 | 6695 |
/* ERROR_CHECK_BEGIN */ |
6696 |
| '(' error ')' |
|
6697 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6698 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid program configuration elements in program configuration."); |
131 | 6699 |
yyerrok; |
6700 |
} |
|
6701 |
| '(' prog_conf_elements error |
|
6702 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6703 |
print_err_msg(current_filename, locl(@2), locf(@3), "')' missing at the end of program configuration elements in program configuration."); |
131 | 6704 |
yyerrok; |
6705 |
} |
|
6706 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6707 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6708 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6709 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6710 |
prog_conf_elements: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6711 |
prog_conf_element |
68 | 6712 |
{$$ = new prog_conf_elements_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6713 |
| prog_conf_elements ',' prog_conf_element |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6714 |
{$$ = $1; $$->add_element($3);} |
131 | 6715 |
/* ERROR_CHECK_BEGIN */ |
6716 |
| prog_conf_elements prog_conf_element |
|
6717 |
{$$ = NULL; |
|
6718 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6719 |
print_err_msg(current_filename, locl(@1), locf(@2), "',' missing in program configuration elements list."); |
131 | 6720 |
} |
6721 |
| prog_conf_elements ',' error |
|
6722 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6723 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid value for program configuration element in program configuration list."); |
131 | 6724 |
yyerrok; |
6725 |
} |
|
6726 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6727 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6728 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6729 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6730 |
prog_conf_element: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6731 |
fb_task |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6732 |
| prog_cnxn |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6733 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6734 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6735 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6736 |
fb_task: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6737 |
// fb_name WITH task_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6738 |
/* NOTE: The fb_name refers to funtion block variables |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6739 |
* that have been declared in a scope outside the one we are |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6740 |
* currently parsing, so we must accept them to be any_identifier! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6741 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6742 |
any_identifier WITH task_name |
68 | 6743 |
{$$ = new fb_task_c($1, $3, locloc(@$));} |
131 | 6744 |
/* ERROR_CHECK_BEGIN */ |
6745 |
| any_identifier WITH error |
|
6746 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6747 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid task name in function block configuration."); |
131 | 6748 |
yyerrok; |
6749 |
} |
|
6750 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6751 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6752 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6753 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6754 |
/* NOTE: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6755 |
* The semantics of configuring a program are rather confusing, so here is |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6756 |
* my (Mario) understanding on the issue... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6757 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6758 |
* A function/program may have as its input variables a simple variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6759 |
* (BYTE, WORD, etc...), an array (ARRAY [1 .. 3] OF BYTE, ...) , or a structure. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6760 |
* Nevertheless, when calling this function from within a st or il language statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6761 |
* it is not possible to allocate a value to a single element of the array or structure |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6762 |
* typed input variable, as the accepted syntax is simply '(' variable_name ':=' variable ')' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6763 |
* Notice how the variable_name does not include things such as 'a.elem1' or 'a[1]'! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6764 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6765 |
* Nevertheless, when configuring a program from within a configuration, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6766 |
* it becomes possible to allocate values to individual elements of the |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6767 |
* array or structured type input variable, as the syntax is now |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6768 |
* '(' symbolic_variable ':=' data_sink|prog_data_source ')' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6769 |
* Notice how the symbolic_variable _does_ include things such as 'a.elem1' or 'a[1]'! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6770 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6771 |
* Conclusion: Unlike other locations in the syntax where SENDTO appears, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6772 |
* here it is not valid to replace symbolic_variable with any_identifier! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6773 |
* Nevertheless, it is also not correct to leave symbolic_variable as it is, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6774 |
* as we have defined it to only include previously declared variables, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6775 |
* which is not the case in this situation. Here symbolic_variable is refering |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6776 |
* to variables that were defined within the scope of the program that is being |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6777 |
* called, and _not_ within the scope of the configuration that is calling the |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6778 |
* program, so the variables in question are not declared in the current scope! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6779 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6780 |
* We therefore need to define a new symbolic_variable, that accepts any_identifier |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6781 |
* instead of previosuly declared variable names, to be used in the definition of |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6782 |
* prog_cnxn! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6783 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6784 |
prog_cnxn: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6785 |
any_symbolic_variable ASSIGN prog_data_source |
68 | 6786 |
{$$ = new prog_cnxn_assign_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6787 |
| any_symbolic_variable SENDTO data_sink |
68 | 6788 |
{$$ = new prog_cnxn_sendto_c($1, $3, locloc(@$));} |
131 | 6789 |
/* ERROR_CHECK_BEGIN */ |
6790 |
| any_symbolic_variable constant |
|
6791 |
{$$ = NULL; |
|
6792 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6793 |
print_err_msg(current_filename, locl(@1), locf(@2), "':=' missing between parameter and value in program configuration element."); |
131 | 6794 |
} |
6795 |
| any_symbolic_variable enumerated_value |
|
6796 |
{$$ = NULL; |
|
6797 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6798 |
print_err_msg(current_filename, locl(@1), locf(@2), "':=' missing between parameter and value in program configuration element."); |
131 | 6799 |
} |
6800 |
| any_symbolic_variable data_sink |
|
6801 |
{$$ = NULL; |
|
6802 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6803 |
print_err_msg(current_filename, locl(@1), locf(@2), "':=' or '=>' missing between parameter and variable in program configuration element."); |
131 | 6804 |
} |
6805 |
| any_symbolic_variable error prog_data_source |
|
6806 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6807 |
print_err_msg(current_filename, locl(@1), locf(@2), "expecting ':=' or '=>' after parameter in program configuration element."); |
131 | 6808 |
yyerrok; |
6809 |
} |
|
6810 |
| any_symbolic_variable ASSIGN error |
|
6811 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6812 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid value or variable in program configuration assignment element."); |
131 | 6813 |
yyerrok; |
6814 |
} |
|
6815 |
| any_symbolic_variable SENDTO error |
|
6816 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6817 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid variable in program configuration sendto element."); |
131 | 6818 |
yyerrok; |
6819 |
} |
|
6820 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6821 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6822 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6823 |
prog_data_source: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6824 |
constant |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6825 |
| enumerated_value |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6826 |
| global_var_reference |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6827 |
| direct_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6828 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6829 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6830 |
data_sink: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6831 |
global_var_reference |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6832 |
| direct_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6833 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6834 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6835 |
instance_specific_initializations: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6836 |
VAR_CONFIG instance_specific_init_list END_VAR |
68 | 6837 |
{$$ = new instance_specific_initializations_c($2, locloc(@$));} |
131 | 6838 |
/* ERROR_CHECK_BEGIN */ |
6839 |
| VAR_CONFIG END_VAR |
|
6840 |
{$$ = NULL; |
|
6841 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6842 |
print_err_msg(current_filename, locl(@1), locf(@2), "no variable declared in configuration variable(s) initialization."); |
131 | 6843 |
} |
6844 |
| VAR_CONFIG error instance_specific_init_list END_VAR |
|
6845 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6846 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected token after 'VAR_CONFIG' in configuration variable(s) initialization."); |
131 | 6847 |
yyerrok; |
6848 |
} |
|
6849 |
| VAR_CONFIG error END_VAR |
|
6850 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6851 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in configuration variable(s) initialization."); |
131 | 6852 |
yyerrok; |
6853 |
} |
|
6854 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6855 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6856 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6857 |
// helper symbol for instance_specific_initializations // |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6858 |
instance_specific_init_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6859 |
instance_specific_init ';' |
68 | 6860 |
{$$ = new instance_specific_init_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6861 |
| instance_specific_init_list instance_specific_init ';' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6862 |
{$$ = $1; $$->add_element($2);} |
131 | 6863 |
/* ERROR_CHECK_BEGIN */ |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6864 |
| error ';' |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6865 |
{$$ = new instance_specific_init_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6866 |
print_err_msg(current_filename, locf(@1), locl(@1), "invalid configuration variable initialization."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6867 |
yyerrok; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6868 |
} |
131 | 6869 |
| instance_specific_init error |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6870 |
{$$ = new instance_specific_init_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6871 |
print_err_msg(current_filename, locl(@1), locf(@2), "';' missing at the end of configuration variable initialization."); |
131 | 6872 |
yyerrok; |
6873 |
} |
|
6874 |
| instance_specific_init_list instance_specific_init error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6875 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6876 |
print_err_msg(current_filename, locl(@2), locf(@3), "';' missing at the end of configuration variable initialization."); |
131 | 6877 |
yyerrok; |
6878 |
} |
|
133 | 6879 |
| instance_specific_init_list error ';' |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6880 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6881 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid configuration variable initialization."); |
133 | 6882 |
yyerrok; |
6883 |
} |
|
131 | 6884 |
| instance_specific_init_list ';' |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6885 |
{$$ = $1; |
131 | 6886 |
yynerrs++; |
6887 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after configuration variable initialization."); |
|
6888 |
} |
|
6889 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6890 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6891 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6892 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6893 |
instance_specific_init: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6894 |
// |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6895 |
// resource_name '.' program_name '.' {fb_name '.'} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6896 |
// ((variable_name [location] ':' located_var_spec_init) | (fb_name ':' function_block_type_name ':=' structure_initialization)) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6897 |
// |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6898 |
// prev_declared_resource_name '.' prev_declared_program_name '.' any_fb_name_list variable_name ':' located_var_spec_init |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6899 |
/* NOTE: variable_name has been changed to any_identifier (and not simply identifier) because the |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6900 |
* variables being referenced have been declared outside the scope currently being parsed! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6901 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6902 |
/* NOTE: program_name has not been changed to prev_declared_program_name because the |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6903 |
* programs being referenced have been declared outside the scope currently being parsed! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6904 |
* The programs are only kept inside the scope of the resource in which they are defined. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6905 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6906 |
prev_declared_resource_name '.' program_name '.' any_fb_name_list any_identifier ':' located_var_spec_init |
68 | 6907 |
{$$ = new instance_specific_init_c($1, $3, $5, $6, NULL, $8, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6908 |
| prev_declared_resource_name '.' program_name '.' any_fb_name_list any_identifier location ':' located_var_spec_init |
68 | 6909 |
{$$ = new instance_specific_init_c($1, $3, $5, $6, $7, $9, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6910 |
| prev_declared_resource_name '.' program_name '.' any_fb_name_list any_identifier ':' fb_initialization |
68 | 6911 |
{$5->add_element($6); $$ = new instance_specific_init_c($1, $3, $5, NULL, NULL, $8, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6912 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6913 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6914 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6915 |
/* helper symbol for instance_specific_init */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6916 |
fb_initialization: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6917 |
function_block_type_name ASSIGN structure_initialization |
68 | 6918 |
{$$ = new fb_initialization_c($1, $3, locloc(@$));} |
131 | 6919 |
/* ERROR_CHECK_BEGIN */ |
6920 |
| function_block_type_name structure_initialization |
|
6921 |
{$$ = NULL; |
|
6922 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6923 |
print_err_msg(current_filename, locl(@1), locf(@2), "':=' missing between function block name and initialization in function block initialization."); |
131 | 6924 |
} |
6925 |
| function_block_type_name error structure_initialization |
|
6926 |
{$$ = NULL; |
|
6927 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting ':=' after function block name in function block initialization."); |
|
6928 |
yyerrok; |
|
6929 |
} |
|
6930 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6931 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6932 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6933 |
/***********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6934 |
/* B 2.1 Instructions and Operands */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6935 |
/***********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6936 |
/* helper symbol for many IL instructions, etc... */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6937 |
/* eat up any extra EOL tokens... */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6938 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6939 |
eol_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6940 |
EOL |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6941 |
| eol_list EOL |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6942 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6943 |
|
94 | 6944 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6945 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6946 |
instruction_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6947 |
il_instruction |
68 | 6948 |
{$$ = new instruction_list_c(locloc(@$)); $$->add_element($1);} |
13 | 6949 |
| pragma eol_list |
68 | 6950 |
{$$ = new instruction_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6951 |
| instruction_list il_instruction |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6952 |
{$$ = $1; $$->add_element($2);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6953 |
| instruction_list pragma |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
6954 |
{$$ = $1; $$->add_element($2);} |
131 | 6955 |
/* ERROR_CHECK_BEGIN */ |
6956 |
| instruction_list error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6957 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6958 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid IL instruction."); |
131 | 6959 |
yyerrok; |
6960 |
} |
|
6961 |
/* ERROR_CHECK_END */ |
|
68 | 6962 |
; |
6963 |
||
6964 |
||
6965 |
||
6966 |
il_instruction: |
|
6967 |
il_incomplete_instruction eol_list |
|
6968 |
{$$ = new il_instruction_c(NULL, $1, locloc(@$));} |
|
6969 |
| label ':' il_incomplete_instruction eol_list |
|
6970 |
{$$ = new il_instruction_c($1, $3, locloc(@$));} |
|
6971 |
/* ERROR_CHECK_BEGIN */ |
|
6972 |
| error eol_list |
|
6973 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6974 |
print_err_msg(current_filename, locf(@1), locl(@1), "invalid IL instruction."); |
131 | 6975 |
yyerrok; |
6976 |
} |
|
6977 |
| il_incomplete_instruction error |
|
6978 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6979 |
print_err_msg(current_filename, locl(@1), locf(@2), "EOL missing at the end of IL instruction."); |
131 | 6980 |
yyerrok; |
6981 |
} |
|
6982 |
| error ':' il_incomplete_instruction eol_list |
|
6983 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6984 |
print_err_msg(current_filename, locf(@1), locl(@1), "invalid label in IL instruction."); |
131 | 6985 |
yyerrok; |
6986 |
} |
|
6987 |
| label il_incomplete_instruction eol_list |
|
6988 |
{$$ = NULL; |
|
6989 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6990 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing after label in IL instruction."); |
131 | 6991 |
} |
6992 |
| label error il_incomplete_instruction eol_list |
|
6993 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6994 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting ':' after label in IL instruction."); |
131 | 6995 |
yyerrok; |
6996 |
} |
|
68 | 6997 |
| label ':' error eol_list |
6998 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
6999 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid IL instruction."); |
131 | 7000 |
yyerrok; |
7001 |
} |
|
7002 |
| label ':' il_incomplete_instruction error |
|
7003 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7004 |
print_err_msg(current_filename, locl(@3), locf(@4), "EOL missing at the end of IL instruction."); |
68 | 7005 |
yyerrok; |
7006 |
} |
|
7007 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7008 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7009 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7010 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7011 |
/* helper symbol for il_instruction */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7012 |
il_incomplete_instruction: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7013 |
il_simple_operation |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7014 |
| il_expression |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7015 |
| il_jump_operation |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7016 |
| il_fb_call |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7017 |
| il_formal_funct_call |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7018 |
| il_return_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7019 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7020 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7021 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7022 |
label: identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7023 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7024 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7025 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7026 |
il_simple_operation: |
94 | 7027 |
// (il_simple_operator [il_operand]) | (function_name [il_operand_list]) |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7028 |
il_simple_operator |
68 | 7029 |
{$$ = new il_simple_operation_c($1, NULL, locloc(@$));} |
93 | 7030 |
/* |
7031 |
* Note: Bison is getting confused with the following rule, |
|
94 | 7032 |
* i.e. it is finding conflicts where there seemingly are really none. |
93 | 7033 |
* The rule was therefore replaced by the equivalent following |
7034 |
* two rules. |
|
7035 |
*/ |
|
7036 |
/* |
|
7037 |
| il_simple_operator il_operand |
|
7038 |
{$$ = new il_simple_operation_c($1, $2, locloc(@$));} |
|
7039 |
*/ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7040 |
| il_simple_operator_noclash il_operand |
68 | 7041 |
{$$ = new il_simple_operation_c($1, $2, locloc(@$));} |
91 | 7042 |
| il_simple_operator_clash il_operand |
7043 |
{$$ = new il_simple_operation_c($1, $2, locloc(@$));} |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7044 |
/* NOTE: the line |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7045 |
* | il_simple_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7046 |
* already contains the 'NOT' operator, as well as all the |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7047 |
* expression operators ('MOD', 'AND', etc...), all of which |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7048 |
* may also be a function name! This means that these operators/functions, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7049 |
* without any operands, could be reduced to either an operator or a |
89 | 7050 |
* function call. |
7051 |
* |
|
7052 |
* I (Mario) have chosen to reduce it to an operator. |
|
68 | 7053 |
* In order to do this, we must remove from the syntax that defines |
7054 |
* function calls all the functions whose names clash with the IL operators. |
|
7055 |
* |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7056 |
* The line |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7057 |
* | function_name |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7058 |
* has been replaced with the lines |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7059 |
* | function_name_no_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7060 |
* in order to include all possible function names except |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7061 |
* those whose names coincide with operators !! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7062 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7063 |
| function_name_no_clashes |
68 | 7064 |
{$$ = new il_function_call_c($1, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7065 |
/* NOTE: the line |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7066 |
* | il_simple_operator il_operand |
68 | 7067 |
* already contains the 'NOT', 'MOD', etc. operators, followed by a single il_operand. |
7068 |
* However, this same code (MOD x) may also be reduced to a function call to the MOD |
|
7069 |
* function. This means that (MOD, AND,...) could be interpret as a function name |
|
7070 |
* or as an IL operator! This would lead us to a reduce/reduce conflict! |
|
7071 |
* |
|
89 | 7072 |
* I (Mario) have chosen to reduce it to an operand, rather than a function call. |
68 | 7073 |
* In order to do this, we must remove from the syntax that defines |
7074 |
* function calls all the functions whose names clash with the IL operators. |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7075 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7076 |
* The line |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7077 |
* | function_name il_operand_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7078 |
* has been replaced with the line |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7079 |
* | function_name_no_clashes il_operand_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7080 |
* in order to include all possible function names except |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7081 |
* for the function names which clash with expression and simple operators. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7082 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7083 |
* Note that: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7084 |
* this alternative syntax does not cover the possibility of |
68 | 7085 |
* the function 'NOT', 'MOD', etc... being called with more than one il_operand, |
7086 |
* in which case it is always a function call, and not an IL instruction. |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7087 |
* We therefore need to include an extra rule where the |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7088 |
* function_name_expression_clashes and function_name_simpleop_clashes |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7089 |
* are followed by a il_operand_list with __two__ or more il_operands!! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7090 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7091 |
| function_name_no_clashes il_operand_list |
68 | 7092 |
{$$ = new il_function_call_c($1, $2, locloc(@$));} |
91 | 7093 |
| il_simple_operator_clash il_operand_list2 |
93 | 7094 |
{$$ = new il_function_call_c(il_operator_c_2_identifier_c($1), $2, locloc(@$));} |
7095 |
; |
|
7096 |
||
91 | 7097 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7098 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7099 |
il_expression: |
94 | 7100 |
// il_expr_operator '(' [il_operand] EOL {EOL} [simple_instr_list] ')' |
7101 |
/* |
|
7102 |
* Note: Bison is getting confused with the use of il_expr_operator, |
|
7103 |
* i.e. it is finding conflicts where there seemingly are really none. |
|
7104 |
* il_expr_operator was therefore replaced by the equivalent |
|
7105 |
* il_expr_operator_noclash | il_expr_operator_clash. |
|
7106 |
*/ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7107 |
il_expr_operator_noclash '(' eol_list ')' |
68 | 7108 |
{$$ = new il_expression_c($1, NULL, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7109 |
| il_expr_operator_noclash '(' il_operand eol_list ')' |
68 | 7110 |
{$$ = new il_expression_c($1, $3, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7111 |
| il_expr_operator_noclash '(' eol_list simple_instr_list ')' |
68 | 7112 |
{$$ = new il_expression_c($1, NULL, $4, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7113 |
| il_expr_operator_noclash '(' il_operand eol_list simple_instr_list ')' |
68 | 7114 |
{$$ = new il_expression_c($1, $3, $5, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7115 |
| il_expr_operator_clash '(' eol_list ')' |
68 | 7116 |
{$$ = new il_expression_c($1, NULL, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7117 |
| il_expr_operator_clash '(' il_operand eol_list ')' |
68 | 7118 |
{$$ = new il_expression_c($1, $3, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7119 |
| il_expr_operator_clash '(' il_operand eol_list simple_instr_list ')' |
68 | 7120 |
{$$ = new il_expression_c($1, $3, $5, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7121 |
| il_expr_operator_clash_eol_list simple_instr_list ')' |
68 | 7122 |
{$$ = new il_expression_c($1, NULL, $2, locloc(@$));} |
131 | 7123 |
/* ERROR_CHECK_BEGIN */ |
7124 |
| il_expr_operator_noclash '(' eol_list error |
|
7125 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7126 |
print_err_msg(current_filename, locl(@3), locf(@4), "')' missing at the end of IL expression."); |
131 | 7127 |
yyerrok; |
7128 |
} |
|
7129 |
| il_expr_operator_noclash '(' il_operand eol_list error |
|
7130 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7131 |
print_err_msg(current_filename, locl(@4), locf(@5), "')' missing at the end of IL expression."); |
131 | 7132 |
yyerrok; |
7133 |
} |
|
7134 |
| il_expr_operator_noclash '(' eol_list simple_instr_list error |
|
7135 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7136 |
print_err_msg(current_filename, locl(@4), locf(@5), "')' missing at the end of IL expression."); |
131 | 7137 |
yyerrok; |
7138 |
} |
|
7139 |
| il_expr_operator_noclash '(' il_operand eol_list simple_instr_list error |
|
7140 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7141 |
print_err_msg(current_filename, locl(@5), locf(@6), "')' missing at the end of IL expression."); |
131 | 7142 |
yyerrok; |
7143 |
} |
|
7144 |
| il_expr_operator_clash '(' il_operand eol_list error |
|
7145 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7146 |
print_err_msg(current_filename, locl(@4), locf(@5), "')' missing at the end of IL expression."); |
131 | 7147 |
yyerrok; |
7148 |
} |
|
7149 |
| il_expr_operator_clash '(' il_operand eol_list simple_instr_list error |
|
7150 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7151 |
print_err_msg(current_filename, locl(@5), locf(@6), "')' missing at the end of IL expression."); |
131 | 7152 |
yyerrok; |
7153 |
} |
|
7154 |
| il_expr_operator_clash_eol_list simple_instr_list error |
|
7155 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7156 |
print_err_msg(current_filename, locl(@2), locf(@3), "')' missing at the end of IL expression."); |
131 | 7157 |
yyerrok; |
7158 |
} |
|
7159 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7160 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7161 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7162 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7163 |
il_jump_operation: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7164 |
il_jump_operator label |
68 | 7165 |
{$$ = new il_jump_operation_c($1, $2, locloc(@$));} |
131 | 7166 |
/* ERROR_CHECK_BEGIN */ |
7167 |
| il_jump_operator error |
|
7168 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7169 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid label defined in IL jump operation."); |
131 | 7170 |
yyerrok; |
7171 |
} |
|
7172 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7173 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7174 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7175 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7176 |
il_fb_call: |
94 | 7177 |
// il_call_operator fb_name ['(' (EOL {EOL} [il_param_list]) | [il_operand_list] ')'] |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7178 |
il_call_operator prev_declared_fb_name |
68 | 7179 |
{$$ = new il_fb_call_c($1, $2, NULL, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7180 |
| il_call_operator prev_declared_fb_name '(' ')' |
68 | 7181 |
{$$ = new il_fb_call_c($1, $2, NULL, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7182 |
| il_call_operator prev_declared_fb_name '(' eol_list ')' |
68 | 7183 |
{$$ = new il_fb_call_c($1, $2, NULL, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7184 |
| il_call_operator prev_declared_fb_name '(' il_operand_list ')' |
68 | 7185 |
{$$ = new il_fb_call_c($1, $2, $4, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7186 |
| il_call_operator prev_declared_fb_name '(' eol_list il_param_list ')' |
68 | 7187 |
{$$ = new il_fb_call_c($1, $2, NULL, $5, locloc(@$));} |
131 | 7188 |
/* ERROR_CHECK_BEGIN */ |
7189 |
| il_call_operator error |
|
7190 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7191 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid function block name defined in IL function block call."); |
131 | 7192 |
yyerrok; |
7193 |
} |
|
7194 |
| il_call_operator '(' ')' |
|
7195 |
{$$ = NULL; |
|
7196 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7197 |
print_err_msg(current_filename, locl(@1), locf(@2), "no function block name defined in IL function block call."); |
131 | 7198 |
} |
7199 |
| il_call_operator '(' eol_list ')' |
|
7200 |
{$$ = NULL; |
|
7201 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7202 |
print_err_msg(current_filename, locl(@1), locf(@2), "no function block name defined in IL function block call."); |
131 | 7203 |
} |
7204 |
| il_call_operator '(' il_operand_list ')' |
|
7205 |
{$$ = NULL; |
|
7206 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7207 |
print_err_msg(current_filename, locl(@1), locf(@2), "no function block name defined in IL function block call."); |
131 | 7208 |
} |
7209 |
| il_call_operator '(' eol_list il_param_list ')' |
|
7210 |
{$$ = NULL; |
|
7211 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7212 |
print_err_msg(current_filename, locl(@1), locf(@2), "no function block name defined in IL function block call."); |
131 | 7213 |
} |
7214 |
| il_call_operator error '(' ')' |
|
7215 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7216 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid function block name defined in IL function block call."); |
131 | 7217 |
yyerrok; |
7218 |
} |
|
7219 |
| il_call_operator error '(' eol_list ')' |
|
7220 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7221 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid function block name defined in IL function block call."); |
131 | 7222 |
yyerrok; |
7223 |
} |
|
7224 |
| il_call_operator error '(' il_operand_list ')' |
|
7225 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7226 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid function block name defined in IL function block call."); |
131 | 7227 |
yyerrok; |
7228 |
} |
|
7229 |
| il_call_operator error '(' eol_list il_param_list ')' |
|
7230 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7231 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid function block name defined in IL function block call."); |
131 | 7232 |
yyerrok; |
7233 |
} |
|
7234 |
| il_call_operator prev_declared_fb_name ')' |
|
7235 |
{$$ = NULL; |
|
7236 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7237 |
print_err_msg(current_filename, locl(@2), locf(@3), "'(' missing after function block name defined in IL function block call."); |
131 | 7238 |
} |
7239 |
| il_call_operator prev_declared_fb_name il_operand_list ')' |
|
7240 |
{$$ = NULL; |
|
7241 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7242 |
print_err_msg(current_filename, locl(@2), locf(@3), "'(' missing after function block name defined in IL function block call."); |
131 | 7243 |
} |
7244 |
| il_call_operator prev_declared_fb_name '(' error |
|
7245 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7246 |
print_err_msg(current_filename, locl(@3), locf(@4), "')' missing at the end of IL function block call."); |
131 | 7247 |
yyerrok; |
7248 |
} |
|
7249 |
| il_call_operator prev_declared_fb_name '(' eol_list error |
|
7250 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7251 |
print_err_msg(current_filename, locl(@4), locf(@5), "')' missing at the end of IL function block call."); |
131 | 7252 |
yyerrok; |
7253 |
} |
|
7254 |
| il_call_operator prev_declared_fb_name '(' il_operand_list error |
|
7255 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7256 |
print_err_msg(current_filename, locl(@4), locf(@5), "')' missing at the end of IL function block call."); |
131 | 7257 |
yyerrok; |
7258 |
} |
|
7259 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7260 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7261 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7262 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7263 |
/* NOTE: Please read note above the definition of function_name_without_clashes */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7264 |
il_formal_funct_call: |
94 | 7265 |
// function_name '(' EOL {EOL} [il_param_list] ')' |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7266 |
/* function_name '(' eol_list ')' */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7267 |
/* NOTE: il_formal_funct_call is only used in the definition of |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7268 |
* - il_incomplete_instruction |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7269 |
* - il_simple_instruction |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7270 |
* In both of the above, il_expression also |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7271 |
* shows up as another option. This means that the functions whose |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7272 |
* names clash with expressions, followed by '(' eol_list ')', are |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7273 |
* already included. We must therefore leave them out in this |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7274 |
* definition in order to remove reduce/reduce conflicts. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7275 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7276 |
* In summary: 'MOD' '(' eol_list ')', and all other functions whose |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7277 |
* names clash with expressions may be interpreted by the syntax by |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7278 |
* two different routes. I (Mario) chose to interpret them |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7279 |
* as operators, rather than as function calls! |
68 | 7280 |
* (AND MOD OR XOR ADD DIV EQ GT GE LT LE MUL NE SUB) |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7281 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7282 |
function_name_no_clashes '(' eol_list ')' |
68 | 7283 |
{$$ = new il_formal_funct_call_c($1, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7284 |
| function_name_simpleop_clashes '(' eol_list ')' |
68 | 7285 |
{$$ = new il_formal_funct_call_c($1, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7286 |
/* | function_name '(' eol_list il_param_list ')' */ |
68 | 7287 |
/* For the above syntax, we no longer have two ways of interpreting the |
7288 |
* same syntax. The above is always a function call! |
|
7289 |
* However, some of the functions that we may be calling |
|
7290 |
* may have the same name as an IL operator. This means that |
|
7291 |
* flex will be parsing them and handing them over to bison as |
|
7292 |
* IL operator tokens, and not as function name tokens. |
|
7293 |
* (when parsing ST, flex no longer recognizes IL operators, |
|
7294 |
* so will always return the correct function name, unless that |
|
7295 |
* name also coincides with an operator used in ST -> XOR, OR, MOD, AND, NOT) |
|
7296 |
* |
|
7297 |
* We must therefore interpret the IL operators as function names! |
|
7298 |
*/ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7299 |
| function_name_no_clashes '(' eol_list il_param_list ')' |
68 | 7300 |
{$$ = new il_formal_funct_call_c($1, $4, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7301 |
| function_name_simpleop_clashes '(' eol_list il_param_list ')' |
68 | 7302 |
{$$ = new il_formal_funct_call_c($1, $4, locloc(@$));} |
7303 |
/* The following line should read: |
|
7304 |
* |
|
7305 |
* | function_name_expression_clashes '(' eol_list il_param_list ')' |
|
7306 |
* |
|
7307 |
* but the function_name_expression_clashes had to be first reduced to |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7308 |
* an intermediary symbol in order to remove a reduce/reduce conflict. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7309 |
* In essence, the syntax requires more than one look ahead token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7310 |
* in order to be parsed. We resolve this by reducing a collection of |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7311 |
* symbols into a temporary symbol (il_expr_operator_clash_eol_list), that |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7312 |
* will later be replaced by the correct symbol. The correct symbol will |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7313 |
* now be determined by a single look ahead token, as all the common |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7314 |
* symbols have been reduced to the temporary symbol |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7315 |
* il_expr_operator_clash_eol_list ! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7316 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7317 |
* Unfortunately, this work around results in the wrong symbol |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7318 |
* being created for the abstract syntax tree. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7319 |
* We need to figure out which symbol was created, destroy it, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7320 |
* and create the correct symbol for our case. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7321 |
* This is a lot of work, so I put it in a function |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7322 |
* at the end of this file... il_operator_c_2_identifier_c() |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7323 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7324 |
| il_expr_operator_clash_eol_list il_param_list ')' |
68 | 7325 |
{$$ = new il_formal_funct_call_c(il_operator_c_2_identifier_c($1), $2, locloc(@$));} |
131 | 7326 |
/* ERROR_CHECK_BEGIN */ |
7327 |
| function_name_no_clashes '(' eol_list error ')' |
|
7328 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7329 |
print_err_msg(current_filename, locf(@4), locl(@4), "invalid parameter list defined in IL formal function call."); |
131 | 7330 |
yyerrok; |
7331 |
} |
|
7332 |
| function_name_simpleop_clashes '(' eol_list error ')' |
|
7333 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7334 |
print_err_msg(current_filename, locf(@4), locl(@4), "invalid parameter list defined in IL formal function call."); |
131 | 7335 |
yyerrok; |
7336 |
} |
|
7337 |
| il_expr_operator_clash_eol_list error ')' |
|
7338 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7339 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid parameter list defined in IL formal function call."); |
131 | 7340 |
yyerrok; |
7341 |
} |
|
7342 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7343 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7344 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7345 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7346 |
il_expr_operator_clash_eol_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7347 |
il_expr_operator_clash '(' eol_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7348 |
{$$ = $1;} |
131 | 7349 |
/* ERROR_CHECK_BEGIN */ |
7350 |
| il_expr_operator_clash '(' error |
|
7351 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7352 |
print_err_msg(current_filename, locl(@2), locf(@3), "EOL missing after '(' in IL instruction."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7353 |
yyerrok; |
131 | 7354 |
} |
7355 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7356 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7357 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7358 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7359 |
il_operand: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7360 |
variable |
85 | 7361 |
| enumerated_value |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7362 |
| constant |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7363 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7364 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7365 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7366 |
il_operand_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7367 |
il_operand |
68 | 7368 |
{$$ = new il_operand_list_c(locloc(@$)); $$->add_element($1);} |
91 | 7369 |
| il_operand_list2 |
7370 |
; |
|
7371 |
||
7372 |
||
7373 |
/* List with 2 or more il_operands */ |
|
7374 |
il_operand_list2: |
|
7375 |
il_operand ',' il_operand |
|
7376 |
{$$ = new il_operand_list_c(locloc(@$)); $$->add_element($1); $$->add_element($3);} |
|
7377 |
| il_operand_list2 ',' il_operand |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7378 |
{$$ = $1; $$->add_element($3);} |
131 | 7379 |
/* ERROR_CHECK_BEGIN */ |
7380 |
| il_operand_list2 il_operand |
|
7381 |
{$$ = NULL; |
|
7382 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7383 |
print_err_msg(current_filename, locl(@1), locf(@2), "',' missing in IL operand list."); |
131 | 7384 |
} |
7385 |
| il_formal_funct_call error il_operand |
|
7386 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7387 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting ',' in IL operand list."); |
131 | 7388 |
yyerrok; |
7389 |
} |
|
7390 |
| il_formal_funct_call ',' error |
|
7391 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7392 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid operand in IL operand list."); |
131 | 7393 |
yyerrok; |
7394 |
} |
|
7395 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7396 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7397 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7398 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7399 |
simple_instr_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7400 |
il_simple_instruction |
68 | 7401 |
{$$ = new simple_instr_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7402 |
| simple_instr_list il_simple_instruction |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7403 |
{$$ = $1; $$->add_element($2);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7404 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7405 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7406 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7407 |
il_simple_instruction: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7408 |
il_simple_operation eol_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7409 |
| il_expression eol_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7410 |
| il_formal_funct_call eol_list |
131 | 7411 |
/* ERROR_CHECK_BEGIN */ |
7412 |
| il_expression error |
|
7413 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7414 |
print_err_msg(current_filename, locl(@1), locf(@2), "EOL missing after expression IL instruction."); |
131 | 7415 |
yyerrok; |
7416 |
} |
|
7417 |
| il_formal_funct_call error |
|
7418 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7419 |
print_err_msg(current_filename, locl(@1), locf(@2), "EOL missing after formal function call IL instruction."); |
131 | 7420 |
yyerrok; |
7421 |
} |
|
7422 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7423 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7424 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7425 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7426 |
/* NOTE: the correct definition of il_param_list is |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7427 |
* il_param_list ::= {il_param_instruction} il_param_last_instruction |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7428 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7429 |
* where {...} denotes zero or many il_param_instruction's. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7430 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7431 |
* We could do this by defining the following: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7432 |
* il_param_list: il_param_instruction_list il_param_last_instruction; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7433 |
* il_param_instruction_list : ** empty ** | il_param_instruction_list il_param_instruction; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7434 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7435 |
* Unfortunately, the above leads to reduce/reduce conflicts. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7436 |
* The chosen alternative (as follows) does not have any conflicts! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7437 |
* il_param_list: il_param_last_instruction | il_param_instruction_list il_param_last_instruction; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7438 |
* il_param_instruction_list : il_param_instruction_list | il_param_instruction_list il_param_instruction; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7439 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7440 |
il_param_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7441 |
il_param_instruction_list il_param_last_instruction |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7442 |
{$$ = $1; $$->add_element($2);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7443 |
| il_param_last_instruction |
68 | 7444 |
{$$ = new il_param_list_c(locloc(@$)); $$->add_element($1);} |
131 | 7445 |
/* ERROR_CHECK_BEGIN */ |
7446 |
| il_param_instruction_list error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7447 |
{$$ = $1; |
131 | 7448 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid parameter assignment in parameter assignment list."); |
7449 |
yyerrok; |
|
7450 |
} |
|
7451 |
| il_param_last_instruction il_param_last_instruction |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7452 |
{$$ = new il_param_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7453 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7454 |
print_err_msg(current_filename, locl(@1), locf(@2), "',' missing at the end of parameter assignment in parameter assignment list."); |
131 | 7455 |
} |
7456 |
| il_param_instruction_list il_param_last_instruction il_param_last_instruction |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7457 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7458 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7459 |
print_err_msg(current_filename, locl(@2), locf(@3), "',' missing at the end of parameter assignment in parameter assignment list."); |
131 | 7460 |
} |
7461 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7462 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7463 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7464 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7465 |
/* Helper symbol for il_param_list */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7466 |
il_param_instruction_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7467 |
il_param_instruction |
68 | 7468 |
{$$ = new il_param_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7469 |
| il_param_instruction_list il_param_instruction |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7470 |
{$$ = $1; $$->add_element($2);} |
131 | 7471 |
/* ERROR_CHECK_BEGIN */ |
7472 |
| il_param_last_instruction il_param_instruction |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7473 |
{$$ = new il_param_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7474 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7475 |
print_err_msg(current_filename, locl(@1), locf(@2), "',' missing at the end of parameter assignment in parameter assignment list."); |
131 | 7476 |
} |
7477 |
| il_param_instruction_list il_param_last_instruction il_param_instruction |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7478 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7479 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7480 |
print_err_msg(current_filename, locl(@2), locf(@3), "',' missing at the end of parameter assignment in parameter assignment list."); |
131 | 7481 |
} |
7482 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7483 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7484 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7485 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7486 |
il_param_instruction: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7487 |
il_param_assignment ',' eol_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7488 |
| il_param_out_assignment ',' eol_list |
131 | 7489 |
/* ERROR_CHECK_BEGIN */ |
7490 |
| il_param_assignment ',' error |
|
7491 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7492 |
print_err_msg(current_filename, locl(@2), locf(@3), "EOL missing at the end of parameter assignment in parameter assignment list."); |
131 | 7493 |
yyerrok; |
7494 |
} |
|
7495 |
| il_param_out_assignment ',' error |
|
7496 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7497 |
print_err_msg(current_filename, locl(@2), locf(@3), "EOL missing at the end of parameter out assignment in parameter assignment list."); |
131 | 7498 |
yyerrok; |
7499 |
} |
|
7500 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7501 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7502 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7503 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7504 |
il_param_last_instruction: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7505 |
il_param_assignment eol_list |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7506 |
| il_param_out_assignment eol_list |
131 | 7507 |
/* ERROR_CHECK_BEGIN */ |
7508 |
| il_param_assignment error |
|
7509 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7510 |
print_err_msg(current_filename, locl(@1), locf(@2), "EOL missing at the end of last parameter assignment in parameter assignment list."); |
131 | 7511 |
yyerrok; |
7512 |
} |
|
7513 |
| il_param_out_assignment error |
|
7514 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7515 |
print_err_msg(current_filename, locl(@1), locf(@2), "EOL missing at the end of last parameter out assignment in parameter assignment list."); |
131 | 7516 |
yyerrok; |
7517 |
} |
|
7518 |
/* ERROR_CHECK_END */ |
|
7519 |
||
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7520 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7521 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7522 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7523 |
il_param_assignment: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7524 |
il_assign_operator il_operand |
68 | 7525 |
{$$ = new il_param_assignment_c($1, $2, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7526 |
| il_assign_operator '(' eol_list simple_instr_list ')' |
68 | 7527 |
{$$ = new il_param_assignment_c($1, NULL, $4, locloc(@$));} |
131 | 7528 |
/* ERROR_CHECK_BEGIN */ |
7529 |
| error il_operand |
|
7530 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7531 |
print_err_msg(current_filename, locf(@1), locl(@1), "invalid operator in parameter assignment."); |
131 | 7532 |
yyerrok; |
7533 |
} |
|
7534 |
| error '(' eol_list simple_instr_list ')' |
|
7535 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7536 |
print_err_msg(current_filename, locf(@1), locl(@1), "invalid operator in parameter assignment."); |
131 | 7537 |
yyerrok; |
7538 |
} |
|
7539 |
| il_assign_operator error |
|
7540 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7541 |
print_err_msg(current_filename, locl(@1), locf(@2), "invalid operand defined in parameter assignment."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7542 |
yyerrok; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7543 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7544 |
| il_assign_operator '(' eol_list ')' |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7545 |
{$$ = NULL; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7546 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7547 |
print_err_msg(current_filename, locl(@3), locf(@4), "no instruction list defined in parameter assignment."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7548 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7549 |
| il_assign_operator '(' eol_list error ')' |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7550 |
{$$ = NULL; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7551 |
print_err_msg(current_filename, locf(@4), locl(@4), "invalid instruction list defined in parameter assignment."); |
131 | 7552 |
yyerrok; |
7553 |
} |
|
7554 |
| il_assign_operator '(' eol_list simple_instr_list error |
|
7555 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7556 |
print_err_msg(current_filename, locl(@4), locf(@5), "')' missing at the end of instruction list defined in parameter assignment."); |
131 | 7557 |
yyerrok; |
7558 |
} |
|
7559 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7560 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7561 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7562 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7563 |
il_param_out_assignment: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7564 |
il_assign_out_operator variable |
68 | 7565 |
{$$ = new il_param_out_assignment_c($1, $2, locloc(@$));} |
131 | 7566 |
/* ERROR_CHECK_BEGIN */ |
7567 |
| il_assign_out_operator error |
|
7568 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7569 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid variable defined in parameter out assignment."); |
131 | 7570 |
yyerrok; |
7571 |
} |
|
7572 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7573 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7574 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7575 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7576 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7577 |
/*******************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7578 |
/* B 2.2 Operators */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7579 |
/*******************/ |
68 | 7580 |
sendto_identifier: sendto_identifier_token {$$ = new identifier_c($1, locloc(@$));}; |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7581 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7582 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7583 |
/* NOTE: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7584 |
* The spec includes the operator 'EQ ' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7585 |
* Note that EQ is followed by a space. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7586 |
* I am considering this a typo, and defining the operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7587 |
* as 'EQ' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7588 |
* (Mario) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7589 |
*/ |
68 | 7590 |
LD_operator: LD {$$ = new LD_operator_c(locloc(@$));}; |
7591 |
LDN_operator: LDN {$$ = new LDN_operator_c(locloc(@$));}; |
|
7592 |
ST_operator: ST {$$ = new ST_operator_c(locloc(@$));}; |
|
7593 |
STN_operator: STN {$$ = new STN_operator_c(locloc(@$));}; |
|
7594 |
NOT_operator: NOT {$$ = new NOT_operator_c(locloc(@$));}; |
|
7595 |
S_operator: S {$$ = new S_operator_c(locloc(@$));}; |
|
7596 |
R_operator: R {$$ = new R_operator_c(locloc(@$));}; |
|
7597 |
S1_operator: S1 {$$ = new S1_operator_c(locloc(@$));}; |
|
7598 |
R1_operator: R1 {$$ = new R1_operator_c(locloc(@$));}; |
|
7599 |
CLK_operator: CLK {$$ = new CLK_operator_c(locloc(@$));}; |
|
7600 |
CU_operator: CU {$$ = new CU_operator_c(locloc(@$));}; |
|
7601 |
CD_operator: CD {$$ = new CD_operator_c(locloc(@$));}; |
|
7602 |
PV_operator: PV {$$ = new PV_operator_c(locloc(@$));}; |
|
7603 |
IN_operator: IN {$$ = new IN_operator_c(locloc(@$));}; |
|
7604 |
PT_operator: PT {$$ = new PT_operator_c(locloc(@$));}; |
|
7605 |
AND_operator: AND {$$ = new AND_operator_c(locloc(@$));}; |
|
7606 |
AND2_operator: AND2 {$$ = new AND_operator_c(locloc(@$));}; /* '&' in the source code! */ |
|
7607 |
OR_operator: OR {$$ = new OR_operator_c(locloc(@$));}; |
|
7608 |
XOR_operator: XOR {$$ = new XOR_operator_c(locloc(@$));}; |
|
7609 |
ANDN_operator: ANDN {$$ = new ANDN_operator_c(locloc(@$));}; |
|
7610 |
ANDN2_operator: ANDN2 {$$ = new ANDN_operator_c(locloc(@$));}; /* '&N' in the source code! */ |
|
7611 |
ORN_operator: ORN {$$ = new ORN_operator_c(locloc(@$));}; |
|
7612 |
XORN_operator: XORN {$$ = new XORN_operator_c(locloc(@$));}; |
|
7613 |
ADD_operator: ADD {$$ = new ADD_operator_c(locloc(@$));}; |
|
7614 |
SUB_operator: SUB {$$ = new SUB_operator_c(locloc(@$));}; |
|
7615 |
MUL_operator: MUL {$$ = new MUL_operator_c(locloc(@$));}; |
|
7616 |
DIV_operator: DIV {$$ = new DIV_operator_c(locloc(@$));}; |
|
7617 |
MOD_operator: MOD {$$ = new MOD_operator_c(locloc(@$));}; |
|
7618 |
GT_operator: GT {$$ = new GT_operator_c(locloc(@$));}; |
|
7619 |
GE_operator: GE {$$ = new GE_operator_c(locloc(@$));}; |
|
7620 |
EQ_operator: EQ {$$ = new EQ_operator_c(locloc(@$));}; |
|
7621 |
LT_operator: LT {$$ = new LT_operator_c(locloc(@$));}; |
|
7622 |
LE_operator: LE {$$ = new LE_operator_c(locloc(@$));}; |
|
7623 |
NE_operator: NE {$$ = new NE_operator_c(locloc(@$));}; |
|
7624 |
CAL_operator: CAL {$$ = new CAL_operator_c(locloc(@$));}; |
|
7625 |
CALC_operator: CALC {$$ = new CALC_operator_c(locloc(@$));}; |
|
7626 |
CALCN_operator: CALCN {$$ = new CALCN_operator_c(locloc(@$));}; |
|
7627 |
RET_operator: RET {$$ = new RET_operator_c(locloc(@$));}; |
|
7628 |
RETC_operator: RETC {$$ = new RETC_operator_c(locloc(@$));}; |
|
7629 |
RETCN_operator: RETCN {$$ = new RETCN_operator_c(locloc(@$));}; |
|
7630 |
JMP_operator: JMP {$$ = new JMP_operator_c(locloc(@$));}; |
|
7631 |
JMPC_operator: JMPC {$$ = new JMPC_operator_c(locloc(@$));}; |
|
7632 |
JMPCN_operator: JMPCN {$$ = new JMPCN_operator_c(locloc(@$));}; |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7633 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7634 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7635 |
il_simple_operator: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7636 |
il_simple_operator_clash |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7637 |
| il_simple_operator_noclash |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7638 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7639 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7640 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7641 |
il_simple_operator_noclash: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7642 |
LD_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7643 |
| LDN_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7644 |
| ST_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7645 |
| STN_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7646 |
| S_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7647 |
| R_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7648 |
| S1_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7649 |
| R1_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7650 |
| CLK_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7651 |
| CU_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7652 |
| CD_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7653 |
| PV_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7654 |
| IN_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7655 |
| PT_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7656 |
| il_expr_operator_noclash |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7657 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7658 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7659 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7660 |
il_simple_operator_clash: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7661 |
il_simple_operator_clash1 |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7662 |
| il_simple_operator_clash2 |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7663 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7664 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7665 |
il_simple_operator_clash1: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7666 |
NOT_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7667 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7668 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7669 |
il_simple_operator_clash2: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7670 |
il_expr_operator_clash |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7671 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7672 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7673 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7674 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7675 |
il_expr_operator: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7676 |
il_expr_operator_noclash |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7677 |
| il_expr_operator_clash |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7678 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7679 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7680 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7681 |
il_expr_operator_clash: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7682 |
AND_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7683 |
| OR_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7684 |
| XOR_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7685 |
| ADD_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7686 |
| SUB_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7687 |
| MUL_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7688 |
| DIV_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7689 |
| MOD_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7690 |
| GT_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7691 |
| GE_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7692 |
| EQ_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7693 |
| LT_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7694 |
| LE_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7695 |
| NE_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7696 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7697 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7698 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7699 |
il_expr_operator_noclash: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7700 |
ANDN_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7701 |
| ANDN2_operator /* string '&N' in source code! */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7702 |
| AND2_operator /* string '&' in source code! */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7703 |
| ORN_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7704 |
| XORN_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7705 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7706 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7707 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7708 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7709 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7710 |
il_assign_operator: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7711 |
/* variable_name ASSIGN */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7712 |
any_identifier ASSIGN |
131 | 7713 |
/* ERROR_CHECK_BEGIN */ |
7714 |
| error ASSIGN |
|
7715 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7716 |
print_err_msg(current_filename, locf(@1), locl(@1), "invalid parameter defined in parameter assignment."); |
131 | 7717 |
yyerrok; |
7718 |
} |
|
7719 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7720 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7721 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7722 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7723 |
il_assign_out_operator: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7724 |
/* variable_name SENDTO */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7725 |
/* any_identifier SENDTO */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7726 |
sendto_identifier SENDTO |
68 | 7727 |
{$$ = new il_assign_out_operator_c(NULL, $1, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7728 |
/*| NOT variable_name SENDTO */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7729 |
| NOT sendto_identifier SENDTO |
68 | 7730 |
{$$ = new il_assign_out_operator_c(new not_paramassign_c(locloc(@1)), $2, locloc(@$));} |
131 | 7731 |
/* ERROR_CHECK_BEGIN */ |
7732 |
| error SENDTO |
|
7733 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7734 |
print_err_msg(current_filename, locf(@1), locl(@1), "invalid parameter defined in parameter out assignment."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7735 |
yyerrok; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7736 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7737 |
| NOT SENDTO |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7738 |
{$$ = NULL; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7739 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7740 |
print_err_msg(current_filename, locl(@1), locf(@2), "no parameter defined in parameter out assignment."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7741 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7742 |
| NOT error SENDTO |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7743 |
{$$ = NULL; |
131 | 7744 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid parameter defined in parameter out assignment."); |
7745 |
yyerrok; |
|
7746 |
} |
|
7747 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7748 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7749 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7750 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7751 |
il_call_operator: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7752 |
CAL_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7753 |
| CALC_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7754 |
| CALCN_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7755 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7756 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7757 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7758 |
il_return_operator: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7759 |
RET_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7760 |
| RETC_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7761 |
| RETCN_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7762 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7763 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7764 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7765 |
il_jump_operator: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7766 |
JMP_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7767 |
| JMPC_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7768 |
| JMPCN_operator |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7769 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7770 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7771 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7772 |
/***********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7773 |
/* B 3.1 - Expressions */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7774 |
/***********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7775 |
expression: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7776 |
xor_expression |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7777 |
| expression OR xor_expression |
68 | 7778 |
{$$ = new or_expression_c($1, $3, locloc(@$));} |
131 | 7779 |
/* ERROR_CHECK_BEGIN */ |
7780 |
| expression OR error |
|
7781 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7782 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid expression after 'OR' in ST expression."); |
131 | 7783 |
yyerrok; |
7784 |
} |
|
7785 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7786 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7787 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7788 |
xor_expression: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7789 |
and_expression |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7790 |
| xor_expression XOR and_expression |
68 | 7791 |
{$$ = new xor_expression_c($1, $3, locloc(@$));} |
131 | 7792 |
/* ERROR_CHECK_BEGIN */ |
7793 |
| xor_expression XOR error |
|
7794 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7795 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid expression after 'XOR' in ST expression."); |
131 | 7796 |
yyerrok; |
7797 |
} |
|
7798 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7799 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7800 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7801 |
and_expression: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7802 |
comparison |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7803 |
| and_expression '&' comparison |
68 | 7804 |
{$$ = new and_expression_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7805 |
| and_expression AND comparison |
68 | 7806 |
{$$ = new and_expression_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7807 |
/* NOTE: The lexical parser never returns the token '&'. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7808 |
* The '&' string is interpreted by the lexcial parser as the token |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7809 |
* AND2! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7810 |
* This means that the first rule with '&' is actually not required, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7811 |
* but we leave it in nevertheless just in case we later decide |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7812 |
* to remove theh AND2 token... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7813 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7814 |
| and_expression AND2 comparison |
68 | 7815 |
{$$ = new and_expression_c($1, $3, locloc(@$));} |
131 | 7816 |
/* ERROR_CHECK_BEGIN */ |
7817 |
| and_expression '&' error |
|
7818 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7819 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid expression after '&' in ST expression."); |
131 | 7820 |
yyerrok; |
7821 |
} |
|
7822 |
| and_expression AND error |
|
7823 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7824 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid expression after 'AND' in ST expression."); |
131 | 7825 |
yyerrok; |
7826 |
} |
|
7827 |
| and_expression AND2 error |
|
7828 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7829 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid expression after '&' in ST expression."); |
131 | 7830 |
yyerrok; |
7831 |
} |
|
7832 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7833 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7834 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7835 |
comparison: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7836 |
equ_expression |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7837 |
| comparison '=' equ_expression |
68 | 7838 |
{$$ = new equ_expression_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7839 |
| comparison OPER_NE equ_expression |
68 | 7840 |
{$$ = new notequ_expression_c($1, $3, locloc(@$));} |
131 | 7841 |
/* ERROR_CHECK_BEGIN */ |
7842 |
| comparison '=' error |
|
7843 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7844 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid expression after '=' in ST expression."); |
131 | 7845 |
yyerrok; |
7846 |
} |
|
7847 |
| comparison OPER_NE error |
|
7848 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7849 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid expression after '<>' in ST expression."); |
131 | 7850 |
yyerrok; |
7851 |
} |
|
7852 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7853 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7854 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7855 |
equ_expression: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7856 |
add_expression |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7857 |
| equ_expression '<' add_expression |
68 | 7858 |
{$$ = new lt_expression_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7859 |
| equ_expression '>' add_expression |
68 | 7860 |
{$$ = new gt_expression_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7861 |
| equ_expression OPER_LE add_expression |
68 | 7862 |
{$$ = new le_expression_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7863 |
| equ_expression OPER_GE add_expression |
68 | 7864 |
{$$ = new ge_expression_c($1, $3, locloc(@$));} |
131 | 7865 |
/* ERROR_CHECK_BEGIN */ |
7866 |
| equ_expression '<' error |
|
7867 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7868 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid expression after '<' in ST expression."); |
131 | 7869 |
yyerrok; |
7870 |
} |
|
7871 |
| equ_expression '>' error |
|
7872 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7873 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid expression after '>' in ST expression."); |
131 | 7874 |
yyerrok; |
7875 |
} |
|
7876 |
| equ_expression OPER_LE error |
|
7877 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7878 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid expression after '<=' in ST expression."); |
131 | 7879 |
yyerrok; |
7880 |
} |
|
7881 |
| equ_expression OPER_GE error |
|
7882 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7883 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid expression after '>=' in ST expression."); |
131 | 7884 |
yyerrok; |
7885 |
} |
|
7886 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7887 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7888 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7889 |
/* Not required... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7890 |
comparison_operator: '<' | '>' | '>=' '<=' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7891 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7892 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7893 |
add_expression: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7894 |
term |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7895 |
| add_expression '+' term |
68 | 7896 |
{$$ = new add_expression_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7897 |
| add_expression '-' term |
68 | 7898 |
{$$ = new sub_expression_c($1, $3, locloc(@$));} |
131 | 7899 |
/* ERROR_CHECK_BEGIN */ |
7900 |
| add_expression '+' error |
|
7901 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7902 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid expression after '+' in ST expression."); |
131 | 7903 |
yyerrok; |
7904 |
} |
|
7905 |
| add_expression '-' error |
|
7906 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7907 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid expression after '-' in ST expression."); |
131 | 7908 |
yyerrok; |
7909 |
} |
|
7910 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7911 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7912 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7913 |
/* Not required... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7914 |
add_operator: '+' | '-' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7915 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7916 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7917 |
term: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7918 |
power_expression |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7919 |
| term '*' power_expression |
68 | 7920 |
{$$ = new mul_expression_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7921 |
| term '/' power_expression |
68 | 7922 |
{$$ = new div_expression_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7923 |
| term MOD power_expression |
68 | 7924 |
{$$ = new mod_expression_c($1, $3, locloc(@$));} |
131 | 7925 |
/* ERROR_CHECK_BEGIN */ |
7926 |
| term '*' error |
|
7927 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7928 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid expression after '*' in ST expression."); |
131 | 7929 |
yyerrok; |
7930 |
} |
|
7931 |
| term '/' error |
|
7932 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7933 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid expression after '/' in ST expression."); |
131 | 7934 |
yyerrok; |
7935 |
} |
|
7936 |
| term MOD error |
|
7937 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7938 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid expression after 'MOD' in ST expression."); |
131 | 7939 |
yyerrok; |
7940 |
} |
|
7941 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7942 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7943 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7944 |
/* Not required... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7945 |
multiply_operator: '*' | '/' | 'MOD' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7946 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7947 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7948 |
power_expression: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7949 |
unary_expression |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7950 |
| power_expression OPER_EXP unary_expression |
68 | 7951 |
{$$ = new power_expression_c($1, $3, locloc(@$));} |
131 | 7952 |
/* ERROR_CHECK_BEGIN */ |
7953 |
| power_expression OPER_EXP error |
|
7954 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7955 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid expression after '**' in ST expression."); |
131 | 7956 |
yyerrok; |
7957 |
} |
|
7958 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7959 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7960 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7961 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7962 |
unary_expression: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7963 |
primary_expression |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7964 |
| '-' primary_expression |
68 | 7965 |
{$$ = new neg_expression_c($2, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7966 |
| NOT primary_expression |
68 | 7967 |
{$$ = new not_expression_c($2, locloc(@$));} |
131 | 7968 |
/* ERROR_CHECK_BEGIN */ |
7969 |
| '-' error |
|
7970 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7971 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid expression after '-' in ST expression."); |
131 | 7972 |
yyerrok; |
7973 |
} |
|
7974 |
| NOT error |
|
7975 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
7976 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid expression after 'NOT' in ST expression."); |
131 | 7977 |
yyerrok; |
7978 |
} |
|
7979 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7980 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7981 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7982 |
/* Not required... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7983 |
unary_operator: '-' | 'NOT' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7984 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7985 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7986 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7987 |
/* NOTE: using constant as a possible symbol for primary_expression |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7988 |
* leads to a reduce/reduce conflict. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7989 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7990 |
* The text '-9' may be parsed as either a |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7991 |
* expression<-primary_expression<-constant<-signed_integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7992 |
* (i.e. the constant 9 negative) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7993 |
* OR |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7994 |
* expression<-unary_expression<-constant<-integer |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7995 |
* (i.e. the constant 9, preceded by a unary negation) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7996 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7997 |
* To remove the conlfict, we only allow constants without |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7998 |
* a preceding '-' to be used in primary_expression |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
7999 |
*/ |
13 | 8000 |
/* NOTE: We use enumerated_value_without_identifier instead of enumerated_value |
8001 |
* in order to remove a reduce/reduce conflict between reducing an |
|
8002 |
* identifier to a variable or an enumerated_value. |
|
78
aead91ec37cd
removing 'identifier' from definition of symbolic_variable
mario
parents:
77
diff
changeset
|
8003 |
* |
aead91ec37cd
removing 'identifier' from definition of symbolic_variable
mario
parents:
77
diff
changeset
|
8004 |
* This change follows the IEC specification. The specification seems to |
85 | 8005 |
* imply (by introducing syntax that allows to unambiguosly reference an |
8006 |
* enumerated value - enum_type#enum_value) that in case the same identifier is used |
|
78
aead91ec37cd
removing 'identifier' from definition of symbolic_variable
mario
parents:
77
diff
changeset
|
8007 |
* for a variable and an enumerated value, then the variable shall be |
85 | 8008 |
* considered. |
13 | 8009 |
*/ |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8010 |
primary_expression: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8011 |
/* constant */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8012 |
non_negative_constant |
85 | 8013 |
//| enumerated_value_without_identifier |
8014 |
| enumerated_value |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8015 |
| variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8016 |
| '(' expression ')' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8017 |
{$$ = $2;} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8018 |
| function_invocation |
131 | 8019 |
/* ERROR_CHECK_BEGIN */ |
8020 |
| '(' expression error |
|
8021 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8022 |
print_err_msg(current_filename, locl(@2), locf(@3), "')' missing at the end of expression in ST expression."); |
131 | 8023 |
yyerrok; |
8024 |
} |
|
8025 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8026 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8027 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8028 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8029 |
/* intermediate helper symbol for primary_expression */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8030 |
/* NOTE: function_name includes the standard function name 'NOT' ! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8031 |
* This introduces a reduce/reduce conflict, as NOT(var) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8032 |
* may be parsed as either a function_invocation, or a |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8033 |
* unary_expression. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8034 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8035 |
* I (Mario) have opted to remove the possible reduction |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8036 |
* to function invocation, which means replacing the rule |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8037 |
* function_name '(' param_assignment_list ')' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8038 |
* with |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8039 |
* function_name_no_NOT_clashes '(' param_assignment_list ')' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8040 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8041 |
* Notice how the new rule does not include the situation where |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8042 |
* the function NOT is called with more than one parameter, which |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8043 |
* the original rule does include! Callinf the NOT function with more |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8044 |
* than one argument is probably a semantic error anyway, so it |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8045 |
* doesn't make much sense to take it into account. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8046 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8047 |
* Nevertheless, if we were to to it entirely correctly, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8048 |
* leaving the semantic checks for the next compiler stage, |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8049 |
* this syntax parser would need to include such a possibility. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8050 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8051 |
* We will leave this out for now. No need to complicate the syntax |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8052 |
* more than the specification does by contradicting itself, and |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8053 |
* letting names clash! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8054 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8055 |
function_invocation: |
85 | 8056 |
/* function_name '(' [param_assignment_list] ')' */ |
8057 |
function_name_no_NOT_clashes '(' param_assignment_formal_list ')' |
|
8058 |
{$$ = new function_invocation_c($1, $3, locloc(@$));} |
|
8059 |
| function_name_no_NOT_clashes '(' param_assignment_nonformal_list ')' |
|
68 | 8060 |
{$$ = new function_invocation_c($1, $3, locloc(@$));} |
131 | 8061 |
/* ERROR_CHECK_BEGIN */ |
8062 |
| function_name_no_NOT_clashes param_assignment_formal_list ')' |
|
8063 |
{$$ = NULL; |
|
8064 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8065 |
print_err_msg(current_filename, locl(@1), locf(@2), "'(' missing after function name in ST expression."); |
131 | 8066 |
} |
8067 |
| function_name_no_NOT_clashes error param_assignment_formal_list ')' |
|
8068 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8069 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '(' after function name in ST expression."); |
131 | 8070 |
yyerrok; |
8071 |
} |
|
8072 |
| function_name_no_NOT_clashes error param_assignment_nonformal_list ')' |
|
8073 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8074 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '(' after function name in ST expression."); |
131 | 8075 |
yyerrok; |
8076 |
} |
|
8077 |
| function_name_no_NOT_clashes '(' ')' |
|
8078 |
{$$ = NULL; |
|
8079 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8080 |
print_err_msg(current_filename, locl(@2), locf(@3), "no parameter defined in function invocation of ST expression."); |
131 | 8081 |
} |
8082 |
| function_name_no_NOT_clashes '(' error ')' |
|
8083 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8084 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid parameter(s) defined in function invocation of ST expression."); |
131 | 8085 |
yyerrok; |
8086 |
} |
|
8087 |
| function_name_no_NOT_clashes '(' param_assignment_formal_list error |
|
8088 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8089 |
print_err_msg(current_filename, locl(@3), locf(@4), "')' missing at the end of function invocation in ST expression."); |
131 | 8090 |
yyerrok; |
8091 |
} |
|
8092 |
| function_name_no_NOT_clashes '(' param_assignment_nonformal_list error |
|
8093 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8094 |
print_err_msg(current_filename, locl(@3), locf(@4), "')' missing at the end of function invocation in ST expression."); |
131 | 8095 |
yyerrok; |
8096 |
} |
|
8097 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8098 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8099 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8100 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8101 |
/********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8102 |
/* B 3.2 Statements */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8103 |
/********************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8104 |
statement_list: |
13 | 8105 |
statement ';' |
68 | 8106 |
{$$ = new statement_list_c(locloc(@$)); $$->add_element($1);} |
13 | 8107 |
| pragma |
68 | 8108 |
{$$ = new statement_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8109 |
| statement_list statement ';' |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8110 |
{$$ = $1; $$->add_element($2);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8111 |
| statement_list pragma |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8112 |
{$$ = $1; $$->add_element($2);} |
68 | 8113 |
/* ERROR_CHECK_BEGIN */ |
133 | 8114 |
| statement error |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8115 |
{$$ = new statement_list_c(locloc(@$)); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8116 |
print_err_msg(current_filename, locl(@1), locf(@2), "';' missing at the end of statement in ST statement."); |
131 | 8117 |
yyerrok; |
8118 |
} |
|
133 | 8119 |
| statement_list statement error |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8120 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8121 |
print_err_msg(current_filename, locl(@2), locf(@3), "';' missing at the end of statement in ST statement."); |
133 | 8122 |
yyerrok; |
8123 |
} |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8124 |
| statement_list error ';' |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8125 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8126 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid statement in ST statement."); |
133 | 8127 |
yyerrok; |
8128 |
} |
|
8129 |
| statement_list ';' |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8130 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8131 |
yynerrs++; |
133 | 8132 |
print_err_msg(current_filename, locf(@2), locl(@2), "unexpected ';' after statement in ST statement."); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8133 |
} |
68 | 8134 |
/* ERROR_CHECK_END */ |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8135 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8136 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8137 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8138 |
statement: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8139 |
assignment_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8140 |
| subprogram_control_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8141 |
| selection_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8142 |
| iteration_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8143 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8144 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8145 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8146 |
/*********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8147 |
/* B 3.2.1 Assignment Statements */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8148 |
/*********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8149 |
assignment_statement: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8150 |
variable ASSIGN expression |
68 | 8151 |
{$$ = new assignment_statement_c($1, $3, locloc(@$));} |
131 | 8152 |
/* ERROR_CHECK_BEGIN */ |
8153 |
| variable ASSIGN error |
|
133 | 8154 |
{$$ = NULL; |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8155 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid expression after ':=' in ST assignment statement."); |
131 | 8156 |
yyerrok; |
8157 |
} |
|
8158 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8159 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8160 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8161 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8162 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8163 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8164 |
/*****************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8165 |
/* B 3.2.2 Subprogram Control Statements */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8166 |
/*****************************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8167 |
subprogram_control_statement: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8168 |
fb_invocation |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8169 |
| return_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8170 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8171 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8172 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8173 |
return_statement: |
68 | 8174 |
RETURN {$$ = new return_statement_c(locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8175 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8176 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8177 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8178 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8179 |
fb_invocation: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8180 |
prev_declared_fb_name '(' ')' |
68 | 8181 |
{$$ = new fb_invocation_c($1, NULL, locloc(@$)); } |
85 | 8182 |
| prev_declared_fb_name '(' param_assignment_formal_list ')' |
8183 |
{$$ = new fb_invocation_c($1, $3, locloc(@$));} |
|
8184 |
| prev_declared_fb_name '(' param_assignment_nonformal_list ')' |
|
68 | 8185 |
{$$ = new fb_invocation_c($1, $3, locloc(@$));} |
131 | 8186 |
/* ERROR_CHECK_BEGIN */ |
8187 |
| prev_declared_fb_name ')' |
|
133 | 8188 |
{$$ = NULL; |
131 | 8189 |
yynerrs++; |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8190 |
print_err_msg(current_filename, locl(@1), locf(@2), "'(' missing after function block name in ST statement."); |
131 | 8191 |
} |
8192 |
| prev_declared_fb_name param_assignment_formal_list ')' |
|
133 | 8193 |
{$$ = NULL; |
131 | 8194 |
yynerrs++; |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8195 |
print_err_msg(current_filename, locl(@1), locf(@2), "'(' missing after function block name in ST statement."); |
131 | 8196 |
} |
8197 |
| prev_declared_fb_name error ')' |
|
133 | 8198 |
{$$ = NULL; |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8199 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '(' after function block name in ST statement."); |
131 | 8200 |
yyerrok; |
8201 |
} |
|
8202 |
| prev_declared_fb_name error param_assignment_formal_list ')' |
|
133 | 8203 |
{$$ = NULL; |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8204 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '(' after function block name in ST statement."); |
131 | 8205 |
yyerrok; |
8206 |
} |
|
8207 |
| prev_declared_fb_name error param_assignment_nonformal_list ')' |
|
133 | 8208 |
{$$ = NULL; |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8209 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting '(' after function block name in ST statement."); |
131 | 8210 |
yyerrok; |
8211 |
} |
|
8212 |
| prev_declared_fb_name '(' error ')' |
|
133 | 8213 |
{$$ = NULL; |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8214 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid parameter list in function block invocation in ST statement."); |
131 | 8215 |
yyerrok; |
8216 |
} |
|
8217 |
| prev_declared_fb_name '(' error |
|
133 | 8218 |
{$$ = NULL; |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8219 |
print_err_msg(current_filename, locl(@2), locf(@3), "')' missing after parameter list of function block invocation in ST statement."); |
131 | 8220 |
yyerrok; |
8221 |
} |
|
8222 |
| prev_declared_fb_name '(' param_assignment_formal_list error |
|
133 | 8223 |
{$$ = NULL; |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8224 |
print_err_msg(current_filename, locl(@3), locf(@4), "')' missing after parameter list of function block invocation in ST statement."); |
131 | 8225 |
yyerrok; |
8226 |
} |
|
8227 |
| prev_declared_fb_name '(' param_assignment_nonformal_list error |
|
133 | 8228 |
{$$ = NULL; |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8229 |
print_err_msg(current_filename, locl(@3), locf(@4), "')' missing after parameter list of function block invocation in ST statement."); |
131 | 8230 |
yyerrok; |
8231 |
} |
|
8232 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8233 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8234 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8235 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8236 |
/* helper symbol for |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8237 |
* - fb_invocation |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8238 |
* - function_invocation |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8239 |
*/ |
85 | 8240 |
param_assignment_formal_list: |
8241 |
param_assignment_formal |
|
68 | 8242 |
{$$ = new param_assignment_list_c(locloc(@$)); $$->add_element($1);} |
85 | 8243 |
| param_assignment_formal_list ',' param_assignment_formal |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8244 |
{$$ = $1; $$->add_element($3);} |
131 | 8245 |
/* ERROR_CHECK_BEGIN */ |
8246 |
| param_assignment_formal_list error param_assignment_formal |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8247 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8248 |
print_err_msg(current_filename, locf(@2), locl(@2), "expecting ',' in ST parameter assignment list."); |
131 | 8249 |
yyerrok; |
8250 |
} |
|
8251 |
| param_assignment_formal_list ',' error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8252 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8253 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid parameter assignment in ST parameter assignment list."); |
131 | 8254 |
yyerrok; |
8255 |
} |
|
8256 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8257 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8258 |
|
85 | 8259 |
/* helper symbol for |
8260 |
* - fb_invocation |
|
8261 |
* - function_invocation |
|
8262 |
*/ |
|
8263 |
param_assignment_nonformal_list: |
|
8264 |
param_assignment_nonformal |
|
8265 |
{$$ = new param_assignment_list_c(locloc(@$)); $$->add_element($1);} |
|
8266 |
| param_assignment_nonformal_list ',' param_assignment_nonformal |
|
8267 |
{$$ = $1; $$->add_element($3);} |
|
131 | 8268 |
/* ERROR_CHECK_BEGIN */ |
8269 |
| param_assignment_nonformal_list ',' error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8270 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8271 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid parameter assignment in ST parameter assignment list."); |
131 | 8272 |
yyerrok; |
8273 |
} |
|
8274 |
/* ERROR_CHECK_END */ |
|
85 | 8275 |
; |
8276 |
||
8277 |
||
8278 |
/* NOTE: According to the IEC 61131-3 standard, there are two possible |
|
8279 |
* syntaxes for calling function blocks within ST. |
|
8280 |
* The formal method has the form: |
|
8281 |
* fb ( invar := x, inoutvar := var1, outvar => var2); |
|
8282 |
* The non-formal method has the form: |
|
8283 |
* fb (x, var1, var2); |
|
8284 |
* In the text of IEC 61131-3 (where the semantics are defined), |
|
8285 |
* it is obvious that mixing the two syntaxes is considered incorrect. |
|
8286 |
* The following should therefore be incorrect: |
|
8287 |
* fb ( invar := x, var1, var2); |
|
8288 |
* However, according to the syntax definition, as defined in IEC 61131-3, |
|
8289 |
* mixing the formal and non-formal methods of invocation is allowed. |
|
8290 |
* We have two alternatives: |
|
8291 |
* (a) implement the syntax here in iec.y according to the standard, |
|
8292 |
* and leave it to the semantic analyser stage to find this error |
|
8293 |
* (b) or implement the syntax in iec.y correctly, not allowing |
|
8294 |
* the mixing of formal and non-formal invocation syntaxes. |
|
8295 |
* Considering that this is a syntax issue, and not semantic issue, |
|
8296 |
* I (Mario) have decided to go with alternative (a). |
|
8297 |
* In other words, in iec.y we do not follow the syntax as defined in |
|
8298 |
* Annex B of the IEC 61131-3 standard, but rather implement |
|
8299 |
* the syntax also taking into account the textual part of the standard too. |
|
8300 |
*/ |
|
8301 |
/* |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8302 |
param_assignment: |
85 | 8303 |
variable_name ASSIGN expression |
8304 |
*/ |
|
8305 |
param_assignment_nonformal: |
|
8306 |
expression |
|
8307 |
; |
|
8308 |
||
8309 |
||
8310 |
param_assignment_formal: |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8311 |
any_identifier ASSIGN expression |
68 | 8312 |
{$$ = new input_variable_param_assignment_c($1, $3, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8313 |
/*| variable_name SENDTO variable */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8314 |
/*| any_identifier SENDTO variable */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8315 |
| sendto_identifier SENDTO variable |
68 | 8316 |
{$$ = new output_variable_param_assignment_c(NULL,$1, $3, locloc(@$));} |
85 | 8317 |
/*| NOT variable_name SENDTO variable */ |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8318 |
/*| NOT any_identifier SENDTO variable*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8319 |
| NOT sendto_identifier SENDTO variable |
68 | 8320 |
{$$ = new output_variable_param_assignment_c(new not_paramassign_c(locloc(@$)),$2, $4, locloc(@$));} |
131 | 8321 |
/* ERROR_CHECK_BEGIN */ |
8322 |
| any_identifier ASSIGN error |
|
8323 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8324 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid expression in ST formal parameter assignment."); |
131 | 8325 |
yyerrok; |
8326 |
} |
|
8327 |
| sendto_identifier SENDTO error |
|
8328 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8329 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid expression in ST formal parameter out assignment."); |
131 | 8330 |
yyerrok; |
8331 |
} |
|
8332 |
| NOT SENDTO variable |
|
8333 |
{$$ = NULL; |
|
8334 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8335 |
print_err_msg(current_filename, locl(@1), locf(@2), "no parameter name defined in ST formal parameter out negated assignment."); |
131 | 8336 |
} |
8337 |
| NOT error SENDTO variable |
|
8338 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8339 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid parameter name defined in ST formal parameter out negated assignment."); |
131 | 8340 |
yyerrok; |
8341 |
} |
|
8342 |
| NOT sendto_identifier SENDTO error |
|
8343 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8344 |
print_err_msg(current_filename, locf(@4), locl(@4), "invalid expression in ST formal parameter out negated assignment."); |
131 | 8345 |
yyerrok; |
8346 |
} |
|
8347 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8348 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8349 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8350 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8351 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8352 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8353 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8354 |
/********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8355 |
/* B 3.2.3 Selection Statements */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8356 |
/********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8357 |
selection_statement: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8358 |
if_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8359 |
| case_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8360 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8361 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8362 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8363 |
if_statement: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8364 |
IF expression THEN statement_list elseif_statement_list END_IF |
68 | 8365 |
{$$ = new if_statement_c($2, $4, $5, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8366 |
| IF expression THEN statement_list elseif_statement_list ELSE statement_list END_IF |
68 | 8367 |
{$$ = new if_statement_c($2, $4, $5, $7, locloc(@$));} |
131 | 8368 |
/* ERROR_CHECK_BEGIN */ |
8369 |
| IF THEN statement_list elseif_statement_list END_IF |
|
8370 |
{$$ = NULL; |
|
8371 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8372 |
print_err_msg(current_filename, locl(@1), locf(@2), "no test expression defined in ST 'IF' statement."); |
131 | 8373 |
} |
8374 |
| IF THEN statement_list elseif_statement_list ELSE statement_list END_IF |
|
8375 |
{$$ = NULL; |
|
8376 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8377 |
print_err_msg(current_filename, locl(@1), locf(@2), "no test expression defined in ST 'IF' statement."); |
131 | 8378 |
} |
8379 |
| IF error THEN statement_list elseif_statement_list END_IF |
|
8380 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8381 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid test expression defined for ST 'IF' statement."); |
131 | 8382 |
yyerrok; |
8383 |
} |
|
8384 |
| IF error THEN statement_list elseif_statement_list ELSE statement_list END_IF |
|
8385 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8386 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid test expression defined for ST 'IF' statement."); |
131 | 8387 |
yyerrok; |
8388 |
} |
|
8389 |
| IF expression error statement_list elseif_statement_list END_IF |
|
8390 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8391 |
print_err_msg(current_filename, locf(@3), locl(@3), "expecting 'THEN' after test expression in ST 'IF' statement."); |
131 | 8392 |
yyerrok; |
8393 |
} |
|
8394 |
| IF expression error statement_list elseif_statement_list ELSE statement_list END_IF |
|
8395 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8396 |
print_err_msg(current_filename, locf(@3), locl(@3), "expecting 'THEN' after test expression in ST 'IF' statement."); |
131 | 8397 |
yyerrok; |
8398 |
} |
|
8399 |
| IF expression THEN elseif_statement_list END_IF |
|
8400 |
{$$ = NULL; |
|
8401 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8402 |
print_err_msg(current_filename, locl(@3), locf(@4), "no statement defined after 'THEN' in ST 'IF' statement."); |
131 | 8403 |
} |
8404 |
| IF expression THEN elseif_statement_list ELSE statement_list END_IF |
|
8405 |
{$$ = NULL; |
|
8406 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8407 |
print_err_msg(current_filename, locl(@3), locf(@4), "no statement defined after 'THEN' in ST 'IF' statement."); |
131 | 8408 |
} |
8409 |
| IF expression THEN statement_list elseif_statement_list ELSE END_IF |
|
8410 |
{$$ = NULL; |
|
8411 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8412 |
print_err_msg(current_filename, locl(@6), locf(@7), "no statement defined after 'ELSE' in ST 'IF' statement."); |
131 | 8413 |
} |
8414 |
| IF expression THEN statement_list elseif_statement_list ELSE error END_IF |
|
8415 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8416 |
print_err_msg(current_filename, locf(@7), locl(@7), "invalid statement defined after 'ELSE' in ST 'IF' statement."); |
131 | 8417 |
yyerrok; |
8418 |
} |
|
8419 |
| IF error END_IF |
|
8420 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8421 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in ST 'IF' statement."); |
131 | 8422 |
yyerrok; |
8423 |
} |
|
8424 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8425 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8426 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8427 |
/* helper symbol for if_statement */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8428 |
elseif_statement_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8429 |
/* empty */ |
68 | 8430 |
{$$ = new elseif_statement_list_c(locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8431 |
| elseif_statement_list elseif_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8432 |
{$$ = $1; $$->add_element($2);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8433 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8434 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8435 |
/* helper symbol for elseif_statement_list */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8436 |
elseif_statement: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8437 |
ELSIF expression THEN statement_list |
68 | 8438 |
{$$ = new elseif_statement_c($2, $4, locloc(@$));} |
131 | 8439 |
/* ERROR_CHECK_BEGIN */ |
8440 |
| ELSIF THEN statement_list |
|
8441 |
{$$ = NULL; |
|
8442 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8443 |
print_err_msg(current_filename, locl(@1), locf(@2), "no test expression defined for 'ELSEIF' statement in ST 'IF' statement."); |
131 | 8444 |
} |
8445 |
| ELSIF error THEN statement_list |
|
8446 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8447 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid test expression defined for 'ELSEIF' statement in ST 'IF' statement."); |
131 | 8448 |
yyerrok; |
8449 |
} |
|
8450 |
| ELSIF expression error statement_list |
|
8451 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8452 |
print_err_msg(current_filename, locf(@3), locl(@3), "expecting 'THEN' after test expression in 'ELSEIF' statement of ST 'IF' statement."); |
131 | 8453 |
yyerrok; |
8454 |
} |
|
8455 |
| ELSIF expression THEN error |
|
8456 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8457 |
print_err_msg(current_filename, locf(@4), locl(@4), "invalid statement list in 'ELSEIF' statement of ST 'IF' statement."); |
131 | 8458 |
yyerrok; |
8459 |
} |
|
8460 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8461 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8462 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8463 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8464 |
case_statement: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8465 |
CASE expression OF case_element_list END_CASE |
68 | 8466 |
{$$ = new case_statement_c($2, $4, NULL, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8467 |
| CASE expression OF case_element_list ELSE statement_list END_CASE |
68 | 8468 |
{$$ = new case_statement_c($2, $4, $6, locloc(@$));} |
131 | 8469 |
/* ERROR_CHECK_BEGIN */ |
8470 |
| CASE OF case_element_list END_CASE |
|
8471 |
{$$ = NULL; |
|
8472 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8473 |
print_err_msg(current_filename, locl(@1), locf(@2), "no test expression defined in ST 'CASE' statement."); |
131 | 8474 |
} |
8475 |
| CASE OF case_element_list ELSE statement_list END_CASE |
|
8476 |
{$$ = NULL; |
|
8477 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8478 |
print_err_msg(current_filename, locl(@1), locf(@2), "no test expression defined in ST 'CASE' statement."); |
131 | 8479 |
} |
8480 |
| CASE error OF case_element_list END_CASE |
|
8481 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8482 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid test expression defined for ST 'CASE' statement."); |
131 | 8483 |
yyerrok; |
8484 |
} |
|
8485 |
| CASE error OF case_element_list ELSE statement_list END_CASE |
|
8486 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8487 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid test expression defined for ST 'CASE' statement."); |
131 | 8488 |
yyerrok; |
8489 |
} |
|
8490 |
| CASE expression error case_element_list END_CASE |
|
8491 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8492 |
print_err_msg(current_filename, locf(@3), locl(@3), "expecting 'OF' after test expression in ST 'CASE' statement."); |
131 | 8493 |
yyerrok; |
8494 |
} |
|
8495 |
| CASE expression error case_element_list ELSE statement_list END_CASE |
|
8496 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8497 |
print_err_msg(current_filename, locf(@3), locl(@3), "expecting 'OF' after test expression in ST 'CASE' statement."); |
131 | 8498 |
yyerrok; |
8499 |
} |
|
8500 |
| CASE expression OF END_CASE |
|
8501 |
{$$ = NULL; |
|
8502 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8503 |
print_err_msg(current_filename, locl(@3), locf(@4), "no case element(s) defined after 'OF' in ST 'CASE' statement."); |
131 | 8504 |
} |
8505 |
| CASE expression OF ELSE statement_list END_CASE |
|
8506 |
{$$ = NULL; |
|
8507 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8508 |
print_err_msg(current_filename, locl(@3), locf(@4), "no case element(s) defined after 'OF' in ST 'CASE' statement."); |
131 | 8509 |
} |
8510 |
| CASE expression OF error END_CASE |
|
8511 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8512 |
print_err_msg(current_filename, locf(@4), locl(@4), "invalid case element(s) defined after 'OF' in ST 'CASE' statement."); |
131 | 8513 |
yyerrok; |
8514 |
} |
|
8515 |
| CASE expression OF error ELSE statement_list END_CASE |
|
8516 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8517 |
print_err_msg(current_filename, locf(@4), locl(@4), "invalid case element(s) defined after 'OF' in ST 'CASE' statement."); |
131 | 8518 |
yyerrok; |
8519 |
} |
|
8520 |
| CASE expression OF case_element_list ELSE END_CASE |
|
8521 |
{$$ = NULL; |
|
8522 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8523 |
print_err_msg(current_filename, locl(@5), locf(@6), "no statement defined after 'ELSE' in ST 'CASE' statement."); |
131 | 8524 |
} |
8525 |
| CASE expression OF case_element_list ELSE error END_CASE |
|
8526 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8527 |
print_err_msg(current_filename, locf(@6), locl(@6), "invalid statement defined after 'ELSE' in ST 'CASE' statement."); |
131 | 8528 |
yyerrok; |
8529 |
} |
|
8530 |
| CASE error END_CASE |
|
8531 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8532 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in ST 'CASE' statement."); |
131 | 8533 |
yyerrok; |
8534 |
} |
|
8535 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8536 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8537 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8538 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8539 |
/* helper symbol for case_statement */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8540 |
case_element_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8541 |
case_element |
68 | 8542 |
{$$ = new case_element_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8543 |
| case_element_list case_element |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8544 |
{$$ = $1; $$->add_element($2);} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8545 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8546 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8547 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8548 |
case_element: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8549 |
case_list ':' statement_list |
68 | 8550 |
{$$ = new case_element_c($1, $3, locloc(@$));} |
131 | 8551 |
/* ERROR_CHECK_BEGIN */ |
8552 |
| case_list statement_list |
|
8553 |
{$$ = NULL; |
|
8554 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8555 |
print_err_msg(current_filename, locl(@1), locf(@2), "':' missing after case list in ST 'CASE' statement."); |
131 | 8556 |
} |
8557 |
| case_list ':' error |
|
8558 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8559 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid statement in case element of ST 'CASE' statement."); |
131 | 8560 |
yyerrok; |
8561 |
} |
|
8562 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8563 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8564 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8565 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8566 |
case_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8567 |
case_list_element |
68 | 8568 |
{$$ = new case_list_c(locloc(@$)); $$->add_element($1);} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8569 |
| case_list ',' case_list_element |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8570 |
{$$ = $1; $$->add_element($3);} |
131 | 8571 |
/* ERROR_CHECK_BEGIN */ |
8572 |
| case_list ',' error |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8573 |
{$$ = $1; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8574 |
print_err_msg(current_filename, locf(@3), locl(@3), "invalid case in case list of ST parameter assignment list."); |
131 | 8575 |
yyerrok; |
8576 |
} |
|
8577 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8578 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8579 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8580 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8581 |
case_list_element: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8582 |
signed_integer |
78
aead91ec37cd
removing 'identifier' from definition of symbolic_variable
mario
parents:
77
diff
changeset
|
8583 |
| subrange |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8584 |
| enumerated_value |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8585 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8586 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8587 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8588 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8589 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8590 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8591 |
/********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8592 |
/* B 3.2.4 Iteration Statements */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8593 |
/********************************/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8594 |
iteration_statement: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8595 |
for_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8596 |
| while_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8597 |
| repeat_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8598 |
| exit_statement |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8599 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8600 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8601 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8602 |
for_statement: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8603 |
FOR control_variable ASSIGN expression TO expression BY expression DO statement_list END_FOR |
68 | 8604 |
{$$ = new for_statement_c($2, $4, $6, $8, $10, locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8605 |
| FOR control_variable ASSIGN expression TO expression DO statement_list END_FOR |
68 | 8606 |
{$$ = new for_statement_c($2, $4, $6, NULL, $8, locloc(@$));} |
131 | 8607 |
/* ERROR_CHECK_BEGIN */ |
8608 |
| FOR ASSIGN expression TO expression BY expression DO statement_list END_FOR |
|
8609 |
{$$ = NULL; |
|
8610 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8611 |
print_err_msg(current_filename, locl(@1), locf(@2), "no control variable defined in ST 'FOR' statement."); |
131 | 8612 |
} |
8613 |
| FOR ASSIGN expression TO expression DO statement_list END_FOR |
|
8614 |
{$$ = NULL; |
|
8615 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8616 |
print_err_msg(current_filename, locl(@1), locf(@2), "no control variable defined in ST 'FOR' statement."); |
131 | 8617 |
} |
8618 |
| FOR error ASSIGN expression TO expression BY expression DO statement_list END_FOR |
|
8619 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8620 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid control variable defined for ST 'FOR' statement."); |
131 | 8621 |
yyerrok; |
8622 |
} |
|
8623 |
| FOR error ASSIGN expression TO expression DO statement_list END_FOR |
|
8624 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8625 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid control variable defined for ST 'FOR' statement."); |
131 | 8626 |
yyerrok; |
8627 |
} |
|
8628 |
| FOR control_variable expression TO expression BY expression DO statement_list END_FOR |
|
8629 |
{$$ = NULL; |
|
8630 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8631 |
print_err_msg(current_filename, locl(@2), locf(@3), "':=' missing between control variable and start expression in ST 'FOR' statement."); |
131 | 8632 |
} |
8633 |
| FOR control_variable expression TO expression DO statement_list END_FOR |
|
8634 |
{$$ = NULL; |
|
8635 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8636 |
print_err_msg(current_filename, locl(@2), locf(@3), "':=' missing between control variable and start expression in ST 'FOR' statement."); |
131 | 8637 |
} |
8638 |
| FOR control_variable error expression TO expression BY expression DO statement_list END_FOR |
|
8639 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8640 |
print_err_msg(current_filename, locf(@3), locl(@3), "expecting ':=' between control variable and start expression in ST 'FOR' statement."); |
131 | 8641 |
yyerrok; |
8642 |
} |
|
8643 |
| FOR control_variable error expression TO expression DO statement_list END_FOR |
|
8644 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8645 |
print_err_msg(current_filename, locf(@3), locl(@3), "expecting ':=' between control variable and start expression in ST 'FOR' statement."); |
131 | 8646 |
yyerrok; |
8647 |
} |
|
8648 |
| FOR control_variable ASSIGN TO expression BY expression DO statement_list END_FOR |
|
8649 |
{$$ = NULL; |
|
8650 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8651 |
print_err_msg(current_filename, locl(@3), locf(@4), "no start expression defined in ST 'FOR' statement."); |
131 | 8652 |
} |
8653 |
| FOR control_variable ASSIGN TO expression DO statement_list END_FOR |
|
8654 |
{$$ = NULL; |
|
8655 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8656 |
print_err_msg(current_filename, locl(@3), locf(@4), "no start expression defined in ST 'FOR' statement."); |
131 | 8657 |
} |
8658 |
| FOR control_variable ASSIGN error TO expression BY expression DO statement_list END_FOR |
|
8659 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8660 |
print_err_msg(current_filename, locf(@4), locl(@4), "invalid start expression defined in ST 'FOR' statement."); |
131 | 8661 |
yyerrok; |
8662 |
} |
|
8663 |
| FOR control_variable ASSIGN error TO expression DO statement_list END_FOR |
|
8664 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8665 |
print_err_msg(current_filename, locf(@4), locl(@4), "invalid start expression in ST 'FOR' statement."); |
131 | 8666 |
yyerrok; |
8667 |
} |
|
8668 |
| FOR control_variable ASSIGN expression error expression BY expression DO statement_list END_FOR |
|
8669 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8670 |
print_err_msg(current_filename, locf(@5), locl(@5), "expecting 'TO' between start expression and end expression in ST 'FOR' statement."); |
131 | 8671 |
yyerrok; |
8672 |
} |
|
8673 |
| FOR control_variable ASSIGN expression error expression DO statement_list END_FOR |
|
8674 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8675 |
print_err_msg(current_filename, locf(@5), locl(@5), "expecting 'TO' between start expression and end expression in ST 'FOR' statement."); |
131 | 8676 |
yyerrok; |
8677 |
} |
|
8678 |
| FOR control_variable ASSIGN expression TO expression error expression DO statement_list END_FOR |
|
8679 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8680 |
print_err_msg(current_filename, locf(@7), locl(@7), "expecting 'BY' between end expression and step expression in ST 'FOR' statement."); |
131 | 8681 |
yyerrok; |
8682 |
} |
|
8683 |
| FOR control_variable ASSIGN expression TO expression BY expression error statement_list END_FOR |
|
8684 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8685 |
print_err_msg(current_filename, locf(@9), locl(@9), "expecting 'DO' after step expression in ST 'FOR' statement."); |
131 | 8686 |
yyerrok; |
8687 |
} |
|
8688 |
| FOR control_variable ASSIGN expression TO expression error statement_list END_FOR |
|
8689 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8690 |
print_err_msg(current_filename, locf(@7), locl(@7), "expecting 'DO' after end expression in ST 'FOR' statement."); |
131 | 8691 |
yyerrok; |
8692 |
} |
|
8693 |
| FOR control_variable ASSIGN expression TO expression BY expression DO END_FOR |
|
8694 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8695 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8696 |
print_err_msg(current_filename, locl(@9), locf(@10), "no statement(s) defined after 'DO' in ST 'FOR' statement."); |
131 | 8697 |
} |
8698 |
| FOR control_variable ASSIGN expression TO expression DO END_FOR |
|
8699 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8700 |
yynerrs++; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8701 |
print_err_msg(current_filename, locl(@7), locf(@8), "no statement(s) defined after 'DO' in ST 'FOR' statement."); |
131 | 8702 |
} |
8703 |
| FOR control_variable ASSIGN expression TO expression BY expression DO error END_FOR |
|
8704 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8705 |
print_err_msg(current_filename, locf(@10), locl(@10), "invalid statement(s) defined after 'DO' in ST 'FOR' statement."); |
131 | 8706 |
yyerrok; |
8707 |
} |
|
8708 |
| FOR control_variable ASSIGN expression TO expression DO error END_FOR |
|
8709 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8710 |
print_err_msg(current_filename, locf(@8), locl(@8), "invalid statement(s) defined after 'DO' in ST 'FOR' statement."); |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8711 |
yyerrok; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8712 |
} |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8713 |
| FOR error END_FOR |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8714 |
{$$ = NULL; |
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8715 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in ST 'FOR' statement."); |
131 | 8716 |
yyerrok; |
8717 |
} |
|
8718 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8719 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8720 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8721 |
/* The spec has the syntax |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8722 |
* control_variable: identifier; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8723 |
* but then defines the semantics of control_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8724 |
* (Section 3.3.2.4) as being of an integer type |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8725 |
* (e.g., SINT, INT, or DINT). |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8726 |
* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8727 |
* Obviously this presuposes that the control_variable |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8728 |
* must have been declared in some VAR .. END_VAR |
79 | 8729 |
* We must therefore change the syntax to read |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8730 |
* control_variable: prev_declared_variable_name; |
13 | 8731 |
* |
79 | 8732 |
* If we don't, then the correct use of any previosuly declared |
8733 |
* variable would result in an incorrect syntax error |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8734 |
*/ |
79 | 8735 |
control_variable: prev_declared_variable_name {$$ = $1;}; |
8736 |
// control_variable: identifier {$$ = $1;}; |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8737 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8738 |
/* Integrated directly into for_statement */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8739 |
/* |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8740 |
for_list: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8741 |
expression TO expression [BY expression] |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8742 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8743 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8744 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8745 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8746 |
while_statement: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8747 |
WHILE expression DO statement_list END_WHILE |
68 | 8748 |
{$$ = new while_statement_c($2, $4, locloc(@$));} |
131 | 8749 |
/* ERROR_CHECK_BEGIN */ |
8750 |
| WHILE DO statement_list END_WHILE |
|
8751 |
{$$ = NULL; |
|
8752 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8753 |
print_err_msg(current_filename, locl(@1), locf(@2), "no test expression defined in ST 'WHILE' statement."); |
131 | 8754 |
} |
8755 |
| WHILE error DO statement_list END_WHILE |
|
8756 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8757 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid test expression defined for ST 'WHILE' statement."); |
131 | 8758 |
yyerrok; |
8759 |
} |
|
8760 |
| WHILE expression error statement_list END_WHILE |
|
8761 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8762 |
print_err_msg(current_filename, locf(@3), locl(@3), "expecting 'DO' after test expression in ST 'WHILE' statement."); |
131 | 8763 |
yyerrok; |
8764 |
} |
|
8765 |
| WHILE expression DO END_WHILE |
|
8766 |
{$$ = NULL; |
|
8767 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8768 |
print_err_msg(current_filename, locl(@3), locf(@4), "no statement(s) defined after 'DO' in ST 'WHILE' statement."); |
131 | 8769 |
} |
8770 |
| WHILE expression DO error END_WHILE |
|
8771 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8772 |
print_err_msg(current_filename, locf(@4), locl(@4), "invalid statement(s) defined after 'DO' in ST 'WHILE' statement."); |
131 | 8773 |
yyerrok; |
8774 |
} |
|
8775 |
| WHILE error END_WHILE |
|
8776 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8777 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in ST 'WHILE' statement."); |
131 | 8778 |
yyerrok; |
8779 |
} |
|
8780 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8781 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8782 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8783 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8784 |
repeat_statement: |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8785 |
REPEAT statement_list UNTIL expression END_REPEAT |
68 | 8786 |
{$$ = new repeat_statement_c($2, $4, locloc(@$));} |
131 | 8787 |
/* ERROR_CHECK_BEGIN */ |
8788 |
| REPEAT UNTIL expression END_REPEAT |
|
8789 |
{$$ = NULL; |
|
8790 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8791 |
print_err_msg(current_filename, locl(@1), locf(@2), "no statement(s) defined after 'REPEAT' in ST 'REPEAT' statement."); |
131 | 8792 |
} |
8793 |
| REPEAT error UNTIL expression END_REPEAT |
|
8794 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8795 |
print_err_msg(current_filename, locf(@2), locl(@2), "invalid statement(s) defined after 'REPEAT' for ST 'REPEAT' statement."); |
131 | 8796 |
yyerrok; |
8797 |
} |
|
8798 |
| REPEAT statement_list UNTIL END_REPEAT |
|
8799 |
{$$ = NULL; |
|
8800 |
yynerrs++; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8801 |
print_err_msg(current_filename, locl(@3), locf(@4), "no test expression defined after 'UNTIL' in ST 'REPEAT' statement."); |
131 | 8802 |
} |
8803 |
| REPEAT statement_list UNTIL error END_REPEAT |
|
8804 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8805 |
print_err_msg(current_filename, locf(@4), locl(@4), "invalid test expression defined after 'UNTIL' in ST 'REPEAT' statement."); |
131 | 8806 |
yyerrok; |
8807 |
} |
|
8808 |
| REPEAT error END_REPEAT |
|
8809 |
{$$ = NULL; |
|
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
8810 |
print_err_msg(current_filename, locf(@2), locl(@2), "unknown error in ST 'REPEAT' statement."); |
131 | 8811 |
yyerrok; |
8812 |
} |
|
8813 |
/* ERROR_CHECK_END */ |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8814 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8815 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8816 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8817 |
exit_statement: |
68 | 8818 |
EXIT {$$ = new exit_statement_c(locloc(@$));} |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8819 |
; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8820 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8821 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8822 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8823 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8824 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8825 |
%% |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8826 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8827 |
#include <stdio.h> /* required for printf() */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8828 |
#include <errno.h> |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8829 |
#include "../util/symtable.hh" |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8830 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8831 |
/* variables defined in code generated by flex... */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8832 |
extern FILE *yyin; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8833 |
extern int yylineno; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8834 |
|
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
8835 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
8836 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
8837 |
/* A global flag used to tell the parser if overloaded funtions should be allowed. |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
8838 |
* The IEC 61131-3 standard allows overloaded funtions in the standard library, |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
8839 |
* but disallows them in user code... |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
8840 |
*/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
8841 |
bool allow_function_overloading = false; |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
8842 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
8843 |
/* A pointer to the root of the parsing tree that will be generated |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
8844 |
* by bison. |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
8845 |
*/ |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
8846 |
symbol_c *tree_root; |
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
8847 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
8848 |
|
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
8849 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8850 |
/* The following function is called automatically by bison whenever it comes across |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8851 |
* an error. Unfortunately it calls this function before executing the code that handles |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8852 |
* the error itself, so we cannot print out the correct line numbers of the error location |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8853 |
* over here. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8854 |
* Our solution is to store the current error message in a global variable, and have all |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8855 |
* error action handlers call the function print_err_msg() after setting the location |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8856 |
* (line number) variable correctly. |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8857 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8858 |
const char *current_error_msg; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8859 |
void yyerror (const char *error_msg) { |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8860 |
current_error_msg = error_msg; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8861 |
/* fprintf(stderr, "error %d: %s\n", yynerrs // global variable //, error_msg); */ |
68 | 8862 |
/* print_include_stack(); */ |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8863 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8864 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8865 |
|
95 | 8866 |
void print_err_msg(const char *filename, |
8867 |
int first_line, |
|
8868 |
int first_column, |
|
8869 |
int last_line, |
|
8870 |
int last_column, |
|
8871 |
const char *additional_error_msg) { |
|
131 | 8872 |
fprintf(stderr, "%s:%d: error : %s\n", filename, first_line, additional_error_msg); |
8873 |
//fprintf(stderr, "error %d: %s\n", yynerrs /* a global variable */, additional_error_msg); |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8874 |
print_include_stack(); |
131 | 8875 |
//fprintf(stderr, "%s(%d-%d): %s\n", filename, first_line, last_line, current_error_msg); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8876 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8877 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8878 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8879 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8880 |
/* convert between an il_operator to a function name */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8881 |
/* This a kludge! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8882 |
* It is required because our language requires more than one |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8883 |
* look ahead token, and bison only works with one! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8884 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8885 |
#define op_2_str(op, str) {\ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8886 |
op ## _operator_c *ptr = dynamic_cast<op ## _operator_c *>(il_operator); \ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8887 |
if (ptr != NULL) name = str; \ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8888 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8889 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8890 |
/* NOTE: this code is very ugly and un-eficient, but I (Mario) have many |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8891 |
* more things to worry about right now, so just let it be... |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8892 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8893 |
symbol_c *il_operator_c_2_identifier_c(symbol_c *il_operator) { |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8894 |
const char *name = NULL; |
68 | 8895 |
identifier_c *res; |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8896 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8897 |
op_2_str(NOT, "NOT"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8898 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8899 |
op_2_str(AND, "AND"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8900 |
op_2_str(OR, "OR"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8901 |
op_2_str(XOR, "XOR"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8902 |
op_2_str(ADD, "ADD"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8903 |
op_2_str(SUB, "SUB"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8904 |
op_2_str(MUL, "MUL"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8905 |
op_2_str(DIV, "DIV"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8906 |
op_2_str(MOD, "MOD"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8907 |
op_2_str(GT, "GT"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8908 |
op_2_str(GE, "GE"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8909 |
op_2_str(EQ, "EQ"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8910 |
op_2_str(LT, "LT"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8911 |
op_2_str(LE, "LE"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8912 |
op_2_str(NE, "NE"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8913 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8914 |
op_2_str(LD, "LD"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8915 |
op_2_str(LDN, "LDN"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8916 |
op_2_str(ST, "ST"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8917 |
op_2_str(STN, "STN"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8918 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8919 |
op_2_str(S, "S"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8920 |
op_2_str(R, "R"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8921 |
op_2_str(S1, "S1"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8922 |
op_2_str(R1, "R1"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8923 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8924 |
op_2_str(CLK, "CLK"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8925 |
op_2_str(CU, "CU"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8926 |
op_2_str(CD, "CD"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8927 |
op_2_str(PV, "PV"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8928 |
op_2_str(IN, "IN"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8929 |
op_2_str(PT, "PT"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8930 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8931 |
op_2_str(ANDN, "ANDN"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8932 |
op_2_str(ORN, "ORN"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8933 |
op_2_str(XORN, "XORN"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8934 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8935 |
op_2_str(ADD, "ADD"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8936 |
op_2_str(SUB, "SUB"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8937 |
op_2_str(MUL, "MUL"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8938 |
op_2_str(DIV, "DIV"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8939 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8940 |
op_2_str(GT, "GT"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8941 |
op_2_str(GE, "GE"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8942 |
op_2_str(EQ, "EQ"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8943 |
op_2_str(LT, "LT"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8944 |
op_2_str(LE, "LE"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8945 |
op_2_str(NE, "NE"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8946 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8947 |
op_2_str(CAL, "CAL"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8948 |
op_2_str(CALC, "CALC"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8949 |
op_2_str(CALCN, "CALCN"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8950 |
op_2_str(RET, "RET"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8951 |
op_2_str(RETC, "RETC"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8952 |
op_2_str(RETCN, "RETCN"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8953 |
op_2_str(JMP, "JMP"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8954 |
op_2_str(JMPC, "JMPC"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8955 |
op_2_str(JMPCN, "JMPCN"); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8956 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8957 |
if (name == NULL) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8958 |
ERROR; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8959 |
|
68 | 8960 |
res = new identifier_c(strdup(name), |
8961 |
il_operator->first_line, |
|
8962 |
il_operator->first_column, |
|
8963 |
il_operator->last_line, |
|
8964 |
il_operator->last_column |
|
8965 |
); |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8966 |
free(il_operator); |
68 | 8967 |
return res; |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8968 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8969 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8970 |
|
40
873a5b60a7ea
Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
28
diff
changeset
|
8971 |
#include "standard_function_names.c" |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8972 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8973 |
const char *standard_function_block_names[] = { |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8974 |
// 2.5.2.3.1 Bistable elements |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8975 |
// Table 34 - Standard bistable function blocks |
73 | 8976 |
"SR","RS", |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8977 |
// 2.5.2.3.2 Edge detection |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8978 |
// Table 35 - Standard edge detection function blocks |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8979 |
"R_TRIG","F_TRIG", |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8980 |
// 2.5.2.3.3 Counters |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8981 |
// Table 36 - Standard counter function blocks |
68 | 8982 |
"CTU","CTU_DINT","CTU_LINT","CTU_UDINT","CTU_ULINT", |
8983 |
"CTD","CTD_DINT","CTD_LINT","CTD_UDINT","CTD_ULINT", |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8984 |
"CTUD","CTUD_DINT","CTUD_LINT","CTUD_ULINT", |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8985 |
// 2.5.2.3.4 Timers |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8986 |
// Table 37 - Standard timer function blocks |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8987 |
"TP","TON","TOF", |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8988 |
/* end of array marker! Do not remove! */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8989 |
NULL |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8990 |
}; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8991 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8992 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8993 |
#define LIBFILE "ieclib.txt" |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8994 |
#define DEF_LIBFILENAME LIBDIRECTORY "/" LIBFILE |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8995 |
|
40
873a5b60a7ea
Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
28
diff
changeset
|
8996 |
extern const char *INCLUDE_DIRECTORIES[]; |
873a5b60a7ea
Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
28
diff
changeset
|
8997 |
|
15
0b472e25eb16
Adding changes to make the compiler compatible with bison ver 2.3
mario
parents:
13
diff
changeset
|
8998 |
int stage1_2__(const char *filename, const char *includedir, symbol_c **tree_root_ref) { |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
8999 |
FILE *in_file = NULL, *lib_file = NULL; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9000 |
char *libfilename = NULL; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9001 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9002 |
if((in_file = fopen(filename, "r")) == NULL) { |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9003 |
char *errmsg = strdup2("Error opening main file ", filename); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9004 |
perror(errmsg); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9005 |
free(errmsg); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9006 |
return -1; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9007 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9008 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9009 |
if (includedir != NULL) { |
40
873a5b60a7ea
Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
28
diff
changeset
|
9010 |
INCLUDE_DIRECTORIES[0] = includedir; |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9011 |
} |
40
873a5b60a7ea
Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
28
diff
changeset
|
9012 |
if ((libfilename = strdup3(INCLUDE_DIRECTORIES[0], "/", LIBFILE)) == NULL) { |
873a5b60a7ea
Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
28
diff
changeset
|
9013 |
fprintf (stderr, "Out of memory. Bailing out!\n"); |
873a5b60a7ea
Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
28
diff
changeset
|
9014 |
return -1; |
873a5b60a7ea
Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
28
diff
changeset
|
9015 |
} |
873a5b60a7ea
Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
28
diff
changeset
|
9016 |
|
873a5b60a7ea
Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
28
diff
changeset
|
9017 |
if((lib_file = fopen(libfilename, "r")) == NULL) { |
873a5b60a7ea
Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
28
diff
changeset
|
9018 |
char *errmsg = strdup2("Error opening library file ", libfilename); |
873a5b60a7ea
Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
28
diff
changeset
|
9019 |
perror(errmsg); |
873a5b60a7ea
Fixed -I library include path behavior + removed old lib implementation + added generated lib func names to stage 1_2 + added Makefile.Linux
etisserant
parents:
28
diff
changeset
|
9020 |
free(errmsg); |
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9021 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9022 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9023 |
if (lib_file == NULL) { |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9024 |
/* we give up... */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9025 |
free(libfilename); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9026 |
fclose(in_file); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9027 |
return -1; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9028 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9029 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9030 |
/* first parse the standard library file... */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9031 |
yyin = lib_file; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9032 |
yylineno = 1; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9033 |
allow_function_overloading = true; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9034 |
current_filename = libfilename; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9035 |
if (yyparse() != 0) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9036 |
ERROR; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9037 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9038 |
if (yynerrs > 0) { |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9039 |
fprintf (stderr, "\nFound %d error(s) in %s. Bailing out!\n", yynerrs /* global variable */, libfilename); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9040 |
ERROR; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9041 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9042 |
free(libfilename); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9043 |
fclose(lib_file); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9044 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9045 |
/* if by any chance the library is not complete, we |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9046 |
* now add the missing reserved keywords to the list!!! |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9047 |
*/ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9048 |
for(int i = 0; standard_function_names[i] != NULL; i++) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9049 |
if (library_element_symtable.find_value(standard_function_names[i]) == |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9050 |
library_element_symtable.end_value()) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9051 |
library_element_symtable.insert(standard_function_names[i], standard_function_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9052 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9053 |
for(int i = 0; standard_function_block_names[i] != NULL; i++) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9054 |
if (library_element_symtable.find_value(standard_function_block_names[i]) == |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9055 |
library_element_symtable.end_value()) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9056 |
library_element_symtable.insert(standard_function_block_names[i], standard_function_block_name_token); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9057 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9058 |
#if YYDEBUG |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9059 |
yydebug = 1; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9060 |
#endif |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9061 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9062 |
/* now parse the input file... */ |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9063 |
yyin = in_file; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9064 |
yylineno = 1; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9065 |
allow_function_overloading = false; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9066 |
current_filename = filename; |
85 | 9067 |
{int res; |
9068 |
if ((res = yyparse()) != 0) { |
|
9069 |
fprintf (stderr, "\nInternal error while parsing file - yyparse() returned %d. Bailing out!\n", res); |
|
9070 |
ERROR; |
|
9071 |
} |
|
9072 |
} |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9073 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9074 |
if (yynerrs > 0) { |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9075 |
fprintf (stderr, "\nFound %d error(s). Bailing out!\n", yynerrs /* global variable */); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9076 |
exit(EXIT_FAILURE); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9077 |
} |
134
0e43c556cd2d
Fixed some uncatched errors and error bounds in error messages
lbessard
parents:
133
diff
changeset
|
9078 |
|
0
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9079 |
if (tree_root_ref != NULL) |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9080 |
*tree_root_ref = tree_root; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9081 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9082 |
fclose(in_file); |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9083 |
return 0; |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9084 |
} |
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9085 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9086 |
|
fb772792efd1
Initial commit. Last MatPLC CVS with some makefile inclusion removed in order to compile fine out of MatPLC.
etisserant
parents:
diff
changeset
|
9087 |