This commit is contained in:
msyds committed 2026-09-22 03:42:39 -06:00
1 parent 7c8bba4221
commit 78f5f94adc
2 files changed
+16 -3

No files matched your search

+10 -2
View File
@@ -9,12 +9,20 @@ right-paren = ')' <intertoken-space>
(* datum *)
<datum> = simple-datum
<simple-datum> = boolean | symbol
<simple-datum> = boolean | symbol | number
(* symbol *)
symbol = ordinary-symbol
symbol = ordinary-symbol <intertoken-space>
<ordinary-symbol> = #"[\P{Lu}\P{Ll}\P{Lt}\P{Lm}\P{Lo}\P{Nl}\P{No}\P{Pd}\P{Pc}\P{Sc}\P{Po}\P{Sm}\P{Sk}\P{So}\P{Co}\u200c\u200d&&[^;|\".,#]][\P{Lu}\P{Ll}\P{Lt}\P{Lm}\P{Lo}\P{Nl}\P{No}\P{Pd}\P{Pc}\P{Sc}\P{Po}\P{Sm}\P{Sk}\P{So}\P{Co}\u200c\u200d\P{Nd}\P{Me}\P{Mc}.&&[^;|\",#]]*"
(* number *)
number = num-10 <intertoken-space>
num-10 = sign #"[0-9]+"
sign = ('+' | '-')?
exactness = ('#i' | '#e')?
(* atmosphere *)
atmosphere = whitespace | comment | directive
whitespace = intraline-whitespace | line-ending
+6 -1
View File
@@ -59,5 +59,10 @@
[:boolean
(match x
(:or "#t" "#true") true
(:or "#f" "#false") false)])})))
(:or "#f" "#false") false)])
:sign (fn
([] identity)
([x] (match x "-" - "+" identity)))
:num-10 (fn [sign digits]
(sign (parse-long digits)))})))