청소
This commit is contained in:
1 parent
5fb7442dd6
commit
ac128356c2
13 files changed
+36
-970
No files matched your search
@@ -0,0 +1,92 @@
|
||||
program = <intertoken-space> datum*
|
||||
|
||||
(* tokens *)
|
||||
boolean = #"#(t(rue)?|f(alse)?)" <intertoken-space>
|
||||
semicolon = ';'
|
||||
left-paren = '(' <intertoken-space>
|
||||
right-paren = ')' <intertoken-space>
|
||||
dot = '.' <intertoken-space>
|
||||
|
||||
(* datum *)
|
||||
datum-start = <intertoken-space> datum
|
||||
|
||||
datum = simple-datum | compound-datum
|
||||
<simple-datum> = boolean | symbol | number | string
|
||||
<compound-datum> = any-list
|
||||
|
||||
(* list *)
|
||||
<any-list> = list | improper-list
|
||||
list = <left-paren> datum* <right-paren>
|
||||
improper-list = <left-paren> datum+ <dot> datum <right-paren>
|
||||
|
||||
(* 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 uinteger-10
|
||||
<uinteger-10> = #"[0-9]+"
|
||||
|
||||
sign = ('+' | '-')?
|
||||
exactness = ('#i' | '#e')?
|
||||
|
||||
(* string *)
|
||||
string = <'"'> string-element* <'"'> <intertoken-space>
|
||||
<string-element> = #'[^"\\]' | '\\"' | '\\\\'
|
||||
|
||||
(* atmosphere *)
|
||||
atmosphere = whitespace | comment | directive
|
||||
whitespace = intraline-whitespace | line-ending
|
||||
intraline-whitespace = #"[ \t\f]"
|
||||
line-ending = #"[\r\n]|\r\n"
|
||||
comment = <semicolon> #"[^\n\r]*"
|
||||
intertoken-space = atmosphere*
|
||||
directive = #"#!(no-)?fold-case"
|
||||
|
||||
(* library *)
|
||||
library-start = <intertoken-space> library
|
||||
library = <left-paren> <"define-library"> <intertoken-space>
|
||||
library-name
|
||||
library-declaration*
|
||||
<right-paren>
|
||||
library-name = <left-paren> library-name-part+ <intertoken-space> <right-paren>
|
||||
<library-name-part> = symbol | uinteger-10
|
||||
<library-declaration>
|
||||
= export-declaration
|
||||
| import-declaration
|
||||
| begin-declaration
|
||||
|
||||
export-declaration =
|
||||
<left-paren> <'export'> <intertoken-space> export-spec*
|
||||
<right-paren>
|
||||
<export-spec> = symbol
|
||||
|
||||
import-declaration =
|
||||
<left-paren> <'import'> <intertoken-space> import-set+ <right-paren>
|
||||
|
||||
<import-set>
|
||||
= library-name
|
||||
| import-only
|
||||
| import-except
|
||||
| import-prefix
|
||||
| import-rename
|
||||
|
||||
import-only =
|
||||
<left-paren> <'only'> <intertoken-space> import-set symbol+ <right-paren>
|
||||
import-except =
|
||||
<left-paren> <'except'> <intertoken-space> import-set symbol+ <right-paren>
|
||||
import-prefix =
|
||||
<left-paren> <'prefix'> <intertoken-space> import-set symbol+ <right-paren>
|
||||
import-rename =
|
||||
<left-paren> <'rename'> <intertoken-space>
|
||||
import-set
|
||||
(<left-paren> symbol symbol <right-paren>)+
|
||||
<right-paren>
|
||||
|
||||
begin-declaration =
|
||||
<left-paren>
|
||||
<'begin'> <intertoken-space>
|
||||
datum*
|
||||
<right-paren>
|
||||
Reference in new issue
Block a user