@configuredthings/rdp.js - v0.7.0
    Preparing search index...

    Function generateParser

    • Parse a grammar string and emit a TypeScript parser class.

      Parameters

      • source: string

        EBNF or ABNF grammar source text.

      • options: GeneratorOptions = {}

        Generator configuration.

      Returns string

      A TypeScript source string ready to write to a .ts file.

      If the grammar is malformed or left-recursive.

      const ts = generateParser(grammarSource, {
      format: 'ebnf',
      parserName: 'ArithmeticParser',
      })