]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lily-parser.cc
Merge branch 'lilypond/translation' of ssh://trettig@git.sv.gnu.org/srv/git/lilypond...
[lilypond.git] / lily / lily-parser.cc
index cfa8d3f9400d51466db40aa57e005c5d2d5cb03c..13d62ebc5c762eb68873bace69250e14687026dd 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
   Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #include "international.hh"
 #include "lily-lexer.hh"
 #include "lily-version.hh"
-#include "lilypond-key.hh"
+#include "ly-module.hh"
 #include "main.hh"
 #include "output-def.hh"
 #include "paper-book.hh"
 #include "parser.hh"
 #include "score.hh"
-#include "source.hh"
+#include "sources.hh"
 #include "text-metrics.hh"
 #include "warn.hh"
+#include "program-option.hh"
 
 #include "ly-smobs.icc"
 
@@ -86,12 +87,11 @@ Lily_parser::print_smob (SCM s, SCM port, scm_print_state*)
 void
 Lily_parser::parse_file (string init, string name, string out_name)
 {
-  if (output_backend_global == "tex")
+  if (get_output_backend_name () == "tex")
     try_load_text_metrics (out_name);
 
   // TODO: use $parser 
-  lexer_->set_identifier (ly_symbol2scm ("parser"),
-                         self_scm ());
+  lexer_->set_identifier (ly_symbol2scm ("parser"), self_scm ());
   output_basename_ = out_name;
 
   lexer_->main_input_name_ = name;
@@ -207,7 +207,6 @@ get_layout (Lily_parser *parser)
   Output_def *layout = unsmob_output_def (id);
   layout = layout ? layout->clone () : new Output_def;
   layout->set_variable (ly_symbol2scm ("is-layout"), SCM_BOOL_T);
-  layout->parser_ = parser;
     
   return layout;
 }
@@ -219,7 +218,6 @@ get_midi (Lily_parser *parser)
   Output_def *layout = unsmob_output_def (id);
   layout = layout ? layout->clone () : new Output_def;
   layout->set_variable (ly_symbol2scm ("is-midi"), SCM_BOOL_T);
-  layout->parser_ = parser;
   return layout;
 }
 
@@ -231,7 +229,6 @@ get_paper (Lily_parser *parser)
 
   layout = layout ? dynamic_cast<Output_def *> (layout->clone ()) : new Output_def;
   layout->set_variable (ly_symbol2scm ("is-paper"), SCM_BOOL_T);
-  layout->parser_ = parser;
   return layout;
 }
 
@@ -254,5 +251,6 @@ get_header (Lily_parser *parser)
 SCM 
 Lily_parser::make_scope () const
 {
-  return ly_make_anonymous_module (be_safe_global);
+  SCM module = ly_make_anonymous_module (be_safe_global);
+  return module;    
 }