diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-08-04 20:55:47 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-08-04 20:55:47 (GMT) |
commit | 2e2f09d60ce079a1fe283e47bcf023de01f051c5 (patch) | |
tree | 8e54169bc0b7214246ec4c1dfe3f58228ef12928 /src/doctokenizer.h | |
parent | adac91e9a353095c3bae4b580d27b7cfd8617493 (diff) | |
download | Doxygen-2e2f09d60ce079a1fe283e47bcf023de01f051c5.zip Doxygen-2e2f09d60ce079a1fe283e47bcf023de01f051c5.tar.gz Doxygen-2e2f09d60ce079a1fe283e47bcf023de01f051c5.tar.bz2 |
Release-1.2.17-20020804
Diffstat (limited to 'src/doctokenizer.h')
-rw-r--r-- | src/doctokenizer.h | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/src/doctokenizer.h b/src/doctokenizer.h new file mode 100644 index 0000000..8e0abee --- /dev/null +++ b/src/doctokenizer.h @@ -0,0 +1,127 @@ +/****************************************************************************** + * + * + * + * + * Copyright (C) 1997-2002 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + * Documents produced by Doxygen are derivative works derived from the + * input used in their production; they are not affected by this license. + * + */ + +#ifndef _DOCTOKENIZER_H +#define _DOCTOKENIZER_H + +#include <qcstring.h> +#include <qlist.h> + +enum Tokens +{ + TK_WORD = 1, + TK_WHITESPACE = 2, + TK_LISTITEM = 3, + TK_ENDLIST = 4, + TK_COMMAND = 5, + TK_HTMLTAG = 6, + TK_SYMBOL = 7, + TK_NEWPARA = 8, + TK_RCSTAG = 9, + TK_URL = 10, + + RetVal_OK = 0x10000, + RetVal_SimpleSec = 0x10001, + RetVal_ListItem = 0x10002, + RetVal_Section = 0x10003, + RetVal_EndList = 0x10004, + RetVal_EndPre = 0x10005, + RetVal_DescData = 0x10006, + RetVal_DescTitle = 0x10007, + RetVal_EndDesc = 0x10008, + RetVal_TableRow = 0x10009, + RetVal_TableCell = 0x1000A, + RetVal_TableHCell = 0x1000B, + RetVal_EndTable = 0x1000C, + RetVal_Internal = 0x1000D, + RetVal_SwitchLang = 0x1000E +}; + +struct Option +{ + QCString name; + QCString value; +}; + +struct TokenInfo +{ + TokenInfo() { options.setAutoDelete(TRUE); } + + // unknown token + char unknownChar; + + // command token + QCString name; + + // command text (RCS tag) + QCString text; + + // comment blocks + + // list token info + bool isEnumList; + int indent; + + // sections + QCString sectionId; + + // simple section + QCString simpleSectName; + + // verbatim fragment + QCString verb; + + // xrefitem + int id; + + // html tag + QList<Option> options; + bool endTag; + + // whitespace + QCString chars; +}; + +// globals +extern TokenInfo *g_token; +extern int doctokenizerYYlineno; +extern FILE *doctokenizerYYin; + +// helper functions +const char *tokToString(int token); + +// operations on the scanner +void doctokenizerYYinit(const char *input); +void doctokenizerYYcleanup(); +void doctokenizerYYpushContext(); +bool doctokenizerYYpopContext(); +int doctokenizerYYlex(); +void doctokenizerYYsetStatePara(); +void doctokenizerYYsetStateTitle(); +void doctokenizerYYsetStateCode(); +void doctokenizerYYsetStateHtmlOnly(); +void doctokenizerYYsetStateLatexOnly(); +void doctokenizerYYsetStateVerbatim(); +void doctokenizerYYsetStateParam(); +void doctokenizerYYsetStateXRefItem(); +void doctokenizerYYsetStateFile(); +void doctokenizerYYsetStatePattern(); +void doctokenizerYYsetStateLink(); +void doctokenizerYYsetStateRef(); + +#endif |