summaryrefslogtreecommitdiffstats
path: root/src/fortrancode.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/fortrancode.l')
-rw-r--r--src/fortrancode.l49
1 files changed, 35 insertions, 14 deletions
diff --git a/src/fortrancode.l b/src/fortrancode.l
index 3e443b5..c4532f3 100644
--- a/src/fortrancode.l
+++ b/src/fortrancode.l
@@ -17,7 +17,7 @@
*/
/**
- @todo - continutation lines not always recognized
+ @todo - continuation lines not always recognized
- merging of use-statements with same module name and different only-names
- rename part of use-statement
- links to interface functions
@@ -166,6 +166,8 @@ static int inTypeDecl = 0;
static bool g_endComment;
+static const char *stateToString(int state);
+
static void endFontClass()
{
if (g_currentFontClass)
@@ -381,7 +383,7 @@ static bool getFortranNamespaceDefs(const QCString &mname,
@param tname the name of the type
@param moduleName name of enclosing module or null, if global entry
@param cd the entry, if found or null
- @param useDict dictionary of data of USE-statement
+ @param usedict dictionary of data of USE-statement
@returns true, if type is found
*/
static bool getFortranTypeDefs(const QCString &tname, const QCString &moduleName,
@@ -519,7 +521,7 @@ static bool getGenericProcedureLink(const ClassDef *cd,
return FALSE;
}
-static bool getLink(UseSDict *usedict, // dictonary with used modules
+static bool getLink(UseSDict *usedict, // dictionary with used modules
const char *memberText, // exact member text
CodeOutputInterface &ol,
const char *text)
@@ -969,7 +971,7 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
<Start>{TYPE_SPEC}/[,:( ] {
QCString typ = yytext;
typ = removeRedundantWhiteSpace(typ.lower());
- if (QString(typ).startsWith("real")) YY_FTN_REJECT;
+ if (typ.startsWith("real")) YY_FTN_REJECT;
if (typ == "type" || typ == "class" || typ == "procedure") inTypeDecl = 1;
yy_push_state(YY_START);
BEGIN(Declaration);
@@ -1248,7 +1250,7 @@ LANGUAGE_BIND_SPEC BIND{BS}"("{BS}C{BS}(,{BS}NAME{BS}"="{BS}"\""(.*)"\""{BS})?")
else
{
codifyLines(yytext);
- // comment cannot extend over the end of a line so should always be terminatd at the end of the line.
+ // comment cannot extend over the end of a line so should always be terminated at the end of the line.
if (g_currentFontClass && !strcmp(g_currentFontClass,"comment")) endFontClass();
}
g_contLineNr++;
@@ -1393,15 +1395,34 @@ void parseFortranCode(CodeOutputInterface &od,const char *,const QCString &s,
return;
}
-#if !defined(YY_FLEX_SUBMINOR_VERSION)
-extern "C" { // some bogus code to keep the compiler happy
- void fortrancodeYYdummy() { yy_flex_realloc(0,0); }
+//---------------------------------------------------------
+
+void FortranCodeParser::parseCode(CodeOutputInterface & codeOutIntf,
+ const char * scopeName,
+ const QCString & input,
+ SrcLangExt /*lang*/,
+ bool isExampleBlock,
+ const char * exampleName,
+ FileDef * fileDef,
+ int startLine,
+ int endLine,
+ bool inlineFragment,
+ const MemberDef *memberDef,
+ bool showLineNumbers,
+ const Definition *searchCtx,
+ bool collectXRefs
+ )
+{
+ ::parseFortranCode(codeOutIntf,scopeName,input,isExampleBlock,exampleName,
+ fileDef,startLine,endLine,inlineFragment,memberDef,
+ showLineNumbers,searchCtx,collectXRefs,m_format);
}
-#elif YY_FLEX_MAJOR_VERSION<=2 && YY_FLEX_MINOR_VERSION<=5 && YY_FLEX_SUBMINOR_VERSION<33
-#error "You seem to be using a version of flex newer than 2.5.4 but older than 2.5.33. These versions do NOT work with doxygen! Please use version <=2.5.4 or >=2.5.33 or expect things to be parsed wrongly!"
-#else
-extern "C" { // some bogus code to keep the compiler happy
- void fortrancodeYYdummy() { yy_top_state(); }
+
+void FortranCodeParser::resetCodeParserState()
+{
+ ::resetFortranCodeParserState();
}
-#endif
+//---------------------------------------------------------
+
+#include "fortrancode.l.h"