emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 4956e76: Revert "Add a mechanism to specify expecte


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 4956e76: Revert "Add a mechanism to specify expected shift/reduce .wy conflicts"
Date: Tue, 18 Jun 2019 10:09:23 -0400 (EDT)

branch: master
commit 4956e7610c782cace51943ee41f4c357703bdae1
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Revert "Add a mechanism to specify expected shift/reduce .wy conflicts"
    
    This reverts commit f21ec24524c705e18674a2e9e4db37b11fa3ebab.
    
    *sigh*  Revert again because this created a bootstrap problem in a 
different part of the process.
---
 admin/grammars/python.wy           |  1 -
 lisp/cedet/semantic/grammar.el     |  9 +--------
 lisp/cedet/semantic/wisent/comp.el | 18 +++++++-----------
 3 files changed, 8 insertions(+), 20 deletions(-)

diff --git a/admin/grammars/python.wy b/admin/grammars/python.wy
index 0e926ad..082850d 100644
--- a/admin/grammars/python.wy
+++ b/admin/grammars/python.wy
@@ -88,7 +88,6 @@
 
 %package wisent-python-wy
 %provide semantic/wisent/python-wy
-%expectedconflicts 4
 
 %{
 (declare-function wisent-python-reconstitute-function-tag
diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el
index 3916142..8ffa4c6 100644
--- a/lisp/cedet/semantic/grammar.el
+++ b/lisp/cedet/semantic/grammar.el
@@ -277,13 +277,6 @@ foo.by it is foo-by."
              (i    (string-match (format "\\([.]\\)%s\\'" ext) file)))
         (concat (substring file 0 i) "-" ext))))
 
-(defun semantic-grammar-expected-conflicts ()
-  "Return the number of expected shift/reduce conflicts in the package."
-  (let ((conflicts (semantic-grammar-tag-symbols 'expectedconflicts)))
-    (if conflicts
-        (string-to-number conflicts)
-      0)))
-
 (defsubst semantic-grammar-languagemode ()
   "Return the %languagemode value as a list of symbols or nil."
   (semantic-grammar-tag-symbols 'languagemode))
@@ -994,7 +987,7 @@ Return non-nil if there were no errors, nil if errors."
                       (vc-handled-backends nil))
                   (setq semanticdb-new-database-class 
'semanticdb-project-database)
                   (semantic-mode 1)
-                  (semantic-grammar-create-package t)))
+                  (semantic-grammar-create-package)))
              (error
               (message "%s" (error-message-string err))
               nil))))
diff --git a/lisp/cedet/semantic/wisent/comp.el 
b/lisp/cedet/semantic/wisent/comp.el
index ff434f5..051b898 100644
--- a/lisp/cedet/semantic/wisent/comp.el
+++ b/lisp/cedet/semantic/wisent/comp.el
@@ -2264,28 +2264,24 @@ there are any reduce/reduce conflicts."
   :group 'wisent
   :type '(choice (const nil) integer))
 
-(declare-function semantic-grammar-expected-conflicts "semantic/grammar")
-
 (defun wisent-total-conflicts ()
   "Report the total number of conflicts."
-  (require 'semantic/grammar)
   (unless (and (zerop rrc-total)
                (or (zerop src-total)
                    (= src-total (or wisent-expected-conflicts 0))))
     (let* ((src (wisent-source))
            (src (if src (concat " in " src) ""))
            (msg (format "Grammar%s contains" src)))
-      (when (and (> src-total 0)
-                 (not (= rrc-total (semantic-grammar-expected-conflicts))))
-        (setq msg (format "%s %d shift/reduce conflict%s"
-                          msg src-total (if (> src-total 1)
-                                            "s" ""))))
+      (if (> src-total 0)
+          (setq msg (format "%s %d shift/reduce conflict%s"
+                            msg src-total (if (> src-total 1)
+                                              "s" ""))))
       (if (and (> src-total 0) (> rrc-total 0))
           (setq msg (format "%s and" msg)))
       (if (> rrc-total 0)
-          (setq msg (format "%s %d reduce/reduce conflict%s"
-                            msg rrc-total (if (> rrc-total 1)
-                                              "s" ""))))
+        (setq msg (format "%s %d reduce/reduce conflict%s"
+                          msg rrc-total (if (> rrc-total 1)
+                                            "s" ""))))
       (message msg))))
 
 (defun wisent-print-conflicts ()



reply via email to

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