2 VFR Description in BNF
This section describes a language for developers to use when writing forms. This language is compiled into an architectural form (i.e., IFR) described in the UEFI Specification. Each section describes a different language terminal or non-terminal.
Note: The text formatting of the VFR statements and examples in this document are consistent with BNF-style conventions rather than with EFI or UEFI conventions.
VFR forms consist of a series of VFR statements. The subsections in this chapter designate the base definitions of the different VFR statements by specifying the keyword "Statement" in the section title, followed by the BNF non-terminal name enclosed in parentheses.
Subsections without the "Statement" keyword in the title are non-terminal definitions referenced by one or more of the VFR statement definitions.
The VFR language uses BNF-style syntax:
  • For the BNF-style syntax used here, literal characters and terms are in bold and marked with quotation mark. Example: "formset" is composed of literal characters:
    1
    "formset"
    Copied!
  • Terms are case-sensitive. VFR comments start with "//" and end at the end of the line. Example: a comment line:
    1
    // this is a typical comment marker
    Copied!
  • Optional terms are enclosed in non-bolded braces {}. Example: "classguid" definition is optional for formset:
    1
    { "classguid" "=" classguidDefinition "," }
    Copied!
  • Terms enclosed in parentheses, "()", and followed by an asterisk, "" may be specified in the input VFR zero or more times. *Example: ", vfrStatementStatTag" could appear zero or more times in vfrStatementStatTagList:
    1
    vfrStatementStatTagList ::=
    2
    vfrStatementStatTag ( "," vfrStatementStatTag )*
    Copied!
  • If the parenthesis is followed by a plus "+" sign, then the term must be present one or more times. Example: one or more numbers could be used in ideqvallist expression:
    1
    ideqvallistExp ::=
    2
    "ideqvallist"
    3
    vfrQuestionDataFieldName "==" ( Number )+
    Copied!
  • Groups of terms are sometimes enclosed in parentheses. The character "|" between the two terms indicates that either term has acceptable syntax. Example: either "push" or "pop" is acceptable for vfrPragmaPackType:
    1
    vfrPragmaPackType ::=
    2
    {
    3
    "show"
    4
    | ( "push" | "pop" ) { "," StringIdentifier } { "," Number }
    5
    | { Number }
    6
    }
    Copied!
  • A superscript number, "n", followed by a comma "," and another number, "m", such as item{n, m} is used to indicate that the number of occurrences can be from n to m occurrences of the item, inclusive. Example: there could be 1 to 8 hexadecimal characters in "Hex8":
    1
    Hex8 ::= "0x"["0"-"9""A"-"F""a"-"f"]{1,8}
    Copied!
Last modified 1yr ago
Copy link