⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 doc.l

📁 doxygen(一个自动从源代码生成文档的工具)的源代码
💻 L
📖 第 1 页 / 共 5 页
字号:
  					  if (!inDateBlock)					  {					    if (inBlock()) endBlock();					    inDateBlock=TRUE;					    currentListIndent.push("D");  					    outDoc->startDescList(BaseOutputDocInterface::Date);					    scanString(theTranslator->trDate()+": ");					    outDoc->endDescTitle();					    outDoc->writeDescItem();					  }					  else					  {  					    outDoc->writeDescItem();					  }  					}<DocScan>"\\todo "[0-9]+		{ // this tag is generated in an earlier pass  					  if (Config_getBool("GENERATE_TODOLIST"))					  {					    QCString numStr=yytext;					    numStr=numStr.right(numStr.length()-6);					    bool ok; int num = numStr.toUInt(&ok);					    RefItem *item = todoList.getRefItem(num);					    ASSERT(item!=0);					    endArgumentList();					    if (inBlock()) endBlock();					    currentListIndent.push("D");					    outDoc->startDescList(BaseOutputDocInterface::Todo);					    outDoc->writeObjectLink(0,"todo",item->listAnchor,theTranslator->trTodo()+": ");					    outDoc->endDescTitle();					    outDoc->writeDescItem();					    internalParseDocument(item->text);					    outDoc->endDescList();					    currentListIndent.pop();					  }  					}<DocScan>"\\test "[0-9]+		{ // this tag is generated in an earlier pass  				          if (Config_getBool("GENERATE_TESTLIST"))					  {  					    QCString numStr=yytext;					    numStr=numStr.right(numStr.length()-6);					    bool ok; int num = numStr.toUInt(&ok);					    RefItem *item = testList.getRefItem(num);					    ASSERT(item!=0);  					    endArgumentList();					    if (inBlock()) endBlock();					    currentListIndent.push("D");  					    outDoc->startDescList(BaseOutputDocInterface::Test);					    outDoc->writeObjectLink(0,"test",item->listAnchor,theTranslator->trTest()+": ");					    outDoc->endDescTitle();					    outDoc->writeDescItem();					    internalParseDocument(item->text);					    outDoc->endDescList();					    currentListIndent.pop();					  }  					}<DocScan>"\\bug "[0-9]+			{ // this tag is generated in an earlier pass  				          if (Config_getBool("GENERATE_BUGLIST"))					  {  					    QCString numStr=yytext;					    numStr=numStr.right(numStr.length()-5);					    bool ok; int num = numStr.toUInt(&ok);					    RefItem *item = bugList.getRefItem(num);					    ASSERT(item!=0);  					    endArgumentList();					    if (inBlock()) endBlock();					    currentListIndent.push("D");  					    outDoc->startDescList(BaseOutputDocInterface::Bug);					    outDoc->writeObjectLink(0,"bug",item->listAnchor,theTranslator->trBug()+": ");					    outDoc->endDescTitle();					    outDoc->writeDescItem();					    internalParseDocument(item->text);					    outDoc->endDescList();					    currentListIndent.pop();					  }  					}<DocScan>{CMD}"deprecated"{BSEP}	{  					  endArgumentList();					  if (!inDeprecatedBlock)					  {					    if (inBlock()) endBlock();					    inDeprecatedBlock=TRUE;					    currentListIndent.push("D");					    outDoc->startDescList(BaseOutputDocInterface::Deprecated);					    scanString(theTranslator->trDeprecated()+": ");					    outDoc->endDescTitle();					    outDoc->writeDescItem();					  }					  else					  {					    outDoc->writeDescItem();					  }  					}<DocScan>"$"[a-zA-Z_0-9]+":"[^\n\$]+"$"	{ // RCS tag  					  QCString tagName(&yytext[1]);					  int i=tagName.find(':');					  tagName=tagName.left(i);					  QCString tagText=&yytext[i+2];					  tagText=tagText.left(tagText.length()-1);  				          endArgumentList();					  if (inBlock()) endBlock();					  currentListIndent.push("D");  					  outDoc->startDescList(BaseOutputDocInterface::RCS);					  scanString(tagName+": ");					  outDoc->endDescTitle();					  outDoc->writeDescItem();					  scanString(tagText);					  outDoc->endDescList();					  currentListIndent.pop();  					}<DocScan>{CMD}"author"[s]?{BSEP}	{  				          endArgumentList();  					  if (!inAuthorBlock)					  {					    if (inBlock()) endBlock();					    inAuthorBlock=TRUE;					    currentListIndent.push("D");  					    outDoc->startDescList(BaseOutputDocInterface::Author);					    bool singular = ((QString)yytext).find('s')==-1;					    scanString(theTranslator->trAuthor(TRUE,singular)+": ");					    outDoc->endDescTitle();					    outDoc->writeDescItem();					  }					  else					  {					    outDoc->docify(", ");					  }  					}<DocScan>{CMD}("return"([s])?|"result"){BSEP}	{  				          endArgumentList();  					  if (!inReturnBlock)					  {					    if (inBlock()) endBlock();					    inReturnBlock=TRUE;					    currentListIndent.push("D");  					    outDoc->startDescList(BaseOutputDocInterface::Return);					    scanString(theTranslator->trReturns()+": ");					    outDoc->endDescTitle();					    outDoc->writeDescItem();					  }  					}<DocScan>{CMD}("sa"|"see"){BSEP}        {   				          endArgumentList();  					  if (!inSeeBlock)					  {					    if (inBlock()) endBlock();					    inSeeBlock=TRUE;					    currentListIndent.push("D");					    outDoc->startDescList(BaseOutputDocInterface::See);					    scanString(theTranslator->trSeeAlso()+": ");					    outDoc->endDescTitle();					    outDoc->writeDescItem();					  }					  else					  {					    outDoc->docify(", ");					  }					}<DocScan>(({B}*"\n"){2,}{B}*)?{CMD}"param"{BSEP}	{					  QCString t=yytext;  					  if (/*t.contains('\n')>1 &&*/ insideItemList)					  {					    forceEndItemList();					  }  				          endArgumentList();  					  if (!inParamBlock)					  {					    if (inBlock()) endBlock();					    inParamBlock=TRUE;					    currentListIndent.push("D");					    outDoc->startParamList(BaseOutputDocInterface::Param);					    scanString(theTranslator->trParameters()+": ");  					    outDoc->endDescTitle();  					    outDoc->writeDescItem();					    outDoc->startDescTable();					  }					  else					  {					    outDoc->endDescTableData();					  }  				          BEGIN(DocParam);   					}<DocScan>(({B}*"\n"){2,}{B}*)?{CMD}"retval"{BSEP}	{					  QCString t=yytext;  					  if (/*t.contains('\n')>1 &&*/ insideItemList)					  {					    forceEndItemList();					  }  				          endArgumentList();  					  if (!inRetValBlock)					  {					    if (inBlock()) endBlock();					    inRetValBlock=TRUE;					    currentListIndent.push("D");					    outDoc->startParamList(BaseOutputDocInterface::RetVal);					    scanString(theTranslator->trReturnValues()+": ");  					    outDoc->endDescTitle();  					    outDoc->writeDescItem();					    outDoc->startDescTable();					  }					  else					  {					    outDoc->endDescTableData();					  }  				          BEGIN(DocParam);   					}<DocScan>(({B}*"\n"){2,}{B}*)?{CMD}("exception"|"throw")s?{BSEP}	{					  QCString t=yytext;  					  if (/*t.contains('\n')>1 &&*/ insideItemList)					  {					    forceEndItemList();					  }  					  endArgumentList();					  if (!inExceptionBlock)					  {					    if (inBlock()) endBlock();					    inExceptionBlock=TRUE;					    currentListIndent.push("D");					    outDoc->startParamList(BaseOutputDocInterface::Exception);					    scanString(theTranslator->trExceptions()+": ");  					    outDoc->endDescTitle();					    outDoc->writeDescItem();					    outDoc->startDescTable();					  }					  else					  {					    outDoc->endDescTableData();					  }					  BEGIN(DocException);  					}<DocScan>"\\capt".*<DocParam>({DOCPARAM}{BN}*","{BN}*)*{DOCPARAM}{BSEP}* {					  outDoc->startDescTableTitle();					  scanDoc(substitute(yytext,"\"","").stripWhiteSpace());					  outDoc->endDescTableTitle();					  outDoc->startDescTableData();					  BEGIN(DocScan);  					}<DocException>{SCOPENAME}		{					  outDoc->startDescTableTitle();  					  generateRef(*outDoc,className,yytext,FALSE);					  outDoc->endDescTableTitle();					  outDoc->startDescTableData();					  BEGIN(DocScan);  					}<DocScan>{CMD}"section "{ID}"\n"	{  					  QCString secName=&yytext[9];               // skip "\section "					  secName=secName.left(secName.length()-1); // remove \n					  //printf("SectionName %s found\n",secName.data());					  SectionInfo *sec;					  if ((sec=Doxygen::sectionDict[secName]))					  {					    //printf("Title %s\n",sec->title.data());					    outDoc->startSection(sec->label,sec->title,						                 sec->type==SectionInfo::Subsection);					    scanString(sec->title);					    outDoc->endSection(sec->label,						               sec->type==SectionInfo::Subsection);					  }					  else					  {					    warn(yyFileName,yyLineNr,"Warning: reference to unknown section %s in the documentation of this entity!",yytext);					  }  					}<DocScan>{CMD}"anchor "{ID}"\n"		{  					  QCString secName=&yytext[8];					  secName=secName.left(secName.length()-1);					  SectionInfo *sec;					  if ((sec=Doxygen::sectionDict[secName]))					  {					    //printf("writeAnchor %s_%s\n",sec->fileName.data(),sec->label.data());					    outDoc->writeAnchor(sec->fileName,sec->label);					  }  					}<DocScan>"\\_internalref"{B}+		{ // for internal use only!					  internalRefFile.resize(0);					  internalRefAnchor.resize(0);  					  BEGIN(DocInternalRef);  					}<DocInternalRef>[A-Z_a-z0-9.:\-\+]+	{  					  internalRefFile=yytext;					  int i = internalRefFile.find(':');					  if (i!=-1)					  {					    internalRefAnchor=internalRefFile.right(internalRefFile.length()-i-1);					    internalRefFile=internalRefFile.left(i);					  }					  //printf("InternalRef yytext=`%s' file=`%s' anchor=`%s'\n",yytext,internalRefFile.data(),internalRefAnchor.data());  					  BEGIN(DocInternalRefText);  					}<DocInternalRefText>\"[^\n\"]*\" 	{					  QCString text=substitute(yytext,"\"","");   					  outDoc->writeObjectLink(0,internalRefFile,internalRefAnchor,text);					  BEGIN(DocScan);  					}<DocScan>{CMD}"ref"/{BN}		{  					  BEGIN(DocRefName);  					}<DocScan>{CMD}"refitem"/{BN}		{  					  BEGIN(DocRefItem);  					}  /*<DocScan>{CMD}"if"/{BN}			{  					  outDoc->pushGeneratorState();					  depthIf++;					  BEGIN(DocIf);  					}<DocScan>{CMD}"endif"/[^a-z_A-Z0-9]	{					  if (--depthIf<0)					  {					    warn(yyFileName,yyLineNr,                                                 "Warning: documentation block contains \\endif without "						 "matching \\if found in documentation of this entity."                                                );					  }					  else					  {  					    outDoc->popGeneratorState();					  }  					}<DocIf>[^\n\t ]+			{  					  if (Config_getList("ENABLED_SECTIONS").find(yytext)==-1)					  {					    outDoc->disableAll();					  }					  BEGIN(DocScan);  					}  */<DocRefName>{SCOPENAME}|{FILE}		{  					  QCString ref=yytext;					  SectionInfo *sec;					  //printf(">>> ref `%s'\n",yytext);					  if ((sec=Doxygen::sectionDict[ref]))					  {					    //printf("Is a section!\n");					    QCString text;					    if (sec->title.isEmpty()) 					      text=sec->label;					    else					      text=sec->title;					    if (sec->type==SectionInfo::Anchor)					    {					      outDoc->writeObjectLink(sec->ref,sec->fileName,sec->label,text);					      if (sec->ref.isEmpty())					      {					        writePageRef(*outDoc,sec->label,0);					      }					    }					    else					    {					      //printf("  ref sec=%p sec->fileName=%s text=%s\n",sec,sec->fileName.data(),text.data());					      outDoc->writeSectionRef(sec->ref,sec->fileName,sec->label,text);					    }					  }					  else if (!generateLink(*outDoc,className,yytext,TRUE,0))					  {					    warn(yyFileName,yyLineNr,"Warning: reference to unknown section %s in the documentation of this entity!",yytext);					  }					  BEGIN(DocScan);  					}<DocRefName>({SCOPENAME}|{FILE}){B}+/"\""	{					  //printf(">>> ref `%s'\n",yytext);  					  sectionRef=yytext;					  sectionRef=sectionRef.stripWhiteSpace();					  BEGIN(DocRefArgStart);  					}<DocRefArgStart>"\""			{  					  BEGIN(DocRefArg);  					}<DocRefArg>[^\"\n]+[\n\"]		{  					  yytext[yyleng-1]='\0';					  QCString text=substitute(yytext,"\\\\","\\");					  SectionInfo *sec;					  if ((sec=Doxygen::sectionDict[sectionRef]))					  {					    //printf("Is a section!\n");					    if (sec->type==SectionInfo::Anchor)					    {					      outDoc->writeObjectLink(sec->ref,sec->fileName,sec->label,text);					      if (sec->ref.isEmpty())					      {					        writePageRef(*outDoc,sec->label,0);					      }					    }					    else					    {					      outDoc->writeSectionRef(sec->ref,sec->fileName,sec->label,text);					    }					  }					  else if (!generateLink(*outDoc,className,sectionRef,TRUE,text))					  {					    warn(yyFileName,yyLineNr,"Warning: reference to unknown section %s in the documentation of this entity!",sectionRef.data());					    outDoc->startBold();					    outDoc->writeString(" unknown reference! ");					    outDoc->endBold();					  }					  BEGIN(DocScan);  					}<DocRefItem>{ID}			{  					  sectionRef=yytext;					  BEGIN(DocRefItemName);  					}<DocRefItemName>.*/"\n"			{					  SectionInfo *sec;					  QCString text=yytext;					  if ((sec=Doxygen::sectionDict[sectionRef]))					  {					    outDoc->writeSectionRefItem(sec->fileName,sec->label,text.stripWhiteSpace());					  }					  else					  {					    warn(yyFileName,yyLineNr,"Warning: reference to unknown section %s in the documentation of this entity!",sectionRef.data());					    outDoc->startBold();					    outDoc->writeString(" unknown reference! ");					    outDoc->endBold();					  }					  BEGIN(DocScan);  					}<DocScan>{CMD}"image"{B}+		{  					  BEGIN(DocImage);   					}<DocImage>[hH][tT][mM][lL]		{  					  BEGIN(DocHtmlImageName);  					}<DocImage>[lL][aA][tT][eE][xX]		{  					  BEGIN(DocLatexImageName);  					}<DocImage>[rR][tT][fF]			{  					  BEGIN(DocRtfImageName);  					}<DocHtmlImageName>[^ \t\n]+             {  					  curImageName = findAndCopyImage(stripQuotes(yytext),IT_Html);					  curImageCaption.resize(0);					  if (curImageName.isEmpty())					  {					    BEGIN(DocScan);					  }					  else					  {					    BEGIN(DocHtmlImageOpt);					  }					}<DocHtmlImageOpt>\n			{   					  writeImage(IT_Html,0);					  BEGIN(DocScan);  					}<DocHtmlImageOpt>\"[^\n"]*\"		{					  curImageCaption=stripQuotes(yytext);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -