summaryrefslogtreecommitdiffstats
path: root/src/fortranscanner.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/fortranscanner.l')
-rw-r--r--src/fortranscanner.l14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index 0eb62a1..a5902a8 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -1028,6 +1028,20 @@ private {
startCommentBlock(TRUE);
yy_push_state(DocBackLine);
}
+ else
+ {
+ /* handle out of place !< comment as a normal comment */
+ if (YY_START == String) { yyColNr -= yyleng; REJECT; } // "!" is ignored in strings
+ // skip comment line (without docu comments "!>" "!<" )
+ /* ignore further "!" and ignore comments in Strings */
+ if ((YY_START != StrIgnore) && (YY_START != String))
+ {
+ yy_push_state(YY_START);
+ BEGIN(StrIgnore);
+ debugStr="*!";
+ //fprintf(stderr,"start comment %d\n",yyLineNr);
+ }
+ }
}
<DocBackLine>.* { // contents of current comment line
docBlock+=yytext;