My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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.

References doc, doxComment, startCodeBlock(), and strComment.

{
int index=doc.find("\\code");
if (index>0)
{
doxComment=TRUE;
return true;
}
return false;
}
bool checkMultiComment ( QCString &  qcs,
int  line 
)

Definition at line 818 of file vhdljjparser.cpp.

References Entry::brief, Entry::briefLine, getEntryAtLine(), and VhdlDocGen::prepareComment().

{
QList<Entry> *pTemp=getEntryAtLine(VhdlParser::current_root,line);
if (pTemp->isEmpty()) return false;
while (!pTemp->isEmpty())
{
Entry *e=(Entry*)pTemp->getFirst();
e->briefLine=line;
e->brief+=qcs;
pTemp->removeFirst();
}
return true;
}
QList< Entry > * getEntryAtLine ( const Entry ce,
int  line 
)

Definition at line 837 of file vhdljjparser.cpp.

References Entry::children(), and lineEntry.

Referenced by checkMultiComment().

{
Entry *rt;
for (;(rt=eli.current());++eli)
{
if (rt->bodyLine==line)
{
lineEntry.insert(0,rt);
}
getEntryAtLine(rt,line);
}
return &lineEntry;
}
Entry* getVhdlCompound ( )

Definition at line 95 of file vhdljjparser.cpp.

Referenced by makeInlineDoc().

{
if (VhdlParser::lastEntity) return VhdlParser::lastEntity;
if (VhdlParser::lastCompound) return VhdlParser::lastCompound;
return NULL;
}
QList<VhdlConfNode>& getVhdlConfiguration ( )

Definition at line 92 of file vhdljjparser.cpp.

References configL.

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

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

Definition at line 93 of file vhdljjparser.cpp.

References instFiles.

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

{ return instFiles; }
bool isConstraintFile ( const QCString &  fileName,
const QCString &  ext 
)

Definition at line 155 of file vhdljjparser.cpp.

Referenced by VHDLLanguageScanner::parseInput().

{
return fileName.right(ext.length())==ext;
}
void isVhdlDocPending ( )

Definition at line 230 of file vhdljjparser.cpp.

References iDocLine, oldEntry, and str_doc.

{
if (!str_doc.pending) return;
str_doc.pending=FALSE;
oldEntry=0; // prevents endless recursion
iDocLine=str_doc.iDocLine;
VhdlParser::handleCommentBlock(str_doc.doc,str_doc.brief);
}
void makeInlineDoc ( int  endCode)

Definition at line 125 of file vhdljjparser.cpp.

References Entry::addSubEntry(), Entry::doc, Entry::endBodyLine, Entry::fileName, gBlock, getVhdlCompound(), iCodeLen, Entry::inbodyDocs, inputString, Entry::lang, VhdlDocGen::MISCELLANEOUS, Entry::reset(), Entry::section, Entry::spec, SrcLangExt_VHDL, strComment, Entry::type, Entry::VARIABLE_SEC, yyFileName, and yyLineNr.

{
int len=endCode-iCodeLen;
if (!gBlock) gBlock = new Entry;
QCString par=inputString.mid(iCodeLen,len);
//fprintf(stderr,"\n inline code: \n<%s>",par.data());
gBlock->doc=par;
Entry *temp=new Entry(*gBlock);
Entry* compound=getVhdlCompound();
if (compound)
{
compound->addSubEntry(temp);
}
else
{
temp->type="misc"; // global code like library ieee...
VhdlParser::current_root->addSubEntry(temp);
}
strComment.resize(0);
}// makeInlineDoc
void startCodeBlock ( int  index)

Definition at line 102 of file vhdljjparser.cpp.

References Entry::bodyLine, Entry::brief, gBlock, VhdlDocGen::getIndexWord(), VhdlDocGen::getRecordNumber(), iCodeLen, inputString, Entry::name, VhdlDocGen::prepareComment(), Entry::reset(), Entry::startLine, strComment, and yyLineNr.

Referenced by checkInlineCode().

{
int ll=strComment.length();
if (!gBlock) gBlock = new Entry;
iCodeLen=inputString.findRev(strComment.data())+ll;
// fprintf(stderr,"\n startin code..%d %d %d\n",iCodeLen,num_chars,ll);
int len=strComment.length();
QCString name=strComment.right(len-index);//
name=VhdlDocGen::getIndexWord(name.data(),1);
if (!name)
else
gBlock->name=name;
strComment=strComment.left(index);
}

Variable Documentation

bool brief
QList<VhdlConfNode> configL
static

Definition at line 73 of file vhdljjparser.cpp.

Referenced by getVhdlConfiguration().

QCString doc
bool doxComment =FALSE
static

Definition at line 83 of file vhdljjparser.cpp.

Referenced by checkInlineCode().

ParserInterface* g_thisParser
static

Definition at line 36 of file vhdljjparser.cpp.

Referenced by VHDLLanguageScanner::parseInput().

Entry* gBlock = 0
static

Definition at line 43 of file vhdljjparser.cpp.

Referenced by makeInlineDoc(), and startCodeBlock().

int iCodeLen
static

Definition at line 85 of file vhdljjparser.cpp.

Referenced by makeInlineDoc(), and startCodeBlock().

int iDocLine = -1
static

Definition at line 41 of file vhdljjparser.cpp.

Referenced by isVhdlDocPending().

QCString inputString
static

Definition at line 42 of file vhdljjparser.cpp.

Referenced by makeInlineDoc(), VHDLLanguageScanner::parseInput(), and startCodeBlock().

QList<Entry> instFiles
static

Definition at line 51 of file vhdljjparser.cpp.

Referenced by getVhdlInstList().

QList<Entry> libUse
static

Definition at line 52 of file vhdljjparser.cpp.

Referenced by VHDLLanguageScanner::parseInput().

QList<Entry> lineEntry
static

Definition at line 53 of file vhdljjparser.cpp.

Referenced by getEntryAtLine().

int* lineParse
static

Definition at line 40 of file vhdljjparser.cpp.

Referenced by VHDLLanguageScanner::parseInput().

Entry* oldEntry
static

Definition at line 47 of file vhdljjparser.cpp.

Referenced by isVhdlDocPending().

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

Referenced by isVhdlDocPending().

QCString strComment
static

Definition at line 84 of file vhdljjparser.cpp.

Referenced by checkInlineCode(), makeInlineDoc(), and startCodeBlock().

QCString varName
static
bool varr =FALSE
static

Definition at line 48 of file vhdljjparser.cpp.

Referenced by VHDLLanguageScanner::parsePrototype().

QCString yyFileName
static

Definition at line 38 of file vhdljjparser.cpp.

Referenced by makeInlineDoc(), and VHDLLanguageScanner::parseInput().

int yyLineNr = 1
static

Definition at line 39 of file vhdljjparser.cpp.

Referenced by makeInlineDoc(), VHDLLanguageScanner::parseInput(), and startCodeBlock().