Doxygen
Loading...
Searching...
No Matches
LexOutlineParser Class Reference

Lex language parser using state-based lexical scanning. More...

#include <src/lexscanner.h>

+ Inheritance diagram for LexOutlineParser:
+ Collaboration diagram for LexOutlineParser:

Classes

struct  Private
 

Public Member Functions

 LexOutlineParser ()
 
 ~LexOutlineParser () override
 
void parseInput (const QCString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &root, ClangTUParser *clangParser) override
 Parses a single input file with the goal to build an Entry tree.
 
bool needsPreprocessing (const QCString &) const override
 Returns TRUE if the language identified by extension needs the C preprocessor to be run before feed the result to the input parser.
 
void parsePrototype (const QCString &) override
 Callback function called by the comment block scanner.
 
- Public Member Functions inherited from OutlineParserInterface

Private Attributes

std::unique_ptr< Privatep
 

Detailed Description

Lex language parser using state-based lexical scanning.

This is the Lex language parser for doxygen.

Definition at line 27 of file lexscanner.h.

Constructor & Destructor Documentation

◆ LexOutlineParser()

LexOutlineParser::LexOutlineParser ( )

Definition at line 1003 of file lexscanner.l.

1003 : p(std::make_unique<LexOutlineParser::Private>())
1004{
1005 lexscannerYYlex_init_extra(&p->state,&p->yyscanner);
1006#ifdef FLEX_DEBUG
1007 lexscannerYYset_debug(Debug::isFlagSet(Debug::Lex_lexscanner)?1:0,p->yyscanner);
1008#endif
1009}
@ Lex_lexscanner
Definition debug.h:62
static bool isFlagSet(const DebugMask mask)
Definition debug.cpp:135
std::unique_ptr< Private > p
Definition lexscanner.h:42

References Debug::isFlagSet(), Debug::Lex_lexscanner, LexOutlineParser(), and p.

Referenced by LexOutlineParser().

◆ ~LexOutlineParser()

LexOutlineParser::~LexOutlineParser ( )
override

Definition at line 1011 of file lexscanner.l.

1012{
1013 lexscannerYYlex_destroy(p->yyscanner);
1014}

References p.

Member Function Documentation

◆ needsPreprocessing()

bool LexOutlineParser::needsPreprocessing ( const QCString & extension) const
inlineoverridevirtual

Returns TRUE if the language identified by extension needs the C preprocessor to be run before feed the result to the input parser.

See also
parseInput()

Implements OutlineParserInterface.

Definition at line 37 of file lexscanner.h.

37{ return TRUE; };
#define TRUE
Definition qcstring.h:37

References TRUE.

◆ parseInput()

void LexOutlineParser::parseInput ( const QCString & fileName,
const char * fileBuf,
const std::shared_ptr< Entry > & root,
ClangTUParser * clangParser )
overridevirtual

Parses a single input file with the goal to build an Entry tree.

Parameters
[in]fileNameThe full name of the file.
[in]fileBufThe contents of the file (zero terminated).
[in,out]rootThe root of the tree of Entry *nodes representing the information extracted from the file.
[in]clangParserThe clang translation unit parser object or nullptr if disabled.

Implements OutlineParserInterface.

Definition at line 1016 of file lexscanner.l.

1020{
1021 struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
1022
1023 yyextra->fileName = fileName;
1024 DebugLex debugLex(Debug::Lex_lexscanner, __FILE__, qPrint(fileName));
1025
1026 ::parseMain(p->yyscanner,fileName,fileBuf,root,clangParser);
1027}
static void parseMain(yyscan_t yyscanner, const QCString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &rt, FortranFormat format)
const char * qPrint(const char *s)
Definition qcstring.h:672

References Debug::Lex_lexscanner, p, parseMain(), and qPrint().

◆ parsePrototype()

void LexOutlineParser::parsePrototype ( const QCString & text)
inlineoverridevirtual

Callback function called by the comment block scanner.

It provides a string text containing the prototype of a function or variable. The parser should parse this and store the information in the Entry node that corresponds with the node for which the comment block parser was invoked.

Implements OutlineParserInterface.

Definition at line 38 of file lexscanner.h.

38{}

Member Data Documentation

◆ p

std::unique_ptr<Private> LexOutlineParser::p
private

Definition at line 42 of file lexscanner.h.

Referenced by LexOutlineParser(), parseInput(), and ~LexOutlineParser().


The documentation for this class was generated from the following files: