1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# This file contains some default general-purpose definitions.
nodent: \N !(\t/` )
indent: \N (` /\t)
dedent: $ !(nodent/indent)
utf8-codepoint: (
\x00-x7f
/ \xc0-xdf 1\x80-xbf
/ \xe0-xef 2\x80-xbf
/ \xf0-xf7 3\x80-xbf
)
crlf: \r\n
cr: \r
anglebraces: `< ..%(\n/anglebraces/string) `>
brackets: `[ ..%(\n/brackets/string) `]
braces: `{ ..%(\n/braces/string) `}
parens: `( ..%(\n/parens/string) `)
string: `" ..%(`\.) `" / `' ..%(`\.) `'
id: !<`a-z,A-Z,_,0-9 (`a-z,A-Z,_ *`a-z,A-Z,_,0-9)!=keyword |
id-char: `a-z,A-Z,_,0-9
|: !<`a-z,A-Z,_,0-9 / !`a-z,A-Z,_,0-9
var: id
keyword: !"" # No keywords defined by default
word: |+`a-z,A-Z !`0-9,_
HEX: `0-9,A-F
Hex: `0-9,a-f,A-F
hex: `0-9,a-f
number: +`0-9 [`. *`0-9] / `. +`0-9
int: +`0-9
digit: `0-9
Abc123: `a-z,A-Z,0-9
ABC123: `A-Z,0-9
abc123: `a-z,0-9
Abc: `a-z,A-Z
ABC: `A-Z
abc: `a-z
esc: \e
tab: \t
nl: \n; lf: \n
comment: !''; # No default definition, can be overridden
$$: !(./\n)
$: !.
^^: !<(./\n)
^: !<.
__: *(` /\t/\n/\r/comment)
_: *(` /\t)
|