emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/parser-generator 542a50d9c1 20/82: Remove usage of a ha


From: Christian Johansson
Subject: [elpa] externals/parser-generator 542a50d9c1 20/82: Remove usage of a hash-table
Date: Thu, 12 May 2022 13:28:14 -0400 (EDT)

branch: externals/parser-generator
commit 542a50d9c1a3175c2f16e10f4176041569a08318
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>

    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)))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]