|
Doxygen
|
#include <stdint.h>#include <stdio.h>#include <assert.h>#include <ctype.h>#include "doxygen.h"#include "message.h"#include "outputlist.h"#include "util.h"#include "membername.h"#include "defargs.h"#include "config.h"#include "groupdef.h"#include "classlist.h"#include "filedef.h"#include "namespacedef.h"#include "tooltip.h"#include "fortrancode.h"#include "fortranscanner.h"#include "containers.h"#include "debug.h"#include "searchindex.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 | 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 71 of file fortrancode.l.
| #define YY_FTN_REJECT {yy_end = yy_my_start; yy_my_start = yy_old_start; REJECT;} |
Definition at line 89 of file fortrancode.l.
| #define YY_FTN_RESET {yy_old_start = 0; yy_my_start = 0; yy_end = 1;} |
Definition at line 88 of file fortrancode.l.
| #define YY_INPUT | ( | buf, | |
| result, | |||
| max_size ) |
Definition at line 220 of file fortrancode.l.
| #define YY_NO_INPUT 1 |
Definition at line 74 of file fortrancode.l.
| #define YY_NO_TOP_STATE 1 |
Definition at line 73 of file fortrancode.l.
| #define YY_NO_UNISTD_H 1 |
Definition at line 75 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 87 of file fortrancode.l.
| typedef yyguts_t* yyscan_t |
Definition at line 39 of file fortrancode.l.
Definition at line 1397 of file fortrancode.l.
References addLocalVar(), DString::lower(), and DString::str().
Referenced by addLocalVar(), and stateToString().
Definition at line 901 of file fortrancode.l.
References addToSearchIndex(), SearchIndexIntf::addWord(), and Doxygen::searchIndex.
Referenced by addToSearchIndex(), generateLink(), getLink(), and stateToString().
Definition at line 1390 of file fortrancode.l.
References addUse().
Referenced by addUse(), and stateToString().
|
static |
Definition at line 1411 of file fortrancode.l.
References checkContLines(), and prepassFixedForm().
Referenced by checkContLines(), and FortranCodeParser::parseCode().
|
static |
Definition at line 909 of file fortrancode.l.
References codeFolding(), Config_getBool, Definition::getEndBodyLine(), and Definition::getStartDefLine().
Referenced by codeFolding(), and startCodeLine().
write a code fragment 'text' that may span multiple lines, inserting line numbers for each line.
Definition at line 1035 of file fortrancode.l.
References codifyLines(), DString::data(), DString::DString(), DString::empty(), and nextCodeLine().
Referenced by codifyLines(), generateLink(), and stateToString().
|
static |
counts the number of lines in the input
Definition at line 1343 of file fortrancode.l.
References countLines().
Referenced by countLines(), FortranCodeParser::parseCode(), and stateToString().
|
static |
Definition at line 1012 of file fortrancode.l.
References endCodeLine(), and endFontClass().
Referenced by endCodeLine(), nextCodeLine(), FortranCodeParser::parseCode(), and stateToString().
|
static |
Definition at line 853 of file fortrancode.l.
References endFontClass().
Referenced by endCodeLine(), endFontClass(), startFontClass(), and stateToString().
|
static |
end scope
Definition at line 1372 of file fortrancode.l.
References DBG_CTX, endScope(), and Scope::useNames.
Referenced by endScope(), and stateToString().
|
static |
Definition at line 1299 of file fortrancode.l.
References addToSearchIndex(), ClassDef::Class, codifyLines(), ClassDef::compoundType(), generateLink(), getFortranNamespaceDefs(), getFortranTypeDefs(), getGenericProcedureLink(), getLink(), Definition::isLinkable(), DString::lower(), removeRedundantWhiteSpace(), and writeMultiLineCodeLink().
Referenced by generateLink(), and stateToString().
|
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 1169 of file fortrancode.l.
References DString::empty(), Scope::externalVars, LinkedMap< T, Hash, KeyEqual, Map >::find(), Doxygen::functionNameLinkedMap, getFortranDefs(), Definition::isLinkable(), Scope::localVars, DString::lower(), Doxygen::memberNameLinkedMap, Definition::name(), UseEntry::onlyNames, and DString::str().
Referenced by getFortranDefs(), getLink(), and stateToString().
|
static |
searches for definition of a module (Namespace)
| mname | the name of the module |
| cd | the entry, if found or null |
Definition at line 1109 of file fortrancode.l.
References DString::empty(), getFortranNamespaceDefs(), and Doxygen::namespaceLinkedMap.
Referenced by generateLink(), getFortranNamespaceDefs(), and stateToString().
|
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 1128 of file fortrancode.l.
References Doxygen::classLinkedMap, DString::empty(), LinkedMap< T, Hash, KeyEqual, Map >::find(), and getFortranTypeDefs().
Referenced by generateLink(), getFortranTypeDefs(), and stateToString().
|
static |
gets the link to a generic procedure which depends not on the name, but on the parameter list
Definition at line 1259 of file fortrancode.l.
References getGenericProcedureLink().
Referenced by generateLink(), getGenericProcedureLink(), and stateToString().
|
inlinestatic |
|
static |
Definition at line 1266 of file fortrancode.l.
References addDocCrossReference(), addToSearchIndex(), DString::empty(), Definition::getBodyDef(), getFortranDefs(), MemberDef::getGroupDef(), Definition::getLanguage(), getLink(), Definition::getOuterScope(), Doxygen::globalScope, Definition::isLinkable(), MemberDef::isVariable(), removeRedundantWhiteSpace(), and writeMultiLineCodeLink().
Referenced by generateLink(), getLink(), and stateToString().
|
static |
Definition at line 1020 of file fortrancode.l.
References endCodeLine(), nextCodeLine(), and startCodeLine().
Referenced by codifyLines(), nextCodeLine(), stateToString(), 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 1434 of file fortrancode.l.
References parseFortranCode().
Referenced by parseFortranCode().
|
inlinestatic |
Definition at line 1562 of file fortrancode.l.
References pop_state(), and warn.
Referenced by pop_state(), and stateToString().
Definition at line 885 of file fortrancode.l.
References Doxygen::searchIndex, SearchIndexIntf::setCurrentDoc(), and setCurrentDoc().
Referenced by FortranCodeParser::parseCode(), setCurrentDoc(), startCodeLine(), and stateToString().
|
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 954 of file fortrancode.l.
References codeFolding(), DString::DString(), Definition::getOutputFileBase(), Definition::getReference(), Definition::isLinkableInProject(), setCurrentDoc(), DString::sprintf(), and startCodeLine().
Referenced by nextCodeLine(), FortranCodeParser::parseCode(), startCodeLine(), and stateToString().
|
static |
Definition at line 868 of file fortrancode.l.
References dstrcmp(), endFontClass(), and startFontClass().
Referenced by startFontClass(), and stateToString().
|
static |
start scope
Definition at line 1364 of file fortrancode.l.
References DBG_CTX, and startScope().
Referenced by startScope(), and stateToString().
|
static |
References addLocalVar(), addToSearchIndex(), addUse(), codifyLines(), countLines(), endCodeLine(), endFontClass(), endScope(), generateLink(), getFortranDefs(), getFortranNamespaceDefs(), getFortranTypeDefs(), getGenericProcedureLink(), getLink(), nextCodeLine(), pop_state(), setCurrentDoc(), startCodeLine(), startFontClass(), startScope(), stateToString(), writeMultiLineCodeLink(), and yyread().
|
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 1066 of file fortrancode.l.
References Definition::anchor(), Definition::briefDescriptionAsTooltip(), Definition::codeSymbolType(), Config_getBool, DString::data(), Definition::getOutputFileBase(), Definition::getReference(), nextCodeLine(), OutputCodeList::writeCodeLink(), and writeMultiLineCodeLink().
Referenced by generateLink(), getLink(), stateToString(), and writeMultiLineCodeLink().
| int yylex | ( | yyscan_t | yyscanner | ) |
Definition at line 277 of file fortrancode.l.
|
static |
Definition at line 838 of file fortrancode.l.
References yyread().
| int yy_end = 1 |
Definition at line 86 of file fortrancode.l.
| int yy_my_start = 0 |
Definition at line 85 of file fortrancode.l.
| int yy_old_start = 0 |
Definition at line 84 of file fortrancode.l.