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:

    "formset"
    
  • Terms are case-sensitive. VFR comments start with "//" and end at the end of the line. Example: a comment line:

    // this is a typical comment marker
    
  • Optional terms are enclosed in non-bolded braces {}. Example: "classguid" definition is optional for formset:

    { "classguid" "=" classguidDefinition "," }
    
  • 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:

    vfrStatementStatTagList ::=
      vfrStatementStatTag ( "," vfrStatementStatTag )*
    
  • 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:

    ideqvallistExp ::=
      "ideqvallist"
      vfrQuestionDataFieldName "==" ( Number )+
    
  • 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:

    vfrPragmaPackType ::=
      {
          "show"
        | ( "push" | "pop" ) { "," StringIdentifier } { "," Number }
        | { Number }
      }
    
  • 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":

    Hex8 ::= "0x"["0"-"9""A"-"F""a"-"f"]{1,8}