From 1e6323e5bb04f49df9d00e82e5db3e8f301dbfc4 Mon Sep 17 00:00:00 2001 From: Chris Hansen Date: Mon, 12 May 2014 11:29:32 -0400 Subject: [PATCH 1/9] Fix unnecessary rules for FORTRAN types --- src/fortrancode.l | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/src/fortrancode.l b/src/fortrancode.l index 02a827e87f9..a658030da50 100644 --- a/src/fortrancode.l +++ b/src/fortrancode.l @@ -688,8 +688,7 @@ NUM_TYPE (complex|integer|logical|real) LOG_OPER (\.and\.|\.eq\.|\.eqv\.|\.ge\.|\.gt\.|\.le\.|\.lt\.|\.ne\.|\.neqv\.|\.or\.|\.not\.) KIND {ARGS} CHAR (CHARACTER{ARGS}?|CHARACTER{BS}"*"({BS}[0-9]+|{ARGS})) -TYPE_SPEC (({NUM_TYPE}({BS}"*"{BS}[0-9]+)?)|({NUM_TYPE}{KIND})|DOUBLE{BS}COMPLEX|DOUBLE{BS}PRECISION|{CHAR}|PROCEDURE) -TYPE_PREFIX ((TYPE|CLASS|PROCEDURE){BS}"(") +TYPE_SPEC (({NUM_TYPE}({BS}"*"{BS}[0-9]+)?)|({NUM_TYPE}{KIND})|DOUBLE{BS}COMPLEX|DOUBLE{BS}PRECISION|{CHAR}|TYPE|CLASS|PROCEDURE) INTENT_SPEC intent{BS}"("{BS}(in|out|in{BS}out){BS}")" ATTR_SPEC (IMPLICIT|ALLOCATABLE|DIMENSION{ARGS}|EXTERNAL|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PROTECTED|PRIVATE|PUBLIC|SAVE|TARGET|RECURSIVE|PURE|IMPURE|ELEMENTAL|VALUE|NOPASS|DEFERRED) @@ -718,7 +717,6 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I %x Use %x UseOnly %x Import -%x TypeDecl %x Declaration %x DeclContLine %x Parameterlist @@ -828,7 +826,7 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I g_insideBody=FALSE; } /*-------- fortran module -----------------------------------------*/ -("block"{BS}"data"|"program"|"module"|"type"|"interface")/{BS_}|({COMMA}({ACCESS_SPEC}|ABSTRACT|EXTENDS))|\n { // +("block"{BS}"data"|"program"|"module"|"interface")/{BS_}|({COMMA}{ACCESS_SPEC})|\n { // startScope(); startFontClass("keyword"); codifyLines(yytext); @@ -837,6 +835,14 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I BEGIN(ClassName); if (!qstricmp(yytext,"module")) currentModule="module"; } +("type")/{BS_}|({COMMA}({ACCESS_SPEC}|ABSTRACT|EXTENDS))|\n { // + startScope(); + startFontClass("keyword"); + codifyLines(yytext); + endFontClass(); + yy_push_state(YY_START); + BEGIN(ClassName); + } {ID} { if (currentModule == "module") { @@ -905,24 +911,6 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I endFontClass(); } /*-------- variable declaration ----------------------------------*/ -^{BS}{TYPE_PREFIX}/{ID} { - yy_push_state(YY_START); - BEGIN(TypeDecl); - startFontClass("keywordtype"); - g_code->codify(yytext); - endFontClass(); - } -{ID} { // link type - g_insideBody=TRUE; - generateLink(*g_code,yytext); - g_insideBody=FALSE; - } -")" { - BEGIN(Declaration); - startFontClass("keywordtype"); - g_code->codify(yytext); - endFontClass(); - } {TYPE_SPEC}/[,:( ] { yy_push_state(YY_START); BEGIN(Declaration); From be0986e9ab7c1788e3650f1df7e7af70b68f28d8 Mon Sep 17 00:00:00 2001 From: Chris Hansen Date: Sun, 18 May 2014 21:21:59 -0400 Subject: [PATCH 2/9] Fix highlighting issues - Fixed highlighting defined type in variable declarations - Corrected parser state following docBlock closure --- src/fortrancode.l | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/src/fortrancode.l b/src/fortrancode.l index a658030da50..699b3204496 100644 --- a/src/fortrancode.l +++ b/src/fortrancode.l @@ -150,7 +150,9 @@ static bool g_includeCodeFragment; static char stringStartSymbol; // single or double quote // count in variable declaration to filter out // declared from referenced names -static int bracketCount = 0; +static int bracketCount = 0; + +static bool g_endComment; // simplified way to know if this is fixed form // duplicate in fortranscanner.l @@ -255,6 +257,7 @@ static void startCodeLine() g_currentDefinition = d; g_currentMemberDef = g_sourceFileDef->getSourceMember(g_yyLineNr); g_insideBody = FALSE; + g_endComment = FALSE; g_parmType.resize(0); g_parmName.resize(0); QCString lineAnchor; @@ -929,7 +932,7 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I endFontClass(); } {ID} { // local var - if (g_currentMemberDef && !g_currentMemberDef->isFunction()) + if (g_currentMemberDef && !g_currentMemberDef->isFunction() && bracketCount==0) { g_code->codify(yytext); addLocalVar(yytext); @@ -961,7 +964,14 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I YY_FTN_RESET } "\n" { // end declaration line - codifyLines(yytext); + if (g_endComment) + { + g_endComment=FALSE; + } + else + { + codifyLines(yytext); + } bracketCount = 0; yy_pop_state(); YY_FTN_RESET @@ -1018,16 +1028,17 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I docBlock+=yytext; } "\n" { // comment block ends at the end of this line - docBlock+=yytext; // remove special comment (default config) if (Config_getBool("STRIP_CODE_COMMENTS")) { g_yyLineNr+=((QCString)docBlock).contains('\n'); + g_yyLineNr+=1; endCodeLine(); - if (g_yyLineNr\n { - codifyLines(yytext); + if (g_endComment) + { + g_endComment=FALSE; + } + else + { + codifyLines(yytext); + } YY_FTN_RESET } <*>. { From fc386eb107958b4f3214aa2c0c6caf2a91c83177 Mon Sep 17 00:00:00 2001 From: jannick0 Date: Wed, 21 May 2014 15:08:21 +0200 Subject: [PATCH 3/9] make.bat: change current directory First thing after calling make.bat: switch current directory to folder make.bat resides in. Purpose: easy external call of make.bat. /J. --- src/latexgen.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/latexgen.cpp b/src/latexgen.cpp index a714539acb3..a9e34682157 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -186,6 +186,7 @@ static void writeMakeBat() exit(1); } FTextStream t(&file); + t << "cd %~p0\n\n"; // switch current directory with make.bat (for external calls of make.bat) t << "del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf\n\n"; if (!Config_getBool("USE_PDFLATEX")) // use plain old latex { From feb24c82002ced816bc72eb8f2a6a35c71e25ed7 Mon Sep 17 00:00:00 2001 From: jannick0 Date: Wed, 21 May 2014 16:31:51 +0200 Subject: [PATCH 4/9] make.bat: change current directory amendment for switching between drives and flipping back to initial cur dir at end of make.bat --- src/latexgen.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/latexgen.cpp b/src/latexgen.cpp index a9e34682157..050af01715e 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -186,7 +186,8 @@ static void writeMakeBat() exit(1); } FTextStream t(&file); - t << "cd %~p0\n\n"; // switch current directory with make.bat (for external calls of make.bat) + t << "set Dir_Old=%cd%\n"; + t << "cd /D %~dp0\n\n"; t << "del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf\n\n"; if (!Config_getBool("USE_PDFLATEX")) // use plain old latex { @@ -247,6 +248,7 @@ static void writeMakeBat() t << "endlocal\n"; t << mkidx_command << " refman.idx\n"; t << "pdflatex refman\n"; + t << "cd /D %Dir_Old%\n"; } #endif } From 1f877b09262f34e6bad6dbfaee4b04b4be03bd4c Mon Sep 17 00:00:00 2001 From: jannick0 Date: Wed, 21 May 2014 16:53:16 +0200 Subject: [PATCH 5/9] Update latexgen.cpp added reset of var Dir_Old at the end. --- src/latexgen.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 050af01715e..40ad8772b04 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -249,6 +249,7 @@ static void writeMakeBat() t << mkidx_command << " refman.idx\n"; t << "pdflatex refman\n"; t << "cd /D %Dir_Old%\n"; + t << "set Dir_Old=\n"; } #endif } From 8199b2d105313efd30367c7a03b57bf7a7d2180b Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 26 May 2014 20:57:36 +0200 Subject: [PATCH 6/9] Removed not implemented HTML commands from documentation This concerns the BODY and MULTICOL tags. --- doc/htmlcmds.doc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/doc/htmlcmds.doc b/doc/htmlcmds.doc index e212a643e5c..a5e40a1e16d 100644 --- a/doc/htmlcmds.doc +++ b/doc/htmlcmds.doc @@ -32,8 +32,6 @@ of a HTML tag are passed on to the HTML output only
  • \ Ends a \ section.
  • \ Starts a quotation block.
  • \ Ends the quotation block. -
  • \ Does not generate any output. -
  • \ Does not generate any output.
  • \ Forces a line break.
  • \ starts a section of centered text.
  • \ ends a section of centered text. @@ -69,8 +67,6 @@ of a HTML tag are passed on to the HTML output only
  • \ This command is written with attributes to the HTML output only.
  • \ Starts a new list item.
  • \ Ends a list item. -
  • \ ignored by doxygen. -
  • \ ignored by doxygen.
  • \ Starts a numbered item list.
  • \ Ends a numbered item list.
  • \ Starts a new paragraph. From 2030240bc18d32581479306e6fd86211e6f30c73 Mon Sep 17 00:00:00 2001 From: Chris Hansen Date: Tue, 27 May 2014 10:27:09 -0400 Subject: [PATCH 7/9] Fix FORTRAN code function scope test --- src/fortrancode.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fortrancode.l b/src/fortrancode.l index 699b3204496..e6cfddeb031 100644 --- a/src/fortrancode.l +++ b/src/fortrancode.l @@ -932,7 +932,7 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I endFontClass(); } {ID} { // local var - if (g_currentMemberDef && !g_currentMemberDef->isFunction() && bracketCount==0) + if (g_currentMemberDef && g_currentMemberDef->isFunction() && bracketCount==0) { g_code->codify(yytext); addLocalVar(yytext); From c87cceafe203a11e4074b748469e993d13cd8fb3 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 29 May 2014 01:08:55 +0100 Subject: [PATCH 8/9] Fix description of USE_PDFLATEX The tag is USE_PDFLATEX, not LATEX_PDFLATEX --- src/config.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.xml b/src/config.xml index 349c41c6f1f..4d93ee592f4 100644 --- a/src/config.xml +++ b/src/config.xml @@ -2553,7 +2553,7 @@ EXTRA_PACKAGES=times
  • \ Ends an unnumbered subsection.
  • \ Starts an unnumbered subsubsection.
  • \ Ends an unnumbered subsubsection. +
  • \ Starts an unnumbered subsubsection. +
  • \ Ends an unnumbered subsubsection. +
  • \ Starts an unnumbered subsubsection. +
  • \ Ends an unnumbered subsubsection. +
  • \ Starts an unnumbered subsubsection. +
  • \ Ends an unnumbered subsubsection.
  • \ Starts a piece of text displayed in an italic font.
  • \ Ends a \ section. -
  • \ This command is written with attributes to the HTML output only. +
  • \ This command is written with its attributes to the HTML output only. The SRC attribute is mandatory.
  • \ Starts a new list item.
  • \ Ends a list item.
  • \ Starts a numbered item list.