summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dhall_parser/src/dhall.abnf96
-rw-r--r--dhall_parser/src/dhall.pest.visibility5
-rwxr-xr-xdo.pl168
3 files changed, 134 insertions, 135 deletions
diff --git a/dhall_parser/src/dhall.abnf b/dhall_parser/src/dhall.abnf
index 02edc84..025f53a 100644
--- a/dhall_parser/src/dhall.abnf
+++ b/dhall_parser/src/dhall.abnf
@@ -130,9 +130,9 @@ whitespace-chunk =
/ line-comment
/ block-comment
-whitespace = *whitespace-chunk
+whsp = *whitespace-chunk
-nonempty-whitespace = 1*whitespace-chunk
+whsp1 = 1*whitespace-chunk
; Uppercase or lowercase ASCII letter
ALPHA = %x41-5A / %x61-7A
@@ -318,7 +318,7 @@ integer-literal = ( "+" / "-" ) natural-literal
; The implementation should recognize reserved names for builtins and treat them as special
; values instead of variables.
-identifier = any-label [ whitespace "@" whitespace natural-literal ]
+identifier = any-label [ whsp "@" whsp natural-literal ]
; Printable characters other than " ()[]{}<>/\,"
;
@@ -445,7 +445,7 @@ sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
http =
http-raw
- [ whitespace using nonempty-whitespace (import-hashed / "(" whitespace import-hashed whitespace ")") ]
+ [ whsp using whsp1 (import-hashed / "(" whsp import-hashed whsp ")") ]
; Dhall supports unquoted environment variables that are Bash-compliant or
; quoted environment variables that are POSIX-compliant
@@ -515,12 +515,12 @@ import-type = missing / local / http / env
hash = %x73.68.61.32.35.36.3a 64HEXDIG ; "sha256:XXX...XXX"
-import-hashed = import-type [ whitespace hash ]
+import-hashed = import-type [ whsp hash ]
; "http://example.com"
; "./foo/bar"
; "env:FOO"
-import = import-hashed [ whitespace as nonempty-whitespace Text ]
+import = import-hashed [ whsp as whsp1 Text ]
; NOTE: Every rule past this point should only reference rules that end with
; whitespace. This ensures consistent handling of whitespace in the absence of
@@ -543,58 +543,58 @@ expression =
/ annotated-expression
; "\(x : a) -> b"
-lambda-expression = lambda whitespace "(" whitespace unreserved-label whitespace ":" nonempty-whitespace expression ")" whitespace arrow whitespace expression
+lambda-expression = lambda whsp "(" whsp unreserved-label whsp ":" whsp1 expression ")" whsp arrow whsp expression
; "if a then b else c"
-ifthenelse-expression = if nonempty-whitespace expression then nonempty-whitespace expression else nonempty-whitespace expression
+ifthenelse-expression = if whsp1 expression then whsp1 expression else whsp1 expression
; "let x : t = e1 in e2"
; "let x = e1 in e2"
; "let x = e1 let y = e2 in e3"
-let-expression = 1*let-binding in nonempty-whitespace expression
-let-binding = let nonempty-whitespace unreserved-label whitespace [ ":" nonempty-whitespace expression ] "=" whitespace expression
+let-expression = 1*let-binding in whsp1 expression
+let-binding = let whsp1 unreserved-label whsp [ ":" whsp1 expression ] "=" whsp expression
; "forall (x : a) -> b"
-forall-expression = forall whitespace "(" whitespace unreserved-label whitespace ":" nonempty-whitespace expression ")" whitespace arrow whitespace expression
+forall-expression = forall whsp "(" whsp unreserved-label whsp ":" whsp1 expression ")" whsp arrow whsp expression
; "a -> b"
-arrow-expression = operator-expression arrow whitespace expression
+arrow-expression = operator-expression arrow whsp expression
; "merge e1 e2 : t"
; "merge e1 e2"
-merge-expression = merge nonempty-whitespace import-expression whitespace import-expression whitespace [ ":" nonempty-whitespace application-expression ]
+merge-expression = merge whsp1 import-expression whsp import-expression whsp [ ":" whsp1 application-expression ]
; "[] : List t"
; "[] : Optional t"
; "[x] : Optional t"
-empty-list-or-optional = "[" whitespace (empty-collection / non-empty-optional)
-empty-collection = "]" whitespace ":" nonempty-whitespace (List whitespace / Optional whitespace) import-expression whitespace
-non-empty-optional = expression "]" whitespace ":" nonempty-whitespace Optional whitespace import-expression whitespace
+empty-list-or-optional = "[" whsp (empty-collection / non-empty-optional)
+empty-collection = "]" whsp ":" whsp1 (List whsp / Optional whsp) import-expression whsp
+non-empty-optional = expression "]" whsp ":" whsp1 Optional whsp import-expression whsp
; "x : t"
-annotated-expression = operator-expression [ ":" nonempty-whitespace expression ]
+annotated-expression = operator-expression [ ":" whsp1 expression ]
operator-expression = import-alt-expression
-import-alt-expression = or-expression *("?" nonempty-whitespace or-expression)
-or-expression = plus-expression *("||" whitespace plus-expression )
-plus-expression = text-append-expression *("+" nonempty-whitespace text-append-expression )
-text-append-expression = list-append-expression *("++" whitespace list-append-expression )
-list-append-expression = and-expression *("#" whitespace and-expression )
-and-expression = combine-expression *("&&" whitespace combine-expression )
-combine-expression = prefer-expression *(combine whitespace prefer-expression )
-prefer-expression = combine-types-expression *(prefer whitespace combine-types-expression)
-combine-types-expression = times-expression *(combine-types whitespace times-expression )
-times-expression = equal-expression *("*" whitespace equal-expression )
-equal-expression = not-equal-expression *("==" whitespace not-equal-expression )
-not-equal-expression = application-expression *("!=" whitespace application-expression )
+import-alt-expression = or-expression *("?" whsp1 or-expression)
+or-expression = plus-expression *("||" whsp plus-expression )
+plus-expression = text-append-expression *("+" whsp1 text-append-expression )
+text-append-expression = list-append-expression *("++" whsp list-append-expression )
+list-append-expression = and-expression *("#" whsp and-expression )
+and-expression = combine-expression *("&&" whsp combine-expression )
+combine-expression = prefer-expression *(combine whsp prefer-expression )
+prefer-expression = combine-types-expression *(prefer whsp combine-types-expression)
+combine-types-expression = times-expression *(combine-types whsp times-expression )
+times-expression = equal-expression *("*" whsp equal-expression )
+equal-expression = not-equal-expression *("==" whsp not-equal-expression )
+not-equal-expression = application-expression *("!=" whsp application-expression )
; Import expressions need to be separated by some whitespace, otherwise there
; would be ambiguity: `./ab` could be interpreted as "import the file `./ab`",
; or "apply the import `./a` to label `b`"
application-expression =
- import-expression *(nonempty-whitespace import-expression) whitespace
+ import-expression *(whsp1 import-expression) whsp
import-expression =
import
@@ -607,17 +607,17 @@ import-expression =
; can't tell from parsing just the period whether "foo." will become "foo.bar"
; (i.e. accessing field `bar` of the record `foo`) or `foo./bar` (i.e. applying
; the function `foo` to the relative path `./bar`)
-selector-expression = primitive-expression *(whitespace "." whitespace selector)
+selector-expression = primitive-expression *(whsp "." whsp selector)
selector = any-label / labels
-labels = "{" whitespace [ any-label whitespace *("," whitespace any-label whitespace) ] "}"
+labels = "{" whsp [ any-label whsp *("," whsp any-label whsp) ] "}"
primitive-expression =
literal-expression
- / "{" whitespace record-type-or-literal "}"
- / "<" whitespace union-type-or-literal ">"
+ / "{" whsp record-type-or-literal "}"
+ / "<" whsp union-type-or-literal ">"
/ non-empty-list-literal
/ parenthesized-expression
@@ -656,14 +656,14 @@ record-type-or-literal =
empty-record-literal
/ non-empty-record-type-or-literal
/ empty-record-type
-empty-record-literal = "=" whitespace
+empty-record-literal = "=" whsp
empty-record-type = ""
non-empty-record-type-or-literal =
- any-label whitespace (non-empty-record-literal / non-empty-record-type)
-non-empty-record-type = ":" nonempty-whitespace expression *("," whitespace record-type-entry)
-record-type-entry = any-label whitespace ":" nonempty-whitespace expression
-non-empty-record-literal = "=" whitespace expression *("," whitespace record-literal-entry)
-record-literal-entry = any-label whitespace "=" whitespace expression
+ any-label whsp (non-empty-record-literal / non-empty-record-type)
+non-empty-record-type = ":" whsp1 expression *("," whsp record-type-entry)
+record-type-entry = any-label whsp ":" whsp1 expression
+non-empty-record-literal = "=" whsp expression *("," whsp record-literal-entry)
+record-literal-entry = any-label whsp "=" whsp expression
; "< Foo : Integer | Bar : Bool >"
; "< Foo : Integer | Bar = True >"
@@ -672,21 +672,21 @@ union-type-or-literal =
/ empty-union-type
empty-union-type = ""
non-empty-union-type-or-literal =
- any-label whitespace
- ( "=" whitespace expression union-type-entries
- / ":" nonempty-whitespace expression [ "|" whitespace non-empty-union-type-or-literal ]
+ any-label whsp
+ ( "=" whsp expression union-type-entries
+ / ":" whsp1 expression [ "|" whsp non-empty-union-type-or-literal ]
)
-union-type-entries = *("|" whitespace union-type-entry)
-union-type-entry = any-label whitespace ":" nonempty-whitespace expression
+union-type-entries = *("|" whsp union-type-entry)
+union-type-entry = any-label whsp ":" whsp1 expression
; "[1, 2, 3]"
; `empty-list-or-optional` handles empty lists
-non-empty-list-literal = "[" whitespace expression *("," whitespace expression) "]"
+non-empty-list-literal = "[" whsp expression *("," whsp expression) "]"
; "( e )"
-parenthesized-expression = "(" whitespace expression ")"
+parenthesized-expression = "(" whsp expression ")"
; All expressions end with trailing whitespace. This just adds a final
; whitespace prefix for the top-level of the program
-complete-expression = whitespace expression
+complete-expression = whsp expression
diff --git a/dhall_parser/src/dhall.pest.visibility b/dhall_parser/src/dhall.pest.visibility
index ee5ea2b..e95cd32 100644
--- a/dhall_parser/src/dhall.pest.visibility
+++ b/dhall_parser/src/dhall.pest.visibility
@@ -7,9 +7,8 @@ end_of_line
# not_end_of_line
# line_comment
# whitespace_chunk
-# whitespace
-# whitespace_
-# nonempty_whitespace
+# whsp
+# whsp1
# ALPHA
# DIGIT
# HEXDIG
diff --git a/do.pl b/do.pl
index 276c399..53004af 100755
--- a/do.pl
+++ b/do.pl
@@ -1,94 +1,94 @@
#!/usr/bin/env -S perl -i -p
-# next if /^ *;/; s/\b(?<!-)if\b(?!-)/if-raw nonempty-whitespace/g;
-# next if /^ *;/; s/\b(?<!-)then\b(?!-)/then-raw nonempty-whitespace/g;
-# next if /^ *;/; s/\b(?<!-)else\b(?!-)/else-raw nonempty-whitespace/g;
-# next if /^ *;/; s/\b(?<!-)let\b(?!-)/let-raw nonempty-whitespace/g;
-# next if /^ *;/; s/\b(?<!-)in\b(?!-)/in-raw nonempty-whitespace/g;
-# next if /^ *;/; s/\b(?<!-)as\b(?!-)/as-raw nonempty-whitespace/g;
-# next if /^ *;/; s/\b(?<!-)using\b(?!-)/using-raw nonempty-whitespace/g;
-# next if /^ *;/; s/\b(?<!-)merge\b(?!-)/merge-raw nonempty-whitespace/g;
-# next if /^ *;/; s/\b(?<!-)Some\b(?!-)/Some-raw nonempty-whitespace/g;
+# next if /^ *;/; s/\b(?<!-)if\b(?!-)/if-raw whsp1/g;
+# next if /^ *;/; s/\b(?<!-)then\b(?!-)/then-raw whsp1/g;
+# next if /^ *;/; s/\b(?<!-)else\b(?!-)/else-raw whsp1/g;
+# next if /^ *;/; s/\b(?<!-)let\b(?!-)/let-raw whsp1/g;
+# next if /^ *;/; s/\b(?<!-)in\b(?!-)/in-raw whsp1/g;
+# next if /^ *;/; s/\b(?<!-)as\b(?!-)/as-raw whsp1/g;
+# next if /^ *;/; s/\b(?<!-)using\b(?!-)/using-raw whsp1/g;
+# next if /^ *;/; s/\b(?<!-)merge\b(?!-)/merge-raw whsp1/g;
+# next if /^ *;/; s/\b(?<!-)Some\b(?!-)/Some-raw whsp1/g;
-# next if /^ *;/; s/\b(?<!-)Optional\b(?!-)/Optional whitespace/g;
-# next if /^ *;/; s/\b(?<!-)Text\b(?!-)/Text whitespace/g;
-# next if /^ *;/; s/\b(?<!-)List\b(?!-)/List whitespace/g;
+# next if /^ *;/; s/\b(?<!-)Optional\b(?!-)/Optional whsp/g;
+# next if /^ *;/; s/\b(?<!-)Text\b(?!-)/Text whsp/g;
+# next if /^ *;/; s/\b(?<!-)List\b(?!-)/List whsp/g;
-# next if /^ *;/; s/\b(?<!-)or\b(?!-)/"||" whitespace/g;
-# next if /^ *;/; s/\b(?<!-)plus\b(?!-)/"+" nonempty-whitespace/g;
-# next if /^ *;/; s/\b(?<!-)text-append\b(?!-)/"++" whitespace/g;
-# next if /^ *;/; s/\b(?<!-)list-append\b(?!-)/"#" whitespace/g;
-# next if /^ *;/; s/\b(?<!-)and\b(?!-)/"&&" whitespace/g;
-# next if /^ *;/; s/\b(?<!-)times\b(?!-)/"*" whitespace/g;
-# next if /^ *;/; s/\b(?<!-)double-equal\b(?!-)/"==" whitespace/g;
-# next if /^ *;/; s/\b(?<!-)not-equal\b(?!-)/"!=" whitespace/g;
-# next if /^ *;/; s/\b(?<!-)equal\b(?!-)/"=" whitespace/g;
-# next if /^ *;/; s/\b(?<!-)dot\b(?!-)/"." whitespace/g;
-# next if /^ *;/; s/\b(?<!-)bar\b(?!-)/"|" whitespace/g;
-# next if /^ *;/; s/\b(?<!-)comma\b(?!-)/"," whitespace/g;
-# next if /^ *;/; s/\b(?<!-)at\b(?!-)/"@" whitespace/g;
-# next if /^ *;/; s/\b(?<!-)open-parens\b(?!-)/"(" whitespace/g;
-# next if /^ *;/; s/\b(?<!-)close-parens\b(?!-)/")" whitespace/g;
-# next if /^ *;/; s/\b(?<!-)open-brace\b(?!-)/"{" whitespace/g;
-# next if /^ *;/; s/\b(?<!-)close-brace\b(?!-)/"}" whitespace/g;
-# next if /^ *;/; s/\b(?<!-)open-bracket\b(?!-)/"[" whitespace/g;
-# next if /^ *;/; s/\b(?<!-)close-bracket\b(?!-)/"]" whitespace/g;
-# next if /^ *;/; s/\b(?<!-)open-angle\b(?!-)/"<" whitespace/g;
-# next if /^ *;/; s/\b(?<!-)close-angle\b(?!-)/">" whitespace/g;
-# next if /^ *;/; s/\b(?<!-)colon\b(?!-)/":" nonempty-whitespace/g;
-# next if /^ *;/; s/\b(?<!-)import-alt\b(?!-)/"?" nonempty-whitespace/g;
+# next if /^ *;/; s/\b(?<!-)or\b(?!-)/"||" whsp/g;
+# next if /^ *;/; s/\b(?<!-)plus\b(?!-)/"+" whsp1/g;
+# next if /^ *;/; s/\b(?<!-)text-append\b(?!-)/"++" whsp/g;
+# next if /^ *;/; s/\b(?<!-)list-append\b(?!-)/"#" whsp/g;
+# next if /^ *;/; s/\b(?<!-)and\b(?!-)/"&&" whsp/g;
+# next if /^ *;/; s/\b(?<!-)times\b(?!-)/"*" whsp/g;
+# next if /^ *;/; s/\b(?<!-)double-equal\b(?!-)/"==" whsp/g;
+# next if /^ *;/; s/\b(?<!-)not-equal\b(?!-)/"!=" whsp/g;
+# next if /^ *;/; s/\b(?<!-)equal\b(?!-)/"=" whsp/g;
+# next if /^ *;/; s/\b(?<!-)dot\b(?!-)/"." whsp/g;
+# next if /^ *;/; s/\b(?<!-)bar\b(?!-)/"|" whsp/g;
+# next if /^ *;/; s/\b(?<!-)comma\b(?!-)/"," whsp/g;
+# next if /^ *;/; s/\b(?<!-)at\b(?!-)/"@" whsp/g;
+# next if /^ *;/; s/\b(?<!-)open-parens\b(?!-)/"(" whsp/g;
+# next if /^ *;/; s/\b(?<!-)close-parens\b(?!-)/")" whsp/g;
+# next if /^ *;/; s/\b(?<!-)open-brace\b(?!-)/"{" whsp/g;
+# next if /^ *;/; s/\b(?<!-)close-brace\b(?!-)/"}" whsp/g;
+# next if /^ *;/; s/\b(?<!-)open-bracket\b(?!-)/"[" whsp/g;
+# next if /^ *;/; s/\b(?<!-)close-bracket\b(?!-)/"]" whsp/g;
+# next if /^ *;/; s/\b(?<!-)open-angle\b(?!-)/"<" whsp/g;
+# next if /^ *;/; s/\b(?<!-)close-angle\b(?!-)/">" whsp/g;
+# next if /^ *;/; s/\b(?<!-)colon\b(?!-)/":" whsp1/g;
+# next if /^ *;/; s/\b(?<!-)import-alt\b(?!-)/"?" whsp1/g;
-# next if /^ *;/; s/\b(?<!-)combine-types\b(?!-)/combine-types whitespace/g;
-# next if /^ *;/; s/\b(?<!-)combine\b(?!-)/combine whitespace/g;
-# next if /^ *;/; s/\b(?<!-)prefer\b(?!-)/prefer whitespace/g;
-# next if /^ *;/; s/\b(?<!-)lambda\b(?!-)/lambda whitespace/g;
-# next if /^ *;/; s/\b(?<!-)forall\b(?!-)/forall whitespace/g;
-# next if /^ *;/; s/\b(?<!-)arrow\b(?!-)/arrow whitespace/g;
+# next if /^ *;/; s/\b(?<!-)combine-types\b(?!-)/combine-types whsp/g;
+# next if /^ *;/; s/\b(?<!-)combine\b(?!-)/combine whsp/g;
+# next if /^ *;/; s/\b(?<!-)prefer\b(?!-)/prefer whsp/g;
+# next if /^ *;/; s/\b(?<!-)lambda\b(?!-)/lambda whsp/g;
+# next if /^ *;/; s/\b(?<!-)forall\b(?!-)/forall whsp/g;
+# next if /^ *;/; s/\b(?<!-)arrow\b(?!-)/arrow whsp/g;
-# next if /^ *;/; s/\b(?<!-)label\b(?!-)/label whitespace/g;
-# next if /^ *;/; s/\b(?<!-)identifier\b(?!-)/identifier whitespace/g;
-# next if /^ *;/; s/\b(?<!-)text-literal\b(?!-)/text-literal whitespace/g;
-# next if /^ *;/; s/\b(?<!-)double-literal\b(?!-)/double-literal whitespace/g;
-# next if /^ *;/; s/\b(?<!-)integer-literal\b(?!-)/integer-literal whitespace/g;
-# next if /^ *;/; s/\b(?<!-)natural-literal\b(?!-)/natural-literal whitespace/g;
+# next if /^ *;/; s/\b(?<!-)label\b(?!-)/label whsp/g;
+# next if /^ *;/; s/\b(?<!-)identifier\b(?!-)/identifier whsp/g;
+# next if /^ *;/; s/\b(?<!-)text-literal\b(?!-)/text-literal whsp/g;
+# next if /^ *;/; s/\b(?<!-)double-literal\b(?!-)/double-literal whsp/g;
+# next if /^ *;/; s/\b(?<!-)integer-literal\b(?!-)/integer-literal whsp/g;
+# next if /^ *;/; s/\b(?<!-)natural-literal\b(?!-)/natural-literal whsp/g;
-# next if /^ *;/; s/\b(?<!-)import-hashed\b(?!-)/import-hashed whitespace/g;
-# next if /^ *;/; s/\b(?<!-)import-type\b(?!-)/import-type whitespace/g;
-# next if /^ *;/; s/\b(?<!-)import\b(?!-)/import whitespace/g;
-# next if /^ *;/; s/\b(?<!-)local\b(?!-)/local whitespace/g;
-# next if /^ *;/; s/\b(?<!-)env\b(?!-)/env whitespace/g;
-# next if /^ *;/; s/\b(?<!-)http\b(?!-)/http whitespace/g;
-# next if /^ *;/; s/\b(?<!-)missing\b(?!-)/missing whitespace/g;
+# next if /^ *;/; s/\b(?<!-)import-hashed\b(?!-)/import-hashed whsp/g;
+# next if /^ *;/; s/\b(?<!-)import-type\b(?!-)/import-type whsp/g;
+# next if /^ *;/; s/\b(?<!-)import\b(?!-)/import whsp/g;
+# next if /^ *;/; s/\b(?<!-)local\b(?!-)/local whsp/g;
+# next if /^ *;/; s/\b(?<!-)env\b(?!-)/env whsp/g;
+# next if /^ *;/; s/\b(?<!-)http\b(?!-)/http whsp/g;
+# next if /^ *;/; s/\b(?<!-)missing\b(?!-)/missing whsp/g;
-# next if /^ *;/; s/\b(?<!-)labels\b(?!-)/labels whitespace/g;
-# next if /^ *;/; s/\b(?<!-)record-type-or-literal\b(?!-)/record-type-or-literal whitespace/g;
-# next if /^ *;/; s/\b(?<!-)non-empty-record-type-or-literal\b(?!-)/non-empty-record-type-or-literal whitespace/g;
-# next if /^ *;/; s/\b(?<!-)non-empty-record-type\b(?!-)/non-empty-record-type whitespace/g;
-# next if /^ *;/; s/\b(?<!-)non-empty-record-literal\b(?!-)/non-empty-record-literal whitespace/g;
-# next if /^ *;/; s/\b(?<!-)union-type-or-literal\b(?!-)/union-type-or-literal whitespace/g;
-# next if /^ *;/; s/\b(?<!-)non-empty-union-type-or-literal\b(?!-)/non-empty-union-type-or-literal whitespace/g;
-# next if /^ *;/; s/\b(?<!-)non-empty-list-literal\b(?!-)/non-empty-list-literal whitespace/g;
-# next if /^ *;/; s/\b(?<!-)expression\b(?!-)/expression whitespace/g;
-# next if /^ *;/; s/\b(?<!-)annotated-expression\b(?!-)/annotated-expression whitespace/g;
-# next if /^ *;/; s/\b(?<!-)empty-collection\b(?!-)/empty-collection whitespace/g;
-# next if /^ *;/; s/\b(?<!-)non-empty-optional\b(?!-)/non-empty-optional whitespace/g;
-# next if /^ *;/; s/\b(?<!-)operator-expression\b(?!-)/operator-expression whitespace/g;
-# next if /^ *;/; s/\b(?<!-)import-alt-expression\b(?!-)/import-alt-expression whitespace/g;
-# next if /^ *;/; s/\b(?<!-)or-expression\b(?!-)/or-expression whitespace/g;
-# next if /^ *;/; s/\b(?<!-)plus-expression\b(?!-)/plus-expression whitespace/g;
-# next if /^ *;/; s/\b(?<!-)text-append-expression\b(?!-)/text-append-expression whitespace/g;
-# next if /^ *;/; s/\b(?<!-)list-append-expression\b(?!-)/list-append-expression whitespace/g;
-# next if /^ *;/; s/\b(?<!-)and-expression\b(?!-)/and-expression whitespace/g;
-# next if /^ *;/; s/\b(?<!-)combine-expression\b(?!-)/combine-expression whitespace/g;
-# next if /^ *;/; s/\b(?<!-)prefer-expression\b(?!-)/prefer-expression whitespace/g;
-# next if /^ *;/; s/\b(?<!-)combine-types-expression\b(?!-)/combine-types-expression whitespace/g;
-# next if /^ *;/; s/\b(?<!-)times-expression\b(?!-)/times-expression whitespace/g;
-# next if /^ *;/; s/\b(?<!-)equal-expression\b(?!-)/equal-expression whitespace/g;
-# next if /^ *;/; s/\b(?<!-)not-equal-expression\b(?!-)/not-equal-expression whitespace/g;
-# next if /^ *;/; s/\b(?<!-)application-expression\b(?!-)/application-expression whitespace/g;
-# next if /^ *;/; s/\b(?<!-)import-expression\b(?!-)/import-expression whitespace/g;
-# next if /^ *;/; s/\b(?<!-)selector-expression\b(?!-)/selector-expression whitespace/g;
-# next if /^ *;/; s/\b(?<!-)primitive-expression\b(?!-)/primitive-expression whitespace/g;
-# next if /^ *;/; s/\b(?<!-)complete-expression\b(?!-)/complete-expression whitespace/g;
+# next if /^ *;/; s/\b(?<!-)labels\b(?!-)/labels whsp/g;
+# next if /^ *;/; s/\b(?<!-)record-type-or-literal\b(?!-)/record-type-or-literal whsp/g;
+# next if /^ *;/; s/\b(?<!-)non-empty-record-type-or-literal\b(?!-)/non-empty-record-type-or-literal whsp/g;
+# next if /^ *;/; s/\b(?<!-)non-empty-record-type\b(?!-)/non-empty-record-type whsp/g;
+# next if /^ *;/; s/\b(?<!-)non-empty-record-literal\b(?!-)/non-empty-record-literal whsp/g;
+# next if /^ *;/; s/\b(?<!-)union-type-or-literal\b(?!-)/union-type-or-literal whsp/g;
+# next if /^ *;/; s/\b(?<!-)non-empty-union-type-or-literal\b(?!-)/non-empty-union-type-or-literal whsp/g;
+# next if /^ *;/; s/\b(?<!-)non-empty-list-literal\b(?!-)/non-empty-list-literal whsp/g;
+# next if /^ *;/; s/\b(?<!-)expression\b(?!-)/expression whsp/g;
+# next if /^ *;/; s/\b(?<!-)annotated-expression\b(?!-)/annotated-expression whsp/g;
+# next if /^ *;/; s/\b(?<!-)empty-collection\b(?!-)/empty-collection whsp/g;
+# next if /^ *;/; s/\b(?<!-)non-empty-optional\b(?!-)/non-empty-optional whsp/g;
+# next if /^ *;/; s/\b(?<!-)operator-expression\b(?!-)/operator-expression whsp/g;
+# next if /^ *;/; s/\b(?<!-)import-alt-expression\b(?!-)/import-alt-expression whsp/g;
+# next if /^ *;/; s/\b(?<!-)or-expression\b(?!-)/or-expression whsp/g;
+# next if /^ *;/; s/\b(?<!-)plus-expression\b(?!-)/plus-expression whsp/g;
+# next if /^ *;/; s/\b(?<!-)text-append-expression\b(?!-)/text-append-expression whsp/g;
+# next if /^ *;/; s/\b(?<!-)list-append-expression\b(?!-)/list-append-expression whsp/g;
+# next if /^ *;/; s/\b(?<!-)and-expression\b(?!-)/and-expression whsp/g;
+# next if /^ *;/; s/\b(?<!-)combine-expression\b(?!-)/combine-expression whsp/g;
+# next if /^ *;/; s/\b(?<!-)prefer-expression\b(?!-)/prefer-expression whsp/g;
+# next if /^ *;/; s/\b(?<!-)combine-types-expression\b(?!-)/combine-types-expression whsp/g;
+# next if /^ *;/; s/\b(?<!-)times-expression\b(?!-)/times-expression whsp/g;
+# next if /^ *;/; s/\b(?<!-)equal-expression\b(?!-)/equal-expression whsp/g;
+# next if /^ *;/; s/\b(?<!-)not-equal-expression\b(?!-)/not-equal-expression whsp/g;
+# next if /^ *;/; s/\b(?<!-)application-expression\b(?!-)/application-expression whsp/g;
+# next if /^ *;/; s/\b(?<!-)import-expression\b(?!-)/import-expression whsp/g;
+# next if /^ *;/; s/\b(?<!-)selector-expression\b(?!-)/selector-expression whsp/g;
+# next if /^ *;/; s/\b(?<!-)primitive-expression\b(?!-)/primitive-expression whsp/g;
+# next if /^ *;/; s/\b(?<!-)complete-expression\b(?!-)/complete-expression whsp/g;
# next if /^ *;/; s/\b(?<!-)whitespace\b(?!-)/whsp/g;
# next if /^ *;/; s/\b(?<!-)nonempty-whitespace\b(?!-)/whsp1/g;