|
1 /****************************************************************************** |
|
2 * |
|
3 * |
|
4 * |
|
5 * Copyright (C) 1997-2008 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_H |
|
19 #define SCANNER_H |
|
20 |
|
21 #include "parserintf.h" |
|
22 |
|
23 /** \brief C-like language parser using state-based lexical scanning. |
|
24 * |
|
25 * This is the language parser for doxygen. It is somewhat fuzzy and |
|
26 * supports C++ and various languages that are closely related to C++, |
|
27 * such as C, C#, Objective-C, Java, PHP, and IDL. |
|
28 */ |
|
29 class CLanguageScanner : public ParserInterface |
|
30 { |
|
31 public: |
|
32 virtual ~CLanguageScanner() {} |
|
33 void parseInput(const char *fileName, |
|
34 const char *fileBuf, |
|
35 Entry *root); |
|
36 bool needsPreprocessing(const QCString &extension); |
|
37 void parseCode(CodeOutputInterface &codeOutIntf, |
|
38 const char *scopeName, |
|
39 const QCString &input, |
|
40 bool isExampleBlock, |
|
41 const char *exampleName=0, |
|
42 FileDef *fileDef=0, |
|
43 int startLine=-1, |
|
44 int endLine=-1, |
|
45 bool inlineFragment=FALSE, |
|
46 MemberDef *memberDef=0 |
|
47 ); |
|
48 void resetCodeParserState(); |
|
49 void parsePrototype(const char *text); |
|
50 }; |
|
51 |
|
52 void scanFreeScanner(); |
|
53 |
|
54 #endif |