repo.or.cz
/
lisp-parkour.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
parser: use single-quotes in config
[lisp-parkour.git]
/
parser
/
clojure
/
init.lua
blob
b71fdf1a01407e1b65ab4fc29690caf3464af993
1
require
'lpeg'
2
local
lpeg
=
lpeg
3
local
P
,
S
=
lpeg
.
P
,
lpeg
.
S
4
5
local
macro_prefix
=
6
P
'#'
* (
'?'
*
P
'@'
^
-
1
+
'_'
)
^
-
1
+
7
S
"^@`'"
8
9
local
opposite
= {
10
[
'('
] =
')'
,
11
[
')'
] =
'('
,
12
[
'{'
] =
'}'
,
13
[
'}'
] =
'{'
,
14
[
'['
] =
']'
,
15
[
']'
] =
'['
,
16
[
'"'
] =
'"'
,
17
[
';'
] =
'
\n
'
,
18
[
'
\n
'
] =
';'
,
19
}
20
21
return
{
22
prefix
=
macro_prefix
,
23
opposite
=
opposite
,
24
}