On 8 Jan 2016, at 14:13, Georg Bauhaus <[email protected]> wrote:
> On input of
>
> package P is
>
> type S is synchronized interface;
>
> task type T is new S with
>
> end T;
>
> end P;
>
> the parser fails, the message being
> wisi-containing-action: containing-token 'with' has no cache. grammar error;
> missing action
>
> C-c C-f moves point to after "end" before "P;".
> Mode version 5.1.8 on Emacs 24.5.1.
>
> I couldn't find a definition in the grammar that agrees
> with this error at the level of tokens, so I don't know
> what is going on.
This patch (also attached) solves this problem (but seems to work oddly if you
put additional newlines before 'new', 'with'):
diff --git a/ada-grammar.wy b/ada-grammar.wy
--- a/ada-grammar.wy
+++ b/ada-grammar.wy
@@ -2342,7 +2342,7 @@
: TASK TYPE IDENTIFIER discriminant_part_opt aspect_specification_opt IS NEW
interface_list WITH task_definition
SEMICOLON
(progn
- (wisi-statement-action [1 statement-start 3 name 10 statement-other 11
statement-end])
+ (wisi-statement-action [1 block-start 3 name 9 block-middle 11
statement-end])
(wisi-containing-action 3 5)
(wisi-containing-action 9 10)
(wisi-face-action [2 font-lock-type-face]))
I _think_ the point is that for (wisi-containing-action m n), m must appear in
wisi-statement-action.
This change made by comparison with single_task_declaration. Not sure why
task_type_declaration used statement-start and single_task_declaration use
block-start; there's no statement-middle …?
ada-grammar.wy.diff
Description: Binary data
_______________________________________________ Emacs-ada-mode mailing list [email protected] http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org
