Version

Generate Grammar From an EBNF File

Topic Overview

Purpose

This topic explains the process of creating a grammar from EBNF content.

Required background

The following topics are prerequisites to understanding this topic:

Topic Purpose

This topic provides an overview of the Syntax Parsing Engine.

This topic provides an overview of the Syntax Parsing Engine’s Grammar.

This topic gives an overview of the EBNF file format used to define a grammar.

Process Overview

Overview

You can create a Grammar instance from an EBNF file using the static methods of the Grammar class:

Both these methods return an EbnfLoadResult instance, which has the following properties:

Property * Description*

A collection of EbnfLoadError instances, which will be empty if Success is true and non-empty if Success is false. Each EbnfLoadError describes a different error with the EBNF file.

The Grammar instance which was created if Success is true. This will be Null is Success is false.

Indicates whether the EBNF file was successfully loaded. If true, the Grammar property will be the Grammar instance created from the file. If false, Errors will contain one or more errors describing the problems with the document.

Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic explains the format of the special sequence sections in the EBNF file used to configure the grammar.

This topic explains the deviations from the ISO 14977 specification in the EBNF format used by the Syntax Parsing Engine.

This topic explains the process of creating EBNF content from a grammar.