]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/my-lily-parser.cc
release: 1.2.7
[lilypond.git] / lily / my-lily-parser.cc
index 996cc8c5693987248ec3ebf1631dbf38777f33be..de8b7c66bd03ee99646ecb4ae7996f04073460bf 100644 (file)
@@ -27,7 +27,9 @@ My_lily_parser::My_lily_parser (Sources * source_l)
   first_b_ = true;
   source_l_ = source_l;
   lexer_p_ = 0;
+  abbrev_beam_type_i_ = 0;
   default_duration_.durlog_i_ = 2;
+  default_pitch_ = Musical_pitch (5*7, 0);
   error_level_i_ = 0;
 
   fatal_error_i_ = 0;
@@ -58,7 +60,7 @@ My_lily_parser::parse_file (String init, String s)
   *mlog << _ ("Parsing...");
 
   init_parse_b_ = false;
-  set_yydebug (!monitor->silent_b ("Parser") && check_debug);
+  set_yydebug (!lily_monitor->silent_b ("Parser") && check_debug);
   lexer_p_->new_input (init, source_l_);
   do_yyparse ();
 
@@ -69,6 +71,8 @@ My_lily_parser::parse_file (String init, String s)
     }
 
   inclusion_global_array = lexer_p_->filename_str_arr_;
+
+  error_level_i_ = error_level_i_ | lexer_p_->errorlevel_i_; // ugh naming.
 }
 
 void
@@ -93,14 +97,24 @@ My_lily_parser::parser_error (String s)
   exit_status_i_ = 1;
 }
 
-
-
 void
 My_lily_parser::set_last_duration (Duration const *d)
 {
   default_duration_ = *d;
 }
 
+void
+My_lily_parser::set_abbrev_beam (int type_i)
+{
+  abbrev_beam_type_i_ = type_i;
+}
+
+void
+My_lily_parser::set_last_pitch (Musical_pitch const* p)
+{
+  default_pitch_ = *p;
+}
+
 // junk me
 Simultaneous_music*
 My_lily_parser::get_word_element (String s, Duration * duration_p)
@@ -182,8 +196,7 @@ My_lily_parser::pop_spot()
 Input
 My_lily_parser::here_input() const
 {
-  Source_file * f_l= lexer_p_->source_file_l();
-  return Input (f_l, here_ch_C());
+  return  lexer_p_->here_input ();
 }
 
 Paper_def*