comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: Ada Reference Manual 2012 in info format
Date: Sat, 12 May 2012 06:33:52 -0400
Date: 2012-05-12T06:33:52-04:00	[thread overview]
Message-ID: <82txzlu1rj.fsf@stephe-leake.org> (raw)
In-Reply-To: 20120511040710.52bbc3fd@vostro

Oliver Kleinke <oliver.kleinke@c-01a.de> writes:

> Am Thu, 10 May 2012 11:11:25 +0100
> schrieb Stephen Leake <stephen_leake@stephe-leake.org>:
>
>> > A major problem of the formatter/RM sources is that they only
>> > provide partial semantic information about the contents, that IS
>> > 1995-style.
>> 
>> What, exactly, is missing? Can you give an example?
>
> I'll provide one example:
>
> when ARM_Output.Small =>
>    if Indent = 0 then
>       return "Small";
>    elsif Indent = 1 then
>       return "Notes";
>    elsif Indent = 2 then
>       return "Annotations";
>
> As you can easily see the two style attributes 'Small' (paragraph/header
> style) and Indent (paragraph indentation) are used to determine the
> semantics of the paragraph's contents. So if you are a bright guy,
> you'll figure out what's bad about it.
>
> More semantic markup would also facilitate the extraction of information
> from the RM, e.g. to feed the data into an IDE (Manuel Collado pointed
> that out).

This appears to be a snippet from arm_html.adb, in the function
Paragraph_Name (that's the only occurance of 'return "Small"'). It is
deducing a name for a style, presumably to enable the use of a CSS
style.

It might make sense to use semantic information directly to get the
style name, but the arm_form code takes an indirect approach. It already
has a notion of "Style", which is more fine-grained than the CSS style
names Randy chose to implement.

So this is an internal design choice in the HTML formatter, not a
feature of the Scheme source.


For example, here's a portion of the Syntax section of 3.6 Array Types,
from file 03B.MSS:

@begin{Syntax}
@Syn{lhs=<array_type_definition>,rhs="
   @Syn2{unconstrained_array_definition} | @Syn2{constrained_array_definition}"}


@Syn{lhs=<unconstrained_array_definition>,rhs="
   @key{array}(@Syn2{index_subtype_definition} {, @Syn2{index_subtype_definition}}) @key{of} @Syn2{component_definition}"}

@Syn{lhs=<index_subtype_definition>,rhs="@Syn2{subtype_mark} @key{range} <>"}

@Syn{lhs=<constrained_array_definition>,rhs="
   @key{array} (@Syn2{discrete_subtype_definition} {, @Syn2{discrete_subtype_definition}}) @key{of} @Syn2{component_definition}"}

@Syn{lhs=<discrete_subtype_definition>,rhs="@SynI{discrete_}@Syn2{subtype_indication} | @Syn2{range}"}

@ChgRef{Version=[2],Kind=[Revised],ARef=[AI95-00230-01],ARef=[AI95-00406-01]}
@Syn{lhs=<component_definition>,rhs="@Chg{Version=[2],New=<
   >,Old=<>}[@key{aliased}] @Syn2{subtype_indication}@Chg{Version=[2],New=<
 | [@key{aliased}] @Syn2{access_definition}>,Old=<>}"}
@end{Syntax}

That looks like the necessary semantic info is there.

And here's the "Notes" and "Examples" sections of that Scheme source:

@begin{Notes}
All components of an array have the same subtype. In particular, for an array
of components that are one-dimensional arrays, this means that all components
have the same bounds and hence the same length.

Each elaboration of an @nt<array_type_definition> creates
a distinct array type. A consequence of this is that each
object whose @nt<object_declaration> contains an @nt<array_type_definition>
is of its own unique type.
@end{Notes}

@begin{Examples}
@Leading@keepnext@i(Examples of type declarations with unconstrained array definitions: )
@begin(Example)
@key(type) Vector     @key(is) @key(array)(Integer  @key(range) <>) @key(of) Real;
@key(type) Matrix     @key(is) @key(array)(Integer  @key(range) <>, Integer @key(range) <>) @key(of) Real;
@key(type) Bit_Vector @key(is) @key(array)(Integer  @key(range) <>) @key(of) Boolean;
@key(type) Roman      @key(is) @key(array)(Positive @key(range) <>) @key(of) Roman_Digit; --@RI[ see @RefSecNum(Character Types)]
@end(Example)

The next paragraph shows an example of direct formatting in addition to
semantic markup:

@begin{WideAbove}
@leading@keepnext@i(Examples of type declarations with constrained array definitions: )
@end{WideAbove}
@begin(Example)
@key(type) Table    @key(is) @key(array)(1 .. 10) @key(of) Integer;
@key(type) Schedule @key(is) @key(array)(Day) @key(of) Boolean;
@key(type) Line     @key(is) @key(array)(1 .. Max_Line_Size) @key(of) Character;
@end(Example)

As with all markup, it's tempting to not make macros for _everything_,
but to do ad hoc formatting occasionally.

>> > Providing a modern HTML version does not exclude the possibility to
>> > provide a more 'compatible' version, 
>> 
>> You have yet to define what you mean by either "modern" or
>> "compatible", either by example or description.
>
> For instance the paragraphs have no anchors, thus the possibility of
> deep-linking is limited. The Index has neither anchors for the letters
> nor links to them at the top. 

Ok, there could easily be more anchors. That's easy to change in the
arm_form sources.

I don't see how that has anything to do with "modern"; the requirement
for lots of anchors is implicit in the notion of hypertext, which is
ancient!

I would say "more complete navigation" for this, rather than "more
modern". 

Nor does it require a radical new tool; just a minor addition to the
current tool.

> I can think of a lot more.

Please do, and post them here, or (better), post patches to arm_form
Ada code.

-- 
-- Stephe



  parent reply	other threads:[~2012-05-12 10:32 UTC|newest]

Thread overview: 104+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-29 15:22 Ada Reference Manual 2012 in info format Stephen Leake
2012-04-30  6:06 ` Jerrid Kimball
2012-05-01  3:19   ` Randy Brukardt
2012-05-01  6:06     ` Thomas Løcke
2012-05-01  9:56       ` Yannick Duchêne (Hibou57)
2012-05-03 15:26       ` J Kimball
2012-05-03 14:26     ` [OT] CSS max-width (Was: Ada Reference Manual 2012 in info format) Jacob Sparre Andersen
2012-05-03 15:52       ` Yannick Duchêne (Hibou57)
2012-05-03 22:34         ` Randy Brukardt
2012-05-03 15:23     ` Ada Reference Manual 2012 in info format Jerrid Kimball
2012-05-03 23:25       ` Randy Brukardt
2012-05-04  1:28         ` BrianG
2012-05-09 11:17         ` Oliver Kleinke
2012-05-09 12:06           ` Nasser M. Abbasi
2012-05-09 13:00             ` Dmitry A. Kazakov
2012-05-09 13:56               ` Georg Bauhaus
2012-05-09 14:09                 ` Dmitry A. Kazakov
2012-05-09 14:52                   ` Ludovic Brenta
2012-05-09 16:33                   ` Georg Bauhaus
2012-05-09 16:39                     ` Dmitry A. Kazakov
2012-05-09 16:51                   ` Jerrid Kimball
2012-05-09 17:21                     ` Dmitry A. Kazakov
2012-05-09 19:53                       ` Georg Bauhaus
2012-05-10 10:15                         ` Stephen Leake
2012-05-09 19:59                     ` Simon Wright
2012-05-10  1:42                     ` Randy Brukardt
2012-05-10  7:21                       ` Dmitry A. Kazakov
2012-05-10  7:35                         ` Nasser M. Abbasi
2012-05-10  9:43                           ` Simon Wright
2012-05-10 10:44                           ` Jacob Sparre Andersen
2012-05-10 13:19                             ` Nasser M. Abbasi
2012-05-11 11:49                               ` Stephen Leake
2012-05-11 15:06                                 ` Nasser M. Abbasi
2012-05-10 15:05                           ` Manuel Collado
2012-05-10 15:42                             ` Yannick Duchêne (Hibou57)
2012-05-10 22:15                               ` Manuel Collado
2012-05-11  1:16                                 ` Yannick Duchêne (Hibou57)
2012-05-11 10:47                                   ` Manuel Collado
2012-05-11 11:35                                     ` Yannick Duchêne (Hibou57)
2012-05-12  0:52                                     ` Randy Brukardt
2012-05-14 11:03                                       ` Manuel Collado
2012-05-12 10:04                                     ` Stephen Leake
2012-05-14 11:07                                       ` Manuel Collado
2012-05-11 11:47                           ` Stephen Leake
2012-05-11 14:42                             ` Simon Wright
2012-05-12 10:52                               ` Stephen Leake
2012-05-12  0:59                             ` Randy Brukardt
2012-05-10 13:47                       ` Yannick Duchêne (Hibou57)
2012-05-11 11:57                         ` Stephen Leake
2012-05-11 12:55                           ` Yannick Duchêne (Hibou57)
2012-05-11 13:43                             ` Georg Bauhaus
2012-05-12  0:46                       ` Randy Brukardt
2012-05-10  0:57                   ` Yannick Duchêne (Hibou57)
2012-05-10  7:13                     ` Dmitry A. Kazakov
2012-05-10 13:37                       ` Yannick Duchêne (Hibou57)
2012-05-10 15:02                         ` Dmitry A. Kazakov
2012-05-10 15:32                           ` Yannick Duchêne (Hibou57)
2012-05-10 15:58                             ` Dmitry A. Kazakov
2012-05-11  2:23                           ` Oliver Kleinke
2012-05-10  1:32           ` Randy Brukardt
2012-05-10  1:54           ` Randy Brukardt
2012-05-11  2:36             ` Oliver Kleinke
2012-05-12  1:08               ` Randy Brukardt
2012-05-10 10:11           ` Stephen Leake
2012-05-11  2:07             ` Oliver Kleinke
2012-05-11  2:44               ` Yannick Duchêne (Hibou57)
2012-05-11  2:50                 ` Oliver Kleinke
2012-05-11  7:51                 ` Suggestion for RM HTML formatter extension (Was: Ada Reference Manual 2012 in info format) Jacob Sparre Andersen
2012-05-11 10:03                   ` Martin
2012-05-11 15:32                   ` Suggestion for RM HTML formatter extension Simon Wright
2012-05-11 15:53                     ` Simon Wright
2012-05-11 21:01                       ` Jacob Sparre Andersen
2012-05-11 21:04                       ` Ludovic Brenta
2012-05-11 21:59                     ` Simon Wright
2012-05-12 10:48                       ` Stephen Leake
2012-05-12 12:34                         ` Simon Wright
2012-05-14 11:36                     ` Manuel Collado
2012-05-14 16:20                       ` Simon Wright
2012-05-15  7:02                       ` Randy Brukardt
2012-05-15  8:54                         ` Georg Bauhaus
2012-05-12 10:37                 ` Ada Reference Manual 2012 in info format Stephen Leake
2012-05-12  1:43               ` Randy Brukardt
2012-05-12 10:33               ` Stephen Leake [this message]
2012-05-19  3:58               ` Yannick Duchêne (Hibou57)
2012-05-11 11:59             ` Stephen Leake
2012-05-01 11:51   ` Stephen Leake
2012-05-03 15:03     ` Jerrid Kimball
2012-05-03 21:52       ` Manuel Collado
2012-05-03 22:43         ` Randy Brukardt
2012-05-04  7:58       ` Stephen Leake
2012-05-05 14:23         ` Yannick Duchêne (Hibou57)
2012-05-06 16:13           ` Stephen Leake
2012-05-06 16:27             ` Yannick Duchêne (Hibou57)
2012-05-08  0:54             ` Randy Brukardt
2012-05-03 15:56 ` Yannick Duchêne (Hibou57)
2012-05-03 22:40   ` Randy Brukardt
2013-02-23 20:46 ` Oliver Kellogg
2013-02-24 19:06   ` Stephen Leake
2013-02-25 23:27     ` Randy Brukardt
2013-02-26  4:05       ` Nasser M. Abbasi
2013-02-26 13:23         ` Robert A Duff
2013-02-26 19:49           ` Nasser M. Abbasi
2013-02-26 22:04           ` Randy Brukardt
2013-04-02 17:50       ` M. Strobel
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox