Moved lex prefixes from Makefile.in into the corresponding .lex files.
Added an explicit option prefix="yy" to files that were generated without an explicit -P. This makes the lex-generated symbol names self contained without any help from from build system.
This commit is contained in:
parent
f61695a03f
commit
f186c81403
|
|
@ -248,7 +248,7 @@ syn-rules.cc: $(srcdir)/syn-rules.y
|
||||||
$(YACC) --verbose -p syn_ -o syn-rules.cc $(srcdir)/syn-rules.y
|
$(YACC) --verbose -p syn_ -o syn-rules.cc $(srcdir)/syn-rules.y
|
||||||
|
|
||||||
lexor.cc: $(srcdir)/lexor.lex
|
lexor.cc: $(srcdir)/lexor.lex
|
||||||
$(LEX) -PVL -s -olexor.cc $(srcdir)/lexor.lex
|
$(LEX) -s -olexor.cc $(srcdir)/lexor.lex
|
||||||
|
|
||||||
lexor_keyword.o: lexor_keyword.cc parse.h
|
lexor_keyword.o: lexor_keyword.cc parse.h
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ iverilog@EXEEXT@: $O
|
||||||
$(CC) $(LDFLAGS) $O -o iverilog@EXEEXT@ @EXTRALIBS@
|
$(CC) $(LDFLAGS) $O -o iverilog@EXEEXT@ @EXTRALIBS@
|
||||||
|
|
||||||
cflexor.c: cflexor.lex
|
cflexor.c: cflexor.lex
|
||||||
$(LEX) -s -Pcf -ocflexor.c $(srcdir)/cflexor.lex
|
$(LEX) -s -ocflexor.c $(srcdir)/cflexor.lex
|
||||||
|
|
||||||
cfparse.h cfparse.c: cfparse.y
|
cfparse.h cfparse.c: cfparse.y
|
||||||
$(YACC) --verbose -t -d -o cfparse.c --name-prefix=cf $(srcdir)/cfparse.y
|
$(YACC) --verbose -t -d -o cfparse.c --name-prefix=cf $(srcdir)/cfparse.y
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
|
%option prefix="cf"
|
||||||
%option nounput
|
%option nounput
|
||||||
%option noinput
|
%option noinput
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
%option prefix="yy"
|
||||||
%{
|
%{
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999-2010 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 1999-2010 Stephen Williams (steve@icarus.com)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
|
%option prefix="VL"
|
||||||
%option never-interactive
|
%option never-interactive
|
||||||
%option nounput
|
%option nounput
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
|
%option prefix="yy"
|
||||||
%option never-interactive
|
%option never-interactive
|
||||||
%option nounput
|
%option nounput
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -121,12 +121,12 @@ system.vpi: $O $(OPP) ../vvp/libvpi.a
|
||||||
$(CXX) @shared@ -o $@ $O $(OPP) -L../vvp $(LDFLAGS) -lvpi $(SYSTEM_VPI_LDFLAGS)
|
$(CXX) @shared@ -o $@ $O $(OPP) -L../vvp $(LDFLAGS) -lvpi $(SYSTEM_VPI_LDFLAGS)
|
||||||
|
|
||||||
sys_readmem_lex.c: sys_readmem_lex.lex
|
sys_readmem_lex.c: sys_readmem_lex.lex
|
||||||
$(LEX) -t -Preadmem $(srcdir)/sys_readmem_lex.lex > sys_readmem_lex.c
|
$(LEX) -t $(srcdir)/sys_readmem_lex.lex > sys_readmem_lex.c
|
||||||
|
|
||||||
sdf_lexor.o: sdf_lexor.c sdf_parse.h
|
sdf_lexor.o: sdf_lexor.c sdf_parse.h
|
||||||
|
|
||||||
sdf_lexor.c: sdf_lexor.lex
|
sdf_lexor.c: sdf_lexor.lex
|
||||||
$(LEX) -t -Psdf $(srcdir)/sdf_lexor.lex > sdf_lexor.c
|
$(LEX) -t $(srcdir)/sdf_lexor.lex > sdf_lexor.c
|
||||||
|
|
||||||
sdf_parse.c sdf_parse.h: $(srcdir)/sdf_parse.y
|
sdf_parse.c sdf_parse.h: $(srcdir)/sdf_parse.y
|
||||||
$(YACC) --verbose -d -p sdf -o sdf_parse.c $(srcdir)/sdf_parse.y
|
$(YACC) --verbose -d -p sdf -o sdf_parse.c $(srcdir)/sdf_parse.y
|
||||||
|
|
@ -134,7 +134,7 @@ sdf_parse.c sdf_parse.h: $(srcdir)/sdf_parse.y
|
||||||
table_mod_lexor.o: table_mod_lexor.c table_mod_parse.h
|
table_mod_lexor.o: table_mod_lexor.c table_mod_parse.h
|
||||||
|
|
||||||
table_mod_lexor.c: $(srcdir)/table_mod_lexor.lex
|
table_mod_lexor.c: $(srcdir)/table_mod_lexor.lex
|
||||||
$(LEX) -t -Ptblmod $< > $@
|
$(LEX) -t $< > $@
|
||||||
|
|
||||||
table_mod_parse.c table_mod_parse.h: $(srcdir)/table_mod_parse.y
|
table_mod_parse.c table_mod_parse.h: $(srcdir)/table_mod_parse.y
|
||||||
$(YACC) --verbose -d -p tblmod -o table_mod_parse.c $<
|
$(YACC) --verbose -d -p tblmod -o table_mod_parse.c $<
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
|
%option prefix="sdf"
|
||||||
%option never-interactive
|
%option never-interactive
|
||||||
%option nounput
|
%option nounput
|
||||||
%option noinput
|
%option noinput
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
|
%option prefix="readmem"
|
||||||
%option nounput
|
%option nounput
|
||||||
%option noinput
|
%option noinput
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
|
%option prefix="tblmod"
|
||||||
%option never-interactive
|
%option never-interactive
|
||||||
%option noinput
|
%option noinput
|
||||||
%option nounput
|
%option nounput
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
|
%option prefix="yy"
|
||||||
%option never-interactive
|
%option never-interactive
|
||||||
%option nounput
|
%option nounput
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue