lilypond-0.1.12
[lilypond.git] / Documentation / inputformat
blobd82c02b2e525831f3cb519f871e22b753be4a5db
1 General format of a construct:
3         BLOCKNAME {  <info to go with this block>   }
5 Some types allow declarations:
7         IDENTIFIER = BLOCKNAME {
8                 <info to go with this block>
9         }
11         ..
13         BLOCKNAME {
14                 IDENTIFIER
15                 ...
16         }
19 In musicmode, eg,
21         ''!c8.-"text"_v
23 a lot of characters parse differently
24 than in "command" mode, eg,
26         identifier = score { .. }
28 So you have to signal that to the tokenizer. This is done with
29 '$'. '$' is a delimiter, which used by the tokenizer only.
31 * musicmode: The brace still is used to group grammatical groups.
32 * musicmode: "word" are preceded by a '\' (backslash)
34 This means you can write some stuff in a zillion ways:
36 1.      $\var = \blockname { ... } $
38 2.      var = blockname { $ ... $ } 
40 3.      var = $ $ $\blockname {  ... $ } 
42 COMMENTS
44 not really crystallized; you can use '#' or '%' as line comment
46 OTHER
48 A correctly parsed .ly does not guarantuee output. A lot (most) of the
49 checking is done *after* parsing (some checks even are done after the
50 break calc!);  I'm sorry.
52 The parser's job is to construct appropriate objects. It will *only*
53 detect parse errors.
55 LilyPond first reads 'symbol.ini', which contains declarations crucial
56 to proper operation of LilyPond (symbol tables, note names)
58 This language looks a lot like Rayce's which in turn owes a lot to the
59 POVRay raytracer. Now, I know, musictypesetting and Raytracing do not
60 necessarily require the same input format, but I was just to lazy to
61 make up a new/better input format. Suggestions welcome.