CS Parser

Source: Main.js

_import Parser from './Parser.js'
import Rule from './Rule.js'

/**
 * The main API provider
 */
class Main {
	/**
	 * Creates a Parser instance
	 * @param {object|Rule} Rl The parsing rule definition
	 * @return {Parser} A new Parser instance
	 */
	create(Rl) {
		return new Parser(Rl)
	}
	/**
	 * Creates a Rule instance
	 * @param {object} Df The rule definition
	 * @return {Rule} A new Rule instance
	 */
	newRule(Df = null) {
		return new Rule(Df)
	}
}

export default new Main()

© 2018 Satoshi Soma

Licensed under the Apache License 2.0

Documentation generated by JSDoc 3.6.11 using Docolatte theme on Tue, 05 Sep 2023 18:54:56 GMT

    Hint: You don't need to click on the search box to input.

    Just start typing your words at any time to search for it.

    Classes

    • Composite
      • addChild
      • addChildren
      • traverse
      • verifyChild
    • Context
      • addChild
      • addChildren
      • cleanupChildren
      • clearBuffer
      • end
      • outline
      • parseChunk
      • populate
      • start
      • step
      • traverse
      • updateState
      • verifyChild
    • ContextManager
      • feed
    • Main
      • create
      • newRule
    • Parser
      • addRule
      • addRules
      • onComplete
      • onStart
      • parse
      • parseFile
    • ResultSet
      • add
      • traverse
    • Rule
      • addChild
      • addChildren
      • endsWith
      • express
      • fin
      • init
      • on
      • parse
      • startsWith
      • traverse
      • verifyChild