[[cygwin]]
[[JHIPSTER一覧]]

Class Parser
deprecated
Soft deprecated, CstParser or EmbeddedActionsParser instead.
[[Chevrotain一覧]]

CstParser
EmbeddedActionsParser
Hierarchy
BaseParser
Parser
Index
Constructors
constructor
Properties
errors
input
Methods
AT_LEAST_ONE
AT_LEAST_ONE_SEP
BACKTRACK
CONSUME
LA
MANY
MANY_SEP
OPTION
OR
OVERRIDE_RULE
RULE
SKIP_TOKEN
SUBRULE
canTokenTypeBeInsertedInRecovery
computeContentAssist
getBaseCstVisitorConstructor
getBaseCstVisitorConstructorWithDefaults
getGAstProductions
getNextPossibleTokenTypes
getSerializedGastProductions
getTokenToInsert
performSelfAnalysis
reset
performSelfAnalysis
Constructors
constructor
new Parser(tokenVocabulary: TokenVocabulary, config?: IParserConfig): Parser
Inherited from BaseParser.constructor
*** 目次 [#of58cd7c]

Defined in api.d.ts:15
It is recommended to reuse the same Parser instance by passing an empty array to the input argument and only later setting the input by using the input property. See: http://sap.github.io/chevrotain/docs/FAQ.html#major-performance-benefits
#contents

Parameters
tokenVocabulary: TokenVocabulary
A data structure containing all the Tokens used by the Parser.
** はじめに、 [#fb73c2e7]
このドキュメントは、JHIPSTERという、Javaコードジェネレータの定義JDLを魔改造するための知識を得るため、英語が苦手な人が、頑張って、グーグル翻訳をペタリと張り付け、体裁おを整えてみたものです。

Optional config: IParserConfig
The Parser's configuration.
*** 原文はこちら [#wb2b24b1]
https://sap.github.io/chevrotain/documentation/4_8_1/classes/parser.html

Returns Parser
Properties
errors
errors: IRecognitionException[]
Inherited from BaseParser.errors
https://chevrotain.io/docs/

Defined in api.d.ts:28
input
input: IToken[]
Inherited from BaseParser.input

Defined in api.d.ts:806
Methods
AT_LEAST_ONE
AT_LEAST_ONE(actionORMethodDef: GrammarAction<any> | DSLMethodOptsWithErr<any>): void
Inherited from BaseParser.AT_LEAST_ONE

Defined in api.d.ts:616
Convenience method, same as MANY but the repetition is of one or more. failing to match at least one repetition will result in a parsing error and cause a parsing error.
* メソッド [#dbc12162]

see
** AT LEAST ONE [#a015cda6]
 AT LEAST ONE ( actionORMethodDef :GrammarAction < any > | DSLMethodOptsWithErr < any > ):void

BaseParserから継承されます。少なくとも一つの

api.d.tsで定義:616

便利な方法は、MANYと同じですが、繰り返しは1回以上です。少なくとも1回の繰り返しに一致しないと、構文解析エラーが発生し、構文解析エラーが発生します。

*** 参考 [#of59ed26]
MANY

Parameters
actionORMethodDef: GrammarAction<any> | DSLMethodOptsWithErr<any>
The grammar action to optionally invoke multiple times or an "OPTIONS" object describing the grammar action and optional properties.
*** パラメーター [#pa6659a3]
 actionORMethodDef:GrammarAction < any > | DSLMethodOptsWithErr < any >
オプションで複数回呼び出す文法アクション、または文法アクションとオプションのプロパティを記述する "OPTIONS"オブジェクト。

Returns void
AT_LEAST_ONE_SEP
AT_LEAST_ONE_SEP(options: AtLeastOneSepMethodOpts<any>): void
Inherited from BaseParser.AT_LEAST_ONE_SEP
*** 戻り値 [#zf041f02]
void

Defined in api.d.ts:705
Convenience method, same as MANY_SEP but the repetition is of one or more. failing to match at least one repetition will result in a parsing error and cause the parser to attempt error recovery.
* AT_LEAST_ONE_SEP [#u835e1dc]
 AT_LEAST_ONE(actionORMethodDef: GrammarAction<any> | DSLMethodOptsWithErr<any>): void

Note that an additional optional property ERR_MSG can be used to provide custom error messages.
BaseParserから継承されます。AT_LEAST_ONE_SEP

see
api.d.tsで定義されています:705

便利な方法、MANY_SEPと同じですが、繰り返しは1回以上です。少なくとも1回の繰り返しに一致しないと、構文解析エラーが発生し、パーサーはエラー回復を試みます。

追加のオプションプロパティERR_MSGを使用してカスタムエラーメッセージを提供できることに注意してください。

*** 参照 [#mfb0dd95]
MANY_SEP

Parameters
options: AtLeastOneSepMethodOpts<any>
An object defining the grammar of each iteration and the separator between iterations
*** パラメーター [#sf3e5305]
オプション:
 AtLeastOneSepMethodOpts<any>

Returns void
BACKTRACK
BACKTRACK<T>(grammarRule: function, args?: any[]): function
Inherited from BaseParser.BACKTRACK
各反復の文法と反復間の区切り文字を定義するオブジェクト

Defined in api.d.ts:63
Type parameters
T
Parameters
grammarRule: function
The rule to try and parse in backtracking mode.
voidを返します

(...args: any[]): T
Parameters
Rest ...args: any[]
Returns T
Optional args: any[]
argumens to be passed to the grammar rule execution
** BACKTRACK [#qf37fc9d]
 BACKTRACK<T>(grammarRule: function, args?: any[]): function

Returns function
a lookahead function that will try to parse the given grammarRule and will return true if succeed.
BaseParserから継承されます。バックトラック

(): boolean
Returns boolean
CONSUME
CONSUME(tokType: TokenType, options?: ConsumeMethodOpts): IToken
Inherited from BaseParser.CONSUME
api.d.tsで定義されている:63

Defined in api.d.ts:99
A Parsing DSL method use to consume a single Token. In EBNF terms this is equivalent to a Terminal.
*** 型パラメータ [#kb590b43]
- T
*** パラメーター [#iee2b75c]
grammarRule:関数
バックトラックモードで試行して解析するための規則。

A Token will be consumed, IFF the next token in the token vector matches . otherwise the parser may attempt to perform error recovery (if enabled).
(... args :any [] ):T
パラメーター
休憩 ... args:any []
Tを返します
オプションの引数:any []
文法規則の実行に渡される引数

The index in the method name indicates the unique occurrence of a terminal consumption inside a the top level rule. What this means is that if a terminal appears more than once in a single rule, each appearance must have a different index.
関数を返します
与えられたgrammarRuleを解析しようとし、成功すればtrueを返す先読み関数

For example:
():ブール値
ブール値を返します


** CONSUME [#f93f9ecc]

 CONSUME(tokType: TokenType, options?: ConsumeMethodOpts): IToken

BaseParserから継承されます。消耗品

api.d.tsで定義されています:99

単一のトークンを消費するために使用する構文解析DSLメソッド。EBNFの用語では、これは端末と同等です。

トークンが消費され、トークンベクトル内の次のトークンが一致するとIFF 。そうでなければ、パーサーはエラー回復を実行しようと試みるかもしれません(可能にされているなら)。

メソッド名のインデックスは、最上位ルール内での端末消費の一意の発生を示します。これが意味するのは、端末が単一のルール内に複数回現れる場合、各外観は異なるインデックスを持たなければならないということです。

*** 例: [#s3541b26]

  this.RULE("qualifiedName", () => {
  this.CONSUME1(Identifier);
    this.MANY(() => {
      this.CONSUME1(Dot);
      // here we use CONSUME2 because the terminal
      // 'Identifier' has already appeared previously in the
      // the rule 'parseQualifiedName'
      this.CONSUME2(Identifier);
    });
  })
See more details on the unique suffixes requirement.
Parameters
tokType: TokenType
The Type of the token to be consumed.
固有の接尾部の要件に関する詳細を参照してください。
パラメーター
tokType:TokenType
消費されるトークンの種類。

Optional options: ConsumeMethodOpts
optional properties to modify the behavior of CONSUME.
オプションのオプション:ConsumeMethodOpts
CONSUMEの動作を変更するためのオプションのプロパティ。

Returns IToken
LA
LA(howMuch: number): IToken
Inherited from BaseParser.LA
ITokenを返します。

Defined in api.d.ts:810
Parameters
howMuch: number
Returns IToken
MANY
MANY(actionORMethodDef: GrammarAction<any> | DSLMethodOpts<any>): void
Inherited from BaseParser.MANY

Defined in api.d.ts:442
Parsing DSL method, that indicates a repetition of zero or more. This is equivalent to EBNF repetition {...}.
** LA [#t877cc75]
 LA ( howMuch :number ):IToken
BaseParserから継承されます。LA

Note that there are two syntax forms:
api.d.tsで定義:810

Passing the grammar action directly:
*** パラメーター [#x1ccc807]
howMuch:数
ITokenを返します。

** MANY [#g47aa4e6]
 MANY ( actionORMethodDef :GrammarAction < any > | DSLMethodOpts < any > ):void

BaseParserから継承されます。たくさんの

api.d.tsで定義:442

DSLメソッドの解析。ゼロ以上の繰り返しを示します。これはEBNFの繰り返し{...}と同じです。

2つの構文形式があることに注意してください。

文法アクションを直接渡す

  this.MANY(() => {
    this.CONSUME(Comma)
    this.CONSUME(Digit)
   })
using an "options" object:
"options"オブジェクトを使う:

  this.MANY({
    GATE: predicateFunc,
    DEF: () => {
           this.CONSUME(Comma)
           this.CONSUME(Digit)
         }
  });
The optional 'GATE' property in "options" object form can be used to add constraints to invoking the grammar action.
"options"オブジェクト形式のオプションの 'GATE'プロパティを使用して、文法アクションを呼び出すための制約を追加することができます。

As in CONSUME the index in the method name indicates the occurrence of the repetition production in it's top rule.
CONSUMEと同様に、メソッド名のインデックスは、その最上位ルールでの繰り返し生成の発生を示します。

Parameters
actionORMethodDef: GrammarAction<any> | DSLMethodOpts<any>
The grammar action to optionally invoke multiple times or an "OPTIONS" object describing the grammar action and optional properties.
*** パラメーター [#gdbdd92a]
actionORMethodDef:GrammarAction < any > | DSLMethodOpts < any >
オプションで複数回呼び出す文法アクション、または文法アクションとオプションのプロパティを記述する "OPTIONS"オブジェクト。

Returns void
MANY_SEP
MANY_SEP(options: ManySepMethodOpts<any>): void
Inherited from BaseParser.MANY_SEP
voidを返します

Defined in api.d.ts:549
Parsing DSL method, that indicates a repetition of zero or more with a separator Token between the repetitions.
** MANY_SEP [#rce9cab7]
 MANY_SEP(options: ManySepMethodOpts<any>): void
BaseParserから継承されます。MANY_SEP

Example:
api.d.tsで定義:549
DSL方式の構文解析。繰り返しの間に区切り文字トークンを付けて、ゼロ以上の繰り返しを示します。

例:

    this.MANY_SEP({
        SEP:Comma,
        DEF: () => {
            this.CONSUME(Number};
            // ...
        })
Note that because this DSL method always requires more than one argument the options object is always required and it is not possible to use a shorter form like in the MANY DSL method.
このDSLメソッドは常に複数の引数を必要とするため、optionsオブジェクトは常に必須であり、MANY DSLメソッドのように短い形式を使用することはできません。

Note that for the purposes of deciding on whether or not another iteration exists Only a single Token is examined (The separator). Therefore if the grammar being implemented is so "crazy" to require multiple tokens to identify an item separator please use the more basic DSL methods to implement it.
別の反復が存在するかどうかを判断する目的で、単一のトークンのみが調べられます(区切り文字)。したがって、実装されている文法が項目区切り文字を識別するために複数のトークンを必要とするほど「クレイジー」である場合は、より基本的なDSLメソッドを使用してそれを実装してください。

As in CONSUME the index in the method name indicates the occurrence of the repetition production in it's top rule.
CONSUMEと同様に、メソッド名のインデックスは、その最上位ルールでの繰り返し生成の発生を示します。

Note that due to current limitations in the implementation the "SEP" property must appear before the "DEF" property.
現在の実装の制限により、 "SEP"プロパティは "DEF"プロパティの前に配置する必要があります。

Parameters
options: ManySepMethodOpts<any>
An object defining the grammar of each iteration and the separator between iterations
パラメーター
オプション:ManySepMethodOpts < any >
各反復の文法と反復間の区切り文字を定義するオブジェクト

Returns void
OPTION
OPTION<OUT>(actionORMethodDef: GrammarAction<OUT> | DSLMethodOpts<OUT>): OUT
Inherited from BaseParser.OPTION
voidを返します

Defined in api.d.ts:216
Parsing DSL Method that Indicates an Optional production. in EBNF notation this is equivalent to: "[...]".
** OPTION [#kb13ec3d]
 OPTION <OUT> ( actionORMethodDef :GrammarAction < OUT > | DSLMethodOpts < OUT > ):OUT
BaseParserから継承されます。オプション

Note that there are two syntax forms:
api.d.tsで定義されている:216
オプションのプロダクションを示すDSL解析メソッド。EBNF表記では、これは "[...]"と同等です。

Passing the grammar action directly:
2つの構文形式があることに注意してください。

文法アクションを直接渡す

  this.OPTION(() => {
    this.CONSUME(Digit)}
  );
using an "options" object:
"options"オブジェクトを使う:

  this.OPTION({
    GATE:predicateFunc,
    DEF: () => {
      this.CONSUME(Digit)
  }});
The optional 'GATE' property in "options" object form can be used to add constraints to invoking the grammar action.
"options"オブジェクト形式のオプションの 'GATE'プロパティを使用して、文法アクションを呼び出すための制約を追加することができます。

As in CONSUME the index in the method name indicates the occurrence of the optional production in it's top rule.
CONSUMEと同様に、メソッド名のインデックスは、最上位規則の中でオプションのプロダクションの出現を示します。

Type parameters
OUT
Parameters
actionORMethodDef: GrammarAction<OUT> | DSLMethodOpts<OUT>
The grammar action to optionally invoke once or an "OPTIONS" object describing the grammar action and optional properties.
型パラメータ
でる
パラメーター
actionORMethodDef:GrammarAction < OUT > | DSLMethodOpts < OUT >
オプションで1回呼び出す文法アクション、または文法アクションとオプションのプロパティを記述する "OPTIONS"オブジェクト。

Returns OUT
OR
OR(altsOrOpts: IAnyOrAlt[] | OrMethodOpts): any
Inherited from BaseParser.OR
OUTを返します

Defined in api.d.ts:352
Parsing DSL method that indicates a choice between a set of alternatives must be made. This is equivalent to an EBNF alternation (A | B | C | D ...), except that the alternatives are ordered like in a PEG grammar. This means that the first matching alternative is always chosen.
** OR [#ae663ea2]
 OR ( altsOrOpts :IAnyOrAlt [] | OrMethodOpts ):any
BaseParserから継承されます。または

There are several forms for the inner alternatives array:
api.d.tsで定義:352

Passing alternatives array directly:
一連の選択肢の中から選択を示す構文解析DSLメソッドを作成する必要があります。これは、選択肢がPEG文法のように順序付けられていることを除いて、EBNF交替(A | B | C | D ...)と同等です。これは、最初に一致した選択肢が常に選択されることを意味します。

内部の代替配列にはいくつかの形式があります。

代替配列を直接渡す:

  this.OR([
    { ALT:() => { this.CONSUME(One) }},
    { ALT:() => { this.CONSUME(Two) }},
    { ALT:() => { this.CONSUME(Three) }}
  ])
Passing alternative array directly with predicates (GATE):
述語(GATE)を使って代替配列を直接渡す:

  this.OR([
    { GATE: predicateFunc1, ALT:() => { this.CONSUME(One) }},
    { GATE: predicateFuncX, ALT:() => { this.CONSUME(Two) }},
    { GATE: predicateFuncX, ALT:() => { this.CONSUME(Three) }}
  ])
These syntax forms can also be mixed:
これらの構文形式は混在させることもできます。

  this.OR([
    {
      GATE: predicateFunc1,
      ALT:() => { this.CONSUME(One) }
    },
    { ALT:() => { this.CONSUME(Two) }},
    { ALT:() => { this.CONSUME(Three) }}
  ])
Additionally an "options" object may be used:
さらに「オプション」オブジェクトを使用することができます。

  this.OR({
    DEF:[
      { ALT:() => { this.CONSUME(One) }},
      { ALT:() => { this.CONSUME(Two) }},
      { ALT:() => { this.CONSUME(Three) }}
    ],
    // OPTIONAL property
    ERR_MSG: "A Number"
  })
The 'predicateFuncX' in the long form can be used to add constraints to choosing the alternative.
長い形式の「predicateFuncX」は、選択肢の選択に制約を追加するために使用できます。

As in CONSUME the index in the method name indicates the occurrence of the alternation production in it's top rule.
CONSUMEと同様に、メソッド名のインデックスは、その最上位ルールでの代替生産のオカレンスを示します。

Parameters
altsOrOpts: IAnyOrAlt[] | OrMethodOpts
A set of alternatives or an "OPTIONS" object describing the alternatives and optional properties.
パラメーター
altsOrOpts:IAnyOrAlt [] | OrMethodOpts
選択肢のセット、または選択肢とオプションのプロパティを記述する "OPTIONS"オブジェクト。

Returns any
The result of invoking the chosen alternative.
anyを返します
選択された選択肢を呼び出した結果。

OVERRIDE_RULE
OVERRIDE_RULE<T>(name: string, impl: function, config?: IRuleConfig<T>): function
Defined in api.d.ts:844
Same as Parser.RULE, but should only be used in "extending" grammars to override rules/productions from the super grammar. See Parser Inheritance Example.
** OVERRIDE_RULE [#q2abbd1e]
 OVERRIDE_RULE<T>(name: string, impl: function, config?: IRuleConfig<T>): function
api.d.tsで定義:844

Type parameters
Parser.RULEと同じですが、スーパー文法からの規則/生成を無効にするために文法を「拡張する」際にのみ使用されるべきです。パーサー継承の例を参照してください。

*** 型パラメータ [#r8d80577]
- T

*** パラメーター [#a8021880]
- 名前:文字列
- 暗黙:関数

(... implArgs :any [] ):T
*** パラメーター [#sc288c04]
Rest  ... implArgs:any []
Tを返します
オプションの設定:IRuleConfig < T >
関数を返します
( idxInCallingRule ?:number、... args :any [] ):T | どれか
パラメーター
オプションの idxInCallingRule:number
休憩 ... args:any []
Tを 返します。 どれか

** RULE [#f0003e18]
 RULE<T>(name: string, implementation: function, config?: IRuleConfig<T>): function
api.d.tsで定義:833

*** 型パラメータ [#nea570c0]
T
Parameters
name: string
impl: function
(...implArgs: any[]): T
Parameters
Rest ...implArgs: any[]
Returns T
Optional config: IRuleConfig<T>
Returns function
(idxInCallingRule?: number, ...args: any[]): T | any
Parameters
Optional idxInCallingRule: number
Rest ...args: any[]
Returns T | any
RULE
RULE<T>(name: string, implementation: function, config?: IRuleConfig<T>): function
Defined in api.d.ts:833
Type parameters
T
Parameters
name: string
The name of the rule.

implementation: function
The implementation of the rule.
*** パラメーター [#q47a59eb]
- 名前:文字列
- ルールの名前

(...implArgs: any[]): T
Parameters
Rest ...implArgs: any[]
Returns T
Optional config: IRuleConfig<T>
Returns function
The parsing rule which is the production implementation wrapped with the parsing logic that handles
実装:機能
ルールの実装

(... implArgs :any [] ):T
*** パラメーター [#m9dd5240]
Rest  ... implArgs:any []

Tを返します

オプションの設定:IRuleConfig < T >
関数を返します
を処理する解析ロジックでラップされた本番用実装である解析ルール
              Parser state / error recovery&reporting/ ...
(idxInCallingRule?: number, ...args: any[]): T | any
Parameters
Optional idxInCallingRule: number
Rest ...args: any[]
Returns T | any
SKIP_TOKEN
SKIP_TOKEN(): IToken
Inherited from BaseParser.SKIP_TOKEN
( idxInCallingRule ?:number、... args :any [] ):T | どれか
*** パラメーター [#q6479335]
オプションの idxInCallingRule:number
休憩 ... args:any []
Tを 返します。 どれか

Defined in api.d.ts:808
Returns IToken
SUBRULE
SUBRULE<T>(ruleToCall: function, options?: SubruleMethodOpts): T
Defined in api.d.ts:870
The Parsing DSL Method is used by one rule to call another. It is equivalent to a non-Terminal in EBNF notation.
** SKIP_TOKEN [#g5fb4759]
 SKIP_ TOKEN ():IToken
BaseParserから継承されます。SKIP_TOKEN

This may seem redundant as it does not actually do much. However using it is mandatory for all sub rule invocations.
api.d.tsで定義されています:808

Calling another rule without wrapping in SUBRULE(...) will cause errors/mistakes in the Parser's self analysis phase, which will lead to errors in error recovery/automatic lookahead calculation and any other functionality relying on the Parser's self analysis output.
ITokenを返します。

As in CONSUME the index in the method name indicates the occurrence of the sub rule invocation in its rule.
** SUBRULE [#o3c7ad2f]
 SUBRULE <T> ( ruleToCall :機能、オプション?:SubruleMethodOpts ):T

Type parameters
T
Parameters
ruleToCall: function
The rule to invoke.
api.d.tsで定義:870

(idx: number): T
Parameters
idx: number
Returns T
Optional options: SubruleMethodOpts
optional properties to modify the behavior of SUBRULE.
構文解析DSLメソッドは、あるルールで別のルールを呼び出すために使用されます。これはEBNF表記法では非終端記号と同等です。

Returns T
The result of invoking ruleToCall.
実際にはあまり効果がないので、これは冗長に見えるかもしれません。ただし、それを使用することは、すべてのサブ規則呼び出しに必須です。

canTokenTypeBeInsertedInRecovery
canTokenTypeBeInsertedInRecovery(tokType: TokenType): boolean
Inherited from BaseParser.canTokenTypeBeInsertedInRecovery
SUBRULE(...)で折り返さずに別のルールを呼び出すと、Parserの自己分析フェーズでエラー/ミスが発生し、エラー回復/自動先読み計算およびParserの自己分析出力に依存するその他の機能にエラーが発生します。

Defined in api.d.ts:795
By default all tokens type may be inserted. This behavior may be overridden in inheriting Recognizers for example: One may decide that only punctuation tokens may be inserted automatically as they have no additional semantic value. (A mandatory semicolon has no additional semantic meaning, but an Integer may have additional meaning depending on its int value and context (Inserting an integer 0 in cardinality: "[1..]" will cause semantic issues as the max of the cardinality will be greater than the min value (and this is a false error!).
CONSUMEと同様に、メソッド名のインデックスは、そのルール内のサブルール呼び出しの発生を示します。

Parameters
tokType: TokenType
Returns boolean
computeContentAssist
computeContentAssist(startRuleName: string, precedingInput: IToken[]): ISyntacticContentAssistPath[]
Inherited from BaseParser.computeContentAssist
*** 型パラメータ [#v2096200]
- T
*** パラメーター [#aa1f9e22]
ruleToCall:関数
呼び出す規則。

Defined in api.d.ts:52
Parameters
startRuleName: string
precedingInput: IToken[]
The token vector up to (not including) the content assist point
( idx :number ):T
パラメーター
idx:番号
Tを返します
オプションのオプション:SubruleMethodOpts
SUBRULEの動作を変更するためのオプションのプロパティ。

Returns ISyntacticContentAssistPath[]
getBaseCstVisitorConstructor
getBaseCstVisitorConstructor(): object
Inherited from BaseParser.getBaseCstVisitorConstructor
Tを返します
ruleToCallを呼び出した結果。

Defined in api.d.ts:36
Returns object
constructor: function
new __type(...args: any[]): ICstVisitor<any, any>
Defined in api.d.ts:36
Parameters
Rest ...args: any[]
Returns ICstVisitor<any, any>
getBaseCstVisitorConstructorWithDefaults
getBaseCstVisitorConstructorWithDefaults(): object
Inherited from BaseParser.getBaseCstVisitorConstructorWithDefaults
** canTokenTypeBeInsertedInRecovery [#m82093d7]
 canTokenTypeBeInsertedInRecovery(tokType: TokenType): boolean

Defined in api.d.ts:40
Returns object
constructor: function
new __type(...args: any[]): ICstVisitor<any, any>
Defined in api.d.ts:40
Parameters
Rest ...args: any[]
Returns ICstVisitor<any, any>
getGAstProductions
getGAstProductions(): HashTable<Rule>
Inherited from BaseParser.getGAstProductions
BaseParserから継承されます。canTokenTypeBeInsertedInRecovery

Defined in api.d.ts:44
Returns HashTable<Rule>
getNextPossibleTokenTypes
getNextPossibleTokenTypes(grammarPath: ITokenGrammarPath): TokenType[]
Inherited from BaseParser.getNextPossibleTokenTypes
api.d.tsで定義:795

Defined in api.d.ts:802
deprecated
will be removed in the future
Parameters
grammarPath: ITokenGrammarPath
Returns TokenType[]
getSerializedGastProductions
getSerializedGastProductions(): ISerializedGast[]
Inherited from BaseParser.getSerializedGastProductions
デフォルトではすべてのトークンタイプが挿入されます。この振る舞いは、例えば、認識機能を継承することでオーバーライドされるかもしれません:それらは追加の意味的価値を持たないので句読点トークンだけが自動的に挿入されるかもしれないと決めるかもしれません。(必須のセミコロンには追加の意味はありませんが、整数はそのint値とコンテキストによっては追加の意味がある場合があります(カーディナリティーに整数0を挿入すると、カーディナリティーの最大値は最小値よりも大きい値にします(これは誤ったエラーです!)。

Defined in api.d.ts:46
Returns ISerializedGast[]
getTokenToInsert
getTokenToInsert(tokType: TokenType): IToken
Inherited from BaseParser.getTokenToInsert
パラメーター
tokType:TokenType
ブール値を返します

Defined in api.d.ts:786
Returns an "imaginary" Token to insert when Single Token Insertion is done Override this if you require special behavior in your grammar. For example if an IntegerToken is required provide one with the image '0' so it would be valid syntactically.
** computeContentAssist [#oee71375]
 computeContentAssist(startRuleName: string, precedingInput: IToken[]): ISyntacticContentAssistPath[]

Parameters
tokType: TokenType
Returns IToken
performSelfAnalysis
performSelfAnalysis(): void
api.d.tsで定義されている:52

*** パラメーター [#b75628ef]
startRuleName:文字列
previousInput:IToken []
コンテンツアシストポイントまでの(含まれない)トークンベクトル

ISyntacticContentAssistPath []を返します。

** getBaseCstVisitorConstructor [#y7eec4fb]
 getBaseCstVisitorConstructor(): object
BaseParserから継承されます。getBaseCstVisitorConstructor

api.d.tsで定義されている:36

オブジェクトを返します
コンストラクタ:関数
new __type (... args :any [] ):ICstVisitor < any 、any >
api.d.tsで定義されている:36
パラメーター
休憩 ... args:any []
ICstVisitor < any 、any >を返します。

** getBaseCstVisitorConstructor [#db4047de]
 getBaseCstVisitorConstructor(): object

BaseParserから継承されます。getBaseCstVisitorConstructorWithDefaults

api.d.tsで定義されています:40

オブジェクトを返します
コンストラクタ:関数
new __type (... args :any [] ):ICstVisitor < any 、any >
api.d.tsで定義されています:40
パラメーター
休憩 ... args:any []
ICstVisitor < any 、any >を返します。

** getGAstProductions [#nefbca07]
 getGAstProductions(): HashTable<Rule>

BaseParserから継承されます。getGAstProductions

api.d.tsで定義されている:44

HashTable < Rule >を返します。

** getNextPossibleTokenTypes [#de54631a]
 getNextPossibleTokenTypes(grammarPath: ITokenGrammarPath): TokenType[]
BaseParserから継承されます。getNextPossibleTokenTypes

api.d.tsで定義されている:802

廃止予定

将来削除されます

*** パラメーター [#o23ec6d9]
grammarPath:ITokenGrammarPath

TokenType []を返します。

*** getSerializedGastProductions [#pf98a076]
 getSerializedGastProductions(): ISerializedGast[]

BaseParserから継承されます。getSerializedGastProductions

api.d.tsで定義されている:46

ISerializedGast []を返します。

** getTokenToInsert [#x5bd8e94]
 getTokenToInsert(tokType: TokenType): IToken

BaseParserから継承されます。getTokenToInsert

api.d.tsで定義:786

単一トークンの挿入が完了したときに挿入する「架空の」トークンを返します。文法で特別な動作が必要な場合はこれをオーバーライドします。例えば、IntegerTokenが必要な場合は、それが構文的に有効になるように、画像 '0'を持つものを提供してください。

*** パラメーター [#c25ffb56]
tokType:TokenType

ITokenを返します。


** performSelfAnalysis [#j4b7bae1]
 performSelfAnalysis(): void
Inherited from BaseParser.performSelfAnalysis

Defined in api.d.ts:15

This must be called at the end of a Parser constructor. See: http://sap.github.io/chevrotain/docs/tutorial/step2_parsing.html#under-the-hood

Returns void
reset
reset(): void

** reset [#aeac9b0c]
 reset(): void
Inherited from BaseParser.reset

Defined in api.d.ts:34

Resets the parser state, should be overridden for custom parsers which "carry" additional state. When overriding, remember to also invoke the super implementation!

Returns void
Static performSelfAnalysis
performSelfAnalysis(parserInstance: Parser): void

** Static performSelfAnalysis [#r597eec5]
 performSelfAnalysis(parserInstance: Parser): void
Defined in api.d.ts:822

deprecated

use Parser.performSelfAnalysis instance method instead.

Parameters
*** Parameters [#n12943d9]
parserInstance: Parser

Returns void

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS