From e4bdadabeda8ff8dbae0376f9d1c25478b8c8821 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Thu, 15 Aug 2019 15:33:53 +0200 Subject: Use precedence climbing to parse expressions with operators This speeds up parsing around 30% --- dhall_generated_parser/src/dhall.pest.visibility | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'dhall_generated_parser/src/dhall.pest.visibility') diff --git a/dhall_generated_parser/src/dhall.pest.visibility b/dhall_generated_parser/src/dhall.pest.visibility index 6b4c974..6fa5e01 100644 --- a/dhall_generated_parser/src/dhall.pest.visibility +++ b/dhall_generated_parser/src/dhall.pest.visibility @@ -84,10 +84,10 @@ Location # Optional_fold # Optional_build # Text_show -# combine -# combine_types -# equivalent -# prefer +combine +combine_types +equivalent +prefer lambda forall arrow @@ -144,7 +144,7 @@ expression annotated_expression let_binding empty_list_literal -# operator_expression +operator_expression import_alt_expression or_expression plus_expression -- cgit v1.2.3 From 8eb169713ea1220f2d515391c08d34509d75ab73 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Fri, 16 Aug 2019 10:34:10 +0200 Subject: Match on rules in parser instead of on ParsedValues --- dhall_generated_parser/src/dhall.pest.visibility | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dhall_generated_parser/src/dhall.pest.visibility') diff --git a/dhall_generated_parser/src/dhall.pest.visibility b/dhall_generated_parser/src/dhall.pest.visibility index 6fa5e01..8235735 100644 --- a/dhall_generated_parser/src/dhall.pest.visibility +++ b/dhall_generated_parser/src/dhall.pest.visibility @@ -106,7 +106,7 @@ unquoted_path_component quoted_path_component path_component path -# local +local parent_path here_path home_path -- cgit v1.2.3 From c13a100c36c3b54d76dba2207aa75fa6736ebadc Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Mon, 26 Aug 2019 23:18:11 +0200 Subject: Remove rule aliasing --- dhall_generated_parser/src/dhall.pest.visibility | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dhall_generated_parser/src/dhall.pest.visibility') diff --git a/dhall_generated_parser/src/dhall.pest.visibility b/dhall_generated_parser/src/dhall.pest.visibility index 8235735..2ac7fe4 100644 --- a/dhall_generated_parser/src/dhall.pest.visibility +++ b/dhall_generated_parser/src/dhall.pest.visibility @@ -160,7 +160,7 @@ not_equal_expression equivalent_expression application_expression first_application_expression -# import_expression +import_expression selector_expression selector labels -- cgit v1.2.3 From 7b891800afa932660bc889e43c41c5d8f805cdc2 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 27 Aug 2019 13:42:53 +0200 Subject: Rework parse macros to avoid the large ParsedValue enum --- dhall_generated_parser/src/dhall.pest.visibility | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dhall_generated_parser/src/dhall.pest.visibility') diff --git a/dhall_generated_parser/src/dhall.pest.visibility b/dhall_generated_parser/src/dhall.pest.visibility index 2ac7fe4..dcebf45 100644 --- a/dhall_generated_parser/src/dhall.pest.visibility +++ b/dhall_generated_parser/src/dhall.pest.visibility @@ -141,7 +141,7 @@ hash import_hashed import expression -annotated_expression +# annotated_expression let_binding empty_list_literal operator_expression -- cgit v1.2.3