Permalink
Browse files

New VHDL parser implementation

  • Loading branch information...
Dimitri van Heesch
Dimitri van Heesch committed Jul 27, 2014
1 parent 6a60477 commit 36122e49ed1d9e640b1ceca52536ec7c55e10474
Showing with 34,737 additions and 3,095 deletions.
  1. +2 −0 .gitignore
  2. +5 −2 Makefile.in
  3. +4 −2 configure
  4. +1 −0 src/docparser.cpp
  5. +1 −1 src/doxygen.cpp
  6. +6 −6 src/doxygen.pro.in
  7. +23 −2 src/htmldocvisitor.cpp
  8. +8 −5 src/libdoxygen.pro.in
  9. +1 −2 src/libdoxygen.t.in
  10. +1 −1 src/memberdef.cpp
  11. +1 −0 src/outputlist.cpp
  12. +2 −0 src/vhdlcode.l
  13. +2,788 −834 src/vhdldocgen.cpp
  14. +185 −115 src/vhdldocgen.h
  15. +608 −0 src/vhdljjparser.cpp
  16. +47 −31 src/{vhdlscanner.h → vhdljjparser.h}
  17. +0 −2,052 src/vhdlscanner.l
  18. +212 −0 vhdlparser/CharStream.cc
  19. +257 −0 vhdlparser/CharStream.h
  20. +43 −0 vhdlparser/ErrorHandler.h
  21. +51 −0 vhdlparser/JavaCC.h
  22. +51 −0 vhdlparser/JavaCC.h.in
  23. +40 −0 vhdlparser/Makefile.in
  24. +186 −0 vhdlparser/ParseException.cc
  25. +99 −0 vhdlparser/ParseException.h
  26. +92 −0 vhdlparser/Token.cc
  27. +116 −0 vhdlparser/Token.h
  28. +33 −0 vhdlparser/TokenManager.h
  29. +121 −0 vhdlparser/TokenMgrError.cc
  30. +90 −0 vhdlparser/TokenMgrError.h
  31. +13,051 −0 vhdlparser/VhdlParser.cc
  32. +8,944 −0 vhdlparser/VhdlParser.h
  33. +944 −0 vhdlparser/VhdlParserConstants.h
  34. +39 −0 vhdlparser/VhdlParserErrorHandler.hpp
  35. +56 −0 vhdlparser/VhdlParserIF.cpp
  36. +12 −0 vhdlparser/VhdlParserIF.h
  37. +3,497 −0 vhdlparser/VhdlParserTokenManager.cc
  38. +133 −0 vhdlparser/VhdlParserTokenManager.h
  39. +2,758 −0 vhdlparser/vhdlparser.jj
  40. +10 −0 vhdlparser/vhdlparser.patch
  41. +33 −0 vhdlparser/vhdlparser.pro.in
  42. +100 −0 vhdlparser/vhdlstring.h
  43. +86 −42 winbuild/Doxygen.vcproj
@@ -17,6 +17,8 @@
/libmd5/Makefile.libmd5
/qtools/Makefile
/qtools/Makefile.qtools
/vhdlparser/Makefile
/vhdlparser/Makefile.vhdlparser
/src/Makefile.doxygen
/src/Makefile.libdoxycfg
/src/Makefile.libdoxygen
@@ -21,6 +21,7 @@ clean: FORCE
- cd qtools ; $(MAKE) clean
- cd src ; $(MAKE) clean
- cd libmd5 ; $(MAKE) clean
- cd vhdlparser ; $(MAKE) clean
-cd addon/doxywizard ; $(MAKE) clean
-cd addon/doxysearch ; $(MAKE) clean
-cd addon/doxyapp ; $(MAKE) clean
@@ -33,6 +34,7 @@ clean: FORCE
distclean: clean
-cd src ; $(MAKE) distclean
-cd libmd5 ; $(MAKE) distclean
-cd vhdlparser ; $(MAKE) distclean
-cd addon/doxywizard ; $(MAKE) distclean
-cd addon/doxysearch ; $(MAKE) distclean
-cd addon/doxyapp ; $(MAKE) distclean
@@ -52,8 +54,9 @@ distclean: clean
-rm -f src/Makefile.doxygen src/Makefile.libdoxygen
-rm -f src/Makefile.libdoxycfg src/libdoxycfg.t src/libdoxygen.t
-rm -f libmd5/Makefile.libmd5
-rm -f vhdlparser/Makefile.vhdlparser
-rm -f .makeconfig .tmakeconfig
-rm -f src/doxygen.pro src/libdoxygen.pro qtools/qtools.pro src/libdoxycfg.pro libmd5/libmd5.pro
-rm -f src/doxygen.pro src/libdoxygen.pro qtools/qtools.pro src/libdoxycfg.pro libmd5/libmd5.pro vhdlparser/vhdlparser.pro
-rm -rf generated_src
-rm -f addon/doxywizard/doxywizard.pro
-rm -f VERSION
@@ -95,7 +98,7 @@ docs: FORCE
pdf: docs
cd latex ; $(MAKE)
DISTFILES = Doxyfile libmd5 addon tmake doc examples bin lib objects testing \
DISTFILES = Doxyfile vhdlparser libmd5 addon tmake doc examples bin lib objects testing \
qtools src configure configure.bin Makefile.in Makefile.win_nmake.in \
Makefile.win_make.in INSTALL LANGUAGE.HOWTO LICENSE PLATFORMS \
VERSION README.md packages winbuild jquery
@@ -868,7 +868,7 @@ INCLUDEPATH += $XAPIAN/include
EOF
fi
f_inmakefiles="Makefile.in qtools/Makefile.in src/Makefile.in examples/Makefile.in doc/Makefile.in addon/doxywizard/Makefile.in addon/doxmlparser/src/Makefile.in addon/doxmlparser/test/Makefile.in addon/doxmlparser/examples/metrics/Makefile.in libmd5/Makefile.in addon/doxyapp/Makefile.in addon/doxysearch/Makefile.in"
f_inmakefiles="Makefile.in qtools/Makefile.in src/Makefile.in examples/Makefile.in doc/Makefile.in addon/doxywizard/Makefile.in addon/doxmlparser/src/Makefile.in addon/doxmlparser/test/Makefile.in addon/doxmlparser/examples/metrics/Makefile.in libmd5/Makefile.in addon/doxyapp/Makefile.in addon/doxysearch/Makefile.in vhdlparser/Makefile.in"
for i in $f_inmakefiles ; do
SRC=$i
@@ -893,7 +893,9 @@ EOF
echo "all: generated_src/doxygen/version.cpp $EXTRADEPS" >> $DST
echo " \$(MAKE) -C qtools" >> $DST
echo " \$(MAKE) -C libmd5" >> $DST
echo " \$(MAKE) -C vhdlparser" >> $DST
echo " \$(MAKE) -C src" >> $DST
if test $f_wizard = YES; then
echo " \$(MAKE) MAN1DIR=\$(MAN1DIR) -C addon/doxywizard" >> $DST
fi
@@ -930,7 +932,7 @@ done
cat src/libdoxycfg.t.in | sed -e "s|%%FLEX%%|$f_flex|g" -e "s|%%BISON%%|$f_bison|g" -e "s|%%PYTHON%%|$f_python|g" > src/libdoxycfg.t
cat src/libdoxygen.t.in | sed -e "s|%%FLEX%%|$f_flex|g" -e "s|%%BISON%%|$f_bison|g" -e "s|%%PYTHON%%|$f_python|g" > src/libdoxygen.t
f_inprofiles="qtools/qtools.pro.in src/libdoxygen.pro.in src/libdoxycfg.pro.in src/doxygen.pro.in addon/doxywizard/doxywizard.pro.in addon/doxmlparser/src/doxmlparser.pro.in addon/doxmlparser/test/xmlparse.pro.in addon/doxmlparser/examples/metrics/metrics.pro.in libmd5/libmd5.pro.in addon/doxyapp/doxyapp.pro.in addon/doxysearch/doxysearch.pro.in addon/doxysearch/doxyindexer.pro.in"
f_inprofiles="qtools/qtools.pro.in src/libdoxygen.pro.in src/libdoxycfg.pro.in src/doxygen.pro.in addon/doxywizard/doxywizard.pro.in addon/doxmlparser/src/doxmlparser.pro.in addon/doxmlparser/test/xmlparse.pro.in addon/doxmlparser/examples/metrics/metrics.pro.in libmd5/libmd5.pro.in addon/doxyapp/doxyapp.pro.in addon/doxysearch/doxysearch.pro.in addon/doxysearch/doxyindexer.pro.in vhdlparser/vhdlparser.pro.in"
for i in $f_inprofiles ; do
SRC=$i
@@ -2908,6 +2908,7 @@ void DocVhdlFlow::parse()
DBG(("DocVhdlFlow::parse() end\n"));
DocNode *n=g_nodeStack.pop();
ASSERT(n==this);
VhdlDocGen::createFlowChart(g_memberDef);
}
@@ -79,7 +79,7 @@
#include "store.h"
#include "marshal.h"
#include "portable.h"
#include "vhdlscanner.h"
#include "vhdljjparser.h"
#include "vhdldocgen.h"
#include "eclipsehelp.h"
#include "cite.h"
@@ -18,18 +18,18 @@ TEMPLATE = app.t
CONFIG = console warn_on $extraopts
HEADERS = doxygen.h
SOURCES = main.cpp
unix:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -lpthread %%SQLITE3_LIBS%% %%LIBCLANG_LIBS%%
unix:LIBS += -L../lib -ldoxygen -lvhdlparser -ldoxycfg -lqtools -lmd5 -lpthread %%SQLITE3_LIBS%% %%LIBCLANG_LIBS%%
win32:INCLUDEPATH += .
win32-mingw:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -lpthread -llibiconv -lole32 %%SQLITE3_LIBS%% %%LIBCLANG_LIBS%%
win32-msvc:LIBS += qtools.lib md5.lib doxygen.lib doxycfg.lib shell32.lib iconv.lib
win32-mingw:LIBS += -L../lib -ldoxygen -ldoxycfg -lvhdlparser -lqtools -lmd5 -lpthread -llibiconv -lole32 %%SQLITE3_LIBS%% %%LIBCLANG_LIBS%%
win32-msvc:LIBS += qtools.lib md5.lib doxygen.lib doxycfg.lib vhdlparser.lib shell32.lib iconv.lib
win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\lib
win32-borland:LIBS += qtools.lib md5.lib doxygen.lib doxycfg.lib shell32.lib iconv.lib
win32-borland:LIBS += qtools.lib md5.lib doxygen.lib doxycfg.lib vhdlparser.lib shell32.lib iconv.lib
win32-borland:TMAKE_LFLAGS += -L..\lib -L$(BCB)\lib\psdk
win32:TMAKE_CXXFLAGS += -DQT_NODLL
win32-g++:LIBS = -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -liconv -lpthread %%SQLITE3_LIBS%% %%LIBCLANG_LIBS%% -Wl,--as-needed -lole32
win32-g++:LIBS = -L../lib -ldoxygen -ldoxycfg -lvhdlparser -lqtools -lmd5 -liconv -lpthread %%SQLITE3_LIBS%% %%LIBCLANG_LIBS%% -Wl,--as-needed -lole32
win32-g++:TMAKE_CXXFLAGS += -fno-exceptions -fno-rtti
DEPENDPATH += ../generated_src/doxygen
INCLUDEPATH += ../qtools ../libmd5 .
INCLUDEPATH += ../qtools ../libmd5 . ../vhdlparser
DESTDIR = ../bin
TARGET = doxygen
unix:TARGETDEPS = ../lib/libdoxygen.a ../lib/libdoxycfg.a
@@ -1773,14 +1773,35 @@ void HtmlDocVisitor::visitPost(DocHtmlBlockQuote *b)
forceStartParagraph(b);
}
void HtmlDocVisitor::visitPre(DocVhdlFlow *)
void HtmlDocVisitor::visitPre(DocVhdlFlow *vf)
{
if (m_hide) return;
if (VhdlDocGen::getFlowMember()) // use VHDL flow chart creator
{
forceEndParagraph(vf);
QCString fname=FlowChart::convertNameToFileName();
m_t << "<p>";
m_t << "flowchart: " ; // TODO: translate me
m_t << "<a href=\"";
m_t << fname.data();
m_t << ".svg\">";
m_t << VhdlDocGen::getFlowMember()->name().data();
m_t << "</a>";
if (vf->hasCaption())
{
m_t << "<br />";
}
}
}
void HtmlDocVisitor::visitPost(DocVhdlFlow *)
void HtmlDocVisitor::visitPost(DocVhdlFlow *vf)
{
if (m_hide) return;
if (VhdlDocGen::getFlowMember()) // use VHDL flow chart creator
{
m_t << "</p>";
forceStartParagraph(vf);
}
}
void HtmlDocVisitor::visitPre(DocParBlock *)
@@ -115,11 +115,12 @@ HEADERS = arguments.h \
version.h \
vhdlcode.h \
vhdldocgen.h \
vhdlscanner.h \
xmldocvisitor.h \
xmlgen.h \
docbookvisitor.h \
docbookgen.h \
vhdljjparser.h
SOURCES = arguments.cpp \
cite.cpp \
@@ -198,10 +199,10 @@ SOURCES = arguments.cpp \
xmlgen.cpp \
docbookvisitor.cpp \
docbookgen.cpp \
../generated_src/doxygen/ce_parse.cpp \
vhdljjparser.cpp \
../generated_src/doxygen/ce_parse.cpp \
../generated_src/doxygen/constexp.cpp \
../generated_src/doxygen/vhdlcode.cpp \
../generated_src/doxygen/vhdlscanner.cpp \
../generated_src/doxygen/code.cpp \
../generated_src/doxygen/commentcnv.cpp \
../generated_src/doxygen/commentscan.cpp \
@@ -215,13 +216,15 @@ SOURCES = arguments.cpp \
../generated_src/doxygen/tclscanner.cpp \
../generated_src/doxygen/fortrancode.cpp \
../generated_src/doxygen/fortranscanner.cpp \
../generated_src/doxygen/version.cpp
../generated_src/doxygen/version.cpp
win32:TMAKE_CXXFLAGS += -DQT_NODLL
win32-msvc:TMAKE_CXXFLAGS += -Zm200
win32-g++:TMAKE_CXXFLAGS += -fno-exceptions
linux-g++:TMAKE_CXXFLAGS += -fno-exceptions
INCLUDEPATH += ../generated_src/doxygen ../src ../qtools ../libmd5
INCLUDEPATH += ../generated_src/doxygen ../src ../qtools ../libmd5 ../vhdlparser
INCLUDEPATH += %%SQLITE3_INC%%
DEPENDPATH += ../generated_src/doxygen
win32:INCLUDEPATH += .
@@ -111,8 +111,7 @@ sub GenerateLex {
$(YACC) -l -d -p ce_parsexpYY constexp.y -o \$(GENERATED_SRC)/ce_parse.c
-rm $(GENERATED_SRC)/ce_parse.c
#$ GenerateDep("\$(GENERATED_SRC)/vhdlscanner.cpp","vhdlscanner.l");
#$ GenerateLex("vhdlscanner",1);
TO_C_CMD=$(PYTHON) to_c_cmd.py < $< > $@
@@ -37,7 +37,7 @@
#include "parserintf.h"
#include "marshal.h"
#include "objcache.h"
#include "vhdlscanner.h"
#include "vhdldocgen.h"
#include "arguments.h"
#include "memberlist.h"
@@ -169,6 +169,7 @@ void OutputList::writeDoc(DocRoot *root,Definition *ctx,MemberDef *md)
// ctx?ctx->getDefFileExtension().data():"<null>");
if (og->isEnabled()) og->writeDoc(root,ctx,md);
}
VhdlDocGen::setFlowMember(0);
}
bool OutputList::parseText(const QCString &textStr)
@@ -1576,6 +1576,8 @@ void parseVhdlCode(CodeOutputInterface &od,const char *className,const QCString
// g_args.resize(0);
g_parmName.resize(0);
g_parmType.resize(0);
if(!g_lexInit)
VhdlDocGen::init();
if (memberDef)
{
setParameterList(memberDef);
Oops, something went wrong.

0 comments on commit 36122e4

Please sign in to comment.