Doxygen
Loading...
Searching...
No Matches
vhdljjparser.cpp File Reference
#include <string>
#include "dstring.h"
#include "containers.h"
#include "vhdljjparser.h"
#include "vhdldocgen.h"
#include "message.h"
#include "config.h"
#include "doxygen.h"
#include "util.h"
#include "stringutil.h"
#include "language.h"
#include "commentscan.h"
#include "definition.h"
#include "searchindex.h"
#include "outputlist.h"
#include "arguments.h"
#include "types.h"
#include "markdown.h"
#include "VhdlParserTokenManager.h"
#include "VhdlParserErrorHandler.hpp"
#include "regex.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 862 of file vhdljjparser.cpp.

863{
864 if (s.length()<4) return s;
865 DString result;
866 result.reserve(s.length());
867 const char *p=s.data()+3; // skip /*!
868 char c='\0';
869 while (*p == ' ' || *p == '\t') p++;
870 while ((c=*p++))
871 {
872 result+=c;
873 if (c == '\n')
874 {
875 // special handling of space followed by * at beginning of line
876 while (*p == ' ' || *p == '\t') p++;
877 while (*p == '*') p++;
878 // special attention in case character at end is /
879 if (*p == '/') p++;
880 }
881 }
882 // special attention in case */ at end of last line
883 size_t len = result.length();
884 if (len>=2 && result[len-1]=='/' && result[len-2]=='*')
885 {
886 len -= 2;
887 while (len>0 && result[len-1] == '*') len--;
888 while (len>0 && ((c = result[len-1]) == ' ' || c == '\t')) len--;
889 result.resize(len);
890 }
891 return result;
892}
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition dstring.h:88
void resize(size_t newlen)
Definition dstring.h:213
void reserve(size_t size)
Reserve space for size bytes without changing the string contents.
Definition dstring.h:221
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:161
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition dstring.h:155

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

Referenced by filter2008VhdlComment().

◆ getVhdlInstList()

const EntryList & getVhdlInstList ( )

Definition at line 839 of file vhdljjparser.cpp.

840{
841 return g_instFiles;
842}
static EntryList g_instFiles

References g_instFiles, and getVhdlInstList().

Referenced by VhdlDocGen::computeVhdlComponentRelations(), and getVhdlInstList().

◆ isConstraintFile()

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

Definition at line 47 of file vhdljjparser.cpp.

48{
49 return fileName.right(ext.length())==ext;
50}
DString right(size_t len) const
Definition dstring.h:315

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

Referenced by isConstraintFile(), and VHDLOutlineParser::parseInput().

Variable Documentation

◆ g_instFiles

EntryList g_instFiles
static

Definition at line 55 of file vhdljjparser.cpp.

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

◆ idCounter

int idCounter
static

Definition at line 245 of file vhdljjparser.cpp.

Referenced by VHDLOutlineParser::getNameID().