This commit is contained in:
30
resources/net/deertopia/doerg/elisp/grammar
Normal file
30
resources/net/deertopia/doerg/elisp/grammar
Normal file
@@ -0,0 +1,30 @@
|
||||
<file> ::= elements
|
||||
|
||||
<elements> ::= ws? element ws? elements
|
||||
| ws? ε
|
||||
|
||||
<element> ::= string
|
||||
| list
|
||||
| symbol
|
||||
| integer
|
||||
| property-string
|
||||
|
||||
string ::= <'"'> #'([^"\\]|\\.|\\\n)*' <'"'>
|
||||
|
||||
property-string
|
||||
::= <'#('> ws? string text-property* ws? <')'>
|
||||
|
||||
text-property ::= ws? element ws? element ws? element
|
||||
|
||||
list ::= <'('> elements dot-cdr? <')'>
|
||||
|
||||
symbol ::= #'([^?#0-9 \n\s\f()\[\]"\'\\.]|\\.)([^ \n\s\f()\[\]"\'\\]|\\.)*'
|
||||
| #'\.([^ \n\s\f()\[\]"\'\\]|\\.)+'
|
||||
|
||||
integer ::= #'[-+]?[0-9]+' <#'.'>?
|
||||
|
||||
dot-cdr ::= <'.'> ws? element
|
||||
|
||||
<text> ::= ws? (string | property-string) ws?
|
||||
|
||||
<ws> ::= <#'(\s||\n)'>+
|
||||
Reference in New Issue
Block a user