-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfactory.h
More file actions
33 lines (26 loc) · 735 Bytes
/
factory.h
File metadata and controls
33 lines (26 loc) · 735 Bytes
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
// $Id: factory.h,v 1.1 2016/02/19 19:29:48 david Exp $ -*- c++ -*-
#ifndef __ZU_FACTORY_H__
#define __ZU_FACTORY_H__
#include <memory>
#include <cdk/yy_factory.h>
#include "zu_scanner.h"
namespace zu {
/**
* This class implements the compiler factory for the Zu compiler.
*/
class factory: public cdk::yy_factory<zu_scanner> {
/**
* This object is automatically registered by the constructor in the
* superclass' language registry.
*/
static factory _self;
protected:
/**
* @param language name of the language handled by this factory (see .cpp file)
*/
factory(const std::string &language = "zu") :
cdk::yy_factory<zu_scanner>(language) {
}
};
} // zu
#endif