ISLEman
pyscanner.h
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 /* This code is based on the work done by the MoxyPyDoxy team
18  * (Linda Leong, Mike Rivera, Kim Truong, and Gabriel Estrada)
19  * in Spring 2005 as part of CS 179E: Compiler Design Project
20  * at the University of California, Riverside; the course was
21  * taught by Peter H. Froehlich <phf@acm.org>.
22  */
23 
24 
25 #ifndef PYSCANNER_H
26 #define PYSCANNER_H
27 
28 #include "parserintf.h"
29 
35 {
36  public:
37  virtual ~PythonLanguageScanner() {}
38  void startTranslationUnit(const char *) {}
40  void parseInput(const char * fileName,
41  const char *fileBuf,
42  Entry *root,
43  bool sameTranslationUnit,
44  QStrList &filesInSameTranslationUnit);
45  bool needsPreprocessing(const QCString &extension);
46  void parseCode(CodeOutputInterface &codeOutIntf,
47  const char *scopeName,
48  const QCString &input,
49  SrcLangExt lang,
50  bool isExampleBlock,
51  const char *exampleName=0,
52  FileDef *fileDef=0,
53  int startLine=-1,
54  int endLine=-1,
55  bool inlineFragment=FALSE,
56  MemberDef *memberDef=0,
57  bool showLineNumbers=TRUE,
58  Definition *searchCtx=0,
59  bool collectXrefs=TRUE
60  );
61  void resetCodeParserState();
62  void parsePrototype(const char *text);
63 };
64 
65 void pyscanFreeScanner();
66 
67 #endif
Definition: qstrlist.h:57
void resetCodeParserState()
Resets the state of the code parser.
The common base class of all entity definitions found in the sources.
Definition: definition.h:92
A model of a class/file/namespace member symbol.
Definition: memberdef.h:43
Represents an unstructured piece of information, about an entity found in the sources.
Definition: entry.h:63
Abstract interface for programming language parsers.
Definition: parserintf.h:38
Python Language parser using state-based lexical scanning.
Definition: pyscanner.h:34
A model of a file symbol.
Definition: filedef.h:64
void parseInput(const char *fileName, const char *fileBuf, Entry *root, bool sameTranslationUnit, QStrList &filesInSameTranslationUnit)
Parses a single input file with the goal to build an Entry tree.
bool needsPreprocessing(const QCString &extension)
Returns TRUE if the language identified by extension needs the C preprocessor to be run before feed t...
SrcLangExt
Language as given by extension.
Definition: types.h:41
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)
Parses a source file or fragment with the goal to produce highlighted and cross-referenced output...
void parsePrototype(const char *text)
Callback function called by the comment block scanner.
void finishTranslationUnit()
Called after all files in a translation unit have been processed.
Definition: pyscanner.h:39
void startTranslationUnit(const char *)
Starts processing a translation unit (source files + headers).
Definition: pyscanner.h:38
This is an alternative implementation of QCString.
Definition: qcstring.h:131
Output interface for code parser.
Definition: outputgen.h:59