2 * Copyright 2007 Victor Hugo Borja <vic@rubyforge.org>
3 * 2007 Adrian Thurston <thurston@cs.queensu.ca>
6 /* This file is part of Ragel.
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.
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.
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
27 #include "rlgen-ruby.h"
28 #include "ruby-tabcodegen.h"
31 using std::ostringstream
;
38 void RubyTabCodeGen::GOTO( ostream
&out
, int gotoDest
, bool inFinish
)
42 " " << CS() << " = " << gotoDest
<< "\n"
43 " _trigger_goto = true\n"
44 " _goto_level = _again\n"
49 void RubyTabCodeGen::GOTO_EXPR( ostream
&out
, InlineItem
*ilItem
, bool inFinish
)
53 " " << CS() << " = (";
54 INLINE_LIST( out
, ilItem
->children
, 0, inFinish
);
57 " _trigger_goto = true\n"
58 " _goto_level = _again\n"
63 void RubyTabCodeGen::CALL( ostream
&out
, int callDest
, int targState
, bool inFinish
)
65 if ( prePushExpr
!= 0 ) {
67 INLINE_LIST( out
, prePushExpr
, 0, false );
72 " " << STACK() << "[" << TOP() << "] = " << CS() << "\n"
73 " " << TOP() << "+= 1\n"
74 " " << CS() << " = " << callDest
<< "\n"
75 " _trigger_goto = true\n"
76 " _goto_level = _again\n"
80 if ( prePushExpr
!= 0 )
84 void RubyTabCodeGen::CALL_EXPR(ostream
&out
, InlineItem
*ilItem
, int targState
, bool inFinish
)
86 if ( prePushExpr
!= 0 ) {
88 INLINE_LIST( out
, prePushExpr
, 0, false );
93 " " << STACK() << "[" << TOP() << "] = " << CS() << "\n"
94 " " << TOP() << " += 1\n"
95 " " << CS() << " = (";
96 INLINE_LIST( out
, ilItem
->children
, targState
, inFinish
);
100 " _trigger_goto = true\n"
101 " _goto_level = _again\n"
105 if ( prePushExpr
!= 0 )
109 void RubyTabCodeGen::RET( ostream
&out
, bool inFinish
)
113 " " << TOP() << " -= 1\n"
114 " " << CS() << " = " << STACK() << "[" << TOP() << "]\n";
116 if ( postPopExpr
!= 0 ) {
118 INLINE_LIST( out
, postPopExpr
, 0, false );
123 " _trigger_goto = true\n"
124 " _goto_level = _again\n"
129 void RubyTabCodeGen::BREAK( ostream
&out
, int targState
)
133 " _trigger_goto = true\n"
134 " _goto_level = _out\n"
139 void RubyTabCodeGen::COND_TRANSLATE()
142 " _widec = " << GET_KEY() << "\n"
143 " _keys = " << CO() << "[" << CS() << "]*2\n"
144 " _klen = " << CL() << "[" << CS() << "]\n"
147 " _upper = _keys + (_klen<<1) - 2\n"
149 " break if _upper < _lower\n"
150 " _mid = _lower + (((_upper-_lower) >> 1) & ~1)\n"
151 " if " << GET_WIDE_KEY() << " < " << CK() << "[_mid]\n"
152 " _upper = _mid - 2\n"
153 " elsif " << GET_WIDE_KEY() << " > " << CK() << "[_mid+1]\n"
154 " _lower = _mid + 2\n"
156 " case " << C() << "[" << CO() << "[" << CS() << "]"
157 " + ((_mid - _keys)>>1)]\n";
159 for ( CondSpaceList::Iter csi
= condSpaceList
; csi
.lte(); csi
++ ) {
160 CondSpace
*condSpace
= csi
;
161 out
<< " when " << condSpace
->condSpaceId
<< " then" ;
162 out
<< " _widec = " << KEY(condSpace
->baseKey
) <<
163 "+ (" << GET_KEY() << " - " << KEY(keyOps
->minKey
) << ")\n";
165 for ( CondSet::Iter csi
= condSpace
->condSet
; csi
.lte(); csi
++ ) {
166 Size condValOffset
= ((1 << csi
.pos()) * keyOps
->alphSize());
167 out
<< " _widec += " << condValOffset
<< " if ( ";
168 CONDITION( out
, *csi
);
181 void RubyTabCodeGen::LOCATE_TRANS()
184 " _keys = " << KO() << "[" << CS() << "]\n"
185 " _trans = " << IO() << "[" << CS() << "]\n"
186 " _klen = " << SL() << "[" << CS() << "]\n"
187 " _break_match = false\n"
192 " _upper = _keys + _klen - 1\n"
195 " break if _upper < _lower\n"
196 " _mid = _lower + ( (_upper - _lower) >> 1 )\n"
198 " if " << GET_WIDE_KEY() << " < " << K() << "[_mid]\n"
199 " _upper = _mid - 1\n"
200 " elsif " << GET_WIDE_KEY() << " > " << K() << "[_mid]\n"
201 " _lower = _mid + 1\n"
203 " _trans += (_mid - _keys)\n"
204 " _break_match = true\n"
208 " break if _break_match\n"
213 " _klen = " << RL() << "[" << CS() << "]\n"
216 " _upper = _keys + (_klen << 1) - 2\n"
218 " break if _upper < _lower\n"
219 " _mid = _lower + (((_upper-_lower) >> 1) & ~1)\n"
220 " if " << GET_WIDE_KEY() << " < " << K() << "[_mid]\n"
221 " _upper = _mid - 2\n"
222 " elsif " << GET_WIDE_KEY() << " > " << K() << "[_mid+1]\n"
223 " _lower = _mid + 2\n"
225 " _trans += ((_mid - _keys) >> 1)\n"
226 " _break_match = true\n"
230 " break if _break_match\n"
233 " end while false\n";
236 void RubyTabCodeGen::writeExec()
240 " _klen, _trans, _keys";
242 if ( redFsm
->anyRegCurStateRef() )
244 if ( redFsm
->anyConditions() )
246 if ( redFsm
->anyToStateActions() || redFsm
->anyRegActions()
247 || redFsm
->anyFromStateActions() )
248 out
<< ", _acts, _nacts";
262 " _trigger_goto = false\n"
263 " if _goto_level <= 0\n";
267 " if " << P() << " == " << PE() << "\n"
268 " _goto_level = _test_eof\n"
273 if ( redFsm
->errState
!= 0 ) {
275 " if " << CS() << " == " << redFsm
->errState
->id
<< "\n"
276 " _goto_level = _out\n"
281 /* The resume label. */
284 " if _goto_level <= _resume\n";
286 if ( redFsm
->anyFromStateActions() ) {
288 " _acts = " << FSA() << "[" << CS() << "]\n"
289 " _nacts = " << A() << "[_acts]\n"
291 " while _nacts > 0\n"
294 " case " << A() << "[_acts - 1]\n";
295 FROM_STATE_ACTION_SWITCH();
297 " end # from state action switch\n"
299 " if _trigger_goto\n"
304 if ( redFsm
->anyConditions() )
310 out
<< " _trans = " << I() << "[_trans]\n";
312 if ( redFsm
->anyEofTrans() ) {
315 " if _goto_level <= _eof_trans\n";
318 if ( redFsm
->anyRegCurStateRef() )
319 out
<< " _ps = " << CS() << "\n";
321 out
<< " " << CS() << " = " << TT() << "[_trans]\n";
323 if ( redFsm
->anyRegActions() ) {
325 " if " << TA() << "[_trans] != 0\n"
326 " _acts = " << TA() << "[_trans]\n"
327 " _nacts = " << A() << "[_acts]\n"
329 " while _nacts > 0\n"
332 " case " << A() << "[_acts - 1]\n";
335 " end # action switch\n"
338 " if _trigger_goto\n"
343 /* The again label. */
346 " if _goto_level <= _again\n";
348 if ( redFsm
->anyToStateActions() ) {
350 " _acts = " << TSA() << "[" << CS() << "]\n"
351 " _nacts = " << A() << "[_acts]\n"
353 " while _nacts > 0\n"
356 " case " << A() << "[_acts - 1]\n";
357 TO_STATE_ACTION_SWITCH();
359 " end # to state action switch\n"
361 " if _trigger_goto\n"
366 if ( redFsm
->errState
!= 0 ) {
368 " if " << CS() << " == " << redFsm
->errState
->id
<< "\n"
369 " _goto_level = _out\n"
374 out
<< " " << P() << " += 1\n";
378 " if " << P() << " != " << PE() << "\n"
379 " _goto_level = _resume\n"
385 " _goto_level = _resume\n"
389 /* The test_eof label. */
392 " if _goto_level <= _test_eof\n";
394 if ( redFsm
->anyEofTrans() || redFsm
->anyEofActions() ) {
396 " if " << P() << " == " << EOFV() << "\n";
398 if ( redFsm
->anyEofTrans() ) {
400 " if " << ET() << "[" << CS() << "] > 0\n"
401 " _trans = " << ET() << "[" << CS() << "] - 1;\n"
402 " _goto_level = _eof_trans\n"
407 if ( redFsm
->anyEofActions() ) {
409 " __acts = " << EA() << "[" << CS() << "]\n"
410 " __nacts = " << " " << A() << "[__acts]\n"
412 " while __nacts > 0\n"
415 " case " << A() << "[__acts - 1]\n";
416 EOF_ACTION_SWITCH() <<
417 " end # eof action switch\n"
419 " if _trigger_goto\n"
430 " if _goto_level <= _out\n"
434 /* The loop for next. */
438 /* Wrapping the execute block. */
443 std::ostream
&RubyTabCodeGen::FROM_STATE_ACTION_SWITCH()
445 /* Walk the list of functions, printing the cases. */
446 for ( ActionList::Iter act
= actionList
; act
.lte(); act
++ ) {
447 /* Write out referenced actions. */
448 if ( act
->numFromStateRefs
> 0 ) {
449 /* Write the case label, the action */
450 out
<< " when " << act
->actionId
<< " then\n";
451 ACTION( out
, act
, 0, false );
455 genLineDirective( out
);
460 std::ostream
&RubyTabCodeGen::TO_STATE_ACTION_SWITCH()
462 /* Walk the list of functions, printing the cases. */
463 for ( ActionList::Iter act
= actionList
; act
.lte(); act
++ ) {
464 /* Write out referenced actions. */
465 if ( act
->numToStateRefs
> 0 ) {
466 /* Write the case label, the action and the case break. */
467 out
<< "when " << act
->actionId
<< " then\n";
468 ACTION( out
, act
, 0, false );
472 genLineDirective( out
);
476 std::ostream
&RubyTabCodeGen::EOF_ACTION_SWITCH()
478 /* Walk the list of functions, printing the cases. */
479 for ( ActionList::Iter act
= actionList
; act
.lte(); act
++ ) {
480 /* Write out referenced actions. */
481 if ( act
->numEofRefs
> 0 ) {
482 /* Write the case label, the action and the case break. */
483 out
<< "when " << act
->actionId
<< " then\n";
484 ACTION( out
, act
, 0, true );
488 genLineDirective( out
);
492 std::ostream
&RubyTabCodeGen::ACTION_SWITCH()
494 /* Walk the list of functions, printing the cases. */
495 for ( ActionList::Iter act
= actionList
; act
.lte(); act
++ ) {
496 /* Write out referenced actions. */
497 if ( act
->numTransRefs
> 0 ) {
498 /* Write the case label, the action and the case break. */
499 out
<< "when " << act
->actionId
<< " then\n";
500 ACTION( out
, act
, 0, false );
504 genLineDirective( out
);
509 void RubyTabCodeGen::NEXT( ostream
&ret
, int nextDest
, bool inFinish
)
511 ret
<< CS() << " = " << nextDest
<< ";";
514 void RubyTabCodeGen::NEXT_EXPR( ostream
&ret
, InlineItem
*ilItem
, bool inFinish
)
516 ret
<< CS() << " = (";
517 INLINE_LIST( ret
, ilItem
->children
, 0, inFinish
);
522 int RubyTabCodeGen::TO_STATE_ACTION( RedStateAp
*state
)
525 if ( state
->toStateAction
!= 0 )
526 act
= state
->toStateAction
->location
+1;
530 int RubyTabCodeGen::FROM_STATE_ACTION( RedStateAp
*state
)
533 if ( state
->fromStateAction
!= 0 )
534 act
= state
->fromStateAction
->location
+1;
538 int RubyTabCodeGen::EOF_ACTION( RedStateAp
*state
)
541 if ( state
->eofAction
!= 0 )
542 act
= state
->eofAction
->location
+1;
547 std::ostream
&RubyTabCodeGen::COND_OFFSETS()
550 int totalStateNum
= 0, curKeyOffset
= 0;
551 for ( RedStateList::Iter st
= redFsm
->stateList
; st
.lte(); st
++ ) {
552 /* Write the key offset. */
553 ARRAY_ITEM( INT(curKeyOffset
), ++totalStateNum
, st
.last() );
555 /* Move the key offset ahead. */
556 curKeyOffset
+= st
->stateCondList
.length();
562 std::ostream
&RubyTabCodeGen::KEY_OFFSETS()
565 int totalStateNum
= 0, curKeyOffset
= 0;
566 for ( RedStateList::Iter st
= redFsm
->stateList
; st
.lte(); st
++ ) {
567 /* Write the key offset. */
568 ARRAY_ITEM( INT(curKeyOffset
), ++totalStateNum
, st
.last() );
570 /* Move the key offset ahead. */
571 curKeyOffset
+= st
->outSingle
.length() + st
->outRange
.length()*2;
578 std::ostream
&RubyTabCodeGen::INDEX_OFFSETS()
581 int totalStateNum
= 0, curIndOffset
= 0;
582 for ( RedStateList::Iter st
= redFsm
->stateList
; st
.lte(); st
++ ) {
583 /* Write the index offset. */
584 ARRAY_ITEM( INT(curIndOffset
), ++totalStateNum
, st
.last() );
586 /* Move the index offset ahead. */
587 curIndOffset
+= st
->outSingle
.length() + st
->outRange
.length();
588 if ( st
->defTrans
!= 0 )
595 std::ostream
&RubyTabCodeGen::COND_LENS()
598 int totalStateNum
= 0;
599 for ( RedStateList::Iter st
= redFsm
->stateList
; st
.lte(); st
++ ) {
600 /* Write singles length. */
601 ARRAY_ITEM( INT(st
->stateCondList
.length()), ++totalStateNum
, st
.last() );
608 std::ostream
&RubyTabCodeGen::SINGLE_LENS()
611 int totalStateNum
= 0;
612 for ( RedStateList::Iter st
= redFsm
->stateList
; st
.lte(); st
++ ) {
613 /* Write singles length. */
614 ARRAY_ITEM( INT(st
->outSingle
.length()), ++totalStateNum
, st
.last() );
620 std::ostream
&RubyTabCodeGen::RANGE_LENS()
623 int totalStateNum
= 0;
624 for ( RedStateList::Iter st
= redFsm
->stateList
; st
.lte(); st
++ ) {
625 /* Emit length of range index. */
626 ARRAY_ITEM( INT(st
->outRange
.length()), ++totalStateNum
, st
.last() );
632 std::ostream
&RubyTabCodeGen::TO_STATE_ACTIONS()
635 int totalStateNum
= 0;
636 for ( RedStateList::Iter st
= redFsm
->stateList
; st
.lte(); st
++ ) {
637 /* Write any eof action. */
638 ARRAY_ITEM( INT(TO_STATE_ACTION(st
)), ++totalStateNum
, st
.last() );
644 std::ostream
&RubyTabCodeGen::FROM_STATE_ACTIONS()
647 int totalStateNum
= 0;
648 for ( RedStateList::Iter st
= redFsm
->stateList
; st
.lte(); st
++ ) {
649 /* Write any eof action. */
650 ARRAY_ITEM( INT(FROM_STATE_ACTION(st
)), ++totalStateNum
, st
.last() );
656 std::ostream
&RubyTabCodeGen::EOF_ACTIONS()
659 int totalStateNum
= 0;
660 for ( RedStateList::Iter st
= redFsm
->stateList
; st
.lte(); st
++ ) {
661 /* Write any eof action. */
662 ARRAY_ITEM( INT(EOF_ACTION(st
)), ++totalStateNum
, st
.last() );
668 std::ostream
&RubyTabCodeGen::EOF_TRANS()
671 int totalStateNum
= 0;
672 for ( RedStateList::Iter st
= redFsm
->stateList
; st
.lte(); st
++ ) {
673 /* Write any eof action. */
675 if ( st
->eofTrans
!= 0 )
676 trans
= st
->eofTrans
->id
+1;
678 /* Write any eof action. */
679 ARRAY_ITEM( INT(trans
), ++totalStateNum
, st
.last() );
685 std::ostream
&RubyTabCodeGen::COND_KEYS()
689 for ( RedStateList::Iter st
= redFsm
->stateList
; st
.lte(); st
++ ) {
690 /* Loop the state's transitions. */
691 for ( StateCondList::Iter sc
= st
->stateCondList
; sc
.lte(); sc
++ ) {
693 ARRAY_ITEM( KEY( sc
->lowKey
), ++totalTrans
, false );
694 ARRAY_ITEM( KEY( sc
->highKey
), ++totalTrans
, false );
698 /* Output one last number so we don't have to figure out when the last
699 * entry is and avoid writing a comma. */
700 ARRAY_ITEM( INT(0), ++totalTrans
, true );
705 std::ostream
&RubyTabCodeGen::COND_SPACES()
709 for ( RedStateList::Iter st
= redFsm
->stateList
; st
.lte(); st
++ ) {
710 /* Loop the state's transitions. */
711 for ( StateCondList::Iter sc
= st
->stateCondList
; sc
.lte(); sc
++ ) {
713 ARRAY_ITEM( KEY( sc
->condSpace
->condSpaceId
), ++totalTrans
, false );
717 /* Output one last number so we don't have to figure out when the last
718 * entry is and avoid writing a comma. */
719 ARRAY_ITEM( INT(0), ++totalTrans
, true );
724 std::ostream
&RubyTabCodeGen::KEYS()
728 for ( RedStateList::Iter st
= redFsm
->stateList
; st
.lte(); st
++ ) {
729 /* Loop the singles. */
730 for ( RedTransList::Iter stel
= st
->outSingle
; stel
.lte(); stel
++ ) {
731 ARRAY_ITEM( KEY( stel
->lowKey
), ++totalTrans
, false );
734 /* Loop the state's transitions. */
735 for ( RedTransList::Iter rtel
= st
->outRange
; rtel
.lte(); rtel
++ ) {
737 ARRAY_ITEM( KEY( rtel
->lowKey
), ++totalTrans
, false );
740 ARRAY_ITEM( KEY( rtel
->highKey
), ++totalTrans
, false );
744 /* Output one last number so we don't have to figure out when the last
745 * entry is and avoid writing a comma. */
746 ARRAY_ITEM( INT(0), ++totalTrans
, true );
751 std::ostream
&RubyTabCodeGen::INDICIES()
755 for ( RedStateList::Iter st
= redFsm
->stateList
; st
.lte(); st
++ ) {
756 /* Walk the singles. */
757 for ( RedTransList::Iter stel
= st
->outSingle
; stel
.lte(); stel
++ ) {
758 ARRAY_ITEM( KEY( stel
->value
->id
), ++totalTrans
, false );
761 /* Walk the ranges. */
762 for ( RedTransList::Iter rtel
= st
->outRange
; rtel
.lte(); rtel
++ ) {
763 ARRAY_ITEM( KEY( rtel
->value
->id
), ++totalTrans
, false );
766 /* The state's default index goes next. */
767 if ( st
->defTrans
!= 0 ) {
768 ARRAY_ITEM( KEY( st
->defTrans
->id
), ++totalTrans
, false );
772 /* Output one last number so we don't have to figure out when the last
773 * entry is and avoid writing a comma. */
774 ARRAY_ITEM( INT(0), ++totalTrans
, true );
779 std::ostream
&RubyTabCodeGen::TRANS_TARGS()
783 for ( RedStateList::Iter st
= redFsm
->stateList
; st
.lte(); st
++ ) {
784 /* Walk the singles. */
785 for ( RedTransList::Iter stel
= st
->outSingle
; stel
.lte(); stel
++ ) {
786 RedTransAp
*trans
= stel
->value
;
787 ARRAY_ITEM( KEY( trans
->targ
->id
), ++totalTrans
, false );
790 /* Walk the ranges. */
791 for ( RedTransList::Iter rtel
= st
->outRange
; rtel
.lte(); rtel
++ ) {
792 RedTransAp
*trans
= rtel
->value
;
793 ARRAY_ITEM( KEY( trans
->targ
->id
), ++totalTrans
, false );
796 /* The state's default target state. */
797 if ( st
->defTrans
!= 0 ) {
798 RedTransAp
*trans
= st
->defTrans
;
799 ARRAY_ITEM( KEY( trans
->targ
->id
), ++totalTrans
, false );
803 /* Output one last number so we don't have to figure out when the last
804 * entry is and avoid writing a comma. */
805 ARRAY_ITEM( INT(0), ++totalTrans
, true );
811 std::ostream
&RubyTabCodeGen::TRANS_ACTIONS()
815 for ( RedStateList::Iter st
= redFsm
->stateList
; st
.lte(); st
++ ) {
816 /* Walk the singles. */
817 for ( RedTransList::Iter stel
= st
->outSingle
; stel
.lte(); stel
++ ) {
818 RedTransAp
*trans
= stel
->value
;
819 ARRAY_ITEM( INT(TRANS_ACTION( trans
)), ++totalTrans
, false );
822 /* Walk the ranges. */
823 for ( RedTransList::Iter rtel
= st
->outRange
; rtel
.lte(); rtel
++ ) {
824 RedTransAp
*trans
= rtel
->value
;
825 ARRAY_ITEM( INT(TRANS_ACTION( trans
)), ++totalTrans
, false );
828 /* The state's default index goes next. */
829 if ( st
->defTrans
!= 0 ) {
830 RedTransAp
*trans
= st
->defTrans
;
831 ARRAY_ITEM( INT(TRANS_ACTION( trans
)), ++totalTrans
, false );
835 /* Output one last number so we don't have to figure out when the last
836 * entry is and avoid writing a comma. */
837 ARRAY_ITEM( INT(0), ++totalTrans
, true );
842 std::ostream
&RubyTabCodeGen::TRANS_TARGS_WI()
844 /* Transitions must be written ordered by their id. */
845 RedTransAp
**transPtrs
= new RedTransAp
*[redFsm
->transSet
.length()];
846 for ( TransApSet::Iter trans
= redFsm
->transSet
; trans
.lte(); trans
++ )
847 transPtrs
[trans
->id
] = trans
;
849 /* Keep a count of the num of items in the array written. */
852 for ( int t
= 0; t
< redFsm
->transSet
.length(); t
++ ) {
853 /* Write out the target state. */
854 RedTransAp
*trans
= transPtrs
[t
];
855 ARRAY_ITEM( INT(trans
->targ
->id
), ++totalStates
, ( t
>= redFsm
->transSet
.length()-1 ) );
863 std::ostream
&RubyTabCodeGen::TRANS_ACTIONS_WI()
865 /* Transitions must be written ordered by their id. */
866 RedTransAp
**transPtrs
= new RedTransAp
*[redFsm
->transSet
.length()];
867 for ( TransApSet::Iter trans
= redFsm
->transSet
; trans
.lte(); trans
++ )
868 transPtrs
[trans
->id
] = trans
;
870 /* Keep a count of the num of items in the array written. */
873 for ( int t
= 0; t
< redFsm
->transSet
.length(); t
++ ) {
874 /* Write the function for the transition. */
875 RedTransAp
*trans
= transPtrs
[t
];
876 ARRAY_ITEM( INT(TRANS_ACTION( trans
)), ++totalAct
,
877 ( t
>= redFsm
->transSet
.length()-1 ) );
885 void RubyTabCodeGen::writeData()
887 /* If there are any transtion functions then output the array. If there
888 * are none, don't bother emitting an empty array that won't be used. */
889 if ( redFsm
->anyActions() ) {
890 OPEN_ARRAY( ARRAY_TYPE(redFsm
->maxActArrItem
), A() );
896 if ( redFsm
->anyConditions() ) {
897 OPEN_ARRAY( ARRAY_TYPE(redFsm
->maxCondOffset
), CO() );
902 OPEN_ARRAY( ARRAY_TYPE(redFsm
->maxCondLen
), CL() );
907 OPEN_ARRAY( WIDE_ALPH_TYPE(), CK() );
912 OPEN_ARRAY( ARRAY_TYPE(redFsm
->maxCondSpaceId
), C() );
918 OPEN_ARRAY( ARRAY_TYPE(redFsm
->maxKeyOffset
), KO() );
923 OPEN_ARRAY( WIDE_ALPH_TYPE(), K() );
928 OPEN_ARRAY( ARRAY_TYPE(redFsm
->maxSingleLen
), SL() );
933 OPEN_ARRAY( ARRAY_TYPE(redFsm
->maxRangeLen
), RL() );
938 OPEN_ARRAY( ARRAY_TYPE(redFsm
->maxIndexOffset
), IO() );
944 OPEN_ARRAY( ARRAY_TYPE(redFsm
->maxIndex
), I() );
949 OPEN_ARRAY( ARRAY_TYPE(redFsm
->maxState
), TT() );
954 if ( redFsm
->anyActions() ) {
955 OPEN_ARRAY( ARRAY_TYPE(redFsm
->maxActionLoc
), TA() );
962 OPEN_ARRAY( ARRAY_TYPE(redFsm
->maxState
), TT() );
967 if ( redFsm
->anyActions() ) {
968 OPEN_ARRAY( ARRAY_TYPE(redFsm
->maxActionLoc
), TA() );
975 if ( redFsm
->anyToStateActions() ) {
976 OPEN_ARRAY( ARRAY_TYPE(redFsm
->maxActionLoc
), TSA() );
982 if ( redFsm
->anyFromStateActions() ) {
983 OPEN_ARRAY( ARRAY_TYPE(redFsm
->maxActionLoc
), FSA() );
984 FROM_STATE_ACTIONS();
989 if ( redFsm
->anyEofActions() ) {
990 OPEN_ARRAY( ARRAY_TYPE(redFsm
->maxActionLoc
), EA() );
996 if ( redFsm
->anyEofTrans() ) {
997 OPEN_ARRAY( ARRAY_TYPE(redFsm
->maxIndex
+1), ET() );