ISLEman
vhdljjparser.h
1 #ifndef VHDLJJPARSER_H
2 #define VHDLJJPARSER_H
3 
4 #include "parserintf.h"
5 #include <stdio.h>
6 #include <stdlib.h>
7 #include <assert.h>
8 #include <ctype.h>
9 #include <qarray.h>
10 
11 #include <qfile.h>
12 #include <qdict.h>
13 #include <string>
14 #include "types.h"
15 #include "entry.h"
16 #include "vhdldocgen.h"
17 #include "qstringlist.h"
18 #include "vhdlcode.h"
19 #include "memberlist.h"
20 #include "config.h"
21 
22 
23 
24 
25 enum { GEN_SEC=0x1, PARAM_SEC,CONTEXT_SEC,PROTECTED_SEC } ;
26 void parserVhdlfile(const char* inputBuffer);
27 
28 class Entry;
29 class ClassSDict;
30 class FileStorage;
31 class ClassDef;
32 class MemberDef;
33 class QStringList;
34 struct VhdlConfNode;
35 
36 
42 {
43  public:
44  virtual ~VHDLLanguageScanner() {}
45  void startTranslationUnit(const char *) {}
47  void parseInput(const char * fileName,
48  const char *fileBuf,
49  Entry *root,
50  bool sameTranslationUnit,
51  QStrList &filesInSameTranslationUnit);
52 
53  void parseCode(CodeOutputInterface &codeOutIntf,
54  const char *scopeName,
55  const QCString &input,
56  SrcLangExt lang,
57  bool isExampleBlock,
58  const char *exampleName=0,
59  FileDef *fileDef=0,
60  int startLine=-1,
61  int endLine=-1,
62  bool inlineFragment=FALSE,
63  MemberDef *memberDef=0,
64  bool showLineNumbers=TRUE,
65  Definition *searchCtx=0,
66  bool collectXRefs=TRUE
67  );
68  bool needsPreprocessing(const QCString &) { return TRUE; }
70  void parsePrototype(const char *text);
71 };
72 
74 {
75  VhdlConfNode(const char* a,const char* b,const char* config,const char* cs,bool leaf)
76  {
77  arch=a; // architecture e.g. for iobuffer
78  arch=arch.lower();
79  binding=b; // binding e.g. use entiy work.xxx(bev)
80  binding=binding.lower();
81  confVhdl=config; // configuration foo is bar
82  compSpec=cs;
83  isInlineConf=false; // primary configuration?
84  isLeaf=leaf;
85  };
86 
87  QCString confVhdl;
88  QCString arch;
89  QCString binding;
90  QCString compSpec;
91  int level;
92  bool isLeaf;
93  bool isInlineConf;
94 
95 };
96 
97 void vhdlscanFreeScanner();
98 
99 QList<VhdlConfNode>& getVhdlConfiguration();
100 QList<Entry>& getVhdlInstList();
101 
102 #endif
Definition: qstrlist.h:57
void finishTranslationUnit()
Called after all files in a translation unit have been processed.
Definition: vhdljjparser.h:46
This file contains a number of basic enums and types.
The common base class of all entity definitions found in the sources.
Definition: definition.h:92
void parsePrototype(const char *text)
Callback function called by the comment block scanner.
Definition: vhdljjparser.cpp:407
void resetCodeParserState()
Resets the state of the code parser.
Definition: vhdljjparser.h:69
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
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.
Definition: vhdljjparser.cpp:161
A model of a file symbol.
Definition: filedef.h:64
Store implementation based on a file.
Definition: filestorage.h:28
A sorted dictionary of ClassDef objects.
Definition: classlist.h:56
bool needsPreprocessing(const QCString &)
Returns TRUE if the language identified by extension needs the C preprocessor to be run before feed t...
Definition: vhdljjparser.h:68
SrcLangExt
Language as given by extension.
Definition: types.h:41
void startTranslationUnit(const char *)
Starts processing a translation unit (source files + headers).
Definition: vhdljjparser.h:45
A list of strings.
Definition: qstringlist.h:51
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...
Definition: vhdldocgen.cpp:4523
VHDL parser using state-based lexical scanning.
Definition: vhdljjparser.h:41
This is an alternative implementation of QCString.
Definition: qcstring.h:131
Output interface for code parser.
Definition: outputgen.h:59
Definition: vhdljjparser.h:73
A class representing of a compound symbol.
Definition: classdef.h:59
Definition: qlist.h:54