1 /******************************************************************************
2  *
3  *
4  *
5  * Copyright (C) 1997-2015 by Dimitri van Heesch.
6  *
7  * Permission to use, copy, modify, and distribute this software and its
8  * documentation under the terms of the GNU General Public License is hereby
9  * granted. No representations are made about the suitability of this software
10  * for any purpose. It is provided "as is" without express or implied warranty.
11  * See the GNU General Public License for more details.
12  *
13  * Documents produced by Doxygen are derivative works derived from the
14  * input used in their production; they are not affected by this license.
15  *
16  */
17 
18 #ifndef SCANNER_FORTRAN_H
19 #define SCANNER_FORTRAN_H
20 
21 #include "parserintf.h"
22 
23 /** \brief Fortran language parser using state-based lexical scanning.
24  *
25  *  This is the Fortran language parser for doxygen.
26  */
27 class FortranOutlineParser : public OutlineParserInterface
28 {
29   public:
30     FortranOutlineParser(FortranFormat format=FortranFormat_Unknown);
31    ~FortranOutlineParser();
32     void parseInput(const QCString &fileName,
33                     const char *fileBuf,
34                     const std::shared_ptr<Entry> &root,
35                     ClangTUParser *clangParser);
36     bool needsPreprocessing(const QCString &extension) const;
37     void parsePrototype(const QCString &text);
38 
39   private:
40     struct Private;
41     std::unique_ptr<Private> p;
42 };
43 
44 class FortranOutlineParserFree : public FortranOutlineParser
45 {
46   public:
FortranOutlineParserFree()47     FortranOutlineParserFree() : FortranOutlineParser(FortranFormat_Free) { }
48 };
49 
50 class FortranOutlineParserFixed : public FortranOutlineParser
51 {
52   public:
FortranOutlineParserFixed()53     FortranOutlineParserFixed() : FortranOutlineParser(FortranFormat_Fixed) { }
54 };
55 
56 const char* prepassFixedForm(const char* contents, int *hasContLine);
57 
58 #endif
59