]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.24
authorfred <fred>
Sun, 24 Mar 2002 19:28:31 +0000 (19:28 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:28:31 +0000 (19:28 +0000)
NEWS
TODO
input/pavane.ly
src/lexer.l
src/staff.cc
src/timedescription.cc
src/warn.cc

diff --git a/NEWS b/NEWS
index 93baaa2807e1839743436aa14c94d6c93894134f..696755258eb9c08a1b82f486acefb2632da8217f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+pl 24:
+       - Lyrics
+       - Commands in music-mode (an input feature) (there you are, Mats)
 
 pl 23:
        - TODO file inc'd
@@ -6,9 +9,10 @@ pl 23:
        - error.pod,faq.pod
        - Markers
        - configure script
-       - scrapped VPATH
        - inputfile name in output.
 Internal changes:
+       - scrapped VPATH
+       - Make dependencies per .o
        - Split Input_* parsing steps to enable marking 
 Bugfixes:
        - unconnected columns
diff --git a/TODO b/TODO
index 70e3590b8a5ffe78aaac8e6a40e6d88c647f890a..9b81ff8667b17fb4506faf4ed8b747c99fb5f527 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,3 +1,4 @@
+
 BUGS
        * first clef
 
@@ -9,6 +10,10 @@ SEVERELY LACKING:
 
 INPUTLANGUAGE
 
+       * lexer condition stack
+
+       * lose the $ and @?
+
        * figured bass?
 
        * transposition
@@ -19,6 +24,10 @@ INPUTLANGUAGE
 
 SMALLISH PROJECTS
 
+       * make spanner for staffsym
+       
+       * Lyric_req : Text_req, Rhythmic_req
+       
        * Lookup::tex_glissando, Lookup::tex_bracket,
        Lookup::tex_cresc, Lookup::tex_decresc (use texbeam.cc as an
        example.)
@@ -45,7 +54,7 @@ SMALLISH PROJECTS
 
        * fix symbols in parser.o: `Warning: size of symbol'
 
-       * Viola clef (->jan?!)
+       * Viola clef
 
 DOC
 
@@ -54,6 +63,9 @@ DOC
        * all errors
 
 FUTURE
+       * Command_req
+       
+       * scrap stem_request?
 
        * Text_pstaff/Lyric_staff
 
@@ -71,6 +83,8 @@ FUTURE
 
        * Implement all requests
 
+       * merge key{item} & localkey{item}
+
        * QLP for beams?
 
        * stacked slurs.
index ec31ea1aa05b9a35bc6ea69ce1472d62c305ed76..b820506b6069ad808139433aa28e35c38f2f75b4 100644 (file)
@@ -33,8 +33,8 @@ staff {melodic
        e4 fis4 () [fis e fis gis]      |
        cis4 `b4()`b8 r8 r4^"tr\`es soutenu"    |
 
-       r4 r4   | %2/4 meter
-
+       \command { \meter 2 *4 } r4 r4  |
+       \command { \meter 4 *4 }
        'cis4_"\dyn ppp" 'd4 () ['d 'cis 'd 'e] |
        a4 gis2.        |
        a4 b4()[b a b 'cis]     |
@@ -70,7 +70,9 @@ staff {melodic
        | [f a 'c] \plet{1/1} 'e4-^ () ['e f-> a-> 'c->]        |
        'e4._"sf" 'e8()'c4 r4 |
        r1      |
-       r4 r4-\fermata  
+       \command { \meter 2 *4 } r4 r4-\fermata
+       \command { \meter 4 *4 }
+
        \octave { ' }
        |d2( [)d e cis `b]      |
        `a4 [`b cis] [cis `b] `b4       |
@@ -104,13 +106,10 @@ score {
        commands  {
                meter 4 *4
                skip 18:0
-               meter 2 *4
                skip 1:0
-               meter 4 *4 
                skip 20:0
                bar "|:"
                skip 9:0
-               meter 2* 4
                skip 1:0
                bar ":|"
                meter 4* 4
index 2b15b352e866a14fd84438e2f8ee417cd43e4399..1d758796b2bd0b78a8e0a6834855f6fb72fca3f6 100644 (file)
@@ -20,6 +20,7 @@
 %x notes
 %x incl
 %x quote
+%x lyrics
 
 
 
@@ -27,6 +28,9 @@ A             [a-zA-Z]
 AA             {A}|_
 N              [0-9]
 AN             {AA}|{N}
+PUNCT          [?!,.:;]
+ACCENT         [\\'"^]
+TEX            {AA}|-|{PUNCT}|{ACCENT}
 
 WORD           {A}{AN}*
 ALPHAWORD      {A}+
@@ -39,6 +43,8 @@ RESTNAME      r|s|p
 NOTECOMMAND    \\{WORD}
 NOTENAME       {ALPHAWORD}
 DOTS           \.+
+LYRICS         {TEX}+
+COMMENT                [%#].*\n
 
 %%
 
@@ -46,6 +52,10 @@ DOTS         \.+
        BEGIN(notes); 
 }
 
+\@             {
+       BEGIN(lyrics); 
+}
+
 <notes>{RESTNAME}      {
        const char *s = YYText();
        yylval.string = new String (s); 
@@ -95,8 +105,7 @@ DOTS         \.+
        yylval.i = String(YYText()).value();
        return INT;
 }
-<notes>[%#].*\n                { 
-
+<notes>{COMMENT}       {
 }
 <notes>[ \t\n]+                {
 
@@ -114,13 +123,8 @@ DOTS               \.+
        yylval.string = new String(s);
        return STRING;
 }
-<notes>[()\[\]|/.^>_-] {
-       return yylval.c = YYText()[0];
-
-}
 <notes>.       {
-       String s("lexer error: illegal character found: " + String(YYText()));
-       yyerror(s);
+       return yylval.c = YYText()[0];
 }
 
 \"             {
@@ -135,6 +139,61 @@ DOTS               \.+
        return STRING;
 }
 
+<lyrics>{DOTS}         {
+       yylval.i = strlen(YYText());
+       return DOTS;
+}
+<lyrics>{INT}          {
+       yylval.i = String(YYText()).value();
+       return INT;
+}
+<lyrics>{NOTECOMMAND}  {
+       String c = YYText() +1;
+       mtor << "\\word: " << YYText()+1<<eol;
+       int l = lookup_keyword(c);
+       if (l != -1)
+               return l;
+       Identifier * id = lookup_identifier(c);
+       if (id) {               
+               yylval.id = id;
+               return IDENTIFIER;
+       }
+       String *sp = new String( c);
+
+       yylval.string=sp;
+       return NEWIDENTIFIER;
+}
+<lyrics>\"[^\"]*\" {
+       String s (YYText()+1);
+       s = s.left(s.len()-1);
+       yylval.string = new String(s);
+       return STRING;
+}
+<lyrics>{LYRICS} {
+       String s (YYText()); 
+       int i = 0;
+       while ((i=s.pos("_")) != 0)// ugh. Whats this.
+               *((char*)s.cptr() + i - 1) = ' ';
+       if ((i=s.pos("\\,")) !=0)
+               {
+               *((char*)s.cptr() + i) = 'c';
+               s = s.left(i+1) + " " + s.right(s.len()-i-1);
+               }
+       yylval.string = new String(s);
+       return STRING;
+}
+<lyrics>\|     {
+       return YYText()[0];
+}
+<lyrics>{COMMENT}              { 
+
+}
+<lyrics>[ \t\n]+               {
+}
+<lyrics>@      {
+       BEGIN(INITIAL); 
+}
+
 <<EOF>> {
        mtor << "<<EOF>>";
 
@@ -193,7 +252,7 @@ include           { BEGIN(incl); }
        
 }
 
-%.*            {
+{COMMENT}              {
        //ignore
 }
 .              {
index c6a65e016e3ea33523b530579685139102a84aae..69fc3123b8864edf418afbd947215667ea6f60d1 100644 (file)
@@ -1,7 +1,7 @@
 #include "staff.hh"
 #include "score.hh"
 #include "voice.hh"
-#include "swalker.hh"
+#include "staffwalker.hh"
 #include "stcol.hh"
 #include "sccol.hh"
 #include "staffcommands.hh"
@@ -15,10 +15,25 @@ Staff::do_commands(PointerList<Input_command*> score_wide,
                   PointerList<Input_command*> staff_wide)
 {
     Input_commands commands;
+
+    // bring in commands from voices.
+    for (iter_top(voices, i); i.ok(); i++) {
+       Moment here = i->start;
+       for (iter_top(i->elts, j); j.ok(); j++) {
+           for (iter_top(j->reqs, k); k.ok(); k++) {
+               if (k->command()){
+                   commands.find_moment(here);
+                   commands.add(*k->command()->com_p_,
+                                score_l_->markers_assoc_);
+               }
+           }
+           here += j->duration;
+       }
+    }
     for (iter_top(score_wide,i); i.ok(); i++) 
        commands.add(**i, score_l_->markers_assoc_);
     for (iter_top(staff_wide,i); i.ok(); i++) 
-       commands.add(**i,score_l_->markers_assoc_);
+       commands.add(**i, score_l_->markers_assoc_);
 
     commands.parse(this);
 }
index 9ffb981c852e4970812c5294771a63bf174eb7ca..275a47f0d9b57b1554b1f805435ed5012235b404 100644 (file)
@@ -68,7 +68,7 @@ Time_description::set_meter(int l, int o)
     one_beat = 1/Moment(o);
     whole_per_measure = Moment(l) * one_beat;
     if(whole_in_measure)
-       error_t("Meterchange should be at start of measure", when);
+       error_t("Meterchange should be at start of measure", *this);
 }
 
 void
index 82a004875aaa91b17cfed0f40c566c317aca6da1..87f7152e41f9b72543e31663c7a1d3ad66b3b3af 100644 (file)
@@ -27,8 +27,8 @@ error(String s)
 void
 error_t(const String& s, const Moment& r)
 {
-    String t_mom = String(trunc(r)) +  (r - Moment(trunc(r)));
-    String e=s+ "(t = " +  t_mom + ")";
+    String t_mom = String(trunc(r)) + String(r - Moment(trunc(r)));
+    String e=s+ " (t = " +  t_mom + ")";
     error(e);
 }
 
@@ -36,6 +36,6 @@ error_t(const String& s, const Moment& r)
 void
 error_t(const String& s, Time_description const &t_tdes)
 {
-    String e=s+ "(at " + t_tdes.bars + ": " + t_tdes.whole_in_measure + ")\n";
+    String e=s+ " (at t=" + t_tdes.bars + ": " + t_tdes.whole_in_measure + ")\n";
     error(e);
 }