Update ooo320-m1
[ooovba.git] / autodoc / source / parser / adoc / cx_a_std.cxx
blob88a1396b1f3f89d61f83fd62e3ef0e28dc15263a
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_a_std.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 <adoc/cx_a_std.hxx>
35 // NOT FULLY DEFINED SERVICES
36 #include <adoc/cx_a_sub.hxx>
37 #include <x_parse.hxx>
38 #include <tools/tkpchars.hxx>
39 #include <adoc/tk_attag.hxx>
40 #include <adoc/tk_docw.hxx>
41 #include <tokens/tokdeal.hxx>
45 namespace adoc {
48 const intt C_nStatusSize = 128;
49 const intt C_nCppInitialNrOfStati = 400;
52 const uintt nF_fin_Error = 1;
53 const uintt nF_fin_Ignore = 2;
54 const uintt nF_fin_LineStart = 3;
55 const uintt nF_fin_Eol = 4;
56 const uintt nF_fin_Eof = 5;
57 const uintt nF_fin_AnyWord = 6;
58 const uintt nF_fin_Whitespace = 7;
60 const uintt nF_goto_AtTag = 20;
61 const uintt nF_goto_CheckStar = 21;
63 DYN TextToken * TCF_DocWord(const char * text) { return new Tok_DocWord(text); }
65 DYN TextToken * TCF_atstd_ATT(const char * ) { return new Tok_at_std(ary::info::atid_ATT); }
66 DYN TextToken * TCF_atstd_author(const char * ) { return new Tok_at_std(ary::info::atid_author); }
67 DYN TextToken * TCF_atstd_change(const char * ) { return new Tok_at_std(ary::info::atid_change); }
68 DYN TextToken * TCF_atstd_collab(const char * ) { return new Tok_at_std(ary::info::atid_collab); }
69 DYN TextToken * TCF_atstd_contact(const char * ) { return new Tok_at_std(ary::info::atid_contact); }
70 DYN TextToken * TCF_atstd_copyright(const char * ) { return new Tok_at_std(ary::info::atid_copyright); }
71 DYN TextToken * TCF_atstd_descr(const char * ) { return new Tok_at_std(ary::info::atid_descr); }
72 DYN TextToken * TCF_atstd_docdate(const char * ) { return new Tok_at_std(ary::info::atid_docdate); }
73 DYN TextToken * TCF_atstd_derive(const char * ) { return new Tok_at_std(ary::info::atid_derive); }
74 DYN TextToken * TCF_atstd_instance(const char * ) { return new Tok_at_std(ary::info::atid_instance); }
75 DYN TextToken * TCF_atstd_life(const char * ) { return new Tok_at_std(ary::info::atid_life); }
76 DYN TextToken * TCF_atstd_multi(const char * ) { return new Tok_at_std(ary::info::atid_multi); }
77 DYN TextToken * TCF_atstd_onerror(const char * ) { return new Tok_at_std(ary::info::atid_onerror); }
78 DYN TextToken * TCF_atstd_persist(const char * ) { return new Tok_at_std(ary::info::atid_persist); }
79 DYN TextToken * TCF_atstd_postcond(const char * ) { return new Tok_at_std(ary::info::atid_postcond); }
80 DYN TextToken * TCF_atstd_precond(const char * ) { return new Tok_at_std(ary::info::atid_precond); }
81 DYN TextToken * TCF_atstd_responsibility(const char * ) { return new Tok_at_std(ary::info::atid_resp); }
82 DYN TextToken * TCF_atstd_return(const char * ) { return new Tok_at_std(ary::info::atid_return); }
83 DYN TextToken * TCF_atstd_short(const char * ) { return new Tok_at_std(ary::info::atid_short); }
84 DYN TextToken * TCF_atstd_todo(const char * ) { return new Tok_at_std(ary::info::atid_todo); }
85 DYN TextToken * TCF_atstd_version(const char * ) { return new Tok_at_std(ary::info::atid_version); }
87 DYN TextToken * TCF_at_base(const char *) { return new Tok_at_base; }
88 DYN TextToken * TCF_at_exception(const char *) { return new Tok_at_exception; }
89 DYN TextToken * TCF_at_impl(const char *) { return new Tok_at_impl; }
90 DYN TextToken * TCF_at_interface(const char *) { return new Tok_at_interface; }
91 DYN TextToken * TCF_at_key(const char *) { return new Tok_at_key; }
92 DYN TextToken * TCF_at_param(const char *) { return new Tok_at_param; }
93 DYN TextToken * TCF_at_see(const char *) { return new Tok_at_see; }
94 DYN TextToken * TCF_at_template(const char *) { return new Tok_at_template; }
95 DYN TextToken * TCF_at_internal(const char *) { return new Tok_at_internal; }
96 DYN TextToken * TCF_at_obsolete(const char *) { return new Tok_at_obsolete; }
97 DYN TextToken * TCF_at_module(const char *) { return new Tok_at_module; }
98 DYN TextToken * TCF_at_file(const char *) { return new Tok_at_file; }
99 DYN TextToken * TCF_at_gloss(const char *) { return new Tok_at_gloss; }
100 DYN TextToken * TCF_at_global(const char *) { return new Tok_at_global; }
101 DYN TextToken * TCF_at_include(const char *) { return new Tok_at_include; }
102 DYN TextToken * TCF_at_label(const char *) { return new Tok_at_label; }
103 DYN TextToken * TCF_at_since(const char *) { return new Tok_at_since; }
104 DYN TextToken * TCF_at_HTML(const char *) { return new Tok_at_HTML; }
105 DYN TextToken * TCF_at_NOHTML(const char *) { return new Tok_at_NOHTML; }
106 DYN TextToken * TCF_Whitespace(const char * i_sText);
107 DYN TextToken * TCF_EoDocu(const char *) { return new Tok_EoDocu; }
108 DYN TextToken * TCF_EoLine(const char *) { return new Tok_Eol; }
109 DYN TextToken * TCF_Eof(const char *) { return new Tok_Eof; }
114 Context_AdocStd::Context_AdocStd()
115 : aStateMachine(C_nStatusSize, C_nCppInitialNrOfStati),
116 pDealer(0),
117 pParentContext(0),
118 pFollowUpContext(0),
119 pCx_LineStart(0),
120 pCx_CheckStar(0),
121 pCx_AtTagCompletion(0),
122 pNewToken(0),
123 bIsMultiline(false)
125 pCx_LineStart = new Cx_LineStart(*this);
126 pCx_CheckStar = new Cx_CheckStar(*this);
127 pCx_AtTagCompletion = new Cx_AtTagCompletion(*this);
129 SetupStateMachine();
132 void
133 Context_AdocStd::SetParentContext( TkpContext & io_rParentContext,
134 const char * )
136 pFollowUpContext = pParentContext = &io_rParentContext;
137 pCx_CheckStar->Set_End_FollowUpContext(io_rParentContext);
140 Context_AdocStd::~Context_AdocStd()
144 void
145 Context_AdocStd::AssignDealer( TokenDealer & o_rDealer )
147 pDealer = &o_rDealer;
148 pCx_LineStart->AssignDealer(o_rDealer);
149 pCx_CheckStar->AssignDealer(o_rDealer);
150 pCx_AtTagCompletion->AssignDealer(o_rDealer);
153 void
154 Context_AdocStd::ReadCharChain( CharacterSource & io_rText )
156 csv_assert(pParentContext != 0);
157 pNewToken = 0;
159 TextToken::F_CRTOK fTokenCreateFunction = 0;
160 StmBoundsStatus & rBound = aStateMachine.GetCharChain(fTokenCreateFunction, io_rText);
162 // !!!
163 // The order of the next two lines is essential, because
164 // pFollowUpContext may be changed by PerformStatusFunction() also,
165 // which then MUST override the previous assignment.
166 pFollowUpContext = rBound.FollowUpContext();
167 PerformStatusFunction(rBound.StatusFunctionNr(), fTokenCreateFunction, io_rText);
170 bool
171 Context_AdocStd::PassNewToken()
173 if (pNewToken)
175 pNewToken.Release()->DealOut(*pDealer);
176 return true;
178 return false;
181 TkpContext &
182 Context_AdocStd::FollowUpContext()
184 csv_assert(pFollowUpContext != 0);
185 return *pFollowUpContext;
188 void
189 Context_AdocStd::PerformStatusFunction( uintt i_nStatusSignal,
190 F_CRTOK i_fTokenCreateFunction,
191 CharacterSource & io_rText )
193 switch (i_nStatusSignal)
195 case nF_fin_Error:
197 char cCC = io_rText.CurChar();
198 String sChar( &cCC, 1 );
199 throw X_Parser(X_Parser::x_InvalidChar, sChar, String ::Null_(), 0);
200 } // no break, because of throw
201 case nF_fin_Ignore:
202 io_rText.CutToken();
203 pNewToken = 0;
204 break;
205 case nF_fin_LineStart:
206 csv_assert(i_fTokenCreateFunction != 0);
207 pNewToken = (*i_fTokenCreateFunction)(io_rText.CutToken());
208 break;
209 case nF_fin_Eol:
210 io_rText.CutToken();
211 pDealer->Deal_Eol();
212 if ( bIsMultiline )
214 pNewToken = TCF_EoLine(0);
215 pFollowUpContext = pCx_LineStart.Ptr();
217 else
219 pNewToken = TCF_EoDocu(0);
220 pFollowUpContext = pParentContext;
222 break;
223 case nF_fin_Eof:
224 pNewToken = TCF_Eof(0);
225 break;
226 case nF_fin_AnyWord:
227 if (i_fTokenCreateFunction != 0)
228 pNewToken = (*i_fTokenCreateFunction)(io_rText.CutToken());
229 else
230 pNewToken = TCF_DocWord(io_rText.CutToken());
231 break;
232 case nF_fin_Whitespace:
233 pNewToken = TCF_Whitespace(io_rText.CutToken());
234 break;
235 case nF_goto_AtTag:
236 pNewToken = 0;
237 pCx_AtTagCompletion->SetCurToken(i_fTokenCreateFunction);
238 break;
239 case nF_goto_CheckStar:
240 pNewToken = 0;
241 pCx_CheckStar->SetCanBeEnd( bIsMultiline );
242 break;
243 default:
245 char cCC = io_rText.CurChar();
246 String sChar( &cCC, 1 );
247 throw X_Parser(X_Parser::x_InvalidChar, sChar, String::Null_(), 0);
249 } // end switch (i_nStatusSignal)
252 void
253 Context_AdocStd::SetupStateMachine()
255 // Besondere Array-Stati (kein Tokenabschluss oder Kontextwechsel):
256 // const INT16 bas = 0; // Base-Status
257 const INT16 wht = 1; // Whitespace-Status
258 const INT16 awd = 2; // Any-Word-Read-Status
260 // Kontextwechsel-Stati:
261 const INT16 goto_CheckStar = 3;
262 const INT16 goto_AtTag = 4;
264 // Tokenfinish-Stati:
265 const INT16 finError = 5;
266 // const INT16 finIgnore = 6;
267 const INT16 finEol = 7;
268 const INT16 finEof = 8;
269 const INT16 finAnyWord = 9;
270 const INT16 finWhitespace = 10;
272 // Konstanten zur Benutzung in der Tabelle:
273 const INT16 fof = finEof;
274 const INT16 err = finError;
275 const INT16 faw = finAnyWord;
276 // const INT16 fig = finIgnore;
277 const INT16 fwh = finWhitespace;
279 /// The '0's will be replaced by calls of AddToken().
281 const INT16 A_nTopStatus[C_nStatusSize] =
282 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
283 {fof,err,err,err,err,err,err,err,err,wht, 0,wht,wht, 0,err,err,
284 err,err,err,err,err,err,err,err,err,err,fof,err,err,err,err,err, // ... 31
285 wht,awd,awd,awd,awd,awd,awd,awd,awd,awd, 0,awd,awd,awd,awd,awd,
286 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 63
287 0,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
288 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 95
289 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
290 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd // ... 127
293 const INT16 A_nWhitespaceStatus[C_nStatusSize] =
294 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
295 {fof,err,err,err,err,err,err,err,err,wht,fwh,wht,wht,fwh,err,err,
296 err,err,err,err,err,err,err,err,err,err,fof,err,err,err,err,err, // ... 31
297 wht,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,
298 fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh, // ... 63
299 fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,
300 fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh, // ... 95
301 fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,
302 fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh // ... 127
305 const INT16 A_nWordStatus[C_nStatusSize] =
306 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
307 {faw,err,err,err,err,err,err,err,err,faw,faw,faw,faw,faw,err,err,
308 err,err,err,err,err,err,err,err,err,err,faw,err,err,err,err,err, // ... 31
309 faw,awd,awd,awd,awd,awd,awd,awd,awd,awd,faw,awd,awd,awd,awd,awd,
310 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 63
311 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
312 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 95
313 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
314 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd // ... 127
317 const INT16 A_nAtTagDefStatus[C_nStatusSize] =
318 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
319 {faw,err,err,err,err,err,err,err,err,faw,faw,faw,faw,faw,err,err,
320 err,err,err,err,err,err,err,err,err,err,faw,err,err,err,err,err, // ... 31
321 faw,awd,awd,awd,awd,awd,awd,awd,awd,awd,faw,awd,awd,awd,awd,awd,
322 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 63
323 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
324 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 95
325 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
326 awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd // ... 127
329 const INT16 A_nPunctDefStatus[C_nStatusSize] =
330 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
331 {err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
332 err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 16 ...
333 err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
334 err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 48 ...
335 err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
336 err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 80 ...
337 err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
338 err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err // 112 ...
341 DYN StmArrayStatus * dpStatusTop
342 = new StmArrayStatus( C_nStatusSize, A_nTopStatus, 0, true);
343 DYN StmArrayStatus * dpStatusWhite
344 = new StmArrayStatus( C_nStatusSize, A_nWhitespaceStatus, 0, true);
345 DYN StmArrayStatus * dpStatusWord
346 = new StmArrayStatus( C_nStatusSize, A_nWordStatus, TCF_DocWord, true);
348 DYN StmBoundsStatus * dpBst_goto_CheckStar
349 = new StmBoundsStatus( *this, *pCx_CheckStar, nF_goto_CheckStar, true );
350 DYN StmBoundsStatus * dpBst_goto_AtTag
351 = new StmBoundsStatus( *this, *pCx_AtTagCompletion, nF_goto_AtTag, true );
353 DYN StmBoundsStatus * dpBst_finError
354 = new StmBoundsStatus( *this, TkpContext::Null_(), nF_fin_Error, true );
355 DYN StmBoundsStatus * dpBst_finIgnore
356 = new StmBoundsStatus( *this, *this, nF_fin_Ignore, true);
357 DYN StmBoundsStatus * dpBst_finEol
358 = new StmBoundsStatus( *this, *pCx_LineStart, nF_fin_Eol, false);
359 DYN StmBoundsStatus * dpBst_finEof
360 = new StmBoundsStatus( *this, TkpContext::Null_(), nF_fin_Eof, false);
361 DYN StmBoundsStatus * dpBst_finAnyWord
362 = new StmBoundsStatus( *this, *this, nF_fin_AnyWord, true);
363 DYN StmBoundsStatus * dpBst_finWhitespace
364 = new StmBoundsStatus( *this, *this, nF_fin_Whitespace, true);
366 // dpMain aufbauen:
367 aStateMachine.AddStatus(dpStatusTop);
368 aStateMachine.AddStatus(dpStatusWhite);
369 aStateMachine.AddStatus(dpStatusWord);
371 aStateMachine.AddStatus(dpBst_goto_CheckStar);
372 aStateMachine.AddStatus(dpBst_goto_AtTag);
374 aStateMachine.AddStatus(dpBst_finError);
375 aStateMachine.AddStatus(dpBst_finIgnore);
376 aStateMachine.AddStatus(dpBst_finEol);
377 aStateMachine.AddStatus(dpBst_finEof);
378 aStateMachine.AddStatus(dpBst_finAnyWord);
379 aStateMachine.AddStatus(dpBst_finWhitespace);
381 aStateMachine.AddToken( "*", 0, A_nPunctDefStatus, goto_CheckStar );
382 aStateMachine.AddToken( "@ATT", TCF_atstd_ATT, A_nAtTagDefStatus, goto_AtTag );
383 aStateMachine.AddToken( "@att", TCF_atstd_ATT, A_nAtTagDefStatus, goto_AtTag );
384 aStateMachine.AddToken( "@ATTENTION",
385 TCF_atstd_ATT, A_nAtTagDefStatus, goto_AtTag );
386 aStateMachine.AddToken( "@attention",
387 TCF_atstd_ATT, A_nAtTagDefStatus, goto_AtTag );
388 aStateMachine.AddToken( "@author", TCF_atstd_author, A_nAtTagDefStatus, goto_AtTag );
389 aStateMachine.AddToken( "@change", TCF_atstd_change, A_nAtTagDefStatus, goto_AtTag );
390 aStateMachine.AddToken( "@collab", TCF_atstd_collab, A_nAtTagDefStatus, goto_AtTag );
391 aStateMachine.AddToken( "@collaborator",
392 TCF_atstd_collab, A_nAtTagDefStatus, goto_AtTag );
393 aStateMachine.AddToken( "@contact", TCF_atstd_contact, A_nAtTagDefStatus, goto_AtTag );
394 aStateMachine.AddToken( "@copyright",TCF_atstd_copyright, A_nAtTagDefStatus, goto_AtTag );
395 aStateMachine.AddToken( "@descr", TCF_atstd_descr, A_nAtTagDefStatus, goto_AtTag );
396 aStateMachine.AddToken( "@docdate", TCF_atstd_docdate, A_nAtTagDefStatus, goto_AtTag );
397 aStateMachine.AddToken( "@derive", TCF_atstd_derive, A_nAtTagDefStatus, goto_AtTag );
398 aStateMachine.AddToken( "@instance",TCF_atstd_instance, A_nAtTagDefStatus, goto_AtTag );
399 aStateMachine.AddToken( "@life", TCF_atstd_life, A_nAtTagDefStatus, goto_AtTag );
400 aStateMachine.AddToken( "@lifecycle",
401 TCF_atstd_life, A_nAtTagDefStatus, goto_AtTag );
402 aStateMachine.AddToken( "@multi", TCF_atstd_multi, A_nAtTagDefStatus, goto_AtTag );
403 aStateMachine.AddToken( "@multiplicity",
404 TCF_atstd_multi, A_nAtTagDefStatus, goto_AtTag );
405 aStateMachine.AddToken( "@onerror", TCF_atstd_onerror, A_nAtTagDefStatus, goto_AtTag );
406 aStateMachine.AddToken( "@persist", TCF_atstd_persist, A_nAtTagDefStatus, goto_AtTag );
407 aStateMachine.AddToken( "@postcond",TCF_atstd_postcond,A_nAtTagDefStatus, goto_AtTag );
408 aStateMachine.AddToken( "@precond", TCF_atstd_precond, A_nAtTagDefStatus, goto_AtTag );
409 aStateMachine.AddToken( "@resp", TCF_atstd_responsibility,
410 A_nAtTagDefStatus, goto_AtTag );
411 aStateMachine.AddToken( "@responsibility",
412 TCF_atstd_return, A_nAtTagDefStatus, goto_AtTag );
413 aStateMachine.AddToken( "@return", TCF_atstd_return, A_nAtTagDefStatus, goto_AtTag );
414 aStateMachine.AddToken( "@short", TCF_atstd_short, A_nAtTagDefStatus, goto_AtTag );
415 aStateMachine.AddToken( "@todo", TCF_atstd_todo, A_nAtTagDefStatus, goto_AtTag );
416 aStateMachine.AddToken( "@version", TCF_atstd_version, A_nAtTagDefStatus, goto_AtTag );
418 aStateMachine.AddToken( "@base", TCF_at_base, A_nAtTagDefStatus, goto_AtTag );
419 aStateMachine.AddToken( "@exception",TCF_at_exception, A_nAtTagDefStatus, goto_AtTag );
420 aStateMachine.AddToken( "@impl", TCF_at_impl, A_nAtTagDefStatus, goto_AtTag );
421 aStateMachine.AddToken( "@key", TCF_at_key, A_nAtTagDefStatus, goto_AtTag );
422 aStateMachine.AddToken( "@param", TCF_at_param, A_nAtTagDefStatus, goto_AtTag );
423 aStateMachine.AddToken( "@see", TCF_at_see, A_nAtTagDefStatus, goto_AtTag );
424 aStateMachine.AddToken( "@seealso", TCF_at_see, A_nAtTagDefStatus, goto_AtTag );
425 aStateMachine.AddToken( "@since", TCF_at_since, A_nAtTagDefStatus, goto_AtTag );
426 aStateMachine.AddToken( "@tpl", TCF_at_template, A_nAtTagDefStatus, goto_AtTag );
427 aStateMachine.AddToken( "@tplparam",
428 TCF_at_template, A_nAtTagDefStatus, goto_AtTag );
430 aStateMachine.AddToken( "@interface",TCF_at_interface, A_nAtTagDefStatus, goto_AtTag );
431 aStateMachine.AddToken( "@internal",TCF_at_internal, A_nAtTagDefStatus, goto_AtTag );
432 aStateMachine.AddToken( "@obsolete",TCF_at_obsolete, A_nAtTagDefStatus, goto_AtTag );
433 aStateMachine.AddToken( "@deprecated",TCF_at_obsolete, A_nAtTagDefStatus, goto_AtTag );
435 aStateMachine.AddToken( "@module", TCF_at_module, A_nAtTagDefStatus, goto_AtTag );
436 aStateMachine.AddToken( "@file", TCF_at_file, A_nAtTagDefStatus, goto_AtTag );
437 aStateMachine.AddToken( "@gloss", TCF_at_gloss, A_nAtTagDefStatus, goto_AtTag );
438 aStateMachine.AddToken( "@global#", TCF_at_global, A_nAtTagDefStatus, goto_AtTag );
439 aStateMachine.AddToken( "@include#",TCF_at_include, A_nAtTagDefStatus, goto_AtTag );
440 aStateMachine.AddToken( "@#", TCF_at_label, A_nAtTagDefStatus, goto_AtTag );
442 aStateMachine.AddToken( "@HTML", TCF_at_HTML, A_nAtTagDefStatus, goto_AtTag );
443 aStateMachine.AddToken( "@NOHTML", TCF_at_NOHTML, A_nAtTagDefStatus, goto_AtTag );
445 aStateMachine.AddToken( "\r\n", 0, A_nPunctDefStatus, finEol );
446 aStateMachine.AddToken( "\n", 0, A_nPunctDefStatus, finEol );
447 aStateMachine.AddToken( "\r", 0, A_nPunctDefStatus, finEol );
450 void
451 Context_AdocStd::SetMode_IsMultiLine( bool i_bTrue )
453 bIsMultiline = i_bTrue;
456 DYN TextToken *
457 TCF_Whitespace(const char * i_sText)
459 UINT8 nSize = static_cast<UINT8>(strlen(i_sText));
460 for ( const char * pTab = strchr(i_sText,'\t');
461 pTab != 0;
462 pTab = strchr(pTab+1,'\t') )
464 nSize += 3;
467 return new Tok_Whitespace(nSize);
471 } // namespace adoc
475 @ATT[ENTION]
476 @author
477 @change[s]
478 @collab[orators]
479 @contact
480 @copyright
481 @descr
482 @devstat[e]
483 @docdate
484 @derive
485 @instance
486 @life[cycle]
487 @multi[plicity]
488 @onerror
489 @persist[ence]
490 @postcond
491 @precond
492 @return
493 @short
494 @todo
496 @module
497 @file
498 @gloss[ary]
501 @base <BasisklassenName>
502 @exception <ExceptionName>
503 @impl[ements] <IDL-Construct>
504 @key[words]|[s]
505 @param <FunctionParameterName> [<Range of valid values>]
506 @see[also]
507 @templ[ate] <FormalTemplateParameterName>
509 @internal
510 @obsolete
512 @#<Label>
514 @global#<Label> Global comment.
515 @include#<Label>