Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trs
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
trs
Commits
6303fe29
Commit
6303fe29
authored
Feb 20, 2012
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed disabled subtree_map implementation.
parent
d75fb603
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
21 deletions
+0
-21
src/parser.py
src/parser.py
+0
-21
No files found.
src/parser.py
View file @
6303fe29
...
...
@@ -193,20 +193,6 @@ class Parser(BisonParser):
if
not
retval
.
negated
and
retval
.
type
!=
TYPE_OPERATOR
:
return
retval
#if self.subtree_map and retval.type == TYPE_OPERATOR:
# # Update the subtree map to let the subtree point to its parent
# # node.
# parent_nodes = self.subtree_map.keys()
# #if retval.is_leaf:
# # if retval in parent_nodes:
# # self.subtree_map[retval] = None
# #else:
# for child in retval:
# print 'child:', child, 'in', parent_nodes
# if child in parent_nodes:
# self.subtree_map[child] = retval
if
retval
.
type
==
TYPE_OPERATOR
and
retval
.
op
in
RULES
:
handlers
=
RULES
[
retval
.
op
]
else
:
...
...
@@ -217,13 +203,6 @@ class Parser(BisonParser):
for
handler
in
handlers
:
possibilities
=
handler
(
retval
)
# Record the subtree root node in order to avoid tree traversal.
# At this moment, the node is the root node since the expression is
# parser using the left-innermost parsing strategy.
#for p in possibilities:
# self.subtree_map[p.root] = None
self
.
possibilities
.
extend
(
possibilities
)
return
retval
...
...
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