Add file/line information to entities and ports

Include the compiler infrastructure to vhdlpp for collecting the
file and line information and attaching it to entities and ports.
Make the parser store the file name during parse.

Create a libmisc library where I can put source files that are
used by multiple programs within the source tree.
This commit is contained in:
Stephen Williams
2011-01-18 17:03:51 -08:00
parent d72f7ea249
commit ab8f623cea
14 changed files with 42 additions and 338 deletions
+8 -3
View File
@@ -40,9 +40,9 @@ LEX = @LEX@
YACC = @YACC@
ifeq (.,.)
INCLUDE_PATH = -I. -I..
INCLUDE_PATH = -I. -I.. -I../libmisc
else
INCLUDE_PATH = -I. -I.. -I$(srcdir) -I$(srcdir)/..
INCLUDE_PATH = -I. -I.. -I$(srcdir) -I$(srcdir)/../libmisc
endif
CPPFLAGS = $(INCLUDE_PATH) @CPPFLAGS@ @DEFS@
@@ -51,8 +51,10 @@ CXXFLAGS = @WARNING_FLAGS@ @WARNING_FLAGS_CXX@ @CXXFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@ @EXTRALIBS@
M = StringHeap.o LineInfo.o
O = main.o compiler.o entity.o entity_elaborate.o \
lexor.o lexor_keyword.o parse.o StringHeap.o
lexor.o lexor_keyword.o parse.o $M
all: dep vhdlpp@EXEEXT@
@@ -73,6 +75,9 @@ dep:
vhdlpp@EXEEXT@: $O
$(CXX) -o vhdlpp@EXEEXT@ $(LDFLAGS) $O $(LIBS)
%.o: $(srcdir)/../libmisc/%.cc
$(CXX) $(CPPFLAGS) $(CXXFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o
%.o: %.cc vhdlpp_config.h
$(CXX) $(CPPFLAGS) $(CXXFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o
mv $*.d dep/$*.d