RIDDL Documentation
Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Grammar

This section defines the RIDDL language’s grammar formally.

Extended Backus-Naur Form

When RIDDL grammar definitions are shown, we use the EBNF grammar meta-language to specify the grammar. You can read about this grammar meta-language on Wikipedia

For example, here’s how EBNF can define a quoted string:

all characters = ? any utf-8 character ? ;
quoted string =  '"', { all characters - '"' }, '"';

This form can be quite technical and is intended for those who are familiar with EBNF format and lexical parsing. For a more meta introduction to the language, please refer to the Guides section.

The RIDDL syntax grammar is broken down into the following portions:

  • terminals - Terminal symbols used in the grammar
  • common - Common grammar productions used in other files
  • root - Top level root level (“file scope”).
  • domain - Defining domains
  • context - Defining contexts
  • entity - Defining entities