1 /******************************************************************************
6 * Copyright (C) 1997-2015 by Dimitri van Heesch.
8 * Permission to use, copy, modify, and distribute this software and its
9 * documentation under the terms of the GNU General Public License is hereby
10 * granted. No representations are made about the suitability of this software
11 * for any purpose. It is provided "as is" without express or implied warranty.
12 * See the GNU General Public License for more details.
14 * Documents produced by Doxygen are derivative works derived from the
15 * input used in their production; they are not affected by this license.
19 #ifndef _DOCTOKENIZER_H
20 #define _DOCTOKENIZER_H
25 #include "htmlattrib.h"
37 TK_COMMAND_AT = 6, //! Command starting with `@`
43 TK_COMMAND_BS = 12, //! Command starting with `\`
46 RetVal_SimpleSec = 0x10001,
47 RetVal_ListItem = 0x10002,
48 RetVal_Section = 0x10003,
49 RetVal_Subsection = 0x10004,
50 RetVal_Subsubsection = 0x10005,
51 RetVal_Paragraph = 0x10006,
52 RetVal_SubParagraph = 0x10007,
53 RetVal_EndList = 0x10008,
54 RetVal_EndPre = 0x10009,
55 RetVal_DescData = 0x1000A,
56 RetVal_DescTitle = 0x1000B,
57 RetVal_EndDesc = 0x1000C,
58 RetVal_TableRow = 0x1000D,
59 RetVal_TableCell = 0x1000E,
60 RetVal_TableHCell = 0x1000F,
61 RetVal_EndTable = 0x10010,
62 RetVal_Internal = 0x10011,
63 RetVal_SwitchLang = 0x10012,
64 RetVal_CloseXml = 0x10013,
65 RetVal_EndBlockQuote = 0x10014,
66 RetVal_CopyDoc = 0x10015,
67 RetVal_EndInternal = 0x10016,
68 RetVal_EndParBlock = 0x10017
71 /** @brief Data associated with a token used by the comment block parser. */
80 // command text (RCS tag)
93 QCString simpleSectName;
94 QCString simpleSectText;
103 HtmlAttribList attribs;
114 enum ParamDir { In=1, Out=2, InOut=3, Unspecified=0 };
119 extern TokenInfo *g_token;
120 extern int doctokenizerYYlineno;
121 extern FILE *doctokenizerYYin;
124 const char *tokToString(int token);
126 // operations on the scanner
127 void doctokenizerYYFindSections(const char *input,Definition *d,
128 MemberGroup *mg,const char *fileName);
129 void doctokenizerYYinit(const char *input,const char *fileName);
130 void doctokenizerYYcleanup();
131 void doctokenizerYYpushContext();
132 bool doctokenizerYYpopContext();
133 int doctokenizerYYlex();
134 void doctokenizerYYsetStatePara();
135 void doctokenizerYYsetStateTitle();
136 void doctokenizerYYsetStateTitleAttrValue();
137 void doctokenizerYYsetStateCode();
138 void doctokenizerYYsetStateXmlCode();
139 void doctokenizerYYsetStateHtmlOnly();
140 void doctokenizerYYsetStateManOnly();
141 void doctokenizerYYsetStateLatexOnly();
142 void doctokenizerYYsetStateXmlOnly();
143 void doctokenizerYYsetStateDbOnly();
144 void doctokenizerYYsetStateRtfOnly();
145 void doctokenizerYYsetStateVerbatim();
146 void doctokenizerYYsetStateDot();
147 void doctokenizerYYsetStateMsc();
148 void doctokenizerYYsetStateParam();
149 void doctokenizerYYsetStateXRefItem();
150 void doctokenizerYYsetStateFile();
151 void doctokenizerYYsetStatePattern();
152 void doctokenizerYYsetStateLink();
153 void doctokenizerYYsetStateCite();
154 void doctokenizerYYsetStateRef();
155 void doctokenizerYYsetStateInternalRef();
156 void doctokenizerYYsetStateText();
157 void doctokenizerYYsetStateSkipTitle();
158 void doctokenizerYYsetStateAnchor();
159 void doctokenizerYYsetInsidePre(bool b);
160 void doctokenizerYYpushBackHtmlTag(const char *tag);
161 void doctokenizerYYsetStateSnippet();
162 void doctokenizerYYstartAutoList();
163 void doctokenizerYYendAutoList();
164 void doctokenizerYYsetStatePlantUML();
165 void doctokenizerYYsetStateSetScope();
166 void doctokenizerYYsetStatePlantUMLOpt();
167 void doctokenizerYYsetStateOptions();
168 void doctokenizerYYsetStateBlock();
169 void doctokenizerYYsetStateEmoji();