From: Manuel Collado on
Georg Bauhaus escribi�:
> Manuel Collado schrieb:
>> I'm looking for an Ada95/2005 help or reference document indexed by
>> keyword (reserved word or standard library identifier).
>>
>> The purpose is to integrate it into an academic IDE, so it should be
>> possible to put the cursor in the editing window over a meaningful word,
>> and invoke help about it.
>>
>> So far I've found the ARM in several formats, but none of them can be
>> accessed as described. There is also the Ada wikibook, that also lacks
>> the required feature. Even GNAT/GPS seems to lack it.
>
> The wikibook has this feature. The book authors have made templates
> that, if used, will make, e.g., a reserved word into a link to a pages
> with info about the word. There are some programs and editor macro
> files (Vim and Emacs) to help with automatic addition of such. These
> are mentioned on the wikibook authors' pages (in wikibook.org).

Do you suggest converting every instance of common words like 'with',
'use', 'for', 'while', ... into a link to index entries? :-)

>
> One of these programs is the following. I should prepare an update,
> though, for some new wikibook template syntax.
> http://home.arcor.de/bauhaus/Tools/ASnip/

Well, I'm not looking for a tool to create the help system, but for a
ready-to-use one. In fact my course is not about Ada programming, but
about Programming Environments. My students will be asked to customize
an existing IDE by adding additional features not already available, via
invocation of external tools. Like contextual help for Ada keywords or
standard library elements while editing Ada sources.

Hope this clarifies the idea.

--
Manuel Collado - http://lml.ls.fi.upm.es/~mcollado
From: Manuel Collado on
Georg Bauhaus escribi�:
> On 21.04.10 14:27, Manuel Collado wrote:
>
>> This makes sense, as a specific keyword can appears in very different
>> language constructs, with disparate meanings. My expectation is to have
>> a command like:
>>
>> adahelp for
>>
>> that pops-up a choice menu like:
>>
>> - for loops
>> - representation clauses
>> - ...
>>
>> Hope this clarifies the idea.
>>
>
> $ open http://en.wikibooks.org/wiki/Ada_Programming/Keywords/for
>

Oops! I obviously missed these wiki entries.

Thanks.
--
Manuel Collado - http://lml.ls.fi.upm.es/~mcollado
From: Georg Bauhaus on
On 21.04.10 14:37, Manuel Collado wrote:

> Do you suggest converting every instance of common words like 'with',
> 'use', 'for', 'while', ... into a link to index entries? :-)

Sort of, although I'd put more power into the hands of programmers looking
for information. For each word, there will have to be some form of
KWIC, where the 'C' is the part to be well defined. Since you outlined
one possibility, I imagine making a ready-to-use help system "for keywords"
will profit from observing the Google generation's approach to finding
information.

(Step 1) In general, if you want to learn about "for", type "for"
into the search box. The search box will then suggest what you
are looking for, and take you there.

(Step 2) The universe of text to be indexed by the help system
is restricted to text about the syntactic features of Ada.

(Step 3) The one thing that an IDE would need is a
specialized search box by another name (and slightly different
display) supported by the language parser. Everything else is
readily available, for example via Netscape Lisp
(a.k.a. Javascript). The latter will give you context help for
free. Therefore,

(a) have an Ada parser look for key words,

(b) on some event (mouse etc.) connected with the keyword, have the
system display a ready made sub-document on top of the other
text. (Code doing this is freely available.)

So yes, a link is enough.
From: Manuel Collado on
Gautier write-only escribi�:
> On 21 Apr., 10:03, Manuel Collado <m.coll...(a)invalid.domain> wrote:
>> I'm looking for an Ada95/2005 help or reference document indexed by
>> keyword (reserved word or standard library identifier).
>>
>> The purpose is to integrate it into an academic IDE, so it should be
>> possible to put the cursor in the editing window over a meaningful word,
>> and invoke help about it.
>
> AdaGIDE has this feature built-in exactly as you describe, for a while
> (I've implemented it :-) ).
> Right-click on an identifier or a keyword, and you get "Search RM for
> [it]".
> It invokes: http://www.adaic.com/search-rm05.cgi?SearchA=[what you
> want]
>
> Look there for binary or sources here: http://sourceforge.net/projects/adagide/

I must confess that I forget this feature. It is really what I want.

Regrettably, when looking for common words (if, for, ...) the answer is
too noisy to be illustrative.

Thanks for your remainder.
--
Manuel Collado - http://lml.ls.fi.upm.es/~mcollado
From: Randy Brukardt on
"Manuel Collado" <m.collado(a)domain.invalid> wrote in message
news:hqmr00$a2c$1(a)heraldo.rediris.es...
....
> What I've found so far is that the ARM doesn't include the language
> keywords as index entries :-(

This is true, it never seemed that useful. All of the other things (syntax
non-terminals, package names, subprogram names, etc.) are indexed in at
least one of many indexes (including the syntax cross reference in the
latter half of Annex P, the various indexing in Annex Q, and the main
index), but not the keywords. I'll put that on an enhancement list for the
future, since it seems like something that is missing from the Standard.

It would be easy enough for someone to write a tool to extract that
information from the Annex P syntax cross-reference (and then link to the
appropriate non-terminals) -- I'll leave that as an exercise for the reader.
(Also how to get from your IDE to a link in a browser window.)

Randy.