mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-30 17:41:57 +02:00
Make Bison parser conflicts errors
Bison reports shift/reduce and reduce/reduce parser conflicts as warnings by default. This allows parser changes to introduce new conflicts while the normal build still succeeds. Pass the conflict warning classes as errors to Bison when generating the parsers. This makes the regular build fail if either parser has unresolved conflicts. Signed-off-by: Lars-Peter Clausen <[email protected]>
This commit is contained in:
+3
-2
@@ -85,6 +85,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
LEX = @LEX@
|
||||
YACC = @YACC@
|
||||
YACC_CONFLICT_FLAGS = -Werror=conflicts-sr -Werror=conflicts-rr
|
||||
MAN = @MAN@
|
||||
PS2PDF = @PS2PDF@
|
||||
GROFF = @GROFF@
|
||||
@@ -241,10 +242,10 @@ parse.o: parse.cc
|
||||
|
||||
# Use pattern rules to avoid parallel build issues (see pr3462585)
|
||||
parse%cc parse%h: $(srcdir)/parse%y
|
||||
$(YACC) --verbose -t -p VL --defines=parse.h -o parse.cc $<
|
||||
$(YACC) --verbose $(YACC_CONFLICT_FLAGS) -t -p VL --defines=parse.h -o parse.cc $<
|
||||
|
||||
syn-rules.cc: $(srcdir)/syn-rules.y
|
||||
$(YACC) --verbose -t -p syn_ -o $@ $<
|
||||
$(YACC) --verbose $(YACC_CONFLICT_FLAGS) -t -p syn_ -o $@ $<
|
||||
|
||||
lexor.cc: $(srcdir)/lexor.lex
|
||||
$(LEX) -s -t $< > $@
|
||||
|
||||
Reference in New Issue
Block a user