Debian Codegraph @

yo/concrete/poly2/scanner/scanner.h

raw
1 // Generated by Flexc++ V0.94.00 on Fri, 24 Feb 2012 15:08:50 +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 Scanner(std::string const &infile, std::string const &outfile);
18
19 // $insert lexFunctionDecl
20 int lex();
21
22 private:
23 int lex__();
24 int executeAction__(size_t ruleNr);
25
26 void print();
27 void preCode(); // re-implement this function for code that must
28 // be exec'ed before the patternmatching starts
29 };
30
31 // $insert scannerConstructors
32 inline Scanner::Scanner(std::istream &in, std::ostream &out)
33 :
34 ScannerBase(in, out)
35 {}
36
37 inline Scanner::Scanner(std::string const &infile, std::string const &outfile)
38 :
39 ScannerBase(infile, outfile)
40 {}
41
42 // $insert inlineLexFunction
43 inline int Scanner::lex()
44 {
45 return lex__();
46 }
47
48 inline void Scanner::preCode()
49 {
50 // optionally replace by your own code
51 }
52
53 inline void Scanner::print()
54 {
55 print__();
56 }
57
58
59 #endif // Scanner_H_INCLUDED_