Doxygen
Loading...
Searching...
No Matches
vhdljjparser.cpp File Reference
#include "vhdljjparser.h"
#include <string>
#include <memory>
#include <exception>
#include "VhdlParserErrorHandler.hpp"
#include "VhdlParserTokenManager.h"
#include "arguments.h"
#include "commentscan.h"
#include "config.h"
#include "containers.h"
#include "definition.h"
#include "doxygen.h"
#include "dstring.h"
#include "language.h"
#include "markdown.h"
#include "message.h"
#include "outputlist.h"
#include "regex.h"
#include "stringutil.h"
#include "types.h"
#include "util.h"
#include "vhdldocgen.h"
Include dependency graph for vhdljjparser.cpp:

Go to the source code of this file.

Classes

struct  VHDLDocInfo
struct  VHDLOutlineParser::Private

Functions

static bool isConstraintFile (const DString &fileName, const DString &ext)
const EntryListgetVhdlInstList ()
DString filter2008VhdlComment (const DString &s)

Variables

static EntryList g_instFiles
static int idCounter

Function Documentation

◆ filter2008VhdlComment()

DString filter2008VhdlComment ( const DString & s)

Definition at line 867 of file vhdljjparser.cpp.

868{
869 if (s.length()<4) return s;
870 DString result;
871 result.reserve(s.length());
872 const char *p=s.data()+3; // skip /*!
873 char c='\0';
874 while (*p == ' ' || *p == '\t') p++;
875 while ((c=*p++))
876 {
877 result+=c;
878 if (c == '\n')
879 {
880 // special handling of space followed by * at beginning of line
881 while (*p == ' ' || *p == '\t') p++;
882 while (*p == '*') p++;
883 // special attention in case character at end is /
884 if (*p == '/') p++;
885 }
886 }
887 // special attention in case */ at end of last line
888 size_t len = result.length();
889 if (len>=2 && result[len-1]=='/' && result[len-2]=='*')
890 {
891 len -= 2;
892 while (len>0 && result[len-1] == '*') len--;
893 while (len>0 && ((c = result[len-1]) == ' ' || c == '\t')) len--;
894 result.resize(len);
895 }
896 return result;
897}
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition dstring.h:84
void resize(size_t newlen)
Definition dstring.h:209
void reserve(size_t size)
Reserve space for size bytes without changing the string contents.
Definition dstring.h:217
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition dstring.h:157
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition dstring.h:151

References DString::data(), DString::length(), DString::reserve(), and DString::resize().

◆ getVhdlInstList()

const EntryList & getVhdlInstList ( )

Definition at line 844 of file vhdljjparser.cpp.

845{
846 return g_instFiles;
847}
static EntryList g_instFiles

References g_instFiles.

Referenced by VhdlDocGen::computeVhdlComponentRelations().

◆ isConstraintFile()

bool isConstraintFile ( const DString & fileName,
const DString & ext )
static

Definition at line 52 of file vhdljjparser.cpp.

53{
54 return fileName.right(ext.length())==ext;
55}
DString right(size_t len) const
Definition dstring.h:311

References DString::length(), and DString::right().

Referenced by VHDLOutlineParser::parseInput().

Variable Documentation

◆ g_instFiles

EntryList g_instFiles
static

Definition at line 60 of file vhdljjparser.cpp.

Referenced by VHDLOutlineParser::addCompInst(), and getVhdlInstList().

◆ idCounter

int idCounter
static

Definition at line 250 of file vhdljjparser.cpp.

Referenced by VHDLOutlineParser::getNameID().