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
2ae8c15d
Commit
2ae8c15d
authored
13 years ago
by
Sander Mathijs van Veen
Browse files
Options
Downloads
Patches
Plain Diff
Set default node class to BisonNode instead of None.
parent
1bd7873d
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/python/bison.py
+2
-6
2 additions, 6 deletions
src/python/bison.py
with
2 additions
and
6 deletions
src/python/bison.py
+
2
−
6
View file @
2ae8c15d
...
...
@@ -21,7 +21,7 @@ import sys
import
traceback
from
bison_
import
ParserEngine
from
.node
import
BisonNode
class
BisonSyntaxError
(
Exception
):
pass
...
...
@@ -100,7 +100,7 @@ class BisonParser(object):
# Class to use by default for creating new parse nodes. If set to None,
# BisonNode will be used.
default_node_class
=
No
n
e
default_node_class
=
Bison
No
d
e
def
__init__
(
self
,
**
kw
):
"""
...
...
@@ -184,10 +184,6 @@ class BisonParser(object):
if
self
.
verbose
:
print
'
no handler for %s, using default
'
%
targetname
if
not
self
.
default_node_class
:
from
.node
import
BisonNode
self
.
default_node_class
=
BisonNode
self
.
last
=
self
.
default_node_class
(
targetname
,
option
=
option
,
names
=
names
,
values
=
values
)
...
...
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