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:
Greg Steuck 2011-04-27 17:08:42 -07:00 committed by Stephen Williams
parent f61695a03f
commit f186c81403
11 changed files with 13 additions and 12 deletions

View File

@ -248,7 +248,7 @@ syn-rules.cc: $(srcdir)/syn-rules.y
$(YACC) --verbose -p syn_ -o syn-rules.cc $(srcdir)/syn-rules.y
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

View File

@ -80,7 +80,7 @@ iverilog@EXEEXT@: $O
$(CC) $(LDFLAGS) $O -o iverilog@EXEEXT@ @EXTRALIBS@
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
$(YACC) --verbose -t -d -o cfparse.c --name-prefix=cf $(srcdir)/cfparse.y

View File

@ -1,4 +1,4 @@
%option prefix="cf"
%option nounput
%option noinput

View File

@ -1,3 +1,4 @@
%option prefix="yy"
%{
/*
* Copyright (c) 1999-2010 Stephen Williams (steve@icarus.com)

View File

@ -1,4 +1,4 @@
%option prefix="VL"
%option never-interactive
%option nounput

View File

@ -1,4 +1,4 @@
%option prefix="yy"
%option never-interactive
%option nounput

View File

@ -121,12 +121,12 @@ system.vpi: $O $(OPP) ../vvp/libvpi.a
$(CXX) @shared@ -o $@ $O $(OPP) -L../vvp $(LDFLAGS) -lvpi $(SYSTEM_VPI_LDFLAGS)
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.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
$(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.c: $(srcdir)/table_mod_lexor.lex
$(LEX) -t -Ptblmod $< > $@
$(LEX) -t $< > $@
table_mod_parse.c table_mod_parse.h: $(srcdir)/table_mod_parse.y
$(YACC) --verbose -d -p tblmod -o table_mod_parse.c $<

View File

@ -1,4 +1,4 @@
%option prefix="sdf"
%option never-interactive
%option nounput
%option noinput

View File

@ -1,4 +1,4 @@
%option prefix="readmem"
%option nounput
%option noinput

View File

@ -1,4 +1,4 @@
%option prefix="tblmod"
%option never-interactive
%option noinput
%option nounput

View File

@ -1,4 +1,4 @@
%option prefix="yy"
%option never-interactive
%option nounput