From 18219624ffe5f39551d3813c2b8d58c38b77f0b4 Mon Sep 17 00:00:00 2001 From: Adrian Thurston Date: Thu, 14 Nov 2019 13:02:07 -0300 Subject: rust grammar: right-recursive statement list kills performance This adds to the argument for issue #74. --- grammar/rust.lm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'grammar') diff --git a/grammar/rust.lm b/grammar/rust.lm index aadeec08..5fbe957f 100644 --- a/grammar/rust.lm +++ b/grammar/rust.lm @@ -850,9 +850,13 @@ def statement | [use_declaration] | [macro_invocation_semi] +def statement_list + [statement_list statement] +| [statement] + def statements - [statement+] -| [statement+ expression_without_block] + [statement_list] +| [statement_list expression_without_block] | [expression_without_block] def loop_label -- cgit v1.2.1