summaryrefslogtreecommitdiff
path: root/src/fortranscanner.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/fortranscanner.l')
-rwxr-xr-xsrc/fortranscanner.l9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index 328612a..20e30b2 100755
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -44,6 +44,10 @@
%option extra-type="struct fortranscannerYY_state *"
%top{
#include <stdint.h>
+// forward declare yyscan_t to improve type safety
+#define YY_TYPEDEF_YY_SCANNER_T
+struct yyguts_t;
+typedef yyguts_t *yyscan_t;
}
%{
@@ -238,6 +242,10 @@ static const char *stateToString(int state);
//-----------------------------------------------------------------------------
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
+
+// otherwise the filename would be the name of the converted file (*.cpp instead of *.l)
+static inline const char *getLexerFILE() {return __FILE__;}
+#include "doxygen_lex.h"
#define YY_USER_ACTION yyextra->colNr+=(int)yyleng;
#define INVALID_ENTRY ((Entry*)0x8)
//-----------------------------------------------------------------------------
@@ -323,7 +331,6 @@ SCOPENAME ({ID}{BS}"::"{BS})*
/** comment parsing states */
%x DocBlock
%x DocBackLine
-%x EndDoc
%x BlockData