]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/lilyinput-pre-0.1.pod
release: 0.0.42.pre3
[lilypond.git] / Documentation / lilyinput-pre-0.1.pod
1 =head1 NAME
2
3 LilyInput -  LilyPond input format
4
5 =head1 DESCRIPTION
6
7 This page globally documents the the LilyPond input format, mudela.
8 To get a better impression, please study some examples.
9
10 =head2 Overview
11
12 General format of a construct:
13
14         BLOCKNAME {  <info to go with this block>   }
15
16 Some types allow declarations:
17
18         IDENTIFIER = BLOCKNAME {
19                 <info to go with this block>
20         }
21
22         ..
23
24         BLOCKNAME {
25                 IDENTIFIER
26                 ...
27         }
28
29
30 In musicmode, eg,
31
32         ''!c8.-"text"_v
33
34 and in lyricmode, eg,
35
36         Twin- kle, twin- kle lit- tle star,2
37
38 a lot of characters parse differently
39 than in "command" mode, eg,
40
41         identifier = score { .. }
42
43 So you have to signal this to the tokenizer. This is done with
44 '$'. '$' is a delimiter, which used by the tokenizer only. The same
45 goes for lyrics, it has a '@' delimiter.
46
47 =item *
48 musicmode: The brace still is used to group grammatical groups.
49
50 =item *
51 musicmode: "word" are preceded by a '\' (backslash)
52
53 This means you can write some stuff in a zillion ways:
54
55 =item 1.
56         $\var = \blockname { ... } $
57
58 =item 2.
59         var = blockname { $ ... $ } 
60
61 =item 3.
62         var = $ $ $\blockname {  ... $ } 
63
64 =head2 Comments
65
66 Not really crystallized; you can use '#' or '%' as line comment
67
68 =head2 other
69
70 LilyPond first reads 'symbol.ini', which contains declarations crucial
71 to proper operation of LilyPond (symbol tables, note names).
72
73 This language looks a lot like Rayce's (Rayce is a raytracer that I've
74 written as a hobby project. I used as a practice program for writing
75 (among others) C++ and Yacc. It also gave me RSI :-( ) which in turn
76 owes a lot to the POVRay raytracer. Now, I know, musictypesetting and
77 Raytracing do not necessarily require the same input format, but I was
78 just to lazy to make up a new and/or better input format. Suggestions
79 appreciated.