www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/09/10/04:01:16

Message-ID: <009401c139cf$57c61f60$a9fe3c3f@spunky>
From: "James Buchanan" <gnudev AT ozemail DOT com DOT au>
To: <djgpp AT delorie DOT com>
Subject: Flexx C++ scanners
Date: Mon, 10 Sep 2001 18:05:18 +1000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Reply-To: djgpp AT delorie DOT com

Hi,

I'm trying to build a scanner using C++. I haven't used the FlexLexer class,
just ordinary C code and calling the yylex() function in my main() function,
but I'm using C++ in my action sections.

I make the scanner with this command:

flexx scanner.lex

and I try to compile with this command:

gxx -o scanner.exe lexyy.cc -lfl

but I get an error from the compiler saying that "yyin" is undefined.

I read the docs for Flex and the DJGPP FAQ but they flex docs at least say
that yyin is still a pointer to a FILE structure, so I'm wondering why in
C++ scanners yyin is undefined?

I've never had any problems with my C scanners. Also, while I'm here, bison
will handle C++ action code OK won't it?

Thanks guys,

James


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019