source: icGREP/icgrep-devel/icgrep/cc_codegenobject.h @ 4129

Last change on this file since 4129 was 3984, checked in by cameron, 5 years ago

Eliminate INT2STRING in favor of std::to_string

File size: 1.3 KB
Line 
1/*
2 *  Copyright (c) 2014 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6
7#ifndef CC_CODEGENOBJECT_H
8#define CC_CODEGENOBJECT_H
9
10//Pablo Expressions
11#include "pe_pabloe.h"
12#include "pe_sel.h"
13#include "pe_advance.h"
14#include "pe_all.h"
15#include "pe_and.h"
16#include "pe_charclass.h"
17#include "pe_matchstar.h"
18#include "pe_not.h"
19#include "pe_or.h"
20#include "pe_var.h"
21#include "pe_xor.h"
22
23//Pablo Statements
24#include "ps_pablos.h"
25#include "ps_assign.h"
26#include "ps_if.h"
27#include "ps_while.h"
28
29#include <iostream>
30#include <sstream>
31#include <string>
32#include <list>
33#include <map>
34
35
36struct Expression{
37    std::string expr_string;
38    PabloE* pablo_expr;
39};
40
41class CC_CodeGenObject
42{
43public:
44    CC_CodeGenObject(std::string gensym_pattern);
45    void add_predefined(std::string key_value, Expression *mapped_value);
46    Expression* add_assignment(std::string value, Expression* expr);
47    Expression* expr_to_variable(Expression* cgo);
48    std::list<PabloS*> get_stmtsl();
49private:
50    std::string mGenSym_Template;
51    int mGenSymCounter;
52    std::list<PabloS*> mStmtsl;
53    std::map<std::string, Expression*> mCommon_Expression_Map;
54};
55
56#endif // CC_CODEGENOBJECT_H
Note: See TracBrowser for help on using the repository browser.