]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/my-lily-parser.cc
release: 1.5.29
[lilypond.git] / lily / my-lily-parser.cc
index b19386cb309529d7f339d6902378752be4989589..730a6db3430f9cbfbdc1c768369742de5ede32cd 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
        Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
@@ -21,19 +21,19 @@ My_lily_parser::My_lily_parser (Sources * source_l)
   lexer_p_ = 0;
   default_duration_ = Duration (2,0);
   error_level_i_ = 0;
-
+  last_beam_start_ = SCM_EOL;
 
   default_header_p_ =0;
 }
 
-My_lily_parser::~My_lily_parser()
+My_lily_parser::~My_lily_parser ()
 {
   delete lexer_p_;
   delete default_header_p_;
 }
 
 void
-My_lily_parser::set_version_check (bool )
+My_lily_parser::set_version_check (bool)
 {
 }
 
@@ -44,13 +44,15 @@ My_lily_parser::parse_file (String init, String s)
 
   lexer_p_->main_input_str_ = s;
 
-  progress_indication (_("Parsing..."));
+  progress_indication (_ ("Parsing..."));
 
-  set_yydebug (flower_dstream &&!flower_dstream->silent_b ("Parser"));
+  set_yydebug (0);
   lexer_p_->new_input (init, source_l_);
   do_yyparse ();
 
-  if (!define_spot_array_.empty())
+  progress_indication ("\n");
+  
+  if (!define_spot_array_.empty ())
     {
       define_spot_array_.top ().warning (_ ("Braces don't match"));
       error_level_i_ = 1;
@@ -62,40 +64,35 @@ My_lily_parser::parse_file (String init, String s)
 }
 
 void
-My_lily_parser::remember_spot()
+My_lily_parser::push_spot ()
 {
-  define_spot_array_.push (here_input());
+  define_spot_array_.push (here_input ());
 }
 
 char const *
-My_lily_parser::here_ch_C() const
+My_lily_parser::here_ch_C () const
 {
-  return lexer_p_->here_ch_C();
+  return lexer_p_->here_ch_C ();
 }
 
 void
 My_lily_parser::parser_error (String s)
 {
-  here_input().error (s);
+  here_input ().error (s);
   error_level_i_ = 1;
-  exit_status_i_ = 1;
+  exit_status_global = 1;
 }
 
-void
-My_lily_parser::set_last_duration (Duration const *d)
-{
-  default_duration_ = *d;
-}
 
 
 Input
-My_lily_parser::pop_spot()
+My_lily_parser::pop_spot ()
 {
-  return define_spot_array_.pop();
+  return define_spot_array_.pop ();
 }
 
 Input
-My_lily_parser::here_input() const
+My_lily_parser::here_input () const
 {
   return  lexer_p_->here_input ();
 }
@@ -106,7 +103,7 @@ My_lily_parser::here_input() const
 
 My_lily_parser * current_parser;
 
-MAKE_SCHEME_CALLBACK(My_lily_parser,paper_description, 0);
+MAKE_SCHEME_CALLBACK (My_lily_parser,paper_description, 0);
 
 SCM
 My_lily_parser::paper_description ()
@@ -118,10 +115,10 @@ My_lily_parser::paper_description ()
 
   SCM al = p->translator_p_dict_p_->to_alist ();
   SCM l = SCM_EOL;
-  for (SCM s = al ; gh_pair_p (s); s = gh_cdr (s))
+  for (SCM s = al ; gh_pair_p (s); s = ly_cdr (s))
     {
-      Translator_def * td = unsmob_translator_def (gh_cdar (s));
-      l = gh_cons (gh_cons (gh_caar (s), td->to_alist ()),  l);
+      Translator_def * td = unsmob_translator_def (ly_cdar (s));
+      l = gh_cons (gh_cons (ly_caar (s), td->to_alist ()),  l);
     }
   return l;  
 }