summaryrefslogtreecommitdiffstats
path: root/src/scanner.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2005-09-18 19:25:32 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2005-09-18 19:25:32 (GMT)
commitdb36de70fc9090e26c22ab288492407becb3a95e (patch)
treeb25e22f178d0e6d1ebb7e74f2348e9811a2f5394 /src/scanner.l
parent3b98221d43ba62088538ead3aa726f81dd9202f9 (diff)
downloadDoxygen-db36de70fc9090e26c22ab288492407becb3a95e.zip
Doxygen-db36de70fc9090e26c22ab288492407becb3a95e.tar.gz
Doxygen-db36de70fc9090e26c22ab288492407becb3a95e.tar.bz2
Release-1.4.4-20050918
Diffstat (limited to 'src/scanner.l')
-rw-r--r--src/scanner.l32
1 files changed, 21 insertions, 11 deletions
diff --git a/src/scanner.l b/src/scanner.l
index 0da3eaa..3a2bddc 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -4044,20 +4044,23 @@ IDLATTR ("["[^\]]*"]"){BN}*
<DocBlock>("@@"|"\\\\"){ID}/[^a-z_A-Z0-9] { // escaped command
docBlock+=yytext;
}
-<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"dot"|"code"|"f$"|"f["|"f{")/[^a-z_A-Z0-9] { // verbatim command (which could contain nested comments!)
+<DocBlock>{CMD}("f$"|"f["|"f{") {
docBlock+=yytext;
- if (yytext[2]=='[')
- {
- docBlockName="f]";
- }
- else if (yytext[2]=='}')
+ docBlockName=&yytext[1];
+ if (docBlockName.at(1)=='{')
{
- docBlockName="f}";
+ docBlockName.at(1)='}';
}
- else
- {
- docBlockName=&yytext[1];
- }
+ BEGIN(DocCopyBlock);
+ }
+<DocBlock>"<"{PRE}">" {
+ docBlock+=yytext;
+ docBlockName="<pre>";
+ BEGIN(DocCopyBlock);
+ }
+<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"dot"|"code")/[^a-z_A-Z0-9] { // verbatim command (which could contain nested comments!)
+ docBlock+=yytext;
+ docBlockName=&yytext[1];
BEGIN(DocCopyBlock);
}
<DocBlock>[^@*\/\\\n]+ { // any character that isn't special
@@ -4073,6 +4076,13 @@ IDLATTR ("["[^\]]*"]"){BN}*
/* ---- Copy verbatim sections ------ */
+<DocCopyBlock>"</"{PRE}">" { // end of a <pre> block
+ docBlock+=yytext;
+ if (docBlockName=="<pre>")
+ {
+ BEGIN(DocBlock);
+ }
+ }
<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddot"|"endcode"|"f$"|"f]"|"f}")/[^a-z_A-Z0-9] { // end of verbatim block
docBlock+=yytext;
if (yytext[1]=='f') // end of formula