2021-01-17 22:13:32 -08:00
|
|
|
# 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: ";" ..$
|
2021-05-19 21:58:54 -07:00
|
|
|
string: `" ..%string-escape `"
|
2021-01-17 22:13:32 -08:00
|
|
|
list: parens
|
2021-07-30 20:23:18 -07:00
|
|
|
function-def: `(__"defun"|__id
|
2021-01-20 15:46:21 -08:00
|
|
|
function: function-def ..%parens `)
|
2021-01-18 12:39:44 -08:00
|
|
|
id-char: `A-Z,a-z,0-9,!,$,%,&,*,+,-,.,/,:,<,=,>,?,@,^,_,~
|
|
|
|
id: !<`A-Z,a-z,0-9,!,$,%,&,*,+,-,.,/,:,<,=,>,?,@,^,_,~ +`A-Z,a-z,0-9,!,$,%,&,*,+,-,.,/,:,<,=,>,?,@,^,_,~
|