Am 18.09.2013 um 21:16 schrieb Simon Wright:
>>> 
>>> --- 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)
>>>  ;
>>> 
>>> 
>> 
>> The patch is working. Excellent.
> 
> It's taken me a *long* time to get to the point where I can try this.
> 
> The stumbling block was that build/wisi/Makefile does the byte compilation 
> using plain "emacs" which, on Mac OS X, opens the command-line version which 
> is 22.1.1 :-)

I took the easy way out and ignored byte-compilation. :-) So, what was
working was actually Emacs Lisp text, as is.  -- I, too, noticed
that the Makefiles are referring to versions of Emacs in specific
locations and decided to ignore this part for now. Should have said so.

> 
> I used EMACS_EXE (just EMACS didn't work, don't know why, but perhaps because 
> Darwin HFS is case-insensitive - it translated to /usr/bin/emacs, hence the 
> command-line version again) and set it to 
> "/Applications/Emacs.app/Contents/MacOS/Emacs", and WISI_OPENTOKEN to where I 
> have it, no attempt at a proper fix; now I can progress!
> 
> Did someone (Georg?) write this up?
> 

Things I remember. I have used the sources for workbench style
experimentation, no complete install done. I am reproducing,
at the dashes below, what I remember only to point out where
there might be sources of confusion, or of going astray.

A bird's-eye view of the overall organization of the sources
and the build process will, I think, be quite helpful. I have
started a few notes, not implying that they are generally
useful, or up to date. They reflect what I have learned.
Texinfo appended below. Maybe some of the comments in the
Wisent/Elisp files can be reworked into this overview? 

1. steps taken:

- Start, in org.emacs.ada-mode.stephe-1, find a README.txt
  or INSTALL.txt, or a Makefile; experiment; also look around, and
  guess that the files ending with ".wy" are important (i.e.,
  demonstrate lack of knowledge of semantic/wisent, and its use
  with OpenToken).
- Follow the pointer to build/wisi
- see what $(make -n) gives, learn about wisi-generate.exe

- Switch projects to opentoken.
- { use the source from the Web site, which has now been patched]
- { or find the proper branch in VC (is it org.opentoken.stephe?).
- Again, learn from README.txt.
- build wisi-generate.exe and keep it.


2. bird's-eye view:

@section Producing Ada Mode's Parsers From Scratch

For its indentation functions, Ada Mode ultimately uses parsers
written for @xref{Wisent}. Two parsers are provided. One is for Ada
source text, the other is for GNAT project files. Wisent grammars of
either will be found in @file{ada-grammar.wy}, and
@file{gpr-grammar.wy}, respectively.

To produce Emacs Lisp text from these descriptions, you would run the
program @command{wisi-generate.exe}.  The program is written in Ada
and uses the
@uref{http://www.stephe-leake.org/ada/opentoken.html,OpenToken}
library adapted for the purposes of Ada Mode. Its input is a
@samp{.wy} file, its output is Emacs Lisp, @pxref{wisi-user-manual}.

Two makefiles have been set up for compiling, and properly invoking
@command{wisi-generate.exe}, respectively.  One, @file{...}, is part
of the accompanying distribution of OpenToken. The other,
@file{build/wisi/Makefile}, is part of Ada Mode proper.



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

Reply via email to