Doxygen
Loading...
Searching...
No Matches
vhdljjparser.h File Reference
#include <vector>
#include <memory>
#include <string>
#include "parserintf.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <ctype.h>
#include "types.h"
#include "entry.h"
#include "vhdldocgen.h"
#include "config.h"
#include "util.h"
+ Include dependency graph for vhdljjparser.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  VHDLOutlineParser
 VHDL parser using state-based lexical scanning. More...
 

Enumerations

enum class  VhdlSection {
  UNKNOWN = 0 , GEN_SEC =0x1 , PARAM_SEC , CONTEXT_SEC ,
  PROTECTED_SEC
}
 

Functions

const EntryListgetVhdlInstList ()
 
QCString filter2008VhdlComment (const QCString &s)
 

Enumeration Type Documentation

◆ VhdlSection

enum class VhdlSection
strong
Enumerator
UNKNOWN 
GEN_SEC 
PARAM_SEC 
CONTEXT_SEC 
PROTECTED_SEC 

Definition at line 20 of file vhdljjparser.h.

Function Documentation

◆ filter2008VhdlComment()

QCString filter2008VhdlComment ( const QCString & s)

Definition at line 868 of file vhdljjparser.cpp.

869{
870 if (s.length()<4) return s;
871 GrowBuf growBuf;
872 const char *p=s.data()+3; // skip /*!
873 char c='\0';
874 while (*p == ' ' || *p == '\t') p++;
875 while ((c=*p++))
876 {
877 growBuf.addChar(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 = growBuf.getPos();
889 if (len>=2 && growBuf.at(len-1) == '/' && growBuf.at(len-2) == '*')
890 {
891 len -= 2;
892 while (len>0 && growBuf.at(len-1) == '*') len--;
893 while (len>0 && ((c = growBuf.at(len-1)) == ' ' || c == '\t')) len--;
894 growBuf.setPos(len);
895 }
896 growBuf.addChar(0);
897 return growBuf.get();
898}
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:153
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:159

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

◆ getVhdlInstList()

const EntryList & getVhdlInstList ( )

Definition at line 845 of file vhdljjparser.cpp.

846{
847 return g_instFiles;
848}
static EntryList g_instFiles

References g_instFiles.

Referenced by VhdlDocGen::computeVhdlComponentRelations().