Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/util/doxygen/src/doctokenizer.h

Source at commit 1322 created 12 years 8 months ago.
By meklort, Add doxygen to utils folder
1/******************************************************************************
2 *
3 * $Id: $
4 *
5 *
6 * Copyright (C) 1997-2011 by Dimitri van Heesch.
7 *
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.
13 *
14 * Documents produced by Doxygen are derivative works derived from the
15 * input used in their production; they are not affected by this license.
16 *
17 */
18
19#ifndef _DOCTOKENIZER_H
20#define _DOCTOKENIZER_H
21
22#include <qcstring.h>
23#include <qlist.h>
24#include "htmlattrib.h"
25
26class Definition;
27class MemberGroup;
28
29enum Tokens
30{
31 TK_WORD = 1,
32 TK_LNKWORD = 2,
33 TK_WHITESPACE = 3,
34 TK_LISTITEM = 4,
35 TK_ENDLIST = 5,
36 TK_COMMAND = 6,
37 TK_HTMLTAG = 7,
38 TK_SYMBOL = 8,
39 TK_NEWPARA = 9,
40 TK_RCSTAG = 10,
41 TK_URL = 11,
42
43 RetVal_OK = 0x10000,
44 RetVal_SimpleSec = 0x10001,
45 RetVal_ListItem = 0x10002,
46 RetVal_Section = 0x10003,
47 RetVal_Subsection = 0x10004,
48 RetVal_Subsubsection = 0x10005,
49 RetVal_Paragraph = 0x10006,
50 RetVal_SubParagraph = 0x10007,
51 RetVal_EndList = 0x10008,
52 RetVal_EndPre = 0x10009,
53 RetVal_DescData = 0x1000A,
54 RetVal_DescTitle = 0x1000B,
55 RetVal_EndDesc = 0x1000C,
56 RetVal_TableRow = 0x1000D,
57 RetVal_TableCell = 0x1000E,
58 RetVal_TableHCell = 0x1000F,
59 RetVal_EndTable = 0x10010,
60 RetVal_Internal = 0x10011,
61 RetVal_SwitchLang = 0x10012,
62 RetVal_CloseXml = 0x10013
63};
64
65struct TokenInfo
66{
67 // unknown token
68 char unknownChar;
69
70 // command token
71 QCString name;
72
73 // command text (RCS tag)
74 QCString text;
75
76 // comment blocks
77
78 // list token info
79 bool isEnumList;
80 int indent;
81
82 // sections
83 QCString sectionId;
84
85 // simple section
86 QCString simpleSectName;
87 QCString simpleSectText;
88
89 // verbatim fragment
90 QCString verb;
91
92 // xrefitem
93 int id;
94
95 // html tag
96 HtmlAttribList attribs;
97 bool endTag;
98 bool emptyTag;
99
100 // whitespace
101 QCString chars;
102
103 // url
104 bool isEMailAddr;
105
106 // param attributes
107 enum ParamDir { In=1, Out=2, InOut=3, Unspecified=0 };
108 ParamDir paramDir;
109};
110
111// globals
112extern TokenInfo *g_token;
113extern int doctokenizerYYlineno;
114extern FILE *doctokenizerYYin;
115
116// helper functions
117const char *tokToString(int token);
118
119// operations on the scanner
120void doctokenizerYYFindSections(const char *input,Definition *d,
121 MemberGroup *mg,const char *fileName);
122void doctokenizerYYinit(const char *input,const char *fileName);
123void doctokenizerYYcleanup();
124void doctokenizerYYpushContext();
125bool doctokenizerYYpopContext();
126int doctokenizerYYlex();
127void doctokenizerYYsetStatePara();
128void doctokenizerYYsetStateTitle();
129void doctokenizerYYsetStateTitleAttrValue();
130void doctokenizerYYsetStateCode();
131void doctokenizerYYsetStateXmlCode();
132void doctokenizerYYsetStateHtmlOnly();
133void doctokenizerYYsetStateManOnly();
134void doctokenizerYYsetStateLatexOnly();
135void doctokenizerYYsetStateXmlOnly();
136void doctokenizerYYsetStateVerbatim();
137void doctokenizerYYsetStateDot();
138void doctokenizerYYsetStateMsc();
139void doctokenizerYYsetStateParam();
140void doctokenizerYYsetStateXRefItem();
141void doctokenizerYYsetStateFile();
142void doctokenizerYYsetStatePattern();
143void doctokenizerYYsetStateLink();
144void doctokenizerYYsetStateRef();
145void doctokenizerYYsetStateInternalRef();
146void doctokenizerYYsetStateText();
147void doctokenizerYYsetStateSkipTitle();
148void doctokenizerYYsetInsidePre(bool b);
149void doctokenizerYYpushBackHtmlTag(const char *tag);
150
151#endif
152

Archive Download this file

Revision: 1322