32 namespace std _GLIBCXX_VISIBILITY(default)
36 _GLIBCXX_BEGIN_NAMESPACE_VERSION
44 case _S_opcode_alternative:
45 ostr <<
"alt next=" << _M_next <<
" alt=" << _M_alt;
47 case _S_opcode_subexpr_begin:
48 ostr <<
"subexpr begin next=" << _M_next <<
" index=" << _M_subexpr;
50 case _S_opcode_subexpr_end:
51 ostr <<
"subexpr end next=" << _M_next <<
" index=" << _M_subexpr;
54 ostr <<
"match next=" << _M_next;
56 case _S_opcode_accept:
57 ostr <<
"accept next=" << _M_next;
60 ostr <<
"unknown next=" << _M_next;
72 case _S_opcode_alternative:
73 __ostr << __id <<
" [label=\"" << __id <<
"\\nALT\"];\n"
74 << __id <<
" -> " << _M_next
75 <<
" [label=\"epsilon\", tailport=\"s\"];\n"
76 << __id <<
" -> " << _M_alt
77 <<
" [label=\"epsilon\", tailport=\"n\"];\n";
79 case _S_opcode_subexpr_begin:
80 __ostr << __id <<
" [label=\"" << __id <<
"\\nSBEGIN "
81 << _M_subexpr <<
"\"];\n"
82 << __id <<
" -> " << _M_next <<
" [label=\"epsilon\"];\n";
84 case _S_opcode_subexpr_end:
85 __ostr << __id <<
" [label=\"" << __id <<
"\\nSEND "
86 << _M_subexpr <<
"\"];\n"
87 << __id <<
" -> " << _M_next <<
" [label=\"epsilon\"];\n";
90 __ostr << __id <<
" [label=\"" << __id <<
"\\nMATCH\"];\n"
91 << __id <<
" -> " << _M_next <<
" [label=\"<match>\"];\n";
93 case _S_opcode_accept:
94 __ostr << __id <<
" [label=\"" << __id <<
"\\nACC\"];\n" ;
97 __ostr << __id <<
" [label=\"" << __id <<
"\\nUNK\"];\n"
98 << __id <<
" -> " << _M_next <<
" [label=\"?\"];\n";
107 __ostr <<
"digraph _Nfa {\n"
109 for (
unsigned int __i = 0; __i < this->
size(); ++__i)
110 { this->at(__i)._M_dot(__ostr, __i); }
116 inline _StateSeq& _StateSeq::
117 operator=(
const _StateSeq& __rhs)
119 _M_start = __rhs._M_start;
120 _M_end1 = __rhs._M_end1;
121 _M_end2 = __rhs._M_end2;
125 inline void _StateSeq::
126 _M_push_back(_StateIdT __id)
128 if (_M_end1 != _S_invalid_state_id)
129 _M_nfa[_M_end1]._M_next = __id;
133 inline void _StateSeq::
134 _M_append(_StateIdT __id)
136 if (_M_end2 != _S_invalid_state_id)
138 if (_M_end2 == _M_end1)
139 _M_nfa[_M_end2]._M_alt = __id;
141 _M_nfa[_M_end2]._M_next = __id;
142 _M_end2 = _S_invalid_state_id;
144 if (_M_end1 != _S_invalid_state_id)
145 _M_nfa[_M_end1]._M_next = __id;
149 inline void _StateSeq::
150 _M_append(_StateSeq& __rhs)
152 if (_M_end2 != _S_invalid_state_id)
154 if (_M_end2 == _M_end1)
155 _M_nfa[_M_end2]._M_alt = __rhs._M_start;
157 _M_nfa[_M_end2]._M_next = __rhs._M_start;
158 _M_end2 = _S_invalid_state_id;
160 if (__rhs._M_end2 != _S_invalid_state_id)
161 _M_end2 = __rhs._M_end2;
162 if (_M_end1 != _S_invalid_state_id)
163 _M_nfa[_M_end1]._M_next = __rhs._M_start;
164 _M_end1 = __rhs._M_end1;
168 inline _StateIdT _StateSeq::
172 _GLIBCXX_END_NAMESPACE_VERSION