bug-gnu-emacs
[Top][All Lists]
Advanced

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

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


From: Stefan Monnier
Subject: bug#16416: 24.3; [SMIE] Assertion failure in smie-prec2->grammar
Date: Mon, 13 Jan 2014 20:04:07 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> (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





reply via email to

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