doxygen
vhdljjparser.h
1 #ifndef VHDLJJPARSER_H
2 #define VHDLJJPARSER_H
3 
4 #include <vector>
5 #include <memory>
6 #include <string>
7 
8 #include "parserintf.h"
9 #include <stdio.h>
10 #include <stdlib.h>
11 #include <assert.h>
12 #include <ctype.h>
13 
14 #include "types.h"
15 #include "entry.h"
16 #include "vhdldocgen.h"
17 #include "config.h"
18 #include "util.h"
19 
20 enum { GEN_SEC=0x1, PARAM_SEC,CONTEXT_SEC,PROTECTED_SEC } ;
21 //void parserVhdlfile(const char* inputBuffer);
22 
28 {
29  public:
31  ~VHDLOutlineParser() override;
32  NON_COPYABLE(VHDLOutlineParser)
33  void parseInput(const QCString &fileName,
34  const char *fileBuf,
35  const std::shared_ptr<Entry> &root,
36  ClangTUParser *clangParser) override;
37 
38  bool needsPreprocessing(const QCString &) const override { return TRUE; }
39  void parsePrototype(const QCString &text) override;
40 
41 
42  // interface for generated parser code
43 
44  void setLineParsed(int tok);
45  int getLine(int tok);
46  int getLine();
47  void lineCount(const QCString &);
48  void lineCount();
49  void addProto(const QCString &s1,const QCString &s2,const QCString &s3,const QCString &s4,const QCString &s5,const QCString &s6);
50  void createFunction(const QCString &impure,VhdlSpecifier spec,const QCString &fname);
51  void addVhdlType(const QCString &n,int startLine,EntryType section, VhdlSpecifier spec,const QCString &args,const QCString &type,Protection prot);
52  void addCompInst(const QCString &n, const QCString &instName, const QCString &comp,int iLine);
53  void handleCommentBlock(const QCString &doc,bool brief);
54  void handleFlowComment(const QCString &);
55  void initEntry(Entry *e);
56  void newEntry();
57  bool isFuncProcProced();
58  void pushLabel(QCString &,QCString&);
59  QCString popLabel(QCString & q);
60  bool addLibUseClause(const QCString &type);
61  void mapLibPackage( Entry* root);
62  void createFlow();
63  void error_skipto(int kind);
64  void oneLineComment(QCString qcs);
65  void setMultCommentLine();
66  bool checkMultiComment(QCString& qcs,int line);
67  void insertEntryAtLine(std::shared_ptr<Entry> ce,int line);
69  int checkInlineCode(QCString & doc);
70  private:
71  struct Private;
72  std::unique_ptr<Private> p;
73 };
74 
75 
76 const EntryList &getVhdlInstList();
77 
78 QCString filter2008VhdlComment(const QCString &s);
79 
80 #endif
This file contains a number of basic enums and types.
Represents an unstructured piece of information, about an entity found in the sources.
Definition: entry.h:114
VHDL parser using state-based lexical scanning.
Definition: vhdljjparser.h:27
bool needsPreprocessing(const QCString &) const override
Returns TRUE if the language identified by extension needs the C preprocessor to be run before feed t...
Definition: vhdljjparser.h:38
Definition: vhdljjparser.cpp:57
A bunch of utility functions.
QCString getNameID()
returns a unique id for each record member.
Definition: vhdljjparser.cpp:259
void parsePrototype(const QCString &text) override
Callback function called by the comment block scanner.
Definition: vhdljjparser.cpp:470
Abstract interface for outline parsers.
Definition: parserintf.h:41
Protection
Protection level of members.
Definition: types.h:26
void parseInput(const QCString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &root, ClangTUParser *clangParser) override
Parses a single input file with the goal to build an Entry tree.
Definition: vhdljjparser.cpp:132
This is an alternative implementation of QCString.
Definition: qcstring.h:93
Clang parser object for a single translation unit, which consists of a source file and the directly o...
Definition: clangparser.h:24
Wrapper class for the Entry type.
Definition: types.h:521