Doxygen
Loading...
Searching...
No Matches
commentscan.l File Reference
#include <stdint.h>
#include <map>
#include <stack>
#include <string>
#include <mutex>
#include <functional>
#include <unordered_map>
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <ctype.h>
#include "qcstring.h"
#include "fileinfo.h"
#include "cite.h"
#include "commentscan.h"
#include "condparser.h"
#include "config.h"
#include "debug.h"
#include "docgroup.h"
#include "doxygen.h"
#include "entry.h"
#include "formula.h"
#include "language.h"
#include "message.h"
#include "parserintf.h"
#include "reflist.h"
#include "section.h"
#include "regex.h"
#include "util.h"
#include "trace.h"
#include "stringutil.h"
#include "doxygen_lex.h"
#include "commentscan.l.h"
Include dependency graph for commentscan.l:

Go to the source code of this file.

Classes

struct  DocCmdMap
struct  HtmlContextInfo
struct  commentscanYY_state
struct  CommentScanner::Private

Macros

#define YY_TYPEDEF_YY_SCANNER_T
#define YY_NO_INPUT   1
#define YY_NO_UNISTD_H   1
#define YY_NEVER_INTERACTIVE   1
#define unput_string(yytext, yyleng)
#define YY_INPUT(buf, result, max_size)

Typedefs

typedef yyguts_t * yyscan_t
typedef bool(* DocCmdFunc) (yyscan_t yyscanner, const QCString &name, const StringVector &optList)
typedef EntryType(* MakeEntryType) ()
using HtmlContextStack = std::vector<HtmlContextInfo>

Enumerations

enum  CommandSpacing { Invisible , Inline , Block , XRef }
enum  SectionHandling { Allowed , Replace , Escape , Break }
enum  XRefKind {
  XRef_Item , XRef_Todo , XRef_Test , XRef_Bug ,
  XRef_Deprecated , XRef_None
}
enum  OutputContext { OutputDoc , OutputBrief , OutputXRef , OutputInbody }
enum  GuardType { Guard_If , Guard_IfNot , Guard_ElseIf }

Functions

static bool handleBrief (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleFn (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleDef (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleOverload (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleEnum (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleDefGroup (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleAddToGroup (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleWeakGroup (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleNamespace (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handlePackage (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleConcept (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleClass (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHeaderFile (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleProtocol (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleCategory (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleUnion (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleStruct (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleInterface (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleIdlException (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handlePage (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleMainpage (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleFile (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleDir (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleExample (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleDetails (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleRaiseWarning (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleNoop (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleName (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleTodo (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleTest (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleBug (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleSubpage (yyscan_t yyscanner, const QCString &s, const StringVector &)
static bool handleDeprecated (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleXRefItem (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleRelated (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleRelatedAlso (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleMemberOf (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleRefItem (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleSection (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleAnchor (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleImage (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleCite (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleFormatBlock (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleAddIndex (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleIf (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleIfNot (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleElseIf (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleElse (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleEndIf (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleIngroup (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleNoSubGrouping (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleShowInitializer (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideInitializer (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleCallgraph (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideCallgraph (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleCallergraph (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideCallergraph (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleIncludegraph (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleIncludedBygraph (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleShowEnumValues (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideEnumValues (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleShowInlineSource (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideInlineSource (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideIncludegraph (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideIncludedBygraph (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleDirectoryGraph (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideDirectoryGraph (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleCollaborationgraph (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideCollaborationgraph (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleInheritanceGraph (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideInheritanceGraph (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleReferencedByRelation (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideReferencedByRelation (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleReferencesRelation (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideReferencesRelation (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleGroupgraph (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideGroupgraph (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleInternal (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleStatic (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handlePure (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handlePrivate (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handlePrivateSection (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleProtected (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleProtectedSection (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handlePublic (yyscan_t yyscanner, const QCString &s, const StringVector &)
static bool handlePublicSection (yyscan_t yyscanner, const QCString &s, const StringVector &)
static bool handleQualifier (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleToc (yyscan_t yyscanner, const QCString &s, const StringVector &)
static bool handleInherit (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleExtends (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleCopyDoc (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleCopyBrief (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleCopyDetails (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleParBlock (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleEndParBlock (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleParam (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleRetval (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleFileInfo (yyscan_t yyscanner, const QCString &cmdName, const StringVector &optList)
static bool handleFileInfoSection (yyscan_t yyscanner, const QCString &cmdName, const StringVector &optList)
static bool handleFileInfoResult (yyscan_t yyscanner, const QCString &, const StringVector &optList, bool isSection)
static bool handleLineInfo (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleModule (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleIFile (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleILine (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleIRaise (yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleIPrefix (yyscan_t yyscanner, const QCString &, const StringVector &)
static const char * stateToString (int state)
static QCString fileInfoLookup (const FileInfo &fi, const std::string &name)
static QCString stripQuotes (const char *s)
static SectionType sectionLevelToType (int level)
static void stripTrailingWhiteSpace (QCString &s)
static void initParser (yyscan_t yyscanner)
static bool checkStructuralIndicator (yyscan_t yyscanner)
static bool makeStructuralIndicator (yyscan_t yyscanner, MakeEntryType maker)
static void lineCount (yyscan_t yyscanner)
static void addXRefItem (yyscan_t yyscanner, const QCString &listName, const QCString &itemTitle, const QCString &listTitle, bool append)
static QCString addFormula (yyscan_t yyscanner)
static void checkFormula (yyscan_t yyscanner)
static void addSection (yyscan_t yyscanner, bool addYYtext=true)
static void setOutput (yyscan_t yyscanner, OutputContext ctx)
static void addAnchor (yyscan_t yyscanner, const QCString &anchor, const QCString &title="")
static void addOutput (yyscan_t yyscanner, const char *s)
static void addOutput (yyscan_t yyscanner, const QCString &s)
static void addOutput (yyscan_t yyscanner, char c)
static void endBrief (yyscan_t yyscanner)
static void handleGuard (yyscan_t yyscanner, const QCString &expr)
static int yyread (yyscan_t yyscanner, char *buf, int max_size)
static void addCite (yyscan_t yyscanner)
static void addIline (yyscan_t yyscanner, int lineNr)
static void addIlineBreak (yyscan_t yyscanner, int lineNr)
static void escapeLabel (QCString &label)
static const char * getLexerFILE ()
int yylex (yyscan_t yyscanner)

Variables

static const std::map< std::string, DocCmdMapdocCmdMap
static std::mutex g_sectionMutex
static std::mutex g_formulaMutex
static std::mutex g_citeMutex
static const reg::Ex nonBrief_re (R"( *[\\@]ifile \"[^\"]*\" [\\@]iline (\d+) [\\@]ilinebr ([ \n]*))")

Macro Definition Documentation

◆ unput_string

#define unput_string ( yytext,
yyleng )
Value:
do { for (int i=(int)yyleng-1;i>=0;i--) unput(yytext[i]); } while(0)

Definition at line 561 of file commentscan.l.

Referenced by DocTokenizer::unputString().

◆ YY_INPUT

#define YY_INPUT ( buf,
result,
max_size )
Value:
result=yyread(yyscanner,buf,max_size);
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
Definition code.l:3963

Definition at line 566 of file commentscan.l.

◆ YY_NEVER_INTERACTIVE

#define YY_NEVER_INTERACTIVE   1

Definition at line 414 of file commentscan.l.

◆ YY_NO_INPUT

#define YY_NO_INPUT   1

Definition at line 412 of file commentscan.l.

◆ YY_NO_UNISTD_H

#define YY_NO_UNISTD_H   1

Definition at line 413 of file commentscan.l.

◆ YY_TYPEDEF_YY_SCANNER_T

#define YY_TYPEDEF_YY_SCANNER_T

Definition at line 23 of file commentscan.l.

Typedef Documentation

◆ DocCmdFunc

typedef bool(* DocCmdFunc) (yyscan_t yyscanner, const QCString &name, const StringVector &optList)

Definition at line 182 of file commentscan.l.

◆ HtmlContextStack

using HtmlContextStack = std::vector<HtmlContextInfo>

Definition at line 454 of file commentscan.l.

◆ MakeEntryType

typedef EntryType(* MakeEntryType) ()

Definition at line 183 of file commentscan.l.

◆ yyscan_t

typedef yyguts_t* yyscan_t

Definition at line 25 of file commentscan.l.

Enumeration Type Documentation

◆ CommandSpacing

enum CommandSpacing
strong
Enumerator
Invisible 

command sets some property but does not appear in the output.

Inline 

command appears inline in the output which can be a brief description.

Block 

command starts a new paragraphs / ends a brief description.

XRef 

command is a cross reference (todo, bug, test, deprecated, xrefitem).

Definition at line 185 of file commentscan.l.

186{
187 Invisible, //!< command sets some property but does not appear in the output.
188 Inline, //!< command appears inline in the output which can be a brief description.
189 Block, //!< command starts a new paragraphs / ends a brief description.
190 XRef //!< command is a cross reference (todo, bug, test, deprecated, xrefitem).
@ Inline
command appears inline in the output which can be a brief description.
@ XRef
command is a cross reference (todo, bug, test, deprecated, xrefitem).
@ Invisible
command sets some property but does not appear in the output.
@ Block
command starts a new paragraphs / ends a brief description.
191};

◆ GuardType

enum GuardType
Enumerator
Guard_If 
Guard_IfNot 
Guard_ElseIf 

Definition at line 435 of file commentscan.l.

436{
437 Guard_If,
@ Guard_If
@ Guard_ElseIf
@ Guard_IfNot
440};

◆ OutputContext

Enumerator
OutputDoc 
OutputBrief 
OutputXRef 
OutputInbody 

Definition at line 427 of file commentscan.l.

428{
429 OutputDoc,
@ OutputXRef
@ OutputDoc
@ OutputBrief
@ OutputInbody
433};

◆ SectionHandling

enum SectionHandling
strong
Enumerator
Allowed 

command is allowed without restrictions in section title

Replace 

command will be handled in here / needs special handling here

Escape 

command is not-allowed in section title, it will be escaped

Break 

command is not-allowed in section title, it will end the section title

Definition at line 193 of file commentscan.l.

194{
195 Allowed, //!< command is allowed without restrictions in section title
196 Replace, //!< command will be handled in here / needs special handling here
197 Escape, //!< command is not-allowed in section title, it will be escaped
198 Break //!< command is not-allowed in section title, it will end the section title
@ Escape
command is not-allowed in section title, it will be escaped
@ Replace
command will be handled in here / needs special handling here
@ Allowed
command is allowed without restrictions in section title
@ Break
command is not-allowed in section title, it will end the section title
199};

◆ XRefKind

enum XRefKind
Enumerator
XRef_Item 
XRef_Todo 
XRef_Test 
XRef_Bug 
XRef_Deprecated 
XRef_None 

Definition at line 417 of file commentscan.l.

418{
419 XRef_Item,
420 XRef_Todo,
421 XRef_Test,
422 XRef_Bug,
@ XRef_Item
@ XRef_Deprecated
@ XRef_Todo
@ XRef_Test
@ XRef_Bug
@ XRef_None
425};

Function Documentation

◆ addAnchor()

void addAnchor ( yyscan_t yyscanner,
const QCString & anchor,
const QCString & title = "" )
static

Definition at line 4654 of file commentscan.l.

4655{
4656 std::unique_lock<std::mutex> lock(g_sectionMutex);
4657 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4659 const SectionInfo *si = sm.find(anchor);
4660 if (si)
4661 {
4662 if (!si->ref().isEmpty()) // we are from a tag file
4663 {
4664 si = sm.replace(anchor,yyextra->fileName,yyextra->lineNr,QCString(),SectionType::Anchor,0);
4665 yyextra->current->anchors.push_back(si);
4666 }
4667 else if (si->lineNr() != -1)
4668 {
4669 warn(yyextra->fileName,yyextra->lineNr,
4670 "multiple use of section label '{}' while adding anchor, (first occurrence: {}, line {})",
4671 anchor,si->fileName(),si->lineNr());
4672 }
4673 else
4674 {
4675 warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '{}' while adding anchor, (first occurrence: {})",
4676 anchor,si->fileName());
4677 }
4678 }
4679 else
4680 {
4681 si = sm.add(anchor,yyextra->fileName,yyextra->lineNr,title,SectionType::Anchor,0);
4682 yyextra->current->anchors.push_back(si);
4683 }
const T * find(const std::string &key) const
Definition linkedmap.h:47
This is an alternative implementation of QCString.
Definition qcstring.h:101
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:163
class that provide information about a section.
Definition section.h:57
QCString ref() const
Definition section.h:71
QCString fileName() const
Definition section.h:73
int lineNr() const
Definition section.h:72
singleton class that owns the list of all sections
Definition section.h:134
SectionInfo * replace(const QCString &label, const QCString &fileName, int lineNr, const QCString &title, SectionType type, int level, const QCString &ref=QCString())
Definition section.h:156
SectionInfo * add(const SectionInfo &si)
Definition section.h:138
static SectionManager & instance()
returns a reference to the singleton
Definition section.h:178
static constexpr int Anchor
Definition section.h:40
static std::mutex g_sectionMutex
#define warn(file, line, fmt,...)
Definition message.h:97
4684}

References SectionManager::add(), SectionType::Anchor, SectionInfo::fileName(), LinkedMap< T, Hash, KeyEqual, Map >::find(), g_sectionMutex, SectionManager::instance(), QCString::isEmpty(), SectionInfo::lineNr(), SectionInfo::ref(), SectionManager::replace(), and warn.

Referenced by handleImage().

◆ addCite()

void addCite ( yyscan_t yyscanner)
static

Definition at line 4457 of file commentscan.l.

4458{
4459 std::unique_lock<std::mutex> lock(g_citeMutex);
4460 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4461 QCString name(yytext);
4462 if (yytext[0] =='"')
4463 {
4464 name=yytext+1;
4465 name=name.left((int)yyleng-2);
4466 }
static CitationManager & instance()
Definition cite.cpp:86
void insert(const QCString &label)
Insert a citation identified by label into the database.
Definition cite.cpp:96
static std::mutex g_citeMutex
4468}

References g_citeMutex, CitationManager::insert(), CitationManager::instance(), and QCString::left().

◆ addFormula()

QCString addFormula ( yyscan_t yyscanner)
static

Definition at line 4381 of file commentscan.l.

4382{
4383 std::unique_lock<std::mutex> lock(g_formulaMutex);
4384 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4385 QCString formLabel;
4386 QCString formula = (yyextra->formulaPreText +
4387 yyextra->formulaText.stripLeadingAndTrailingEmptyLines() +
4388 yyextra->formulaPostText).stripWhiteSpace();
4389 //printf("formulaText=\n=1=\n{%s}\n=2=\n{%s}\n=3=\n{%s}\n===",
4390 // qPrint(yyextra->formulaText),
4391 // qPrint(yyextra->formulaText.stripLeadingAndTrailingEmptyLines()),
4392 // qPrint(formula)
4393 // );
4394 int id = FormulaManager::instance().addFormula(formula);
4395 formLabel.sprintf("\\_form#%d",id);
4396 for (int i=0;i<yyextra->formulaNewLines;i++) formLabel+="@_fakenl"; // add fake newlines to
4397 // keep the warnings
4398 // correctly aligned.
4399 return formLabel;
static FormulaManager & instance()
Definition formula.cpp:54
int addFormula(const QCString &formulaText, int width=-1, int height=-1)
Definition formula.cpp:691
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
Definition qcstring.h:260
QCString & sprintf(const char *format,...)
Definition qcstring.cpp:29
static std::mutex g_formulaMutex
4400}

References FormulaManager::addFormula(), g_formulaMutex, FormulaManager::instance(), QCString::sprintf(), and QCString::stripWhiteSpace().

◆ addIline()

void addIline ( yyscan_t yyscanner,
int lineNr )
static

Definition at line 4709 of file commentscan.l.

4710{
4711 char cmd[30];
4712 qsnprintf(cmd,30," \\iline %d ",lineNr);
4713 addOutput(yyscanner, cmd);
static void addOutput(yyscan_t yyscanner, const char *s)
#define qsnprintf
Definition qcstring.h:49
4714}

References addOutput(), and qsnprintf.

Referenced by endBrief().

◆ addIlineBreak()

void addIlineBreak ( yyscan_t yyscanner,
int lineNr )
static

Definition at line 4716 of file commentscan.l.

4717{
4718 char cmd[30];
4719 qsnprintf(cmd,30," \\iline %d \\ilinebr ",lineNr);
4720 addOutput(yyscanner, cmd);
4721}

References addOutput(), and qsnprintf.

◆ addOutput() [1/3]

void addOutput ( yyscan_t yyscanner,
char c )
inlinestatic

Definition at line 4703 of file commentscan.l.

4704{
4705 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4706 *yyextra->pOutputString+=c;
4707}

◆ addOutput() [2/3]

void addOutput ( yyscan_t yyscanner,
const char * s )
inlinestatic

◆ addOutput() [3/3]

void addOutput ( yyscan_t yyscanner,
const QCString & s )
inlinestatic

Definition at line 4695 of file commentscan.l.

4696{
4697 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4698 //printf("addOutput(yyscanner,%s)\n",s);
4699 *yyextra->pOutputString+=s;
4700}

◆ addSection()

void addSection ( yyscan_t yyscanner,
bool addYYtext = true )
static

Definition at line 4410 of file commentscan.l.

4411{
4412 std::unique_lock<std::mutex> lock(g_sectionMutex);
4413 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4415 const SectionInfo *si = sm.find(yyextra->sectionLabel);
4416 if (si)
4417 {
4418 if (!si->ref().isEmpty()) // we are from a tag file
4419 {
4420 // create a new section element
4421 if (addYYtext) yyextra->sectionTitle+=yytext;
4422 yyextra->sectionTitle=yyextra->sectionTitle.stripWhiteSpace();
4423 si = sm.replace(yyextra->sectionLabel,yyextra->fileName,yyextra->lineNr,
4424 yyextra->sectionTitle,sectionLevelToType(yyextra->sectionLevel),
4425 yyextra->sectionLevel);
static SectionType sectionLevelToType(int level)
4426
4427 // add section to this entry
4428 yyextra->current->anchors.push_back(si);
4429 }
4430 else if (si->lineNr() != -1)
4431 {
4432 warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '{}' while adding section, (first occurrence: {}, line {})",
4433 yyextra->sectionLabel,si->fileName(),si->lineNr());
4434 }
4435 else
4436 {
4437 warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '{}' while adding section, (first occurrence: {})",
4438 yyextra->sectionLabel,si->fileName());
4439 }
4440 }
4441 else
4442 {
4443 // create a new section element
4444 if (addYYtext) yyextra->sectionTitle+=yytext;
4445 yyextra->sectionTitle=yyextra->sectionTitle.stripWhiteSpace();
4446 si = sm.add(yyextra->sectionLabel,yyextra->fileName,yyextra->lineNr,
4447 yyextra->sectionTitle,sectionLevelToType(yyextra->sectionLevel),
4448 yyextra->sectionLevel);
4449
4450 // add section to this entry
4451 yyextra->current->anchors.push_back(si);
4452 }
4453}

References SectionManager::add(), SectionInfo::fileName(), LinkedMap< T, Hash, KeyEqual, Map >::find(), g_sectionMutex, SectionManager::instance(), QCString::isEmpty(), SectionInfo::lineNr(), SectionInfo::ref(), SectionManager::replace(), sectionLevelToType(), and warn.

◆ addXRefItem()

void addXRefItem ( yyscan_t yyscanner,
const QCString & listName,
const QCString & itemTitle,
const QCString & listTitle,
bool append )
static

Definition at line 4269 of file commentscan.l.

4272{
4273 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4274 if (listName.isEmpty()) return;
4275 //printf("addXRefItem(%s,%s,%s,%d)\n",listName,itemTitle,listTitle,append);
4276
4277 std::unique_lock<std::mutex> lock(g_sectionMutex);
4278
4279 RefList *refList = RefListManager::instance().add(listName,listTitle,itemTitle);
4280 RefItem *item = nullptr;
4281 for (auto it = yyextra->current->sli.rbegin(); it != yyextra->current->sli.rend(); ++it)
4282 {
4283 RefItem *i = *it;
4284 if (i && i->list()->listName()==listName)
4285 {
4286 //printf("found %s lii->type=%s\n",listName,qPrint(i->list()->listName()));
4287 item = i;
4288 break;
4289 }
4290 }
4291 if (item && append) // already found item of same type just before this one
4292 {
4293 //printf("listName=%s item id = %d existing\n",listName,item->id());
4294 item->setText(item->text() + " <p>" + yyextra->outputXRef);
4295 //printf("%s: text +=%s\n",listName,qPrint(item->text));
4296 }
4297 else // new item
4298 {
T * add(const char *k, Args &&... args)
Definition linkedmap.h:90
This struct represents an item in the list of references.
Definition reflist.h:32
QCString text() const
Definition reflist.h:45
void setText(const QCString &text)
Definition reflist.h:36
RefList * list() const
Definition reflist.h:53
List of cross-referenced items.
Definition reflist.h:80
QCString listName() const
Definition reflist.h:101
static RefListManager & instance()
Definition reflist.h:121
4299
4300 // if we have already an item from the same list type (e.g. a second @todo)
4301 // in the same Entry (i.e. lii!=0) then we reuse its link anchor.
4302 item = refList->add();
4303 //printf("listName=%s item id = %d new yyextra->current=%p\n",listName,item->id(),yyextra->current);
4304 QCString anchorLabel;
4305 anchorLabel.sprintf("_%s%06d",listName.data(),item->id());
4306 item->setText(yyextra->outputXRef);
4307 item->setAnchor(anchorLabel);
4308 yyextra->current->sli.push_back(item);
4309 QCString cmdString;
4310 cmdString.sprintf(" \\xrefitem %s %d.",qPrint(listName),item->id());
4311 if (yyextra->inBody)
4312 {
4313 yyextra->current->inbodyDocs += cmdString;
4314 }
4315 else
4316 {
4317 yyextra->current->doc += cmdString;
4318 }
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition qcstring.h:172
int id() const
Definition reflist.h:52
void setAnchor(const QCString &anchor)
Definition reflist.h:37
RefItem * add()
Definition reflist.cpp:30
const char * qPrint(const char *s)
Definition qcstring.h:687
4319
4320 {
4322 const SectionInfo *si = sm.find(anchorLabel);
4323 if (si)
4324 {
4325 if (!si->ref().isEmpty()) // we are from a tag file
4326 {
4327 si = sm.replace(anchorLabel,listName,yyextra->lineNr,
4328 yyextra->sectionTitle,SectionType::Anchor,
4329 yyextra->sectionLevel);
4330 yyextra->current->anchors.push_back(si);
4331 }
4332 else if (si->lineNr() != -1)
4333 {
4334 warn(listName,yyextra->lineNr,"multiple use of section label '{}', (first occurrence: {}, line {})",
4335 anchorLabel,si->fileName(),si->lineNr());
4336 }
4337 else
4338 {
4339 warn(listName,yyextra->lineNr,"multiple use of section label '{}', (first occurrence: {})",
4340 anchorLabel,si->fileName());
4341 }
4342 }
4343 else
4344 {
4345 si = sm.add(anchorLabel,listName,yyextra->lineNr,
4346 yyextra->sectionTitle,SectionType::Anchor,
4347 yyextra->sectionLevel);
4348 yyextra->current->anchors.push_back(si);
4349 }
4350 }
4351 }
4352 yyextra->outputXRef.clear();
4353}

References LinkedMap< T, Hash, KeyEqual, Map >::add(), RefList::add(), SectionManager::add(), SectionType::Anchor, QCString::data(), SectionInfo::fileName(), LinkedMap< T, Hash, KeyEqual, Map >::find(), g_sectionMutex, RefItem::id(), RefListManager::instance(), SectionManager::instance(), QCString::isEmpty(), SectionInfo::lineNr(), RefItem::list(), RefList::listName(), qPrint(), SectionInfo::ref(), SectionManager::replace(), RefItem::setAnchor(), RefItem::setText(), QCString::sprintf(), RefItem::text(), and warn.

Referenced by setOutput().

◆ checkFormula()

void checkFormula ( yyscan_t yyscanner)
static

Definition at line 4769 of file commentscan.l.

4770{
4771 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4772 if (YY_START==ReadFormulaShort || YY_START==ReadFormulaShortSection ||
4773 YY_START==ReadFormulaRound || YY_START==ReadFormulaRoundSection ||
4774 YY_START==ReadFormulaLong)
4775 {
4776 warn(yyextra->fileName,yyextra->lineNr,"End of comment block while inside formula.");
4777 }
4778}

References warn.

Referenced by CommentScanner::parseCommentBlock().

◆ checkStructuralIndicator()

bool checkStructuralIndicator ( yyscan_t yyscanner)
static

Definition at line 4213 of file commentscan.l.

4214{
4215 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4216 //printf("yyextra->current->section=%x\n",yyextra->current->section);
4217 return yyextra->current->section.isDoc();
4218}

Referenced by handleCategory(), handleClass(), handleConcept(), handleDef(), handleEnum(), handleFn(), handleIdlException(), handleInterface(), handleModule(), handleNamespace(), handleProtocol(), handleStruct(), and handleUnion().

◆ endBrief()

void endBrief ( yyscan_t yyscanner)
static

Definition at line 4723 of file commentscan.l.

4724{
4725 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4726 std::string_view str = yyextra->current->brief.view();
4728 if (!stripWhiteSpace(str).empty() && !reg::match(str,match,nonBrief_re))
4729 { // only go to the detailed description if we have
4730 // found some brief description and not just whitespace
4731 yyextra->briefEndsAtDot=FALSE;
4732 setOutput(yyscanner,OutputDoc);
4733 if (yyextra->current->doc.stripWhiteSpace().isEmpty())
4734 {
4735 yyextra->current->docLine = yyextra->lineNr;
4736 yyextra->current->doc = "";
4737 }
4738 else
4739 {
4740 addIline(yyscanner,yyextra->lineNr);
4741 }
4742 addOutput(yyscanner,yytext);
4743 }
4744 else
4745 {
4746 int saveLineNr = yyextra->lineNr;
4747 lineCount(yyscanner);
4748 yyextra->current->briefLine = yyextra->lineNr;
4749 yyextra->lineNr = saveLineNr;
4750 }
Object representing the matching results.
Definition regex.h:153
static const reg::Ex nonBrief_re(R"( *[\\@]ifile \"[^\"]*\" [\\@]iline (\d+) [\\@]ilinebr ([ \n]*))")
static void setOutput(yyscan_t yyscanner, OutputContext ctx)
static void addIline(yyscan_t yyscanner, int lineNr)
#define lineCount(s, len)
bool match(std::string_view str, Match &match, const Ex &re)
Matches a given string str for a match against regular expression re.
Definition regex.cpp:759
#define FALSE
Definition qcstring.h:34
std::string_view stripWhiteSpace(std::string_view s)
Given a string view s, returns a new, narrower view on that string, skipping over any leading or trai...
Definition stringutil.h:72
4751}

References addIline(), addOutput(), FALSE, lineCount, reg::match(), nonBrief_re, OutputDoc, setOutput(), and stripWhiteSpace().

◆ escapeLabel()

void escapeLabel ( QCString & label)
static

Definition at line 4358 of file commentscan.l.

4359{
4360 if (label.isEmpty()) return;
4361 char c = label[0];
4362 if (!((c>='a' && c<='z') || (c>='A' && c<='Z') || c=='_' || c<0))
4363 {
4364 label[0]='_'; // replace invalid starting char by _
4365 }
4366 for (size_t i=1; i<label.size(); i++)
4367 {
4368 c = label[i];
4369 if (!((c>='a' && c<='z') || (c>='A' && c<='Z') || (c>='0' && c<='9') || c=='_' || c<0))
4370 {
4371 label[i]='_'; // replace invalid char by _
4372 }
4373 }
size_t size() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:169
4374}

References QCString::isEmpty(), and QCString::size().

◆ fileInfoLookup()

QCString fileInfoLookup ( const FileInfo & fi,
const std::string & name )
static

Definition at line 3512 of file commentscan.l.

3513{
3514 using OptionFunc = std::function<QCString(const FileInfo &)>;
3515 static std::unordered_map<std::string,OptionFunc> options =
3516 {
3517 // name, function producing the value
3518 { "name", [](const FileInfo &fi_) -> QCString { return fi_.baseName(); } },
3519 { "extension", [](const FileInfo &fi_) -> QCString { return fi_.extension(true); } },
3520 { "filename", [](const FileInfo &fi_) -> QCString { return fi_.fileName(); } },
3521 { "directory", [](const FileInfo &fi_) -> QCString { return fi_.dirPath(); } },
3522 { "full", [](const FileInfo &fi_) -> QCString { return fi_.absFilePath(); } }
3523 };
3524 auto it = options.find(optionName);
3525 return (it!=options.end()) ? it->second(fi) : QCString();
Minimal replacement for QFileInfo.
Definition fileinfo.h:23
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43
3526}

References QCString::find().

Referenced by handleFileInfoResult().

◆ getLexerFILE()

const char * getLexerFILE ( )
inlinestatic

Definition at line 569 of file commentscan.l.

569{return __FILE__;}

◆ handleAddIndex()

bool handleAddIndex ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3495 of file commentscan.l.

3496{
3497 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3498 addOutput(yyscanner,yytext);
3499 BEGIN(LineParam);
3500 return FALSE;
3501}

References addOutput(), and FALSE.

◆ handleAddToGroup()

bool handleAddToGroup ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 2987 of file commentscan.l.

2988{
2989 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
2990 bool stop=makeStructuralIndicator(yyscanner,EntryType::makeGroupDoc);
2991 yyextra->current->groupDocType = Entry::GROUPDOC_ADD;
2992 BEGIN( GroupDocArg1 );
2993 return stop;
@ GROUPDOC_ADD
addtogroup
Definition entry.h:122
static bool makeStructuralIndicator(yyscan_t yyscanner, MakeEntryType maker)
2994}

References Entry::GROUPDOC_ADD, and makeStructuralIndicator().

◆ handleAnchor()

bool handleAnchor ( yyscan_t yyscanner,
const QCString & s,
const StringVector & optList )
static

Definition at line 3411 of file commentscan.l.

3412{
3413 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3414 addOutput(yyscanner,"@"+s+" ");
3415 if (optList.empty())
3416 {
3417 yyextra -> anchorTitle = "";
3418 }
3419 else
3420 {
3421 yyextra -> anchorTitle = join(optList," ");
3422 }
3423 BEGIN(AnchorLabel);
3424 return FALSE;
std::string join(const StringVector &sv, const std::string &delimiter)
create a string where the string in the vector are joined by the given delimiter
Definition util.cpp:6579
3425}

References addOutput(), FALSE, and join().

◆ handleBrief()

bool handleBrief ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 2933 of file commentscan.l.

2934{
2935 //printf("handleBrief\n");
2936 setOutput(yyscanner,OutputBrief);
2937 return FALSE;
2938}

References FALSE, OutputBrief, and setOutput().

◆ handleBug()

bool handleBug ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3252 of file commentscan.l.

3253{
3254 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3255 yyextra->newXRefKind = XRef_Bug;
3256 setOutput(yyscanner,OutputXRef);
3257 yyextra->xrefKind = XRef_Bug;
3258 return FALSE;
3259}

References FALSE, OutputXRef, setOutput(), and XRef_Bug.

◆ handleCallergraph()

bool handleCallergraph ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3799 of file commentscan.l.

3800{
3801 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3802 yyextra->current->commandOverrides.override_callerGraph(true); // ON
3803 return FALSE;
3804}

References FALSE.

◆ handleCallgraph()

bool handleCallgraph ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3785 of file commentscan.l.

3786{
3787 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3788 yyextra->current->commandOverrides.override_callGraph(true); // ON
3789 return FALSE;
3790}

References FALSE.

◆ handleCategory()

bool handleCategory ( yyscan_t yyscanner,
const QCString & cmd,
const StringVector &  )
static

Definition at line 3064 of file commentscan.l.

3065{ // Obj-C category
3066 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3067 yyextra->currentCmd = cmd;
3068 yyextra->currentMakeEntryType = EntryType::makeCategoryDoc;
3069 BEGIN( CategoryDocArg1 );
3070 return checkStructuralIndicator(yyscanner);
static bool checkStructuralIndicator(yyscan_t yyscanner)
3071}

References checkStructuralIndicator().

◆ handleCite()

bool handleCite ( yyscan_t yyscanner,
const QCString & s,
const StringVector & optList )
static

Definition at line 3452 of file commentscan.l.

3453{
3454 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3455 if (!yyextra->spaceBeforeCmd.isEmpty())
3456 {
3457 addOutput(yyscanner,yyextra->spaceBeforeCmd);
3458 yyextra->spaceBeforeCmd.clear();
3459 }
3460 if (optList.empty())
3461 {
3462 addOutput(yyscanner,"@"+s+" ");
3463 }
3464 else
3465 {
3466 addOutput(yyscanner,"@"+s+"{"+QCString(join(optList,","))+"} ");
3467 }
3468 BEGIN(CiteLabel);
3469 return FALSE;
3470}

References addOutput(), FALSE, and join().

◆ handleClass()

bool handleClass ( yyscan_t yyscanner,
const QCString & cmd,
const StringVector &  )
static

Definition at line 3021 of file commentscan.l.

3022{
3023 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3024 yyextra->currentCmd = cmd;
3025 yyextra->currentMakeEntryType = EntryType::makeClassDoc;
3026 BEGIN( ClassDocArg1 );
3027 return checkStructuralIndicator(yyscanner);
3028}

References checkStructuralIndicator().

◆ handleCollaborationgraph()

bool handleCollaborationgraph ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3883 of file commentscan.l.

3884{
3885 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3886 yyextra->current->commandOverrides.override_collaborationGraph(true); // ON
3887 return FALSE;
3888}

References FALSE.

◆ handleConcept()

bool handleConcept ( yyscan_t yyscanner,
const QCString & cmd,
const StringVector &  )
static

Definition at line 3030 of file commentscan.l.

3031{
3032 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3033 yyextra->currentCmd = cmd;
3034 yyextra->currentMakeEntryType = EntryType::makeConceptDoc;
3035 BEGIN( ConceptDocArg1 );
3036 return checkStructuralIndicator(yyscanner);
3037}

References checkStructuralIndicator().

◆ handleCopyBrief()

bool handleCopyBrief ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 4148 of file commentscan.l.

4149{
4150 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4151 if (yyextra->current->brief.stripWhiteSpace().isEmpty() && yyextra->current->doc.stripWhiteSpace().isEmpty())
4152 { // if we don't have a brief or detailed description yet,
4153 // then the @copybrief should end up in the brief description.
4154 // otherwise it will be copied inline (see bug691315 & bug700788)
4155 setOutput(yyscanner,OutputBrief);
4156 }
4157 if (!yyextra->spaceBeforeCmd.isEmpty())
4158 {
4159 addOutput(yyscanner,yyextra->spaceBeforeCmd);
4160 yyextra->spaceBeforeCmd.clear();
4161 }
4162 addOutput(yyscanner,"\\copybrief ");
4163 return FALSE;
4164}

References addOutput(), FALSE, OutputBrief, and setOutput().

◆ handleCopyDetails()

bool handleCopyDetails ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 4166 of file commentscan.l.

4167{
4168 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4169 setOutput(yyscanner,OutputDoc);
4170 if (!yyextra->spaceBeforeCmd.isEmpty())
4171 {
4172 addOutput(yyscanner,yyextra->spaceBeforeCmd);
4173 yyextra->spaceBeforeCmd.clear();
4174 }
4175 addOutput(yyscanner,"\\copydetails ");
4176 return FALSE;
4177}

References addOutput(), FALSE, OutputDoc, and setOutput().

◆ handleCopyDoc()

bool handleCopyDoc ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 4179 of file commentscan.l.

4180{
4181 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4182 if (yyextra->current->brief.stripWhiteSpace().isEmpty() && yyextra->current->doc.stripWhiteSpace().isEmpty())
4183 { // if we don't have a brief or detailed description yet,
4184 // then the @copybrief should end up in the brief description.
4185 // otherwise it will be copied inline (see bug691315 & bug700788)
4186 setOutput(yyscanner,OutputBrief);
4187 }
4188 if (!yyextra->spaceBeforeCmd.isEmpty())
4189 {
4190 addOutput(yyscanner,yyextra->spaceBeforeCmd);
4191 yyextra->spaceBeforeCmd.clear();
4192 }
4193 addOutput(yyscanner,"\\copybrief ");
4194 yyextra->copyDocArg.clear();
4195 yyextra->braceCount = 0;
4196 BEGIN(CopyDoc);
4197 return FALSE;
4198}

References addOutput(), FALSE, OutputBrief, and setOutput().

◆ handleDef()

bool handleDef ( yyscan_t yyscanner,
const QCString & cmd,
const StringVector &  )
static

Definition at line 2951 of file commentscan.l.

2952{
2953 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
2954 yyextra->functionProto.clear();
2955 yyextra->braceCount=0;
2956 yyextra->currentCmd = cmd;
2957 yyextra->currentMakeEntryType = EntryType::makeDefineDoc;
2958 BEGIN( FnParam );
2959 return checkStructuralIndicator(yyscanner);
2960}

References checkStructuralIndicator().

◆ handleDefGroup()

bool handleDefGroup ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 2978 of file commentscan.l.

2979{
2980 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
2981 bool stop=makeStructuralIndicator(yyscanner,EntryType::makeGroupDoc);
2982 yyextra->current->groupDocType = Entry::GROUPDOC_NORMAL;
2983 BEGIN( GroupDocArg1 );
2984 return stop;
@ GROUPDOC_NORMAL
defgroup
Definition entry.h:121
2985}

References Entry::GROUPDOC_NORMAL, and makeStructuralIndicator().

◆ handleDeprecated()

bool handleDeprecated ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3261 of file commentscan.l.

3262{
3263 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3264 yyextra->newXRefKind = XRef_Deprecated;
3265 setOutput(yyscanner,OutputXRef);
3266 yyextra->xrefKind = XRef_Deprecated;
3267 return FALSE;
3268}

References FALSE, OutputXRef, setOutput(), and XRef_Deprecated.

◆ handleDetails()

bool handleDetails ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3191 of file commentscan.l.

3192{
3193 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3194 if (yyextra->inContext!=OutputBrief)
3195 {
3196 addOutput(yyscanner," \\ilinebr\\ilinebr "); // treat @details outside brief description
3197 // as a new paragraph
3198 }
3199 setOutput(yyscanner,OutputDoc);
3200 return FALSE;
3201}

References addOutput(), FALSE, OutputBrief, OutputDoc, and setOutput().

◆ handleDir()

bool handleDir ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3160 of file commentscan.l.

3161{
3162 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3163 bool stop=makeStructuralIndicator(yyscanner,EntryType::makeDirDoc);
3164 if (!stop) yyextra->current->name = yyextra->fileName;
3165 BEGIN( FileDocArg1 );
3166 return stop;
3167}

References makeStructuralIndicator().

◆ handleDirectoryGraph()

bool handleDirectoryGraph ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3869 of file commentscan.l.

3870{
3871 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3872 yyextra->current->commandOverrides.override_directoryGraph(true); // ON
3873 return FALSE;
3874}

References FALSE.

◆ handleElse()

bool handleElse ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3687 of file commentscan.l.

3688{
3689 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3690 if (yyextra->guards->empty())
3691 {
3692 warn(yyextra->fileName,yyextra->lineNr,
3693 "found \\else without matching start command");
3694 }
3695 else if (yyextra->guards->top().hasElse())
3696 {
3697 warn(yyextra->fileName,yyextra->lineNr,
3698 "found multiple \\else commands in same \\if construct");
3699 yyextra->guards->top().setEnabled(false);
3700 yyextra->guards->top().setElse();
3701 BEGIN( SkipGuardedSection );
3702 }
3703 else
3704 {
3705 yyextra->guards->top().setElse();
3706 yyextra->spaceBeforeIf = yyextra->spaceBeforeCmd;
3707 if (yyextra->guards->top().isEnabledFound())
3708 {
3709 yyextra->guards->top().setEnabled(false);
3710 BEGIN( SkipGuardedSection );
3711 }
3712 else
3713 {
3714 yyextra->guards->top().setEnabled(true);
3715 BEGIN( GuardParamEnd );
3716 }
3717 }
3718 return FALSE;
3719}

References FALSE, and warn.

◆ handleElseIf()

bool handleElseIf ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3660 of file commentscan.l.

3661{
3662 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3663 if (yyextra->guards->empty())
3664 {
3665 warn(yyextra->fileName,yyextra->lineNr,
3666 "found \\elseif without matching start command");
3667 }
3668 else if (yyextra->guards->top().hasElse())
3669 {
3670 warn(yyextra->fileName,yyextra->lineNr,
3671 "found \\elseif command after \\else command was given in \\if construct");
3672 yyextra->guardType = Guard_ElseIf;
3673 yyextra->spaceBeforeIf = yyextra->spaceBeforeCmd;
3674 yyextra->guards->top().setEnabled(false);
3675 BEGIN(GuardParam);
3676 }
3677 else
3678 {
3679 yyextra->guardType = Guard_ElseIf;
3680 yyextra->spaceBeforeIf = yyextra->spaceBeforeCmd;
3681 yyextra->guards->top().setEnabled(false);
3682 BEGIN(GuardParam);
3683 }
3684 return FALSE;
3685}

References FALSE, Guard_ElseIf, and warn.

◆ handleEndIf()

bool handleEndIf ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3721 of file commentscan.l.

3722{
3723 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3724 if (yyextra->guards->empty())
3725 {
3726 warn(yyextra->fileName,yyextra->lineNr,
3727 "found \\endif without matching start command");
3728 }
3729 else
3730 {
3731 yyextra->guards->pop();
3732 }
3733 if (!yyextra->spaceBeforeCmd.isEmpty())
3734 {
3735 addOutput(yyscanner,yyextra->spaceBeforeCmd);
3736 yyextra->spaceBeforeCmd.clear();
3737 }
3738 if (yyextra->guards->empty())
3739 {
3740 BEGIN( GuardParamEnd );
3741 }
3742 else
3743 {
3744 if (yyextra->guards->top().isEnabled())
3745 {
3746 BEGIN( GuardParamEnd );
3747 }
3748 else
3749 {
3750 BEGIN( SkipGuardedSection );
3751 }
3752 }
3753 return FALSE;
3754}

References addOutput(), FALSE, and warn.

◆ handleEndParBlock()

bool handleEndParBlock ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3296 of file commentscan.l.

3297{
3298 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3299 if (!yyextra->insideParBlock)
3300 {
3301 warn(yyextra->fileName,yyextra->lineNr,
3302 "found \\endparblock command without matching \\parblock!");
3303 }
3304 addOutput(yyscanner,"@endparblock");
3305 setOutput(yyscanner,OutputDoc); // to end a parblock inside a xrefitem like context
3306 yyextra->insideParBlock = FALSE;
3307 return FALSE;
3308}

References addOutput(), FALSE, OutputDoc, setOutput(), and warn.

◆ handleEnum()

bool handleEnum ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 2970 of file commentscan.l.

2971{
2972 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
2973 yyextra->currentMakeEntryType = EntryType::makeEnumDoc;
2974 BEGIN( EnumDocArg1 );
2975 return checkStructuralIndicator(yyscanner);
2976}

References checkStructuralIndicator().

◆ handleExample()

bool handleExample ( yyscan_t yyscanner,
const QCString & cmd,
const StringVector & optList )
static

Definition at line 3169 of file commentscan.l.

3170{
3171 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3172 MakeEntryType sectionMaker = EntryType::makeExample;
3173 for (const auto &opt : optList)
3174 {
3175 if (opt=="lineno")
3176 {
3177 sectionMaker=EntryType::makeExampleLineno;
3178 }
3179 else
3180 {
3181 warn(yyextra->fileName,yyextra->lineNr,
3182 "unsupported option '{}' for command '\\{}'",opt,cmd);
3183 }
3184 }
3185 bool stop=makeStructuralIndicator(yyscanner,sectionMaker);
3186 if (!stop) yyextra->current->name = yyextra->fileName;
3187 BEGIN( FileDocArg1 );
3188 return stop;
EntryType(* MakeEntryType)()
3189}

References makeStructuralIndicator(), and warn.

◆ handleExtends()

bool handleExtends ( yyscan_t yyscanner,
const QCString & cmd,
const StringVector &  )
static

Definition at line 4140 of file commentscan.l.

4141{
4142 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4143 yyextra->currentCmd = cmd;
4144 BEGIN(ExtendsParam);
4145 return FALSE;
4146}

References FALSE.

◆ handleFile()

bool handleFile ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3130 of file commentscan.l.

3131{
3132 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3133 bool stop=makeStructuralIndicator(yyscanner,EntryType::makeFileDoc);
3134 if (!stop)
3135 {
3136 yyextra->current->name = yyextra->fileName;
3137 }
3138 BEGIN( FileDocArg1 );
3139 return stop;
3140}

References makeStructuralIndicator().

◆ handleFileInfo()

bool handleFileInfo ( yyscan_t yyscanner,
const QCString & cmdName,
const StringVector & optList )
static

Definition at line 3503 of file commentscan.l.

3504{
3505 return handleFileInfoResult(yyscanner,cmdName, optList, false);
static bool handleFileInfoResult(yyscan_t yyscanner, const QCString &, const StringVector &optList, bool isSection)
3506}

References handleFileInfoResult().

◆ handleFileInfoResult()

bool handleFileInfoResult ( yyscan_t yyscanner,
const QCString & ,
const StringVector & optList,
bool isSection )
static

Definition at line 3528 of file commentscan.l.

3529{
3530 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3531 if (!yyextra->spaceBeforeCmd.isEmpty())
3532 {
3533 if (isSection) yyextra->sectionTitle+=yyextra->spaceBeforeCmd;
3534 addOutput(yyscanner,yyextra->spaceBeforeCmd);
3535 yyextra->spaceBeforeCmd.clear();
3536 }
3537 bool first = true;
3538 FileInfo fi(yyextra->fileName.str());
3539 for (const auto &opt_ : optList)
3540 {
3541 QCString optStripped = QCString(opt_).stripWhiteSpace();
3542 std::string opt = optStripped.lower().str();
3543 QCString result = fileInfoLookup(fi,opt);
3544 if (!result.isEmpty())
3545 {
3546 if (!first)
3547 {
3548 warn(yyextra->fileName,yyextra->lineNr,"Multiple options specified with \\fileinfo, discarding '{}'", optStripped);
3549 }
3550 else
3551 {
3552 addOutput(yyscanner,result);
3553 if (isSection)
3554 {
3555 yyextra->sectionTitle+=result;
3556 }
3557 }
3558 first = false;
3559 }
3560 else
3561 {
3562 warn(yyextra->fileName,yyextra->lineNr,"Unknown option specified with \\fileinfo: '{}'", optStripped);
3563 }
3564 }
3565 if (first) // no options specified
3566 {
3567 if (Config_getBool(FULL_PATH_NAMES))
3568 {
3569 if (isSection) yyextra->sectionTitle+=stripFromPath(yyextra->fileName);
3570 addOutput(yyscanner,stripFromPath(yyextra->fileName));
3571 }
3572 else
3573 {
3574 if (isSection) yyextra->sectionTitle+=yyextra->fileName;
3575 addOutput(yyscanner,yyextra->fileName);
3576 }
3577 }
3578 return false;
QCString lower() const
Definition qcstring.h:249
const std::string & str() const
Definition qcstring.h:552
static QCString fileInfoLookup(const FileInfo &fi, const std::string &name)
#define Config_getBool(name)
Definition config.h:33
static QCString stripFromPath(const QCString &p, const StringVector &l)
Definition util.cpp:307
3579}

References addOutput(), Config_getBool, fileInfoLookup(), QCString::isEmpty(), QCString::lower(), QCString::str(), stripFromPath(), QCString::stripWhiteSpace(), and warn.

Referenced by handleFileInfo(), and handleFileInfoSection().

◆ handleFileInfoSection()

bool handleFileInfoSection ( yyscan_t yyscanner,
const QCString & cmdName,
const StringVector & optList )
static

Definition at line 3507 of file commentscan.l.

3508{
3509 return handleFileInfoResult(yyscanner,cmdName, optList, true);
3510}

References handleFileInfoResult().

◆ handleFn()

bool handleFn ( yyscan_t yyscanner,
const QCString & cmd,
const StringVector &  )
static

Definition at line 2940 of file commentscan.l.

2941{
2942 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
2943 yyextra->braceCount=0;
2944 yyextra->functionProto.clear();
2945 yyextra->currentCmd = cmd;
2946 yyextra->currentMakeEntryType = EntryType::makeMemberDoc;
2947 BEGIN( FnParam );
2948 return checkStructuralIndicator(yyscanner);
2949}

References checkStructuralIndicator().

◆ handleFormatBlock()

bool handleFormatBlock ( yyscan_t yyscanner,
const QCString & s,
const StringVector & optList )
static

Definition at line 3472 of file commentscan.l.

3473{
3474 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3475 if (!yyextra->spaceBeforeCmd.isEmpty())
3476 {
3477 addOutput(yyscanner,yyextra->spaceBeforeCmd);
3478 yyextra->spaceBeforeCmd.clear();
3479 }
3480 if (optList.empty())
3481 {
3482 addOutput(yyscanner,"@"+s+" ");
3483 }
3484 else
3485 {
3486 addOutput(yyscanner,"@"+s+"{"+QCString(join(optList,","))+"} ");
3487 }
3488 //printf("handleFormatBlock(%s) with option(%s)\n",qPrint(s),qPrint(opt));
3489 yyextra->blockName=s;
3490 yyextra->commentCount=0;
3491 BEGIN(FormatBlock);
3492 return FALSE;
3493}

References addOutput(), FALSE, and join().

◆ handleGroupgraph()

bool handleGroupgraph ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3897 of file commentscan.l.

3898{
3899 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3900 yyextra->current->commandOverrides.override_groupGraph(true); // ON
3901 return FALSE;
3902}

References FALSE.

◆ handleGuard()

void handleGuard ( yyscan_t yyscanner,
const QCString & expr )
static

Definition at line 4931 of file commentscan.l.

4932{
4933 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4934 CondParser prs;
4935 bool sectionEnabled = false;
4936 if (!expr.isEmpty())
4937 {
4938 sectionEnabled=prs.parse(yyextra->fileName,yyextra->lineNr,expr.stripWhiteSpace());
4939 }
4940 bool parentEnabled = yyextra->guards->top().parentVisible();
4941 if (parentEnabled)
4942 {
4943 if (
4944 (sectionEnabled && yyextra->guardType==Guard_If) ||
4945 (!sectionEnabled && yyextra->guardType==Guard_IfNot)
4946 ) // section is visible
4947 {
Copyright (C) 1997-2015 by Dimitri van Heesch.
Definition condparser.h:28
bool parse(const QCString &fileName, int lineNr, const QCString &expr)
Copyright (C) 1997-2015 by Dimitri van Heesch.
4948
4949 yyextra->guards->top().setEnabled(true);
4950 yyextra->guards->top().setEnabledFound();
4951 BEGIN( GuardParamEnd );
4952 }
4953 else if (yyextra->guardType==Guard_ElseIf)
4954 {
4955 if (yyextra->guards->top().isEnabledFound())
4956 {
4957 yyextra->guards->top().setEnabled(false);
4958 BEGIN( SkipGuardedSection );
4959 }
4960 else if (sectionEnabled)
4961 {
4962 yyextra->guards->top().setEnabled(true);
4963 yyextra->guards->top().setEnabledFound();
4964 BEGIN( GuardParamEnd );
4965 }
4966 else
4967 {
4968 yyextra->guards->top().setEnabled(false);
4969 BEGIN( SkipGuardedSection );
4970 }
4971 }
4972 else // section is invisible
4973 {
4974 BEGIN( SkipGuardedSection );
4975 }
4976 }
4977 else // invisible because of parent
4978 {
4979 BEGIN( SkipGuardedSection );
4980 }
4981}

References Guard_ElseIf, Guard_If, Guard_IfNot, QCString::isEmpty(), CondParser::parse(), and QCString::stripWhiteSpace().

◆ handleHeaderFile()

bool handleHeaderFile ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3048 of file commentscan.l.

3049{
3050 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3051 BEGIN( ClassDocArg2 );
3052 return FALSE;
3053}

References FALSE.

◆ handleHideCallergraph()

bool handleHideCallergraph ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3806 of file commentscan.l.

3807{
3808 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3809 yyextra->current->commandOverrides.override_callerGraph(false); // OFF
3810 return FALSE;
3811}

References FALSE.

◆ handleHideCallgraph()

bool handleHideCallgraph ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3792 of file commentscan.l.

3793{
3794 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3795 yyextra->current->commandOverrides.override_callGraph(false); // OFF
3796 return FALSE;
3797}

References FALSE.

◆ handleHideCollaborationgraph()

bool handleHideCollaborationgraph ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3890 of file commentscan.l.

3891{
3892 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3893 yyextra->current->commandOverrides.override_collaborationGraph(false); // OFF
3894 return FALSE;
3895}

References FALSE.

◆ handleHideDirectoryGraph()

bool handleHideDirectoryGraph ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3876 of file commentscan.l.

3877{
3878 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3879 yyextra->current->commandOverrides.override_directoryGraph(false); // OFF
3880 return FALSE;
3881}

References FALSE.

◆ handleHideEnumValues()

bool handleHideEnumValues ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3820 of file commentscan.l.

3821{
3822 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3823 yyextra->current->commandOverrides.override_enumValues(false); // OFF
3824 return FALSE;
3825}

References FALSE.

◆ handleHideGroupgraph()

bool handleHideGroupgraph ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3904 of file commentscan.l.

3905{
3906 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3907 yyextra->current->commandOverrides.override_groupGraph(false); // OFF
3908 return FALSE;
3909}

References FALSE.

◆ handleHideIncludedBygraph()

bool handleHideIncludedBygraph ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3862 of file commentscan.l.

3863{
3864 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3865 yyextra->current->commandOverrides.override_includedByGraph(false); // OFF
3866 return FALSE;
3867}

References FALSE.

◆ handleHideIncludegraph()

bool handleHideIncludegraph ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3855 of file commentscan.l.

3856{
3857 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3858 yyextra->current->commandOverrides.override_includeGraph(false); // OFF
3859 return FALSE;
3860}

References FALSE.

◆ handleHideInheritanceGraph()

bool handleHideInheritanceGraph ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3950 of file commentscan.l.

3951{
3952 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3953 yyextra->current->commandOverrides.override_inheritanceGraph(CLASS_GRAPH_t::NO); // OFF
3954 return FALSE;
3955}

References FALSE.

◆ handleHideInitializer()

bool handleHideInitializer ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3778 of file commentscan.l.

3779{
3780 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3781 yyextra->current->initLines = 0; // OFF
3782 return FALSE;
3783}

References FALSE.

◆ handleHideInlineSource()

bool handleHideInlineSource ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3834 of file commentscan.l.

3835{
3836 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3837 yyextra->current->commandOverrides.override_inlineSource(false); // OFF
3838 return FALSE;
3839}

References FALSE.

◆ handleHideReferencedByRelation()

bool handleHideReferencedByRelation ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3964 of file commentscan.l.

3965{
3966 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3967 yyextra->current->commandOverrides.override_referencedByRelation(false); // OFF
3968 return FALSE;
3969}

References FALSE.

◆ handleHideReferencesRelation()

bool handleHideReferencesRelation ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3978 of file commentscan.l.

3979{
3980 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3981 yyextra->current->commandOverrides.override_referencesRelation(false); // OFF
3982 return FALSE;
3983}

References FALSE.

◆ handleIdlException()

bool handleIdlException ( yyscan_t yyscanner,
const QCString & cmd,
const StringVector &  )
static

Definition at line 3100 of file commentscan.l.

3101{
3102 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3103 yyextra->currentCmd = cmd;
3104 yyextra->currentMakeEntryType = EntryType::makeExceptionDoc;
3105 BEGIN( ClassDocArg1 );
3106 return checkStructuralIndicator(yyscanner);
3107}

References checkStructuralIndicator().

◆ handleIf()

bool handleIf ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3624 of file commentscan.l.

3625{
3626 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3627 yyextra->guardType = Guard_If;
3628 yyextra->spaceBeforeIf = yyextra->spaceBeforeCmd;
3629 if (yyextra->guards->empty())
3630 {
3631 yyextra->guards->emplace(true);
3632 }
3633 else
3634 {
3635 bool enabled = yyextra->guards->top().isEnabled();
3636 yyextra->guards->emplace(enabled);
3637 }
3638 BEGIN(GuardParam);
3639 return FALSE;
3640}

References FALSE, and Guard_If.

◆ handleIFile()

bool handleIFile ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3601 of file commentscan.l.

3602{
3603 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3604 addOutput(yyscanner,yytext);
3605 BEGIN(IFile);
3606 return FALSE;
3607}

References addOutput(), and FALSE.

◆ handleIfNot()

bool handleIfNot ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3642 of file commentscan.l.

3643{
3644 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3645 yyextra->guardType = Guard_IfNot;
3646 yyextra->spaceBeforeIf = yyextra->spaceBeforeCmd;
3647 if (yyextra->guards->empty())
3648 {
3649 yyextra->guards->emplace(true);
3650 }
3651 else
3652 {
3653 bool enabled = yyextra->guards->top().isEnabled();
3654 yyextra->guards->emplace(enabled);
3655 }
3656 BEGIN(GuardParam);
3657 return FALSE;
3658}

References FALSE, and Guard_IfNot.

◆ handleILine()

bool handleILine ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3593 of file commentscan.l.

3594{
3595 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3596 addOutput(yyscanner,yytext);
3597 BEGIN(ILine);
3598 return FALSE;
3599}

References addOutput(), and FALSE.

◆ handleImage()

bool handleImage ( yyscan_t yyscanner,
const QCString & s,
const StringVector & optList )
static

Definition at line 3427 of file commentscan.l.

3428{
3429 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3430 for (const auto &opt : optList)
3431 {
3432 QCString locOpt(opt);
3433 locOpt = locOpt.stripWhiteSpace();
3434 if (locOpt.lower().startsWith("anchor:"))
3435 {
3436 addAnchor(yyscanner,locOpt.mid(7));
3437 break; // real option handling will be done later on
3438 }
3439 }
3440 if (optList.empty())
3441 {
3442 addOutput(yyscanner,"@"+s+" ");
3443 }
3444 else
3445 {
3446 addOutput(yyscanner,"@"+s+"{"+QCString(join(optList,","))+"} ");
3447 }
3448 BEGIN(Comment);
3449 return FALSE;
static void addAnchor(yyscan_t yyscanner, const QCString &anchor, const QCString &title="")
3450}

References addAnchor(), addOutput(), FALSE, join(), QCString::lower(), QCString::mid(), QCString::startsWith(), and QCString::stripWhiteSpace().

◆ handleIncludedBygraph()

bool handleIncludedBygraph ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3848 of file commentscan.l.

3849{
3850 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3851 yyextra->current->commandOverrides.override_includedByGraph(true); // ON
3852 return FALSE;
3853}

References FALSE.

◆ handleIncludegraph()

bool handleIncludegraph ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3841 of file commentscan.l.

3842{
3843 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3844 yyextra->current->commandOverrides.override_includeGraph(true); // ON
3845 return FALSE;
3846}

References FALSE.

◆ handleIngroup()

bool handleIngroup ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3756 of file commentscan.l.

3757{
3758 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3759 yyextra->inGroupParamFound=FALSE;
3760 BEGIN( InGroupParam );
3761 return FALSE;
3762}

References FALSE.

◆ handleInherit()

bool handleInherit ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 4133 of file commentscan.l.

4134{
4135 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4136 BEGIN(InheritParam);
4137 return FALSE;
4138}

References FALSE.

◆ handleInheritanceGraph()

bool handleInheritanceGraph ( yyscan_t yyscanner,
const QCString & ,
const StringVector & optList )
static

Definition at line 3911 of file commentscan.l.

3912{
3913 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3914 yyextra->current->commandOverrides.override_inheritanceGraph(CLASS_GRAPH_t::YES);
3915 for (const auto &opt_ : optList)
3916 {
3917 QCString opt = QCString(opt_).stripWhiteSpace().lower();
3918 if (!opt.isEmpty())
3919 {
3920 if (opt == "yes")
3921 {
3922 yyextra->current->commandOverrides.override_inheritanceGraph(CLASS_GRAPH_t::YES);
3923 }
3924 else if (opt == "graph")
3925 {
3926 yyextra->current->commandOverrides.override_inheritanceGraph(CLASS_GRAPH_t::GRAPH);
3927 }
3928 else if (opt == "builtin")
3929 {
3930 yyextra->current->commandOverrides.override_inheritanceGraph(CLASS_GRAPH_t::BUILTIN);
3931 }
3932 else if (opt == "text")
3933 {
3934 yyextra->current->commandOverrides.override_inheritanceGraph(CLASS_GRAPH_t::TEXT);
3935 }
3936 else if (opt == "no")
3937 {
3938 yyextra->current->commandOverrides.override_inheritanceGraph(CLASS_GRAPH_t::NO);
3939 }
3940 else
3941 {
3942 warn(yyextra->fileName,yyextra->lineNr,"Unknown option specified with \\inheritancegraph: '{}'",
3943 QCString(opt_).stripWhiteSpace());
3944 }
3945 }
3946 }
3947 return FALSE;
3948}

References FALSE, QCString::isEmpty(), QCString::lower(), QCString::stripWhiteSpace(), stripWhiteSpace(), and warn.

◆ handleInterface()

bool handleInterface ( yyscan_t yyscanner,
const QCString & cmd,
const StringVector &  )
static

Definition at line 3091 of file commentscan.l.

3092{
3093 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3094 yyextra->currentCmd = cmd;
3095 yyextra->currentMakeEntryType = EntryType::makeInterfaceDoc;
3096 BEGIN( ClassDocArg1 );
3097 return checkStructuralIndicator(yyscanner);
3098}

References checkStructuralIndicator().

◆ handleInternal()

bool handleInternal ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3993 of file commentscan.l.

3994{
3995 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3996 if (!Config_getBool(INTERNAL_DOCS))
3997 {
3998 // make sure some whitespace before a \internal command
3999 // is not treated as "documentation"
4000 if (yyextra->current->doc.stripWhiteSpace().isEmpty())
4001 {
4002 yyextra->current->doc.clear();
4003 }
4004 yyextra->condCount=0;
4005 BEGIN( SkipInternal );
4006 }
4007 else
4008 {
4009 // re-enabled for bug640828
4010 addOutput(yyscanner," \\internal ");
4011 yyextra->inInternalDocs = TRUE;
4012 }
4013 return FALSE;
#define TRUE
Definition qcstring.h:37
4014}

References addOutput(), Config_getBool, FALSE, and TRUE.

◆ handleIPrefix()

bool handleIPrefix ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3616 of file commentscan.l.

3617{
3618 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3619 addOutput(yyscanner,"@iprefix ");
3620 BEGIN(IRaisePrefix);
3621 return FALSE;
3622}

References addOutput(), and FALSE.

◆ handleIRaise()

bool handleIRaise ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3609 of file commentscan.l.

3610{
3611 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3612 BEGIN(IRaise);
3613 return FALSE;
3614}

References FALSE.

◆ handleLineInfo()

bool handleLineInfo ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3581 of file commentscan.l.

3582{
3583 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3584 if (!yyextra->spaceBeforeCmd.isEmpty())
3585 {
3586 addOutput(yyscanner,yyextra->spaceBeforeCmd);
3587 yyextra->spaceBeforeCmd.clear();
3588 }
3589 addOutput(yyscanner,QCString().setNum(yyextra->lineNr));
3590 return FALSE;
3591}

References addOutput(), and FALSE.

◆ handleMainpage()

bool handleMainpage ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3117 of file commentscan.l.

3118{
3119 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3120 bool stop=makeStructuralIndicator(yyscanner,EntryType::makeMainpageDoc);
3121 if (!stop)
3122 {
3123 yyextra->current->name = "mainpage";
3124 }
3125 setOutput(yyscanner,OutputDoc);
3126 BEGIN( PageDocArg2 );
3127 return stop;
3128}

References makeStructuralIndicator(), OutputDoc, and setOutput().

◆ handleMemberOf()

bool handleMemberOf ( yyscan_t yyscanner,
const QCString & cmd,
const StringVector &  )
static

Definition at line 3338 of file commentscan.l.

3339{
3340 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3341 if (!yyextra->current->relates.isEmpty())
3342 {
3343 warn(yyextra->fileName,yyextra->lineNr,
3344 "found multiple \\relates, \\relatesalso or \\memberof commands in a comment block, using last definition");
3345 }
3346 yyextra->current->relatesType = RelatesType::MemberOf;
3347 yyextra->currentCmd = cmd;
3348 BEGIN(RelatesParam1);
3349 return FALSE;
3350}

References FALSE, and warn.

◆ handleModule()

bool handleModule ( yyscan_t yyscanner,
const QCString & cmd,
const StringVector &  )
static

Definition at line 3039 of file commentscan.l.

3040{
3041 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3042 yyextra->currentCmd = cmd;
3043 yyextra->currentMakeEntryType = EntryType::makeModuleDoc;
3044 BEGIN( ModuleDocArg1 );
3045 return checkStructuralIndicator(yyscanner);
3046}

References checkStructuralIndicator().

◆ handleName()

bool handleName ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3218 of file commentscan.l.

3219{
3220 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3221 bool stop=makeStructuralIndicator(yyscanner,EntryType::makeMemberGrp);
3222 if (!stop)
3223 {
3224 yyextra->docGroup.clearHeader();
3225 BEGIN( NameParam );
3226 if (!yyextra->docGroup.isEmpty()) // end of previous member group
3227 {
3228 yyextra->docGroup.close(yyextra->current,yyextra->fileName,yyextra->lineNr,TRUE,true);
3229 }
3230 }
3231 return stop;
3232}

References makeStructuralIndicator(), and TRUE.

◆ handleNamespace()

bool handleNamespace ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3005 of file commentscan.l.

3006{
3007 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3008 yyextra->currentMakeEntryType = EntryType::makeNamespaceDoc;
3009 BEGIN( NameSpaceDocArg1 );
3010 return checkStructuralIndicator(yyscanner);
3011}

References checkStructuralIndicator().

◆ handleNoop()

bool handleNoop ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3211 of file commentscan.l.

3212{
3213 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3214 BEGIN( Noop );
3215 return FALSE;
3216}

References FALSE.

◆ handleNoSubGrouping()

bool handleNoSubGrouping ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3764 of file commentscan.l.

3765{
3766 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3767 yyextra->current->subGrouping = FALSE;
3768 return FALSE;
3769}

References FALSE.

◆ handleOverload()

bool handleOverload ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 2962 of file commentscan.l.

2963{
2964 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
2965 yyextra->functionProto.clear();
2966 BEGIN(OverloadParam);
2967 return FALSE;
2968}

References FALSE.

◆ handlePackage()

bool handlePackage ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3013 of file commentscan.l.

3014{
3015 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3016 bool stop=makeStructuralIndicator(yyscanner,EntryType::makePackageDoc);
3017 BEGIN( PackageDocArg1 );
3018 return stop;
3019}

References makeStructuralIndicator().

◆ handlePage()

bool handlePage ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3109 of file commentscan.l.

3110{
3111 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3112 bool stop=makeStructuralIndicator(yyscanner,EntryType::makePageDoc);
3113 BEGIN( PageDocArg1 );
3114 return stop;
3115}

References makeStructuralIndicator().

◆ handleParam()

bool handleParam ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3142 of file commentscan.l.

3143{
3144 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3145 // we need process param and retval arguments to escape leading underscores in case of
3146 // markdown processing, see bug775493
3147 addOutput(yyscanner,"@param ");
3148 BEGIN( ParamArg1 );
3149 return FALSE;
3150}

References addOutput(), and FALSE.

◆ handleParBlock()

bool handleParBlock ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3278 of file commentscan.l.

3279{
3280 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3281 if (yyextra->insideParBlock)
3282 {
3283 warn(yyextra->fileName,yyextra->lineNr,
3284 "found \\parblock command while already in a parblock!");
3285 }
3286 if (!yyextra->spaceBeforeCmd.isEmpty())
3287 {
3288 addOutput(yyscanner,yyextra->spaceBeforeCmd);
3289 yyextra->spaceBeforeCmd.clear();
3290 }
3291 addOutput(yyscanner,"@parblock ");
3292 yyextra->insideParBlock = TRUE;
3293 return FALSE;
3294}

References addOutput(), FALSE, TRUE, and warn.

◆ handlePrivate()

bool handlePrivate ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 4030 of file commentscan.l.

4031{
4032 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4033 yyextra->current->protection = Protection::Private;
4034 return FALSE;
4035}

References FALSE.

◆ handlePrivateSection()

bool handlePrivateSection ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 4037 of file commentscan.l.

4038{
4039 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4040 yyextra->current->protection = yyextra->protection = Protection::Private;
4041 return FALSE;
4042}

References FALSE.

◆ handleProtected()

bool handleProtected ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 4044 of file commentscan.l.

4045{
4046 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4047 yyextra->current->protection = Protection::Protected;
4048 return FALSE;
4049}

References FALSE.

◆ handleProtectedSection()

bool handleProtectedSection ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 4051 of file commentscan.l.

4052{
4053 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4054 yyextra->current->protection = yyextra->protection = Protection::Protected ;
4055 return FALSE;
4056}

References FALSE.

◆ handleProtocol()

bool handleProtocol ( yyscan_t yyscanner,
const QCString & cmd,
const StringVector &  )
static

Definition at line 3055 of file commentscan.l.

3056{ // Obj-C protocol
3057 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3058 yyextra->currentCmd = cmd;
3059 yyextra->currentMakeEntryType = EntryType::makeProtocolDoc;
3060 BEGIN( ClassDocArg1 );
3061 return checkStructuralIndicator(yyscanner);
3062}

References checkStructuralIndicator().

◆ handlePublic()

bool handlePublic ( yyscan_t yyscanner,
const QCString & s,
const StringVector &  )
static

Definition at line 4058 of file commentscan.l.

4059{
4060 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4061 yyextra->current->protection = Protection::Public;
4062 return FALSE;
4063}

References FALSE.

◆ handlePublicSection()

bool handlePublicSection ( yyscan_t yyscanner,
const QCString & s,
const StringVector &  )
static

Definition at line 4065 of file commentscan.l.

4066{
4067 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4068 yyextra->current->protection = yyextra->protection = Protection::Public;
4069 return FALSE;
4070}

References FALSE.

◆ handlePure()

bool handlePure ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 4023 of file commentscan.l.

4024{
4025 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4026 yyextra->current->virt = Specifier::Pure;
4027 return FALSE;
4028}

References FALSE.

◆ handleQualifier()

bool handleQualifier ( yyscan_t yyscanner,
const QCString & cmd,
const StringVector &  )
static

Definition at line 3985 of file commentscan.l.

3986{
3987 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3988 yyextra->currentCmd = cmd;
3989 BEGIN(Qualifier);
3990 return FALSE;
3991}

References FALSE.

◆ handleRaiseWarning()

bool handleRaiseWarning ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3203 of file commentscan.l.

3204{
3205 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3206 yyextra->raiseWarning = "";
3207 BEGIN( RaiseWarning );
3208 return FALSE;
3209}

References FALSE.

◆ handleReferencedByRelation()

bool handleReferencedByRelation ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3957 of file commentscan.l.

3958{
3959 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3960 yyextra->current->commandOverrides.override_referencedByRelation(true); // ON
3961 return FALSE;
3962}

References FALSE.

◆ handleReferencesRelation()

bool handleReferencesRelation ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3971 of file commentscan.l.

3972{
3973 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3974 yyextra->current->commandOverrides.override_referencesRelation(true); // ON
3975 return FALSE;
3976}

References FALSE.

◆ handleRefItem()

bool handleRefItem ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3352 of file commentscan.l.

3353{
3354 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3355 addOutput(yyscanner,"@refitem ");
3356 BEGIN(LineParam);
3357 return FALSE;
3358}

References addOutput(), and FALSE.

◆ handleRelated()

bool handleRelated ( yyscan_t yyscanner,
const QCString & cmd,
const StringVector &  )
static

Definition at line 3310 of file commentscan.l.

3311{
3312 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3313 if (!yyextra->current->relates.isEmpty())
3314 {
3315 warn(yyextra->fileName,yyextra->lineNr,
3316 "found multiple \\relates, \\relatesalso or \\memberof commands in a comment block, using last definition");
3317 }
3318 yyextra->current->relatesType = RelatesType::Simple;
3319 yyextra->currentCmd = cmd;
3320 BEGIN(RelatesParam1);
3321 return FALSE;
3322}

References FALSE, and warn.

◆ handleRelatedAlso()

bool handleRelatedAlso ( yyscan_t yyscanner,
const QCString & cmd,
const StringVector &  )
static

Definition at line 3324 of file commentscan.l.

3325{
3326 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3327 if (!yyextra->current->relates.isEmpty())
3328 {
3329 warn(yyextra->fileName,yyextra->lineNr,
3330 "found multiple \\relates, \\relatesalso or \\memberof commands in a comment block, using last definition");
3331 }
3332 yyextra->current->relatesType = RelatesType::Duplicate;
3333 yyextra->currentCmd = cmd;
3334 BEGIN(RelatesParam1);
3335 return FALSE;
3336}

References FALSE, and warn.

◆ handleRetval()

bool handleRetval ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3152 of file commentscan.l.

3153{
3154 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3155 addOutput(yyscanner,"@retval ");
3156 BEGIN( ParamArg1 );
3157 return FALSE;
3158}

References addOutput(), and FALSE.

◆ handleSection()

bool handleSection ( yyscan_t yyscanner,
const QCString & s,
const StringVector &  )
static

Definition at line 3360 of file commentscan.l.

3361{
3362 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3363 setOutput(yyscanner,OutputDoc);
3364 //printf("handleSection(%s) raiseLevel=%d\n",qPrint(s),yyextra->raiseLevel);
3365 BEGIN(SectionLabel);
3366 yyextra->sectionLabel.clear();
3367 // determine natural section level
3368 if (s=="section") yyextra->sectionLevel=SectionType::Section;
3369 else if (s=="subsection") yyextra->sectionLevel=SectionType::Subsection;
3370 else if (s=="subsubsection") yyextra->sectionLevel=SectionType::Subsubsection;
3371 else if (s=="paragraph") yyextra->sectionLevel=SectionType::Paragraph;
3372 else if (s=="subparagraph") yyextra->sectionLevel=SectionType::Subparagraph;
3373 else if (s=="subsubparagraph") yyextra->sectionLevel=SectionType::Subsubparagraph;
3374 // raise it if requested
3375 yyextra->sectionLevel = std::min(yyextra->sectionLevel + yyextra->raiseLevel,SectionType::MaxLevel);
3376 // rewrite the update section level to the output
3377 switch (yyextra->sectionLevel)
3378 {
3379 case SectionType::Section: addOutput(yyscanner,"@section "); break;
3380 case SectionType::Subsection: addOutput(yyscanner,"@subsection "); break;
3381 case SectionType::Subsubsection: addOutput(yyscanner,"@subsubsection "); break;
3382 case SectionType::Paragraph: addOutput(yyscanner,"@paragraph "); break;
3383 case SectionType::Subparagraph: addOutput(yyscanner,"@subparagraph "); break;
3384 case SectionType::Subsubparagraph: addOutput(yyscanner,"@subsubparagraph "); break;
3385 default: addOutput(yyscanner,"@"+s+" "); break;
3386 }
3387 return FALSE;
static constexpr int Section
Definition section.h:33
static constexpr int MaxLevel
Definition section.h:39
static constexpr int Subsection
Definition section.h:34
static constexpr int Subsubsection
Definition section.h:35
static constexpr int Paragraph
Definition section.h:36
static constexpr int Subsubparagraph
Definition section.h:38
static constexpr int Subparagraph
Definition section.h:37
3388}

References addOutput(), FALSE, SectionType::MaxLevel, OutputDoc, SectionType::Paragraph, SectionType::Section, setOutput(), SectionType::Subparagraph, SectionType::Subsection, SectionType::Subsubparagraph, and SectionType::Subsubsection.

◆ handleShowEnumValues()

bool handleShowEnumValues ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3813 of file commentscan.l.

3814{
3815 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3816 yyextra->current->commandOverrides.override_enumValues(true); // ON
3817 return FALSE;
3818}

References FALSE.

◆ handleShowInitializer()

bool handleShowInitializer ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3771 of file commentscan.l.

3772{
3773 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3774 yyextra->current->initLines = 100000; // ON
3775 return FALSE;
3776}

References FALSE.

◆ handleShowInlineSource()

bool handleShowInlineSource ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3827 of file commentscan.l.

3828{
3829 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3830 yyextra->current->commandOverrides.override_inlineSource(true); // ON
3831 return FALSE;
3832}

References FALSE.

◆ handleStatic()

bool handleStatic ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 4016 of file commentscan.l.

4017{
4018 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4019 yyextra->current->isStatic = TRUE;
4020 return FALSE;
4021}

References FALSE, and TRUE.

◆ handleStruct()

bool handleStruct ( yyscan_t yyscanner,
const QCString & cmd,
const StringVector &  )
static

Definition at line 3082 of file commentscan.l.

3083{
3084 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3085 yyextra->currentCmd = cmd;
3086 yyextra->currentMakeEntryType = EntryType::makeStructDoc;
3087 BEGIN( ClassDocArg1 );
3088 return checkStructuralIndicator(yyscanner);
3089}

References checkStructuralIndicator().

◆ handleSubpage()

bool handleSubpage ( yyscan_t yyscanner,
const QCString & s,
const StringVector &  )
static

Definition at line 3390 of file commentscan.l.

3391{
3392 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3393 if (!yyextra->current->section.isEmpty() &&
3394 !yyextra->current->section.isPageDoc() &&
3395 !yyextra->current->section.isMainpageDoc()
3396 )
3397 {
3398 warn(yyextra->fileName,yyextra->lineNr,
3399 "found \\subpage command in a comment block that is not marked as a page!");
3400 }
3401 if (!yyextra->spaceBeforeCmd.isEmpty())
3402 {
3403 addOutput(yyscanner,yyextra->spaceBeforeCmd);
3404 yyextra->spaceBeforeCmd.clear();
3405 }
3406 addOutput(yyscanner,"@"+s+" ");
3407 BEGIN(SubpageLabel);
3408 return FALSE;
3409}

References addOutput(), FALSE, and warn.

◆ handleTest()

bool handleTest ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3243 of file commentscan.l.

3244{
3245 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3246 yyextra->newXRefKind = XRef_Test;
3247 setOutput(yyscanner,OutputXRef);
3248 yyextra->xrefKind = XRef_Test;
3249 return FALSE;
3250}

References FALSE, OutputXRef, setOutput(), and XRef_Test.

◆ handleToc()

bool handleToc ( yyscan_t yyscanner,
const QCString & s,
const StringVector & optList )
static

Definition at line 4072 of file commentscan.l.

4073{
4074 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4075 if (yyextra->current->section.isPageDoc() ||
4076 yyextra->current->section.isMainpageDoc())
4077 {
4078 for (const auto &opt_ : optList)
4079 {
4080 QCString opt = QCString(opt_).stripWhiteSpace().lower();
4081 int level = SectionType::MaxLevel;
4082 int i = opt.find(':');
4083 if (i>0) // found ':' but not on position 0 what would mean just a level
4084 {
4085 char dum=0;
4086 if (sscanf(opt.right(opt.length() - i - 1).data(),"%d%c",&level,&dum) != 1)
4087 {
4088 warn(yyextra->fileName,yyextra->lineNr,"Unknown option:level specified with \\tableofcontents: '{}'",
4090 opt = "";
4091 }
4092 else
4093 {
4094 level = level<=0 ? SectionType::MaxLevel : std::min(level,SectionType::MaxLevel);
4095 opt = opt.left(i).stripWhiteSpace();
4096 }
4097 }
4098 if (!opt.isEmpty())
4099 {
4100 if (opt == "html")
4101 {
4102 yyextra->current->localToc.enableHtml(level);
4103 }
4104 else if (opt == "latex")
4105 {
4106 yyextra->current->localToc.enableLatex(level);
4107 }
4108 else if (opt == "xml")
4109 {
4110 yyextra->current->localToc.enableXml(level);
4111 }
4112 else if (opt == "docbook")
4113 {
4114 yyextra->current->localToc.enableDocbook(level);
4115 }
4116 else
4117 {
4118 warn(yyextra->fileName,yyextra->lineNr,"Unknown option specified with \\tableofcontents: '{}'",
4119 QCString(opt_).stripWhiteSpace());
4120 }
4121 }
4122 }
4123 if (yyextra->current->localToc.nothingEnabled())
4124 {
4125 // for backward compatibility
4126 yyextra->current->localToc.enableHtml(SectionType::MaxLevel);
4127 yyextra->current->localToc.enableXml(SectionType::MaxLevel);
4128 }
4129 }
4130 return FALSE;
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:166
QCString right(size_t len) const
Definition qcstring.h:234
QCString left(size_t len) const
Definition qcstring.h:229
4131}

References QCString::data(), FALSE, QCString::find(), QCString::isEmpty(), QCString::left(), QCString::length(), QCString::lower(), SectionType::MaxLevel, qPrint(), QCString::right(), QCString::stripWhiteSpace(), stripWhiteSpace(), and warn.

◆ handleTodo()

bool handleTodo ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3234 of file commentscan.l.

3235{
3236 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3237 yyextra->newXRefKind = XRef_Todo;
3238 setOutput(yyscanner,OutputXRef);
3239 yyextra->xrefKind = XRef_Todo;
3240 return FALSE;
3241}

References FALSE, OutputXRef, setOutput(), and XRef_Todo.

◆ handleUnion()

bool handleUnion ( yyscan_t yyscanner,
const QCString & cmd,
const StringVector &  )
static

Definition at line 3073 of file commentscan.l.

3074{
3075 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3076 yyextra->currentCmd = cmd;
3077 yyextra->currentMakeEntryType = EntryType::makeUnionDoc;
3078 BEGIN( ClassDocArg1 );
3079 return checkStructuralIndicator(yyscanner);
3080}

References checkStructuralIndicator().

◆ handleWeakGroup()

bool handleWeakGroup ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 2996 of file commentscan.l.

2997{
2998 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
2999 bool stop=makeStructuralIndicator(yyscanner,EntryType::makeGroupDoc);
3000 yyextra->current->groupDocType = Entry::GROUPDOC_WEAK;
3001 BEGIN( GroupDocArg1 );
3002 return stop;
@ GROUPDOC_WEAK
weakgroup
Definition entry.h:123
3003}

References Entry::GROUPDOC_WEAK, and makeStructuralIndicator().

◆ handleXRefItem()

bool handleXRefItem ( yyscan_t yyscanner,
const QCString & ,
const StringVector &  )
static

Definition at line 3270 of file commentscan.l.

3271{
3272 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
3273 yyextra->newXRefKind = XRef_Item;
3274 BEGIN(XRefItemParam1);
3275 return FALSE;
3276}

References FALSE, and XRef_Item.

◆ initParser()

void initParser ( yyscan_t yyscanner)
static

Definition at line 4202 of file commentscan.l.

4203{
4204 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4205 yyextra->sectionLabel.clear();
4206 yyextra->sectionTitle.clear();
4207 yyextra->docGroup.clearHeader();
4208 yyextra->insideParBlock = FALSE;
4209}

References FALSE.

Referenced by CommentScanner::parseCommentBlock(), parseMain(), and parseMain().

◆ lineCount()

void lineCount ( yyscan_t yyscanner)
static

Definition at line 4246 of file commentscan.l.

4247{
4248 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4249 for( const char* c = yytext ; *c ; ++c )
4250 yyextra->lineNr += (*c == '\n') ;
4251}

◆ makeStructuralIndicator()

bool makeStructuralIndicator ( yyscan_t yyscanner,
MakeEntryType maker )
static

Definition at line 4220 of file commentscan.l.

4221{
4222 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4223 assert(maker!=nullptr); // detect programming error
4224 //printf("yyextra->current->section=%x\n",yyextra->current->section);
4225 if (yyextra->current->section.isDoc())
4226 {
4227 return true;
4228 }
4229 else if (maker)
4230 {
4231 yyextra->needNewEntry = true;
4232 yyextra->current->section = maker();
4233 yyextra->current->fileName = yyextra->fileName;
4234 yyextra->current->startLine = yyextra->lineNr;
4235 if (yyextra->current->docLine == -1) yyextra->current->docLine = yyextra->lineNr;
4236 return false;
4237 }
4238 else
4239 {
4240 return false;
4241 }
4242}

Referenced by handleAddToGroup(), handleDefGroup(), handleDir(), handleExample(), handleFile(), handleMainpage(), handleName(), handlePackage(), handlePage(), and handleWeakGroup().

◆ sectionLevelToType()

SectionType sectionLevelToType ( int level)
static

Definition at line 4404 of file commentscan.l.

4405{
4406 if (level>=0 && level<SectionType::MaxLevel) return SectionType(level);
4407 return SectionType::Anchor;
4408}

References SectionType::Anchor, and SectionType::MaxLevel.

Referenced by addSection().

◆ setOutput()

void setOutput ( yyscan_t yyscanner,
OutputContext ctx )
inlinestatic

Definition at line 4502 of file commentscan.l.

4503{
4504 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4505 bool xrefAppendToPrev = yyextra->xrefAppendFlag;
4506 // determine append flag for the next item (i.e. the end of this item)
4507 yyextra->xrefAppendFlag = !yyextra->inBody &&
4508 yyextra->inContext==OutputXRef && ctx==OutputXRef && // two consecutive xref items
4509 yyextra->newXRefKind==yyextra->xrefKind && // of the same kind
4510 (yyextra->xrefKind!=XRef_Item ||
4511 yyextra->newXRefItemKey==yyextra->xrefItemKey); // with the same key if \xrefitem
4512 //printf("%d && %d && %d && (%d || %d)\n",
4513 // yyextra->inContext==OutputXRef,
4514 // ctx==OutputXRef,
4515 // yyextra->newXRefKind==yyextra->xrefKind,
4516 // yyextra->xrefKind!=XRef_Item,
4517 // yyextra->newXRefItemKey==yyextra->xrefItemKey);
4518 //printf("refKind=%d yyextra->newXRefKind=%d xrefAppendToPrev=%d yyextra->xrefAppendFlag=%d\n",
4519 // yyextra->xrefKind,yyextra->newXRefKind,xrefAppendToPrev,yyextra->xrefAppendFlag);
4520
4521 //printf("setOutput(yyscanner,yyextra->inContext=%d ctx=%d)\n",yyextra->inContext,ctx);
4522 if (yyextra->inContext==OutputXRef) // end of XRef section => add the item
4523 {
4524 // See if we can append this new xref item to the previous one.
4525 // We know this at the start of the next item of the same
4526 // type and need to remember this until the end of that item.
4527 switch(yyextra->xrefKind)
4528 {
4529 case XRef_Todo:
4530 addXRefItem(yyscanner,QCString("todo"),
4531 theTranslator->trTodo(),
4532 theTranslator->trTodoList(),
4533 xrefAppendToPrev
4534 );
4535 break;
4536 case XRef_Test:
4537 addXRefItem(yyscanner,QCString("test"),
4538 theTranslator->trTest(),
4539 theTranslator->trTestList(),
4540 xrefAppendToPrev
4541 );
4542 break;
4543 case XRef_Bug:
4544 addXRefItem(yyscanner,QCString("bug"),
4545 theTranslator->trBug(),
4546 theTranslator->trBugList(),
4547 xrefAppendToPrev
4548 );
4549 break;
4550 case XRef_Deprecated:
4551 addXRefItem(yyscanner,QCString("deprecated"),
4552 theTranslator->trDeprecated(),
4553 theTranslator->trDeprecatedList(),
4554 xrefAppendToPrev
4555 );
4556 break;
4557 case XRef_Item: // user defined list
4558 addXRefItem(yyscanner,yyextra->xrefItemKey,
4559 yyextra->xrefItemTitle,
4560 yyextra->xrefListTitle,
4561 xrefAppendToPrev
4562 );
4563 break;
4564 case XRef_None:
4565 ASSERT(0);
4566 break;
4567 }
4568 }
4569 yyextra->xrefItemKey = yyextra->newXRefItemKey;
static void addXRefItem(yyscan_t yyscanner, const QCString &listName, const QCString &itemTitle, const QCString &listTitle, bool append)
Translator * theTranslator
Definition language.cpp:71
#define ASSERT(x)
Definition qcstring.h:39
4570
4571 int oldContext = yyextra->inContext;
4572 yyextra->inContext = ctx;
4573 if (yyextra->inContext!=OutputXRef && yyextra->inBody) yyextra->inContext=OutputInbody;
4574 switch(yyextra->inContext)
4575 {
4576 case OutputDoc:
4577 if (oldContext!=yyextra->inContext)
4578 {
4579 stripTrailingWhiteSpace(yyextra->current->doc);
4580 if (yyextra->current->doc.isEmpty()) yyextra->current->docLine = yyextra->lineNr;
4581 if (yyextra->current->docFile.isEmpty())
4582 {
4583 yyextra->current->docFile = yyextra->fileName;
4584 yyextra->current->docLine = yyextra->lineNr;
4585 }
4586 }
4587 yyextra->pOutputString = &yyextra->current->doc;
4588 break;
4589 case OutputBrief:
4590 {
4591 if (oldContext!=yyextra->inContext)
4592 {
4593 if (yyextra->current->brief.isEmpty()) yyextra->current->briefLine = yyextra->lineNr;
4594 if (yyextra->current->briefFile.isEmpty())
4595 {
4596 yyextra->current->briefFile = yyextra->fileName;
4597 yyextra->current->briefLine = yyextra->lineNr;
4598 }
4599 }
4600 bool foundMatch = false;
4601 if (yyextra->current->brief.stripWhiteSpace().isEmpty()) // we only want one brief
4602 // description even if multiple
4603 // are given...
4604 {
4605 foundMatch = true;
4606 }
4607 else
4608 {
4609 std::string str = yyextra->current->brief.str();
4611 if (reg::match(str,match,nonBrief_re)) // match found
4612 {
4613 size_t cnt = 0;
4614 for (size_t i = 0; i < match[2].str().size(); i++)
4615 {
4616 if (match[2].str()[i] == '\n') cnt++;
4617 }
4618 if (cnt>0)
4619 {
4620 yyextra->current->brief = yyextra->current->brief.left(yyextra->current->brief.length()-cnt);
4621 // set warning line correct
4622 yyextra->current->brief += " \\iline " + QCString().setNum(cnt + static_cast<int>(std::stoul(match[1].str()))) + " \\ilinebr ";
4623 }
4624 foundMatch = true;
4625 }
4626 }
4627 if (foundMatch)
4628 {
4629 yyextra->pOutputString = &yyextra->current->brief;
4630 }
4631 else
4632 {
4633 if (!yyextra->current->doc.isEmpty()) // when appending parts add a new line
4634 {
4635 yyextra->current->doc += "\n";
4636 }
4637 yyextra->pOutputString = &yyextra->current->doc;
4638 yyextra->inContext = OutputDoc; // need to switch to detailed docs, see bug 631380
4639 }
4640 }
4641 break;
4642 case OutputXRef:
4643 yyextra->pOutputString = &yyextra->outputXRef;
4644 // first item found, so can't append to previous
4645 //yyextra->xrefAppendFlag = FALSE;
4646 break;
4647 case OutputInbody:
4648 yyextra->pOutputString = &yyextra->current->inbodyDocs;
4649 break;
4650 }
QCString & setNum(short n)
Definition qcstring.h:459
static void stripTrailingWhiteSpace(QCString &s)
4651}

References addXRefItem(), ASSERT, reg::match(), nonBrief_re, OutputBrief, OutputDoc, OutputInbody, OutputXRef, QCString::setNum(), stripTrailingWhiteSpace(), theTranslator, XRef_Bug, XRef_Deprecated, XRef_Item, XRef_None, XRef_Test, and XRef_Todo.

Referenced by endBrief(), handleBrief(), handleBug(), handleCopyBrief(), handleCopyDetails(), handleCopyDoc(), handleDeprecated(), handleDetails(), handleEndParBlock(), handleMainpage(), handleSection(), handleTest(), handleTodo(), and CommentScanner::parseCommentBlock().

◆ stateToString()

const char * stateToString ( int state)
static

◆ stripQuotes()

QCString stripQuotes ( const char * s)
static

Definition at line 4255 of file commentscan.l.

4256{
4257 QCString name;
4258 if (s==nullptr || *s==0) return name;
4259 name=s;
4260 if (name.at(0)=='"' && name.at(name.length()-1)=='"')
4261 {
4262 name=name.mid(1,name.length()-2);
4263 }
4264 return name;
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:241
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:593
4265}

References QCString::at(), QCString::length(), and QCString::mid().

◆ stripTrailingWhiteSpace()

void stripTrailingWhiteSpace ( QCString & s)
static

Definition at line 4474 of file commentscan.l.

4475{
4476 size_t len = s.length();
4477 int i = (int)len-1;
4478 while (i>=0)
4479 {
4480 char c = s.at(i);
4481 if (c==' ' || c=='\t' || c=='\r') // normal whitespace
4482 {
4483 i--;
4484 }
4485 else if (c=='r' && i>=7 && literal_at(s.data()+i-7,"\\ilinebr")) // special line break marker
4486 {
4487 i-=8;
4488 }
4489 else // non-whitespace
4490 {
4491 break;
4492 }
4493 }
4494 //printf("stripTrailingWhitespace(%s) i=%d len=%d\n",qPrint(s),i,len);
4495 if (i!=(int)len-1)
4496 {
4497 s.resize(i+1); // string up to and including char at pos i
4498 }
void resize(size_t newlen)
Definition qcstring.h:180
bool literal_at(const char *data, const char(&str)[N])
returns TRUE iff data points to a substring that matches string literal str
Definition stringutil.h:98
4499}

References QCString::at(), QCString::data(), QCString::length(), literal_at(), and QCString::resize().

Referenced by setOutput().

◆ yylex()

int yylex ( yyscan_t yyscanner)

Definition at line 700 of file commentscan.l.

719 {CMD}{CMD}[a-z_A-Z]+{B}* { // escaped command
720 addOutput(yyscanner,yytext);
721 }
722<Comment>{CMD}{CMD}"~"[a-z_A-Z]* { // escaped command
723 addOutput(yyscanner,yytext);
724 }
725<Comment>{MAILADDR} { // mail address
726 addOutput(yyscanner,yytext);
727 }
728<Comment>"\""[^"\n]*"\"" { // quoted text
729 addOutput(yyscanner,yytext);
730 }
731<Comment>("\\"[a-z_A-Z]+)+"\\" { // directory (or chain of commands!)
732 addOutput(yyscanner,yytext);
733 }
734<Comment>"<"{DETAILEDHTML}{ATTR}">" { // HTML command that ends a brief description
735 QCString htmlOpenTag(yytext);
736 int spacePos = htmlOpenTag.find(' '); // check for optional attributes
737 if (spacePos==-1) spacePos=yyleng-1;
738 QCString htmlTagName = htmlOpenTag.mid(1,spacePos-1);
739 //printf("found open tag '%s'\n",qPrint(htmlTagName));
740 yyextra->htmlContextStack.emplace_back(htmlTagName,yyextra->inContext);
741 if (yyextra->inContext==OutputBrief)
742 {
743 setOutput(yyscanner,OutputDoc);
744 }
745 // continue with the same input
746 REJECT;
747 }
748<Comment>"</"{DETAILEDHTML}">" { // HTML command that ends a brief description
749 QCString htmlCloseTag(yytext);
750 QCString htmlTagName = htmlCloseTag.mid(2,htmlCloseTag.length()-3);
751 //printf("found close tag '%s'\n",qPrint(htmlTagName));
752 if (!yyextra->htmlContextStack.empty() &&
753 yyextra->htmlContextStack.back().tagName==htmlTagName)
754 {
755 if (yyextra->inContext==OutputXRef && yyextra->htmlContextStack.back().context!=OutputXRef)
756 {
757 //printf("switching back to OutputDoc\n");
758 setOutput(yyscanner,OutputDoc);
759 }
760 yyextra->htmlContextStack.pop_back();
761 }
762 REJECT;
763 }
764<Comment>"<"{DETAILEDHTMLOPT}">" { // HTML <code> command that ends a brief description
765 // without attributes
766 if (yyextra->current->lang==SrcLangExt::CSharp)
767 {
768 yyextra->CScode=true;
769 setOutput(yyscanner,OutputDoc);
770 addOutput(yyscanner,"@code{cs}");
771 }
772 else
773 {
774 // continue with the same input
775 REJECT;
776 }
777 }
778<Comment>"<"{DETAILEDHTMLOPTEND}">" { // HTML command that ends a brief description
779 if (yyextra->CScode)
780 {
781 addOutput(yyscanner,"@endcode");
782 yyextra->CScode=false;
783 }
784 else
785 {
786 yyextra->CScode=false;
787 // continue with the same input
788 REJECT;
789 }
790 }
791<Comment>"<"{DETAILEDHTMLOPT}{ATTR}">" { // HTML <code> command that ends a brief description
792 // with attributes, so cannot be CS.
793 if (yyextra->current->lang==SrcLangExt::CSharp)
794 {
795 setOutput(yyscanner,OutputDoc);
796 }
797 // continue with the same input
798 REJECT;
799 }
800<Comment>"<"{DETAILS}{ATTR}">" { // start of a HTML style details description
801 yyextra->htmlDetailsStack.push_back(0);
802 yyextra->htmlContextStack.emplace_back("details",yyextra->inContext);
803 if (yyextra->inContext==OutputBrief)
804 {
805 setOutput(yyscanner,OutputDoc);
806 }
807 addOutput(yyscanner,yytext);
808 }
809<Comment>"</"{DETAILS}">" { // end of a HTML style details description
810 if (!yyextra->htmlDetailsStack.empty())
811 {
812 yyextra->htmlDetailsStack.pop_back();
813 }
814 if (!yyextra->htmlContextStack.empty() &&
815 yyextra->htmlContextStack.back().tagName=="details")
816 {
817 if (yyextra->inContext==OutputXRef && yyextra->htmlContextStack.back().context!=OutputXRef)
818 {
819 //printf("switching back to OutputDoc\n");
820 setOutput(yyscanner,OutputDoc);
821 }
822 yyextra->htmlContextStack.pop_back();
823 }
824 addOutput(yyscanner,yytext);
825 }
826<Comment>"<"{AHTML} { // potential start of HTML anchor, see issue 9200
827 yyextra->htmlAnchorStr = yytext;
828 yyextra->htmlAnchor = false;
829 BEGIN(HtmlA);
830 }
831<HtmlA>{ANCHTML} { // only labels that can be converted to doxygen anchor
832 yyextra->htmlAnchorStr += yytext;
833 QCString tag(yytext);
834 int s=tag.find("=");
835 char c=tag[s+1];
836 QCString id;
837 if (c=='\'' || c=='"') // valid start
838 {
839 int e=tag.find(c,s+2);
840 if (e!=-1) // found matching end
841 {
842 id=tag.mid(s+2,e-s-2); // extract id
843 addAnchor(yyscanner,id);
844 }
845 }
846 else
847 {
848 id=tag.mid(s+1);
849 addAnchor(yyscanner,id);
850 }
851 if (!id.isEmpty() && !yyextra->htmlAnchor)
852 {
853 // only use first analogous to what is in docparser
854 addOutput(yyscanner,"@anchor ");
855 addOutput(yyscanner,id.data());
856 addOutput(yyscanner," ");
857 yyextra->htmlAnchor = true;
858 }
859 }
860<HtmlA>("\""[^\n\"]*"\""|"'"[^\n']*"'") {
861 yyextra->htmlAnchorStr += yytext;
862 }
863<HtmlA>">"|"/>" {
864 if (!yyextra->htmlAnchor)
865 {
866 addOutput(yyscanner,yyextra->htmlAnchorStr);
867 addOutput(yyscanner,yytext);
868 }
869 else
870 {
871 if (yyleng == 1) // to keep <a></a> pairs, otherwise single </a> present
872 {
873 addOutput(yyscanner,"<a>");
874 }
875 }
876 BEGIN(Comment);
877 }
878<HtmlA>{DOCNL} { // newline
879 yyextra->htmlAnchorStr += yytext;
880 if (*yytext == '\n') yyextra->lineNr++;
881 }
882<HtmlA>. { // catch-all for anything else
883 yyextra->htmlAnchorStr += yytext;
884 }
885<Comment>"<"{SUMMARY}">" { // start of a .NET XML style brief description
886 if (yyextra->htmlDetailsStack.empty())
887 {
888 setOutput(yyscanner,OutputBrief);
889 }
890 else // HTML5 style <summary> as part of <details> section.
891 {
892 addOutput(yyscanner,yytext);
893 }
894 }
895<Comment>"<"{REMARKS}">" { // start of a .NET XML style detailed description
896 setOutput(yyscanner,OutputDoc);
897 addOutput(yyscanner,yytext);
898 }
899<Comment>"</"{SUMMARY}">" { // start of a .NET XML style detailed description
900 if (!yyextra->htmlDetailsStack.empty())
901 {
902 addOutput(yyscanner,yytext);
903 }
904 else
905 {
906 setOutput(yyscanner,OutputDoc);
907 }
908 }
909<Comment>"</"{REMARKS}">" { // end of a brief or detailed description
910 setOutput(yyscanner,OutputDoc);
911 addOutput(yyscanner,yytext);
912 }
913<Comment>"<"{CAPTION}{ATTR}">" {
914 QCString tag(yytext);
915 int s=tag.find("id=");
916 if (s!=-1) // command has id attribute
917 {
918 char c=tag[s+3];
919 if (c=='\'' || c=='"') // valid start
920 {
921 int e=tag.find(c,s+4);
922 if (e!=-1) // found matching end
923 {
924 QCString id=tag.mid(s+4,e-s-4); // extract id
925 addAnchor(yyscanner,id);
926 }
927 }
928 }
929 addOutput(yyscanner,yytext);
930 }
931<Comment>"<"{PRE}{ATTR}">" {
932 yyextra->insidePre=TRUE;
933 addOutput(yyscanner,yytext);
934 }
935<Comment>"</"{PRE}">" {
936 yyextra->insidePre=FALSE;
937 addOutput(yyscanner,yytext);
938 }
939<Comment>{RCSTAG} { // RCS tag which end a brief description
940 setOutput(yyscanner,OutputDoc);
941 REJECT;
942 }
943<Comment>"<!--" {
944 BEGIN(HtmlComment);
945 }
946<Comment>"<!\‍[CDATA\‍[" {
947 BEGIN(CdataSection);
948 }
949<Comment>{B}*{CMD}"endinternal"{B}* {
950 addOutput(yyscanner," \\endinternal ");
951 if (!yyextra->inInternalDocs)
952 warn(yyextra->fileName,yyextra->lineNr,
953 "found \\endinternal without matching \\internal"
954 );
955 yyextra->inInternalDocs = FALSE;
956 }
957<Comment>{B}*"\\ilinebr "{B}* { // preserve spacing around \\ilinebr
958 addOutput(yyscanner,yytext);
959 }
960<Comment>(\n|"\\ilinebr ")/({B}*(\n|{IFILELINE}?"\\ilinebr "))+ { // at least one blank line (or blank line command)
961 if (yyextra->inContext==OutputBrief)
962 {
963 endBrief(yyscanner);
964 }
965 else
966 {
967 REJECT;
968 }
969 }
static void endBrief(yyscan_t yyscanner)
970<Comment>{B}*{CMD}[a-z_A-Z]+"{"[^}]*"}"{B}* |
971<Comment>{B}*{CMD}[a-z_A-Z]+{B}* { // potentially interesting command
972 // the {B}* in the front was added for bug620924
973 QCString fullMatch = yytext;
974 int idx = fullMatch.find('{');
975 /* handle `f{` command as special case */
976 if ((idx > 1) && (yytext[idx-1] == 'f') && (yytext[idx-2] == '\\' || yytext[idx-2] =='@')) REJECT;
977 int idxEnd = fullMatch.find("}",idx+1);
978 QCString cmdName;
979 StringVector optList;
980 if (idx == -1) // no options
981 {
982 cmdName = fullMatch.stripWhiteSpace().mid(1); // to remove {CMD}
983 }
984 else // options present
985 {
986 cmdName = fullMatch.left(idx).stripWhiteSpace().mid(1); // to remove {CMD}
987 QCString optStr = fullMatch.mid(idx+1,idxEnd-idx-1).stripWhiteSpace();
988 optList = split(optStr.str(),",");
989 }
990 auto it = docCmdMap.find(cmdName.str());
991 //printf("lookup command '%s' found=%d\n",qPrint(cmdName),it!=docCmdMap.end());
992 if (it!=docCmdMap.end()) // special action is required
993 {
994 int i=0;
995 while (yytext[i]==' ' || yytext[i]=='\t') i++;
996 yyextra->spaceBeforeCmd = fullMatch.left(i);
997 CommandSpacing spacing = it->second.spacing;
998 if ((spacing==CommandSpacing::Block || spacing==CommandSpacing::XRef) &&
999 !(yyextra->inContext==OutputXRef && cmdName=="parblock"))
1000 {
1001 yyextra->briefEndsAtDot=FALSE;
1002 bool insideXRef = yyextra->inContext==OutputXRef && spacing==CommandSpacing::XRef;
1003 // this command forces the end of brief description
1004 setOutput(yyscanner,insideXRef ? OutputXRef : OutputDoc);
1005 }
1006 //if (i>0) addOutput(yyscanner,QCString(yytext).left(i)); // removed for bug 689341
1007 if (it->second.handler && it->second.handler(yyscanner, cmdName, optList))
1008 {
1009 // implicit split of the comment block into two
1010 // entries. Restart the next block at the start
1011 // of this command.
1012 yyextra->parseMore=TRUE;
static const std::map< std::string, DocCmdMap > docCmdMap
CommandSpacing
std::vector< std::string > StringVector
Definition containers.h:33
StringVector split(const std::string &s, const std::string &delimiter)
split input string s by string delimiter delimiter.
Definition util.cpp:6528
1013
1014 yyextra->inputPosition=yyextra->prevPosition + (int)(yy_bp - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf);
1015 yyterminate();
1016 }
1017 else if (it->second.handler==nullptr)
1018 {
1019 // command without handler, to be processed
1020 // later by parsedoc.cpp
1021 addOutput(yyscanner,yytext);
1022 }
1023 }
1024 else // command not relevant
1025 {
1026 addOutput(yyscanner,yytext);
1027 }
1028 }
#define yyterminate()
1029<Comment>{B}*({CMD}{CMD})"f"[$\‍[{] { // escaped formula command
1030 addOutput(yyscanner,yytext);
1031 }
1032<Comment>{B}*{CMD}"~"[a-z_A-Z-]* { // language switch command
1033 QCString langId = QCString(yytext).stripWhiteSpace().mid(2);
1034 if (!langId.isEmpty() &&
1035 qstricmp(Config_getEnumAsString(OUTPUT_LANGUAGE),langId)!=0)
1036 { // enable language specific section
1037 if (!Config_isAvailableEnum(OUTPUT_LANGUAGE,langId))
1038 {
1039 warn(yyextra->fileName,yyextra->lineNr,
1040 "non supported language '{}' specified in '{}'",langId,QCString(yytext).stripWhiteSpace());
1041 }
1042 BEGIN(SkipLang);
1043 }
1044 }
#define Config_getEnumAsString(name)
Definition config.h:36
#define Config_isAvailableEnum(name, value)
Definition config.h:45
int qstricmp(const char *s1, const char *s2)
Definition qcstring.cpp:447
1045<Comment>{B}*{CMD}"f{"[^}\n]+"}"("{"?) { // start of a formula with custom environment
1046 setOutput(yyscanner,OutputDoc);
1047 yyextra->formulaText="";
1048 yyextra->formulaPreText="\\begin";
1049 yyextra->formulaPostText="";
1050 yyextra->formulaEnv=QCString(yytext).stripWhiteSpace().mid(2);
1051 if (yyextra->formulaEnv.at(yyextra->formulaEnv.length()-1)=='{')
1052 {
1053 // remove trailing open brace
1054 yyextra->formulaEnv=yyextra->formulaEnv.left(yyextra->formulaEnv.length()-1);
1055 }
1056 yyextra->formulaPreText+=yyextra->formulaEnv;
1057 yyextra->formulaNewLines=0;
1058 BEGIN(ReadFormulaLong);
1059 }
1060<Comment>{B}*{CMD}"f$" { // start of a inline formula
1061 yyextra->formulaText="";
1062 yyextra->formulaPreText="$";
1063 yyextra->formulaPostText="";
1064 yyextra->formulaNewLines=0;
1065 BEGIN(ReadFormulaShort);
1066 }
1067<Comment>{B}*{CMD}"f(" { // start of a inline formula
1068 yyextra->formulaText="";
1069 yyextra->formulaPreText="";
1070 yyextra->formulaPostText="";
1071 yyextra->formulaNewLines=0;
1072 BEGIN(ReadFormulaRound);
1073 }
1074<Comment>{B}*{CMD}"f[" { // start of a block formula
1075 setOutput(yyscanner,OutputDoc);
1076 yyextra->formulaText="";
1077 yyextra->formulaPreText="\\[";
1078 yyextra->formulaPostText="";
1079 yyextra->formulaNewLines=0;
1080 BEGIN(ReadFormulaLong);
1081 }
1082<Comment>{B}*{CMD}"{" { // begin of a group
1083 //yyextra->langParser->handleGroupStartCommand(yyextra->memberGroupHeader);
1084 yyextra->docGroup.open(yyextra->current,yyextra->fileName,yyextra->lineNr);
1085 }
1086<Comment>{B}*{CMD}"}" { // end of a group
1087 //yyextra->langParser->handleGroupEndCommand();
1088 yyextra->docGroup.close(yyextra->current,yyextra->fileName,yyextra->lineNr,TRUE);
1089 yyextra->docGroup.clearHeader();
1090 yyextra->parseMore=TRUE;
1091 yyextra->needNewEntry = TRUE;
1092 yyextra->inputPosition=yyextra->prevPosition + (int)(yy_bp - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) + (int)strlen(yytext);
1093 yyterminate();
1094 }
1095<Comment>{B}*{CMD}[$@\\&~<>#%] { // escaped character
1096 addOutput(yyscanner,yytext);
1097 }
1098<Comment>[a-z_A-Z]+ { // normal word
1099 addOutput(yyscanner,yytext);
1100 }
1101<Comment>^{B}*"."{Bopt}/\n { // explicit end autolist: e.g " ."
1102 addOutput(yyscanner,yytext);
1103 }
1104<Comment>^{B}*[1-9][0-9]*"."{B}+ |
1105<Comment>^{B}*[*+]{B}+ { // start of autolist
1106 if (!yyextra->markdownSupport)
1107 {
1108 REJECT;
1109 }
1110 else
1111 {
1112 if (yyextra->inContext!=OutputXRef)
1113 {
1114 yyextra->briefEndsAtDot=FALSE;
1115 setOutput(yyscanner,OutputDoc);
1116 }
1117 addOutput(yyscanner,yytext);
1118 }
1119 }
1120<Comment>^{B}*"-"{B}+ { // start of autolist
1121 if (yyextra->inContext!=OutputXRef)
1122 {
1123 yyextra->briefEndsAtDot=FALSE;
1124 setOutput(yyscanner,OutputDoc);
1125 }
1126 addOutput(yyscanner,yytext);
1127 }
1128<Comment>^{B}*([\-:|]{B}*)*("--"|"---")({B}*[\-:|])*{Bopt}/\n { // horizontal line (dashed)
1129 addOutput(yyscanner,yytext);
1130 }
1131<Comment>{CMD}"---" { // escaped mdash
1132 addOutput(yyscanner,yytext);
1133 }
1134<Comment>{CMD}"--" { // escaped mdash
1135 addOutput(yyscanner,yytext);
1136 }
1137<Comment>"---" { // mdash
1138 addOutput(yyscanner,yyextra->insidePre || yyextra->markdownSupport ? yytext : "&mdash;");
1139 }
1140<Comment>"--" { // ndash
1141 addOutput(yyscanner,yyextra->insidePre || yyextra->markdownSupport ? yytext : "&ndash;");
1142 }
1143<Comment>"-#"{B}+ { // numbered item
1144 if (yyextra->inContext!=OutputXRef)
1145 {
1146 yyextra->briefEndsAtDot=FALSE;
1147 setOutput(yyscanner,OutputDoc);
1148 }
1149 addOutput(yyscanner,yytext);
1150 }
1151<Comment>[?!][a-z_A-Z0-9\‍(\‍)=<] |
1152<Comment>("."+)[a-z_A-Z0-9\‍)] { // . at start or in the middle of a word, or ellipsis
1153 // ? or ! in middle of word or followed by equal sign or round bracket.
1154 addOutput(yyscanner,yytext);
1155 }
1156<Comment>{CMD}[\.?!] { // we have to be a bit careful with the special commands
1157 // \. \? and \! as they might otherwise terminate a brief description
1158 addOutput(yyscanner,yytext);
1159 }
1160<Comment>".\\"[ \t] { // . with escaped space.
1161 addOutput(yyscanner,yytext[0]);
1162 addOutput(yyscanner,yytext[2]);
1163 }
1164<Comment>"."[,:;] { // . with some puntuations such as "e.g.," or "e.g.:"
1165 addOutput(yyscanner,yytext);
1166 }
1167<Comment>"...\\"[ \t] { // ellipsis with escaped space.
1168 addOutput(yyscanner,"... ");
1169 }
1170<Comment>"..."/[^\.] { // ellipsis
1171 addOutput(yyscanner,"...");
1172 }
1173<Comment>".."[\.]?/[^ \t\n] { // internal ellipsis
1174 addOutput(yyscanner,yytext);
1175 }
1176<Comment>(\n|"\\ilinebr ")({B}*(\n|"\\ilinebr "))+ { // at least one blank line (or blank line command)
1177 if (yyextra->inContext==OutputXRef)
1178 {
1179 // see bug 613024, we need to put the newlines after ending the XRef section.
1180 if (!yyextra->insideParBlock) setOutput(yyscanner,OutputDoc);
1181 yy_size_t i;
1182 for (i=0;i<(yy_size_t)yyleng;)
1183 {
1184 if (yytext[i]=='\n') addOutput(yyscanner,'\n'),i++;
1185 else if (strncmp(yytext+i,"\\ilinebr ",9)==0) addOutput(yyscanner,"\\ilinebr "),i+=9;
1186 else i++;
1187 }
1188 }
1189 else if (yyextra->inContext!=OutputBrief)
1190 {
1191 yy_size_t i;
1192 for (i=0;i<(yy_size_t)yyleng;)
1193 {
1194 if (yytext[i]=='\n') addOutput(yyscanner,'\n'),i++;
1195 else if (strncmp(yytext+i,"\\ilinebr ",9)==0) addOutput(yyscanner,"\\ilinebr "),i+=9;
1196 else i++;
1197 }
1198 setOutput(yyscanner,OutputDoc);
1199 }
1200 else // yyextra->inContext==OutputBrief
1201 { // only go to the detailed description if we have
1202 // found some brief description and not just whitespace
1203 endBrief(yyscanner);
1204 }
1205 lineCount(yyscanner);
1206 }
1207<Comment>"."[?!] |
1208<Comment>[\.?!] { // potential end of a JavaDoc style comment
1209 addOutput(yyscanner,yytext);
1210 if (yyextra->briefEndsAtDot)
1211 {
1212 setOutput(yyscanner,OutputDoc);
1213 yyextra->briefEndsAtDot=FALSE;
1214 }
1215 }
1216<Comment>{DOCNL} { // newline
1217 addOutput(yyscanner,yytext);
1218 if (*yytext == '\n') yyextra->lineNr++;
1219 }
1220<Comment>"<"[/]?{TABLEDEL}">" { // In case in xrefitem type some special handling is required
1221 if (yyextra->inContext==OutputXRef)
1222 {
1223 setOutput(yyscanner,OutputDoc);
1224 addOutput(yyscanner,yytext);
1225 }
1226 else
1227 {
1228 REJECT;
1229 }
1230 }
1231<Comment>. { // catch-all for anything else
1232 addOutput(yyscanner,*yytext);
1233 }
1234
1235
1236 /* -------------- Rules for handling HTML comments ----------- */
1237
1238<HtmlComment>"---"[!]?">"{B}* {
1239 warn(yyextra->fileName,yyextra->lineNr,
1240 "incorrect HTML end comment --->"
1241 );
1242 }
1243<HtmlComment>"--"[!]?">"{B}* { BEGIN( Comment ); }
1244<HtmlComment>{DOCNL} {
1245 if (*yytext=='\n')
1246 {
1247 yyextra->lineNr++;
1248 addOutput(yyscanner," \\iline "+QCString().setNum(yyextra->lineNr)+" ");
1249 }
1250 }
1251<HtmlComment>[^\\\n\-]+ { // ignore unimportant characters
1252 }
1253<HtmlComment>. { // ignore every else
1254 }
1255
1256<CdataSection>"\‍]\‍]>" {
1257 BEGIN( Comment );
1258 }
1259<CdataSection>{DOCNL} {
1260 addOutput(yyscanner,'\n');
1261 if (*yytext=='\n') yyextra->lineNr++;
1262 }
1263<CdataSection>[<>&] { // the special XML characters for iwhich the CDATA section is especially used
1264 addOutput(yyscanner,'\\');
1265 addOutput(yyscanner,*yytext);
1266 }
1267<CdataSection>[^\\\n\‍]<>&]+ {
1268 addOutput(yyscanner,yytext);
1269 }
1270<CdataSection>. {
1271 addOutput(yyscanner,*yytext);
1272 }
1273
1274 /* -------------- Rules for handling formulas ---------------- */
1275
1276<ReadFormulaShort,ReadFormulaShortSection>{CMD}"f$" { // end of inline formula
1277 yyextra->formulaPostText+="$";
1278 QCString form = addFormula(yyscanner);
1279 addOutput(yyscanner," "+form);
1280 if (YY_START == ReadFormulaShort)
1281 {
1282 BEGIN(Comment);
1283 }
1284 else
1285 {
1286 yyextra->sectionTitle+= " "+form;
1287 BEGIN(SectionTitle);
1288 }
1289 }
static QCString addFormula(yyscan_t yyscanner)
1290<ReadFormulaRound,ReadFormulaRoundSection>{CMD}"f)" { // end of inline formula
1291 QCString form = addFormula(yyscanner);
1292 addOutput(yyscanner," "+form);
1293 if (YY_START == ReadFormulaRound)
1294 {
1295 BEGIN(Comment);
1296 }
1297 else
1298 {
1299 yyextra->sectionTitle+= " "+form;
1300 BEGIN(SectionTitle);
1301 }
1302 }
1303<ReadFormulaLong>{CMD}"f]" { // end of block formula
1304 yyextra->formulaPostText+="\\]";
1305 addOutput(yyscanner," "+addFormula(yyscanner));
1306 BEGIN(Comment);
1307 }
1308<ReadFormulaLong>{CMD}"f}" { // end of custom env formula
1309 yyextra->formulaPostText+="\\end";
1310 yyextra->formulaPostText+=yyextra->formulaEnv;
1311 addOutput(yyscanner," "+addFormula(yyscanner));
1312 BEGIN(Comment);
1313 }
1314<ReadFormulaLong,ReadFormulaShort,ReadFormulaShortSection,ReadFormulaRound,ReadFormulaRoundSection>[^\\@\n]+ { // any non-special character
1315 yyextra->formulaText+=yytext;
1316 }
1317<ReadFormulaLong,ReadFormulaShort,ReadFormulaShortSection,ReadFormulaRound,ReadFormulaRoundSection>\n { // new line
1318 yyextra->formulaNewLines++;
1319 yyextra->formulaText+=*yytext;
1320 yyextra->lineNr++;
1321 addIline(yyscanner,yyextra->lineNr);
1322 }
1323<ReadFormulaLong,ReadFormulaShort,ReadFormulaShortSection,ReadFormulaRound,ReadFormulaRoundSection>. { // any other character
1324 yyextra->formulaText+=*yytext;
1325 }
1326
1327 /* ------------ handle argument of enum command --------------- */
1328
1329<EnumDocArg1>{SCOPEID} { // handle argument
1330 makeStructuralIndicator(yyscanner,yyextra->currentMakeEntryType);
1331 yyextra->current->name = yytext;
1332 BEGIN( Comment );
1333 }
1334<EnumDocArg1>{LC} { // line continuation
1335 yyextra->lineNr++;
1336 addOutput(yyscanner,'\n');
1337 }
1338<EnumDocArg1>{DOCNL} { // missing argument
1339 warn(yyextra->fileName,yyextra->lineNr,
1340 "missing argument after '\\enum'."
1341 );
1342 unput_string(yytext,yyleng);
1343 BEGIN( Comment );
1344 }
#define unput_string(yytext, yyleng)
1345<EnumDocArg1>. { // ignore other stuff
1346 }
1347
1348 /* ------------ handle argument of namespace command --------------- */
1349
1350<NameSpaceDocArg1>{SCOPENAME} { // handle argument
1351 makeStructuralIndicator(yyscanner,yyextra->currentMakeEntryType);
1352 lineCount(yyscanner);
1353 yyextra->current->name = substitute(removeRedundantWhiteSpace(yytext),".","::");
1354 BEGIN( Comment );
1355 }
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition qcstring.cpp:482
QCString removeRedundantWhiteSpace(const QCString &s)
Definition util.cpp:576
1356<NameSpaceDocArg1>{LC} { // line continuation
1357 yyextra->lineNr++;
1358 addOutput(yyscanner,'\n');
1359 }
1360<NameSpaceDocArg1>{DOCNL} { // missing argument
1361 warn(yyextra->fileName,yyextra->lineNr,
1362 "missing argument after '\\namespace'."
1363 );
1364 unput_string(yytext,yyleng);
1365 BEGIN( Comment );
1366 }
1367<NameSpaceDocArg1>. { // ignore other stuff
1368 }
1369
1370 /* ------------ handle argument of package command --------------- */
1371
1372<PackageDocArg1>{ID}("."{ID})* { // handle argument
1373 yyextra->current->name = yytext;
1374 BEGIN( Comment );
1375 }
1376<PackageDocArg1>{LC} { // line continuation
1377 yyextra->lineNr++;
1378 addOutput(yyscanner,'\n');
1379 }
1380<PackageDocArg1>{DOCNL} { // missing argument
1381 warn(yyextra->fileName,yyextra->lineNr,
1382 "missing argument after \\package."
1383 );
1384 unput_string(yytext,yyleng);
1385 //addOutput(yyscanner,'\n');
1386 //if (*yytext=='\n') yyextra->lineNr++;
1387 BEGIN( Comment );
1388 }
1389<PackageDocArg1>. { // ignore other stuff
1390 }
1391
1392 /* ------------ handle argument of concept command --------------- */
1393
1394<ConceptDocArg1>{SCOPEID} { // handle argument
1395 makeStructuralIndicator(yyscanner,yyextra->currentMakeEntryType);
1396 yyextra->current->name = yytext;
1397 BEGIN( Comment );
1398 }
1399<ConceptDocArg1>{LC} { // line continuation
1400 yyextra->lineNr++;
1401 addOutput(yyscanner,'\n');
1402 }
1403<ConceptDocArg1>{DOCNL} { // missing argument
1404 warn(yyextra->fileName,yyextra->lineNr,
1405 "missing argument after '\\concept'."
1406 );
1407 unput_string(yytext,yyleng);
1408 BEGIN( Comment );
1409 }
1410<ConceptDocArg1>. { // ignore other stuff
1411 }
1412
1413 /* ------------ handle argument of module command --------------- */
1414<ModuleDocArg1>{MODULE_ID} { // handle argument
1415 makeStructuralIndicator(yyscanner,yyextra->currentMakeEntryType);
1416 yyextra->current->name = yytext;
1417 BEGIN( Comment );
1418 }
1419<ModuleDocArg1>{LC} { // line continuation
1420 yyextra->lineNr++;
1421 addOutput(yyscanner,'\n');
1422 }
1423<ModuleDocArg1>{DOCNL} { // missing argument
1424 warn(yyextra->fileName,yyextra->lineNr,
1425 "missing argument after '\\module'."
1426 );
1427 unput_string(yytext,yyleng);
1428 BEGIN( Comment );
1429 }
1430<ModuleDocArg1>. { // ignore other stuff
1431 }
1432
1433 /* ------ handle argument of class/struct/union command --------------- */
1434
1435<ClassDocArg1>{SCOPENAME}{TMPLSPEC} {
1436 makeStructuralIndicator(yyscanner,yyextra->currentMakeEntryType);
1437 lineCount(yyscanner);
1438 yyextra->current->name = substitute(removeRedundantWhiteSpace(yytext),".","::");
1439 BEGIN( ClassDocArg2 );
1440 }
1441<ClassDocArg1>{SCOPENAME} { // first argument
1442 makeStructuralIndicator(yyscanner,yyextra->currentMakeEntryType);
1443 lineCount(yyscanner);
1444 yyextra->current->name = substitute(yytext,".","::");
1445 if (yyextra->current->section.isProtocolDoc())
1446 {
1447 yyextra->current->name+="-p";
1448 }
1449 // prepend outer scope name
1450 BEGIN( ClassDocArg2 );
1451 }
1452<CategoryDocArg1>{SCOPENAME}{B}*"("[^\‍)]+")" {
1453 makeStructuralIndicator(yyscanner,yyextra->currentMakeEntryType);
1454 lineCount(yyscanner);
1455 yyextra->current->name = substitute(yytext,".","::");
1456 BEGIN( ClassDocArg2 );
1457 }
1458<ClassDocArg1,CategoryDocArg1>{LC} { // line continuation
1459 yyextra->lineNr++;
1460 addOutput(yyscanner,'\n');
1461 }
1462<ClassDocArg1,CategoryDocArg1>{DOCNL} {
1463 warn(yyextra->fileName,yyextra->lineNr,
1464 "missing argument after '\\{}'.",yyextra->currentCmd
1465 );
1466 unput_string(yytext,yyleng);
1467 BEGIN( Comment );
1468 }
1469<ClassDocArg1,CategoryDocArg1>. { // ignore other stuff
1470 }
1471
1472<ClassDocArg2>{DOCNL} {
1473 unput_string(yytext,yyleng);
1474 BEGIN( Comment );
1475 }
1476<ClassDocArg2>{FILE}|"<>" { // second argument; include file
1477 yyextra->current->includeFile = yytext;
1478 BEGIN( ClassDocArg3 );
1479 }
1480<ClassDocArg2>{LC} { // line continuation
1481 yyextra->lineNr++;
1482 addOutput(yyscanner,'\n');
1483 }
1484<ClassDocArg2>. { // ignore other stuff
1485 }
1486
1487<ClassDocArg3>[<"]?{FILE}?[">]? { // third argument; include file name
1488 yyextra->current->includeName = yytext;
1489 BEGIN( Comment );
1490 }
1491<ClassDocArg3>{LC} { // line continuation
1492 yyextra->lineNr++;
1493 addOutput(yyscanner,'\n');
1494 }
1495<ClassDocArg3>{DOCNL} {
1496 //if (*yytext=='\n') yyextra->lineNr++;
1497 unput_string(yytext,yyleng);
1498 BEGIN( Comment );
1499 }
1500<ClassDocArg3>. { // ignore other stuff
1501 }
1502
1503 /* --------- handle arguments of {def,add,weak}group commands --------- */
1504
1505<GroupDocArg1>{LABELID}(".html"|".xhtml")? { // group name
1506 yyextra->current->name = yytext;
1507 //lastDefGroup.groupname = yytext;
1508 //lastDefGroup.pri = yyextra->current->groupingPri();
1509 // the .html stuff is for Qt compatibility
1510 if (yyextra->current->name.endsWith(".html"))
1511 {
1512 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-5);
1513 }
1514 else if (yyextra->current->name.endsWith(".xhtml"))
1515 {
1516 yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-6);
1517 }
1518 yyextra->current->type.clear();
1519 BEGIN(GroupDocArg2);
1520 }
1521<GroupDocArg1>"\\"{B}*"\n" { // line continuation
1522 yyextra->lineNr++;
1523 addOutput(yyscanner,'\n');
1524 }
1525<GroupDocArg1>{DOCNL} { // missing argument!
1526 warn(yyextra->fileName,yyextra->lineNr,
1527 "missing group name after {}",
1528 yyextra->current->groupDocCmd()
1529 );
1530 //addOutput(yyscanner,'\n');
1531 //if (*yytext=='\n') yyextra->lineNr++;
1532 unput_string(yytext,yyleng);
1533 BEGIN( Comment );
1534 }
1535<GroupDocArg1>. { // ignore other stuff
1536 }
1537<GroupDocArg2>"\\"{B}*"\n" { // line continuation
1538 yyextra->lineNr++;
1539 addOutput(yyscanner,'\n');
1540 }
1541<GroupDocArg2>[^\n\\‍]+ { // title (stored in type)
1542 yyextra->current->type += yytext;
1543 }
1544<GroupDocArg2>{DOCNL}+ {
1545 yyextra->current->type = yyextra->current->type.stripWhiteSpace();
1546 if ( yyextra->current->groupDocType==Entry::GROUPDOC_NORMAL &&
1547 yyextra->current->type.isEmpty()
1548 ) // defgroup requires second argument
1549 {
1550 warn(yyextra->fileName,yyextra->lineNr,
1551 "missing title after "
1552 "\\defgroup {}", yyextra->current->name
1553 );
1554 }
1555 unput_string(yytext,yyleng);
1556 int extraLineNr = 0;
1557 if (yyextra->inContext == OutputBrief)
1558 {
1559 for (int i = 0; i < yyleng; i++)
1560 {
1561 if (yytext[i]=='\n') extraLineNr++;
1562 }
1563 }
1564 //if (*yytext=='\n') yyextra->lineNr++;
1565 //addOutput(yyscanner,'\n');
1566 if ( yyextra->current->groupDocType!=Entry::GROUPDOC_NORMAL)
1567 {
1568 addOutput(yyscanner," \\ifile \""+ yyextra->fileName);
1569 addOutput(yyscanner,"\" \\iline " + QCString().setNum(yyextra->lineNr + extraLineNr) + " \\ilinebr ");
1570 }
1571 BEGIN( Comment );
1572 }
1573<GroupDocArg2>. { // title (stored in type)
1574 yyextra->current->type += yytext;
1575 }
1576
1577 /* --------- handle arguments of page/mainpage command ------------------- */
1578
1579<PageDocArg1>[^\n]*"\\ilinebr @ianchor"\{[^\‍]\n]*\}{B}{FILE} { // special case where the Markdown processor has rewritten
1580 // "@page label Title" as
1581 // "@page md_label Title\ilinebr @ianchor{Title} label"
1582 QCString text = yytext;
1583 int start = text.find('{');
1584 int end = text.find('}',start+1);
1585 yyextra->current->name = text.mid(end+2);
1586 int istart = yyextra->current->name.find("\\ilinebr");
1587 if (istart != -1)
1588 {
1589 QCString rest = yyextra->current->name.mid(istart);
1590 unput_string(rest,rest.length());
1591 yyextra->current->name = yyextra->current->name.mid(0,istart);
1592 }
1593 yyextra->current->args = text.mid(start+1,end-start-1);
1594 //printf("name='%s' title='%s'\n",qPrint(yyextra->current->name),qPrint(yyextra->current->args));
1595 BEGIN( PageDocArg2 );
1596 }
DirIterator end(const DirIterator &) noexcept
Definition dir.cpp:175
1597<PageDocArg1>{FILE} { // first argument; page name
1598 yyextra->current->name = stripQuotes(yytext);
1599 yyextra->current->args = "";
1600 BEGIN( PageDocArg2 );
1601 }
static QCString stripQuotes(const char *s)
1602<PageDocArg1>{LC} { yyextra->lineNr++;
1603 addOutput(yyscanner,'\n');
1604 }
1605<PageDocArg1>{DOCNL} {
1606 warn(yyextra->fileName,yyextra->lineNr,
1607 "missing argument after \\page."
1608 );
1609 unput_string(yytext,yyleng);
1610 //if (*yytext=='\n') yyextra->lineNr++;
1611 //addOutput(yyscanner,'\n');
1612 BEGIN( Comment );
1613 }
1614<PageDocArg1>. { // ignore other stuff
1615 }
1616<PageDocArg2>{DOCNL} { // second argument; page title
1617 unput_string(yytext,yyleng);
1618 //if (*yytext=='\n') yyextra->lineNr++;
1619 //addOutput(yyscanner,'\n');
1620 addOutput(yyscanner," \\ifile \""+ yyextra->fileName);
1621 addOutput(yyscanner,"\" \\iline " + QCString().setNum(yyextra->lineNr) + " \\ilinebr ");
1622 BEGIN( Comment );
1623 }
1624<PageDocArg2>{CMD}[<>] {
1625 // bug 748927
1626 QCString tmp(yytext);
1627 tmp = substitute(substitute(tmp,"@<","&lt;"),"@>","&gt;");
1628 tmp = substitute(substitute(tmp,"\\<","&lt;"),"\\>","&gt;");
1629 yyextra->current->args += tmp;
1630 }
1631<PageDocArg2>. {
1632 yyextra->current->args += yytext;
1633 }
1634 /* --------- handle arguments of the param command ------------ */
1635<ParamArg1>{ID}/{B}*"," {
1636 addOutput(yyscanner,yytext);
1637 }
1638<ParamArg1>"," {
1639 addOutput(yyscanner," , ");
1640 }
1641<ParamArg1>{DOCNL} {
1642 if (*yytext=='\n') yyextra->lineNr++;
1643 addOutput(yyscanner," ");
1644 }
1645<ParamArg1>{ID} {
1646 addOutput(yyscanner,yytext);
1647 BEGIN( Comment );
1648 }
1649<ParamArg1>. {
1650 unput(yytext[0]);
1651 BEGIN( Comment );
1652 }
1653
1654 /* --------- handle arguments of the file/dir/example command ------------ */
1655
1656<FileDocArg1>{DOCNL} { // no file name specified
1657 unput_string(yytext,yyleng);
1658 //if (*yytext=='\n') yyextra->lineNr++;
1659 //addOutput(yyscanner,'\n');
1660 BEGIN( Comment );
1661 }
1662<FileDocArg1>{FILE} { // first argument; name
1663 yyextra->current->name = stripQuotes(yytext);
1664 BEGIN( Comment );
1665 }
1666<FileDocArg1>{LC} { yyextra->lineNr++;
1667 addOutput(yyscanner,'\n');
1668 }
1669<FileDocArg1>. { // ignore other stuff
1670 }
1671
1672 /* --------- handle arguments of the xrefitem command ------------ */
1673
1674<XRefItemParam1>{LABELID} { // first argument
1675 yyextra->newXRefItemKey=yytext;
1676 setOutput(yyscanner,OutputXRef);
1677 BEGIN(XRefItemParam2);
1678 }
1679<XRefItemParam1>{LC} { // line continuation
1680 yyextra->lineNr++;
1681 addOutput(yyscanner,'\n');
1682 }
1683<XRefItemParam1>{DOCNL} { // missing arguments
1684 warn(yyextra->fileName,yyextra->lineNr,
1685 "Missing first argument of \\xrefitem"
1686 );
1687 if (*yytext=='\n') yyextra->lineNr++;
1688 addOutput(yyscanner,'\n');
1689 yyextra->inContext = OutputDoc;
1690 BEGIN( Comment );
1691 }
1692<XRefItemParam1>. { // ignore other stuff
1693 }
1694
1695<XRefItemParam2>"\""[^\n\"]*"\"" { // second argument
1696 yyextra->xrefItemTitle = stripQuotes(yytext);
1697 BEGIN(XRefItemParam3);
1698 }
1699<XRefItemParam2>{LC} { // line continuation
1700 yyextra->lineNr++;
1701 addOutput(yyscanner,'\n');
1702 }
1703<XRefItemParam2>{DOCNL} { // missing argument
1704 warn(yyextra->fileName,yyextra->lineNr,
1705 "Missing second argument of \\xrefitem"
1706 );
1707 if (*yytext=='\n') yyextra->lineNr++;
1708 addOutput(yyscanner,'\n');
1709 yyextra->inContext = OutputDoc;
1710 BEGIN( Comment );
1711 }
1712<XRefItemParam2>. { // ignore other stuff
1713 }
1714
1715<XRefItemParam3>"\""[^\n\"]*"\"" { // third argument
1716 yyextra->xrefListTitle = stripQuotes(yytext);
1717 yyextra->xrefKind = XRef_Item;
1718 BEGIN( Comment );
1719 }
1720<XRefItemParam2,XRefItemParam3>{LC} { // line continuation
1721 yyextra->lineNr++;
1722 addOutput(yyscanner,'\n');
1723 }
1724<XRefItemParam3>{DOCNL} { // missing argument
1725 warn(yyextra->fileName,yyextra->lineNr,
1726 "Missing third argument of \\xrefitem"
1727 );
1728 if (*yytext=='\n') yyextra->lineNr++;
1729 addOutput(yyscanner,'\n');
1730 yyextra->inContext = OutputDoc;
1731 BEGIN( Comment );
1732 }
1733<XRefItemParam3>. { // ignore other stuff
1734 }
1735
1736
1737 /* ----- handle arguments of the relates(also)/memberof command ------- */
1738
1739<RelatesParam1>({ID}("::"|"."))*{ID} { // argument
1740 yyextra->current->relates = yytext;
1741 //if (yyextra->current->mGrpId!=DOX_NOGROUP)
1742 //{
1743 // memberGroupRelates = yytext;
1744 //}
1745 BEGIN( Comment );
1746 }
1747<RelatesParam1>{LC} { // line continuation
1748 yyextra->lineNr++;
1749 addOutput(yyscanner,'\n');
1750 }
1751<RelatesParam1>{DOCNL} { // missing argument
1752 warn(yyextra->fileName,yyextra->lineNr,
1753 "Missing argument of '\\{}' command",yyextra->currentCmd
1754 );
1755 unput_string(yytext,yyleng);
1756 //if (*yytext=='\n') yyextra->lineNr++;
1757 //addOutput(yyscanner,'\n');
1758 BEGIN( Comment );
1759 }
1760<RelatesParam1>. { // ignore other stuff
1761 }
1762
1763
1764 /* ----- handle arguments of the qualifier command ----- */
1765<Qualifier>{LABELID} { // unquoted version, simple label
1766 yyextra->current->qualifiers.emplace_back(yytext);
1767 BEGIN( Comment );
1768 }
1769<Qualifier>"\""[^\"]*"\"" { // quotes version, add without quotes
1770 std::string inp(yytext);
1771 yyextra->current->qualifiers.push_back(inp.substr(1,yyleng-2));
1772 BEGIN( Comment );
1773 }
1774<Qualifier>{DOCNL} { // missing argument
1775 warn(yyextra->fileName,yyextra->lineNr,
1776 "Missing argument of '\\{}' command",yyextra->currentCmd
1777 );
1778 unput_string(yytext,yyleng);
1779 BEGIN( Comment );
1780 }
1781<Qualifier>. {
1782 warn(yyextra->fileName,yyextra->lineNr,
1783 "Argument of '\\{}' command should be quoted",yyextra->currentCmd
1784 );
1785 unput_string(yytext,yyleng);
1786 BEGIN( Comment );
1787 }
1788 /* ----- handle arguments of the iline command ----- */
1789<ILine>{LINENR}/[\\@\n\.] |
1790<ILine>{LINENR}{B} {
1791 bool ok = false;
1792 int nr = QCString(yytext).toInt(&ok);
1793 if (!ok)
1794 {
1795 warn(yyextra->fileName,yyextra->lineNr,"Invalid line number '{}' for iline command",yytext);
1796 }
1797 else
1798 {
1799 yyextra->lineNr = nr;
1800 }
1801 addOutput(yyscanner,yytext);
1802 if (YY_START == ILine)
1803 {
1804 BEGIN(Comment);
1805 }
1806 else
1807 {
1808 yyextra->sectionTitle+=yytext;
1809 BEGIN(SectionTitle);
1810 }
1811 }
int toInt(bool *ok=nullptr, int base=10) const
Definition qcstring.cpp:254
1812<ILine,ILineSection>. {
1813 addOutput(yyscanner,yytext);
1814 if (YY_START == ILine)
1815 {
1816 BEGIN(Comment);
1817 }
1818 else
1819 {
1820 yyextra->sectionTitle+=yytext;
1821 BEGIN(SectionTitle);
1822 }
1823 }
1824
1825 /* ----- handle arguments of the iraise command ----- */
1826<IRaise>{B}*[0-9]+/[\\@\n\.] |
1827<IRaise>{B}*[0-9]+{B} {
1828 bool ok = false;
1829 int nr = QCString(yytext).toInt(&ok);
1830 if (!ok)
1831 {
1832 warn(yyextra->fileName,yyextra->lineNr,"Invalid level '{}' for iraise command",yytext);
1833 }
1834 else
1835 {
1836 yyextra->raiseLevel = nr;
1837 }
1838 BEGIN(Comment);
1839 }
1840<IRaise>. {
1841 unput(yytext[0]);
1842 BEGIN(Comment);
1843 }
1844 /* ----- handle arguments of the iprefix command ----- */
1845
1846<IRaisePrefix>{B}*"\""({LABELID})?"\"" {
1847 QCString text(yytext);
1848 yyextra->raisePrefix = text.stripWhiteSpace().mid(1,text.length()-2);
1849 addOutput(yyscanner,yytext);
1850 BEGIN(Comment);
1851 }
1852<IRaisePrefix>. {
1853 unput(yytext[0]);
1854 BEGIN(Comment);
1855 }
1856
1857
1858 /* ----- handle arguments of the ifile command ----- */
1859
1860<IFile,IFileSection>{FILE} {
1861 addOutput(yyscanner,yytext);
1862 QCString text(yytext);
1863 if (yytext[0] == '\"') yyextra->fileName = text.mid(1,text.length()-2);
1864 else yyextra->fileName = yytext;
1865 if (YY_START == IFile)
1866 {
1867 BEGIN(Comment);
1868 }
1869 else
1870 {
1871 yyextra->sectionTitle+=yytext;
1872 BEGIN(SectionTitle);
1873 }
1874 }
1875
1876<LinkSection>[^\\@\n]* {
1877 yyextra->sectionTitle+=yytext;
1878 }
1879<LinkSection>{CMD}{CMD} {
1880 yyextra->sectionTitle+=yytext;
1881 }
1882<LinkSection>{DOCNL} {
1883 addOutput(yyscanner,yytext);
1884 if (*yytext == '\n') yyextra->lineNr++;
1885 yyextra->sectionTitle+=yytext;
1886 }
1887<LinkSection>{CMD}"endlink" {
1888 yyextra->sectionTitle+=yytext;
1889 BEGIN(SectionTitle);
1890 }
1891<LinkSection>. {
1892 yyextra->sectionTitle+=yytext;
1893 }
1894<LinkSection><<EOF>> {
1895 warn(yyextra->fileName,yyextra->lineNr,
1896 "reached end of comment while inside a '\\link' command, missing '\\endlink' command"
1897 );
1898 yyterminate();
1899 }
1900 /* ----- handle arguments of the relates(also)/addindex commands ----- */
1901
1902<LineParam>{CMD}{CMD} { // escaped command
1903 addOutput(yyscanner,yytext);
1904 }
1905<LineParam>{DOCNL} { // end of argument
1906 //if (*yytext=='\n') yyextra->lineNr++;
1907 //addOutput(yyscanner,'\n');
1908 unput_string(yytext,yyleng);
1909 BEGIN( Comment );
1910 }
1911<LineParam>{LC} { // line continuation
1912 yyextra->lineNr++;
1913 addOutput(yyscanner,'\n');
1914 }
1915<LineParam>({CMD}{CMD}){ID} { // escaped command
1916 addOutput(yyscanner,yytext);
1917 }
1918<LineParam>. { // ignore other stuff
1919 addOutput(yyscanner,*yytext);
1920 }
1921
1922 /* ----- handle arguments of the section/subsection/.. commands ------- */
1923
1924<SectionLabel>{LABELID} {
1925 yyextra->sectionLabel+=yytext;
1926 }
1927<SectionLabel>{CMD}"lineinfo"("{}")? {
1928 yyextra->sectionLabel += QCString().setNum(yyextra->lineNr);
1929 }
1930<SectionLabel>{CMD}"fileinfo"("{"[^}]*"}")? {
1931 FileInfo fi(yyextra->fileName.str());
1932 bool hasOption = false;
1933 QCString label;
1934 if (yytext[yyleng-1] == '}') // has parameters
1935 {
1936 StringVector optList;
1937 QCString txt = yytext;
1938 QCString optStr = txt.mid(10,yyleng-11).stripWhiteSpace();
1939 optList = split(optStr.str(),",");
1940 for (const auto &opt_ : optList)
1941 {
1942 QCString optStripped = QCString(opt_).stripWhiteSpace();
1943 std::string opt = optStripped.lower().str();
1944 QCString result = fileInfoLookup(fi,opt);
1945 if (!result.isEmpty())
1946 {
1947 if (hasOption) // oops: already found an option
1948 {
1949 warn(yyextra->fileName,yyextra->lineNr,"Multiple options specified with \\fileinfo, discarding '{}'", optStripped);
1950 }
1951 else
1952 {
1953 label = result;
1954 }
1955 hasOption = true;
1956 }
1957 else
1958 {
1959 warn(yyextra->fileName,yyextra->lineNr,"Unknown option specified with \\fileinfo: '{}'", optStripped);
1960 }
1961 }
1962 }
1963 if (!hasOption)
1964 {
1965 if (Config_getBool(FULL_PATH_NAMES))
1966 {
1967 label=stripFromPath(yyextra->fileName);
1968 }
1969 else
1970 {
1971 label=yyextra->fileName;
1972 }
1973 }
1974 escapeLabel(label);
1975 yyextra->sectionLabel+=label;
1976 }
static void escapeLabel(QCString &label)
1977<SectionLabel>{DOCNL} {
1978 yyextra->sectionTitle.clear();
1979 if (yyextra->sectionLabel.isEmpty())
1980 { // missing argument
1981 warn(yyextra->fileName,yyextra->lineNr,
1982 "\\section command has no label"
1983 );
1984 }
1985 else
1986 {
1987 yyextra->sectionLabel=yyextra->raisePrefix+yyextra->sectionLabel;
1988 addOutput(yyscanner,yyextra->sectionLabel.data());
1989 addSection(yyscanner);
1990 }
1991 if (*yytext=='\n') yyextra->lineNr++;
1992 addOutput(yyscanner,'\n');
1993 BEGIN( Comment );
1994 }
static void addSection(yyscan_t yyscanner, bool addYYtext=true)
1995<SectionLabel>. { // invalid character for section label
1996 if (yyextra->sectionLabel.isEmpty())
1997 {
1998 warn(yyextra->fileName,yyextra->lineNr,
1999 "Invalid or missing section label"
2000 );
2001 BEGIN(Comment);
2002 }
2003 else
2004 {
2005 yyextra->sectionLabel=yyextra->raisePrefix+yyextra->sectionLabel;
2006 addOutput(yyscanner,yyextra->sectionLabel.data());
2007 yyextra->sectionTitle.clear();
2008 unput_string(yytext,yyleng);
2009 BEGIN(SectionTitle);
2010 }
2011 }
2012<SectionTitle>{STAopt}/"\n" { // end of section title
2013 addSection(yyscanner);
2014 addOutput(yyscanner,yytext);
2015 BEGIN( Comment );
2016 }
2017<SectionTitle>{STopt}"\\\\ilinebr" { // escaped end of section title
2018 yyextra->sectionTitle+=yytext;
2019 }
2020<SectionTitle>{STopt}/"\\ilinebr" { // end of section title
2021 addSection(yyscanner);
2022 addOutput(yyscanner,yytext);
2023 BEGIN( Comment );
2024 }
2025<SectionTitle>{B}*{CMD}"f$" {
2026 yyextra->formulaText="";
2027 yyextra->formulaPreText="$";
2028 yyextra->formulaPostText="";
2029 yyextra->formulaNewLines=0;
2030 BEGIN(ReadFormulaShortSection);
2031 }
2032<SectionTitle>{B}*{CMD}"f(" { // start of a inline formula
2033 yyextra->formulaText="";
2034 yyextra->formulaPreText="";
2035 yyextra->formulaPostText="";
2036 yyextra->formulaNewLines=0;
2037 BEGIN(ReadFormulaRoundSection);
2038 }
2039<SectionTitle>{B}*{CMD}"~"[a-z_A-Z-]* | // language switch command
2040<SectionTitle>{B}*{CMD}"f"[\‍[{] { // block formula
2041 setOutput(yyscanner,OutputDoc);
2042 addOutput(yyscanner," \\ilinebr ");
2043 addSection(yyscanner,false);
2044 warn(yyextra->fileName,yyextra->lineNr,
2045 "'\\{}' command is not allowed in section title, ending section title.",
2046 QCString(yytext).stripWhiteSpace()
2047 );
2048 unput_string(yytext,yyleng);
2049 BEGIN(Comment);
2050 }
2051<SectionTitle>{LC} { // line continuation
2052 yyextra->lineNr++;
2053 addOutput(yyscanner,'\n');
2054 }
2055<SectionTitle>[^\n@\\‍]* { // any character without special meaning
2056 yyextra->sectionTitle+=yytext;
2057 addOutput(yyscanner,yytext);
2058 }
2059<SectionTitle>{B}*{CMD}{CMD} {
2060 yyextra->sectionTitle+=yytext;
2061 addOutput(yyscanner,yytext);
2062 }
2063<SectionTitle>{B}*{CMD}[a-z_A-Z]+"{"[^}]*"}"{B}* |
2064<SectionTitle>{B}*{CMD}[a-z_A-Z]+{B}* { // handling command in section title
2065 QCString fullMatch = yytext;
2066 int idx = fullMatch.find('{');
2067 /* handle `f{` command as special case */
2068 if ((idx > 1) && (yytext[idx-1] == 'f') && (yytext[idx-2] == '\\' || yytext[idx-2] =='@')) REJECT;
2069 int idxEnd = fullMatch.find("}",idx+1);
2070 QCString cmdName;
2071 StringVector optList;
2072 if (idx == -1) // no options
2073 {
2074 cmdName = fullMatch.stripWhiteSpace().mid(1); // to remove {CMD}
2075 }
2076 else // options present
2077 {
2078 cmdName = fullMatch.left(idx).stripWhiteSpace().mid(1); // to remove {CMD}
2079 QCString optStr = fullMatch.mid(idx+1,idxEnd-idx-1).stripWhiteSpace();
2080 optList = split(optStr.str(),",");
2081 }
2082 auto it = docCmdMap.find(cmdName.str());
2083 if (it!=docCmdMap.end()) // special action is required
2084 {
2085 switch (it->second.sectionHandling)
2086 {
2088 {
2089 int i=0;
2090 while (yytext[i]==' ' || yytext[i]=='\t') i++;
2091 yyextra->sectionTitle+=fullMatch.left(i);
2092 yyextra->sectionTitle+='@';
2093 yyextra->sectionTitle+=fullMatch.mid(i);
2094 addOutput(yyscanner,qPrint(fullMatch.left(i)));
2095 addOutput(yyscanner,'@');
2096 addOutput(yyscanner,qPrint(fullMatch.mid(i)));
2097 warn(yyextra->fileName,yyextra->lineNr,
2098 "'\\{}' command is not allowed in section title, escaping command.",cmdName
2099 );
2100 }
2101 break;
2103 {
2104 addSection(yyscanner,false);
2105 addOutput(yyscanner," \\ilinebr ");
2106 warn(yyextra->fileName,yyextra->lineNr,
2107 "'\\{}' command is not allowed in section title, ending section title.",cmdName
2108 );
2109 unput_string(yytext,yyleng);
2110 BEGIN(Comment);
2111 }
2112 break;
2114 {
2115 if (cmdName == "fileinfo")
2116 {
2117 int i=0;
2118 while (yytext[i]==' ' || yytext[i]=='\t') i++;
2119 yyextra->sectionTitle+=fullMatch.left(i);
2120 addOutput(yyscanner,fullMatch.left(i));
2121 handleFileInfoSection(yyscanner,cmdName,optList);
2122 if (idxEnd == -1)
2123 {
2124 yyextra->sectionTitle+=fullMatch.mid(i+9);
2125 addOutput(yyscanner,fullMatch.mid(i+9));
2126 }
2127 else
2128 {
2129 yyextra->sectionTitle+=fullMatch.mid(idxEnd+1);
2130 addOutput(yyscanner,fullMatch.mid(idxEnd+1));
2131 }
2132 }
2133 else if (cmdName == "lineinfo")
2134 {
2135 int i=0;
2136 while (yytext[i]==' ' || yytext[i]=='\t') i++;
2137 yyextra->sectionTitle+=fullMatch.left(i);
2138 yyextra->sectionTitle+=QCString().setNum(yyextra->lineNr);
2139 yyextra->sectionTitle+=' ';
2140 yyextra->sectionTitle+=fullMatch.mid(i+9);
2141 addOutput(yyscanner,fullMatch.left(i));
2142 addOutput(yyscanner,QCString().setNum(yyextra->lineNr));
2143 addOutput(yyscanner,' ');
2144 addOutput(yyscanner,fullMatch.mid(i+9));
2145 }
2146 else if (cmdName == "raisewarning")
2147 {
2148 yyextra->raiseWarning = "";
2149 BEGIN(RaiseWarningSection);
2150 }
2151 else if (cmdName == "noop")
2152 {
2153 addSection(yyscanner,false);
2154 BEGIN(Noop);
2155 }
2156 else if (cmdName == "cite")
2157 {
2158 yyextra->sectionTitle+=yytext;
2159 addOutput(yyscanner,yytext);
2160 BEGIN(CiteLabelSection);
2161 }
2162 else if (cmdName == "iline")
2163 {
2164 yyextra->sectionTitle+=yytext;
2165 addOutput(yyscanner,yytext);
2166 BEGIN(ILineSection);
2167 }
2168 else if (cmdName == "ifile")
2169 {
2170 yyextra->sectionTitle+=yytext;
2171 addOutput(yyscanner,yytext);
2172 BEGIN(IFileSection);
2173 }
2174 else if ((cmdName == "anchor") || (cmdName == "ianchor"))
2175 {
2176 addOutput(yyscanner,"@"+cmdName);
2177 if (optList.empty())
2178 {
2179 yyextra -> anchorTitle = "";
2180 }
2181 else
2182 {
2183 addOutput(yyscanner,"{"+join(optList," ")+"}");
2184 yyextra -> anchorTitle = join(optList," ");
2185 }
2186 addOutput(yyscanner," ");
2187 BEGIN(AnchorLabelSection);
2188 }
2189 else if (cmdName == "link")
2190 {
2191 yyextra->sectionTitle+=yytext;
2192 BEGIN(LinkSection);
2193 }
2194 else
2195 {
2196 yyextra->sectionTitle+=yytext;
2197 warn(yyextra->fileName,yyextra->lineNr,
2198 "internal error '\\{}' command is to be replaced in section title.",cmdName
2199 );
2200 }
2201 }
2202 break;
2204 {
2205 yyextra->sectionTitle+=yytext;
2206 addOutput(yyscanner,yytext);
2207 }
2208 break;
2209 }
2210 }
2211 else
2212 {
2213 yyextra->sectionTitle+=yytext;
2214 addOutput(yyscanner,yytext);
2215 }
2216 }
static bool handleFileInfoSection(yyscan_t yyscanner, const QCString &cmdName, const StringVector &optList)
2217<SectionTitle>. { // anything else
2218 yyextra->sectionTitle+=yytext;
2219 addOutput(yyscanner,*yytext);
2220 }
2221
2222 /* ----- handle arguments of the subpage command ------- */
2223
2224<SubpageLabel>{FILE} { // first argument
2225 addOutput(yyscanner,yytext);
2226 // we add subpage labels as a kind of "inheritance" relation to prevent
2227 // needing to add another list to the Entry class.
2228 yyextra->current->extends.emplace_back(yytext,Protection::Public,Specifier::Normal);
2229 BEGIN(SubpageTitle);
2230 }
2231<SubpageLabel>{DOCNL} { // missing argument
2232 warn(yyextra->fileName,yyextra->lineNr,
2233 "\\subpage command has no label"
2234 );
2235 if (*yytext=='\n') yyextra->lineNr++;
2236 addOutput(yyscanner,'\n');
2237 BEGIN( Comment );
2238 }
2239<SubpageLabel>. {
2240 unput(yytext[0]);
2241 BEGIN( Comment );
2242 }
2243<SubpageTitle>{DOCNL} { // no title, end command
2244 addOutput(yyscanner,yytext);
2245 BEGIN( Comment );
2246 }
2247<SubpageTitle>[ \t]*"\""[^\"\n]*"\"" { // add title, end of command
2248 addOutput(yyscanner,yytext);
2249 BEGIN( Comment );
2250 }
2251<SubpageTitle>. { // no title, end of command
2252 unput(*yytext);
2253 BEGIN( Comment );
2254 }
2255
2256 /* ----- handle arguments of the anchor command ------- */
2257
2258<AnchorLabel,AnchorLabelSection>{LABELID} { // found argument
2259 QCString lbl = yyextra->raisePrefix+yytext;
2260 addAnchor(yyscanner,lbl, yyextra->anchorTitle);
2261 addOutput(yyscanner,lbl.data());
2262 if (YY_START == AnchorLabel)
2263 {
2264 BEGIN(Comment);
2265 }
2266 else
2267 {
2268 BEGIN(SectionTitle);
2269 }
2270 }
2271<AnchorLabel,AnchorLabelSection>{DOCNL} { // missing argument
2272 warn(yyextra->fileName,yyextra->lineNr,
2273 "\\anchor command has no label"
2274 );
2275 if (*yytext=='\n') yyextra->lineNr++;
2276 addOutput(yyscanner,'\n');
2277 if (YY_START == AnchorLabel)
2278 {
2279 BEGIN(Comment);
2280 }
2281 else
2282 {
2283 BEGIN(SectionTitle);
2284 }
2285 }
2286<AnchorLabel,AnchorLabelSection>. { // invalid character for anchor label
2287 warn(yyextra->fileName,yyextra->lineNr,
2288 "Invalid or missing anchor label"
2289 );
2290 addOutput(yyscanner,yytext);
2291 if (YY_START == AnchorLabel)
2292 {
2293 BEGIN(Comment);
2294 }
2295 else
2296 {
2297 BEGIN(SectionTitle);
2298 }
2299 }
2300
2301
2302 /* ----- handle arguments of the preformatted block commands ------- */
2303
2304<FormatBlock>{CMD}("endverbatim"|"endiverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"endicode"|"endmsc")/{NW} { // possible ends
2305 addOutput(yyscanner,yytext);
2306 if (&yytext[4]==yyextra->blockName) // found end of the block
2307 {
2308 BEGIN(Comment);
2309 }
2310 }
2311<FormatBlock>{CMD}"enduml" {
2312 addOutput(yyscanner,yytext);
2313 if (yyextra->blockName=="startuml") // found end of the block
2314 {
2315 BEGIN(Comment);
2316 }
2317 }
2318<FormatBlock>[^ \@\*\/\\\n]* { // some word
2319 addOutput(yyscanner,yytext);
2320 }
2321<FormatBlock>{DOCNL} { // new line
2322 if (*yytext=='\n') yyextra->lineNr++;
2323 addOutput(yyscanner,'\n');
2324 }
2325<FormatBlock>{CCS} { // start of a C-comment
2326 if (!(yyextra->blockName=="code" || yyextra->blockName=="verbatim" ||
2327 yyextra->blockName=="icode" || yyextra->blockName=="iverbatim"||
2328 yyextra->blockName=="iliteral"
2329 )
2330 ) yyextra->commentCount++;
2331 addOutput(yyscanner,yytext);
2332 }
2333<FormatBlock>{CCE} { // end of a C-comment
2334 addOutput(yyscanner,yytext);
2335 if (!(yyextra->blockName=="code" || yyextra->blockName=="verbatim" ||
2336 yyextra->blockName=="icode" || yyextra->blockName=="iverbatim"||
2337 yyextra->blockName=="iliteral"
2338 )
2339 )
2340 {
2341 yyextra->commentCount--;
2342 if (yyextra->commentCount<0)
2343 {
2344 QCString endTag = "end"+yyextra->blockName;
2345 if (yyextra->blockName=="startuml") endTag="enduml";
2346 warn(yyextra->fileName,yyextra->lineNr,
2347 "found */ without matching /* while inside a \\{} block! Perhaps a missing \\{}?",
2348 yyextra->blockName,endTag);
2349 }
2350 }
2351 }
2352<FormatBlock>. {
2353 addOutput(yyscanner,*yytext);
2354 }
2355<FormatBlock><<EOF>> {
2356 QCString endTag = "end"+yyextra->blockName;
2357 if (yyextra->blockName=="startuml") endTag="enduml";
2358 warn(yyextra->fileName,yyextra->lineNr,
2359 "reached end of comment while inside a \\{} block; check for missing \\{} tag!",
2360 yyextra->blockName,endTag
2361 );
2362 yyterminate();
2363 }
2364
2365 /* ----- handle arguments of if/ifnot commands ------- */
2366
2367<GuardParam>{B}*"(" {
2368 yyextra->guardExpr=yytext;
2369 yyextra->roundCount=1;
2370 BEGIN(GuardExpr);
2371 }
2372<GuardExpr>[^()]* {
2373 yyextra->guardExpr+=yytext;
2374 lineCount(yyscanner);
2375 }
2376<GuardExpr>"(" {
2377 yyextra->guardExpr+=yytext;
2378 yyextra->roundCount++;
2379 }
2380<GuardExpr>")" {
2381 yyextra->guardExpr+=yytext;
2382 yyextra->roundCount--;
2383 if (yyextra->roundCount==0)
2384 {
2385 handleGuard(yyscanner,yyextra->guardExpr);
2386 }
2387 }
static void handleGuard(yyscan_t yyscanner, const QCString &expr)
2388<GuardExpr>\n {
2389 warn(yyextra->fileName,yyextra->lineNr,
2390 "invalid expression '{}' for yyextra->guards",yyextra->guardExpr);
2391 unput(*yytext);
2392 BEGIN(GuardParam);
2393 }
2394<GuardParam>{B}*[a-z_A-Z0-9.\-]+ { // parameter of if/ifnot yyextra->guards
2395 handleGuard(yyscanner,yytext);
2396 }
2397<GuardParam>{DOCNL} { // end of argument
2398 //next line is commented out due to bug620924
2399 //addOutput(yyscanner,'\n');
2400 addIlineBreak(yyscanner,yyextra->lineNr);
2401 unput_string(yytext,yyleng);
2402 handleGuard(yyscanner,QCString());
2403 }
static void addIlineBreak(yyscan_t yyscanner, int lineNr)
2404<GuardParam>{LC} { // line continuation
2405 yyextra->lineNr++;
2406 addOutput(yyscanner,'\n');
2407 }
2408<GuardParam>. { // empty condition
2409 unput(*yytext);
2410 handleGuard(yyscanner,QCString());
2411 }
2412<GuardParamEnd>{B}*{DOCNL} {
2413 lineCount(yyscanner);
2414 yyextra->spaceBeforeIf.clear();
2415 addIlineBreak(yyscanner,yyextra->lineNr);
2416 BEGIN(Comment);
2417 }
2418<GuardParamEnd>{B}* {
2419 if (!yyextra->spaceBeforeIf.isEmpty()) // needed for 665313 in combination with bug620924
2420 {
2421 addOutput(yyscanner,yyextra->spaceBeforeIf);
2422 }
2423 yyextra->spaceBeforeIf.clear();
2424 addIlineBreak(yyscanner,yyextra->lineNr);
2425 BEGIN(Comment);
2426 }
2427<GuardParamEnd>. {
2428 unput(*yytext);
2429 addIlineBreak(yyscanner,yyextra->lineNr);
2430 BEGIN(Comment);
2431 }
2432
2433 /* ----- handle skipping of conditional sections ------- */
2434
2435<SkipGuardedSection>{CMD}"ifnot"/{NW} {
2436 yyextra->guardType = Guard_IfNot;
2437 yyextra->guards->emplace(false);
2438 BEGIN( GuardParam );
2439 }
2440<SkipGuardedSection>{CMD}"if"/{NW} {
2441 yyextra->guardType = Guard_If;
2442 yyextra->guards->emplace(false);
2443 BEGIN( GuardParam );
2444 }
2445<SkipGuardedSection>{CMD}"endif"/{NW} {
2446 if (yyextra->guards->empty())
2447 {
2448 warn(yyextra->fileName,yyextra->lineNr,
2449 "found \\endif without matching start command");
2450 BEGIN( Comment );
2451 }
2452 else
2453 {
2454 yyextra->guards->pop();
2455 if (yyextra->guards->empty())
2456 {
2457 BEGIN( GuardParamEnd );
2458 }
2459 else
2460 {
2461 if (yyextra->guards->top().isEnabled())
2462 {
2463 BEGIN( GuardParamEnd );
2464 }
2465 else
2466 {
2467 BEGIN( SkipGuardedSection );
2468 }
2469 }
2470 }
2471 }
2472<SkipGuardedSection>{CMD}"else"/{NW} {
2473 if (yyextra->guards->empty())
2474 {
2475 warn(yyextra->fileName,yyextra->lineNr,
2476 "found \\else without matching start command");
2477 }
2478 else if (yyextra->guards->top().hasElse())
2479 {
2480 warn(yyextra->fileName,yyextra->lineNr,
2481 "found multiple \\else commands in same \\if construct");
2482 yyextra->guards->top().setEnabled(false);
2483 BEGIN( SkipGuardedSection );
2484 }
2485 else if (!yyextra->guards->top().parentVisible())
2486 {
2487 yyextra->guards->top().setEnabled(false);
2488 BEGIN( SkipGuardedSection );
2489 }
2490 else
2491 {
2492 yyextra->spaceBeforeIf = yyextra->spaceBeforeCmd;
2493 yyextra->guards->top().setElse();
2494 if (!yyextra->guards->top().parentVisible())
2495 {
2496 yyextra->guards->top().setEnabled(false);
2497 BEGIN( SkipGuardedSection );
2498 }
2499 else if (yyextra->guards->top().isEnabledFound())
2500 {
2501 yyextra->guards->top().setEnabled(false);
2502 BEGIN( SkipGuardedSection );
2503 }
2504 else
2505 {
2506 yyextra->guards->top().setEnabled(true);
2507 BEGIN( GuardParamEnd );
2508 }
2509 }
2510 }
2511<SkipGuardedSection>{CMD}"elseif"/{NW} {
2512 if (yyextra->guards->empty())
2513 {
2514 warn(yyextra->fileName,yyextra->lineNr,
2515 "found \\elseif without matching start command");
2516 }
2517 else if (yyextra->guards->top().hasElse())
2518 {
2519 warn(yyextra->fileName,yyextra->lineNr,
2520 "found \\elseif command after \\else command was given in \\if construct");
2521 yyextra->guardType = Guard_ElseIf;
2522 yyextra->spaceBeforeIf = yyextra->spaceBeforeCmd;
2523 yyextra->guards->top().setEnabled(false);
2524 BEGIN( GuardParam );
2525 }
2526 else
2527 {
2528 yyextra->guardType = Guard_ElseIf;
2529 yyextra->spaceBeforeIf = yyextra->spaceBeforeCmd;
2530 yyextra->guards->top().setEnabled(false);
2531 BEGIN( GuardParam );
2532 }
2533 }
2534<SkipGuardedSection>{DOCNL} { // skip line
2535 if (*yytext=='\n') yyextra->lineNr++;
2536 //addOutput(yyscanner,'\n');
2537 }
2538<SkipGuardedSection>[^ \\@\n]+ { // skip non-special characters
2539 }
2540<SkipGuardedSection>{CMD}{CMD} |
2541<SkipGuardedSection>. { // any other character
2542 }
2543
2544
2545 /* ----- handle skipping of internal section ------- */
2546
2547<SkipInternal>{DOCNL} { // skip line
2548 if (*yytext=='\n') yyextra->lineNr++;
2549 addOutput(yyscanner,'\n');
2550 }
2551<SkipInternal>{CMD}"if"/[ \t] {
2552 yyextra->condCount++;
2553 }
2554<SkipInternal>{CMD}"ifnot"/[ \t] {
2555 yyextra->condCount++;
2556 }
2557<SkipInternal>{CMD}/"endif" {
2558 yyextra->condCount--;
2559 if (yyextra->condCount<0) // handle conditional section around of \internal, see bug607743
2560 {
2561 unput('\\');
2562 BEGIN(Comment);
2563 }
2564 }
2565<SkipInternal>{CMD}/"section"[ \t] {
2566 if (yyextra->sectionLevel>0)
2567 {
2568 unput('\\');
2569 BEGIN(Comment);
2570 }
2571 }
2572<SkipInternal>{CMD}/"subsection"[ \t] {
2573 if (yyextra->sectionLevel>1)
2574 {
2575 unput('\\');
2576 BEGIN(Comment);
2577 }
2578 }
2579<SkipInternal>{CMD}/"subsubsection"[ \t] {
2580 if (yyextra->sectionLevel>2)
2581 {
2582 unput('\\');
2583 BEGIN(Comment);
2584 }
2585 }
2586<SkipInternal>{CMD}/"paragraph"[ \t] {
2587 if (yyextra->sectionLevel>3)
2588 {
2589 unput('\\');
2590 BEGIN(Comment);
2591 }
2592 }
2593<SkipInternal>{CMD}/"subparagraph"[ \t] {
2594 if (yyextra->sectionLevel>4)
2595 {
2596 unput('\\');
2597 BEGIN(Comment);
2598 }
2599 }
2600<SkipInternal>{CMD}/"subsubparagraph"[ \t] {
2601 if (yyextra->sectionLevel>5)
2602 {
2603 unput('\\');
2604 BEGIN(Comment);
2605 }
2606 }
2607<SkipInternal>{CMD}"endinternal"[ \t]* {
2608 BEGIN(Comment);
2609 }
2610<SkipInternal>[^ \\@\n]+ { // skip non-special characters
2611 }
2612<SkipInternal>. { // any other character
2613 }
2614
2615
2616 /* ----- handle argument of name command ------- */
2617
2618<NameParam>{DOCNL} { // end of argument
2619 //if (*yytext=='\n') yyextra->lineNr++;
2620 //addOutput(yyscanner,'\n');
2621 unput_string(yytext,yyleng);
2622 BEGIN( Comment );
2623 }
2624<NameParam>{LC} { // line continuation
2625 yyextra->lineNr++;
2626 addOutput(yyscanner,'\n');
2627 yyextra->docGroup.appendHeader(' ');
2628 }
2629<NameParam>. { // ignore other stuff
2630 yyextra->docGroup.appendHeader(*yytext);
2631 yyextra->current->name+=*yytext;
2632 }
2633
2634 /* ----- handle argument of noop command ------- */
2635<Noop>{DOCNL} { // end of argument
2636 if (*yytext=='\n')
2637 {
2638 yyextra->lineNr++;
2639 addOutput(yyscanner,'\n');
2640 }
2641 BEGIN( Comment );
2642 }
2643<Noop>. { // ignore other stuff
2644 }
2645 /* ----- handle argument of raisewarning command ------- */
2646<RaiseWarning,RaiseWarningSection>{DOCNL} { // end of argument
2647 warn_doc_error(yyextra->fileName,yyextra->lineNr,
2648 "{}",yyextra->raiseWarning);
2649 yyextra->raiseWarning = "";
2650 if (*yytext=='\n') yyextra->lineNr++;
2651 addOutput(yyscanner,'\n');
2652 if (YY_START == RaiseWarning)
2653 {
2654 BEGIN(Comment);
2655 }
2656 else
2657 {
2658 yyextra->sectionTitle+=yytext;
2659 BEGIN(SectionTitle);
2660 }
2661 }
#define warn_doc_error(file, line, fmt,...)
Definition message.h:112
2662<RaiseWarning,RaiseWarningSection>. { // ignore other stuff
2663 yyextra->raiseWarning += yytext;
2664 }
2665 /* ----- handle argument of ingroup command ------- */
2666
2667<InGroupParam>{LABELID} { // group id
2668 yyextra->current->groups.emplace_back(
2670 );
2671 yyextra->inGroupParamFound=TRUE;
2672 }
@ GROUPING_INGROUP
membership in group was defined by @ingroup
Definition types.h:236
2673<InGroupParam>{DOCNL} { // missing argument
2674 if (!yyextra->inGroupParamFound)
2675 {
2676 warn(yyextra->fileName,yyextra->lineNr,
2677 "Missing group name for \\ingroup command"
2678 );
2679 }
2680 //if (*yytext=='\n') yyextra->lineNr++;
2681 //addOutput(yyscanner,'\n');
2682 unput_string(yytext,yyleng);
2683 BEGIN( Comment );
2684 }
2685<InGroupParam>{LC} { // line continuation
2686 yyextra->lineNr++;
2687 addOutput(yyscanner,'\n');
2688 }
2689<InGroupParam>. { // ignore other stuff
2690 addOutput(yyscanner,*yytext);
2691 }
2692
2693 /* ----- handle argument of fn command ------- */
2694
2695<FnParam>{DOCNL} { // end of argument
2696 if (yyextra->braceCount==0)
2697 {
2698 if (yyextra->functionProto.stripWhiteSpace().isEmpty())
2699 {
2700 warn(yyextra->fileName,yyextra->lineNr,
2701 "missing argument after '\\{}'.",yyextra->currentCmd
2702 );
2703 }
2704 else
2705 {
2706 makeStructuralIndicator(yyscanner,yyextra->currentMakeEntryType);
2707 yyextra->langParser->parsePrototype(yyextra->functionProto);
2708 }
2709 unput_string(yytext,yyleng);
2710 BEGIN( Comment );
2711 }
2712 }
2713<FnParam>{LC} { // line continuation
2714 yyextra->lineNr++;
2715 yyextra->functionProto+=' ';
2716 }
2717<FnParam>[^@\\\n()]+ { // non-special characters
2718 yyextra->functionProto+=yytext;
2719 }
2720<FnParam>"(" {
2721 yyextra->functionProto+=yytext;
2722 yyextra->braceCount++;
2723 }
2724<FnParam>")" {
2725 yyextra->functionProto+=yytext;
2726 yyextra->braceCount--;
2727 }
2728<FnParam>. { // add other stuff
2729 yyextra->functionProto+=*yytext;
2730 }
2731
2732
2733 /* ----- handle argument of overload command ------- */
2734
2735
2736<OverloadParam>{DOCNL} { // end of argument
2737 if (*yytext=='\n') yyextra->lineNr++;
2738 if (yyextra->functionProto.stripWhiteSpace().isEmpty())
2739 { // plain overload command
2740 addOutput(yyscanner,getOverloadDocs());
2741 addOutput(yyscanner,'\n');
2742 }
2743 else // overload declaration
2744 {
2745 makeStructuralIndicator(yyscanner,EntryType::makeOverloadDoc);
2746 yyextra->langParser->parsePrototype(yyextra->functionProto);
2747 }
2748 BEGIN( Comment );
2749 }
QCString getOverloadDocs()
Definition util.cpp:4010
2750<OverloadParam>{LC} { // line continuation
2751 yyextra->lineNr++;
2752 yyextra->functionProto+=' ';
2753 }
2754<OverloadParam>. { // add other stuff
2755 yyextra->functionProto+=*yytext;
2756 }
2757
2758 /* ----- handle argument of inherit command ------- */
2759
2760<InheritParam>({ID}("::"|"."))*{ID} { // found argument
2761 yyextra->current->extends.emplace_back(
2762 removeRedundantWhiteSpace(yytext),Protection::Public,Specifier::Normal
2763 );
2764 BEGIN( Comment );
2765 }
2766<InheritParam>{DOCNL} { // missing argument
2767 warn(yyextra->fileName,yyextra->lineNr,
2768 "\\inherit command has no argument"
2769 );
2770 if (*yytext=='\n') yyextra->lineNr++;
2771 addOutput(yyscanner,'\n');
2772 BEGIN( Comment );
2773 }
2774<InheritParam>. { // invalid character for anchor label
2775 warn(yyextra->fileName,yyextra->lineNr,
2776 "Invalid or missing name for \\inherit command"
2777 );
2778 BEGIN(Comment);
2779 }
2780
2781 /* ----- handle argument of extends and implements commands ------- */
2782
2783<ExtendsParam>({ID}("::"|"."))*{ID} { // found argument
2784 yyextra->current->extends.emplace_back(
2785 removeRedundantWhiteSpace(yytext),Protection::Public,Specifier::Normal
2786 );
2787 BEGIN( Comment );
2788 }
2789<ExtendsParam>{DOCNL} { // missing argument
2790 warn(yyextra->fileName,yyextra->lineNr,
2791 "'\\{}' command has no argument",yyextra->currentCmd
2792 );
2793 //if (*yytext=='\n') yyextra->lineNr++;
2794 //addOutput(yyscanner,'\n');
2795 unput_string(yytext,yyleng);
2796 BEGIN( Comment );
2797 }
2798<ExtendsParam>. { // ignore other stuff
2799 }
2800
2801 /* ----- handle language specific sections ------- */
2802
2803<SkipLang>{CMD}"~"[a-zA-Z-]* { /* language switch */
2804 QCString langId(&yytext[2]);
2805 if (!langId.isEmpty() && !Config_isAvailableEnum(OUTPUT_LANGUAGE,langId))
2806 {
2807 warn(yyextra->fileName,yyextra->lineNr,
2808 "non supported language '{}' specified in '{}'",langId,QCString(yytext).stripWhiteSpace());
2809 }
2810 else if (langId.isEmpty() ||
2811 qstricmp(Config_getEnumAsString(OUTPUT_LANGUAGE),langId)==0)
2812 { // enable language specific section
2813 BEGIN(Comment);
2814 }
2815 }
2816<SkipLang>[^*@\\\n]* { /* any character not a *, @, backslash or new line */
2817 }
2818<SkipLang>{DOCNL} { /* new line in verbatim block */
2819 if (*yytext=='\n') yyextra->lineNr++;
2820 }
2821<SkipLang>. { /* any other character */
2822 }
2823
2824 /* ----- handle arguments of the cite command ------- */
2825
2826<CiteLabel,CiteLabelSection>{CITEID} { // found argument
2827 addCite(yyscanner);
2828 addOutput(yyscanner,yytext);
2829 if (YY_START == CiteLabel)
2830 {
2831 BEGIN(Comment);
2832 }
2833 else
2834 {
2835 yyextra->sectionTitle+=yytext;
2836 BEGIN(SectionTitle);
2837 }
2838 }
static void addCite(yyscan_t yyscanner)
2839<CiteLabel,CiteLabelSection>{DOCNL} { // missing argument
2840 warn(yyextra->fileName,yyextra->lineNr,
2841 "\\cite command has no label"
2842 );
2843 //if (*yytext=='\n') yyextra->lineNr++;
2844 //addOutput(yyscanner,'\n');
2845 if (YY_START == CiteLabel)
2846 {
2847 unput_string(yytext,yyleng);
2848 BEGIN(Comment);
2849 }
2850 else
2851 {
2852 yyextra->sectionTitle+=yytext;
2853 unput_string(yytext,yyleng);
2854 BEGIN(SectionTitle);
2855 }
2856 }
2857<CiteLabel,CiteLabelSection>. { // invalid character for cite label
2858 warn(yyextra->fileName,yyextra->lineNr,
2859 "Invalid or missing cite label"
2860 );
2861 if (YY_START == CiteLabel)
2862 {
2863 BEGIN(Comment);
2864 }
2865 else
2866 {
2867 yyextra->sectionTitle+=yytext;
2868 BEGIN(SectionTitle);
2869 }
2870 }
2871
2872 /* ----- handle argument of the copydoc command ------- */
2873
2874<CopyDoc><<EOF>> {
2875 setOutput(yyscanner,OutputDoc);
2876 addOutput(yyscanner," \\ilinebr\\ilinebr\\copydetails ");
2877 addOutput(yyscanner,yyextra->copyDocArg);
2878 addOutput(yyscanner,"\n");
2879 BEGIN(Comment);
2880 }
2881<CopyDoc>"<"[/]?{TABLEDEL}">" {
2882 if (yyextra->braceCount==0)
2883 {
2884 setOutput(yyscanner,OutputDoc);
2885 addOutput(yyscanner," \\ilinebr\\ilinebr\\copydetails ");
2886 addOutput(yyscanner,yyextra->copyDocArg);
2887 addOutput(yyscanner,yytext);
2888 BEGIN(Comment);
2889 }
2890 }
2891<CopyDoc>{DOCNL} {
2892 if (*yytext=='\n') yyextra->lineNr++;
2893 if (yyextra->braceCount==0)
2894 {
2895 setOutput(yyscanner,OutputDoc);
2896 addOutput(yyscanner," \\ilinebr\\ilinebr\\copydetails ");
2897 addOutput(yyscanner,yyextra->copyDocArg);
2898 addOutput(yyscanner,"\n");
2899 BEGIN(Comment);
2900 }
2901 }
2902<CopyDoc>{LC} { // line continuation
2903 yyextra->lineNr++;
2904 }
2905<CopyDoc>[^@\\\n()<]+ { // non-special characters
2906 yyextra->copyDocArg+=yytext;
2907 addOutput(yyscanner,yytext);
2908 }
2909<CopyDoc>"(" {
2910 yyextra->copyDocArg+=yytext;
2911 addOutput(yyscanner,yytext);
2912 yyextra->braceCount++;
2913 }
2914<CopyDoc>")" {
2915 yyextra->copyDocArg+=yytext;
2916 addOutput(yyscanner,yytext);
2917 yyextra->braceCount--;
2918 }
2919<CopyDoc>. {
2920 yyextra->copyDocArg+=yytext;
2921 addOutput(yyscanner,yytext);
2922 }
2923
2924 /*
2925<*>. { fprintf(stderr,"Lex scanner %s %sdefault rule for state %s: #%s#\n", __FILE__,!yyextra->fileName.isEmpty() ? ("(" + yyextra->fileName +") ").data(): "",stateToString(YY_START),yytext);}
2926<*>\n { fprintf(stderr,"Lex scanner %s %sdefault rule newline for state %s.\n", __FILE__, !yyextra->fileName.isEmpty() ? ("(" + yyextra->fileName +") ").data(): "",stateToString(YY_START));}
2927 */
2928
2929%%

◆ yyread()

int yyread ( yyscan_t yyscanner,
char * buf,
int max_size )
static

Definition at line 4753 of file commentscan.l.

4754{
4755 struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4756 yyextra->prevPosition=yyextra->inputPosition;
4757 int c=0;
4758 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
4759 {
4760 *buf = yyextra->inputString[yyextra->inputPosition++] ;
4761 //printf("%d (%c)\n",*buf,*buf);
4762 c++; buf++;
4763 }
4764 return c;
4765}

Variable Documentation

◆ docCmdMap

const std::map< std::string, DocCmdMap > docCmdMap
static

Definition at line 210 of file commentscan.l.

211{
212 // command name handler function command spacing section handling
217 { "arg", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
218 { "attention", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
219 { "author", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
220 { "authors", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
235 { "copyright", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
236 { "showdate", { nullptr, CommandSpacing::Inline, SectionHandling::Allowed }},
237 { "date", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
242 { "diafile", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
245 { "docbookinclude", { nullptr, CommandSpacing::Inline, SectionHandling::Break }},
248 { "dotfile", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
255 { "exception", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
274 { "htmlinclude", { nullptr, CommandSpacing::Inline, SectionHandling::Break }},
281 { "important", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
282 { "include", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
285 { "includelineno", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
291 { "invariant", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
292 { "latexinclude", { nullptr, CommandSpacing::Inline, SectionHandling::Break }},
294 { "li", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
295 { "line", { nullptr, CommandSpacing::Invisible, SectionHandling::Escape }},
297 { "maninclude", { nullptr, CommandSpacing::Inline, SectionHandling::Break }},
302 { "mscfile", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
307 { "note", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
311 { "par", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
315 { "post", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
316 { "pre", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
333 { "remark", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
334 { "remarks", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
335 { "result", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
336 { "return", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
337 { "returns", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
339 { "rtfinclude", { nullptr, CommandSpacing::Inline, SectionHandling::Break }},
341 { "sa", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
343 { "see", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
350 { "since", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
351 { "snippet", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
352 { "snippetlineno", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
363 { "throw", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
364 { "throws", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
366 { "tparam", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
369 { "until", { nullptr, CommandSpacing::Block, SectionHandling::Escape }},
373 { "verbinclude", { nullptr, CommandSpacing::Inline, SectionHandling::Break }},
374 { "version", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
375 { "warning", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
377 { "xmlinclude", { nullptr, CommandSpacing::Inline, SectionHandling::Break }},
383 { "secreflist", { nullptr, CommandSpacing::Invisible, SectionHandling::Break }},
384 { "endsecreflist", { nullptr, CommandSpacing::Invisible, SectionHandling::Escape }},
385 { "dontinclude", { nullptr, CommandSpacing::Invisible, SectionHandling::Break }},
386 { "line", { nullptr, CommandSpacing::Invisible, SectionHandling::Escape }},
387 { "skip", { nullptr, CommandSpacing::Invisible, SectionHandling::Escape }},
388 { "skipline", { nullptr, CommandSpacing::Invisible, SectionHandling::Escape }},
389 { "until", { nullptr, CommandSpacing::Invisible, SectionHandling::Escape }},
390 { "vhdlflow", { nullptr, CommandSpacing::Block, SectionHandling::Break }},
391 { "enddot", { nullptr, CommandSpacing::Invisible, SectionHandling::Escape }},
392 { "endmsc", { nullptr, CommandSpacing::Invisible, SectionHandling::Escape }},
393 { "enduml", { nullptr, CommandSpacing::Invisible, SectionHandling::Escape }},
394 { "endicode", { nullptr, CommandSpacing::Invisible, SectionHandling::Escape }},
395 { "endcode", { nullptr, CommandSpacing::Invisible, SectionHandling::Escape }},
396 { "endverbatim", { nullptr, CommandSpacing::Invisible, SectionHandling::Escape }},
397 { "enddocbookonly", { nullptr, CommandSpacing::Invisible, SectionHandling::Escape }},
398 { "endhtmlonly", { nullptr, CommandSpacing::Invisible, SectionHandling::Escape }},
399 { "endlatexonly", { nullptr, CommandSpacing::Invisible, SectionHandling::Escape }},
400 { "endmanonly", { nullptr, CommandSpacing::Invisible, SectionHandling::Escape }},
401 { "endrtfonly", { nullptr, CommandSpacing::Invisible, SectionHandling::Escape }},
402 { "endxmlonly", { nullptr, CommandSpacing::Invisible, SectionHandling::Escape }},
404 { "endlink", { nullptr, CommandSpacing::Invisible, SectionHandling::Escape }},
409 { "plantumlfile", { nullptr, CommandSpacing::Block, SectionHandling::Break }}
static bool handlePrivate(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideIncludegraph(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleDetails(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleName(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleImage(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleStatic(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleCopyDetails(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleProtectedSection(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleOverload(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleXRefItem(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleProtocol(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleWeakGroup(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleInternal(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleShowInitializer(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleGroupgraph(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleQualifier(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleLineInfo(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleNoSubGrouping(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleMainpage(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleCite(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleTest(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleIRaise(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideCallgraph(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleCallgraph(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleIngroup(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleStruct(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleInterface(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleShowInlineSource(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleAddToGroup(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleDef(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleConcept(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleExtends(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleBrief(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleRefItem(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleIncludedBygraph(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleUnion(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideDirectoryGraph(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleRelated(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleBug(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleReferencesRelation(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideIncludedBygraph(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleRaiseWarning(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleElseIf(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleMemberOf(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleToc(yyscan_t yyscanner, const QCString &s, const StringVector &)
static bool handleParBlock(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleCategory(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handlePrivateSection(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleModule(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleInherit(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleEndIf(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleDirectoryGraph(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleTodo(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleIPrefix(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleCopyDoc(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleReferencedByRelation(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleEnum(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleIfNot(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleFormatBlock(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideInlineSource(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleNoop(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleAnchor(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideInitializer(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleCallergraph(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleParam(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideInheritanceGraph(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleIf(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handlePage(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handlePackage(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideEnumValues(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleSection(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleCollaborationgraph(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideGroupgraph(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleIFile(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleFn(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleDeprecated(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleIncludegraph(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handlePure(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideCollaborationgraph(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideReferencedByRelation(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handlePublic(yyscan_t yyscanner, const QCString &s, const StringVector &)
static bool handleDir(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleRelatedAlso(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleInheritanceGraph(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleAddIndex(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleFileInfo(yyscan_t yyscanner, const QCString &cmdName, const StringVector &optList)
static bool handleSubpage(yyscan_t yyscanner, const QCString &s, const StringVector &)
static bool handleProtected(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleEndParBlock(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleElse(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleClass(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHeaderFile(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleCopyBrief(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleShowEnumValues(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideReferencesRelation(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleFile(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleRetval(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleIdlException(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleNamespace(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleHideCallergraph(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleDefGroup(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleExample(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handleILine(yyscan_t yyscanner, const QCString &, const StringVector &)
static bool handlePublicSection(yyscan_t yyscanner, const QCString &s, const StringVector &)
410};

◆ g_citeMutex

std::mutex g_citeMutex
static

Definition at line 530 of file commentscan.l.

Referenced by addCite().

◆ g_formulaMutex

std::mutex g_formulaMutex
static

Definition at line 529 of file commentscan.l.

Referenced by addFormula().

◆ g_sectionMutex

std::mutex g_sectionMutex
static

Definition at line 528 of file commentscan.l.

Referenced by addAnchor(), addSection(), and addXRefItem().

◆ nonBrief_re

const reg::Ex nonBrief_re(R"( *[\\@]ifile \"[^\"]*\" [\\@]iline (\d+) [\\@]ilinebr ([ \n]*))") ( R"( *[\\@]ifile \"[^\"]*\" [\\@]iline (\d+) [\\@]ilinebr ([ \n]*))" )
static

Referenced by endBrief(), and setOutput().