TOC Toolkit API - v0.1.0
    Preparing search index...

    toc-toolkit/machines/syntax

    Reads and prints transition labels, table cells and transition text for the established machine kinds. Counter notation is a placeholder until U10. It works on unchecked drafts so that an editor can show and repair a model before it validates, and it returns located issues with repairs. Execution and validation stay in machines.

    • Label parsing. A hand-written lexer and per-store readers turn a label into ordered transition rules. A line is a list of input reads for a finite automaton, a guard and word per store for a stack or queue machine, or a read, write and move for a tape machine. (parseLabel)
    • Field parsing. Reads one table cell, such as a symbol, a word or a movement, with the same issues and repairs. (parseField)
    • Greedy longest-match word reading. Splits a memory word into the longest symbols of the store alphabet and reports ambiguous multi-character symbols with two repairs. (parseLabel, parseField)
    • Canonical printing. Prints rules in the preset layout, quoting symbols that the notation would misread and merging tape rules with a common move and write. Printing then parsing returns the same rules. (printLabel, printField)
    • Transition text parsing. Reads lines of the form source, label and target with a linear scanner that resolves states by display name or identity. Valid lines survive when others fail. (parseTransitionLines, printTransitionLines)
    • Dumps. Print rules and lines as stable text. (dumpRules, dumpLines)
    • Label rules. One rule per read with its guards and operations for each store. (LabelRule, LabelField, LabelParse, FieldParse)
    • Field and notation tables. The fields of each machine kind and the notation of each store. (KIND_FIELDS, LABEL_PLACEHOLDERS, STORE_NOTATION)
    • Located issues. Issues with source spans and repair text. (LabelIssue, LabelIssueCode, LineIssueOrigin)
    • Transition lines. A parsed line with its endpoints and label. (TransitionLine, TransitionEnds, TransitionLineOptions)
    • Enumerations. Name the closed sets of strings that the types and the wire data of the package use. (FieldKind)