]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lily-parser.cc
*** empty log message ***
[lilypond.git] / lily / lily-parser.cc
index 5827f75a9555e2b9e80d86f9928e98bb0448c930..c489c356f2982e5220af812f60767fcce6d04601 100644 (file)
@@ -29,7 +29,7 @@ Lily_parser::Lily_parser (Sources *sources)
   score_count_ = 0;
   lexer_ = 0;
   sources_ = sources;
-  default_duration_ = Duration (2,0);
+  default_duration_ = Duration (2, 0);
   error_level_ = 0;
   last_beam_start_ = SCM_EOL;
 
@@ -118,7 +118,11 @@ Lily_parser::parse_file (String init, String name, String out_name)
 void
 Lily_parser::parse_string (String ly_code)
 {
-  Lily_lexer *parent = lexer_;
+#if 0
+  SCM parent_prot = lexer_ ? lexer_->self_scm () : SCM_EOL;
+#endif
+
+  Lily_lexer * parent = lexer_;
   lexer_ = (parent == 0 ? new Lily_lexer (sources_)
            : new Lily_lexer (*parent));
   scm_gc_unprotect_object (lexer_->self_scm ());
@@ -146,9 +150,12 @@ Lily_parser::parse_string (String ly_code)
 
   error_level_ = error_level_ | lexer_->error_level_;
 
-  if (parent != 0)
+#if 0
+  if (Lily_lexer::unsmob (parent_prot))
     {
-      parent->keytable_ = lexer_->keytable_;
+      /*
+       what the fuck is this good for?
+       */
       parent->encoding_ = lexer_->encoding_;
       parent->chordmodifier_tab_ = lexer_->chordmodifier_tab_;
       parent->pitchname_tab_stack_ = lexer_->pitchname_tab_stack_;
@@ -157,7 +164,10 @@ Lily_parser::parse_string (String ly_code)
       parent->error_level_ = lexer_->error_level_; 
       parent->main_input_b_ = lexer_->main_input_b_;
     }
-
+  
+  scm_remember_upto_here_1 (parent_prot);
+#endif
+  
   scm_set_current_module (oldmod);
   lexer_ = 0;
 }