LCOV - code coverage report
Current view: top level - libreoffice/autodoc/source/parser_i/idoc - cx_dsapi.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 184 202 91.1 %
Date: 2012-12-27 Functions: 12 12 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include <precomp.h>
      21             : #include <s2_dsapi/cx_dsapi.hxx>
      22             : 
      23             : 
      24             : // NOT FULLY DEFINED SERVICES
      25             : #include <x_parse2.hxx>
      26             : #include <tools/tkpchars.hxx>
      27             : #include <s2_dsapi/tk_atag2.hxx>
      28             : #include <s2_dsapi/tk_docw2.hxx>
      29             : #include <s2_dsapi/tk_xml.hxx>
      30             : #include <s2_dsapi/cx_docu2.hxx>
      31             : #include <s2_dsapi/tokrecv.hxx>
      32             : 
      33             : 
      34             : namespace csi
      35             : {
      36             : namespace dsapi
      37             : {
      38             : 
      39             : 
      40             : const intt C_nStatusSize = 128;
      41             : const intt C_nCppInitialNrOfStati = 400;
      42             : 
      43             : 
      44             : const uintt nF_fin_Error = 1;
      45             : const uintt nF_fin_Ignore = 2;
      46             : const uintt nF_fin_Eof = 3;
      47             : const uintt nF_fin_AnyWord = 4;
      48             : const uintt nF_fin_AtTag = 5;
      49             : const uintt nF_fin_EndSign = 6;
      50             : const uintt nF_goto_EoHtml = 7;
      51             : const uintt nF_goto_EoXmlConst = 8;
      52             : const uintt nF_goto_EoXmlLink_BeginTag = 9;
      53             : const uintt nF_goto_EoXmlLink_EndTag = 10;
      54             : const uintt nF_goto_EoXmlFormat_BeginTag = 11;
      55             : const uintt nF_goto_EoXmlFormat_EndTag = 12;
      56             : const uintt nF_goto_CheckStar = 13;
      57             : const uintt nF_fin_Comma = 14;
      58             : const uintt nF_fin_White = 15;
      59             : 
      60             : const UINT16 nTok_at_author = 100 + Tok_AtTag::author;
      61             : const UINT16 nTok_at_see = 100 + Tok_AtTag::see;
      62             : const UINT16 nTok_at_param = 100 + Tok_AtTag::param;
      63             : const UINT16 nTok_at_return = 100 + Tok_AtTag::e_return;
      64             : const UINT16 nTok_at_throws = 100 + Tok_AtTag::e_throw;
      65             : const UINT16 nTok_at_example = 100 + Tok_AtTag::example;
      66             : const UINT16 nTok_at_deprecated = 100 + Tok_AtTag::deprecated;
      67             : const UINT16 nTok_at_suspicious = 100 + Tok_AtTag::suspicious;
      68             : const UINT16 nTok_at_missing = 100 + Tok_AtTag::missing;
      69             : const UINT16 nTok_at_incomplete = 100 + Tok_AtTag::incomplete;
      70             : const UINT16 nTok_at_version = 100 + Tok_AtTag::version;
      71             : const UINT16 nTok_at_guarantees = 100 + Tok_AtTag::guarantees;
      72             : const UINT16 nTok_at_exception = 100 + Tok_AtTag::exception;
      73             : const UINT16 nTok_at_since = 100 + Tok_AtTag::since;
      74             : 
      75             : const UINT16 nTok_const_TRUE = 200 + Tok_XmlConst::e_true;
      76             : const UINT16 nTok_const_FALSE = 200 + Tok_XmlConst::e_false;
      77             : const UINT16 nTok_const_NULL = 200 + Tok_XmlConst::e_null;
      78             : const UINT16 nTok_const_void = 200 + Tok_XmlConst::e_void;
      79             : 
      80             : const UINT16 nTok_link_typeB = 300 + Tok_XmlLink_BeginTag::type;
      81             : const UINT16 nTok_link_typeE = 325 + Tok_XmlLink_EndTag::type;
      82             : const UINT16 nTok_link_memberB = 300 + Tok_XmlLink_BeginTag::member;
      83             : const UINT16 nTok_link_membeE = 325 + Tok_XmlLink_EndTag::member;
      84             : const UINT16 nTok_link_constB = 300 + Tok_XmlLink_BeginTag::e_const;
      85             : const UINT16 nTok_link_constE = 325 + Tok_XmlLink_EndTag::e_const;
      86             : 
      87             : const UINT16 nTok_format_listingB = 350 + Tok_XmlFormat_BeginTag::listing;
      88             : const UINT16 nTok_format_listingE = 375 + Tok_XmlFormat_EndTag::listing;
      89             : const UINT16 nTok_format_codeB = 350 + Tok_XmlFormat_BeginTag::code;
      90             : const UINT16 nTok_format_codeE = 375 + Tok_XmlFormat_EndTag::code;
      91             : const UINT16 nTok_format_atomB = 350 + Tok_XmlFormat_BeginTag::atom;
      92             : const UINT16 nTok_format_atomE = 375 + Tok_XmlFormat_EndTag::atom;
      93             : 
      94             : 
      95             : const UINT16 nTok_html_parastart = 400;
      96             : 
      97             : const UINT16 nTok_MLDocuEnd = 501;
      98             : const UINT16 nTok_EOL = 502;
      99             : 
     100             : 
     101           3 : Context_Docu::Context_Docu( Token_Receiver & o_rReceiver )
     102             :     :   aStateMachine(C_nStatusSize, C_nCppInitialNrOfStati),
     103             :         pReceiver(&o_rReceiver),
     104             :         pParentContext(0),
     105             :         pCx_EoHtml(0),
     106             :         pCx_EoXmlConst(0),
     107             :         pCx_EoXmlLink_BeginTag(0),
     108             :         pCx_EoXmlLink_EndTag(0),
     109             :         pCx_EoXmlFormat_BeginTag(0),
     110             :         pCx_EoXmlFormat_EndTag(0),
     111             :         pCx_CheckStar(0),
     112             :         pNewToken(0),
     113             :         pFollowUpContext(0),
     114           3 :         bIsMultiline(false)
     115             : {
     116           3 :     pCx_EoHtml = new Cx_EoHtml(o_rReceiver, *this);
     117           3 :     pCx_EoXmlConst = new Cx_EoXmlConst(o_rReceiver, *this);
     118           3 :     pCx_EoXmlLink_BeginTag = new Cx_EoXmlLink_BeginTag(o_rReceiver, *this);
     119           3 :     pCx_EoXmlLink_EndTag = new Cx_EoXmlLink_EndTag(o_rReceiver, *this);
     120           3 :     pCx_EoXmlFormat_BeginTag = new Cx_EoXmlFormat_BeginTag(o_rReceiver, *this);
     121           3 :     pCx_EoXmlFormat_EndTag = new Cx_EoXmlFormat_EndTag(o_rReceiver, *this);
     122           3 :     pCx_CheckStar = new Cx_CheckStar(*pReceiver,*this);
     123             : 
     124           3 :     SetupStateMachine();
     125           3 : }
     126             : 
     127             : void
     128           3 : Context_Docu::SetParentContext( TkpContext & io_rParentContext,
     129             :                                 const char * )
     130             : {
     131           3 :     pFollowUpContext = pParentContext = &io_rParentContext;
     132           3 :     pCx_CheckStar->Set_End_FolloUpContext(io_rParentContext);
     133           3 : }
     134             : 
     135           6 : Context_Docu::~Context_Docu()
     136             : {
     137           6 : }
     138             : 
     139             : void
     140     1242910 : Context_Docu::ReadCharChain( CharacterSource & io_rText )
     141             : {
     142             :     csv_assert(pParentContext != 0);
     143             : 
     144     1242910 :     pNewToken = 0;
     145             : 
     146     1242910 :     UINT16 nTokenId = 0;
     147     1242910 :     StmBoundsStatu2 & rBound = aStateMachine.GetCharChain(nTokenId, io_rText);
     148             : 
     149             :     // !!!
     150             :     //   The order of the next two lines is essential, because
     151             :     //   pFollowUpContext may be changed by PerformStatusFunction() also,
     152             :     //   which then MUST override the previous assignment.
     153     1242909 :     pFollowUpContext = rBound.FollowUpContext();
     154     1242909 :     PerformStatusFunction(rBound.StatusFunctionNr(), nTokenId, io_rText);
     155     1242909 : }
     156             : 
     157             : bool
     158     1242909 : Context_Docu::PassNewToken()
     159             : {
     160     1242909 :     if (pNewToken)
     161             :     {
     162     1171189 :         pReceiver->Receive(*pNewToken.Release());
     163     1171189 :         return true;
     164             :     }
     165       71720 :     return false;
     166             : }
     167             : 
     168             : TkpContext &
     169     1242909 : Context_Docu::FollowUpContext()
     170             : {
     171             :     csv_assert(pFollowUpContext != 0);
     172     1242909 :     return *pFollowUpContext;
     173             : }
     174             : 
     175             : void
     176     1242909 : Context_Docu::PerformStatusFunction( uintt              i_nStatusSignal,
     177             :                                      UINT16             i_nTokenId,
     178             :                                      CharacterSource &  io_rText )
     179             : {
     180     1242909 :     switch (i_nStatusSignal)
     181             :     {
     182             :         case nF_fin_White:
     183      546612 :             io_rText.CutToken();
     184      546612 :             pNewToken = new Tok_White;
     185      546612 :             break;
     186             :         case nF_fin_Error:
     187           0 :             throw X_AutodocParser(X_AutodocParser::x_InvalidChar);
     188             :             // no break because of throw
     189             :         case nF_fin_Ignore:
     190           0 :             pNewToken = 0;
     191           0 :             io_rText.CutToken();
     192           0 :             break;
     193             :         case nF_fin_Eof:
     194           0 :             if (bIsMultiline)
     195           0 :                 throw X_AutodocParser(X_AutodocParser::x_UnexpectedEOF);
     196             :             else
     197           0 :                 io_rText.CutToken();
     198           0 :                 pNewToken = new Tok_EOF;
     199           0 :             break;
     200             :         case nF_fin_AnyWord:
     201      511757 :             pNewToken = new Tok_Word(io_rText.CutToken());
     202      511757 :             break;
     203             :         case nF_fin_AtTag:
     204       12344 :             io_rText.CutToken();
     205       12344 :             pNewToken = new Tok_AtTag( i_nTokenId - 100 );
     206       12344 :             break;
     207             :         case nF_fin_Comma:
     208           0 :             io_rText.CutToken();
     209           0 :             pNewToken = new Tok_Comma;
     210           0 :             break;
     211             :         case nF_fin_EndSign:
     212      100476 :             io_rText.CutToken();
     213      100476 :             switch (i_nTokenId)
     214             :             {
     215             :                 case nTok_MLDocuEnd:
     216           0 :                     if (bIsMultiline)
     217             :                     {
     218           0 :                         pNewToken = new Tok_DocuEnd;
     219           0 :                         pFollowUpContext = pParentContext;
     220             :                     }
     221             :                     else
     222             :                     {
     223           0 :                         pNewToken = new Tok_Word(io_rText.CutToken());
     224           0 :                         pFollowUpContext = this;
     225             :                     }
     226           0 :                     break;
     227             :                 case nTok_EOL:
     228      100476 :                     if (bIsMultiline)
     229             :                     {
     230       99573 :                         pNewToken = new Tok_EOL;
     231       99573 :                         pFollowUpContext = this;
     232             :                     }
     233             :                     else
     234             :                     {
     235         903 :                         pNewToken = new Tok_DocuEnd;
     236         903 :                         pFollowUpContext = pParentContext;
     237             :                     }
     238      100476 :                     pReceiver->Increment_CurLine();
     239      100476 :                     break;
     240             :                 default:
     241             :                     csv_assert(false);
     242             :             }
     243      100476 :             break;
     244             :         case nF_goto_EoHtml:
     245       27471 :             pCx_EoHtml->SetIfIsStartOfParagraph(i_nTokenId == nTok_html_parastart);
     246       27471 :             break;
     247             :         case nF_goto_EoXmlConst:
     248        1855 :             pCx_EoXmlConst->SetTokenId(i_nTokenId - 200);
     249        1855 :             break;
     250             :         case nF_goto_EoXmlLink_BeginTag:
     251        9570 :             pCx_EoXmlLink_BeginTag->SetTokenId(i_nTokenId - 300);
     252        9570 :             break;
     253             :         case nF_goto_EoXmlLink_EndTag:
     254        9561 :             pCx_EoXmlLink_EndTag->SetTokenId(i_nTokenId - 325);
     255        9561 :             break;
     256             :         case nF_goto_EoXmlFormat_BeginTag:
     257        1648 :             pCx_EoXmlFormat_BeginTag->SetTokenId(i_nTokenId - 350);
     258        1648 :             break;
     259             :         case nF_goto_EoXmlFormat_EndTag:
     260        1639 :             pCx_EoXmlFormat_EndTag->SetTokenId(i_nTokenId - 375);
     261        1639 :             break;
     262             :         case nF_goto_CheckStar:
     263       19976 :             pCx_CheckStar->SetIsEnd( bIsMultiline );
     264       19976 :             break;
     265             :         default:
     266             :             csv_assert(false);
     267             :     }   // end switch (i_nStatusSignal)
     268     1242909 : }
     269             : 
     270             : void
     271           3 : Context_Docu::SetupStateMachine()
     272             : {
     273             :     // special array statuses (no tokenfinish or change of context):
     274             : //  const INT16 bas = 0;        // base status
     275           3 :     const INT16 wht = 1;        // skip whitespace status
     276           3 :     const INT16 awd = 2;        // any word read status
     277             : 
     278             :     // change of context statuses:
     279           3 :     const INT16 goto_EoHtml = 3;
     280           3 :     const INT16 goto_EoXmlConst = 4;
     281           3 :     const INT16 goto_EoXmlLink_BeginTag = 5;
     282           3 :     const INT16 goto_EoXmlLink_EndTag = 6;
     283           3 :     const INT16 goto_EoXmlFormat_BeginTag = 7;
     284           3 :     const INT16 goto_EoXmlFormat_EndTag = 8;
     285           3 :     const INT16 goto_CheckStar = 9;
     286             : 
     287             :     // tokenfinish statuses:
     288           3 :     const INT16 finError = 10;
     289             : //  const INT16 finIgnore = 11;
     290           3 :     const INT16 finEof = 12;
     291           3 :     const INT16 finAnyWord = 13;
     292           3 :     const INT16 finAtTag = 14;
     293           3 :     const INT16 finEndSign = 15;
     294             : //  const INT16 finComma = 16;
     295           3 :     const INT16 finWhite = 17;
     296             : 
     297             :     // constants for use in the table:
     298           3 :     const INT16 ght = goto_EoHtml;
     299           3 :     const INT16 err = finError;
     300           3 :     const INT16 faw = finAnyWord;
     301             : //  const INT16 fig = finIgnore;
     302             : //  const INT16 fes = finEndSign;
     303           3 :     const INT16 fof = finEof;
     304             : //  const INT16 fat = finAtTag;
     305           3 :     const INT16 fwh = finWhite;
     306             : 
     307             :     /// The '0's  will be replaced by calls of AddToken().
     308             : 
     309             :     const INT16 A_nTopStatus[C_nStatusSize] =
     310             :     //  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
     311             :     {fof,err,err,err,err,err,err,err,err,wht,  0,wht,wht,  0,err,err,
     312             :      err,err,err,err,err,err,err,err,err,err,fof,err,err,err,err,err, // ... 31
     313             :      wht,awd,awd,awd,awd,awd,awd,awd,awd,awd,  0,awd,awd,awd,awd,awd,
     314             :      awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,  0,awd,awd,awd, // ... 63
     315             :        0,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
     316             :      awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 95
     317             :      awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
     318             :      awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd  // ... 127
     319           3 :     };
     320             : 
     321             :     const INT16 A_nWhitespaceStatus[C_nStatusSize] =
     322             :   //   0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
     323             :     {fof,err,err,err,err,err,err,err,err,wht,fwh,wht,wht,fwh,err,err,
     324             :      err,err,err,err,err,err,err,err,err,err,fof,err,err,err,err,err, // ... 31
     325             :      wht,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,
     326             :      fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh, // ... 63
     327             :      fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,
     328             :      fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh, // ... 95
     329             :      fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,
     330             :      fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh,fwh  // ... 127
     331           3 :     };
     332             : 
     333             :     const INT16 A_nWordStatus[C_nStatusSize] =
     334             :     //  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
     335             :     {faw,err,err,err,err,err,err,err,err,faw,faw,faw,faw,faw,err,err,
     336             :      err,err,err,err,err,err,err,err,err,err,faw,err,err,err,err,err, // ... 31
     337             :      faw,awd,awd,awd,awd,awd,awd,awd,awd,awd,faw,awd,awd,awd,awd,awd,
     338             :      awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,faw,awd,awd,awd, // ... 63
     339             :      faw,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
     340             :      awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 95
     341             :      awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
     342             :      awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd  // ... 127
     343           3 :     };
     344             : 
     345             :     const INT16 A_nAtTagDefStatus[C_nStatusSize] =
     346             :     //  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
     347             :     {faw,err,err,err,err,err,err,err,err,faw,faw,faw,faw,faw,err,err,
     348             :      err,err,err,err,err,err,err,err,err,err,faw,err,err,err,err,err, // ... 31
     349             :      faw,awd,awd,awd,awd,awd,awd,awd,awd,awd,faw,awd,awd,awd,awd,awd,
     350             :      awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,faw,awd,faw,awd,awd,awd, // ... 63
     351             :      awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
     352             :      awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd, // ... 95
     353             :      awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,
     354             :      awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd,awd  // ... 127
     355           3 :     };
     356             : 
     357             :     const INT16 A_nHtmlDefStatus[C_nStatusSize] =
     358             :     //  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
     359             :     {ght,err,err,err,err,err,err,err,err,ght,ght,ght,ght,ght,err,err,
     360             :      err,err,err,err,err,err,err,err,err,err,ght,err,err,err,err,err, // ... 31
     361             :      ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,
     362             :      ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght, // ... 63
     363             :      ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,
     364             :      ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght, // ... 95
     365             :      ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,
     366             :      ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght,ght  // ... 127
     367           3 :     };
     368             : 
     369             :     const INT16 A_nPunctDefStatus[C_nStatusSize] =
     370             :     //  0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15
     371             :     {err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
     372             :      err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 16 ...
     373             :      err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
     374             :      err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 48 ...
     375             :      err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
     376             :      err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err, // 80 ...
     377             :      err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,
     378             :      err,err,err,err,err,err,err,err,err,err,err,err,err,err,err,err  // 112 ...
     379           3 :     };
     380             : 
     381             :     DYN StmArrayStatu2 * dpStatusTop
     382           3 :             = new StmArrayStatu2( C_nStatusSize, A_nTopStatus, 0, true);
     383             :     DYN StmArrayStatu2 * dpStatusWhite
     384           3 :             = new StmArrayStatu2( C_nStatusSize, A_nWhitespaceStatus, 0, true);
     385             :     DYN StmArrayStatu2 * dpStatusWord
     386           3 :             = new StmArrayStatu2( C_nStatusSize, A_nWordStatus, 0, true);
     387             : 
     388             :     DYN StmBoundsStatu2 *   dpBst_goto_EoHtml
     389           3 :             = new StmBoundsStatu2( *pCx_EoHtml, nF_goto_EoHtml, true );
     390             :     DYN StmBoundsStatu2 *   dpBst_goto_EoXmlConst
     391           3 :             = new StmBoundsStatu2( *pCx_EoXmlConst, nF_goto_EoXmlConst, true );
     392             :     DYN StmBoundsStatu2 *   dpBst_goto_EoXmlLink_BeginTag
     393           3 :             = new StmBoundsStatu2( *pCx_EoXmlLink_BeginTag, nF_goto_EoXmlLink_BeginTag, true );
     394             :     DYN StmBoundsStatu2 *   dpBst_goto_EoXmlLink_EndTag
     395           3 :             = new StmBoundsStatu2( *pCx_EoXmlLink_EndTag, nF_goto_EoXmlLink_EndTag, true );
     396             :     DYN StmBoundsStatu2 *   dpBst_goto_EoXmlFormat_BeginTag
     397           3 :             = new StmBoundsStatu2( *pCx_EoXmlFormat_BeginTag, nF_goto_EoXmlFormat_BeginTag, true );
     398             :     DYN StmBoundsStatu2 *   dpBst_goto_EoXmlFormat_EndTag
     399           3 :             = new StmBoundsStatu2( *pCx_EoXmlFormat_EndTag, nF_goto_EoXmlFormat_EndTag, true );
     400             :     DYN StmBoundsStatu2 *   dpBst_goto_CheckStar
     401           3 :             = new StmBoundsStatu2( *pCx_CheckStar, nF_goto_CheckStar, true );
     402             : 
     403             : 
     404             :     DYN StmBoundsStatu2 *   dpBst_finError
     405           3 :             = new StmBoundsStatu2( TkpContext_Null2_(), nF_fin_Error, true );
     406             :     DYN StmBoundsStatu2 *   dpBst_finIgnore
     407           3 :             = new StmBoundsStatu2( *this, nF_fin_Ignore, true);
     408             :     DYN StmBoundsStatu2 *   dpBst_finEof
     409           3 :             = new StmBoundsStatu2( TkpContext_Null2_(), nF_fin_Eof, false);
     410             :     DYN StmBoundsStatu2 *   dpBst_finAnyWord
     411           3 :             = new StmBoundsStatu2( *this, nF_fin_AnyWord, true);
     412             :     DYN StmBoundsStatu2 *   dpBst_finAtTag
     413           3 :             = new StmBoundsStatu2( *this, nF_fin_AtTag, false);
     414             :     DYN StmBoundsStatu2 *   dpBst_finEndSign
     415           3 :             = new StmBoundsStatu2( *pParentContext, nF_fin_EndSign, false);
     416             :     DYN StmBoundsStatu2 *   dpBst_fin_Comma
     417           3 :             = new StmBoundsStatu2( *this, nF_fin_Comma, false );
     418             :     DYN StmBoundsStatu2 *   dpBst_finWhite
     419           3 :             = new StmBoundsStatu2( *this, nF_fin_White, false);
     420             : 
     421             : 
     422             :     // construct dpMain:
     423           3 :     aStateMachine.AddStatus(dpStatusTop);
     424           3 :     aStateMachine.AddStatus(dpStatusWhite);
     425           3 :     aStateMachine.AddStatus(dpStatusWord);
     426             : 
     427           3 :     aStateMachine.AddStatus(dpBst_goto_EoHtml);
     428           3 :     aStateMachine.AddStatus(dpBst_goto_EoXmlConst);
     429           3 :     aStateMachine.AddStatus(dpBst_goto_EoXmlLink_BeginTag);
     430           3 :     aStateMachine.AddStatus(dpBst_goto_EoXmlLink_EndTag);
     431           3 :     aStateMachine.AddStatus(dpBst_goto_EoXmlFormat_BeginTag);
     432           3 :     aStateMachine.AddStatus(dpBst_goto_EoXmlFormat_EndTag);
     433           3 :     aStateMachine.AddStatus(dpBst_goto_CheckStar);
     434             : 
     435           3 :     aStateMachine.AddStatus(dpBst_finError);
     436           3 :     aStateMachine.AddStatus(dpBst_finIgnore);
     437           3 :     aStateMachine.AddStatus(dpBst_finEof);
     438           3 :     aStateMachine.AddStatus(dpBst_finAnyWord);
     439           3 :     aStateMachine.AddStatus(dpBst_finAtTag);
     440           3 :     aStateMachine.AddStatus(dpBst_finEndSign);
     441           3 :     aStateMachine.AddStatus(dpBst_fin_Comma);
     442           3 :     aStateMachine.AddStatus(dpBst_finWhite);
     443             : 
     444             : 
     445           3 :     aStateMachine.AddToken( "@author",  nTok_at_author,      A_nAtTagDefStatus, finAtTag );
     446           3 :     aStateMachine.AddToken( "@param",   nTok_at_param,       A_nAtTagDefStatus, finAtTag );
     447           3 :     aStateMachine.AddToken( "@throws",  nTok_at_throws,      A_nAtTagDefStatus, finAtTag );
     448           3 :     aStateMachine.AddToken( "@see",     nTok_at_see,         A_nAtTagDefStatus, finAtTag );
     449           3 :     aStateMachine.AddToken( "@since",   nTok_at_since,       A_nAtTagDefStatus, finAtTag );
     450           3 :     aStateMachine.AddToken( "@example", nTok_at_example,     A_nAtTagDefStatus, finAtTag );
     451           3 :     aStateMachine.AddToken( "@return",  nTok_at_return,      A_nAtTagDefStatus, finAtTag );
     452           3 :     aStateMachine.AddToken( "@returns", nTok_at_return,      A_nAtTagDefStatus, finAtTag );
     453             :     aStateMachine.AddToken( "@deprecated",
     454           3 :                                         nTok_at_deprecated,  A_nAtTagDefStatus, finAtTag );
     455             :     aStateMachine.AddToken( "@suspicious",
     456           3 :                                         nTok_at_suspicious,  A_nAtTagDefStatus, finAtTag );
     457           3 :     aStateMachine.AddToken( "@missing", nTok_at_missing,     A_nAtTagDefStatus, finAtTag );
     458             :     aStateMachine.AddToken( "@incomplete",
     459           3 :                                         nTok_at_incomplete,  A_nAtTagDefStatus, finAtTag );
     460           3 :     aStateMachine.AddToken( "@version", nTok_at_version,     A_nAtTagDefStatus, finAtTag );
     461             :     aStateMachine.AddToken( "@guarantees",
     462           3 :                                         nTok_at_guarantees,  A_nAtTagDefStatus, finAtTag );
     463             :     aStateMachine.AddToken( "@exception",
     464           3 :                                         nTok_at_exception,   A_nAtTagDefStatus, finAtTag );
     465             : 
     466           3 :     aStateMachine.AddToken( "<",        0,                   A_nHtmlDefStatus,  goto_EoHtml );
     467           3 :     aStateMachine.AddToken( "*",        0,                   A_nPunctDefStatus, goto_CheckStar );
     468             : //  aStateMachine.AddToken( ",",        0,                   A_nPunctDefStatus, finComma );
     469             : 
     470           3 :     aStateMachine.AddToken( "<type",    nTok_link_typeB,     A_nHtmlDefStatus,  goto_EoXmlLink_BeginTag );
     471           3 :     aStateMachine.AddToken( "</type",   nTok_link_typeE,     A_nHtmlDefStatus,  goto_EoXmlLink_EndTag );
     472           3 :     aStateMachine.AddToken( "<member",  nTok_link_memberB,   A_nHtmlDefStatus,  goto_EoXmlLink_BeginTag );
     473           3 :     aStateMachine.AddToken( "</member", nTok_link_membeE,    A_nHtmlDefStatus,  goto_EoXmlLink_EndTag );
     474           3 :     aStateMachine.AddToken( "<const",   nTok_link_constB,    A_nHtmlDefStatus,  goto_EoXmlLink_BeginTag );
     475           3 :     aStateMachine.AddToken( "</const",  nTok_link_constE,    A_nHtmlDefStatus,  goto_EoXmlLink_EndTag );
     476             : 
     477           3 :     aStateMachine.AddToken( "<listing", nTok_format_listingB,A_nHtmlDefStatus,  goto_EoXmlFormat_BeginTag );
     478           3 :     aStateMachine.AddToken( "</listing",nTok_format_listingE,A_nHtmlDefStatus,  goto_EoXmlFormat_EndTag );
     479           3 :     aStateMachine.AddToken( "<code",    nTok_format_codeB,   A_nHtmlDefStatus,  goto_EoXmlFormat_BeginTag  );
     480           3 :     aStateMachine.AddToken( "</code",   nTok_format_codeE,   A_nHtmlDefStatus,  goto_EoXmlFormat_EndTag );
     481           3 :     aStateMachine.AddToken( "<atom",    nTok_format_atomB,   A_nHtmlDefStatus,  goto_EoXmlFormat_BeginTag  );
     482           3 :     aStateMachine.AddToken( "</atom",   nTok_format_atomE,   A_nHtmlDefStatus,  goto_EoXmlFormat_EndTag );
     483             : 
     484           3 :     aStateMachine.AddToken( "<TRUE/",   nTok_const_TRUE,     A_nHtmlDefStatus,  goto_EoXmlConst );
     485           3 :     aStateMachine.AddToken( "<true/",   nTok_const_TRUE,     A_nHtmlDefStatus,  goto_EoXmlConst );
     486           3 :     aStateMachine.AddToken( "<FALSE/",  nTok_const_FALSE,    A_nHtmlDefStatus,  goto_EoXmlConst );
     487           3 :     aStateMachine.AddToken( "<false/",  nTok_const_FALSE,    A_nHtmlDefStatus,  goto_EoXmlConst );
     488           3 :     aStateMachine.AddToken( "<NULL/",   nTok_const_NULL,     A_nHtmlDefStatus,  goto_EoXmlConst );
     489           3 :     aStateMachine.AddToken( "<void/",   nTok_const_void,     A_nHtmlDefStatus,  goto_EoXmlConst );
     490             : 
     491           3 :     aStateMachine.AddToken( "<p",       nTok_html_parastart, A_nHtmlDefStatus,  goto_EoHtml );
     492           3 :     aStateMachine.AddToken( "<pre",     nTok_html_parastart, A_nHtmlDefStatus,  goto_EoHtml );
     493           3 :     aStateMachine.AddToken( "<dl",      nTok_html_parastart, A_nHtmlDefStatus,  goto_EoHtml );
     494           3 :     aStateMachine.AddToken( "<ul",      nTok_html_parastart, A_nHtmlDefStatus,  goto_EoHtml );
     495           3 :     aStateMachine.AddToken( "<ol",      nTok_html_parastart, A_nHtmlDefStatus,  goto_EoHtml );
     496           3 :     aStateMachine.AddToken( "<table",   nTok_html_parastart, A_nHtmlDefStatus,  goto_EoHtml );
     497           3 :     aStateMachine.AddToken( "<P",       nTok_html_parastart, A_nHtmlDefStatus,  goto_EoHtml );
     498           3 :     aStateMachine.AddToken( "<PRE",     nTok_html_parastart, A_nHtmlDefStatus,  goto_EoHtml );
     499           3 :     aStateMachine.AddToken( "<DL",      nTok_html_parastart, A_nHtmlDefStatus,  goto_EoHtml );
     500           3 :     aStateMachine.AddToken( "<UL",      nTok_html_parastart, A_nHtmlDefStatus,  goto_EoHtml );
     501           3 :     aStateMachine.AddToken( "<OL",      nTok_html_parastart, A_nHtmlDefStatus,  goto_EoHtml );
     502           3 :     aStateMachine.AddToken( "<TABLE",   nTok_html_parastart, A_nHtmlDefStatus,  goto_EoHtml );
     503             : 
     504           3 :     aStateMachine.AddToken( "\r\n",     nTok_EOL,            A_nPunctDefStatus, finEndSign );
     505           3 :     aStateMachine.AddToken( "\n",       nTok_EOL,            A_nPunctDefStatus, finEndSign );
     506           3 :     aStateMachine.AddToken( "\r",       nTok_EOL,            A_nPunctDefStatus, finEndSign );
     507           3 : };
     508             : 
     509             : void
     510       19908 : Context_Docu::SetMode_IsMultiLine( bool i_bTrue )
     511             : {
     512       19908 :     bIsMultiline = i_bTrue;
     513       19908 : }
     514             : 
     515             : 
     516             : }   // namespace dsapi
     517           3 : }   // namespace csi
     518             : 
     519             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10