Пример #1
0
 public GrammarModel()
 {
     _productions = new ObservableCollection<ProductionModel>();
     _productions.CollectionChanged += CollectionChanged;
     _reachibilityMatrix = new ReachibilityMatrix();
     _ignoreRules = new List<LexerRuleModel>();
 }
Пример #2
0
 public GrammarModel()
 {
     _productions = new ObservableCollection <ProductionModel>();
     _productions.CollectionChanged += CollectionChanged;
     _reachibilityMatrix             = new ReachibilityMatrix();
     _ignoreRules = new List <LexerRuleModel>();
 }
Пример #3
0
 private void AssertStartProductionExistsForStartSymbol(ReachibilityMatrix reachibilityMatrix)
 {
     if (!reachibilityMatrix.ProudctionExistsForSymbol(Start.LeftHandSide))
     {
         throw new Exception("no start production found for start symbol");
     }
 }
Пример #4
0
 private void AssertStartProductionexistsForStartSetting(ReachibilityMatrix reachibilityMatrix)
 {
     if (!reachibilityMatrix.ProudctionExistsForSymbol(
             new NonTerminalModel(StartSetting.Value)))
     {
         throw new Exception("no start production found for start symbol");
     }
 }
Пример #5
0
        public GrammarModel()
        {
            _reachibilityMatrix = new ReachibilityMatrix();

            _productions = new ObservableCollection <ProductionModel>();
            _productions.CollectionChanged += ProductionsCollectionChanged;
            _lexerRules = new List <LexerRuleModel>();

            _ignoreSettings = new List <IgnoreSettingModel>();
            _triviaSettings = new List <TriviaSettingModel>();
        }
Пример #6
0
 private void AssertStartProductionExistsForStartSymbol(ReachibilityMatrix reachibilityMatrix)
 {
     if (!reachibilityMatrix.ProudctionExistsForSymbol(Start.LeftHandSide))
         throw new Exception("no start production found for start symbol");
 }