Syntax diagram
Extended Backus-Naur Form (EBNF)は、プログラミング言語やその他の形式言語の構造を指定するために用いられる形式構文の一種である。EBNFはBackus-Naur Form (BNF) を拡張したもので、もともとJohn BackusとPeter NaurによってAlgolプログラミング言語の構文を記述するために開発されたものです。 EBNFは、元のBNFのメタシンボルにいくつかのメタシンボルを追加し、言語の構文をより簡潔で読みやすい形で記述できるようにしたものである。プログラミング言語の仕様によく使われるほか、データベースの問い合わせ言語やマークアップ言語など、他の種類の形式言語の構文を記述するために使われることもある。 EBNFの基本的なサポートはPlantUMLに導入されています。 *[Ref. [QA-16529](https://forum.plantuml.net/16529/could-we-add-syntax-diagrams)]*WARNING
This translation need to be updated. WARNING
Minimal binary diagram
All EBNF Elements
EBNF elements handled by PlantUML are described below.
Special sequence management with special-sequence-symbol "?"
You can manage special sequence with special-sequence-symbol "?".
Full repetition management with repetition-symbol "*"
You can manage repetition with repetition-symbol "*".
Drawing mode
Before version V1.2025.1, you can choice the drawing mode, and having a compacted mode by using !pragma compact command.
Expanded mode (by default, and the only one from V1.2025.1)
Compacted mode (only available before V1.2025.1)
Notes on Elements
Notes may be added to elements of your diagram by using EBNF comment tags.
Using (global) style
Without style (by default)
With style
You can use style to change rendering of elements.
Example of LISP Grammar
LISP Grammar with PlantUML.
EBNF of PlantUMLs EBNF Grammar
EBNF allows for self description, so here it is!
Java Language Specification
A real world example of a detailed programming language.
Packages and Modules
Lexical Structure
Types, Values, and Variables
Names
Classes
Interfaces
Arrays
Blocks, Statements, and Patterns
Remaining defects
Could you put 'arrow head' on all rerouted lines?
Order issue
Allow accentuated or Unicode char on EBNF meta-identifier or rule name.
Allow full restriction management with except-symbol "-"