]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/lilyinput.pod
release: 0.0.20
[lilypond.git] / Documentation / lilyinput.pod
1 =head1 NAME
2
3 LilyInput -  LilyPond input format
4
5 =head1 DESCRIPTION
6
7 This page documents the the LilyPond input format, mudela.
8
9 =head2 Overview
10
11 General format of a construct:
12
13         BLOCKNAME {  <info to go with this block>   }
14
15 Some types allow declarations:
16
17         IDENTIFIER = BLOCKNAME {
18                 <info to go with this block>
19         }
20
21         ..
22
23         BLOCKNAME {
24                 IDENTIFIER
25                 ...
26         }
27
28
29 In musicmode, eg,
30
31         ''!c8.-"text"_v
32
33 a lot of characters parse differently
34 than in "command" mode, eg,
35
36         identifier = score { .. }
37
38 So you have to signal that to the tokenizer. This is done with
39 '$'. '$' is a delimiter, which used by the tokenizer only.
40
41 =item *
42 musicmode: The brace still is used to group grammatical groups.
43
44 =item *
45 musicmode: "word" are preceded by a '\' (backslash)
46
47 This means you can write some stuff in a zillion ways:
48
49 =item 1.
50         $\var = \blockname { ... } $
51
52 =item 2.
53         var = blockname { $ ... $ } 
54
55 =item 3.
56         var = $ $ $\blockname {  ... $ } 
57
58 =head2 Comments
59
60 Not really crystallized; you can use '#' or '%' as line comment
61
62 =head2 other
63
64 A correctly parsed .ly does not guarantuee output. A lot (most) of the
65 checking is done B<after> parsing (some checks even are done after the
66 break calc!);  I'm sorry.
67
68 The parser's job is to construct appropriate objects. It will *only*
69 detect parse errors.
70
71 LilyPond first reads 'symbol.ini', which contains declarations crucial
72 to proper operation of LilyPond (symbol tables, note names).
73
74 This language looks a lot like Rayce's which in turn owes a lot to the
75 POVRay raytracer. Now, I know, musictypesetting and Raytracing do not
76 necessarily require the same input format, but I was just to lazy to
77 make up a new and/or better input format. Suggestions welcome.