diff options
author | Nadrieril | 2019-04-04 20:07:51 +0200 |
---|---|---|
committer | Nadrieril | 2019-04-04 20:24:59 +0200 |
commit | e05299d3d84dcbba79887f1dc5b42d689b714edc (patch) | |
tree | 91b0d136c0a9289855371eb8d5d0427f92ca0b03 /dhall_parser | |
parent | 2ef0951c45e3c9c87990ab7e334059aa9b21f540 (diff) |
Factor literal-expression back in
Diffstat (limited to 'dhall_parser')
-rw-r--r-- | dhall_parser/src/dhall.abnf | 16 | ||||
-rw-r--r-- | dhall_parser/src/dhall.pest.visibility | 3 |
2 files changed, 5 insertions, 14 deletions
diff --git a/dhall_parser/src/dhall.abnf b/dhall_parser/src/dhall.abnf index 15fd898..52d5b91 100644 --- a/dhall_parser/src/dhall.abnf +++ b/dhall_parser/src/dhall.abnf @@ -622,15 +622,6 @@ labels = "{" whsp [ any-label whsp *("," whsp any-label whsp) ] "}" primitive-expression =
- literal-expression
- / "{" whsp record-type-or-literal "}"
- / "<" whsp union-type-or-literal ">"
- / non-empty-list-literal
- / parenthesized-expression
-
-; NOTE: Backtrack when parsing the first three alternatives (i.e. the numeric
-; literals). This is because they share leading characters in common
-literal-expression =
; "2.0"
double-literal
@@ -646,9 +637,10 @@ literal-expression = ; "x"
; "x@2"
/ identifier
-
-minus-infinity-literal = "-" Infinity
-plus-infinity-literal = Infinity
+ / "{" whsp record-type-or-literal "}"
+ / "<" whsp union-type-or-literal ">"
+ / non-empty-list-literal
+ / parenthesized-expression
record-type-or-literal =
empty-record-literal
diff --git a/dhall_parser/src/dhall.pest.visibility b/dhall_parser/src/dhall.pest.visibility index ac3ea30..63a4179 100644 --- a/dhall_parser/src/dhall.pest.visibility +++ b/dhall_parser/src/dhall.pest.visibility @@ -142,8 +142,7 @@ application_expression selector_expression selector labels -# primitive_expression -literal_expression +primitive_expression # record_type_or_literal empty_record_literal empty_record_type |