From: Lars Ingebrigtsen Date: Tue, 18 Jun 2019 13:59:16 +0000 (+0200) Subject: Revert "Add a mechanism to specify expected shift/reduce .wy conflicts" X-Git-Tag: emacs-27.0.90~2416 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=90b44f336caf7d70721f44ac2497a38ff69d6c7d;p=emacs.git Revert "Add a mechanism to specify expected shift/reduce .wy conflicts" This reverts commit d715ae8788e16b22f7f68cb82b51a40ad95c78c2. This commit led to a build error, so revert for now. --- diff --git a/admin/grammars/python.wy b/admin/grammars/python.wy index 0e926ad3636..082850df59c 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 39161420f98..8ffa4c6d83e 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 733345f593f..051b898ed78 100644 --- a/lisp/cedet/semantic/wisent/comp.el +++ b/lisp/cedet/semantic/wisent/comp.el @@ -40,7 +40,6 @@ ;;; Code: (require 'semantic/wisent) -(require 'semantic/grammar) (eval-when-compile (require 'cl-lib)) ;;;; ------------------- @@ -2273,17 +2272,16 @@ there are any reduce/reduce conflicts." (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 ()