Doxygen
Loading...
Searching...
No Matches
vhdljjparser.h
Go to the documentation of this file.
1#ifndef VHDLJJPARSER_H
2#define VHDLJJPARSER_H
3
4#include <memory>
5
6#include "parserintf.h"
7#include "vhdldocgen.h"
8#include "config.h"
9#include "util.h"
10#include "stringutil.h"
11
13//void parserVhdlfile(const char* inputBuffer);
14
15/** \brief VHDL parser using state-based lexical scanning.
16 *
17 * This is the VHDL language parser for doxygen.
18 */
20{
21 public:
23 ~VHDLOutlineParser() override;
25 void parseInput(const DString &fileName,
26 const char *fileBuf,
27 const std::shared_ptr<Entry> &root,
28 ClangTUParser *clangParser) override;
29
30 bool needsPreprocessing(const DString &) const override { return true; }
31 void parsePrototype(const DString &text) override;
32
33
34 // interface for generated parser code
35
36 void setLineParsed(int tok);
37 int getLine(int tok);
38 int getLine();
39 void lineCount(const DString &);
40 void lineCount();
41 void addProto(const DString &s1,const DString &s2,const DString &s3,const DString &s4,const DString &s5,const DString &s6);
42 void createFunction(const DString &impure,VhdlSpecifier spec,const DString &fname);
43 void addVhdlType(const DString &n,int startLine,EntryType section, VhdlSpecifier spec,const DString &args,const DString &type,Protection prot);
44 void addCompInst(const DString &n, const DString &instName, const DString &comp,int iLine);
45 void handleCommentBlock(const DString &doc,bool brief);
46 void handleFlowComment(const DString &);
47 void initEntry(Entry *e);
48 void newEntry();
49 bool isFuncProcProced();
50 void pushLabel(DString &,DString&);
52 bool addLibUseClause(const DString &type);
53 void mapLibPackage( Entry* root);
54 void createFlow();
55 void error_skipto(int kind);
56 void oneLineComment(DString qcs);
57 void setMultCommentLine();
58 bool checkMultiComment(DString& qcs,int line);
59 void insertEntryAtLine(std::shared_ptr<Entry> ce,int line);
61 size_t checkInlineCode(DString & doc);
62 private:
63 struct Private;
64 std::unique_ptr<Private> p;
65};
66
67
69
71
72#endif
Clang parser object for a single translation unit, which consists of a source file and the directly o...
Definition clangparser.h:25
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition dstring.h:88
Represents an unstructured piece of information, about an entity found in the sources.
Definition entry.h:115
Wrapper class for the Entry type.
Definition types.h:856
Abstract interface for outline parsers.
Definition parserintf.h:41
size_t checkInlineCode(DString &doc)
DString popLabel(DString &q)
void parseInput(const DString &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.
void oneLineComment(DString qcs)
void error_skipto(int kind)
void addProto(const DString &s1, const DString &s2, const DString &s3, const DString &s4, const DString &s5, const DString &s6)
bool needsPreprocessing(const DString &) const override
Returns true if the language identified by extension needs the C preprocessor to be run before feed t...
void createFunction(const DString &impure, VhdlSpecifier spec, const DString &fname)
void setLineParsed(int tok)
void addVhdlType(const DString &n, int startLine, EntryType section, VhdlSpecifier spec, const DString &args, const DString &type, Protection prot)
std::unique_ptr< Private > p
void insertEntryAtLine(std::shared_ptr< Entry > ce, int line)
bool addLibUseClause(const DString &type)
DString getNameID()
returns a unique id for each record member.
void addCompInst(const DString &n, const DString &instName, const DString &comp, int iLine)
void pushLabel(DString &, DString &)
bool checkMultiComment(DString &qcs, int line)
void mapLibPackage(Entry *root)
void handleFlowComment(const DString &)
#define NON_COPYABLE(cls)
Macro to help implementing the rule of 5 for a non-copyable & movable class.
Definition construct.h:37
#define lineCount(s, len)
std::vector< std::shared_ptr< Entry > > EntryList
Definition entry.h:270
static void newEntry(yyscan_t yyscanner)
Definition scanner.l:8516
static void parsePrototype(yyscan_t yyscanner, const DString &text)
Definition scanner.l:8922
static void handleCommentBlock(yyscan_t yyscanner, const DString &doc, bool brief)
Definition scanner.l:8536
static void initEntry(yyscan_t yyscanner)
Definition scanner.l:8095
Some helper functions for std::string.
Protection
Definition types.h:32
VhdlSpecifier
Definition types.h:770
A bunch of utility functions.
const EntryList & getVhdlInstList()
DString filter2008VhdlComment(const DString &s)
VhdlSection