diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-09-30 15:25:14 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-09-30 15:25:14 (GMT) |
commit | e174524c861548adb3cfd48ef59a7a4551cd2bfb (patch) | |
tree | c28047dda40b8133ff1326d80fcf662cc8065c7e /src/doc.l | |
parent | 86502f97ecaea3254217d723b5f10b6405495184 (diff) | |
download | Doxygen-e174524c861548adb3cfd48ef59a7a4551cd2bfb.zip Doxygen-e174524c861548adb3cfd48ef59a7a4551cd2bfb.tar.gz Doxygen-e174524c861548adb3cfd48ef59a7a4551cd2bfb.tar.bz2 |
Release-1.2.11
Diffstat (limited to 'src/doc.l')
-rw-r--r-- | src/doc.l | 28 |
1 files changed, 24 insertions, 4 deletions
@@ -143,6 +143,7 @@ static void initParser() //----------------------------------------------------------------------------- void scanString(const char *s); +void scanDoc(const char *s); void internalParseDocument(const char *s); //----------------------------------------------------------------------------- @@ -324,7 +325,7 @@ static void verbIncludeFile(OutputDocInterface &od,const char *name) if ((fd=findFileDef(Doxygen::exampleNameDict,name,ambig))) { od.startCodeFragment(); - od.codify(fileToString(fd->absFilePath())); + od.codify(fileToString(fd->absFilePath())+"\n"); od.endCodeFragment(); } else if (ambig) @@ -909,7 +910,7 @@ TT [tT][tT] UL [uU][lL] VAR [vV][aA][rR] BLOCKQUOTE [bB][lL][oO][cC][kK][qQ][uU][oO][tT][eE] -DOCPARAM ([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") +DOCPARAM ("#")?([a-z_A-Z0-9:\<\>\=\.\-]+)|("\"".*"\"") OPNEW {B}+"new"({B}*"[]")? OPDEL {B}+"delete"({B}*"[]")? OPARG "("[a-z_A-Z0-9,\<\> \t\*\&]*")" @@ -1567,14 +1568,14 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) <DocScan>"\\capt".* <DocParam>({DOCPARAM}{BN}*","{BN}*)*{DOCPARAM}{BSEP}* { outDoc->startDescTableTitle(); - outDoc->docify(substitute(yytext,"\"","").stripWhiteSpace()); + scanDoc(substitute(yytext,"\"","").stripWhiteSpace()); outDoc->endDescTableTitle(); outDoc->startDescTableData(); BEGIN(DocScan); } <DocException>{SCOPENAME} { outDoc->startDescTableTitle(); - outDoc->docify(yytext); + generateRef(*outDoc,className,yytext,FALSE); outDoc->endDescTableTitle(); outDoc->startDescTableData(); BEGIN(DocScan); @@ -1938,6 +1939,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) } } <DocCodeBlock>{BN}*{CMD}"endcode"/[^a-z_A-Z0-9] { // needed to match things like \endcode. (note the dot) + codeBlock+="\n"; parseCode(*outDoc,className,codeBlock,exampleDoc,exampleName); //printf("Code block\n-------------\n%s\n--------------\n",codeBlock.data()); outDoc->endCodeFragment(); @@ -2449,6 +2451,24 @@ void scanString(const char *s) BEGIN( oldRule ); } +void scanDoc(const char *s) +{ + const char *oldInputString = inputString; + int oldInputPosition = inputPosition; + int oldRule = YY_START; + YY_BUFFER_STATE oldBuffer = YY_CURRENT_BUFFER; + yy_switch_to_buffer(yy_create_buffer(docYYin, YY_BUF_SIZE)); + inputString = s; + inputPosition = 0; + BEGIN( DocScan ); + docYYlex(); + yy_delete_buffer(YY_CURRENT_BUFFER); + yy_switch_to_buffer(oldBuffer); + inputString = oldInputString; + inputPosition = oldInputPosition; + BEGIN( oldRule ); +} + void internalParseDocument(const char *s) { const char *oldInputString = inputString; |