comp.lang.ada
 help / color / mirror / Atom feed
* Ada 2012 BNF syntax summary incomplete?
@ 2012-06-30 18:25 Ingo Marks
  2012-06-30 19:53 ` Niklas Holsti
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ingo Marks @ 2012-06-30 18:25 UTC (permalink / raw)


It seems to me that there are there missing items in the Ada 2012 BNF Syntax

http://www.ada-auth.org/standards/12rm/html/RM-P.html

For instance, the following items are used but not declared:

- ancestor_subtype_indication
- aspect_identifier
- ...
- selecting_expression
- static_simple_expression

There are about 50 items missing. Are they identical with the Ada95 specs? For instance,

http://cuiwww.unige.ch/isi/bnf/Ada95/static_simple_expression.html

If not, where can I find the complete BNF syntax?

Thanks for advice.
Ingo



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Ada 2012 BNF syntax summary incomplete?
  2012-06-30 18:25 Ada 2012 BNF syntax summary incomplete? Ingo Marks
@ 2012-06-30 19:53 ` Niklas Holsti
  2012-07-01  5:06 ` anon
  2012-07-01  5:23 ` AdaMagica
  2 siblings, 0 replies; 4+ messages in thread
From: Niklas Holsti @ 2012-06-30 19:53 UTC (permalink / raw)


On 12-06-30 21:25 , Ingo Marks wrote:
> It seems to me that there are there missing items in the Ada 2012 BNF Syntax
>
> http://www.ada-auth.org/standards/12rm/html/RM-P.html
>
> For instance, the following items are used but not declared:
>
> - ancestor_subtype_indication

Isn't the word "ancestor" in a different style (italic) from the rest of 
the item? From the syntax point of view, the italic words should be 
ignored; they give semantic information, in this case that the 
subtype_indication identifies, or should identify, an ancestor subtype.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Ada 2012 BNF syntax summary incomplete?
  2012-06-30 18:25 Ada 2012 BNF syntax summary incomplete? Ingo Marks
  2012-06-30 19:53 ` Niklas Holsti
@ 2012-07-01  5:06 ` anon
  2012-07-01  5:23 ` AdaMagica
  2 siblings, 0 replies; 4+ messages in thread
From: anon @ 2012-07-01  5:06 UTC (permalink / raw)



The BNF has always been in error with missing definitions. It should be 
corrected but I think it never will be. 

An example is "static_simple_expression" which was shown in the BNF 
of Ada 83 to current but has never been defined in BNF only in the 
LRM text.

One can understand that "static_simple_expression"  is a 
"simple_expression" that also follows the "static" 
definition (RM 4.9)

   4.9 Static Expressions and Static Subtypes

The others can be worked out as well like "static_range". is a 
"range" that also following the "static" definition (RM 4.9)


As for the BNF it would start like :


  static_simple_expression ::= [ unary_adding_operator ]
                    static_term  { binary_adding_operator static_term }

  static_term ::= static_factor { multiplying_operator factor }

  static_factor ::= primary [ "**"  static_primary ]
                            | "abs" static_primary
                            | "not" static_primary

  static_primary ::= enumeration_literal
                   | character_literal
                   | named_number
                   | numeric_literal
                   | static_function_call 
                   | static_attributes_expression
                   | static_qualified_expression
                   | ( static_expression )


And so on! It would be nice to have a complete BNF but its a lot of 
work just to add the BNF for the "static" condition.



In <d7564f4d-4fc2-4666-bd1e-f3936f477217@googlegroups.com>, Ingo Marks <it.marks.info@googlemail.com> writes:
>It seems to me that there are there missing items in the Ada 2012 BNF Syntax
>
>http://www.ada-auth.org/standards/12rm/html/RM-P.html
>
>For instance, the following items are used but not declared:
>
>- ancestor_subtype_indication
>- aspect_identifier
>- ...
>- selecting_expression
>- static_simple_expression
>
>There are about 50 items missing. Are they identical with the Ada95 specs? For instance,
>
>http://cuiwww.unige.ch/isi/bnf/Ada95/static_simple_expression.html
>
>If not, where can I find the complete BNF syntax?
>
>Thanks for advice.
>Ingo




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Ada 2012 BNF syntax summary incomplete?
  2012-06-30 18:25 Ada 2012 BNF syntax summary incomplete? Ingo Marks
  2012-06-30 19:53 ` Niklas Holsti
  2012-07-01  5:06 ` anon
@ 2012-07-01  5:23 ` AdaMagica
  2 siblings, 0 replies; 4+ messages in thread
From: AdaMagica @ 2012-07-01  5:23 UTC (permalink / raw)


There is this sentence at the very beginning of Annex P:

"This Annex summarizes the complete syntax of the language. See 1.1.4 for a description of the notation used."

And RM 1.1.4(14) says: "If the name of any syntactic category starts with an italicized part, it is equivalent to the category name without the italicized part. The italicized part is intended to convey some semantic information. For example *subtype*_name and *task*_name are both equivalent to name alone."

My invention to use * as an indication of italics that I can't use here.

HTH



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-01  5:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-30 18:25 Ada 2012 BNF syntax summary incomplete? Ingo Marks
2012-06-30 19:53 ` Niklas Holsti
2012-07-01  5:06 ` anon
2012-07-01  5:23 ` AdaMagica

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