Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Lu Xu
erp5
Commits
d5ca149d
Commit
d5ca149d
authored
Oct 10, 2013
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
write yacc parsed file to TMPDIR.
parent
d0ae2120
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
product/ZSQLCatalog/SearchText/lexer.py
product/ZSQLCatalog/SearchText/lexer.py
+3
-2
No files found.
product/ZSQLCatalog/SearchText/lexer.py
View file @
d5ca149d
...
@@ -37,7 +37,8 @@ except ImportError:
...
@@ -37,7 +37,8 @@ except ImportError:
def
LOG
(
channel
,
level
,
message
):
def
LOG
(
channel
,
level
,
message
):
print
>>
sys
.
stderr
,
message
print
>>
sys
.
stderr
,
message
module_path
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
outputdir
=
os
.
environ
.
get
(
'TMPDIR'
,
None
)
or
\
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
class
ParserOrLexerError
(
Exception
):
class
ParserOrLexerError
(
Exception
):
pass
pass
...
@@ -57,7 +58,7 @@ class lexer(object):
...
@@ -57,7 +58,7 @@ class lexer(object):
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__
,
),
tabmodule
=
"%s_parsetab"
%
(
self
.
__class__
.
__name__
,
),
outputdir
=
module_path
)
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
'
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment