Am 27.09.2013 um 14:14 schrieb Stephen Leake:

> procedure {designator} [formal_part]
> is
>   [declarative_item]...
> begin
>   {statement}...
> [exception_part]
> end [designator];
> 
> Now when I type a name into the first {designator}, it is automagically
> copied to the second. Very nice.
> 
> Maybe we can add that mechanism to skeleton?
> 
> In addition, each of the bracketed items (called "placeholders") has
> comment syntax, so the parser ignores them. Which means this particular
> template is illegal syntax, which is one motivation for allowing almost
> everything (not keywords) to be empty. (this template is accepted by the
> SMIE parser, sigh).

The "{designator}" as a name was really easy to fix.  My local Wisi parser
now accepts it and indentation works properly. If now

1) '[' can introduce a comment, and ']' terminate the same,
2) ellipsis_opt is added,

then we'd be done allowing ELSE syntax, since none of the above tokens
are Ada. Correct? Will the parser handle three dots, perhaps by way of a
special case, or by hacking the lexer? Alternatively, couldn't a
trailing '_' be used as a substitute for "..." in ELSE mode? Similar to '[',
'_' may not start any Ada token.

This syntax could also be used with skeleton.el, or anything else, I think.

Attachment: 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

Reply via email to