]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/my-lily-parser.cc
release: 1.1.0
[lilypond.git] / lily / my-lily-parser.cc
index de8ae42c14ba2a53ec12aede95e2fdd4fbced160..f3cdf87abaaa5ab9183586980a0e509094a2fc3b 100644 (file)
@@ -14,7 +14,7 @@
 #include "musical-request.hh"
 #include "command-request.hh"
 #include "parser.hh"
-#include "header.hh"
+#include "scope.hh"
 #include "file-results.hh"
 #include "midi-def.hh"
 #include "paper-def.hh"
@@ -171,7 +171,7 @@ My_lily_parser::get_note_element (Note_req *rq, Duration * duration_p)
       assert (!duration_p->plet_b ());
       duration_p->set_plet (1, 2);
     }
-  rq->set_duration (*duration_p);
+  rq->duration_ = *duration_p;
   rq->set_spot (here_input ());
   delete duration_p ;
   return v;
@@ -240,22 +240,22 @@ My_lily_parser::get_parens_request (int t)
   switch (t)
     {
     case BEAMPLET:
-      reqs.top ()->access_Span_req ()->spantype = Span_req::START;
+      dynamic_cast<Span_req*> (reqs.top ())->spantype = Span_req::START;
       /* fall through */
     case '<':
     case '>':
     case '(':
     case '[':
     case PLET:
-      reqs[0]->access_Span_req ()->spantype = Span_req::START;
+      dynamic_cast<Span_req*> (reqs.top ())->spantype = Span_req::START;
       break;
     case MAEBTELP:
-      reqs.top ()->access_Span_req ()->spantype = Span_req::STOP;
+      dynamic_cast<Span_req*> (reqs.top ())->spantype = Span_req::STOP;
       /* fall through */
     case '!':
     case ')':
     case ']':
-      reqs[0]->access_Span_req ()->spantype = Span_req::STOP;
+      dynamic_cast<Span_req*> (reqs[0])->spantype = Span_req::STOP;
       break;
 
     default:
@@ -263,9 +263,9 @@ My_lily_parser::get_parens_request (int t)
     }
 
   for (int i = 0; i < reqs.size (); i++)
-    if (reqs[i]->access_Musical_req ()->access_Span_dynamic_req ())
+    if (dynamic_cast<Span_dynamic_req*> (reqs[i]))
       {
-       Span_dynamic_req* s_l= (reqs[i]->access_Musical_req ()->access_Span_dynamic_req ()) ;
+       Span_dynamic_req* s_l= dynamic_cast<Span_dynamic_req*> (reqs[i]);
        s_l->dynamic_dir_ = (t == '<') ? UP:DOWN;
       }
 
@@ -314,7 +314,7 @@ Paper_def*
 My_lily_parser::default_paper_p ()
 {
   Identifier *id = lexer_p_->lookup_identifier ("$defaultpaper");
-  return id ? id->access_Paper_def () : (Paper_def*)global_paper_l->clone ();
+  return id ? id->access_Paper_def () : new Paper_def ;
 }
 
 Midi_def*