public static Parser From(XDocument definition, Func <Lexer, Lexer> lexicalRules) => new Parser(lexicalRules(LexerLoader.From(definition)), ShiftTable.From(definition), ReduceTable.From(definition), GotoTable.From(definition));
public static Parser From(ParserDefinition definition) => new Parser( LexerLoader.From(definition), ShiftTable.From(definition.Table.Shift), ReduceTable.From(definition.Table.Reduce, definition.Grammar.Rules.ToArray()), GotoTable.From(definition.Table.Goto));