//////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2010, 2026 Contributors to the Eclipse Foundation
//
// See the NOTICE file(s) distributed with this work for additional
// information regarding copyright ownership.
//
// This program and the accompanying materials are made available
// under the terms of the MIT License which is available at
// https://opensource.org/licenses/MIT
//
// SPDX-License-Identifier: MIT
//////////////////////////////////////////////////////////////////////////////

include::../_part_attributes.asciidoc[]
include::_local_attributes.asciidoc[]

indexterm:[grammar]
indexterm:[syntax,grammar]

:leveloffset: -2

[[lang-ref-syntax-grammar]]
== Grammar

Below, the link:https://en.wikipedia.org/wiki/Formal_grammar[grammar] of the ToolDef language is shown, in a form closely resembling link:https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form[Backus-Naur Form] (BNF).
The `Script` link:https://en.wikipedia.org/wiki/Nonterminal_symbol[non-terminal] is the link:https://en.wikipedia.org/wiki/Start_symbol_(formal_languages)[start symbol] of the grammar.
Text between quotes are terminals.
Names using only upper case letters are defined in the <<lang-ref-syntax-lexical,lexical syntax>>.
The remaining names are the non-terminals of the grammar.

[source, bnf]
----
include::{incdir-lang-ref-syntax}/tooldef.bnf[]
----
