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 QCString &mname, NamespaceDef *&cd) |
searches for definition of a module (Namespace) | |
static bool | getFortranTypeDefs (const QCString &tname, const QCString &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 QCString &anchor) |
static void | addToSearchIndex (yyscan_t yyscanner, const QCString &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 QCString &text) |
static void | writeMultiLineCodeLink (yyscan_t yyscanner, OutputCodeList &ol, Definition *d, const QCString &text) |
static bool | getGenericProcedureLink (yyscan_t,const ClassDef *, const QCString &, 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 QCString &memberText, OutputCodeList &ol, const QCString &text) |
static void | generateLink (yyscan_t yyscanner, OutputCodeList &ol, const QCString &lname) |
static void | generateLink (yyscan_t yyscanner, OutputCodeList &ol, const char *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 QCString &moduleName) |
static void | addLocalVar (yyscan_t yyscanner, const QCString &varName) |
static MemberDef * | getFortranDefs (yyscan_t yyscanner, const QCString &memberName, const QCString &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 QCString &, 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 1401 of file fortrancode.l.
References QCString::lower(), and QCString::str().
Definition at line 901 of file fortrancode.l.
References FALSE, and Doxygen::searchIndex.
Definition at line 1394 of file fortrancode.l.
References Scope::useNames.
|
static |
Definition at line 1415 of file fortrancode.l.
References prepassFixedForm().
Referenced by FortranCodeParser::parseCode().
|
static |
Definition at line 909 of file fortrancode.l.
References Config_getBool, Definition::getEndBodyLine(), and Definition::getStartDefLine().
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 QCString::data(), FALSE, QCString::isEmpty(), nextCodeLine(), and TRUE.
|
static |
counts the number of lines in the input
Definition at line 1347 of file fortrancode.l.
|
static |
Definition at line 1012 of file fortrancode.l.
References endFontClass().
|
static |
Definition at line 853 of file fortrancode.l.
|
static |
end scope
Definition at line 1376 of file fortrancode.l.
References DBG_CTX, and Scope::useNames.
|
static |
Definition at line 1341 of file fortrancode.l.
References generateLink().
|
static |
Definition at line 1298 of file fortrancode.l.
References addToSearchIndex(), ClassDef::Class, codifyLines(), ClassDef::compoundType(), getFortranNamespaceDefs(), getFortranTypeDefs(), getGenericProcedureLink(), getLink(), Definition::isLinkable(), QCString::lower(), removeRedundantWhiteSpace(), and writeMultiLineCodeLink().
Referenced by generateLink(), and FTVHelp::Private::generateTree().
|
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 Scope::externalVars, Doxygen::functionNameLinkedMap, QCString::isEmpty(), Definition::isLinkable(), Scope::localVars, QCString::lower(), Doxygen::memberNameLinkedMap, Definition::name(), UseEntry::onlyNames, and QCString::str().
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 FALSE, QCString::isEmpty(), Doxygen::namespaceLinkedMap, and TRUE.
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, FALSE, QCString::isEmpty(), and TRUE.
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 1258 of file fortrancode.l.
References FALSE.
Referenced by generateLink().
|
inlinestatic |
Definition at line 223 of file fortrancode.l.
|
static |
Definition at line 1265 of file fortrancode.l.
References addDocCrossReference(), addToSearchIndex(), FALSE, Fortran, Definition::getBodyDef(), getFortranDefs(), MemberDef::getGroupDef(), Definition::getLanguage(), Definition::getOuterScope(), Doxygen::globalScope, QCString::isEmpty(), Definition::isLinkable(), MemberDef::isVariable(), removeRedundantWhiteSpace(), TRUE, and writeMultiLineCodeLink().
|
static |
Definition at line 1020 of file fortrancode.l.
References endCodeLine(), and startCodeLine().
void parseFortranCode | ( | OutputCodeList & | , |
const char * | , | ||
const QCString & | , | ||
bool | , | ||
const char * | , | ||
const FileDef * | , | ||
int | , | ||
int | , | ||
bool | , | ||
const MemberDef * | , | ||
bool | , | ||
const Definition * | , | ||
bool | , | ||
FortranFormat | ) |
Definition at line 1438 of file fortrancode.l.
|
inlinestatic |
Definition at line 1590 of file fortrancode.l.
References warn.
Definition at line 885 of file fortrancode.l.
References FALSE, Doxygen::searchIndex, and TRUE.
|
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(), FALSE, Definition::getOutputFileBase(), Definition::getReference(), Definition::isLinkableInProject(), setCurrentDoc(), and QCString::sprintf().
|
static |
Definition at line 868 of file fortrancode.l.
References endFontClass(), and qstrcmp().
|
static |
start scope
Definition at line 1368 of file fortrancode.l.
References DBG_CTX.
Referenced by findScopeFromQualifiedName().
|
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, QCString::data(), FALSE, Definition::getOutputFileBase(), Definition::getReference(), nextCodeLine(), TRUE, and OutputCodeList::writeCodeLink().
int yylex | ( | yyscan_t | yyscanner | ) |
Definition at line 277 of file fortrancode.l.
|
static |
Definition at line 838 of file fortrancode.l.
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.