Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pybison
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Taddeüs Kroes
pybison
Commits
ddb286c0
Commit
ddb286c0
authored
13 years ago
by
Taddeus Kroes
Browse files
Options
Downloads
Patches
Plain Diff
Removed temporary bison build files.
parent
8ec21981
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pyrex/bison_.pyx
+14
-5
14 additions, 5 deletions
src/pyrex/bison_.pyx
with
14 additions
and
5 deletions
src/pyrex/bison_.pyx
+
14
−
5
View file @
ddb286c0
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment