]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.5.4.jcn2
authorJan Nieuwenhuizen <janneke@gnu.org>
Thu, 9 Aug 2001 22:46:12 +0000 (00:46 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Thu, 9 Aug 2001 22:46:12 +0000 (00:46 +0200)
1.5.4.jcn2

CHANGES
VERSION
lily/include/my-lily-parser.hh
lily/my-lily-parser.cc
lily/parser.yy

diff --git a/CHANGES b/CHANGES
index cdd2e4841b85f6c7924258a707c3b34a3122e6bf..3ca78e9e6f0b20754b849db9a7f7050c7a1f3a5f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
-1.5.4.jcn1
+1.5.4.jcn2
 ==========
 
+* Fixed off by one error for point and click.
+
 * Website fixes, found bug in grace note stem lengths.
 
 1.5.4
diff --git a/VERSION b/VERSION
index 706c6e07de74eb50db0088bd44a26ce18a4c9886..5bfd0ea4fbecf4db403155388890a394df14a6be 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=5
 PATCH_LEVEL=4
-MY_PATCH_LEVEL=jcn1
+MY_PATCH_LEVEL=jcn2
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 0e8b8f2b86dbd18805a5dd0a7d65d0650b70e1a4..b82571b20c04a99df03cb7b34deaba784b0d3a65 100644 (file)
@@ -50,7 +50,7 @@ public:
   bool ignore_version_b_;
   
   Input here_input () const;
-  void remember_spot ();
+  void push_spot ();
   Input pop_spot ();
     
   void do_yyparse ();
index f6553c9cb5eac5b73a8e4575c0f6483bff5245cc..4a44f5919a8f814821e23923db12fd8f430bdaa2 100644 (file)
@@ -64,7 +64,7 @@ My_lily_parser::parse_file (String init, String s)
 }
 
 void
-My_lily_parser::remember_spot ()
+My_lily_parser::push_spot ()
 {
   define_spot_array_.push (here_input ());
 }
index b9f4793d2c50450cad3c7c9bd15b1d567ff385f2..720732e88c5b0d4411e0a7c808f549e30a797964 100644 (file)
@@ -409,7 +409,7 @@ lilypond_header:
 */
 assignment:
        STRING {
-               THIS->remember_spot ();
+               THIS->push_spot ();
        }
        /* cont */ '=' identifier_init  {
 
@@ -535,7 +535,7 @@ translator_spec_body:
 */
 score_block:
        SCORE { 
-               THIS->remember_spot ();
+               THIS->push_spot ();
        }
        /*cont*/ '{' score_body '}'     {
                THIS->pop_spot ();
@@ -856,7 +856,7 @@ Composite_music:
                $$ = csm;
        }
        | TIMES {
-               THIS->remember_spot ();
+               THIS->push_spot ();
        }
        /* CONTINUED */ 
                fraction Music  
@@ -1076,18 +1076,19 @@ scalar:
 
 
 request_chord:
-       pre_requests simple_element post_requests       {
-               Music_sequence *l = dynamic_cast<Music_sequence*> ($2);
+       pre_requests {
+               THIS->push_spot ();
+       } /*cont */ simple_element post_requests        {
+               Music_sequence *l = dynamic_cast<Music_sequence*> ($3);
                if (l) {
                        for (int i=0; i < $1->size (); i++)
                                l->append_music ($1->elem (i));
-                       for (int i=0; i < $3->size (); i++)
-                               l->append_music ($3->elem (i));
+                       for (int i=0; i < $4->size (); i++)
+                               l->append_music ($4->elem (i));
                        }
                else
                        programming_error ("Need Sequence to add music to");
-               $$ = $2;
-               
+               $$ = $3;
        }
        | command_element
        ;
@@ -1675,6 +1676,8 @@ tremolo_type:
 
 simple_element:
        pitch exclamations questions optional_notemode_duration {
+
+               Input i = THIS->pop_spot ();
                if (!THIS->lexer_p_->note_state_b ())
                        THIS->parser_error (_ ("Have to be in Note mode for notes"));
 
@@ -1691,40 +1694,36 @@ simple_element:
                Simultaneous_music*v = new Request_chord (SCM_EOL);
                v->set_mus_property ("elements", gh_list (n->self_scm (), SCM_UNDEFINED));
                
-/*
-FIXME: location is one off, since ptich & duration don't contain origin refs. 
-*/
-               v->set_spot (THIS->here_input ());
-               n->set_spot (THIS->here_input ());
-
+               v->set_spot (i);
+               n->set_spot (i);
                $$ = v;
        }
        | RESTNAME optional_notemode_duration           {
 
-               SCM e = SCM_UNDEFINED;
-                 if (ly_scm2string ($1) =="s")
-                   { /* Space */
-                     Skip_req * skip_p = new Skip_req;
-                     skip_p->set_mus_property ("duration" ,$2);
-
-                     skip_p->set_spot (THIS->here_input ());
+               Input i = THIS->pop_spot ();
+               SCM e = SCM_UNDEFINED;
+               if (ly_scm2string ($1) =="s") {
+                       /* Space */
+                       Skip_req * skip_p = new Skip_req;
+                       skip_p->set_mus_property ("duration" ,$2);
+                       skip_p->set_spot (i);
                        e = skip_p->self_scm ();
-                   }
-                 else
-                   {
-                     Rest_req * rest_req_p = new Rest_req;
-                     rest_req_p->set_mus_property ("duration", $2);
-                     rest_req_p->set_spot (THIS->here_input ());
+                 }
+                 else {
+                       Rest_req * rest_req_p = new Rest_req;
+                       rest_req_p->set_mus_property ("duration", $2);
+                       rest_req_p->set_spot (i);
                        e = rest_req_p->self_scm ();
                    }
-                 Simultaneous_music* velt_p = new Request_chord (SCM_EOL);
+               Simultaneous_music* velt_p = new Request_chord (SCM_EOL);
                velt_p-> set_mus_property ("elements", gh_list (e,SCM_UNDEFINED));
-                 velt_p->set_spot (THIS->here_input ());
-
+               velt_p->set_spot (i);
 
-                 $$ = velt_p;
+               $$ = velt_p;
        }
        | MULTI_MEASURE_REST optional_notemode_duration         {
+               Input = THIS->pop_spot ();
+
                Skip_req * sk = new Skip_req;
                sk->set_mus_property ("duration", $2);
                Span_req *sp1 = new Span_req;
@@ -1748,19 +1747,20 @@ FIXME: location is one off, since ptich & duration don't contain origin refs.
                $$->set_mus_property ("elements", ms);
        }
        | STRING optional_notemode_duration     {
+               Input = THIS->pop_spot ();
 
                Lyric_req* lreq_p = new Lyric_req;
                 lreq_p->set_mus_property ("text", $1);
                lreq_p->set_mus_property ("duration",$2);
-               lreq_p->set_spot (THIS->here_input ());
+               lreq_p->set_spot (i);
                Simultaneous_music* velt_p = new Request_chord (SCM_EOL);
                velt_p->set_mus_property ("elements", gh_list (lreq_p->self_scm (), SCM_UNDEFINED));
 
-
                $$= velt_p;
-
        }
        | chord {
+               Input = THIS->pop_spot ();
+
                if (!THIS->lexer_p_->chord_state_b ())
                        THIS->parser_error (_ ("Have to be in Chord mode for chords"));
                $$ = $1;