help-flex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help! Flex++ option yyclass?


From: cylin
Subject: Help! Flex++ option yyclass?
Date: Wed, 28 Jan 2004 16:58:58 +0800

Dear all,

To compile with g++, I got
" no int MyLexer::yylex() member function declared in class MyLexer".
What  should I  write in MyLexer::yylex()?

In my lex file, I use
%option c++
%option yyclass="MyLexer"

Here is MyLexer.h
#ifndef _MyLexer_h_
#define _MyLexer_h_

#include <fstream.h>
#include <FlexLexer.h>

class MyLexer: public yyFlexLexer {
public:
  MyLexer(istream* poStream):yyFlexLexer(poStream) {}
  ~MyLexer() {}
public:
  int A;
  char* B;
};
#endif

Please help, thx.
Regards,
cylin.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]