summaryrefslogtreecommitdiff
path: root/dhall_parser/src
diff options
context:
space:
mode:
authorNadrieril2019-03-06 23:35:39 +0100
committerNadrieril2019-03-06 23:35:39 +0100
commit54382cd107d1befd6015f8232716158a20db44a4 (patch)
tree81afc63e474ad58f384dde36550f9d50756c5217 /dhall_parser/src
parent39fc0af2548127a7c2ee1345d4ea63d473e0ab5a (diff)
Start parsing imports
Diffstat (limited to 'dhall_parser/src')
-rw-r--r--dhall_parser/src/dhall.abnf13
-rw-r--r--dhall_parser/src/dhall.pest.visibility2
2 files changed, 10 insertions, 5 deletions
diff --git a/dhall_parser/src/dhall.abnf b/dhall_parser/src/dhall.abnf
index 76af24b..d803770 100644
--- a/dhall_parser/src/dhall.abnf
+++ b/dhall_parser/src/dhall.abnf
@@ -384,15 +384,20 @@ path-component = "/" ( 1*path-character / %x22 1*quoted-path-character %x22 )
path = 1*path-component
local-raw =
- ".." path ; Relative path
- / "." path ; Relative path
- / "~" path ; Home-anchored path
+ parent-path
+ / here-path
+ / home-path
; NOTE: Backtrack if parsing this alternative fails
;
; This is because the first character of this alternative will be "/", but
; if the second character is "/" or "\" then this should have been parsed
; as an operator instead of a path
- / path ; Absolute path
+ / absolute-path
+
+parent-path = ".." path ; Relative path
+here-path = "." path ; Relative path
+home-path = "~" path ; Home-anchored path
+absolute-path = path ; Absolute path
; `http[s]` URI grammar based on RFC7230 and RFC 3986 with some differences
; noted below
diff --git a/dhall_parser/src/dhall.pest.visibility b/dhall_parser/src/dhall.pest.visibility
index 08171b3..f9c9d0b 100644
--- a/dhall_parser/src/dhall.pest.visibility
+++ b/dhall_parser/src/dhall.pest.visibility
@@ -92,7 +92,7 @@ identifier
# quoted_path_character
# path_component
path
-local_raw
+# local_raw
scheme
http_raw
authority