| 1 |
// Generated by Flexc++ V0.95.00 on Tue, 06 Mar 2012 22:37:41 +0100 |
| 2 |
|
| 3 |
#ifndef Scanner_H_INCLUDED_ |
| 4 |
#define Scanner_H_INCLUDED_ |
| 5 |
|
| 6 |
// $insert baseclass_h |
| 7 |
#include "scannerbase.h" |
| 8 |
|
| 9 |
|
| 10 |
// $insert classHead |
| 11 |
class Scanner: public ScannerBase |
| 12 |
{ |
| 13 |
public: |
| 14 |
explicit Scanner(std::istream &in = std::cin, |
| 15 |
std::ostream &out = std::cout); |
| 16 |
|
| 17 |
// $insert lexFunctionDecl |
| 18 |
int lex(); |
| 19 |
|
| 20 |
private: |
| 21 |
int lex_(); |
| 22 |
int executeAction_(size_t ruleNr); |
| 23 |
|
| 24 |
void print(); |
| 25 |
void preCode(); // re-implement this function for code that must |
| 26 |
// be exec'ed before the patternmatching starts |
| 27 |
void postCode(PostEnum_); |
| 28 |
}; |
| 29 |
|
| 30 |
// $insert scannerConstructors |
| 31 |
inline Scanner::Scanner(std::istream &in, std::ostream &out) |
| 32 |
: |
| 33 |
ScannerBase(in, out) |
| 34 |
{} |
| 35 |
|
| 36 |
|
| 37 |
inline void Scanner::preCode() |
| 38 |
{ |
| 39 |
// optionally replace by your own code |
| 40 |
} |
| 41 |
|
| 42 |
inline void Scanner::postCode(PostEnum_) |
| 43 |
{} |
| 44 |
|
| 45 |
inline void Scanner::print() |
| 46 |
{ |
| 47 |
print_(); |
| 48 |
} |
| 49 |
|
| 50 |
|
| 51 |
#endif // Scanner_H_INCLUDED_ |
| 52 |
|