~ubuntu-branches/ubuntu/trusty/c++-annotations/trusty

« back to all changes in this revision

Viewing changes to yo/concrete/bisonc++/scanner/scanner.h

  • Committer: Package Import Robot
  • Author(s): tony mancill, Frank B. Brokken, tony mancill
  • Date: 2012-02-28 00:50:21 UTC
  • mfrom: (1.1.19)
  • Revision ID: package-import@ubuntu.com-20120228005021-sz7nnodntkvgh7qf
Tags: 9.2.1-1
[ Frank B. Brokken ]
* New upstream release (using flexc++, reauthored polymorphic semantic
  values and unrestricted unions). Upstream release 9.2.0 is implied by
  this release.

[ tony mancill ]
* Set Standards-Version to 3.9.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef SCANNER_H_
2
 
#define SCANNER_H_
3
 
 
4
 
#if ! defined(SKIP_FLEXLEXER_)
5
 
#include <FlexLexer.h>
6
 
#endif
7
 
 
8
 
class Scanner: public yyFlexLexer
 
1
// Generated by Flexc++ V0.94.00 on Fri, 24 Feb 2012 10:34:13 +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
9
12
{
10
13
    public:
11
 
        int yylex();
 
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
12
27
};
13
28
 
14
 
#endif
 
29
// $insert scannerConstructors
 
30
inline Scanner::Scanner(std::istream &in, std::ostream &out)
 
31
:
 
32
    ScannerBase(in, out)
 
33
{}
 
34
 
 
35
 
 
36
inline void Scanner::preCode()
 
37
{
 
38
    // optionally replace by your own code
 
39
}
 
40
 
 
41
inline void Scanner::print()
 
42
{
 
43
    print__();
 
44
}
 
45
 
 
46
 
 
47
#endif // Scanner_H_INCLUDED_