// private static string BNF = @"<expr> ::= <val> <op> <val> | <val> | 1 | 2 // //<op> ::= + | - | * // //<val> ::= N_m | N_s"; public void Start(Options options) { CFGParser pars = new CFGParser(); var grammar = pars.readGrammarBNF(BNF); long possibilities = CalcPossibilitiesOfDepth(grammar, 2); System.Console.WriteLine(possibilities); }