Functions | Variables
vhdljjparser.cpp File Reference
#include <qcstring.h>
#include <qfileinfo.h>
#include <qstringlist.h>
#include "vhdljjparser.h"
#include "vhdlcode.h"
#include "vhdldocgen.h"
#include "message.h"
#include "config.h"
#include "doxygen.h"
#include "util.h"
#include "language.h"
#include "commentscan.h"
#include "index.h"
#include "definition.h"
#include "searchindex.h"
#include "outputlist.h"
#include "arguments.h"
#include "types.h"
#include "VhdlParserIF.h"

Go to the source code of this file.

Functions

bool checkMultiComment (QCString &qcs, int line)
 
QList< Entry > * getEntryAtLine (const Entry *ce, int line)
 
QList< VhdlConfNode > & getVhdlConfiguration ()
 
QList< Entry > & getVhdlInstList ()
 
EntrygetVhdlCompound ()
 
void startCodeBlock (int index)
 
void makeInlineDoc (int endCode)
 
bool isConstraintFile (const QCString &fileName, const QCString &ext)
 
void isVhdlDocPending ()
 
bool checkInlineCode (QCString &doc)
 

Variables

static ParserInterfaceg_thisParser
 
static QCString yyFileName
 
static int yyLineNr = 1
 
static int * lineParse
 
static int iDocLine = -1
 
static QCString inputString
 
static EntrygBlock = 0
 
static Entryprevious = 0
 
static EntryoldEntry
 
static bool varr =FALSE
 
static QCString varName
 
static QList< EntryinstFiles
 
static QList< EntrylibUse
 
static QList< EntrylineEntry
 
static QList< VhdlConfNodeconfigL
 
struct {
   QCString   doc
 
   bool   brief
 
   bool   pending
 
   int   iDocLine
 
str_doc
 
static bool doxComment =FALSE
 
static QCString strComment
 
static int iCodeLen
 

Function Documentation

bool checkInlineCode ( QCString doc)

Definition at line 281 of file vhdljjparser.cpp.

282 {
283  int index=doc.find("\\code");
284 
285  if (index>0)
286  {
287  strComment+=doc;
288  startCodeBlock(index);
290  return true;
291  }
292  return false;
293 }
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
static bool doxComment
static QCString strComment
QCString doc
void startCodeBlock(int index)
const bool TRUE
Definition: qglobal.h:371
bool checkMultiComment ( QCString qcs,
int  line 
)

Definition at line 821 of file vhdljjparser.cpp.

822 {
824 
825  if (pTemp->isEmpty()) return false;
826 
828  while (!pTemp->isEmpty())
829  {
830  Entry *e=(Entry*)pTemp->getFirst();
831  e->briefLine=line;
832  e->brief+=qcs;
833 
834  pTemp->removeFirst();
835  }
836  return true;
837 }
bool removeFirst()
Definition: qlist.h:79
Definition: entry.h:63
int briefLine
line number at which the brief desc. was found
Definition: entry.h:264
QList< Entry > * getEntryAtLine(const Entry *ce, int line)
static Entry * current_root
const double e
QCString brief
brief description (doc block)
Definition: entry.h:263
bool isEmpty() const
Definition: qlist.h:67
type * getFirst() const
Definition: qlist.h:95
static void prepareComment(QCString &)
void line(double t, double *p, double &x, double &y, double &z)
QList< Entry > * getEntryAtLine ( const Entry ce,
int  line 
)

Definition at line 840 of file vhdljjparser.cpp.

841 {
842  EntryListIterator eli(*ce->children());
843  Entry *rt;
844  for (;(rt=eli.current());++eli)
845  {
846  if (rt->bodyLine==line)
847  {
848  lineEntry.insert(0,rt);
849  }
850 
851  getEntryAtLine(rt,line);
852  }
853  return &lineEntry;
854 }
Definition: entry.h:63
QList< Entry > * getEntryAtLine(const Entry *ce, int line)
bool insert(uint i, const type *d)
Definition: qlist.h:70
const QList< Entry > * children() const
Definition: entry.h:210
static QList< Entry > lineEntry
void line(double t, double *p, double &x, double &y, double &z)
Entry* getVhdlCompound ( )

Definition at line 95 of file vhdljjparser.cpp.

96 {
97  if (VhdlParser::lastEntity) return VhdlParser::lastEntity;
98  if (VhdlParser::lastCompound) return VhdlParser::lastCompound;
99  return NULL;
100 }
QList<VhdlConfNode>& getVhdlConfiguration ( )

Definition at line 92 of file vhdljjparser.cpp.

92 { return configL; }
static QList< VhdlConfNode > configL
QList<Entry>& getVhdlInstList ( )

Definition at line 93 of file vhdljjparser.cpp.

93 { return instFiles; }
static QList< Entry > instFiles
bool isConstraintFile ( const QCString fileName,
const QCString ext 
)

Definition at line 155 of file vhdljjparser.cpp.

156 {
157  return fileName.right(ext.length())==ext;
158 }
uint length() const
Definition: qcstring.h:195
QCString right(uint len) const
Definition: qcstring.cpp:231
void isVhdlDocPending ( )

Definition at line 230 of file vhdljjparser.cpp.

231 {
232  if (!str_doc.pending) return;
233 
234  str_doc.pending=FALSE;
235  oldEntry=0; // prevents endless recursion
236  iDocLine=str_doc.iDocLine;
238  iDocLine=-1;
239 }
static Entry * oldEntry
const bool FALSE
Definition: qglobal.h:370
static struct @12 str_doc
static void handleCommentBlock(const QCString &doc, bool brief)
static int iDocLine
void makeInlineDoc ( int  endCode)

Definition at line 125 of file vhdljjparser.cpp.

126 {
127  int len=endCode-iCodeLen;
128  if (!gBlock) gBlock = new Entry;
129  QCString par=inputString.mid(iCodeLen,len);
130  //fprintf(stderr,"\n inline code: \n<%s>",par.data());
131  gBlock->doc=par;
132  gBlock->inbodyDocs=par;
138  Entry *temp=new Entry(*gBlock);
139  Entry* compound=getVhdlCompound();
140 
141  if (compound)
142  {
143  compound->addSubEntry(temp);
144  }
145  else
146  {
147  temp->type="misc"; // global code like library ieee...
149  }
150  strComment.resize(0);
151  gBlock->reset();
152 }// makeInlineDoc
bool resize(uint newlen)
Definition: qcstring.h:225
void reset()
Definition: entry.cpp:217
uint64 spec
class/member specifiers
Definition: entry.h:243
Definition: entry.h:63
void addSubEntry(Entry *e)
Definition: entry.cpp:206
static int iCodeLen
static Entry * current_root
static int yyLineNr
int endBodyLine
line number where the definition ends
Definition: entry.h:277
static QCString yyFileName
static QCString strComment
static QCString inputString
static Entry * gBlock
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
QCString inbodyDocs
documentation inside the body of a function
Definition: entry.h:266
QCString doc
documentation block (partly parsed)
Definition: entry.h:260
QCString fileName
file this entry was extracted from
Definition: entry.h:282
Entry * getVhdlCompound()
SrcLangExt lang
programming language in which this entry was found
Definition: entry.h:286
QCString type
member type
Definition: entry.h:236
int section
entry type (see Sections);
Definition: entry.h:235
void startCodeBlock ( int  index)

Definition at line 102 of file vhdljjparser.cpp.

103 {
104  int ll=strComment.length();
105  if (!gBlock) gBlock = new Entry;
107  // fprintf(stderr,"\n startin code..%d %d %d\n",iCodeLen,num_chars,ll);
108  gBlock->reset();
109  int len=strComment.length();
111  name=VhdlDocGen::getIndexWord(name.data(),1);
112  if (!name)
114  else
115  gBlock->name=name;
116 
119 
123 }
static QCString name
Definition: declinfo.cpp:673
static QCString getIndexWord(const char *, int index)
void reset()
Definition: entry.cpp:217
uint length() const
Definition: qcstring.h:195
Definition: entry.h:63
QCString name
member name
Definition: entry.h:237
QCString left(uint len) const
Definition: qcstring.cpp:213
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
static QCString getRecordNumber()
static int iCodeLen
static int yyLineNr
QCString brief
brief description (doc block)
Definition: entry.h:263
static QCString strComment
QCString right(uint len) const
Definition: qcstring.cpp:231
int startLine
start line of entry in the source
Definition: entry.h:283
static QCString inputString
const char * data() const
Definition: qcstring.h:207
static Entry * gBlock
static void prepareComment(QCString &)
int bodyLine
line number of the definition in the source
Definition: entry.h:276

Variable Documentation

bool brief

Definition at line 78 of file vhdljjparser.cpp.

QList<VhdlConfNode> configL
static

Definition at line 73 of file vhdljjparser.cpp.

QCString doc

Definition at line 77 of file vhdljjparser.cpp.

bool doxComment =FALSE
static

Definition at line 83 of file vhdljjparser.cpp.

ParserInterface* g_thisParser
static

Definition at line 36 of file vhdljjparser.cpp.

Entry* gBlock = 0
static

Definition at line 43 of file vhdljjparser.cpp.

int iCodeLen
static

Definition at line 85 of file vhdljjparser.cpp.

int iDocLine = -1
static

Definition at line 41 of file vhdljjparser.cpp.

QCString inputString
static

Definition at line 42 of file vhdljjparser.cpp.

QList<Entry> instFiles
static

Definition at line 51 of file vhdljjparser.cpp.

QList<Entry> libUse
static

Definition at line 52 of file vhdljjparser.cpp.

QList<Entry> lineEntry
static

Definition at line 53 of file vhdljjparser.cpp.

int* lineParse
static

Definition at line 40 of file vhdljjparser.cpp.

Entry* oldEntry
static

Definition at line 47 of file vhdljjparser.cpp.

bool pending

Definition at line 79 of file vhdljjparser.cpp.

Entry* previous = 0
static

Definition at line 44 of file vhdljjparser.cpp.

struct { ... } str_doc
QCString strComment
static

Definition at line 84 of file vhdljjparser.cpp.

QCString varName
static

Definition at line 49 of file vhdljjparser.cpp.

bool varr =FALSE
static

Definition at line 48 of file vhdljjparser.cpp.

QCString yyFileName
static

Definition at line 38 of file vhdljjparser.cpp.

int yyLineNr = 1
static

Definition at line 39 of file vhdljjparser.cpp.