summaryrefslogtreecommitdiff
path: root/dhall_parser/src
diff options
context:
space:
mode:
authorNadrieril2019-03-05 22:30:34 +0100
committerNadrieril2019-03-05 22:30:34 +0100
commite9f55783091fb1d5c07059be865d9d1fb02d3bfa (patch)
treebdb7d5b4ddbe971d17afd832f17fe2750b34377a /dhall_parser/src
parentf434e3fd016b30e2f8661f3b77feaaa3c67a3406 (diff)
Parse doubles
Diffstat (limited to 'dhall_parser/src')
-rw-r--r--dhall_parser/src/dhall.abnf10
-rw-r--r--dhall_parser/src/dhall.pest.visibility2
2 files changed, 10 insertions, 2 deletions
diff --git a/dhall_parser/src/dhall.abnf b/dhall_parser/src/dhall.abnf
index e311aa6..76af24b 100644
--- a/dhall_parser/src/dhall.abnf
+++ b/dhall_parser/src/dhall.abnf
@@ -279,6 +279,7 @@ Optional-raw = %x4f.70.74.69.6f.6e.61.6c
Text-raw = %x54.65.78.74
List-raw = %x4c.69.73.74
Infinity-raw = %x49.6e.66.69.6e.69.74.79
+NaN-raw = %x4e.61.4e
; Whitespaced rules for reserved words, to be used when matching expressions
if = if-raw nonempty-whitespace
@@ -648,7 +649,11 @@ literal-expression-raw =
/ integer-literal-raw
; "-Infinity"
- / "-" Infinity-raw
+ / minus-infinity-literal
+ ; "Infinity"
+ / plus-infinity-literal
+ ; "NaN"
+ / NaN-raw
; '"ABC"'
/ text-literal-raw
@@ -657,6 +662,9 @@ literal-expression-raw =
; "x@2"
/ identifier-raw
+minus-infinity-literal = "-" Infinity-raw
+plus-infinity-literal = Infinity-raw
+
; "{ foo = 1 , bar = True }"
; "{ foo : Integer, bar : Bool }"
record-type-or-literal =
diff --git a/dhall_parser/src/dhall.pest.visibility b/dhall_parser/src/dhall.pest.visibility
index b3a2660..08171b3 100644
--- a/dhall_parser/src/dhall.pest.visibility
+++ b/dhall_parser/src/dhall.pest.visibility
@@ -37,7 +37,7 @@ single_quote_literal
# Optional_raw
# Text_raw
# List_raw
-Infinity_raw
+# Infinity_raw
# if_
# then
# else_