-
Notifications
You must be signed in to change notification settings - Fork 0
/
CompilerFactory.h
executable file
·54 lines (44 loc) · 1.28 KB
/
CompilerFactory.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef __AT_ATCOMPILERFACTORY_H__
#define __AT_ATCOMPILERFACTORY_H__
#include <cdk/CompilerFactory.h>
class FlexLexer;
namespace cdk {
class Compiler;
}
namespace at {
/**
* This class implements the compiler factory for the At compiler.
*/
class CompilerFactory: public cdk::CompilerFactory {
/**
* This object is automatically registered by the constructor in the
* superclass' language registry.
*/
static CompilerFactory _thisFactory;
protected:
/**
* @param language name of the language handled by this factory (see .cpp file)
*/
CompilerFactory (const char *language) :
cdk::CompilerFactory(language) {
}
protected:
/**
* Create a scanner object for the At language.
* This method is now private and is called only from the compiler creation
* method.
* @param name name of the input file (for debug only)
* @return scanner object pointer
* @see createCompiler
*/
virtual cdk::syntax::Parser *createParser(const char *name);
public:
/**
* Create a compiler object for a given language.
* @param name name of the language handled by the compiler
* @return compiler object pointer
*/
virtual cdk::Compiler *createCompiler(const char *name);
}; // class CompilerFactory
} // namespace at
#endif