Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IParserConfig

Hierarchy

  • IParserConfig

Index

Properties

Optional dynamicTokensEnabled

dynamicTokensEnabled: boolean

Enable This Flag to to support Dynamically defined Tokens. This will disable performance optimizations which cannot work if the whole Token vocabulary is not known During Parser initialization.

See runnable example

Optional errorMessageProvider

errorMessageProvider: IParserErrorMessageProvider

A custom error message provider. Can be used to override the default error messages. For example:

  • Translating the error messages to a different languages.
  • Changing the formatting.
  • Providing special error messages under certain conditions, e.g: missing semicolons.

Optional ignoredIssues

ignoredIssues: IgnoredParserIssues

Used to mark parser definition errors that should be ignored. For example:

   {
     myCustomRule : {
                     OR3 : true
                    },
     myOtherRule : {
                    OPTION1 : true,
                    OR4 : true
                   }
   }

Be careful when ignoring errors, they are usually there for a reason :).

Optional maxLookahead

maxLookahead: number

Maximum number of tokens the parser will use to choose between alternatives.

Optional nodeLocationTracking

nodeLocationTracking: nodeLocationTrackingOptions

Enable computation of CST nodes location. By default this is set to "none", meaning this feature is disabled. See: http://sap.github.io/chevrotain/docs/guide/concrete_syntax_tree.html#cstnode-location For more details.

Optional outputCst

outputCst: boolean
deprecated
  • extend either CstParser or EmbeddedActionsParser to control this flag instead
            - @see CstParser
            - @see EmbeddedActionsParser

Enable automatic Concrete Syntax Tree creation For in-depth docs on Concrete Syntax Trees:

Optional recoveryEnabled

recoveryEnabled: boolean

Is the error recovery / fault tolerance of the Chevrotain Parser enabled.

Optional serializedGrammar

serializedGrammar: ISerializedGast[]

Generated using TypeDoc