parser.h

Go to the documentation of this file.
00001 // Generated by Bisonc++ V2.4.2 on Sat Jul 19 21:56:21 2008 +0100
00002 
00003 #ifndef Parser_h_included
00004 #define Parser_h_included
00005 
00006 // $insert baseclass
00007 #include "parserbase.h"
00008 // $insert scanner.h
00009 #include "scannerwrapper.h"
00010 
00011 
00012 #undef Parser
00013 class Parser: public ParserBase
00014 {
00015     // $insert scannerobject
00016     Scanner d_scanner;
00017         
00018     public:
00019         int parse();
00020 
00021     private:
00022         void error(char const *msg);    // called on (syntax) errors
00023         int lex();                      // returns the next token from the
00024                                         // lexical scanner. 
00025         void print();                   // use, e.g., d_token, d_loc
00026 
00027     // support functions for parse():
00028         void executeAction(int ruleNr);
00029         void errorRecovery();
00030         int lookup(bool recovery);
00031         void nextToken();
00032 };
00033 
00034 inline void Parser::error(char const *msg)
00035 {
00036     std::cerr << msg << std::endl;
00037 }
00038 
00039 // $insert lex
00040 inline int Parser::lex()
00041 {
00042     return d_scanner.yylex();
00043 }
00044 
00045 inline void Parser::print()      // use d_token, d_loc
00046 {}
00047 
00048 
00049 #endif

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