]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/my-lily-parser.cc
release: 1.1.7
[lilypond.git] / lily / my-lily-parser.cc
index 9f7e8c7fb3ac77a384229cf8062acfac19c35f00..86270bf7c38fc8b368f448da97e6a9c9ecb134cd 100644 (file)
@@ -29,6 +29,7 @@ My_lily_parser::My_lily_parser (Sources * source_l)
   default_duration_.durlog_i_ = 2;
   default_abbrev_i_ = 0;
   error_level_i_ = 0;
+  extender_req = 0;
   fatal_error_i_ = 0;
   default_header_p_ =0;
 }
@@ -177,6 +178,10 @@ My_lily_parser::get_note_element (Note_req *rq, Duration * duration_p)
   return v;
 }
 
+
+/*
+  UGH.
+ */
 Array<Request*>*
 My_lily_parser::get_parens_request (int t)
 {
@@ -240,22 +245,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 +268,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,13 +319,13 @@ Paper_def*
 My_lily_parser::default_paper_p ()
 {
   Identifier *id = lexer_p_->lookup_identifier ("$defaultpaper");
-  return id ? id->access_Paper_def () : new Paper_def ;
+  return id ? id->access_content_Paper_def (true) : new Paper_def ;
 }
 
 Midi_def*
 My_lily_parser::default_midi_p ()
 {
   Identifier *id = lexer_p_->lookup_identifier ("$defaultmidi");
-  return id ? id->access_Midi_def () : new Midi_def ;
+  return id ? id->access_content_Midi_def (true) : new Midi_def ;
 }