This class stores information about a configuration conflict.
Exemple #1
0
 protected internal ATNConfigSet(Antlr4.Runtime.Atn.ATNConfigSet set, bool @readonly)
 {
     if (@readonly)
     {
         this.mergedConfigs = null;
         this.unmerged      = null;
     }
     else
     {
         if (!set.IsReadOnly)
         {
             this.mergedConfigs = new Dictionary <long, ATNConfig>(set.mergedConfigs);
             this.unmerged      = new List <ATNConfig>(set.unmerged);
         }
         else
         {
             this.mergedConfigs = new Dictionary <long, ATNConfig>(set.configs.Count);
             this.unmerged      = new List <ATNConfig>();
         }
     }
     this.configs = new List <ATNConfig>(set.configs);
     this.dipsIntoOuterContext = set.dipsIntoOuterContext;
     this.hasSemanticContext   = set.hasSemanticContext;
     this.outermostConfigSet   = set.outermostConfigSet;
     if (@readonly || !set.IsReadOnly)
     {
         this.uniqueAlt    = set.uniqueAlt;
         this.conflictInfo = set.conflictInfo;
     }
 }
Exemple #2
0
 public virtual void Clear()
 {
     EnsureWritable();
     mergedConfigs.Clear();
     unmerged.Clear();
     configs.Clear();
     dipsIntoOuterContext = false;
     hasSemanticContext   = false;
     uniqueAlt            = ATN.InvalidAltNumber;
     conflictInfo         = null;
 }