diff options
author | Adrian Thurston <thurston@colm.net> | 2019-11-14 09:52:23 -0300 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2019-11-14 12:53:39 -0300 |
commit | 87ef9c35ab95e925db14c53225d75e653068ac13 (patch) | |
tree | d9fdeca0c1f94f98c5ecbf33f628ce96b6a8f7e4 /grammar | |
parent | fd0b27e1de19cdfd65e90e1c58147959adc35222 (diff) | |
download | colm-87ef9c35ab95e925db14c53225d75e653068ac13.tar.gz |
rust grammar: removed an ambiguity that really slows down parsing
Ambiguity between [ a.b( c ) ] and [ a.b ] ( c ) was causing unnecessary
backtracking.
Diffstat (limited to 'grammar')
-rw-r--r-- | grammar/rust.lm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/grammar/rust.lm b/grammar/rust.lm index 0834ef98..aadeec08 100644 --- a/grammar/rust.lm +++ b/grammar/rust.lm @@ -719,8 +719,7 @@ def paths def func_index - [func_index `. path_expr_segment `( expr_list `,? `)] -| [func_index `. id] + [func_index `. path_expr_segment] | [func_index `. number] | [func_index `( expr_list `,? `)] | [func_index `[ expr_list `,? `]] |