[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5033: 23.1; antlr-mode: antlr-indent-command broken for long grammar
From: |
Mr Kludge |
Subject: |
bug#5033: 23.1; antlr-mode: antlr-indent-command broken for long grammars |
Date: |
Tue, 24 Nov 2009 09:58:52 -0500 |
Hello,
I am running into an antlr-mode bug when indenting long grammars.
Specifically, when the point in the grammar is higher than
antlr-slow-cache-diff-threshold indenting a grammar rule fails in
calling c-where-wrt-brace-construct through beginning-of-defun.
To trigger:
Write a longinsh grammar (more than 5k chars with the default setting)
or simply set antlr-slow-cache-diff-threshold to 0 and then try to
indent in a grammar rule.
See attached silly.g for an example.
Indentation breaks, with the following error:
c-where-wrt-brace-construct: c-beginning-of-decl-1 returned label
Backtrace:
c-where-wrt-brace-construct()
c-beginning-of-defun(1)
funcall(c-beginning-of-defun 1)
beginning-of-defun-raw(nil)
ad-Orig-beginning-of-defun(nil)
beginning-of-defun()
antlr-syntactic-context()
antlr-indent-line()
antlr-indent-command(nil)
call-interactively(antlr-indent-command nil nil)
Solution:
A simple solution (kludge) is to modify antlr-syntactic-context to not call
beginning-of-defun in antlr-mode.el.
See attached patch.
antlr-mode.el.patch
Description: Binary data
silly.g
Description: Binary data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#5033: 23.1; antlr-mode: antlr-indent-command broken for long grammars,
Mr Kludge <=