Simon Wright <[email protected]> writes:
> On 3 Sep 2013, at 08:10, Stephen Leake <[email protected]> wrote:
>
>> I've pushed a new version of Ada mode 5.0 to the website:
>> http://stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html
>
> Problem with gpr-mode:
>
> for Library_Options use External_As_List ("LDFLAGS", " ");
>
> =>
>
> wisi: parsing ... error
> wisi-validate-cache: ews.gpr:67:46: syntax error in grammar state 16;
> unexpected (, expecting one of (default IS RIGHT_PAREN COMMA AMPERSAND
> SEMICOLON DOT QUOTE)
>
> with the cursor on the first quote.
The gpr grammar presented in the GNAT user guide is missing
"External_As_List" in the syntax for external_value.
Here's a patch:
--- gpr-grammar.wy
+++ gpr-grammar.wy
@@ -61,6 +61,7 @@
%keyword CONFIGURATION "configuration"
%keyword END "end"
%keyword EXTERNAL "external"
+%keyword EXTERNAL_AS_LIST "external_as_list"
%keyword FOR "for"
%keyword IS "is"
%keyword LEFT_PAREN "("
@@ -186,6 +187,8 @@ external_value
external_value
: EXTERNAL LEFT_PAREN string_list RIGHT_PAREN
(wisi-statement-action 2 'open-paren 4 'close-paren)
+ | EXTERNAL_AS_LIST LEFT_PAREN string_list RIGHT_PAREN
+ (wisi-statement-action 2 'open-paren 4 'close-paren)
;
Finding and fixing bugs in the wisi generalized LALR grammar is _so_
much easier than in the SMIE operator precedence grammar!
At least, after I fixed all the bugs in the OpenToken grammar generator
:(.
--
-- Stephe
_______________________________________________
Emacs-ada-mode mailing list
[email protected]
http://host114.hostmonster.com/mailman/listinfo/emacs-ada-mode_stephe-leake.org