aboutsummaryrefslogtreecommitdiff
path: root/grammars/lisp.bp
blob: b68cf71e4f76ff562c37bbc855f85af64eb111c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Syntax definitions for some Lisp-specific patterns
#
# NOTE: this is *NOT* intended to be a complete definition of the language's
# syntax! Providing a full language grammar is overkill, because the intended
# use case is finding/replacing string patterns. This task does not require a
# full parse tree, and having one makes the task considerably more complicated.
# See the accompanying README.md for more info.

comment: ";" ..$
string: `" ..%string-escape `"
list: parens
function-def: `(__"defun"|__id
function: function-def ..%parens `)
id-char: `A-Z,a-z,0-9,!,$,%,&,*,+,-,.,/,:,<,=,>,?,@,^,_,~
id: !<`A-Z,a-z,0-9,!,$,%,&,*,+,-,.,/,:,<,=,>,?,@,^,_,~ +`A-Z,a-z,0-9,!,$,%,&,*,+,-,.,/,:,<,=,>,?,@,^,_,~