scanner.h
Go to the documentation of this file.
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_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  */
30 {
31  public:
32  virtual ~CLanguageScanner() {}
33  void startTranslationUnit(const char *fileName);
34  void finishTranslationUnit();
35  void parseInput(const char *fileName,
36  const char *fileBuf,
37  Entry *root,
38  bool sameTranslationUnit,
39  QStrList &filesInSameTranslationUnit);
40  bool needsPreprocessing(const QCString &extension);
41  void parseCode(CodeOutputInterface &codeOutIntf,
42  const char *scopeName,
43  const QCString &input,
44  SrcLangExt lang,
45  bool isExampleBlock,
46  const char *exampleName=0,
47  FileDef *fileDef=0,
48  int startLine=-1,
49  int endLine=-1,
50  bool inlineFragment=FALSE,
51  MemberDef *memberDef=0,
52  bool showLineNumbers=TRUE,
53  Definition *searchCtx=0,
54  bool collectXRefs=TRUE
55  );
56  void resetCodeParserState();
57  void parsePrototype(const char *text);
58 };
59 
60 void scanFreeScanner();
61 
62 #endif
void startTranslationUnit(const char *fileName)
Definition: scanner.cpp:22534
Definition: entry.h:63
Abstract interface for programming language parsers.
Definition: parserintf.h:38
C-like language parser using state-based lexical scanning.
Definition: scanner.h:29
const bool FALSE
Definition: qglobal.h:370
SrcLangExt
Definition: types.h:41
void scanFreeScanner()
Definition: scanner.cpp:22510
static int input(void)
Definition: code.cpp:15695
fileName
Definition: dumpTree.py:9
void parsePrototype(const char *text)
Definition: scanner.cpp:22599
void parseCode(CodeOutputInterface &codeOutIntf, const char *scopeName, const QCString &input, SrcLangExt lang, bool isExampleBlock, const char *exampleName=0, FileDef *fileDef=0, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, MemberDef *memberDef=0, bool showLineNumbers=TRUE, Definition *searchCtx=0, bool collectXRefs=TRUE)
Definition: scanner.cpp:22563
void finishTranslationUnit()
Definition: scanner.cpp:22538
bool needsPreprocessing(const QCString &extension)
Definition: scanner.cpp:22584
void parseInput(const char *fileName, const char *fileBuf, Entry *root, bool sameTranslationUnit, QStrList &filesInSameTranslationUnit)
Definition: scanner.cpp:22547
virtual ~CLanguageScanner()
Definition: scanner.h:32
const bool TRUE
Definition: qglobal.h:371
bool collectXRefs
void resetCodeParserState()
Definition: scanner.cpp:22594