]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/my-lily-parser.cc
release: 1.3.0
[lilypond.git] / lily / my-lily-parser.cc
index 996cc8c5693987248ec3ebf1631dbf38777f33be..11ae2eeda45ac03929a2b17894f45bf7b3e8e4c8 100644 (file)
@@ -14,6 +14,7 @@
 #include "music-list.hh"
 #include "musical-request.hh"
 #include "command-request.hh"
+#include "lily-guile.hh"
 #include "parser.hh"
 #include "scope.hh"
 #include "file-results.hh"
@@ -27,7 +28,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,17 +61,19 @@ 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 (flower_dstream &&!flower_dstream->silent_b ("Parser"));
   lexer_p_->new_input (init, source_l_);
   do_yyparse ();
 
   if (!define_spot_array_.empty())
     {
-      warning (_ ("braces don't match"));
+      warning (_ ("Braces don't match"));
       error_level_i_ = 1;
     }
 
   inclusion_global_array = lexer_p_->filename_str_arr_;
+
+  error_level_i_ = error_level_i_ | lexer_p_->errorlevel_i_; // ugh naming.
 }
 
 void
@@ -93,14 +98,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 +197,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*