[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r104693: * lisp/emacs-lisp/smie.el (s
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r104693: * lisp/emacs-lisp/smie.el (smie-bnf->prec2): Give more understandable error |
Date: |
Thu, 23 Jun 2011 12:55:59 -0400 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 104693
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Thu 2011-06-23 12:55:59 -0400
message:
* lisp/emacs-lisp/smie.el (smie-bnf->prec2): Give more understandable error
messages for adjacent non-terminals.
modified:
lisp/ChangeLog
lisp/emacs-lisp/smie.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-06-23 16:38:40 +0000
+++ b/lisp/ChangeLog 2011-06-23 16:55:59 +0000
@@ -1,3 +1,8 @@
+2011-06-23 Stefan Monnier <address@hidden>
+
+ * emacs-lisp/smie.el (smie-bnf->prec2): Give more understandable error
+ messages for adjacent non-terminals.
+
2011-06-23 Richard Stallman <address@hidden>
* mail/rmail.el (rmail-retry-ignored-headers): Add message-id.
=== modified file 'lisp/emacs-lisp/smie.el'
--- a/lisp/emacs-lisp/smie.el 2011-06-15 18:36:00 +0000
+++ b/lisp/emacs-lisp/smie.el 2011-06-23 16:55:59 +0000
@@ -229,14 +229,18 @@
;; the trouble, and it lets the writer of the BNF
;; be a bit more sloppy by skipping uninteresting base
;; cases which are terminals but not OPs.
- (assert (not (member (cadr rhs) nts)))
+ (when (member (cadr rhs) nts)
+ (error "Adjacent non-terminals: %s %s"
+ (car rhs) (cadr rhs)))
(pushnew (cadr rhs) first-ops)))
(let ((shr (reverse rhs)))
(if (not (member (car shr) nts))
(pushnew (car shr) last-ops)
(pushnew (car shr) last-nts)
(when (consp (cdr shr))
- (assert (not (member (cadr shr) nts)))
+ (when (member (cadr rhs) nts)
+ (error "Adjacent non-terminals: %s %s"
+ (cadr rhs) (car rhs)))
(pushnew (cadr shr) last-ops)))))
(push (cons nt first-ops) first-ops-table)
(push (cons nt last-ops) last-ops-table)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r104693: * lisp/emacs-lisp/smie.el (smie-bnf->prec2): Give more understandable error,
Stefan Monnier <=