|
Doxygen
|
#include <stdint.h>#include "fortrancode.h"#include <map>#include <memory>#include <string>#include <vector>#include "classlist.h"#include "config.h"#include "containers.h"#include "debug.h"#include "doxygen.h"#include "filedef.h"#include "fortranscanner.h"#include "groupdef.h"#include "membername.h"#include "message.h"#include "namespacedef.h"#include "outputlist.h"#include "tooltip.h"#include "util.h"#include "doxygen_lex.h"#include "fortrancode.l.h"Go to the source code of this file.
Classes | |
| class | UseEntry |
| data of an use-statement More... | |
| class | UseMap |
| module name -> list of ONLY/remote entries (module name = name of the module, which can be accessed via use-directive) More... | |
| class | Scope |
| Contains names of used modules and names of local variables. More... | |
| struct | fortrancodeYY_state |
| struct | FortranCodeParser::Private |
Macros | |
| #define | YY_TYPEDEF_YY_SCANNER_T |
| #define | yyguts_t fortrancodeYYguts_t |
| #define | DBG_CTX(x) |
| #define | YY_NO_TOP_STATE 1 |
| #define | YY_NO_INPUT 1 |
| #define | YY_NO_UNISTD_H 1 |
| #define | YY_USER_ACTION {yy_old_start = yy_my_start; yy_my_start = yy_end; yy_end += static_cast<int>(yyleng);} |
| #define | YY_FTN_RESET {yy_old_start = 0; yy_my_start = 0; yy_end = 1;} |
| #define | YY_FTN_REJECT {yy_end = yy_my_start; yy_my_start = yy_old_start; REJECT;} |
| #define | YY_INPUT(buf, result, max_size) |
Typedefs | |
| typedef yyguts_t * | yyscan_t |
Functions | |
| static const char * | stateToString (int state) |
| static bool | getFortranNamespaceDefs (const DString &mname, NamespaceDef *&cd) |
| searches for definition of a module (Namespace) | |
| static bool | getFortranTypeDefs (const DString &tname, const DString &moduleName, ClassDef *&cd, const UseMap &useMap) |
| searches for definition of a type | |
| static void | startFontClass (yyscan_t yyscanner, const char *s, bool specialComment=false) |
| static void | endFontClass (yyscan_t yyscanner, bool specialComment=false) |
| static void | setCurrentDoc (yyscan_t yyscanner, const DString &anchor) |
| static void | addToSearchIndex (yyscan_t yyscanner, const DString &text) |
| static void | startCodeLine (yyscan_t yyscanner) |
| static void | endCodeLine (yyscan_t yyscanner) |
| static void | nextCodeLine (yyscan_t yyscanner) |
| static void | codifyLines (yyscan_t yyscanner, const DString &text) |
| static void | writeMultiLineCodeLink (yyscan_t yyscanner, OutputCodeList &ol, Definition *d, const DString &text) |
| static bool | getGenericProcedureLink (yyscan_t,const ClassDef *, const DString &, OutputCodeList &) |
| gets the link to a generic procedure which depends not on the name, but on the parameter list | |
| static bool | getLink (yyscan_t yyscanner, const UseMap &useMap, const DString &memberText, OutputCodeList &ol, const DString &text) |
| static void | generateLink (yyscan_t yyscanner, OutputCodeList &ol, const DString &lname) |
| static int | countLines (yyscan_t yyscanner) |
| static void | startScope (yyscan_t yyscanner) |
| start scope | |
| static void | endScope (yyscan_t yyscanner) |
| end scope | |
| static void | addUse (yyscan_t yyscanner, const DString &moduleName) |
| static void | addLocalVar (yyscan_t yyscanner, const DString &varName) |
| static MemberDef * | getFortranDefs (yyscan_t yyscanner, const DString &memberName, const DString &moduleName, const UseMap &useMap) |
| searches for definition of function memberName | |
| 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) |
| static void | checkContLines (yyscan_t yyscanner, const char *s) |
| void | parseFortranCode (OutputCodeList &, const char *, const DString &, bool, const char *, const FileDef *, int, int, bool, const MemberDef *, bool, const Definition *, bool, FortranFormat) |
Variables | |
| int | yy_old_start = 0 |
| int | yy_my_start = 0 |
| int | yy_end = 1 |
| #define DBG_CTX | ( | x | ) |
Definition at line 72 of file fortrancode.l.
| #define YY_FTN_REJECT {yy_end = yy_my_start; yy_my_start = yy_old_start; REJECT;} |
Definition at line 90 of file fortrancode.l.
| #define YY_FTN_RESET {yy_old_start = 0; yy_my_start = 0; yy_end = 1;} |
Definition at line 89 of file fortrancode.l.
| #define YY_INPUT | ( | buf, | |
| result, | |||
| max_size ) |
Definition at line 221 of file fortrancode.l.
| #define YY_NO_INPUT 1 |
Definition at line 75 of file fortrancode.l.
| #define YY_NO_TOP_STATE 1 |
Definition at line 74 of file fortrancode.l.
| #define YY_NO_UNISTD_H 1 |
Definition at line 76 of file fortrancode.l.
| #define YY_TYPEDEF_YY_SCANNER_T |
Definition at line 37 of file fortrancode.l.
| #define YY_USER_ACTION {yy_old_start = yy_my_start; yy_my_start = yy_end; yy_end += static_cast<int>(yyleng);} |
Definition at line 88 of file fortrancode.l.
| #define yyguts_t fortrancodeYYguts_t |
Definition at line 38 of file fortrancode.l.
Definition at line 40 of file fortrancode.l.
Definition at line 1398 of file fortrancode.l.
References DString::lower(), DString::str(), and yyguts_t.
Definition at line 902 of file fortrancode.l.
References SearchIndexIntf::addWord(), and Doxygen::searchIndex.
Referenced by generateLink(), and getLink().
Definition at line 1391 of file fortrancode.l.
References yyguts_t.
|
static |
Definition at line 1412 of file fortrancode.l.
References prepassFixedForm(), and yyguts_t.
Referenced by FortranCodeParser::parseCode().
|
static |
Definition at line 910 of file fortrancode.l.
References Config_getBool, Definition::getEndBodyLine(), Definition::getStartDefLine(), and yyguts_t.
Referenced by startCodeLine().
write a code fragment 'text' that may span multiple lines, inserting line numbers for each line.
Definition at line 1036 of file fortrancode.l.
References DString::data(), DString::empty(), nextCodeLine(), and yyguts_t.
Referenced by generateLink().
|
static |
counts the number of lines in the input
Definition at line 1344 of file fortrancode.l.
References yyguts_t.
Referenced by FortranCodeParser::parseCode().
|
static |
Definition at line 1013 of file fortrancode.l.
References endFontClass(), and yyguts_t.
Referenced by nextCodeLine(), and FortranCodeParser::parseCode().
|
static |
Definition at line 854 of file fortrancode.l.
References yyguts_t.
Referenced by endCodeLine(), and startFontClass().
|
static |
end scope
Definition at line 1373 of file fortrancode.l.
References DBG_CTX, Scope::useNames, and yyguts_t.
|
static |
Definition at line 1300 of file fortrancode.l.
References addToSearchIndex(), ClassDef::Class, codifyLines(), ClassDef::compoundType(), getFortranNamespaceDefs(), getFortranTypeDefs(), getGenericProcedureLink(), getLink(), Definition::isLinkable(), removeRedundantWhiteSpace(), writeMultiLineCodeLink(), and yyguts_t.
|
static |
searches for definition of function memberName
| yyscanner | the scanner data to be used |
| memberName | the name of the function/variable |
| moduleName | name of enclosing module or null, if global entry |
| useMap | map of data of USE-statement |
Definition at line 1170 of file fortrancode.l.
References DString::empty(), Scope::externalVars, LinkedMap< T, Hash, KeyEqual, Map >::find(), Doxygen::functionNameLinkedMap, Definition::isLinkable(), Scope::localVars, DString::lower(), Doxygen::memberNameLinkedMap, Definition::name(), UseEntry::onlyNames, DString::str(), and yyguts_t.
Referenced by getLink().
|
static |
searches for definition of a module (Namespace)
| mname | the name of the module |
| cd | the entry, if found or null |
Definition at line 1110 of file fortrancode.l.
References DString::empty(), and Doxygen::namespaceLinkedMap.
Referenced by generateLink().
|
static |
searches for definition of a type
| tname | the name of the type |
| moduleName | name of enclosing module or null, if global entry |
| cd | the entry, if found or null |
| useMap | map of data of USE-statement |
Definition at line 1129 of file fortrancode.l.
References Doxygen::classLinkedMap, DString::empty(), and LinkedMap< T, Hash, KeyEqual, Map >::find().
Referenced by generateLink().
|
static |
gets the link to a generic procedure which depends not on the name, but on the parameter list
Definition at line 1260 of file fortrancode.l.
Referenced by generateLink().
|
inlinestatic |
Definition at line 224 of file fortrancode.l.
|
static |
Definition at line 1267 of file fortrancode.l.
References addDocCrossReference(), addToSearchIndex(), DString::empty(), Definition::getBodyDef(), getFortranDefs(), MemberDef::getGroupDef(), Definition::getLanguage(), Definition::getOuterScope(), Doxygen::globalScope, Definition::isLinkable(), MemberDef::isVariable(), removeRedundantWhiteSpace(), writeMultiLineCodeLink(), and yyguts_t.
Referenced by generateLink().
|
static |
Definition at line 1021 of file fortrancode.l.
References endCodeLine(), startCodeLine(), and yyguts_t.
Referenced by codifyLines(), and writeMultiLineCodeLink().
| void parseFortranCode | ( | OutputCodeList & | , |
| const char * | , | ||
| const DString & | , | ||
| bool | , | ||
| const char * | , | ||
| const FileDef * | , | ||
| int | , | ||
| int | , | ||
| bool | , | ||
| const MemberDef * | , | ||
| bool | , | ||
| const Definition * | , | ||
| bool | , | ||
| FortranFormat | ) |
Definition at line 1435 of file fortrancode.l.
|
inlinestatic |
Definition at line 1563 of file fortrancode.l.
Definition at line 886 of file fortrancode.l.
References Doxygen::searchIndex, SearchIndexIntf::setCurrentDoc(), and yyguts_t.
Referenced by FortranCodeParser::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 955 of file fortrancode.l.
References codeFolding(), Definition::getOutputFileBase(), Definition::getReference(), Definition::isLinkableInProject(), setCurrentDoc(), DString::sprintf(), and yyguts_t.
Referenced by nextCodeLine(), and FortranCodeParser::parseCode().
|
static |
Definition at line 869 of file fortrancode.l.
References dstrcmp(), endFontClass(), and yyguts_t.
|
static |
|
static |
|
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 1067 of file fortrancode.l.
References Definition::anchor(), Definition::briefDescriptionAsTooltip(), Definition::codeSymbolType(), Config_getBool, DString::data(), Definition::getOutputFileBase(), Definition::getReference(), nextCodeLine(), OutputCodeList::writeCodeLink(), and yyguts_t.
Referenced by generateLink(), and getLink().
| int yylex | ( | yyscan_t | yyscanner | ) |
Definition at line 278 of file fortrancode.l.
|
static |
Definition at line 839 of file fortrancode.l.
References yyguts_t.
| int yy_end = 1 |
Definition at line 87 of file fortrancode.l.
| int yy_my_start = 0 |
Definition at line 86 of file fortrancode.l.
| int yy_old_start = 0 |
Definition at line 85 of file fortrancode.l.