Stephen Leake <[email protected]> writes:

> Georg Bauhaus <[email protected]> writes:
>
>> On 09.09.13 11:51, Georg Bauhaus wrote:
>>
>>> Does not work for me right now,
>>> something is broken here. Pressing
>>> tab always removes all indentation.
>>> 
>> Example. the package body is indented once the syntax
>> is complete and correct, the spec isn't:
>>
>> package Tasks is
>>
>> type T is null record;
>>
>> protected type P is
>> entry Foo;
>> end P;
>>
>> end Tasks;
>
> This is because the parse is failing. It fails silently, to be less
> annoying while you are typing new code.
>
> To see why the parse is failing, select "Ada Mode | Toggle show parser
> errors" from the menu. 

You then need to either edit something, so the parser knows to try
again, or invoke M-x wisi-parse-buffer explicitly.

Perhaps that menu item should invoke wisi-parse-buffer itself, if
toggled on?

That gives:

wisi-validate-cache: debug.adb:7:5: syntax error in grammar state 1026;
unexpected P, expecting one of (default SEMICOLON)

This is a bug in ada-grammar.wy; there's a missing 'identifier_opt' in
'protected_definition':

--- ada-grammar.wy
+++ ada-grammar.wy
@@ -1584,7 +1584,7 @@ protected_definition
     (progn
       (wisi-statement-action 2 'block-middle 4 'block-end)
       (wisi-containing-action 2 3))
-  | declarative_part_opt END
+  | declarative_part_opt END identifier_opt
     (wisi-statement-action 2 'block-end)
   ;
 

-- 
-- Stephe

_______________________________________________
Emacs-ada-mode mailing list
[email protected]
http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org

Reply via email to