Beispiel #1
0
 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));
Beispiel #2
0
 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));