2 * Copyright 2005-2007 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 writeGoto( InlineItem
*item
);
94 void writeGotoExpr( InlineItem
*item
);
95 void writeCall( InlineItem
*item
);
96 void writeCallExpr( InlineItem
*item
);
97 void writeNext( InlineItem
*item
);
98 void writeNextExpr( InlineItem
*item
);
99 void writeEntry( InlineItem
*item
);
100 void writeLmSetActId( InlineItem
*item
);
101 void writeLmOnLast( InlineItem
*item
);
102 void writeLmOnNext( InlineItem
*item
);
103 void writeLmOnLagBehind( InlineItem
*item
);
106 bool writeNameInst( NameInst
*nameInst
);
107 void writeEntryPoints();
108 void writeConditions();
109 void writeInlineList( InlineList
*inlineList
);
110 void writeActionList();
111 void writeActionTableList();
112 void reduceTrans( TransAp
*trans
);
113 void reduceActionTables();
114 void writeTransList( StateAp
*state
);
115 void writeEofTrans( StateAp
*state
);
116 void writeTrans( Key lowKey
, Key highKey
, TransAp
*defTrans
);
117 void writeAction( Action
*action
);
118 void writeLmSwitch( InlineItem
*item
);
120 void writeActionExec( InlineItem
*item
);
126 ActionTableMap actionTableMap
;
127 int nextActionTableId
;
131 #endif /* _XMLDOTGEN_H */