merge the formfield patch from ooo-build
[ooovba.git] / autodoc / source / parser_i / idoc / cx_dsapi.cxx
blob3721037b3aa33079c156c9ba0eca3b20bb574960
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: cx_dsapi.cxx,v $
10 * $Revision: 1.10 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #include <precomp.h>
32 #include <s2_dsapi/cx_dsapi.hxx>
35 // NOT FULLY DEFINED SERVICES
36 #include <x_parse2.hxx>
37 #include <tools/tkpchars.hxx>
38 #include <s2_dsapi/tk_atag2.hxx>
39 #include <s2_dsapi/tk_docw2.hxx>
40 #include <s2_dsapi/tk_xml.hxx>
41 #include <s2_dsapi/cx_docu2.hxx>
42 #include <s2_dsapi/tokrecv.hxx>
45 namespace csi
47 namespace dsapi
51 const intt C_nStatusSize = 128;
52 const intt C_nCppInitialNrOfStati = 400;
55 const uintt nF_fin_Error = 1;
56 const uintt nF_fin_Ignore = 2;
57 const uintt nF_fin_Eof = 3;
58 const uintt nF_fin_AnyWord = 4;
59 const uintt nF_fin_AtTag = 5;
60 const uintt nF_fin_EndSign = 6;
61 const uintt nF_goto_EoHtml = 7;
62 const uintt nF_goto_EoXmlConst = 8;
63 const uintt nF_goto_EoXmlLink_BeginTag = 9;
64 const uintt nF_goto_EoXmlLink_EndTag = 10;
65 const uintt nF_goto_EoXmlFormat_BeginTag = 11;
66 const uintt nF_goto_EoXmlFormat_EndTag = 12;
67 const uintt nF_goto_CheckStar = 13;
68 const uintt nF_fin_Comma = 14;
69 const uintt nF_fin_White = 15;
71 const UINT16 nTok_at_author = 100 + Tok_AtTag::author;
72 const UINT16 nTok_at_see = 100 + Tok_AtTag::see;
73 const UINT16 nTok_at_param = 100 + Tok_AtTag::param;
74 const UINT16 nTok_at_return = 100 + Tok_AtTag::e_return;
75 const UINT16 nTok_at_throws = 100 + Tok_AtTag::e_throw;
76 const UINT16 nTok_at_example = 100 + Tok_AtTag::example;
77 const UINT16 nTok_at_deprecated = 100 + Tok_AtTag::deprecated;
78 const UINT16 nTok_at_suspicious = 100 + Tok_AtTag::suspicious;
79 const UINT16 nTok_at_missing = 100 + Tok_AtTag::missing;
80 const UINT16 nTok_at_incomplete = 100 + Tok_AtTag::incomplete;
81 const UINT16 nTok_at_version = 100 + Tok_AtTag::version;
82 const UINT16 nTok_at_guarantees = 100 + Tok_AtTag::guarantees;
83 const UINT16 nTok_at_exception = 100 + Tok_AtTag::exception;
84 const UINT16 nTok_at_since = 100 + Tok_AtTag::since;
86 const UINT16 nTok_const_TRUE = 200 + Tok_XmlConst::e_true;
87 const UINT16 nTok_const_FALSE = 200 + Tok_XmlConst::e_false;
88 const UINT16 nTok_const_NULL = 200 + Tok_XmlConst::e_null;
89 const UINT16 nTok_const_void = 200 + Tok_XmlConst::e_void;
91 const UINT16 nTok_link_typeB = 300 + Tok_XmlLink_BeginTag::type;
92 const UINT16 nTok_link_typeE = 325 + Tok_XmlLink_EndTag::type;
93 const UINT16 nTok_link_memberB = 300 + Tok_XmlLink_BeginTag::member;
94 const UINT16 nTok_link_membeE = 325 + Tok_XmlLink_EndTag::member;
95 const UINT16 nTok_link_constB = 300 + Tok_XmlLink_BeginTag::e_const;
96 const UINT16 nTok_link_constE = 325 + Tok_XmlLink_EndTag::e_const;
98 const UINT16 nTok_format_listingB = 350 + Tok_XmlFormat_BeginTag::listing;
99 const UINT16 nTok_format_listingE = 375 + Tok_XmlFormat_EndTag::listing;
100 const UINT16 nTok_format_codeB = 350 + Tok_XmlFormat_BeginTag::code;
101 const UINT16 nTok_format_codeE = 375 + Tok_XmlFormat_EndTag::code;
102 const UINT16 nTok_format_atomB = 350 + Tok_XmlFormat_BeginTag::atom;
103 const UINT16 nTok_format_atomE = 375 + Tok_XmlFormat_EndTag::atom;
106 const UINT16 nTok_html_parastart = 400;
108 const UINT16 nTok_MLDocuEnd = 501;
109 const UINT16 nTok_EOL = 502;
112 Context_Docu::Context_Docu( Token_Receiver & o_rReceiver )
113 : aStateMachine(C_nStatusSize, C_nCppInitialNrOfStati),
114 pReceiver(&o_rReceiver),
115 pParentContext(0),
116 pCx_EoHtml(0),
117 pCx_EoXmlConst(0),
118 pCx_EoXmlLink_BeginTag(0),
119 pCx_EoXmlLink_EndTag(0),
120 pCx_EoXmlFormat_BeginTag(0),
121 pCx_EoXmlFormat_EndTag(0),
122 pCx_CheckStar(0),
123 pNewToken(0),
124 pFollowUpContext(0),
125 bIsMultiline(false)
127 pCx_EoHtml = new Cx_EoHtml(o_rReceiver, *this);
128 pCx_EoXmlConst = new Cx_EoXmlConst(o_rReceiver, *this);
129 pCx_EoXmlLink_BeginTag = new Cx_EoXmlLink_BeginTag(o_rReceiver, *this);
130 pCx_EoXmlLink_EndTag = new Cx_EoXmlLink_EndTag(o_rReceiver, *this);
131 pCx_EoXmlFormat_BeginTag = new Cx_EoXmlFormat_BeginTag(o_rReceiver, *this);
132 pCx_EoXmlFormat_EndTag = new Cx_EoXmlFormat_EndTag(o_rReceiver, *this);
133 pCx_CheckStar = new Cx_CheckStar(*pReceiver,*this);
135 SetupStateMachine();
138 void
139 Context_Docu::SetParentContext( TkpContext & io_rParentContext,
140 const char * )
142 pFollowUpContext = pParentContext = &io_rParentContext;
143 pCx_CheckStar->Set_End_FolloUpContext(io_rParentContext);
146 Context_Docu::~Context_Docu()
150 void
151 Context_Docu::ReadCharChain( CharacterSource & io_rText )
153 csv_assert(pParentContext != 0);
155 pNewToken = 0;
157 UINT16 nTokenId = 0;
158 StmBoundsStatu2 & rBound = aStateMachine.GetCharChain(nTokenId, io_rText);
160 // !!!
161 // The order of the next two lines is essential, because
162 // pFollowUpContext may be changed by PerformStatusFunction() also,
163 // which then MUST override the previous assignment.
164 pFollowUpContext = rBound.FollowUpContext();
165 PerformStatusFunction(rBound.StatusFunctionNr(), nTokenId, io_rText);
168 bool
169 Context_Docu::PassNewToken()
171 if (pNewToken)
173 pReceiver->Receive(*pNewToken.Release());
174 return true;
176 return false;
179 TkpContext &
180 Context_Docu::FollowUpContext()
182 csv_assert(pFollowUpContext != 0);
183 return *pFollowUpContext;
186 void
187 Context_Docu::PerformStatusFunction( uintt i_nStatusSignal,
188 UINT16 i_nTokenId,
189 CharacterSource & io_rText )
191 switch (i_nStatusSignal)
193 case nF_fin_White:
194 io_rText.CutToken();
195 pNewToken = new Tok_White;
196 break;
197 case nF_fin_Error:
198 throw X_AutodocParser(X_AutodocParser::x_InvalidChar);
199 // no break because of throw
200 case nF_fin_Ignore:
201 pNewToken = 0;
202 io_rText.CutToken();
203 break;
204 case nF_fin_Eof:
205 if (bIsMultiline)
206 throw X_AutodocParser(X_AutodocParser::x_UnexpectedEOF);
207 else
208 io_rText.CutToken();
209 pNewToken = new Tok_EOF;
210 break;
211 case nF_fin_AnyWord:
212 pNewToken = new Tok_Word(io_rText.CutToken());
213 break;
214 case nF_fin_AtTag:
215 io_rText.CutToken();
216 pNewToken = new Tok_AtTag( i_nTokenId - 100 );
217 break;
218 case nF_fin_Comma:
219 io_rText.CutToken();
220 pNewToken = new Tok_Comma;
221 break;
222 case nF_fin_EndSign:
223 io_rText.CutToken();
224 switch (i_nTokenId)
226 case nTok_MLDocuEnd:
227 if (bIsMultiline)
229 pNewToken = new Tok_DocuEnd;
230 pFollowUpContext = pParentContext;
232 else
234 pNewToken = new Tok_Word(io_rText.CutToken());
235 pFollowUpContext = this;
237 break;
238 case nTok_EOL:
239 if (bIsMultiline)
241 pNewToken = new Tok_EOL;
242 pFollowUpContext = this;
244 else
246 pNewToken = new Tok_DocuEnd;
247 pFollowUpContext = pParentContext;
249 pReceiver->Increment_CurLine();
250 break;
251 default:
252 csv_assert(false);
254 break;
255 case nF_goto_EoHtml:
256 pCx_EoHtml->SetIfIsStartOfParagraph(i_nTokenId == nTok_html_parastart);
257 break;
258 case nF_goto_EoXmlConst:
259 pCx_EoXmlConst->SetTokenId(i_nTokenId - 200);
260 break;
261 case nF_goto_EoXmlLink_BeginTag:
262 pCx_EoXmlLink_BeginTag->SetTokenId(i_nTokenId - 300);
263 break;
264 case nF_goto_EoXmlLink_EndTag:
265 pCx_EoXmlLink_EndTag->SetTokenId(i_nTokenId - 325);
266 break;
267 case nF_goto_EoXmlFormat_BeginTag:
268 pCx_EoXmlFormat_BeginTag->SetTokenId(i_nTokenId - 350);
269 break;
270 case nF_goto_EoXmlFormat_EndTag:
271 pCx_EoXmlFormat_EndTag->SetTokenId(i_nTokenId - 375);
272 break;
273 case nF_goto_CheckStar:
274 pCx_CheckStar->SetIsEnd( bIsMultiline );
275 break;
276 default:
277 csv_assert(false);
278 } // end switch (i_nStatusSignal)
281 void
282 Context_Docu::SetupStateMachine()
284 // Besondere Array-Stati (kein Tokenabschluss oder Kontextwechsel):
285 // const INT16 bas = 0; // Base-Status
286 const INT16 wht = 1; // Whitespace-overlook-Status
287 const INT16 awd = 2; // Any-Word-Read-Status
289 // Kontextwechsel-Stati:
290 const INT16 goto_EoHtml = 3;
291 const INT16 goto_EoXmlConst = 4;
292 const INT16 goto_EoXmlLink_BeginTag = 5;
293 const INT16 goto_EoXmlLink_EndTag = 6;
294 const INT16 goto_EoXmlFormat_BeginTag = 7;
295 const INT16 goto_EoXmlFormat_EndTag = 8;
296 const INT16 goto_CheckStar = 9;
298 // Tokenfinish-Stati:
299 const INT16 finError = 10;
300 // const INT16 finIgnore = 11;
301 const INT16 finEof = 12;
302 const INT16 finAnyWord = 13;
303 const INT16 finAtTag = 14;
304 const INT16 finEndSign = 15;
305 // const INT16 finComma = 16;
306 const INT16 finWhite = 17;
308 // Konstanten zur Benutzung in der Tabelle:
309 const INT16 ght = goto_EoHtml;
311 const INT16 gxc = goto_EoXmlConst;
312 const INT16 glb = goto_EoXmlLink_TagBegin;
313 const INT16 gle = goto_EoXmlLink_TagEnd;
314 const INT16 gfb = goto_EoXmlFormat_TagBegin;
315 const INT16 gfe = goto_EoXmlFormat_TagEnd;
317 const INT16 err = finError;
318 const INT16 faw = finAnyWord;
319 // const INT16 fig = finIgnore;
320 // const INT16 fes = finEndSign;
321 const INT16 fof = finEof;
322 // const INT16 fat = finAtTag;
323 const INT16 fwh = finWhite;
325 /// The '0's will be replaced by calls of AddToken().
327 const INT16 A_nTopStatus[C_nStatusSize] =
328 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
329 {fof,err,err,err,err,err,err,err,err,wht, 0,wht,wht, 0,err,err,
330 err,err,err,err,err,err,err,err,err,err,fof,err,err,err,err,err, // ... 31
331 wht,awd,awd,awd,awd,awd,awd,awd,awd,awd, 0,awd,awd,awd,awd,awd,
332 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, 0,awd,awd,awd, // ... 63
333 0,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
334 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 95
335 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
336 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd // ... 127
339 const INT16 A_nWhitespaceStatus[C_nStatusSize] =
340 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
341 {fof,err,err,err,err,err,err,err,err,wht,fwh,wht,wht,fwh,err,err,
342 err,err,err,err,err,err,err,err,err,err,fof,err,err,err,err,err, // ... 31
343 wht,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,
344 fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh, // ... 63
345 fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,
346 fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh, // ... 95
347 fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,
348 fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh // ... 127
351 const INT16 A_nWordStatus[C_nStatusSize] =
352 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
353 {faw,err,err,err,err,err,err,err,err,faw,faw,faw,faw,faw,err,err,
354 err,err,err,err,err,err,err,err,err,err,faw,err,err,err,err,err, // ... 31
355 faw,awd,awd,awd,awd,awd,awd,awd,awd,awd,faw,awd,awd,awd,awd,awd,
356 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,faw,awd,awd,awd, // ... 63
357 faw,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
358 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 95
359 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
360 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd // ... 127
363 const INT16 A_nAtTagDefStatus[C_nStatusSize] =
364 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
365 {faw,err,err,err,err,err,err,err,err,faw,faw,faw,faw,faw,err,err,
366 err,err,err,err,err,err,err,err,err,err,faw,err,err,err,err,err, // ... 31
367 faw,awd,awd,awd,awd,awd,awd,awd,awd,awd,faw,awd,awd,awd,awd,awd,
368 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,faw,awd,faw,awd,awd,awd, // ... 63
369 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
370 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 95
371 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
372 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd // ... 127
375 const INT16 A_nHtmlDefStatus[C_nStatusSize] =
376 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
377 {ght,err,err,err,err,err,err,err,err,ght,ght,ght,ght,ght,err,err,
378 err,err,err,err,err,err,err,err,err,err,ght,err,err,err,err,err, // ... 31
379 ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,
380 ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght, // ... 63
381 ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,
382 ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght, // ... 95
383 ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,
384 ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght // ... 127
387 const INT16 A_nPunctDefStatus[C_nStatusSize] =
388 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
389 {err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
390 err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 16 ...
391 err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
392 err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 48 ...
393 err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
394 err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 80 ...
395 err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
396 err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err // 112 ...
399 DYN StmArrayStatu2 * dpStatusTop
400 = new StmArrayStatu2( C_nStatusSize, A_nTopStatus, 0, true);
401 DYN StmArrayStatu2 * dpStatusWhite
402 = new StmArrayStatu2( C_nStatusSize, A_nWhitespaceStatus, 0, true);
403 DYN StmArrayStatu2 * dpStatusWord
404 = new StmArrayStatu2( C_nStatusSize, A_nWordStatus, 0, true);
406 DYN StmBoundsStatu2 * dpBst_goto_EoHtml
407 = new StmBoundsStatu2( *this, *pCx_EoHtml, nF_goto_EoHtml, true );
408 DYN StmBoundsStatu2 * dpBst_goto_EoXmlConst
409 = new StmBoundsStatu2( *this, *pCx_EoXmlConst, nF_goto_EoXmlConst, true );
410 DYN StmBoundsStatu2 * dpBst_goto_EoXmlLink_BeginTag
411 = new StmBoundsStatu2( *this, *pCx_EoXmlLink_BeginTag, nF_goto_EoXmlLink_BeginTag, true );
412 DYN StmBoundsStatu2 * dpBst_goto_EoXmlLink_EndTag
413 = new StmBoundsStatu2( *this, *pCx_EoXmlLink_EndTag, nF_goto_EoXmlLink_EndTag, true );
414 DYN StmBoundsStatu2 * dpBst_goto_EoXmlFormat_BeginTag
415 = new StmBoundsStatu2( *this, *pCx_EoXmlFormat_BeginTag, nF_goto_EoXmlFormat_BeginTag, true );
416 DYN StmBoundsStatu2 * dpBst_goto_EoXmlFormat_EndTag
417 = new StmBoundsStatu2( *this, *pCx_EoXmlFormat_EndTag, nF_goto_EoXmlFormat_EndTag, true );
418 DYN StmBoundsStatu2 * dpBst_goto_CheckStar
419 = new StmBoundsStatu2( *this, *pCx_CheckStar, nF_goto_CheckStar, true );
422 DYN StmBoundsStatu2 * dpBst_finError
423 = new StmBoundsStatu2( *this, TkpContext_Null2_(), nF_fin_Error, true );
424 DYN StmBoundsStatu2 * dpBst_finIgnore
425 = new StmBoundsStatu2( *this, *this, nF_fin_Ignore, true);
426 DYN StmBoundsStatu2 * dpBst_finEof
427 = new StmBoundsStatu2( *this, TkpContext_Null2_(), nF_fin_Eof, false);
428 DYN StmBoundsStatu2 * dpBst_finAnyWord
429 = new StmBoundsStatu2( *this, *this, nF_fin_AnyWord, true);
430 DYN StmBoundsStatu2 * dpBst_finAtTag
431 = new StmBoundsStatu2( *this, *this, nF_fin_AtTag, false);
432 DYN StmBoundsStatu2 * dpBst_finEndSign
433 = new StmBoundsStatu2( *this, *pParentContext, nF_fin_EndSign, false);
434 DYN StmBoundsStatu2 * dpBst_fin_Comma
435 = new StmBoundsStatu2( *this, *this, nF_fin_Comma, false );
436 DYN StmBoundsStatu2 * dpBst_finWhite
437 = new StmBoundsStatu2( *this, *this, nF_fin_White, false);
440 // dpMain aufbauen:
441 aStateMachine.AddStatus(dpStatusTop);
442 aStateMachine.AddStatus(dpStatusWhite);
443 aStateMachine.AddStatus(dpStatusWord);
445 aStateMachine.AddStatus(dpBst_goto_EoHtml);
446 aStateMachine.AddStatus(dpBst_goto_EoXmlConst);
447 aStateMachine.AddStatus(dpBst_goto_EoXmlLink_BeginTag);
448 aStateMachine.AddStatus(dpBst_goto_EoXmlLink_EndTag);
449 aStateMachine.AddStatus(dpBst_goto_EoXmlFormat_BeginTag);
450 aStateMachine.AddStatus(dpBst_goto_EoXmlFormat_EndTag);
451 aStateMachine.AddStatus(dpBst_goto_CheckStar);
453 aStateMachine.AddStatus(dpBst_finError);
454 aStateMachine.AddStatus(dpBst_finIgnore);
455 aStateMachine.AddStatus(dpBst_finEof);
456 aStateMachine.AddStatus(dpBst_finAnyWord);
457 aStateMachine.AddStatus(dpBst_finAtTag);
458 aStateMachine.AddStatus(dpBst_finEndSign);
459 aStateMachine.AddStatus(dpBst_fin_Comma);
460 aStateMachine.AddStatus(dpBst_finWhite);
463 aStateMachine.AddToken( "@author", nTok_at_author, A_nAtTagDefStatus, finAtTag );
464 aStateMachine.AddToken( "@param", nTok_at_param, A_nAtTagDefStatus, finAtTag );
465 aStateMachine.AddToken( "@throws", nTok_at_throws, A_nAtTagDefStatus, finAtTag );
466 aStateMachine.AddToken( "@see", nTok_at_see, A_nAtTagDefStatus, finAtTag );
467 aStateMachine.AddToken( "@since", nTok_at_since, A_nAtTagDefStatus, finAtTag );
468 aStateMachine.AddToken( "@example", nTok_at_example, A_nAtTagDefStatus, finAtTag );
469 aStateMachine.AddToken( "@return", nTok_at_return, A_nAtTagDefStatus, finAtTag );
470 aStateMachine.AddToken( "@returns", nTok_at_return, A_nAtTagDefStatus, finAtTag );
471 aStateMachine.AddToken( "@deprecated",
472 nTok_at_deprecated, A_nAtTagDefStatus, finAtTag );
473 aStateMachine.AddToken( "@suspicious",
474 nTok_at_suspicious, A_nAtTagDefStatus, finAtTag );
475 aStateMachine.AddToken( "@missing", nTok_at_missing, A_nAtTagDefStatus, finAtTag );
476 aStateMachine.AddToken( "@incomplete",
477 nTok_at_incomplete, A_nAtTagDefStatus, finAtTag );
478 aStateMachine.AddToken( "@version", nTok_at_version, A_nAtTagDefStatus, finAtTag );
479 aStateMachine.AddToken( "@guarantees",
480 nTok_at_guarantees, A_nAtTagDefStatus, finAtTag );
481 aStateMachine.AddToken( "@exception",
482 nTok_at_exception, A_nAtTagDefStatus, finAtTag );
484 aStateMachine.AddToken( "<", 0, A_nHtmlDefStatus, goto_EoHtml );
485 aStateMachine.AddToken( "*", 0, A_nPunctDefStatus, goto_CheckStar );
486 // aStateMachine.AddToken( ",", 0, A_nPunctDefStatus, finComma );
488 aStateMachine.AddToken( "<type", nTok_link_typeB, A_nHtmlDefStatus, goto_EoXmlLink_BeginTag );
489 aStateMachine.AddToken( "</type", nTok_link_typeE, A_nHtmlDefStatus, goto_EoXmlLink_EndTag );
490 aStateMachine.AddToken( "<member", nTok_link_memberB, A_nHtmlDefStatus, goto_EoXmlLink_BeginTag );
491 aStateMachine.AddToken( "</member", nTok_link_membeE, A_nHtmlDefStatus, goto_EoXmlLink_EndTag );
492 aStateMachine.AddToken( "<const", nTok_link_constB, A_nHtmlDefStatus, goto_EoXmlLink_BeginTag );
493 aStateMachine.AddToken( "</const", nTok_link_constE, A_nHtmlDefStatus, goto_EoXmlLink_EndTag );
495 aStateMachine.AddToken( "<listing", nTok_format_listingB,A_nHtmlDefStatus, goto_EoXmlFormat_BeginTag );
496 aStateMachine.AddToken( "</listing",nTok_format_listingE,A_nHtmlDefStatus, goto_EoXmlFormat_EndTag );
497 aStateMachine.AddToken( "<code", nTok_format_codeB, A_nHtmlDefStatus, goto_EoXmlFormat_BeginTag );
498 aStateMachine.AddToken( "</code", nTok_format_codeE, A_nHtmlDefStatus, goto_EoXmlFormat_EndTag );
499 aStateMachine.AddToken( "<atom", nTok_format_atomB, A_nHtmlDefStatus, goto_EoXmlFormat_BeginTag );
500 aStateMachine.AddToken( "</atom", nTok_format_atomE, A_nHtmlDefStatus, goto_EoXmlFormat_EndTag );
502 aStateMachine.AddToken( "<TRUE/", nTok_const_TRUE, A_nHtmlDefStatus, goto_EoXmlConst );
503 aStateMachine.AddToken( "<true/", nTok_const_TRUE, A_nHtmlDefStatus, goto_EoXmlConst );
504 aStateMachine.AddToken( "<FALSE/", nTok_const_FALSE, A_nHtmlDefStatus, goto_EoXmlConst );
505 aStateMachine.AddToken( "<false/", nTok_const_FALSE, A_nHtmlDefStatus, goto_EoXmlConst );
506 aStateMachine.AddToken( "<NULL/", nTok_const_NULL, A_nHtmlDefStatus, goto_EoXmlConst );
507 aStateMachine.AddToken( "<void/", nTok_const_void, A_nHtmlDefStatus, goto_EoXmlConst );
509 aStateMachine.AddToken( "<p", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
510 aStateMachine.AddToken( "<pre", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
511 aStateMachine.AddToken( "<dl", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
512 aStateMachine.AddToken( "<ul", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
513 aStateMachine.AddToken( "<ol", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
514 aStateMachine.AddToken( "<table", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
515 aStateMachine.AddToken( "<P", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
516 aStateMachine.AddToken( "<PRE", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
517 aStateMachine.AddToken( "<DL", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
518 aStateMachine.AddToken( "<UL", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
519 aStateMachine.AddToken( "<OL", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
520 aStateMachine.AddToken( "<TABLE", nTok_html_parastart, A_nHtmlDefStatus, goto_EoHtml );
522 aStateMachine.AddToken( "\r\n", nTok_EOL, A_nPunctDefStatus, finEndSign );
523 aStateMachine.AddToken( "\n", nTok_EOL, A_nPunctDefStatus, finEndSign );
524 aStateMachine.AddToken( "\r", nTok_EOL, A_nPunctDefStatus, finEndSign );
527 void
528 Context_Docu::SetMode_IsMultiLine( bool i_bTrue )
530 bIsMultiline = i_bTrue;
534 } // namespace dsapi
535 } // namespace csi