Sign in

    moonrockz/diagrams-plantuml/ebnf does not have a README file

    Conversion

    pub struct Conversion {
    grammar :
    Grammar
    ?
    diagnostics : ReadOnlyArray[
    Diagnostic
    ]
    }

    Document

    pub struct Document {
    name : String?
    statements : ReadOnlyArray[
    Statement
    ]
    items : ReadOnlyArray[Item]
    } derive(Eq,
    Debug
    )

    Document::equal

    fn Document::equal(Document, Document) -> Bool

    Document::logical_equal

    fn Document::logical_equal(self : Document, other : Document) -> Bool

    Document::new

    Document::not_equal

    fn Document::not_equal(x : Document, y : Document) -> Bool

    Document::to_repr

    Document::without_spans

    fn Document::without_spans(self : Document) -> Document

    Expr

    One typed EBNF expression. Concatenations and alternations are flat. Grouping parentheses are syntax only; the tree records the structure.

    Expr::equal

    fn Expr::equal(Expr, Expr) -> Bool

    Expr::not_equal

    fn Expr::not_equal(x : Expr, y : Expr) -> Bool

    Expr::to_repr

    Expr::without_spans

    fn Expr::without_spans(self : Expr) -> Expr

    Item

    pub(all) enum Item {
    Rule(Rule)
    Note(ReadOnlyArray[String],
    Span
    ?)
    } derive(Eq,
    Debug
    )

    Item::equal

    fn Item::equal(Item, Item) -> Bool

    Item::not_equal

    fn Item::not_equal(x : Item, y : Item) -> Bool

    Item::to_repr

    Notes

    pub struct Notes {
    above : String?
    below : String?
    } derive(Eq,
    Debug
    )

    The note above and the note below a leaf term.

    Notes::equal

    fn Notes::equal(Notes, Notes) -> Bool

    Notes::not_equal

    fn Notes::not_equal(x : Notes, y : Notes) -> Bool

    Notes::to_repr

    ReadResult

    pub struct ReadResult {
    nodes : Array[
    Node
    ]
    document : Document?
    diagnostics : ReadOnlyArray[
    Diagnostic
    ]
    }

    Rule

    pub struct Rule {
    name : String
    body : Expr?
    above : String?
    below : String?
    span :
    Span
    ?
    } derive(Eq,
    Debug
    )

    Rule::equal

    fn Rule::equal(Rule, Rule) -> Bool

    Rule::new

    fn Rule::new(name : String, body? : Expr, above? : String, below? : String) -> Rule

    A rule from typed values, without a source location.

    Rule::not_equal

    fn Rule::not_equal(x : Rule, y : Rule) -> Bool

    Rule::to_repr

    diagnostic_codes

    let diagnostic_codes : ReadOnlyArray[String]

    The stable diagnostic codes of the EBNF reader and writer.

    no_note

    let no_note : Notes

    fn print_body(document : Document, limits? :
    Limits
    ) -> Result[String, ReadOnlyArray[
    Diagnostic
    ]]

    The canonical body of an EBNF document: one line per rule and per note line, derived from typed values.

    read

    Read the body of a scanned EBNF block. Statements dispatch in the order of the pinned reader: whole-line notes, multi-line notes, single-line rules and multi-line rules. A rule that PlantUML draws as "Syntax error!" is an error here.

    to_grammar

    fn to_grammar(document : Document, id? : String, limits? :
    Limits
    ) -> Conversion

    Convert an EBNF document to the format-independent grammar model. Names stay symbolic references; recursive rules are never expanded. An exclusion constrains the term before it and is never an alternative.

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io