diff options
Diffstat (limited to 'src/scanner.l')
-rw-r--r-- | src/scanner.l | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/scanner.l b/src/scanner.l index e4180dc..d3ad412 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -552,6 +552,7 @@ ATTR ({B}+[^>\n]*)? A [aA] BR [bB][rR] PRE [pP][rR][eE] +CODE [cC][oO][dD][eE] TABLE [tT][aA][bB][lL][eE] P [pP] UL [uU][lL] @@ -4709,6 +4710,18 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) docBlockName=&yytext[1]; BEGIN(DocCopyBlock); } +<DocBlock>{B}*"<code>" { + if (insideCS) + { + docBlock+=yytext; + docBlockName="<code>"; + BEGIN(DocCopyBlock); + } + else + { + REJECT; + } + } <DocBlock>[^@*\/\\\n]+ { // any character that isn't special docBlock+=yytext; } @@ -4729,6 +4742,13 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) BEGIN(DocBlock); } } +<DocCopyBlock>"</"{CODE}">" { // end of a <code> block + docBlock+=yytext; + if (docBlockName=="<code>") + { + BEGIN(DocBlock); + } + } <DocCopyBlock>[\\@]("f$"|"f]"|"f}") { docBlock+=yytext; BEGIN(DocBlock); @@ -4746,7 +4766,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) REJECT; } } -<DocCopyBlock>[^@/*\]\$\\\n]+ { // any character that is not special +<DocCopyBlock>[^\<@/*\]\$\\\n]+ { // any character that is not special docBlock+=yytext; } <DocCopyBlock>"/*"|"*/"|"//" { |