Commit 38f2d50a authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

disable write_tables in yacc.yacc().

This commit reverts "write yacc parsed file to TMPDIR."
parent d5ca149d
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
############################################################################## ##############################################################################
from ply import lex, yacc from ply import lex, yacc
import os
import sys import sys
from cStringIO import StringIO from cStringIO import StringIO
...@@ -37,9 +36,6 @@ except ImportError: ...@@ -37,9 +36,6 @@ except ImportError:
def LOG(channel, level, message): def LOG(channel, level, message):
print >>sys.stderr, message print >>sys.stderr, message
outputdir = os.environ.get('TMPDIR', None) or \
os.path.dirname(os.path.abspath(__file__))
class ParserOrLexerError(Exception): class ParserOrLexerError(Exception):
pass pass
...@@ -57,8 +53,7 @@ class lexer(object): ...@@ -57,8 +53,7 @@ class lexer(object):
self.lexer = lex.lex(object=self, **kw) self.lexer = lex.lex(object=self, **kw)
self.parser = yacc.yacc(module=self, debug=debug, self.parser = yacc.yacc(module=self, debug=debug,
debugfile="%s.out" % (self.__class__.__name__, ), debugfile="%s.out" % (self.__class__.__name__, ),
tabmodule="%s_parsetab" % (self.__class__.__name__, ), write_tables=False)
outputdir=outputdir)
sys.stdout, sys.stderr = sys.__stdout__, sys.__stderr__ sys.stdout, sys.stderr = sys.__stdout__, sys.__stderr__
# Emit all logs with regular Zope logging # Emit all logs with regular Zope logging
for line in output.getvalue().split('\n'): for line in output.getvalue().split('\n'):
......
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