Merging with Laurent's repository.
--- a/stage1_2/iec_bison.yy Wed Jan 25 01:16:30 2012 +0100
+++ b/stage1_2/iec_bison.yy Wed Feb 01 13:01:08 2012 +0000
@@ -250,17 +250,9 @@
* declared twice.
* We therefore use the #if !defined YYLTYPE ...
* to make sure only the first declaration is parsed by the C++ compiler.
- *
- * At first glance it seems that what we really should do is delcare the
- * YYLTYPE directly as an anonymous struct, thus:
- * #define YYLTYPE struct{ ...}
- * however, this also results in compilation errors.
- *
- * I (Mario) think this is kind of a hack. If you know how to
- * do this re-declaration of YYLTYPE properly, please let me know!
*/
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
- typedef struct {
+typedef struct YYLTYPE {
int first_line;
int first_column;
const char *first_file;
@@ -269,9 +261,11 @@
int last_column;
const char *last_file;
long int last_order;
- } yyltype__local;
- #define YYLTYPE yyltype__local
+} YYLTYPE;
+#define YYLTYPE_IS_DECLARED 1
+#define YYLTYPE_IS_TRIVIAL 1
#endif
+
}
--- a/stage1_2/iec_flex.ll Wed Jan 25 01:16:30 2012 +0100
+++ b/stage1_2/iec_flex.ll Wed Feb 01 13:01:08 2012 +0000
@@ -171,8 +171,9 @@
* track of the locations, in order to give
* more meaningful error messages!
*/
-extern YYLTYPE yylloc;
-
+/*
+ *extern YYLTYPE yylloc;
+b*/
#define YY_INPUT(buf,result,max_size) {\
result = GetNextChar(buf, max_size);\
if ( result <= 0 )\
@@ -208,7 +209,6 @@
current_order++; \
}
-
/* Since this lexical parser we defined only works in ASCII based
* systems, we might as well make sure it is being compiled on
* one...
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/stage3/TODO Wed Feb 01 13:01:08 2012 +0000
@@ -0,0 +1,13 @@
+
+
+ Things that we must still check for in stage 3:
+
+
+1) Handling of CONSTANTs:
+
+ 1.a) "Any program organization unit attempts to modify the value of a variable that has been declared with the CONSTANT qualifier;"
+ 1.b) From table 16.a "The CONSTANT qualifier shall not be used in the declaration of function block instances as described in 2.5.2.1."
+
+
+
+