1<!--
2// This file is part of TagSoup and is Copyright 2002-2008 by John Cowan.
3//
4// TagSoup is licensed under the Apache License,
5// Version 2.0.  You may obtain a copy of this license at
6// http://www.apache.org/licenses/LICENSE-2.0 .  You may also have
7// additional legal rights not granted by this license.
8//
9// TagSoup is distributed in the hope that it will be useful, but
10// unless required by applicable law or agreed to in writing, TagSoup
11// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
12// OF ANY KIND, either express or implied; not even the implied warranty
13// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14-->
15
16<statetable xmlns='http://www.ccil.org/~cowan/XML/tagsoup/stml'
17		version='1.0'>
18
19	<symbol id='EOF'/>
20	<symbol id='S'/>
21	<symbol id='default'/>
22
23	<action id='A_ADUP'/>
24	<action id='A_ADUP_SAVE'/>
25	<action id='A_ADUP_STAGC'/>
26	<action id='A_ANAME'/>
27	<action id='A_ANAME_ADUP_STAGC'/>
28	<action id='A_AVAL'/>
29	<action id='A_AVAL_STAGC'/>
30	<action id='A_CDATA'/>
31	<action id='A_CMNT'/>
32	<action id='A_DECL'/>
33	<action id='A_ENTITY'/>
34	<action id='A_ENTITY_START'/>
35	<action id='A_ETAG'/>
36	<action id='A_EMPTYTAG'/>
37	<action id='A_ANAME_ADUP'/>
38	<action id='A_GI'/>
39	<action id='A_GI_STAGC'/>
40	<action id='A_LT'/>
41	<action id='A_LT_PCDATA'/>
42	<action id='A_MINUS'/>
43	<action id='A_MINUS2'/>
44	<action id='A_MINUS3'/>
45	<action id='A_PCDATA'/>
46	<action id='A_PI'/>
47	<action id='A_PITARGET'/>
48	<action id='A_PITARGET_PI'/>
49	<action id='A_SAVE'/>
50	<action id='A_SKIP'/>
51	<action id='A_SP'/>
52	<action id='A_STAGC'/>
53	<action id='A_UNGET'/>
54	<action id='A_UNSAVE_PCDATA'/>
55
56	<state id='S_ANAME'>
57		<tr symbol='default' action='A_SAVE' newstate='S_ANAME'/>
58		<tr char='=' action='A_ANAME' newstate='S_AVAL'/>
59		<tr char='>' action='A_ANAME_ADUP_STAGC' newstate='S_PCDATA'/>
60		<tr char='/' action='A_ANAME_ADUP' newstate='S_EMPTYTAG'/>
61		<tr symbol='EOF' action='A_ANAME_ADUP_STAGC' newstate='S_DONE'/>
62		<tr symbol='S' action='A_ANAME' newstate='S_EQ'/>
63	</state>
64	<state id='S_APOS'>
65		<tr symbol='default' action='A_SAVE' newstate='S_APOS'/>
66		<tr char='&apos;' action='A_AVAL' newstate='S_TAGWS'/>
67		<tr symbol='EOF' action='A_AVAL_STAGC' newstate='S_DONE'/>
68		<tr symbol='S' action='A_SP' newstate='S_APOS'/>
69	</state>
70	<state id='S_AVAL'>
71		<tr symbol='default' action='A_SAVE' newstate='S_STAGC'/>
72		<tr char='"' action='A_SKIP' newstate='S_QUOT'/>
73		<tr char='&apos;' action='A_SKIP' newstate='S_APOS'/>
74		<tr char='>' action='A_AVAL_STAGC' newstate='S_PCDATA'/>
75		<tr symbol='EOF' action='A_AVAL_STAGC' newstate='S_DONE'/>
76		<tr symbol='S' action='A_SKIP' newstate='S_AVAL'/>
77	</state>
78	<state id='S_CDATA'>
79		<tr symbol='default' action='A_SAVE' newstate='S_CDATA'/>
80		<tr char='&lt;' action='A_SAVE' newstate='S_CDATA2'/>
81		<tr symbol='EOF' action='A_PCDATA' newstate='S_DONE'/>
82	</state>
83	<state id='S_CDATA2'>
84		<tr symbol='default' action='A_SAVE' newstate='S_CDATA'/>
85		<tr char='/' action='A_UNSAVE_PCDATA' newstate='S_ETAG'/>
86		<tr symbol='EOF' action='A_UNSAVE_PCDATA' newstate='S_DONE'/>
87	</state>
88	<state id='S_COM'>
89		<tr symbol='default' action='A_SAVE' newstate='S_COM2'/>
90		<tr char='-' action='A_SKIP' newstate='S_COM2'/>
91		<tr symbol='EOF' action='A_CMNT' newstate='S_DONE'/>
92	</state>
93	<state id='S_COM2'>
94		<tr symbol='default' action='A_SAVE' newstate='S_COM2'/>
95		<tr char='-' action='A_SKIP' newstate='S_COM3'/>
96		<tr symbol='EOF' action='A_CMNT' newstate='S_DONE'/>
97	</state>
98	<state id='S_COM3'>
99		<tr symbol='default' action='A_MINUS' newstate='S_COM2'/>
100		<tr char='-' action='A_SKIP' newstate='S_COM4'/>
101		<tr symbol='EOF' action='A_CMNT' newstate='S_DONE'/>
102	</state>
103	<state id='S_COM4'>
104		<tr symbol='default' action='A_MINUS2' newstate='S_COM2'/>
105		<tr char='-' action='A_MINUS3' newstate='S_COM4'/>
106		<tr char='>' action='A_CMNT' newstate='S_PCDATA'/>
107		<tr symbol='EOF' action='A_CMNT' newstate='S_DONE'/>
108	</state>
109	<state id='S_DECL'>
110		<tr symbol='default' action='A_SAVE' newstate='S_DECL2'/>
111		<tr char='-' action='A_SKIP' newstate='S_COM'/>
112		<tr char='[' action='A_SKIP' newstate='S_BB'/>
113		<tr char='>' action='A_SKIP' newstate='S_PCDATA'/>
114		<tr symbol='EOF' action='A_SKIP' newstate='S_DONE'/>
115	</state>
116	<state id='S_DECL2'>
117		<tr symbol='default' action='A_SAVE' newstate='S_DECL2'/>
118		<tr char='>' action='A_DECL' newstate='S_PCDATA'/>
119		<tr symbol='EOF' action='A_SKIP' newstate='S_DONE'/>
120	</state>
121	<state id='S_ENT'>
122		<tr symbol='default' action='A_ENTITY' newstate='S_ENT'/>
123		<tr symbol='EOF' action='A_ENTITY' newstate='S_DONE'/>
124	</state>
125	<state id='S_EQ'>
126		<tr symbol='default' action='A_ADUP_SAVE' newstate='S_ANAME'/>
127		<tr char='=' action='A_SKIP' newstate='S_AVAL'/>
128		<tr char='>' action='A_ADUP_STAGC' newstate='S_PCDATA'/>
129		<tr symbol='EOF' action='A_ADUP_STAGC' newstate='S_DONE'/>
130		<tr symbol='S' action='A_SKIP' newstate='S_EQ'/>
131	</state>
132	<state id='S_ETAG'>
133		<tr symbol='default' action='A_SAVE' newstate='S_ETAG'/>
134		<tr char='>' action='A_ETAG' newstate='S_PCDATA'/>
135		<tr symbol='EOF' action='A_ETAG' newstate='S_DONE'/>
136		<tr symbol='S' action='A_SKIP' newstate='S_ETAG'/>
137	</state>
138	<state id='S_GI'>
139		<tr symbol='default' action='A_SAVE' newstate='S_GI'/>
140		<tr char='/' action='A_SKIP' newstate='S_EMPTYTAG'/>
141		<tr char='>' action='A_GI_STAGC' newstate='S_PCDATA'/>
142		<tr symbol='EOF' action='A_SKIP' newstate='S_DONE'/>
143		<tr symbol='S' action='A_GI' newstate='S_TAGWS'/>
144	</state>
145	<state id='S_NCR'>
146		<tr symbol='default' action='A_ENTITY' newstate='S_NCR'/>
147		<tr symbol='EOF' action='A_ENTITY' newstate='S_DONE'/>
148	</state>
149	<state id='S_XNCR'>
150		<tr symbol='default' action='A_ENTITY' newstate='S_XNCR'/>
151		<tr symbol='EOF' action='A_ENTITY' newstate='S_DONE'/>
152	</state>
153	<state id='S_PCDATA'>
154		<tr symbol='default' action='A_SAVE' newstate='S_PCDATA'/>
155		<tr char='&amp;' action='A_ENTITY_START' newstate='S_ENT'/>
156		<tr char='&lt;' action='A_PCDATA' newstate='S_TAG'/>
157		<tr symbol='EOF' action='A_PCDATA' newstate='S_DONE'/>
158	</state>
159	<state id='S_PI'>
160		<tr symbol='default' action='A_SAVE' newstate='S_PI'/>
161		<tr char='>' action='A_PI' newstate='S_PCDATA'/>
162		<tr symbol='EOF' action='A_PI' newstate='S_DONE'/>
163	</state>
164	<state id='S_PITARGET'>
165		<tr symbol='default' action='A_SAVE' newstate='S_PITARGET'/>
166		<tr char='>' action='A_PITARGET_PI' newstate='S_PCDATA'/>
167		<tr symbol='EOF' action='A_PITARGET_PI' newstate='S_DONE'/>
168		<tr symbol='S' action='A_PITARGET' newstate='S_PI'/>
169	</state>
170	<state id='S_QUOT'>
171		<tr symbol='default' action='A_SAVE' newstate='S_QUOT'/>
172		<tr char='"' action='A_AVAL' newstate='S_TAGWS'/>
173		<tr symbol='EOF' action='A_AVAL_STAGC' newstate='S_DONE'/>
174		<tr symbol='S' action='A_SP' newstate='S_QUOT'/>
175	</state>
176	<state id='S_STAGC'>
177		<tr symbol='default' action='A_SAVE' newstate='S_STAGC'/>
178		<tr char='>' action='A_AVAL_STAGC' newstate='S_PCDATA'/>
179		<tr symbol='EOF' action='A_AVAL_STAGC' newstate='S_DONE'/>
180		<tr symbol='S' action='A_AVAL' newstate='S_TAGWS'/>
181	</state>
182	<state id='S_TAG'>
183		<tr symbol='default' action='A_SAVE' newstate='S_GI'/>
184		<tr char='!' action='A_SKIP' newstate='S_DECL'/>
185		<tr char='/' action='A_SKIP' newstate='S_ETAG'/>
186		<tr char='?' action='A_SKIP' newstate='S_PITARGET'/>
187		<tr char='&lt;' action='A_SAVE' newstate='S_TAG'/>
188		<tr symbol='EOF' action='A_LT_PCDATA' newstate='S_DONE'/>
189		<tr symbol='S' action='A_LT' newstate='S_PCDATA'/>
190	</state>
191	<state id='S_TAGWS'>
192		<tr symbol='default' action='A_SAVE' newstate='S_ANAME'/>
193		<tr char='/' action='A_SKIP' newstate='S_EMPTYTAG'/>
194		<tr char='>' action='A_STAGC' newstate='S_PCDATA'/>
195		<tr symbol='EOF' action='A_STAGC' newstate='S_DONE'/>
196		<tr symbol='S' action='A_SKIP' newstate='S_TAGWS'/>
197	</state>
198	<state id='S_EMPTYTAG'>
199		<tr symbol='S' action='A_SKIP' newstate='S_TAGWS'/>
200		<tr symbol='default' action='A_SAVE' newstate='S_ANAME'/>
201		<tr char='>' action='A_EMPTYTAG' newstate='S_PCDATA'/>
202	</state>
203	<state id='S_BB'>
204		<tr char='C' action='A_SKIP' newstate='S_BBC'/>
205		<tr symbol='default' action='A_SKIP' newstate='S_DECL'/>
206		<tr symbol='EOF' action='A_SKIP' newstate='S_DONE'/>
207	</state>
208	<state id='S_BBC'>
209		<tr char='D' action='A_SKIP' newstate='S_BBCD'/>
210		<tr symbol='default' action='A_SKIP' newstate='S_DECL'/>
211		<tr symbol='EOF' action='A_SKIP' newstate='S_DONE'/>
212	</state>
213	<state id='S_BBCD'>
214		<tr char='A' action='A_SKIP' newstate='S_BBCDA'/>
215		<tr symbol='default' action='A_SKIP' newstate='S_DECL'/>
216		<tr symbol='EOF' action='A_SKIP' newstate='S_DONE'/>
217	</state>
218	<state id='S_BBCDA'>
219		<tr char='T' action='A_SKIP' newstate='S_BBCDAT'/>
220		<tr symbol='default' action='A_SKIP' newstate='S_DECL'/>
221		<tr symbol='EOF' action='A_SKIP' newstate='S_DONE'/>
222	</state>
223	<state id='S_BBCDAT'>
224		<tr char='A' action='A_SKIP' newstate='S_BBCDATA'/>
225		<tr symbol='default' action='A_SKIP' newstate='S_DECL'/>
226		<tr symbol='EOF' action='A_SKIP' newstate='S_DONE'/>
227	</state>
228	<state id='S_BBCDATA'>
229		<tr char='[' action='A_SKIP' newstate='S_CDSECT'/>
230		<tr symbol='default' action='A_SKIP' newstate='S_DECL'/>
231		<tr symbol='EOF' action='A_SKIP' newstate='S_DONE'/>
232	</state>
233	<state id='S_CDSECT'>
234		<tr char=']' action='A_SAVE' newstate='S_CDSECT1'/>
235		<tr symbol='default' action='A_SAVE' newstate='S_CDSECT'/>
236		<tr symbol='EOF' action='A_SKIP' newstate='S_DONE'/>
237	</state>
238	<state id='S_CDSECT1'>
239		<tr char=']' action='A_SAVE' newstate='S_CDSECT2'/>
240		<tr symbol='default' action='A_SAVE' newstate='S_CDSECT'/>
241		<tr symbol='EOF' action='A_SKIP' newstate='S_DONE'/>
242	</state>
243	<state id='S_CDSECT2'>
244		<tr char='>' action='A_CDATA' newstate='S_PCDATA'/>
245		<tr symbol='default' action='A_SAVE' newstate='S_CDSECT'/>
246		<tr symbol='EOF' action='A_SKIP' newstate='S_DONE'/>
247	</state>
248	<state id='S_DONE'/>
249</statetable>
250