diff options
| author | Lars Ingebrigtsen | 2019-06-18 15:59:16 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-06-18 15:59:16 +0200 |
| commit | 90b44f336caf7d70721f44ac2497a38ff69d6c7d (patch) | |
| tree | 3bb474932b696a8db3ecb4831ed55a2f25d0e115 | |
| parent | d715ae8788e16b22f7f68cb82b51a40ad95c78c2 (diff) | |
| download | emacs-90b44f336caf7d70721f44ac2497a38ff69d6c7d.tar.gz emacs-90b44f336caf7d70721f44ac2497a38ff69d6c7d.zip | |
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.
| -rw-r--r-- | admin/grammars/python.wy | 1 | ||||
| -rw-r--r-- | lisp/cedet/semantic/grammar.el | 9 | ||||
| -rw-r--r-- | lisp/cedet/semantic/wisent/comp.el | 16 |
3 files changed, 8 insertions, 18 deletions
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 @@ | |||
| 88 | 88 | ||
| 89 | %package wisent-python-wy | 89 | %package wisent-python-wy |
| 90 | %provide semantic/wisent/python-wy | 90 | %provide semantic/wisent/python-wy |
| 91 | %expectedconflicts 4 | ||
| 92 | 91 | ||
| 93 | %{ | 92 | %{ |
| 94 | (declare-function wisent-python-reconstitute-function-tag | 93 | (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." | |||
| 277 | (i (string-match (format "\\([.]\\)%s\\'" ext) file))) | 277 | (i (string-match (format "\\([.]\\)%s\\'" ext) file))) |
| 278 | (concat (substring file 0 i) "-" ext)))) | 278 | (concat (substring file 0 i) "-" ext)))) |
| 279 | 279 | ||
| 280 | (defun semantic-grammar-expected-conflicts () | ||
| 281 | "Return the number of expected shift/reduce conflicts in the package." | ||
| 282 | (let ((conflicts (semantic-grammar-tag-symbols 'expectedconflicts))) | ||
| 283 | (if conflicts | ||
| 284 | (string-to-number conflicts) | ||
| 285 | 0))) | ||
| 286 | |||
| 287 | (defsubst semantic-grammar-languagemode () | 280 | (defsubst semantic-grammar-languagemode () |
| 288 | "Return the %languagemode value as a list of symbols or nil." | 281 | "Return the %languagemode value as a list of symbols or nil." |
| 289 | (semantic-grammar-tag-symbols 'languagemode)) | 282 | (semantic-grammar-tag-symbols 'languagemode)) |
| @@ -994,7 +987,7 @@ Return non-nil if there were no errors, nil if errors." | |||
| 994 | (vc-handled-backends nil)) | 987 | (vc-handled-backends nil)) |
| 995 | (setq semanticdb-new-database-class 'semanticdb-project-database) | 988 | (setq semanticdb-new-database-class 'semanticdb-project-database) |
| 996 | (semantic-mode 1) | 989 | (semantic-mode 1) |
| 997 | (semantic-grammar-create-package t))) | 990 | (semantic-grammar-create-package))) |
| 998 | (error | 991 | (error |
| 999 | (message "%s" (error-message-string err)) | 992 | (message "%s" (error-message-string err)) |
| 1000 | nil)))) | 993 | 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 @@ | |||
| 40 | 40 | ||
| 41 | ;;; Code: | 41 | ;;; Code: |
| 42 | (require 'semantic/wisent) | 42 | (require 'semantic/wisent) |
| 43 | (require 'semantic/grammar) | ||
| 44 | (eval-when-compile (require 'cl-lib)) | 43 | (eval-when-compile (require 'cl-lib)) |
| 45 | 44 | ||
| 46 | ;;;; ------------------- | 45 | ;;;; ------------------- |
| @@ -2273,17 +2272,16 @@ there are any reduce/reduce conflicts." | |||
| 2273 | (let* ((src (wisent-source)) | 2272 | (let* ((src (wisent-source)) |
| 2274 | (src (if src (concat " in " src) "")) | 2273 | (src (if src (concat " in " src) "")) |
| 2275 | (msg (format "Grammar%s contains" src))) | 2274 | (msg (format "Grammar%s contains" src))) |
| 2276 | (when (and (> src-total 0) | 2275 | (if (> src-total 0) |
| 2277 | (not (= rrc-total (semantic-grammar-expected-conflicts)))) | 2276 | (setq msg (format "%s %d shift/reduce conflict%s" |
| 2278 | (setq msg (format "%s %d shift/reduce conflict%s" | 2277 | msg src-total (if (> src-total 1) |
| 2279 | msg src-total (if (> src-total 1) | 2278 | "s" "")))) |
| 2280 | "s" "")))) | ||
| 2281 | (if (and (> src-total 0) (> rrc-total 0)) | 2279 | (if (and (> src-total 0) (> rrc-total 0)) |
| 2282 | (setq msg (format "%s and" msg))) | 2280 | (setq msg (format "%s and" msg))) |
| 2283 | (if (> rrc-total 0) | 2281 | (if (> rrc-total 0) |
| 2284 | (setq msg (format "%s %d reduce/reduce conflict%s" | 2282 | (setq msg (format "%s %d reduce/reduce conflict%s" |
| 2285 | msg rrc-total (if (> rrc-total 1) | 2283 | msg rrc-total (if (> rrc-total 1) |
| 2286 | "s" "")))) | 2284 | "s" "")))) |
| 2287 | (message msg)))) | 2285 | (message msg)))) |
| 2288 | 2286 | ||
| 2289 | (defun wisent-print-conflicts () | 2287 | (defun wisent-print-conflicts () |