BNF notation used in scatter-loading description syntax

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

Table 2. BNF notation 

"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.

Show/hideSee also

Copyright © 2008, 2011-2012 ARM. All rights reserved.ARM DUI 0458C