2 * Copyright 2005, 2006 Adrian Thurston <thurston@cs.queensu.ca>
5 /* This file is part of Ragel.
7 * Ragel is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * Ragel is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Ragel; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 #include "parsedata.h"
37 public AvlTreeEl<RedActionTable>
39 RedActionTable( const ActionTable &key )
45 const ActionTable &getKey()
52 typedef AvlTree<RedActionTable, ActionTable, CmpActionTable> ActionTableMap;
63 lowKey = trans->lowKey;
64 highKey = trans->highKey;
68 NextRedTrans( TransAp *t ) {
82 XMLCodeGen( char *fsmName, ParseData *pd, FsmAp *fsm, std::ostream &out );
86 void appendTrans( TransListVect &outList, Key lowKey, Key highKey, TransAp *trans );
87 void writeStateActions( StateAp *state );
88 void writeStateList();
89 void writeStateConditions( StateAp *state );
91 void writeKey( Key key );
92 void writeText( InlineItem *item );
93 void writeCtrlFlow( InlineItem *item, InlineItem *context );
94 void writePtrMod( InlineItem *item, InlineItem *context );
95 void writeGoto( InlineItem *item, InlineItem *context );
96 void writeGotoExpr( InlineItem *item, InlineItem *context );
97 void writeCall( InlineItem *item, InlineItem *context );
98 void writeCallExpr( InlineItem *item, InlineItem *context );
99 void writeNext( InlineItem *item, InlineItem *context );
100 void writeNextExpr( InlineItem *item, InlineItem *context );
101 void writeEntry( InlineItem *item );
102 void writeLmSetActId( InlineItem *item );
103 void writeLmOnLast( InlineItem *item );
104 void writeLmOnNext( InlineItem *item );
105 void writeLmOnLagBehind( InlineItem *item );
107 void writeEntryPoints();
108 void writeGetKeyExpr();
109 void writeAccessExpr();
110 void writeCurStateExpr();
111 void writeConditions();
112 void writeInlineList( InlineList *inlineList, InlineItem *context );
113 void writeAlphType();
114 void writeActionList();
115 void writeActionTableList();
116 void reduceTrans( TransAp *trans );
117 void reduceActionTables();
118 void writeTransList( StateAp *state );
119 void writeTrans( Key lowKey, Key highKey, TransAp *defTrans );
120 void writeAction( Action *action );
121 void writeLmSwitch( InlineItem *item );
123 void writeActionExec( InlineItem *item );
124 void writeActionExecTE( InlineItem *item );
130 ActionTableMap actionTableMap;
131 int nextActionTableId;
135 #endif /* _XMLDOTGEN_H */