]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.27
authorfred <fred>
Sun, 24 Mar 2002 19:30:20 +0000 (19:30 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:30:20 +0000 (19:30 +0000)
Sources.make
src/complexstaff.cc
src/mylexer.cc

index e4e9834da69a37c0959abe48cb3299e0f5d998c3..56e9623b54090e9ba03ff99f8f1fa2647a6ce8e4 100644 (file)
@@ -1,10 +1,10 @@
 # -*- Makefile-*-
 # sourcefiles to be shipped. Also for dependencies
 
-hdr=   accidental.hh bar.hh beam.hh boxes.hh break.hh clef.hh clefitem.hh\
+hdr=   bar.hh beam.hh boxes.hh break.hh clef.hh clefitem.hh\
        command.hh complexwalker.hh complexstaff.hh\
        const.hh debug.hh dimen.hh directionalspanner.hh\
-       getcommand.hh glob.hh globvars.hh grouping.hh idealspacing.hh\
+       getcommand.hh glob.hh  grouping.hh idealspacing.hh\
        identifier.hh identparent.hh inputcommand.hh inputcommands.hh\
        inputmusic.hh inputscore.hh inputstaff.hh item.hh key.hh keyitem.hh\
        keyword.hh leastsquares.hh lexer.hh linespace.hh linepstaff.hh\
@@ -16,14 +16,16 @@ hdr=   accidental.hh bar.hh beam.hh boxes.hh break.hh clef.hh clefitem.hh\
        qlpsolve.hh register.hh request.hh rest.hh rhythmstaff.hh\
        sccol.hh score.hh\
        scoreline.hh script.hh scriptdef.hh simplestaff.hh simplewalker.hh\
-       slur.hh spanner.hh staff.hh staffcommands.hh staffelem.hh staffline.hh\
+       slur.hh source.hh sourcefile.hh spanner.hh staff.hh staffcommands.hh\
+       staffelem.hh staffline.hh\
        stcol.hh stem.hh staffwalker.hh symbol.hh symtable.hh\
        tex.hh textdef.hh\
-       textitem.hh textspanner.hh timedescription.hh tstream.hh voice.hh
+       textitem.hh textspanner.hh timedescription.hh tstream.hh voice.hh\
+       voicegroup.hh
 
 mycc=bar.cc beam.cc boxes.cc break.cc calcideal.cc clef.cc\
        clefitem.cc command.cc complexstaff.cc complexwalker.cc \
-       complexmelodicstaff.cc complexprint.cc debug.cc dimen.cc\
+        complexprint.cc debug.cc dimen.cc\
        directionalspanner.cc\
        getcommands.cc grouping.cc groupregs.cc idealspacing.cc identifier.cc\
        inputcommand.cc inputcommands.cc inputmusic.cc inputscore.cc\
@@ -36,11 +38,21 @@ mycc=bar.cc beam.cc boxes.cc break.cc calcideal.cc clef.cc\
        paper.cc pcol.cc pscore.cc pstaff.cc qlp.cc qlpsolve.cc\
        register.cc request.cc rest.cc rhythmstaff.cc sccol.cc score.cc\
        scoreline.cc scores.cc script.cc scriptdef.cc simpleprint.cc\
-       simplestaff.cc simplewalker.cc slur.cc spanner.cc staff.cc\
+       simplestaff.cc simplewalker.cc slur.cc source.cc sourcefile.cc\
+       spanner.cc staff.cc\
        staffcommands.cc staffelem.cc staffline.cc stcol.cc stem.cc\
-       staffwalker.cc symbol.cc symtable.cc table.cc tex.cc texbeam.cc\
+       staffwalker.cc symbol.cc symtable.cc  tex.cc texbeam.cc\
        texslur.cc textdef.cc textitem.cc textspanner.cc\
        timedescription.cc tstream.cc voice.cc voiceregs.cc voicegroup.cc\
-       warn.cc wordwrap.cc\
+       warn.cc windhoos-suck-suck-suck-thank-you-cygnus.cc wordwrap.cc\
        template1.cc template2.cc template3.cc template4.cc\
-       template5.cc template6.cc version.cc
\ No newline at end of file
+       template5.cc template6.cc version.cc
+
+# a bit of a hack to keep exec size under control.
+stablecc=request.cc bar.cc boxes.cc break.cc  clef.cc getcommands.cc grouping.cc\
+       item.cc keyword.cc leastsquares.cc \
+       linepstaff.cc linespace.cc lookup.cc molecule.cc meter.cc\
+       paper.cc parser.cc lexer.cc pstaff.cc qlp.cc qlpsolve.cc\
+       template1.cc template2.cc template3.cc template4.cc\
+       template5.cc template6.cc version.cc tstream.cc  tex.cc\
+       voice.cc wordwrap.cc spanner.cc 
index ffa667ea857300790aa8ce19857fbde518311d2a..8f961b7d7b60baf92e959ef60127d29fe34ff6d4 100644 (file)
@@ -30,7 +30,7 @@ Complex_column::setup_requests()
 
            if (j->barcheck()) {
                if (tdescription_->whole_in_measure) {
-                   error("Barcheck failed, " + tdescription_->str());
+                   error( "Barcheck failed", j->defined_ch_c_l_m );
                }
                continue;
            }
@@ -38,7 +38,10 @@ Complex_column::setup_requests()
                continue;
            if (j->command())
                continue;
-           todo_l_arr_.push(j);
+           if (j->groupchange()) // ugh
+               first_l_arr_.push(j);
+           else
+               second_l_arr_.push(j);
        }
 }
 
index acda945d3fe55e7a46d4734820ccdddbc7f53e44..9465279c4a74d1981970e106f5a85bad438a6436 100644 (file)
@@ -1,3 +1,4 @@
+#include <strstream.h>
 #include "interval.hh"
 #include "identparent.hh"
 #include "associter.hh"
@@ -9,6 +10,7 @@
 #include "sstack.hh"
 #include "debug.hh"
 #include "notename.hh"
+#include "sourcefile.hh"
 
 static Keyword_ent the_key_tab[]={
     "bar", BAR,
@@ -25,6 +27,7 @@ static Keyword_ent the_key_tab[]={
     "mark", MARK,
     "meter", METER,
     "mm", MM,
+    "multivoice", MULTIVOICE,
     "octave", OCTAVECOMMAND,
     "output", OUTPUT,
     "partial", PARTIAL,
@@ -36,13 +39,12 @@ static Keyword_ent the_key_tab[]={
     "skip", SKIP,
     "staff", STAFF,
     "start", START_T,
+    "stem", STEM,
     "table", TABLE,
     "symboltables", SYMBOLTABLES,
     "notenames", NOTENAMES,
     "texid", TEXID,
     "textstyle", TEXTSTYLE,
-    "chord", CHORD,
-    "multi", MULTI,
     "unitspace", UNITSPACE,
     "voice", VOICE,
     "voices", VOICES,
@@ -52,11 +54,35 @@ static Keyword_ent the_key_tab[]={
     0,0
 };
 
+int
+My_flex_lexer::ret_notename(int *p, String text, int octave_mod)
+{
+    text.lower();
+    char const* ch_c_l = here_ch_c_l();
+    ch_c_l--;
+    while ( ( *ch_c_l == ' ' ) || ( *ch_c_l == '\t' ) || ( *ch_c_l == '\n' ) )
+       ch_c_l--;
+    ch_c_l++;
+       
+    lookup_notename(p[0], p[1], text);
+    p[2] = octave_mod;
+    mtor << "notename: "<< text <<eol;
+    if (p[0] < 0) {
+
+       errorlevel_i_ |= 1;
+       warning( String( "notename does not exist: " ) +YYText() + ": ", ch_c_l );
+       p[0] = p[1] = 0;
+    }
+    return NOTENAME;
+}
+
 My_flex_lexer::My_flex_lexer()
 {
     keytable = new Keyword_table(the_key_tab);
     the_id_tab = new Assoc<String, Identifier*>;
     defaulttab = 0;
+    data_ch_c_l_m = 0;
+    errorlevel_i_ = 0;
 }
 
 int
@@ -74,6 +100,12 @@ My_flex_lexer::lookup_identifier(String s)
     return (*the_id_tab)[s];
 }
 
+char const*
+My_flex_lexer::here_ch_c_l()
+{
+    return data_ch_c_l_m + yyin->tellg();
+}
+
 void
 My_flex_lexer::add_identifier(Identifier*i)
 {
@@ -95,7 +127,7 @@ My_flex_lexer::~My_flex_lexer()
 String
 My_flex_lexer::spot()const
 {
-    return include_stack.top()->name +  ": " + lineno();
+    return include_stack.top()->name +  ": " + String( lineno() );
 }
 
 void
@@ -103,10 +135,16 @@ My_flex_lexer::LexerError(const char *s)
 {
     if (lexer->include_stack.empty()) {
        *mlog << "error at EOF" << s << '\n';
-    }else 
-       *mlog << spot() << ": error:" << s << '\n';
-     exit(1);
+    } else {
+       char const* ch_c_l = here_ch_c_l();
+       ch_c_l--;
+       while ( ( *ch_c_l == ' ' ) || ( *ch_c_l == '\t' ) || ( *ch_c_l == '\n' ) )
+               ch_c_l--;
+       ch_c_l++;
+       error( s, ch_c_l );
+    }
 }
+
 // set the  new input to s, remember old file.
 void
 My_flex_lexer::new_input(String s)
@@ -117,6 +155,7 @@ My_flex_lexer::new_input(String s)
    Input_file *newin = new Input_file(s);
    include_stack.push(newin);
    switch_streams(newin->is);
+   data_ch_c_l_m = newin->sourcefile_l_->ch_c_l();
    yylineno = 1;
 }