Skip to main content

The LexOutlineParser Class Reference

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

Declaration

class LexOutlineParser { ... }

Included Headers

#include <src/lexscanner.h>

Base class

classOutlineParserInterface

Abstract interface for outline parsers. More...

Public Constructors Index

LexOutlineParser ()

Public Destructor Index

~LexOutlineParser () override

Public Member Functions Index

voidparseInput (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. More...

boolneedsPreprocessing (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. More...

voidparsePrototype (const QCString &) override

Callback function called by the comment block scanner. More...

Private Member Attributes Index

std::unique_ptr< Private >p

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.

Public Constructors

LexOutlineParser()

LexOutlineParser::LexOutlineParser ()

Declaration at line 30 of file lexscanner.h, definition at line 1003 of file lexscanner.l.

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}

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

Referenced by LexOutlineParser.

Public Destructor

~LexOutlineParser()

LexOutlineParser::~LexOutlineParser ()

Declaration at line 31 of file lexscanner.h, definition at line 1011 of file lexscanner.l.

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

Reference p.

Public Member Functions

needsPreprocessing()

bool LexOutlineParser::needsPreprocessing (const QCString & extension)
inline virtual

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()

Definition at line 37 of file lexscanner.h.

37 bool needsPreprocessing(const QCString &/* extension */) const override { return TRUE; };

Reference TRUE.

parseInput()

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

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

Parameters
[in] fileName

The full name of the file.

[in] fileBuf

The contents of the file (zero terminated).

[inout] root

The root of the tree of Entry *nodes representing the information extracted from the file.

[in] clangParser

The clang translation unit parser object or nullptr if disabled.

Declaration at line 33 of file lexscanner.h, definition at line 1016 of file lexscanner.l.

1017 const char *fileBuf,
1018 const std::shared_ptr<Entry> &root,
1019 ClangTUParser *clangParser)
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}

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

parsePrototype()

void LexOutlineParser::parsePrototype (const QCString & text)
inline virtual

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.

Definition at line 38 of file lexscanner.h.

38 void parsePrototype(const QCString &/* text */) override {}

Private Member Attributes

p

std::unique_ptr<Private> LexOutlineParser::p

Definition at line 42 of file lexscanner.h.

42 std::unique_ptr<Private> p;

Referenced by LexOutlineParser, parseInput and ~LexOutlineParser.


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


Generated via doxygen2docusaurus by Doxygen 1.14.0.