summaryrefslogtreecommitdiffstats
path: root/src/doctokenizer.l
diff options
context:
space:
mode:
authorAlbert <albert.tests@gmail.com>2013-11-17 13:40:00 (GMT)
committerAlbert <albert.tests@gmail.com>2013-11-17 13:40:00 (GMT)
commit73d94c3852893eef59af1ef8252df12bb1db9371 (patch)
tree97ac01508d1c38c3eb914a9e52acbaad882d7b5d /src/doctokenizer.l
parent3c0a246bd1bcf6f0d560394fd81616260a174ae8 (diff)
downloadDoxygen-73d94c3852893eef59af1ef8252df12bb1db9371.zip
Doxygen-73d94c3852893eef59af1ef8252df12bb1db9371.tar.gz
Doxygen-73d94c3852893eef59af1ef8252df12bb1db9371.tar.bz2
Debug output for lexical analyzer
The previous commit (pull request) was missing the debug output possibility for config.l and partial for doctokinizer.l. The later is called on different places by means of the generic definition doctokinizerYYlex, which is declared by means of YY_DECL. To be able to add the debug output the YY_DECL had to be redefined to be a new function and the new function, with the debug output possibility, has to be called through the original function name.
Diffstat (limited to 'src/doctokenizer.l')
-rw-r--r--src/doctokenizer.l12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index deded6a..5ba1a72 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -320,6 +320,9 @@ static int yyread(char *buf,int max_size)
}
//--------------------------------------------------------------------------
+#define REAL_YY_DECL int doctokenizerYYlex (void)
+#define YY_DECL static int local_doctokinizer(void)
+#define LOCAL_YY_DECL local_doctokinizer()
%}
@@ -736,7 +739,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}|{LNKWORD2}
}
<St_CodeOpt>{BLANK}*"{"(".")?{LABELID}"}" {
g_token->name = yytext;
- int i=g_token->name.find('{');
+ int i=g_token->name.find('{'); /* } to keep vi happy */
g_token->name = g_token->name.mid(i+1,g_token->name.length()-i-2);
BEGIN(St_Code);
}
@@ -1387,6 +1390,13 @@ void doctokenizerYYendAutoList()
g_autoListLevel--;
}
+REAL_YY_DECL
+{
+ printlex(yy_flex_debug, TRUE, __FILE__, g_fileName);
+ int retval = LOCAL_YY_DECL;
+ printlex(yy_flex_debug, FALSE, __FILE__, g_fileName);
+ return retval;
+}
#if !defined(YY_FLEX_SUBMINOR_VERSION)
extern "C" { // some bogus code to keep the compiler happy
void doctokenizerYYdummy() { yy_flex_realloc(0,0); }