コード例 #1
0
 public static Antlr4.Runtime.Atn.ATNConfig Create([NotNull] ATNState state, int alt, [Nullable] PredictionContext context, [NotNull] Antlr4.Runtime.Atn.SemanticContext semanticContext)
 {
     return(Create(state, alt, context, semanticContext, null));
 }
コード例 #2
0
 public static Antlr4.Runtime.Atn.ATNConfig Create([NotNull] ATNState state, int alt, [Nullable] PredictionContext context, [NotNull] Antlr4.Runtime.Atn.SemanticContext semanticContext, LexerActionExecutor lexerActionExecutor)
 {
     if (semanticContext != Antlr4.Runtime.Atn.SemanticContext.None)
     {
         if (lexerActionExecutor != null)
         {
             return(new ATNConfig.ActionSemanticContextATNConfig(lexerActionExecutor, semanticContext, state, alt, context, false));
         }
         else
         {
             return(new ATNConfig.SemanticContextATNConfig(semanticContext, state, alt, context));
         }
     }
     else
     {
         if (lexerActionExecutor != null)
         {
             return(new ATNConfig.ActionATNConfig(lexerActionExecutor, state, alt, context, false));
         }
         else
         {
             return(new Antlr4.Runtime.Atn.ATNConfig(state, alt, context));
         }
     }
 }
コード例 #3
0
 public SemanticContextATNConfig(Antlr4.Runtime.Atn.SemanticContext semanticContext, [NotNull] ATNConfig c, [NotNull] ATNState state, [Nullable] PredictionContext context)
     : base(c, state, context)
 {
     this.semanticContext = semanticContext;
 }
コード例 #4
0
        private Antlr4.Runtime.Atn.ATNConfig Transform([NotNull] ATNState state, [Nullable] PredictionContext context, [NotNull] Antlr4.Runtime.Atn.SemanticContext semanticContext, bool checkNonGreedy, LexerActionExecutor lexerActionExecutor)
        {
            bool passedThroughNonGreedy = checkNonGreedy && CheckNonGreedyDecision(this, state);

            if (semanticContext != Antlr4.Runtime.Atn.SemanticContext.None)
            {
                if (lexerActionExecutor != null || passedThroughNonGreedy)
                {
                    return(new ATNConfig.ActionSemanticContextATNConfig(lexerActionExecutor, semanticContext, this, state, context, passedThroughNonGreedy));
                }
                else
                {
                    return(new ATNConfig.SemanticContextATNConfig(semanticContext, this, state, context));
                }
            }
            else
            {
                if (lexerActionExecutor != null || passedThroughNonGreedy)
                {
                    return(new ATNConfig.ActionATNConfig(lexerActionExecutor, this, state, context, passedThroughNonGreedy));
                }
                else
                {
                    return(new Antlr4.Runtime.Atn.ATNConfig(this, state, context));
                }
            }
        }
コード例 #5
0
 public Antlr4.Runtime.Atn.ATNConfig Transform([NotNull] ATNState state, [NotNull] Antlr4.Runtime.Atn.SemanticContext semanticContext, bool checkNonGreedy)
 {
     return(Transform(state, this.context, semanticContext, checkNonGreedy, this.ActionExecutor));
 }
コード例 #6
0
 public SemanticContextATNConfig(Antlr4.Runtime.Atn.SemanticContext semanticContext, ATNConfig c, ATNState state, PredictionContext context)
     : base(c, state, context)
 {
     this.semanticContext = semanticContext;
 }
コード例 #7
0
ファイル: ATNConfig.cs プロジェクト: sharwell/antlr4cs
 public SemanticContextATNConfig(Antlr4.Runtime.Atn.SemanticContext semanticContext, ATNConfig c, ATNState state, PredictionContext context)
     : base(c, state, context)
 {
     this.semanticContext = semanticContext;
 }