Doxygen
Toggle main menu visibility
Loading...
Searching...
No Matches
fortranscanner.h
Go to the documentation of this file.
1
/******************************************************************************
2
*
3
* Copyright (C) 1997-2015 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
16
#ifndef SCANNER_FORTRAN_H
17
#define SCANNER_FORTRAN_H
18
19
#include "
parserintf.h
"
20
21
/** \brief Fortran language parser using state-based lexical scanning.
22
*
23
* This is the Fortran language parser for doxygen.
24
*/
25
class
FortranOutlineParser
:
public
OutlineParserInterface
26
{
27
public
:
28
FortranOutlineParser
(
FortranFormat
format=
FortranFormat::Unknown
);
29
~FortranOutlineParser
()
override
;
30
NON_COPYABLE
(
FortranOutlineParser
)
31
void
parseInput
(
const
DString
&fileName,
32
const
char
*fileBuf,
33
const
std::shared_ptr<Entry> &root,
34
ClangTUParser
*clangParser)
override
;
35
bool
needsPreprocessing
(
const
DString
&extension)
const override
;
36
void
parsePrototype
(
const
DString
&text)
override
;
37
38
private
:
39
struct
Private
;
40
std::unique_ptr<Private>
p
;
41
};
42
43
class
FortranOutlineParserFree
final :
public
FortranOutlineParser
44
{
45
public
:
46
FortranOutlineParserFree
() :
FortranOutlineParser
(
FortranFormat
::
Free
) { }
47
};
48
49
class
FortranOutlineParserFixed
final :
public
FortranOutlineParser
50
{
51
public
:
52
FortranOutlineParserFixed
() :
FortranOutlineParser
(
FortranFormat
::
Fixed
) { }
53
};
54
55
const
char
*
prepassFixedForm
(
const
char
* contents,
int
*hasContLine,
int
fixedCommentAfter);
56
bool
recognizeFixedForm
(
const
DString
&contents,
FortranFormat
format);
57
FortranFormat
convertFileNameFortranParserCode
(
const
DString
&fn);
58
59
#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
FortranOutlineParserFixed::FortranOutlineParserFixed
FortranOutlineParserFixed()
Definition
fortranscanner.h:52
FortranOutlineParserFree::FortranOutlineParserFree
FortranOutlineParserFree()
Definition
fortranscanner.h:46
FortranOutlineParser::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
fortranscanner.l:3457
FortranOutlineParser::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
fortranscanner.l:3444
FortranOutlineParser::p
std::unique_ptr< Private > p
Definition
fortranscanner.h:40
FortranOutlineParser::~FortranOutlineParser
~FortranOutlineParser() override
FortranOutlineParser::FortranOutlineParser
FortranOutlineParser(FortranFormat format=FortranFormat::Unknown)
Definition
fortranscanner.l:3437
FortranOutlineParser::parsePrototype
void parsePrototype(const DString &text) override
Callback function called by the comment block scanner.
Definition
fortranscanner.l:3462
OutlineParserInterface
Abstract interface for outline parsers.
Definition
parserintf.h:41
NON_COPYABLE
#define NON_COPYABLE(cls)
Macro to help implementing the rule of 5 for a non-copyable & movable class.
Definition
construct.h:37
prepassFixedForm
const char * prepassFixedForm(const char *contents, int *hasContLine, int fixedCommentAfter)
Definition
fortranscanner.l:1875
recognizeFixedForm
bool recognizeFixedForm(const DString &contents, FortranFormat format)
Definition
fortranscanner.l:2154
convertFileNameFortranParserCode
FortranFormat convertFileNameFortranParserCode(const DString &fn)
Definition
fortranscanner.l:2207
parserintf.h
FortranOutlineParser::Private
Definition
fortranscanner.l:3420
FortranFormat
FortranFormat
Definition
types.h:612
FortranFormat::Fixed
@ Fixed
Definition
types.h:615
FortranFormat::Unknown
@ Unknown
Definition
types.h:613
FortranFormat::Free
@ Free
Definition
types.h:614
src
fortranscanner.h
Generated by
1.19.0