|
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 QCString &anchor) |
| static void | addToSearchIndex (yyscan_t yyscanner, const QCString &text) |
| static const ClassDef * | stripClassName (yyscan_t yyscanner, const QCString &s, Definition *d) |
| static void | codify (yyscan_t yyscanner, const QCString &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 QCString &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 QCString &text) |
| static bool | getLinkInScope (yyscan_t yyscanner, const QCString &c, const QCString &m, const QCString &memberText, OutputCodeList &ol, const QCString &text) |
| static bool | getLink (yyscan_t yyscanner, const QCString &className, const QCString &memberName, OutputCodeList &ol, const QCString &text=QCString()) |
| static void | generateClassOrGlobalLink (yyscan_t yyscanner, OutputCodeList &ol, const QCString &clName, bool typeOnly=false) |
| static void | generateFunctionLink (yyscan_t yyscanner, OutputCodeList &ol, const QCString &funcName) |
| static bool | findMemberLink (yyscan_t yyscanner, OutputCodeList &ol, const Definition *sym, const QCString &symName) |
| static void | findMemberLink (yyscan_t yyscanner, OutputCodeList &ol, const QCString &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.
Referenced by generateClassOrGlobalLink(), and getLinkInScope().
|
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().
Referenced by startCodeLine().
Definition at line 1017 of file pycode.l.
Referenced by findMemberLink().
Definition at line 1134 of file pycode.l.
References QCString::data(), QCString::isEmpty(), and nextCodeLine().
Referenced by generateClassOrGlobalLink().
|
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 nextCodeLine(), and PythonCodeParser::parseCode().
|
static |
Definition at line 1117 of file pycode.l.
Referenced by endCodeLine(), and startFontClass().
|
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(), QCString::findRev(), Definition::getBodyDef(), getClass(), MemberDef::getGroupDef(), getLink(), ClassDef::getMemberByName(), NamespaceDef::getMemberByName(), Definition::getOuterScope(), getResolvedNamespace(), Doxygen::globalScope, ScopedTypeVariant::isDummy(), QCString::isEmpty(), Definition::isLinkable(), QCString::left(), QCString::length(), Definition::name(), qPrint(), QCString::right(), stripClassName(), substitute(), MemberDef::typeString(), and writeMultiLineCodeLink().
Referenced by generateFunctionLink().
|
static |
Definition at line 1374 of file pycode.l.
References LocalDef::baseClasses(), DBG_CTX, QCString::findRev(), generateClassOrGlobalLink(), getLink(), QCString::isEmpty(), QCString::left(), QCString::length(), ScopedTypeVariant::localDef(), qPrint(), removeRedundantWhiteSpace(), QCString::right(), QCString::str(), and QCString::stripWhiteSpace().
|
inlinestatic |
|
static |
Definition at line 1205 of file pycode.l.
References getLinkInScope(), QCString::isEmpty(), QCString::prepend(), and removeRedundantWhiteSpace().
Referenced by generateClassOrGlobalLink(), and generateFunctionLink().
|
static |
Definition at line 1163 of file pycode.l.
References addDocCrossReference(), addToSearchIndex(), GetDefInput::currentFile, GetDefResult::found, Definition::getBodyDef(), getDefs(), MemberDef::getGroupDef(), Definition::getOuterScope(), Doxygen::globalScope, GetDefInput::insideCode, QCString::isEmpty(), 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().
Referenced by codifyLines(), and writeMultiLineCodeLink().
|
inlinestatic |
Definition at line 845 of file pycode.l.
References Doxygen::searchIndex, and SearchIndexIntf::setCurrentDoc().
Referenced by PythonCodeParser::parseCode(), and startCodeLine().
|
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 QCString::sprintf().
Referenced by nextCodeLine(), and PythonCodeParser::parseCode().
|
static |
Definition at line 1098 of file pycode.l.
References endFontClass(), and qstrcmp().
|
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, QCString::data(), Definition::getOutputFileBase(), Definition::getReference(), QCString::isEmpty(), nextCodeLine(), and OutputCodeList::writeCodeLink().
Referenced by findMemberLink(), generateClassOrGlobalLink(), and getLinkInScope().
| int yylex | ( | yyscan_t | yyscanner | ) |
Definition at line 218 of file pycode.l.
|
static |
Definition at line 772 of file pycode.l.