Doxygen
Loading...
Searching...
No Matches
vhdljjparser.cpp File Reference
#include <string>
#include "qcstring.h"
#include "containers.h"
#include "vhdljjparser.h"
#include "vhdldocgen.h"
#include "message.h"
#include "config.h"
#include "doxygen.h"
#include "util.h"
#include "language.h"
#include "commentscan.h"
#include "definition.h"
#include "searchindex.h"
#include "outputlist.h"
#include "arguments.h"
#include "types.h"
#include "growbuf.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 QCString &fileName, const QCString &ext)
const EntryListgetVhdlInstList ()
QCString filter2008VhdlComment (const QCString &s)

Variables

static EntryList g_instFiles
static int idCounter

Function Documentation

◆ filter2008VhdlComment()

QCString filter2008VhdlComment ( const QCString & s)

Definition at line 864 of file vhdljjparser.cpp.

865{
866 if (s.length()<4) return s;
867 GrowBuf growBuf;
868 const char *p=s.data()+3; // skip /*!
869 char c='\0';
870 while (*p == ' ' || *p == '\t') p++;
871 while ((c=*p++))
872 {
873 growBuf.addChar(c);
874 if (c == '\n')
875 {
876 // special handling of space followed by * at beginning of line
877 while (*p == ' ' || *p == '\t') p++;
878 while (*p == '*') p++;
879 // special attention in case character at end is /
880 if (*p == '/') p++;
881 }
882 }
883 // special attention in case */ at end of last line
884 size_t len = growBuf.getPos();
885 if (len>=2 && growBuf.at(len-1) == '/' && growBuf.at(len-2) == '*')
886 {
887 len -= 2;
888 while (len>0 && growBuf.at(len-1) == '*') len--;
889 while (len>0 && ((c = growBuf.at(len-1)) == ' ' || c == '\t')) len--;
890 growBuf.setPos(len);
891 }
892 growBuf.addChar(0);
893 return growBuf.get();
894}
Class representing a string buffer optimized for growing.
Definition growbuf.h:28
size_t getPos() const
Definition growbuf.h:116
void addChar(char c)
Definition growbuf.h:69
const char & at(size_t i) const
Definition growbuf.h:118
char * get()
Definition growbuf.h:114
void setPos(size_t newPos)
Definition growbuf.h:117
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:166
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition qcstring.h:172

References GrowBuf::addChar(), GrowBuf::at(), QCString::data(), GrowBuf::get(), GrowBuf::getPos(), QCString::length(), and GrowBuf::setPos().

◆ getVhdlInstList()

const EntryList & getVhdlInstList ( )

Definition at line 841 of file vhdljjparser.cpp.

842{
843 return g_instFiles;
844}
static EntryList g_instFiles

References g_instFiles.

Referenced by VhdlDocGen::computeVhdlComponentRelations().

◆ isConstraintFile()

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

Definition at line 47 of file vhdljjparser.cpp.

48{
49 return fileName.right(ext.length())==ext;
50}
QCString right(size_t len) const
Definition qcstring.h:234

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

Referenced by 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().