Options
All
  • Public
  • Public/Protected
  • All
Menu

Module \mmir-tooling\src\grammar

Index

Type aliases

AsyncPendingInfo

AsyncPendingInfo: { jison: number; jscc: number; pegjs: number; reset: any }

Type declaration

Variables

Const asyncSupport

asyncSupport: any = asyncSupportUtil.isAsyncSupported()

Const log

log: any = logUtils.log

Const log

log: any = logUtils.log

pendingAsyncGrammars

pendingAsyncGrammars: AsyncPendingInfo | undefined

Const semantic

semantic: SemanticInterpreter = (mmir as MmirModule).require('mmirf/semanticInterpreter')

Const warn

warn: any = logUtils.warn

Functions

addFromOptions

compile

  • compile a JSON grammar into an executable JS grammar

    Parameters

    • content: string

      the JSON grammar as string

    • grammarFile: string

      the path of the JSON grammar (for debugging/error information)

    • options: GrammarCompilerOptions

      the GrammarLoadOptions with property mapping (list of GrammarOptions)

    • callback: CompilerCallback

      the callback when grammar compilation has been completed: callback(error | null, compiledGrammar, map, meta)

    • _map: any
    • _meta: any

    Returns void

contains

  • contains(grammarList: GrammarEntry[], id: string): boolean

createPendingAsyncGrammarsInfo

getEngine

initPendingAsyncGrammarInfo

isApplyRuntimeConfigOption

  • isApplyRuntimeConfigOption(options: GrammarOptions, optionId: string | null, invalidIgnoreValue: boolean | null, descRuntimeSetting: string): boolean
  • HELPER check, if runtime-configuration setting should/can be applied to GrammarOption

    Prints warning, in case setting can/should not be applied.

    Parameters

    • options: GrammarOptions

      the GrammarOption, either the root GrammarOptions, or a GrammarOptions.grammar[id] object

    • optionId: string | null

      the ID, if options is a GrammarOptions.grammar[id] object

    • invalidIgnoreValue: boolean | null

      if NULL, do no check, otherwise the invalid value for GrammarOption.ignore, i.e. in which case the runtime setting can NOT be applied

    • descRuntimeSetting: string

      description for the runtime setting, for print the warning-message in case the runtime setting cannot be applied

    Returns boolean

    whether or not the runtime setting can/should be applied

isAsyncCompile

isAsyncGramarExecEntry

parseRuntimeConfigurationForOptions

readDir

toAliasId

toAliasPath

updatePendingAsyncGrammarFinished

updatePendingAsyncGrammarStarted

  • updatePendingAsyncGrammarStarted(engine: GrammarEngineType, isAsync: boolean): void

Generated using TypeDoc