faster: Significant performance boost on large grammar
15s to 5s
This commit is contained in:
parent
6fa89a9757
commit
f656dbd8f3
2 changed files with 31 additions and 17 deletions
|
|
@ -419,7 +419,7 @@ grammar = {
|
|||
# dump_yacc(grammar)
|
||||
grammar, precedence = desugar(grammar, precedence)
|
||||
gen = parser_faster.GenerateLR1("File", grammar, precedence=precedence)
|
||||
table = gen.gen_table()
|
||||
print(parser_faster.format_table(gen, table))
|
||||
print()
|
||||
gen.gen_table()
|
||||
# print(parser_faster.format_table(gen, table))
|
||||
# print()
|
||||
# tree = parse(table, ["id", "+", "(", "id", "[", "id", "]", ")"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue