source: icGREP/icgrep-0.8/icgrep/pbix_compiler.h @ 3972

Last change on this file since 3972 was 3850, checked in by cameron, 5 years ago

icgrep-0.8 distribution

File size: 1.6 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 COMPILER_H
8#define COMPILER_H
9
10//Regular Expressions
11#include "re_re.h"
12#include "re_cc.h"
13#include "re_start.h"
14#include "re_end.h"
15#include "re_seq.h"
16#include "re_alt.h"
17#include "re_rep.h"
18
19#include "rl_replimit.h"
20#include "rl_unbounded.h"
21#include "rl_upperbound.h"
22
23//Pablo Expressions
24#include "pe_pabloe.h"
25#include "pe_sel.h"
26#include "pe_advance.h"
27#include "pe_all.h"
28#include "pe_and.h"
29#include "pe_charclass.h"
30#include "pe_matchstar.h"
31#include "pe_not.h"
32#include "pe_or.h"
33#include "pe_var.h"
34#include "pe_xor.h"
35
36//Pablo Statements
37#include "ps_pablos.h"
38#include "ps_assign.h"
39#include "ps_if.h"
40#include "ps_while.h"
41
42//Code Generation
43#include "symbol_generator.h"
44
45#include <iostream>
46#include <string>
47#include <sstream>
48#include <list>
49#include <vector>
50
51//***********************************
52//TODO: Just for development
53//#include "printer_pablos.h"
54//***********************************
55
56struct CodeGenState{
57    std::list<PabloS*> stmtsl;
58    std::string newsym;
59};
60
61class Pbix_Compiler
62{
63public:
64    Pbix_Compiler();
65    CodeGenState compile(RE *re);
66private:
67    CodeGenState re2pablo_helper(RE *re, CodeGenState cg_state);
68    CodeGenState Seq_helper(std::list<RE*>* lst, std::list<RE*>::const_iterator it, CodeGenState cg_state);
69    CodeGenState Alt_helper(std::list<RE*>* lst, std::list<RE*>::const_iterator it, CodeGenState cg_state);
70
71    SymbolGenerator symgen;
72};
73
74#endif // COMPILER_H
Note: See TracBrowser for help on using the repository browser.