scannerwrapper.cpp

Go to the documentation of this file.
00001 
00002 #include "scannerwrapper.h"
00003 #include "parserbase.h"
00004 #include "scanner.h"
00005 #include "parser.h"
00006 
00007 
00008 class ScannerPrivateData {
00009    public:
00010       yyscan_t scanner;
00011 };
00012 
00013 Scanner::Scanner()
00014 {
00015    data = new ScannerPrivateData();
00016    yylex_init( &data->scanner );
00017    yyset_out( NULL, data->scanner );
00018 }
00019 
00020 int Scanner::yylex()
00021 {
00022    return ::yylex( data->scanner);
00023 }
00024 Scanner::~Scanner()
00025 {
00026    yylex_destroy( data->scanner );
00027    delete data;
00028 }

Generated on Mon May 21 01:26:37 2012 for Advanced Strategic Command by  doxygen 1.5.1