diff options
author | Adrian Thurston <thurston@colm.net> | 2019-11-14 13:02:07 -0300 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2019-11-14 13:02:07 -0300 |
commit | 18219624ffe5f39551d3813c2b8d58c38b77f0b4 (patch) | |
tree | f884947c2bd9e82d72207935afdb4001a01bfc4a /grammar | |
parent | 87ef9c35ab95e925db14c53225d75e653068ac13 (diff) | |
download | colm-18219624ffe5f39551d3813c2b8d58c38b77f0b4.tar.gz |
rust grammar: right-recursive statement list kills performance
This adds to the argument for issue #74.
Diffstat (limited to 'grammar')
-rw-r--r-- | grammar/rust.lm | 8 |
1 files changed, 6 insertions, 2 deletions
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 |