|
Doxygen
|
#include <stdint.h>#include <vector>#include <unordered_map>#include <string>#include <stack>#include <stdio.h>#include "pycode.h"#include "message.h"#include "scanner.h"#include "entry.h"#include "doxygen.h"#include "outputlist.h"#include "util.h"#include "membername.h"#include "searchindex.h"#include "config.h"#include "groupdef.h"#include "classlist.h"#include "filedef.h"#include "namespacedef.h"#include "tooltip.h"#include "scopedtypevariant.h"#include "symbolresolver.h"#include "debug.h"#include "doxygen_lex.h"#include "pycode.l.h"Go to the source code of this file.
Classes | |
| struct | pycodeYY_state |
| struct | PythonCodeParser::Private |
Macros | |
| #define | YY_TYPEDEF_YY_SCANNER_T |
| #define | DBG_CTX(x) |
| #define | YY_NO_INPUT 1 |
| #define | YY_NO_UNISTD_H 1 |
| #define | YY_INPUT(buf, result, max_size) |
Typedefs | |
| typedef yyguts_t * | yyscan_t |
Functions | |
| static const char * | stateToString (int state) |
| static void | startCodeLine (yyscan_t yyscanner) |
| static int | countLines (yyscan_t yyscanner) |
| static void | setCurrentDoc (yyscan_t yyscanner, const DString &anchor) |
| static void | addToSearchIndex (yyscan_t yyscanner, const DString &text) |
| static const ClassDef * | stripClassName (yyscan_t yyscanner, const DString &s, Definition *d) |
| static void | codify (yyscan_t yyscanner, const DString &text) |
| static void | endCodeLine (yyscan_t yyscanner) |
| static void | nextCodeLine (yyscan_t yyscanner) |
| static void | writeMultiLineCodeLink (yyscan_t yyscanner, OutputCodeList &ol, const Definition *d, const DString &text) |
| static void | startFontClass (yyscan_t yyscanner, const char *s, bool specialComment=false) |
| static void | endFontClass (yyscan_t yyscanner, bool specialComment=false) |
| static void | codifyLines (yyscan_t yyscanner, const DString &text) |
| static bool | getLinkInScope (yyscan_t yyscanner, const DString &c, const DString &m, const DString &memberText, OutputCodeList &ol, const DString &text) |
| static bool | getLink (yyscan_t yyscanner, const DString &className, const DString &memberName, OutputCodeList &ol, const DString &text=DString()) |
| static void | generateClassOrGlobalLink (yyscan_t yyscanner, OutputCodeList &ol, const DString &clName, bool typeOnly=false) |
| static void | generateFunctionLink (yyscan_t yyscanner, OutputCodeList &ol, const DString &funcName) |
| static bool | findMemberLink (yyscan_t yyscanner, OutputCodeList &ol, const Definition *sym, const DString &symName) |
| static void | findMemberLink (yyscan_t yyscanner, OutputCodeList &ol, const DString &symName) |
| static void | incrementFlowKeyWordCount (yyscan_t yyscanner) |
| static void | adjustScopesAndSuites (yyscan_t yyscanner, unsigned indentLength) |
| static int | yyread (yyscan_t yyscanner, char *buf, int max_size) |
| static void | pop_state (yyscan_t yyscanner) |
| static const char * | getLexerFILE () |
| int | yylex (yyscan_t yyscanner) |
| static void | codeFolding (yyscan_t yyscanner, const Definition *d) |
| #define YY_INPUT | ( | buf, | |
| result, | |||
| max_size ) |
Definition at line 863 of file pycode.l.
References SearchIndexIntf::addWord(), and Doxygen::searchIndex.
|
static |
Examines current stack of white-space indentations; re-syncs the parser with the correct scope.
Definition at line 793 of file pycode.l.
|
static |
Definition at line 902 of file pycode.l.
References Config_getBool, Definition::getEndBodyLine(), and Definition::getStartDefLine().
Definition at line 1017 of file pycode.l.
Referenced by findMemberLink().
Definition at line 1134 of file pycode.l.
References DString::data(), DString::empty(), and nextCodeLine().
|
static |
counts the number of lines in the input
Definition at line 824 of file pycode.l.
Referenced by PythonCodeParser::parseCode().
|
static |
Definition at line 1025 of file pycode.l.
References endFontClass().
Referenced by PythonCodeParser::parseCode().
|
static |
Definition at line 1117 of file pycode.l.
|
static |
Definition at line 1417 of file pycode.l.
References addDocCrossReference(), DBG_CTX, Definition::definitionType(), Definition::getOuterScope(), ClassDef::isBaseClass(), Definition::name(), qPrint(), toClassDef(), toMemberDef(), Definition::TypeClass, Definition::TypeMember, and writeMultiLineCodeLink().
Referenced by findMemberLink().
|
static |
Definition at line 1455 of file pycode.l.
References codify(), SymbolMap< T >::find(), findMemberLink(), and Doxygen::symbolMap.
|
static |
Definition at line 1233 of file pycode.l.
References addDocCrossReference(), addToSearchIndex(), codifyLines(), DBG_CTX, Definition::displayName(), DString::empty(), Definition::getBodyDef(), getClass(), MemberDef::getGroupDef(), getLink(), ClassDef::getMemberByName(), NamespaceDef::getMemberByName(), Definition::getOuterScope(), getResolvedNamespace(), Doxygen::globalScope, ScopedTypeVariant::isDummy(), Definition::isLinkable(), DString::left(), DString::mid(), Definition::name(), DString::npos, qPrint(), DString::rfind(), stripClassName(), substitute(), MemberDef::typeString(), and writeMultiLineCodeLink().
Referenced by generateFunctionLink().
|
static |
Definition at line 1374 of file pycode.l.
References LocalDef::baseClasses(), DBG_CTX, DString::empty(), generateClassOrGlobalLink(), getLink(), DString::left(), ScopedTypeVariant::localDef(), DString::mid(), DString::npos, qPrint(), removeRedundantWhiteSpace(), DString::rfind(), DString::str(), and DString::stripWhiteSpace().
|
inlinestatic |
|
static |
Definition at line 1205 of file pycode.l.
References DString::empty(), getLinkInScope(), DString::prepend(), and removeRedundantWhiteSpace().
|
static |
Definition at line 1163 of file pycode.l.
References addDocCrossReference(), addToSearchIndex(), GetDefInput::currentFile, DString::empty(), GetDefResult::found, Definition::getBodyDef(), getDefs(), MemberDef::getGroupDef(), Definition::getOuterScope(), Doxygen::globalScope, GetDefInput::insideCode, Definition::isLinkable(), GetDefResult::md, stripClassName(), MemberDef::typeString(), and writeMultiLineCodeLink().
Referenced by getLink().
|
static |
Definition at line 1477 of file pycode.l.
References Doxygen::countFlowKeywordsMutex, MemberDefMutable::incrementFlowKeyWordCount(), and toMemberDefMutable().
|
static |
Definition at line 1035 of file pycode.l.
References endCodeLine(), and startCodeLine().
|
inlinestatic |
Definition at line 845 of file pycode.l.
References Doxygen::searchIndex, and SearchIndexIntf::setCurrentDoc().
Referenced by PythonCodeParser::parseCode().
|
static |
start a new line of code, inserting a line number if yyextra->sourceFileDef is true. If a definition starts at the current line, then the line number is linked to the documentation of that definition.
Definition at line 949 of file pycode.l.
References codeFolding(), Definition::getOutputFileBase(), Definition::getReference(), Definition::isLinkableInProject(), Definition::name(), setCurrentDoc(), and DString::sprintf().
Referenced by PythonCodeParser::parseCode().
|
static |
Definition at line 1098 of file pycode.l.
References dstrcmp(), and endFontClass().
|
static |
|
static |
Definition at line 873 of file pycode.l.
References extractClassNameFromType().
Referenced by generateClassOrGlobalLink(), and getLinkInScope().
|
static |
writes a link to a fragment text that may span multiple lines, inserting line numbers for each line. If text contains newlines, the link will be split into multiple links with the same destination, one for each line.
Definition at line 1056 of file pycode.l.
References Definition::anchor(), Definition::briefDescriptionAsTooltip(), Definition::codeSymbolType(), Config_getBool, DString::data(), DString::empty(), Definition::getOutputFileBase(), Definition::getReference(), nextCodeLine(), and OutputCodeList::writeCodeLink().
| int yylex | ( | yyscan_t | yyscanner | ) |
Definition at line 218 of file pycode.l.
|
static |
Definition at line 772 of file pycode.l.