import { type Grammar } from "https://deno.land/x/ohm_js@v17.1.0/index.d.ts";
An Ohm Grammar.
Methods
match(input: string, startRule?: string): MatchResult
Try to match input with this grammar, returning a MatchResult. If startRule is given, it specifies the rule on which to start matching. By default, the start rule is inherited from the supergrammar, or if there is no supergrammar specified, it is the first rule in this grammar.
matcher(): Matcher
Create a new Matcher object which supports incrementally matching this grammar against a changing input string.
Like match() except returns a trace object whose toString() returns a summary of each parsing step useful for debugging.
createSemantics(): Semantics
Create a new Semantics object for this Grammar.