Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pybison
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
pybison
Commits
ddb286c0
Commit
ddb286c0
authored
Jan 05, 2012
by
Taddeus Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed temporary bison build files.
parent
8ec21981
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
src/pyrex/bison_.pyx
src/pyrex/bison_.pyx
+14
-5
No files found.
src/pyrex/bison_.pyx
View file @
ddb286c0
...
@@ -535,8 +535,8 @@ cdef class ParserEngine:
...
@@ -535,8 +535,8 @@ cdef class ParserEngine:
tmp
=
[]
tmp
=
[]
for
line
in
lexLines
:
for
line
in
lexLines
:
tmp
.
append
(
line
.
strip
())
tmp
.
append
(
line
.
strip
())
f
=
open
(
buildDirectory
+
parser
.
flexFile
,
"w"
)
f
=
open
(
buildDirectory
+
parser
.
flexFile
,
'w'
)
f
.
write
(
"
\
n
"
.
join
(
tmp
)
+
"
\
n
"
)
f
.
write
(
'
\
n
'
.
join
(
tmp
)
+
'
\
n
'
)
f
.
close
()
f
.
close
()
# create and set up a compiler object
# create and set up a compiler object
...
@@ -545,7 +545,7 @@ cdef class ParserEngine:
...
@@ -545,7 +545,7 @@ cdef class ParserEngine:
# -----------------------------------------
# -----------------------------------------
# Now run bison on the grammar file
# 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
]
bisonCmd
=
parser
.
bisonCmd
+
[
buildDirectory
+
parser
.
bisonFile
]
if
parser
.
verbose
:
if
parser
.
verbose
:
...
@@ -554,7 +554,7 @@ cdef class ParserEngine:
...
@@ -554,7 +554,7 @@ cdef class ParserEngine:
env
.
spawn
(
bisonCmd
)
env
.
spawn
(
bisonCmd
)
if
parser
.
verbose
:
if
parser
.
verbose
:
print
"renaming bison output files"
print
'renaming bison output files'
print
'%s => %s%s'
%
(
parser
.
bisonCFile
,
buildDirectory
,
print
'%s => %s%s'
%
(
parser
.
bisonCFile
,
buildDirectory
,
parser
.
bisonCFile1
)
parser
.
bisonCFile1
)
print
'%s => %s%s'
%
(
parser
.
bisonHFile
,
buildDirectory
,
print
'%s => %s%s'
%
(
parser
.
bisonHFile
,
buildDirectory
,
...
@@ -572,7 +572,7 @@ cdef class ParserEngine:
...
@@ -572,7 +572,7 @@ cdef class ParserEngine:
# -----------------------------------------
# -----------------------------------------
# Now run lex on the lex file
# Now run lex on the lex file
#os.system(
"lex tmp.l"
)
#os.system(
'lex tmp.l'
)
flexCmd
=
parser
.
flexCmd
+
[
buildDirectory
+
parser
.
flexFile
]
flexCmd
=
parser
.
flexCmd
+
[
buildDirectory
+
parser
.
flexFile
]
if
parser
.
verbose
:
if
parser
.
verbose
:
...
@@ -648,6 +648,15 @@ cdef class ParserEngine:
...
@@ -648,6 +648,15 @@ cdef class ParserEngine:
except
:
except
:
print
"Warning: failed to delete temporary file %s"
%
f
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
):
def
closeLib
(
self
):
"""
"""
Does the necessary cleanups and closes the parser library
Does the necessary cleanups and closes the parser library
...
...
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