3.1. BNF notation and syntax

Table 3.1 summarizes the Backus-Naur Form (BNF) symbols that are used to describe a formal language.

Table 3.1. BNF syntax 

SymbolDescription
"Quotation marks are used to indicate that a character that is normally part of the BNF syntax is used as a literal character in the definition. The definition B"+"C, for example, can only be replaced by the pattern B+C. The definition B+C can be replaced by, for example, patterns BC, BBC, or BBBC.
A ::= BDefines A as B. For example, A::= B"+" | C means that A is equivalent to either B+ or C. The ::= notation is used to define a higher level construct in terms of its components. Each component might also have a ::= definition that defines it in terms of even simpler components. For example, A::= B and B::= C | D means that the definition A is equivalent to the patterns C or D.
[A]Optional element A. For example, A::= B[C]D means that the definition A can be expanded into either BD or BCD.
A+Element A can have one or more occurrences. For example, A::= B+ means that the definition A can be expanded into B, BB, or BBB.
A*Element A can have zero or more occurrences.
A | BEither element A or B can occur, but not both.
(A B)Element A and B are grouped together. This is particularly useful when the | operator is used or when a complex pattern is repeated. For example, A::=(B C)+ (D | E) means that the definition A can be expanded into any of BCD, BCE, BCBCD, BCBCE, BCBCBCD, or BCBCBCE.

Note

The BNF definitions in this section, contain additional line returns and spaces to improve readability. They are not required in the scatter-loading definition and are ignored if present in the file.

Copyright © 2008, 2009 ARM Limited. All rights reserved.ARM DUI 0381A
Non-Confidential, Unrestricted Access IDID090123