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 ()
DString filter2008VhdlComment (const DString &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()

DString filter2008VhdlComment ( const DString & s)

Definition at line 861 of file vhdljjparser.cpp.

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

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

Referenced by filter2008VhdlComment().

◆ getVhdlInstList()

const EntryList & getVhdlInstList ( )

Definition at line 838 of file vhdljjparser.cpp.

839{
840 return g_instFiles;
841}
static EntryList g_instFiles

References g_instFiles, and getVhdlInstList().

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