Skip to content

Commit 6aebc05

Browse files
committed
Add bison cmd's via init arguments.
1 parent 90bec74 commit 6aebc05

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/bison/__init__.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class BisonParser(object):
5454
# override these if you need to
5555

5656
# Command and options for running yacc/bison, except for filename arg
57-
bisonCmd = ['bison', '-d', '-v', '-t']
57+
bisonCmd = ['bison', '-d']
5858

5959
bisonFile = 'tmp.y'
6060
bisonCFile = 'tmp.tab.c'
@@ -159,6 +159,12 @@ def __init__(self, **kw):
159159
self.defaultNodeClass = nodeClass
160160

161161
self.verbose = kw.get('verbose', 0)
162+
if self.verbose:
163+
self.bisonCmd.append('--verbose')
164+
165+
self.debug = kw.get('debug', 0)
166+
if self.debug:
167+
self.bisonCmd.append('--debug')
162168

163169
if 'keepfiles' in kw:
164170
self.keepfiles = kw['keepfiles']

0 commit comments

Comments
 (0)