Classes | Enumerations | Functions | Variables
doctokenizer.h File Reference
#include <qcstring.h>
#include <qlist.h>
#include <stdio.h>
#include "htmlattrib.h"

Go to the source code of this file.

Classes

struct  TokenInfo
 Data associated with a token used by the comment block parser. More...
 

Enumerations

enum  Tokens {
  TK_WORD = 1, TK_LNKWORD = 2, TK_WHITESPACE = 3, TK_LISTITEM = 4,
  TK_ENDLIST = 5, TK_COMMAND = 6, TK_HTMLTAG = 7, TK_SYMBOL = 8,
  TK_NEWPARA = 9, TK_RCSTAG = 10, TK_URL = 11, RetVal_OK = 0x10000,
  RetVal_SimpleSec = 0x10001, RetVal_ListItem = 0x10002, RetVal_Section = 0x10003, RetVal_Subsection = 0x10004,
  RetVal_Subsubsection = 0x10005, RetVal_Paragraph = 0x10006, RetVal_SubParagraph = 0x10007, RetVal_EndList = 0x10008,
  RetVal_EndPre = 0x10009, RetVal_DescData = 0x1000A, RetVal_DescTitle = 0x1000B, RetVal_EndDesc = 0x1000C,
  RetVal_TableRow = 0x1000D, RetVal_TableCell = 0x1000E, RetVal_TableHCell = 0x1000F, RetVal_EndTable = 0x10010,
  RetVal_Internal = 0x10011, RetVal_SwitchLang = 0x10012, RetVal_CloseXml = 0x10013, RetVal_EndBlockQuote = 0x10014,
  RetVal_CopyDoc = 0x10015, RetVal_EndInternal = 0x10016, RetVal_EndParBlock = 0x10017
}
 

Functions

const char * tokToString (int token)
 
void doctokenizerYYFindSections (const char *input, Definition *d, MemberGroup *mg, const char *fileName)
 
void doctokenizerYYinit (const char *input, const char *fileName)
 
void doctokenizerYYcleanup ()
 
void doctokenizerYYpushContext ()
 
bool doctokenizerYYpopContext ()
 
int doctokenizerYYlex ()
 
void doctokenizerYYsetStatePara ()
 
void doctokenizerYYsetStateTitle ()
 
void doctokenizerYYsetStateTitleAttrValue ()
 
void doctokenizerYYsetStateCode ()
 
void doctokenizerYYsetStateXmlCode ()
 
void doctokenizerYYsetStateHtmlOnly ()
 
void doctokenizerYYsetStateManOnly ()
 
void doctokenizerYYsetStateLatexOnly ()
 
void doctokenizerYYsetStateXmlOnly ()
 
void doctokenizerYYsetStateDbOnly ()
 
void doctokenizerYYsetStateRtfOnly ()
 
void doctokenizerYYsetStateVerbatim ()
 
void doctokenizerYYsetStateDot ()
 
void doctokenizerYYsetStateMsc ()
 
void doctokenizerYYsetStateParam ()
 
void doctokenizerYYsetStateXRefItem ()
 
void doctokenizerYYsetStateFile ()
 
void doctokenizerYYsetStatePattern ()
 
void doctokenizerYYsetStateLink ()
 
void doctokenizerYYsetStateCite ()
 
void doctokenizerYYsetStateRef ()
 
void doctokenizerYYsetStateInternalRef ()
 
void doctokenizerYYsetStateText ()
 
void doctokenizerYYsetStateSkipTitle ()
 
void doctokenizerYYsetStateAnchor ()
 
void doctokenizerYYsetInsidePre (bool b)
 
void doctokenizerYYpushBackHtmlTag (const char *tag)
 
void doctokenizerYYsetStateSnippet ()
 
void doctokenizerYYstartAutoList ()
 
void doctokenizerYYendAutoList ()
 
void doctokenizerYYsetStatePlantUML ()
 
void doctokenizerYYsetStateSetScope ()
 
void doctokenizerYYsetStatePlantUMLOpt ()
 

Variables

TokenInfog_token
 
int doctokenizerYYlineno
 
FILE * doctokenizerYYin
 

Enumeration Type Documentation

enum Tokens
Enumerator
TK_WORD 
TK_LNKWORD 
TK_WHITESPACE 
TK_LISTITEM 
TK_ENDLIST 
TK_COMMAND 
TK_HTMLTAG 
TK_SYMBOL 
TK_NEWPARA 
TK_RCSTAG 
TK_URL 
RetVal_OK 
RetVal_SimpleSec 
RetVal_ListItem 
RetVal_Section 
RetVal_Subsection 
RetVal_Subsubsection 
RetVal_Paragraph 
RetVal_SubParagraph 
RetVal_EndList 
RetVal_EndPre 
RetVal_DescData 
RetVal_DescTitle 
RetVal_EndDesc 
RetVal_TableRow 
RetVal_TableCell 
RetVal_TableHCell 
RetVal_EndTable 
RetVal_Internal 
RetVal_SwitchLang 
RetVal_CloseXml 
RetVal_EndBlockQuote 
RetVal_CopyDoc 
RetVal_EndInternal 
RetVal_EndParBlock 

Definition at line 30 of file doctokenizer.h.

31 {
32  TK_WORD = 1,
33  TK_LNKWORD = 2,
34  TK_WHITESPACE = 3,
35  TK_LISTITEM = 4,
36  TK_ENDLIST = 5,
37  TK_COMMAND = 6,
38  TK_HTMLTAG = 7,
39  TK_SYMBOL = 8,
40  TK_NEWPARA = 9,
41  TK_RCSTAG = 10,
42  TK_URL = 11,
43 
44  RetVal_OK = 0x10000,
45  RetVal_SimpleSec = 0x10001,
46  RetVal_ListItem = 0x10002,
47  RetVal_Section = 0x10003,
48  RetVal_Subsection = 0x10004,
49  RetVal_Subsubsection = 0x10005,
50  RetVal_Paragraph = 0x10006,
51  RetVal_SubParagraph = 0x10007,
52  RetVal_EndList = 0x10008,
53  RetVal_EndPre = 0x10009,
54  RetVal_DescData = 0x1000A,
55  RetVal_DescTitle = 0x1000B,
56  RetVal_EndDesc = 0x1000C,
57  RetVal_TableRow = 0x1000D,
58  RetVal_TableCell = 0x1000E,
59  RetVal_TableHCell = 0x1000F,
60  RetVal_EndTable = 0x10010,
61  RetVal_Internal = 0x10011,
62  RetVal_SwitchLang = 0x10012,
63  RetVal_CloseXml = 0x10013,
64  RetVal_EndBlockQuote = 0x10014,
65  RetVal_CopyDoc = 0x10015,
66  RetVal_EndInternal = 0x10016,
67  RetVal_EndParBlock = 0x10017
68 };

Function Documentation

void doctokenizerYYcleanup ( )

Definition at line 82729 of file doctokenizer.cpp.

82730 {
82732 }
#define YY_CURRENT_BUFFER
void doctokenizerYY_delete_buffer(YY_BUFFER_STATE b)
void doctokenizerYYendAutoList ( )

Definition at line 82756 of file doctokenizer.cpp.

82757 {
82758  g_autoListLevel--;
82759 }
static int g_autoListLevel
void doctokenizerYYFindSections ( const char *  input,
Definition d,
MemberGroup mg,
const char *  fileName 
)

Definition at line 82540 of file doctokenizer.cpp.

82542 {
82543  if (input==0) return;
82545  g_inputString = input;
82546  //printf("parsing --->`%s'<---\n",input);
82547  g_inputPos = 0;
82548  g_definition = d;
82549  g_memberGroup = mg;
82550  g_fileName = fileName;
82551  BEGIN(St_Sections);
82555 }
int doctokenizerYY_flex_debug
static MemberGroup * g_memberGroup
void printlex(int dbg, bool enter, const char *lexName, const char *fileName)
Definition: message.cpp:242
int doctokenizerYYlineno
const bool FALSE
Definition: qglobal.h:370
static const char * g_inputString
static int g_inputPos
static constexpr double mg
Definition: Units.h:145
#define St_Sections
int doctokenizerYYlex(void)
static QCString g_fileName
static int input(void)
Definition: code.cpp:15695
fileName
Definition: dumpTree.py:9
static Definition * g_definition
#define BEGIN
const bool TRUE
Definition: qglobal.h:371
void doctokenizerYYinit ( const char *  input,
const char *  fileName 
)

Definition at line 82557 of file doctokenizer.cpp.

82558 {
82559  g_autoListLevel = 0;
82560  g_inputString = input;
82561  g_inputPos = 0;
82562  g_fileName = fileName;
82563  g_insidePre = FALSE;
82564  BEGIN(St_Para);
82565 }
#define St_Para
const bool FALSE
Definition: qglobal.h:370
static const char * g_inputString
static int g_inputPos
static QCString g_fileName
static int input(void)
Definition: code.cpp:15695
fileName
Definition: dumpTree.py:9
static bool g_insidePre
#define BEGIN
static int g_autoListLevel
int doctokenizerYYlex ( )
bool doctokenizerYYpopContext ( )

Definition at line 79199 of file doctokenizer.cpp.

79200 {
79201  if (g_lexerStack.isEmpty()) return FALSE;
79202  DocLexerContext *ctx = g_lexerStack.pop();
79204  g_inputPos = ctx->inputPos;
79205  g_inputString = ctx->inputString;
79208  BEGIN(ctx->rule);
79209  delete ctx;
79210  return TRUE;
79211 }
#define YY_CURRENT_BUFFER
static QStack< DocLexerContext > g_lexerStack
const char * inputString
const bool FALSE
Definition: qglobal.h:370
static const char * g_inputString
static int g_inputPos
void doctokenizerYY_delete_buffer(YY_BUFFER_STATE b)
YY_BUFFER_STATE state
#define BEGIN
void doctokenizerYY_switch_to_buffer(YY_BUFFER_STATE new_buffer)
static int g_autoListLevel
const bool TRUE
Definition: qglobal.h:371
void doctokenizerYYpushBackHtmlTag ( const char *  tag)

Definition at line 82739 of file doctokenizer.cpp.

82740 {
82741  QCString tagName = tag;
82742  int i,l = tagName.length();
82743  unput('>');
82744  for (i=l-1;i>=0;i--)
82745  {
82746  unput(tag[i]);
82747  }
82748  unput('<');
82749 }
uint length() const
Definition: qcstring.h:195
#define unput(c)
static QStrList * l
Definition: config.cpp:1044
void doctokenizerYYpushContext ( )

Definition at line 79186 of file doctokenizer.cpp.

79187 {
79188  DocLexerContext *ctx = new DocLexerContext;
79189  ctx->rule = YY_START;
79191  ctx->token = g_token;
79192  ctx->inputPos = g_inputPos;
79193  ctx->inputString = g_inputString;
79194  ctx->state = YY_CURRENT_BUFFER;
79195  g_lexerStack.push(ctx);
79197 }
#define YY_CURRENT_BUFFER
static QStack< DocLexerContext > g_lexerStack
YY_BUFFER_STATE doctokenizerYY_create_buffer(FILE *file, int size)
const char * inputString
static const char * g_inputString
static int g_inputPos
FILE * doctokenizerYYin
TokenInfo * g_token
#define YY_BUF_SIZE
YY_BUFFER_STATE state
void doctokenizerYY_switch_to_buffer(YY_BUFFER_STATE new_buffer)
static int g_autoListLevel
#define YY_START
void doctokenizerYYsetInsidePre ( bool  b)

Definition at line 82734 of file doctokenizer.cpp.

82735 {
82736  g_insidePre = b;
82737 }
static bool g_insidePre
static bool * b
Definition: config.cpp:1043
void doctokenizerYYsetStateAnchor ( )

Definition at line 82714 of file doctokenizer.cpp.

82715 {
82716  BEGIN(St_Anchor);
82717 }
#define St_Anchor
#define BEGIN
void doctokenizerYYsetStateCite ( )

Definition at line 82689 of file doctokenizer.cpp.

82690 {
82691  BEGIN(St_Cite);
82692 }
#define BEGIN
#define St_Cite
void doctokenizerYYsetStateCode ( )

Definition at line 82582 of file doctokenizer.cpp.

82583 {
82584  g_token->verb="";
82585  g_token->name="";
82586  BEGIN(St_CodeOpt);
82587 }
TokenInfo * g_token
#define BEGIN
QCString verb
Definition: doctokenizer.h:96
QCString name
Definition: doctokenizer.h:77
#define St_CodeOpt
void doctokenizerYYsetStateDbOnly ( )

Definition at line 82621 of file doctokenizer.cpp.

82622 {
82623  g_token->verb="";
82624  BEGIN(St_DbOnly);
82625 }
TokenInfo * g_token
#define BEGIN
QCString verb
Definition: doctokenizer.h:96
#define St_DbOnly
void doctokenizerYYsetStateDot ( )

Definition at line 82639 of file doctokenizer.cpp.

82640 {
82641  g_token->verb="";
82642  BEGIN(St_Dot);
82643 }
TokenInfo * g_token
#define BEGIN
QCString verb
Definition: doctokenizer.h:96
#define St_Dot
void doctokenizerYYsetStateFile ( )

Definition at line 82674 of file doctokenizer.cpp.

82675 {
82676  BEGIN(St_File);
82677 }
#define St_File
#define BEGIN
void doctokenizerYYsetStateHtmlOnly ( )

Definition at line 82596 of file doctokenizer.cpp.

82597 {
82598  g_token->verb="";
82599  g_token->name="";
82601 }
#define St_HtmlOnlyOption
TokenInfo * g_token
#define BEGIN
QCString verb
Definition: doctokenizer.h:96
QCString name
Definition: doctokenizer.h:77
void doctokenizerYYsetStateInternalRef ( )

Definition at line 82699 of file doctokenizer.cpp.

82700 {
82701  BEGIN(St_IntRef);
82702 }
#define St_IntRef
#define BEGIN
void doctokenizerYYsetStateLatexOnly ( )

Definition at line 82627 of file doctokenizer.cpp.

82628 {
82629  g_token->verb="";
82631 }
TokenInfo * g_token
#define St_LatexOnly
#define BEGIN
QCString verb
Definition: doctokenizer.h:96
void doctokenizerYYsetStateLink ( )

Definition at line 82684 of file doctokenizer.cpp.

82685 {
82686  BEGIN(St_Link);
82687 }
#define BEGIN
#define St_Link
void doctokenizerYYsetStateManOnly ( )

Definition at line 82603 of file doctokenizer.cpp.

82604 {
82605  g_token->verb="";
82606  BEGIN(St_ManOnly);
82607 }
#define St_ManOnly
TokenInfo * g_token
#define BEGIN
QCString verb
Definition: doctokenizer.h:96
void doctokenizerYYsetStateMsc ( )

Definition at line 82645 of file doctokenizer.cpp.

82646 {
82647  g_token->verb="";
82648  BEGIN(St_Msc);
82649 }
TokenInfo * g_token
#define St_Msc
#define BEGIN
QCString verb
Definition: doctokenizer.h:96
void doctokenizerYYsetStatePara ( )

Definition at line 82567 of file doctokenizer.cpp.

82568 {
82569  BEGIN(St_Para);
82570 }
#define St_Para
#define BEGIN
void doctokenizerYYsetStateParam ( )

Definition at line 82664 of file doctokenizer.cpp.

82665 {
82666  BEGIN(St_Param);
82667 }
#define BEGIN
#define St_Param
void doctokenizerYYsetStatePattern ( )

Definition at line 82679 of file doctokenizer.cpp.

82680 {
82681  BEGIN(St_Pattern);
82682 }
#define St_Pattern
#define BEGIN
void doctokenizerYYsetStatePlantUML ( )

Definition at line 82658 of file doctokenizer.cpp.

82659 {
82660  g_token->verb="";
82661  BEGIN(St_PlantUML);
82662 }
TokenInfo * g_token
#define BEGIN
QCString verb
Definition: doctokenizer.h:96
#define St_PlantUML
void doctokenizerYYsetStatePlantUMLOpt ( )

Definition at line 82651 of file doctokenizer.cpp.

82652 {
82653  g_token->verb="";
82654  g_token->sectionId="";
82656 }
QCString sectionId
Definition: doctokenizer.h:89
TokenInfo * g_token
#define BEGIN
QCString verb
Definition: doctokenizer.h:96
#define St_PlantUMLOpt
void doctokenizerYYsetStateRef ( )

Definition at line 82694 of file doctokenizer.cpp.

82695 {
82696  BEGIN(St_Ref);
82697 }
#define St_Ref
#define BEGIN
void doctokenizerYYsetStateRtfOnly ( )

Definition at line 82609 of file doctokenizer.cpp.

82610 {
82611  g_token->verb="";
82612  BEGIN(St_RtfOnly);
82613 }
TokenInfo * g_token
#define St_RtfOnly
#define BEGIN
QCString verb
Definition: doctokenizer.h:96
void doctokenizerYYsetStateSetScope ( )

Definition at line 82724 of file doctokenizer.cpp.

82725 {
82726  BEGIN(St_SetScope);
82727 }
#define St_SetScope
#define BEGIN
void doctokenizerYYsetStateSkipTitle ( )

Definition at line 82709 of file doctokenizer.cpp.

82710 {
82712 }
#define St_SkipTitle
#define BEGIN
void doctokenizerYYsetStateSnippet ( )

Definition at line 82719 of file doctokenizer.cpp.

82720 {
82721  BEGIN(St_Snippet);
82722 }
#define St_Snippet
#define BEGIN
void doctokenizerYYsetStateText ( )

Definition at line 82704 of file doctokenizer.cpp.

82705 {
82706  BEGIN(St_Text);
82707 }
#define St_Text
#define BEGIN
void doctokenizerYYsetStateTitle ( )

Definition at line 82572 of file doctokenizer.cpp.

82573 {
82574  BEGIN(St_Title);
82575 }
#define BEGIN
#define St_Title
void doctokenizerYYsetStateTitleAttrValue ( )

Definition at line 82577 of file doctokenizer.cpp.

82578 {
82579  BEGIN(St_TitleV);
82580 }
#define BEGIN
#define St_TitleV
void doctokenizerYYsetStateVerbatim ( )

Definition at line 82633 of file doctokenizer.cpp.

82634 {
82635  g_token->verb="";
82636  BEGIN(St_Verbatim);
82637 }
TokenInfo * g_token
#define BEGIN
QCString verb
Definition: doctokenizer.h:96
#define St_Verbatim
void doctokenizerYYsetStateXmlCode ( )

Definition at line 82589 of file doctokenizer.cpp.

82590 {
82591  g_token->verb="";
82592  g_token->name="";
82593  BEGIN(St_XmlCode);
82594 }
TokenInfo * g_token
#define BEGIN
QCString verb
Definition: doctokenizer.h:96
QCString name
Definition: doctokenizer.h:77
#define St_XmlCode
void doctokenizerYYsetStateXmlOnly ( )

Definition at line 82615 of file doctokenizer.cpp.

82616 {
82617  g_token->verb="";
82618  BEGIN(St_XmlOnly);
82619 }
TokenInfo * g_token
#define St_XmlOnly
#define BEGIN
QCString verb
Definition: doctokenizer.h:96
void doctokenizerYYsetStateXRefItem ( )

Definition at line 82669 of file doctokenizer.cpp.

82670 {
82671  BEGIN(St_XRefItem);
82672 }
#define St_XRefItem
#define BEGIN
void doctokenizerYYstartAutoList ( )

Definition at line 82751 of file doctokenizer.cpp.

82752 {
82753  g_autoListLevel++;
82754 }
static int g_autoListLevel
const char* tokToString ( int  token)

Definition at line 79216 of file doctokenizer.cpp.

79217 {
79218  switch (token)
79219  {
79220  case 0: return "TK_EOF";
79221  case TK_WORD: return "TK_WORD";
79222  case TK_LNKWORD: return "TK_LNKWORD";
79223  case TK_WHITESPACE: return "TK_WHITESPACE";
79224  case TK_LISTITEM: return "TK_LISTITEM";
79225  case TK_ENDLIST: return "TK_ENDLIST";
79226  case TK_COMMAND: return "TK_COMMAND";
79227  case TK_HTMLTAG: return "TK_HTMLTAG";
79228  case TK_SYMBOL: return "TK_SYMBOL";
79229  case TK_NEWPARA: return "TK_NEWPARA";
79230  case TK_RCSTAG: return "TK_RCSTAG";
79231  case TK_URL: return "TK_URL";
79232  }
79233  return "ERROR";
79234 }

Variable Documentation

FILE* doctokenizerYYin
int doctokenizerYYlineno
TokenInfo* g_token

Definition at line 79156 of file doctokenizer.cpp.