Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface OrMethodOpts

Hierarchy

  • OrMethodOpts

Index

Properties

DEF

DEF: IOrAlt[]

The set of alternatives, See detailed description in Parser.OR

Optional ERR_MSG

ERR_MSG: string

A description for the alternatives used in error messages If none is provided, the error message will include the names of the expected Tokens sequences which may start each alternative.

Optional IGNORE_AMBIGUITIES

IGNORE_AMBIGUITIES: boolean

A Flag indicating that all ambiguities in this alternation should be ignored.

This flag should only be used in rare circumstances, As normally alternation ambiguities should be resolved in other ways:

  • Re-ordering the alternatives.
  • Re-factoring the grammar to extract common prefixes before alternation.
  • Using gates IOrAlt.GATE to implement custom lookahead logic.
  • Using the more granular IOrAlt.IGNORE_AMBIGUITIES on a specific alternative.

Optional MAX_LOOKAHEAD

MAX_LOOKAHEAD: number

Maximum number of "following tokens" which would be used to Choose between the alternatives.

By default this value is determined by the IParserConfig.maxLookahead value. A Higher value may be used for a specific DSL method to resolve ambiguities And a lower value may be used to resolve slow initialization times issues.

TODO: create full docs and link

Optional NAME

NAME: string

Generated using TypeDoc