Doxygen
Toggle main menu visibility
Loading...
Searching...
No Matches
pyscanner.h
Go to the documentation of this file.
1
/******************************************************************************
2
*
3
* Copyright (C) 1997-2026 by Dimitri van Heesch.
4
*
5
* Permission to use, copy, modify, and distribute this software and its
6
* documentation under the terms of the GNU General Public License is hereby
7
* granted. No representations are made about the suitability of this software
8
* for any purpose. It is provided "as is" without express or implied warranty.
9
* See the GNU General Public License for more details.
10
*
11
* Documents produced by Doxygen are derivative works derived from the
12
* input used in their production; they are not affected by this license.
13
*
14
*/
15
/* This code is based on the work done by the MoxyPyDoxy team
16
* (Linda Leong, Mike Rivera, Kim Truong, and Gabriel Estrada)
17
* in Spring 2005 as part of CS 179E: Compiler Design Project
18
* at the University of California, Riverside; the course was
19
* taught by Peter H. Froehlich <phf@acm.org>.
20
*/
21
22
23
#ifndef PYSCANNER_H
24
#define PYSCANNER_H
25
26
#include "
parserintf.h
"
27
28
/** \brief Python Language parser using state-based lexical scanning.
29
*
30
* This is the Python language parser for doxygen.
31
*/
32
class
PythonOutlineParser
final :
public
OutlineParserInterface
33
{
34
public
:
35
PythonOutlineParser
();
36
~PythonOutlineParser
()
override
;
37
NON_COPYABLE
(
PythonOutlineParser
)
38
void
parseInput
(
const
DString
&fileName,
39
const
char
*fileBuf,
40
const
std::shared_ptr<Entry> &root,
41
ClangTUParser
*clangParser)
override
;
42
bool
needsPreprocessing
(
const
DString
&extension)
const override
;
43
void
parsePrototype
(
const
DString
&text)
override
;
44
private
:
45
struct
Private
;
46
std::unique_ptr<Private>
p
;
47
};
48
49
#endif
ClangTUParser
Clang parser object for a single translation unit, which consists of a source file and the directly o...
Definition
clangparser.h:25
DString
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition
dstring.h:88
OutlineParserInterface
Abstract interface for outline parsers.
Definition
parserintf.h:41
PythonOutlineParser::parseInput
void parseInput(const DString &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.
Definition
pyscanner.l:2473
PythonOutlineParser::p
std::unique_ptr< Private > p
Definition
pyscanner.h:46
PythonOutlineParser::PythonOutlineParser
PythonOutlineParser()
Definition
pyscanner.l:2459
PythonOutlineParser::parsePrototype
void parsePrototype(const DString &text) override
Callback function called by the comment block scanner.
Definition
pyscanner.l:2492
PythonOutlineParser::needsPreprocessing
bool needsPreprocessing(const DString &extension) const override
Returns true if the language identified by extension needs the C preprocessor to be run before feed t...
Definition
pyscanner.l:2487
NON_COPYABLE
#define NON_COPYABLE(cls)
Macro to help implementing the rule of 5 for a non-copyable & movable class.
Definition
construct.h:37
parserintf.h
PythonOutlineParser::Private
Definition
pyscanner.l:2454
src
pyscanner.h
Generated by
1.19.0