[bitc-dev] Build Problem with DoxyLexer.l

James Graves ansible at xnet.com
Mon Feb 20 20:13:07 EST 2006


On Mon, Feb 20, 2006 at 06:43:53PM -0500, Jonathan S. Shapiro wrote:

> Arrghh.
> 
> Looks like we will abandon flex sooner than planned. Oh well. It was
> coming anyway. Fortunately the language is now stable enough that doing
> so is no longer completely insane. I was simply hoping not to do it
> twice.
>
> James: I'm actually thinking here that we need to look forward rather
> than backward, and since there isn't commonality of function across the
> releases at the moment it may make sense to stick a stable version of
> flex into the Coyotos cross tools. Opinion?

Well, I just tried old-flex.  Annoyingly, it has a package conflict with
regular flex, so it un-unstalled the modern one.  I'm definitely going
to install my own copy of flex 2.5.4a as a seperate executable, because
I don't want to use old-flex as the system default.

Maybe just make flex 2.5.4a part of the cross environment, so as not to
conflict with a modern version of flex.  

Anyway, I now am getting breakage with AMlexer.l.  I did do a 'make clean'
first.  Here's that error:

make[1]: Entering directory `/home/jgraves/coyotos/src.coyotos/src/ccs/astmaker'
if [ ! -d BUILD ]; then \
        mkdir -p BUILD; \
fi
(cd BUILD; bison -t -p am -v -d -o AMparser.cxx -y ../AMparser.y)
flex -d -oBUILD/AMlexer.cxx AMlexer.l
g++ -fdefault-inline -g   -I. -I..  -Wall -Winline -Werror -Wno-format -c BUILD/AMlexer.cxx -o BUILD/AMlexer.o
BUILD/AMlexer.cxx: In member function `int AMlexer::lex(ParseType*)':
BUILD/AMlexer.cxx:660: error: `cin' undeclared (first use this function)
BUILD/AMlexer.cxx:660: error: (Each undeclared identifier is reported only once
   for each function it appears in.)
BUILD/AMlexer.cxx:663: error: `cout' undeclared (first use this function)
BUILD/AMlexer.cxx:729: error: `cerr' undeclared (first use this function)
make[1]: *** [BUILD/AMlexer.o] Error 1
make[1]: Leaving directory `/home/jgraves/coyotos/src.coyotos/src/ccs/astmaker'
*** RECURSIVE BUILD STOPS ***
make: *** [recurse] Error 1

I had to stick in a 'using namespace std;' in all flex files.  Patch
attached.

At any rate, that was the last problem.  I've got a bitcc executable
now.  We'll see what happens next.

James Graves
-------------- next part --------------
diff -ur --exclude='*cxx' src.coyotos-orig/src/ccs/astmaker/AMlexer.l src.coyotos/src/ccs/astmaker/AMlexer.l
--- src.coyotos-orig/src/ccs/astmaker/AMlexer.l	2006-01-16 18:15:04.000000000 -0600
+++ src.coyotos/src/ccs/astmaker/AMlexer.l	2006-02-20 18:40:58.000000000 -0600
@@ -26,9 +26,10 @@
 #include <stdbool.h>
 #include <assert.h>
 #include <dirent.h>
- 
+
 #include <string>
 #include <sstream>
+#include <iostream>
 
 #include "AMlexer.hxx"
 
@@ -68,6 +69,7 @@
 
 #define YY_MAIN 0
 
+using namespace std;
 using namespace sherpa;
 %}
 
diff -ur --exclude='*cxx' src.coyotos-orig/src/ccs/bitcc-bootstrap/frontend/BitcLexer.l src.coyotos/src/ccs/bitcc-bootstrap/frontend/BitcLexer.l
--- src.coyotos-orig/src/ccs/bitcc-bootstrap/frontend/BitcLexer.l	2006-02-19 22:47:53.000000000 -0600
+++ src.coyotos/src/ccs/bitcc-bootstrap/frontend/BitcLexer.l	2006-02-20 18:42:51.000000000 -0600
@@ -70,6 +70,7 @@
 
 #define YY_MAIN 0
 
+using namespace std;
 using namespace sherpa;
 static int kwCheck(const char *s);
 
diff -ur --exclude='*cxx' src.coyotos-orig/src/ccs/capidl/DoxyLexer.l src.coyotos/src/ccs/capidl/DoxyLexer.l
--- src.coyotos-orig/src/ccs/capidl/DoxyLexer.l	2005-04-15 17:19:59.000000000 -0500
+++ src.coyotos/src/ccs/capidl/DoxyLexer.l	2006-02-20 18:45:51.000000000 -0600
@@ -43,6 +43,7 @@
    it so that the namespace is in scope for the USING declaration. */
 namespace sherpa {};
 using namespace sherpa;
+using namespace std;
 
 #include "DoxyLexer.hxx"
 #include "doxydoc.hxx"
diff -ur --exclude='*cxx' src.coyotos-orig/src/ccs/capidl/HtmlLexer.l src.coyotos/src/ccs/capidl/HtmlLexer.l
--- src.coyotos-orig/src/ccs/capidl/HtmlLexer.l	2005-04-11 22:14:12.000000000 -0500
+++ src.coyotos/src/ccs/capidl/HtmlLexer.l	2006-02-20 18:45:04.000000000 -0600
@@ -42,6 +42,7 @@
    it so that the namespace is in scope for the USING declaration. */
 namespace sherpa {};
 using namespace sherpa;
+using namespace std;
 
 #include "SymTab.hxx"
 
diff -ur --exclude='*cxx' src.coyotos-orig/src/ccs/capidl/IdlLexer.l src.coyotos/src/ccs/capidl/IdlLexer.l
--- src.coyotos-orig/src/ccs/capidl/IdlLexer.l	2006-01-16 18:15:04.000000000 -0600
+++ src.coyotos/src/ccs/capidl/IdlLexer.l	2006-02-20 18:43:53.000000000 -0600
@@ -37,6 +37,7 @@
    it so that the namespace is in scope for the USING declaration. */
 namespace sherpa {};
 using namespace sherpa;
+using namespace std;
 
 #include "SymTab.hxx"
 #include "IdlParseType.hxx"
diff -ur --exclude='*cxx' src.coyotos-orig/src/ccs/capidl/PrescanLexer.l src.coyotos/src/ccs/capidl/PrescanLexer.l
--- src.coyotos-orig/src/ccs/capidl/PrescanLexer.l	2006-01-16 18:15:04.000000000 -0600
+++ src.coyotos/src/ccs/capidl/PrescanLexer.l	2006-02-20 18:46:26.000000000 -0600
@@ -40,6 +40,7 @@
    it so that the namespace is in scope for the USING declaration. */
 namespace sherpa {};
 using namespace sherpa;
+using namespace std;
 
 #include "SymTab.hxx"
 


More information about the bitc-dev mailing list