Linux cesa-www-main 6.1.0-49-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
Apache/2.4.68 (Debian)
Server IP : 10.218.0.2 & Your IP : 216.73.216.28
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3 /
dist-packages /
pygments /
lexers /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2025-05-13 15:07
__init__.py
10.86
KB
-rw-r--r--
2023-01-01 08:34
_ada_builtins.py
1.51
KB
-rw-r--r--
2023-01-01 08:34
_asy_builtins.py
26.65
KB
-rw-r--r--
2023-01-01 08:34
_cl_builtins.py
13.67
KB
-rw-r--r--
2023-01-01 08:34
_cocoa_builtins.py
102.72
KB
-rw-r--r--
2023-01-01 08:34
_csound_builtins.py
17.98
KB
-rw-r--r--
2023-01-01 08:34
_css_builtins.py
12.15
KB
-rw-r--r--
2023-01-01 08:34
_julia_builtins.py
11.6
KB
-rw-r--r--
2023-01-01 08:34
_lasso_builtins.py
131.36
KB
-rw-r--r--
2023-01-01 08:34
_lilypond_builtins.py
104.28
KB
-rw-r--r--
2023-01-01 08:34
_lua_builtins.py
7.89
KB
-rw-r--r--
2023-01-01 08:34
_mapping.py
63.46
KB
-rw-r--r--
2023-01-01 08:34
_mql_builtins.py
24.13
KB
-rw-r--r--
2023-01-01 08:34
_mysql_builtins.py
25.2
KB
-rw-r--r--
2023-01-01 08:34
_openedge_builtins.py
48.24
KB
-rw-r--r--
2023-01-01 08:34
_php_builtins.py
105.35
KB
-rw-r--r--
2023-01-01 08:34
_postgres_builtins.py
12.03
KB
-rw-r--r--
2023-01-01 08:34
_qlik_builtins.py
12.3
KB
-rw-r--r--
2023-01-01 08:34
_scheme_builtins.py
31.8
KB
-rw-r--r--
2023-01-01 08:34
_scilab_builtins.py
51.15
KB
-rw-r--r--
2023-01-01 08:34
_sourcemod_builtins.py
26.12
KB
-rw-r--r--
2023-01-01 08:34
_stan_builtins.py
13.13
KB
-rw-r--r--
2023-01-01 08:34
_stata_builtins.py
26.59
KB
-rw-r--r--
2023-01-01 08:34
_tsql_builtins.py
15.1
KB
-rw-r--r--
2023-01-01 08:34
_usd_builtins.py
1.62
KB
-rw-r--r--
2023-01-01 08:34
_vbscript_builtins.py
4.13
KB
-rw-r--r--
2023-01-01 08:34
_vim_builtins.py
55.73
KB
-rw-r--r--
2023-01-01 08:34
actionscript.py
11.4
KB
-rw-r--r--
2023-01-01 08:34
ada.py
5.2
KB
-rw-r--r--
2023-01-01 08:34
agile.py
876
B
-rw-r--r--
2023-01-01 08:34
algebra.py
9.64
KB
-rw-r--r--
2023-01-01 08:34
ambient.py
2.54
KB
-rw-r--r--
2023-01-01 08:34
amdgpu.py
1.57
KB
-rw-r--r--
2023-01-01 08:34
ampl.py
4.08
KB
-rw-r--r--
2023-01-01 08:34
apdlexer.py
26.03
KB
-rw-r--r--
2023-01-01 08:34
apl.py
3.33
KB
-rw-r--r--
2023-01-01 08:34
archetype.py
11.2
KB
-rw-r--r--
2023-01-01 08:34
arrow.py
3.48
KB
-rw-r--r--
2023-01-01 08:34
arturo.py
11.15
KB
-rw-r--r--
2023-01-01 08:34
asc.py
1.58
KB
-rw-r--r--
2023-01-01 08:34
asm.py
40.28
KB
-rw-r--r--
2023-01-01 08:34
automation.py
19.35
KB
-rw-r--r--
2023-01-01 08:34
bare.py
2.95
KB
-rw-r--r--
2023-01-01 08:34
basic.py
27.27
KB
-rw-r--r--
2023-01-01 08:34
bdd.py
1.61
KB
-rw-r--r--
2023-01-01 08:34
berry.py
3.14
KB
-rw-r--r--
2023-01-01 08:34
bibtex.py
4.61
KB
-rw-r--r--
2023-01-01 08:34
boa.py
3.82
KB
-rw-r--r--
2023-01-01 08:34
business.py
27.45
KB
-rw-r--r--
2023-01-01 08:34
c_cpp.py
17.37
KB
-rw-r--r--
2023-01-01 08:34
c_like.py
28.52
KB
-rw-r--r--
2023-01-01 08:34
capnproto.py
2.12
KB
-rw-r--r--
2023-01-01 08:34
cddl.py
5.06
KB
-rw-r--r--
2023-01-01 08:34
chapel.py
4.9
KB
-rw-r--r--
2023-01-01 08:34
clean.py
6.25
KB
-rw-r--r--
2023-01-01 08:34
comal.py
3.08
KB
-rw-r--r--
2023-01-01 08:34
compiled.py
1.37
KB
-rw-r--r--
2023-01-01 08:34
configs.py
40.84
KB
-rw-r--r--
2023-01-01 08:34
console.py
4.05
KB
-rw-r--r--
2023-01-01 08:34
cplint.py
1.36
KB
-rw-r--r--
2023-01-01 08:34
crystal.py
15.39
KB
-rw-r--r--
2023-01-01 08:34
csound.py
16.6
KB
-rw-r--r--
2023-01-01 08:34
css.py
24.72
KB
-rw-r--r--
2023-01-01 08:34
d.py
9.64
KB
-rw-r--r--
2023-01-01 08:34
dalvik.py
4.5
KB
-rw-r--r--
2023-01-01 08:34
data.py
26.31
KB
-rw-r--r--
2023-01-01 08:34
devicetree.py
3.93
KB
-rw-r--r--
2023-01-01 08:34
diff.py
5.04
KB
-rw-r--r--
2023-01-01 08:34
dotnet.py
29
KB
-rw-r--r--
2023-01-01 08:34
dsls.py
35.91
KB
-rw-r--r--
2023-01-01 08:34
dylan.py
10.14
KB
-rw-r--r--
2023-01-01 08:34
ecl.py
6.22
KB
-rw-r--r--
2023-01-01 08:34
eiffel.py
2.63
KB
-rw-r--r--
2023-01-01 08:34
elm.py
3.08
KB
-rw-r--r--
2023-01-01 08:34
elpi.py
6.22
KB
-rw-r--r--
2023-01-01 08:34
email.py
4.63
KB
-rw-r--r--
2023-01-01 08:34
erlang.py
18.72
KB
-rw-r--r--
2023-01-01 08:34
esoteric.py
10.15
KB
-rw-r--r--
2023-01-01 08:34
ezhil.py
3.2
KB
-rw-r--r--
2023-01-01 08:34
factor.py
19.07
KB
-rw-r--r--
2023-01-01 08:34
fantom.py
9.96
KB
-rw-r--r--
2023-01-01 08:34
felix.py
9.42
KB
-rw-r--r--
2023-01-01 08:34
fift.py
1.58
KB
-rw-r--r--
2023-01-01 08:34
floscript.py
2.61
KB
-rw-r--r--
2023-01-01 08:34
forth.py
7.03
KB
-rw-r--r--
2023-01-01 08:34
fortran.py
10.09
KB
-rw-r--r--
2023-01-01 08:34
foxpro.py
25.6
KB
-rw-r--r--
2023-01-01 08:34
freefem.py
26.28
KB
-rw-r--r--
2023-01-01 08:34
func.py
3.54
KB
-rw-r--r--
2023-01-01 08:34
functional.py
674
B
-rw-r--r--
2023-01-01 08:34
futhark.py
3.64
KB
-rw-r--r--
2023-01-01 08:34
gcodelexer.py
826
B
-rw-r--r--
2023-01-01 08:34
gdscript.py
7.37
KB
-rw-r--r--
2023-01-01 08:34
go.py
3.67
KB
-rw-r--r--
2023-01-01 08:34
grammar_notation.py
7.79
KB
-rw-r--r--
2023-01-01 08:34
graph.py
3.77
KB
-rw-r--r--
2023-01-01 08:34
graphics.py
38.02
KB
-rw-r--r--
2023-01-01 08:34
graphviz.py
1.89
KB
-rw-r--r--
2023-01-01 08:34
gsql.py
3.9
KB
-rw-r--r--
2023-01-01 08:34
haskell.py
32.13
KB
-rw-r--r--
2023-01-01 08:34
haxe.py
30.25
KB
-rw-r--r--
2023-01-01 08:34
hdl.py
21.99
KB
-rw-r--r--
2023-01-01 08:34
hexdump.py
3.52
KB
-rw-r--r--
2023-01-01 08:34
html.py
19.41
KB
-rw-r--r--
2023-01-01 08:34
idl.py
15.09
KB
-rw-r--r--
2023-01-01 08:34
igor.py
29.91
KB
-rw-r--r--
2023-01-01 08:34
inferno.py
3.06
KB
-rw-r--r--
2023-01-01 08:34
installers.py
12.87
KB
-rw-r--r--
2023-01-01 08:34
int_fiction.py
55.78
KB
-rw-r--r--
2023-01-01 08:34
iolang.py
1.86
KB
-rw-r--r--
2023-01-01 08:34
j.py
4.74
KB
-rw-r--r--
2023-01-01 08:34
javascript.py
61.39
KB
-rw-r--r--
2023-01-01 08:34
jmespath.py
2.01
KB
-rw-r--r--
2023-01-01 08:34
jslt.py
3.61
KB
-rw-r--r--
2023-01-01 08:34
jsonnet.py
5.5
KB
-rw-r--r--
2023-01-01 08:34
julia.py
11.37
KB
-rw-r--r--
2023-01-01 08:34
jvm.py
71.22
KB
-rw-r--r--
2023-01-01 08:34
kuin.py
11.14
KB
-rw-r--r--
2023-01-01 08:34
lilypond.py
9.52
KB
-rw-r--r--
2023-01-01 08:34
lisp.py
140.66
KB
-rw-r--r--
2023-01-01 08:34
macaulay2.py
31.17
KB
-rw-r--r--
2023-01-01 08:34
make.py
7.37
KB
-rw-r--r--
2023-01-01 08:34
markup.py
26.17
KB
-rw-r--r--
2023-01-01 08:34
math.py
676
B
-rw-r--r--
2023-01-01 08:34
matlab.py
129.74
KB
-rw-r--r--
2023-01-01 08:34
maxima.py
2.65
KB
-rw-r--r--
2023-01-01 08:34
meson.py
4.24
KB
-rw-r--r--
2023-01-01 08:34
mime.py
7.36
KB
-rw-r--r--
2023-01-01 08:34
minecraft.py
13.52
KB
-rw-r--r--
2023-01-01 08:34
mips.py
4.5
KB
-rw-r--r--
2023-01-01 08:34
ml.py
34.5
KB
-rw-r--r--
2023-01-01 08:34
modeling.py
13.21
KB
-rw-r--r--
2023-01-01 08:34
modula2.py
51.83
KB
-rw-r--r--
2023-01-01 08:34
monte.py
6.14
KB
-rw-r--r--
2023-01-01 08:34
mosel.py
8.97
KB
-rw-r--r--
2023-01-01 08:34
ncl.py
62.46
KB
-rw-r--r--
2023-01-01 08:34
nimrod.py
6.27
KB
-rw-r--r--
2023-01-01 08:34
nit.py
2.66
KB
-rw-r--r--
2023-01-01 08:34
nix.py
3.92
KB
-rw-r--r--
2023-01-01 08:34
oberon.py
4.07
KB
-rw-r--r--
2023-01-01 08:34
objective.py
22.42
KB
-rw-r--r--
2023-01-01 08:34
ooc.py
2.91
KB
-rw-r--r--
2023-01-01 08:34
other.py
1.7
KB
-rw-r--r--
2023-01-01 08:34
parasail.py
2.66
KB
-rw-r--r--
2023-01-01 08:34
parsers.py
25.3
KB
-rw-r--r--
2023-01-01 08:34
pascal.py
30.16
KB
-rw-r--r--
2023-01-01 08:34
pawn.py
7.96
KB
-rw-r--r--
2023-01-01 08:34
perl.py
38.25
KB
-rw-r--r--
2023-01-01 08:34
phix.py
22.71
KB
-rw-r--r--
2023-01-01 08:34
php.py
12.21
KB
-rw-r--r--
2023-01-01 08:34
pointless.py
1.93
KB
-rw-r--r--
2023-01-01 08:34
pony.py
3.17
KB
-rw-r--r--
2023-01-01 08:34
praat.py
12.38
KB
-rw-r--r--
2023-01-01 08:34
procfile.py
1.13
KB
-rw-r--r--
2023-01-01 08:34
prolog.py
12.06
KB
-rw-r--r--
2023-01-01 08:34
promql.py
4.6
KB
-rw-r--r--
2023-01-01 08:34
python.py
52.27
KB
-rw-r--r--
2023-01-01 08:34
q.py
6.77
KB
-rw-r--r--
2023-01-01 08:34
qlik.py
3.58
KB
-rw-r--r--
2023-01-01 08:34
qvt.py
5.93
KB
-rw-r--r--
2023-01-01 08:34
r.py
6.04
KB
-rw-r--r--
2023-01-01 08:34
rdf.py
15.42
KB
-rw-r--r--
2023-01-01 08:34
rebol.py
18.16
KB
-rw-r--r--
2023-01-01 08:34
resource.py
2.83
KB
-rw-r--r--
2023-01-01 08:34
ride.py
4.94
KB
-rw-r--r--
2023-01-01 08:34
rita.py
1.1
KB
-rw-r--r--
2023-01-01 08:34
rnc.py
1.93
KB
-rw-r--r--
2023-01-01 08:34
roboconf.py
1.92
KB
-rw-r--r--
2023-01-01 08:34
robotframework.py
18.02
KB
-rw-r--r--
2023-01-01 08:34
ruby.py
22.24
KB
-rw-r--r--
2023-01-01 08:34
rust.py
8.02
KB
-rw-r--r--
2023-01-01 08:34
sas.py
9.18
KB
-rw-r--r--
2023-01-01 08:34
savi.py
4.54
KB
-rw-r--r--
2023-01-01 08:34
scdoc.py
2.19
KB
-rw-r--r--
2023-01-01 08:34
scripting.py
68.37
KB
-rw-r--r--
2023-01-01 08:34
sgf.py
1.94
KB
-rw-r--r--
2023-01-01 08:34
shell.py
35.49
KB
-rw-r--r--
2023-01-01 08:34
sieve.py
2.38
KB
-rw-r--r--
2023-01-01 08:34
slash.py
8.28
KB
-rw-r--r--
2023-01-01 08:34
smalltalk.py
7.04
KB
-rw-r--r--
2023-01-01 08:34
smithy.py
2.6
KB
-rw-r--r--
2023-01-01 08:34
smv.py
2.71
KB
-rw-r--r--
2023-01-01 08:34
snobol.py
2.67
KB
-rw-r--r--
2023-01-01 08:34
solidity.py
3.05
KB
-rw-r--r--
2023-01-01 08:34
sophia.py
3.25
KB
-rw-r--r--
2023-01-01 08:34
special.py
3.33
KB
-rw-r--r--
2023-01-01 08:34
spice.py
2.63
KB
-rw-r--r--
2023-01-01 08:34
sql.py
33.35
KB
-rw-r--r--
2023-01-01 08:34
srcinfo.py
1.65
KB
-rw-r--r--
2023-01-01 08:34
stata.py
6.27
KB
-rw-r--r--
2023-01-01 08:34
supercollider.py
3.61
KB
-rw-r--r--
2023-01-01 08:34
tal.py
2.58
KB
-rw-r--r--
2023-01-01 08:34
tcl.py
5.38
KB
-rw-r--r--
2023-01-01 08:34
teal.py
3.44
KB
-rw-r--r--
2023-01-01 08:34
templates.py
70.99
KB
-rw-r--r--
2023-01-01 08:34
teraterm.py
9.49
KB
-rw-r--r--
2023-01-01 08:34
testing.py
10.51
KB
-rw-r--r--
2023-01-01 08:34
text.py
1
KB
-rw-r--r--
2023-01-01 08:34
textedit.py
7.43
KB
-rw-r--r--
2023-01-01 08:34
textfmts.py
14.84
KB
-rw-r--r--
2023-01-01 08:34
theorem.py
19.68
KB
-rw-r--r--
2023-01-01 08:34
thingsdb.py
4.13
KB
-rw-r--r--
2023-01-01 08:34
tlb.py
1.34
KB
-rw-r--r--
2023-01-01 08:34
tnt.py
10.21
KB
-rw-r--r--
2023-01-01 08:34
trafficscript.py
1.44
KB
-rw-r--r--
2023-01-01 08:34
typoscript.py
8.01
KB
-rw-r--r--
2023-01-01 08:34
ul4.py
8.75
KB
-rw-r--r--
2023-01-01 08:34
unicon.py
18.08
KB
-rw-r--r--
2023-01-01 08:34
urbi.py
5.9
KB
-rw-r--r--
2023-01-01 08:34
usd.py
3.43
KB
-rw-r--r--
2023-01-01 08:34
varnish.py
7.1
KB
-rw-r--r--
2023-01-01 08:34
verification.py
3.79
KB
-rw-r--r--
2023-01-01 08:34
web.py
894
B
-rw-r--r--
2023-01-01 08:34
webassembly.py
5.57
KB
-rw-r--r--
2023-01-01 08:34
webidl.py
10.27
KB
-rw-r--r--
2023-01-01 08:34
webmisc.py
39.6
KB
-rw-r--r--
2023-01-01 08:34
whiley.py
3.92
KB
-rw-r--r--
2023-01-01 08:34
wowtoc.py
3.93
KB
-rw-r--r--
2023-01-01 08:34
wren.py
3.16
KB
-rw-r--r--
2023-01-01 08:34
x10.py
1.88
KB
-rw-r--r--
2023-01-01 08:34
xorg.py
902
B
-rw-r--r--
2023-01-01 08:34
yang.py
4.39
KB
-rw-r--r--
2023-01-01 08:34
zig.py
3.86
KB
-rw-r--r--
2023-01-01 08:34
Save
Rename
""" pygments.lexers.lilypond ~~~~~~~~~~~~~~~~~~~~~~~~ Lexer for LilyPond. :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import bygroups, default, inherit, words from pygments.lexers.lisp import SchemeLexer from pygments.lexers._lilypond_builtins import ( keywords, pitch_language_names, clefs, scales, repeat_types, units, chord_modifiers, pitches, music_functions, dynamics, articulations, music_commands, markup_commands, grobs, translators, contexts, context_properties, grob_properties, scheme_functions, paper_variables, header_variables ) from pygments.token import Token __all__ = ["LilyPondLexer"] # In LilyPond, (unquoted) name tokens only contain letters, hyphens, # and underscores, where hyphens and underscores must not start or end # a name token. # # Note that many of the entities listed as LilyPond built-in keywords # (in file `_lilypond_builtins.py`) are only valid if surrounded by # double quotes, for example, 'hufnagel-fa1'. This means that # `NAME_END_RE` doesn't apply to such entities in valid LilyPond code. NAME_END_RE = r"(?=\d|[^\w\-]|[\-_][\W\d])" def builtin_words(names, backslash, suffix=NAME_END_RE): prefix = r"[\-_^]?" if backslash == "mandatory": prefix += r"\\" elif backslash == "optional": prefix += r"\\?" else: assert backslash == "disallowed" return words(names, prefix, suffix) class LilyPondLexer(SchemeLexer): """ Lexer for input to LilyPond, a text-based music typesetter. .. important:: This lexer is meant to be used in conjunction with the ``lilypond`` style. .. versionadded:: 2.11 """ name = 'LilyPond' url = 'https://lilypond.org' aliases = ['lilypond'] filenames = ['*.ly'] mimetypes = [] flags = re.DOTALL | re.MULTILINE # Because parsing LilyPond input is very tricky (and in fact # impossible without executing LilyPond when there is Scheme # code in the file), this lexer does not try to recognize # lexical modes. Instead, it catches the most frequent pieces # of syntax, and, above all, knows about many kinds of builtins. # In order to parse embedded Scheme, this lexer subclasses the SchemeLexer. # It redefines the 'root' state entirely, and adds a rule for #{ #} # to the 'value' state. The latter is used to parse a Scheme expression # after #. def get_tokens_unprocessed(self, text): """Highlight Scheme variables as LilyPond builtins when applicable.""" for index, token, value in super().get_tokens_unprocessed(text): if token is Token.Name.Function or token is Token.Name.Variable: if value in scheme_functions: token = Token.Name.Builtin.SchemeFunction elif token is Token.Name.Builtin: token = Token.Name.Builtin.SchemeBuiltin yield index, token, value tokens = { "root": [ # Whitespace. (r"\s+", Token.Text.Whitespace), # Multi-line comments. These are non-nestable. (r"%\{.*?%\}", Token.Comment.Multiline), # Simple comments. (r"%.*?$", Token.Comment.Single), # End of embedded LilyPond in Scheme. (r"#\}", Token.Punctuation, "#pop"), # Embedded Scheme, starting with # ("delayed"), # or $ (immediate). #@ and and $@ are the lesser known # "list splicing operators". (r"[#$]@?", Token.Punctuation, "value"), # Any kind of punctuation: # - sequential music: { }, # - parallel music: << >>, # - voice separator: << \\ >>, # - chord: < >, # - bar check: |, # - dot in nested properties: \revert NoteHead.color, # - equals sign in assignments and lists for various commands: # \override Stem.color = red, # - comma as alternative syntax for lists: \time 3,3,2 4/4, # - colon in tremolos: c:32, # - double hyphen and underscore in lyrics: li -- ly -- pond __ # (which must be preceded by ASCII whitespace) (r"""(?x) \\\\ | (?<= \s ) (?: -- | __ ) | [{}<>=.,:|] """, Token.Punctuation), # Pitches, with optional octavation marks, octave check, # and forced or cautionary accidental. (words(pitches, suffix=r"=?[',]*!?\??" + NAME_END_RE), Token.Pitch), # Strings, optionally with direction specifier. (r'[\-_^]?"', Token.String, "string"), # Numbers. (r"-?\d+\.\d+", Token.Number.Float), # 5. and .5 are not allowed (r"-?\d+/\d+", Token.Number.Fraction), # Integers, or durations with optional augmentation dots. # We have no way to distinguish these, so we highlight # them all as numbers. # # Normally, there is a space before the integer (being an # argument to a music function), which we check here. The # case without a space is handled below (as a fingering # number). (r"""(?x) (?<= \s ) -\d+ | (?: (?: \d+ | \\breve | \\longa | \\maxima ) \.* ) """, Token.Number), # Separates duration and duration multiplier highlighted as fraction. (r"\*", Token.Number), # Ties, slurs, manual beams. (r"[~()[\]]", Token.Name.Builtin.Articulation), # Predefined articulation shortcuts. A direction specifier is # required here. (r"[\-_^][>^_!.\-+]", Token.Name.Builtin.Articulation), # Fingering numbers, string numbers. (r"[\-_^]?\\?\d+", Token.Name.Builtin.Articulation), # Builtins. (builtin_words(keywords, "mandatory"), Token.Keyword), (builtin_words(pitch_language_names, "disallowed"), Token.Name.PitchLanguage), (builtin_words(clefs, "disallowed"), Token.Name.Builtin.Clef), (builtin_words(scales, "mandatory"), Token.Name.Builtin.Scale), (builtin_words(repeat_types, "disallowed"), Token.Name.Builtin.RepeatType), (builtin_words(units, "mandatory"), Token.Number), (builtin_words(chord_modifiers, "disallowed"), Token.ChordModifier), (builtin_words(music_functions, "mandatory"), Token.Name.Builtin.MusicFunction), (builtin_words(dynamics, "mandatory"), Token.Name.Builtin.Dynamic), # Those like slurs that don't take a backslash are covered above. (builtin_words(articulations, "mandatory"), Token.Name.Builtin.Articulation), (builtin_words(music_commands, "mandatory"), Token.Name.Builtin.MusicCommand), (builtin_words(markup_commands, "mandatory"), Token.Name.Builtin.MarkupCommand), (builtin_words(grobs, "disallowed"), Token.Name.Builtin.Grob), (builtin_words(translators, "disallowed"), Token.Name.Builtin.Translator), # Optional backslash because of \layout { \context { \Score ... } }. (builtin_words(contexts, "optional"), Token.Name.Builtin.Context), (builtin_words(context_properties, "disallowed"), Token.Name.Builtin.ContextProperty), (builtin_words(grob_properties, "disallowed"), Token.Name.Builtin.GrobProperty, "maybe-subproperties"), # Optional backslashes here because output definitions are wrappers # around modules. Concretely, you can do, e.g., # \paper { oddHeaderMarkup = \evenHeaderMarkup } (builtin_words(paper_variables, "optional"), Token.Name.Builtin.PaperVariable), (builtin_words(header_variables, "optional"), Token.Name.Builtin.HeaderVariable), # Other backslashed-escaped names (like dereferencing a # music variable), possibly with a direction specifier. (r"[\-_^]?\\.+?" + NAME_END_RE, Token.Name.BackslashReference), # Definition of a variable. Support assignments to alist keys # (myAlist.my-key.my-nested-key = \markup \spam \eggs). (r"""(?x) (?: [^\W\d] | - )+ (?= (?: [^\W\d] | [\-.] )* \s* = ) """, Token.Name.Lvalue), # Virtually everything can appear in markup mode, so we highlight # as text. Try to get a complete word, or we might wrongly lex # a suffix that happens to be a builtin as a builtin (e.g., "myStaff"). (r"([^\W\d]|-)+?" + NAME_END_RE, Token.Text), (r".", Token.Text), ], "string": [ (r'"', Token.String, "#pop"), (r'\\.', Token.String.Escape), (r'[^\\"]+', Token.String), ], "value": [ # Scan a LilyPond value, then pop back since we had a # complete expression. (r"#\{", Token.Punctuation, ("#pop", "root")), inherit, ], # Grob subproperties are undeclared and it would be tedious # to maintain them by hand. Instead, this state allows recognizing # everything that looks like a-known-property.foo.bar-baz as # one single property name. "maybe-subproperties": [ (r"\s+", Token.Text.Whitespace), (r"(\.)((?:[^\W\d]|-)+?)" + NAME_END_RE, bygroups(Token.Punctuation, Token.Name.Builtin.GrobProperty)), default("#pop"), ] }