# HG changeset patch
# User Manuele Conti <conti.ma@alice.it>
# Date 1317074836 -7200
# Node ID 5c115720149cee6c1adaab5680d8a5c10dd9fd9f
# Parent  b6a522b762c9b5d9d99e90cd9035249cadc4eaf7
Fix YYLTYPE declaration.

diff -r b6a522b762c9 -r 5c115720149c stage1_2/iec_bison.yy
--- a/stage1_2/iec_bison.yy	Sun Nov 20 19:36:48 2011 +0000
+++ b/stage1_2/iec_bison.yy	Tue Sep 27 00:07:16 2011 +0200
@@ -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
+
 }
 
 
diff -r b6a522b762c9 -r 5c115720149c stage1_2/iec_flex.ll
--- a/stage1_2/iec_flex.ll	Sun Nov 20 19:36:48 2011 +0000
+++ b/stage1_2/iec_flex.ll	Tue Sep 27 00:07:16 2011 +0200
@@ -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...