Skip to content
diagrams.mbt
DocsArticlesGalleryAPIGitHub

Gallery / EBNF

Externally supplied parse failure

Family: EBNF. Status: Implemented.

An arithmetic grammar with failure evidence supplied by the frozen test trace provider.

Scope: External provider evidence only. No parser is executed inside the renderer.

Preview

Externally supplied parse failure preview

Source

ebnf-arithmetic.puml

text/plain

@startebnf
title Arithmetic with recursion
(* Expressions refer to terms; parentheses refer back to expressions. *)
expression = term, { ("+" | "-"), term };
term = factor, { ("*" | "/"), factor };
factor = number | "(", expression, ")" | "-", factor;
number = digit, { digit };
digit = ? any decimal digit ? - "0" | "0";
@endebnf

Download source: ebnf-arithmetic.puml

Download SVG

diagrams.mbt · Diagramming for MoonBit.