GNU bug report logs - #16416
24.3; [SMIE] Assertion failure in smie-prec2->grammar

Previous Next

Package: emacs;

Reported by: cauderlier <at> crans.org (Raphaël Cauderlier)

Date: Sat, 11 Jan 2014 19:56:01 UTC

Severity: normal

Found in version 24.3

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: cauderlier <at> crans.org (Raphaël Cauderlier)
Cc: 16416 <at> debbugs.gnu.org
Subject: bug#16416: 24.3; [SMIE] Assertion failure in smie-prec2->grammar
Date: Mon, 13 Jan 2014 20:04:07 -0500
> (smie-prec2->grammar (smie-bnf->prec2 '((name) (l ("a" name)))))
> This raised the following error message:
> (cl-assertion-failed (numberp (car cons)))

Hmm..indeed.  The assertion can be removed, but then we bump into
another signal.  The problem is that the grammar is simply "too
trivial" and smie.el seems to bump into invalid assumptions in
that case.  As soon as you add some other terminal to the "l" rule, or
the "name" rule, or you use "l" somewhere, the problem disappears.

Intuitively this problem might manifest itself in a more realistic
grammar, yet I don't quite see in which case, and for that reason
I don't really see yet what would be the right fix.  I'm tempted to
think that the problem is partly to blame on smie-bnf->prec2 which
generates a prec2 table where "a" is missing (except for the side info
of :smie-open/close-alist).


        Stefan




This bug report was last modified 4 years and 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.