Initialize Tizen 2.3
[external/ragel.git] / ragel / rubyftable.h
1 /*
2  *  2007 Victor Hugo Borja <vic@rubyforge.org>
3  *  Copyright 2001-2007 Adrian Thurston <thurston@complang.org>
4  */
5
6 /*  This file is part of Ragel.
7  *
8  *  Ragel is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2 of the License, or
11  *  (at your option) any later version.
12  * 
13  *  Ragel is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  * 
18  *  You should have received a copy of the GNU General Public License
19  *  along with Ragel; if not, write to the Free Software
20  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
21  */
22
23 #ifndef _RUBY_FTABCODEGEN_H
24 #define _RUBY_FTABCODEGEN_H
25
26 #include "rubytable.h"
27
28 class RubyFTabCodeGen : public RubyTabCodeGen
29 {
30 public:
31         RubyFTabCodeGen( ostream &out ): RubyTabCodeGen(out) {}
32 protected:
33         std::ostream &TO_STATE_ACTION_SWITCH();
34         std::ostream &FROM_STATE_ACTION_SWITCH();
35         std::ostream &EOF_ACTION_SWITCH();
36         std::ostream &ACTION_SWITCH();
37
38         void GOTO( ostream &out, int gotoDest, bool inFinish );
39         void GOTO_EXPR( ostream &out, GenInlineItem *ilItem, bool inFinish );
40         void CALL( ostream &out, int callDest, int targState, bool inFinish );
41         void CALL_EXPR(ostream &out, GenInlineItem *ilItem, int targState, bool inFinish );
42         void RET( ostream &out, bool inFinish );
43         void BREAK( ostream &out, int targState );
44
45         int TO_STATE_ACTION( RedStateAp *state );
46         int FROM_STATE_ACTION( RedStateAp *state );
47         int EOF_ACTION( RedStateAp *state );
48         virtual int TRANS_ACTION( RedTransAp *trans );
49
50         void writeData();
51         void writeExec();
52         void calcIndexSize();
53 };
54
55 /*
56  * Local Variables:
57  * mode: c++
58  * indent-tabs-mode: 1
59  * c-file-style: "bsd"
60  * End:
61  */
62
63 #endif
64