Beispiel #1
0
 public GherkinGrammar(NaturalLanguage language)
 {
     _instanceNo = ++_instanceCounter;
     InitGrammar(language);
     Debug.Print("{0} constructed.", this);
 }
Beispiel #2
0
        private void InitGrammar(NaturalLanguage language)
        {
            Language = language ?? NaturalLanguageFactory.DEFAULT_LANGUAGE;

            if (CurrentGrammar == null)
                new GherkinGrammar(Language); // Hack!

            DeclareKeyTerms();
            DeclareTerminals();
            DeclareNonTerminals();
            DefineRules();
            DefineKeywords();
        }