diff --git a/src/bisonpre b/src/bisonpre index c60e3575d..48f1761ff 100755 --- a/src/bisonpre +++ b/src/bisonpre @@ -17,20 +17,28 @@ def process(): bison_version_check() supports_report = Bison_Version >= 2.3 + supports_counter_examples = Bison_Version >= 3.8 clean_input(Args.input, tmp_prefix() + ".y") # Run bison command = ( - Args.yacc + (" -t" if Args.debug else "") + - (" -d" if Args.definitions else "") + - (" -k" if Args.token_table else "") + (" -v" if Args.verbose else "") + - (" --report=itemset --report=lookahead" if - (Args.verbose and supports_report) else "") + Args.yacc # + + (" -t" if Args.debug else "") # + + (" -d" if Args.definitions else "") # + + (" -k" if Args.token_table else "") # + + (" -v" if Args.verbose else "") # + + (" --report=itemset --report=lookahead" if + (Args.verbose and supports_report) else "") + # Useful but slow: + # (" -Wcounterexamples" if + # (Args.verbose and supports_counter_examples) else "") + # # -p required for GLR parsers; they write to -p basename, not -o + ((" -p " + Args.name_prefix) if Args.name_prefix else "") + " -b " + - tmp_prefix() + " -o " + tmp_prefix() + ".c" + " " + tmp_prefix() + - ".y") + tmp_prefix() # + + " -o " + tmp_prefix() + ".c" # + + " " + tmp_prefix() + ".y") print(" " + command) status = subprocess.call(command, shell=True)