Feedback

  • Contents
  • Index
 

Example ABNF grammar file

The ABNF syntax uses symbols, words, and operators; much like a scripting or programming language.

// Header
#ABNF 1.0;
language en-US;
mode voice;

// Root rule 
root $yesorno;

// Rules
$yes = yes | correct | yeah | affirmative;
$no = no | nope | negative;
$yesorno = $yes | $no;

To ensure that you can easily identify ABNF grammars when browsing a file system, use the .gram file name extension.