branch: externals/parser-generator
commit 542a50d9c1a3175c2f16e10f4176041569a08318
Author: Christian Johansson <[email protected]>
Commit: Christian Johansson <[email protected]>
Remove usage of a hash-table
---
parser-generator-ll.el | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/parser-generator-ll.el b/parser-generator-ll.el
index 1bce7e702c..4356d5f906 100644
--- a/parser-generator-ll.el
+++ b/parser-generator-ll.el
@@ -78,8 +78,7 @@
(first-parent-follow
(parser-generator--first parent-follow nil t t))
(look-aheads)
- (sets)
- (distinct-set-item-p (make-hash-table :test 'equal)))
+ (sets))
(cond
((and first-rhs
@@ -142,6 +141,9 @@
"sub-symbol-rhss: %S"
sub-symbol-rhss))
(dolist (local-follow local-follow-set)
+ (push
+ local-follow
+ sets)
(dolist (sub-symbol-rhs sub-symbol-rhss)
(let* ((sub-symbol-production
(list (list sub-symbol) sub-symbol-rhs))
@@ -150,18 +152,10 @@
(list sub-symbol)
sub-symbol-rhs
local-follow)))
- (unless (gethash
- local-follow
- distinct-set-item-p)
- (puthash
- local-follow
- t
- distinct-set-item-p)
- (push
- local-follow
- sets))
(parser-generator--debug
- (message "new-stack-item: %S" new-stack-item))
+ (message
+ "new-stack-item: %S"
+ new-stack-item))
(push
new-stack-item
stack)))))))