Commit ddb286c0 authored by Taddeus Kroes's avatar Taddeus Kroes

Removed temporary bison build files.

parent 8ec21981
......@@ -535,8 +535,8 @@ cdef class ParserEngine:
tmp = []
for line in lexLines:
tmp.append(line.strip())
f = open(buildDirectory + parser.flexFile, "w")
f.write("\n".join(tmp) + "\n")
f = open(buildDirectory + parser.flexFile, 'w')
f.write('\n'.join(tmp) + '\n')
f.close()
# create and set up a compiler object
......@@ -545,7 +545,7 @@ cdef class ParserEngine:
# -----------------------------------------
# Now run bison on the grammar file
#os.system("bison -d tmp.y")
#os.system('bison -d tmp.y')
bisonCmd = parser.bisonCmd + [buildDirectory + parser.bisonFile]
if parser.verbose:
......@@ -554,7 +554,7 @@ cdef class ParserEngine:
env.spawn(bisonCmd)
if parser.verbose:
print "renaming bison output files"
print 'renaming bison output files'
print '%s => %s%s' % (parser.bisonCFile, buildDirectory,
parser.bisonCFile1)
print '%s => %s%s' % (parser.bisonHFile, buildDirectory,
......@@ -572,7 +572,7 @@ cdef class ParserEngine:
# -----------------------------------------
# Now run lex on the lex file
#os.system("lex tmp.l")
#os.system('lex tmp.l')
flexCmd = parser.flexCmd + [buildDirectory + parser.flexFile]
if parser.verbose:
......@@ -648,6 +648,15 @@ cdef class ParserEngine:
except:
print "Warning: failed to delete temporary file %s" % f
if parser.verbose:
print 'deleting temporary bison output files:'
for f in [parser.bisonCFile, parser.bisonHFile]:
if parser.verbose:
print 'rm %s' % f
os.unlink(f)
def closeLib(self):
"""
Does the necessary cleanups and closes the parser library
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment