protected override void ModifyGrammar(Grammar g) { var partialGrammar = GrammarParser.ReadGrammarBNF("<string_const> ::= \"'ay'\" | \"'aeiou'\""); g.Combine(partialGrammar); partialGrammar = GrammarParser.ReadGrammarBNF("<string_literal> ::= 'a' | 'e' | 'i' | 'o' | 'u'"); g.Combine(partialGrammar); }
protected override void ModifyGrammar(Grammar g) { g.Rules.Remove("<string_literal>"); g.Rules.Remove("<string_const_part>"); g.Rules.Remove("<string_const>"); var partialGrammar = GrammarParser.ReadGrammarBNF("<string_const> ::= \"'\"<string_literal>\"'\"" + Environment.NewLine + "<string_literal> ::= 'A' | 'B' | 'C' | 'D' | 'F'"); g.Combine(partialGrammar); }
protected override void ModifyGrammar(Grammar g) { var partialGrammar = GrammarParser.ReadGrammarBNF("<list_int_var> ::= 'scrabblescore'"); g.Combine(partialGrammar); }
protected override void ModifyGrammar(Grammar g) { var partialGrammar = GrammarParser.ReadGrammarBNF("<string_const> ::= \"'small'\" | \"'large'\""); g.Combine(partialGrammar); }