/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 1996--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 1996--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
LilyPond is free software: you can redistribute it and/or modify
using namespace std;
#include "context-def.hh"
+#include "duration.hh"
#include "identifier-smob.hh"
#include "international.hh"
#include "interval.hh"
#include "lily-guile.hh"
#include "lily-lexer.hh"
+#include "lily-parser.hh"
#include "lilypond-version.hh"
#include "main.hh"
#include "music.hh"
#include "music-function.hh"
#include "parse-scm.hh"
#include "parser.hh"
+#include "pitch.hh"
#include "source-file.hh"
#include "std-string.hh"
#include "string-convert.hh"
LexerError (_ ("stray UTF-8 BOM encountered").c_str ());
exit (1);
}
- if (be_verbose_global)
- message (_ ("Skipping UTF-8 BOM"));
+ debug_output (_ ("Skipping UTF-8 BOM"));
}
<INITIAL,chords,figures,incl,lyrics,markup,notes>{
"%{" {
yy_push_state (longcomment);
}
- %[^{\n\r].*[\n\r] {
+ %[^{\n\r][^\n\r]*[\n\r] {
}
%[^{\n\r] { // backup rule
}
%[\n\r] {
}
- %[^{\n\r].* {
+ %[^{\n\r][^\n\r]* {
}
{WHITE}+ {
yylval.scm = unpack_identifier(sval);
return identifier_type (yylval.scm);
}
+
+ for (size_t i = 0; i < pending_string_includes_.size (); i++)
+ new_input ("<included string>", pending_string_includes_[i],
+ parser_->sources_);
+ pending_string_includes_.clear ();
yylval.scm = sval;
return SCM_TOKEN;
push_extra_token (EXPECT_NO_MORE_ARGS);
for (; scm_is_pair (s); s = scm_cdr (s))
{
- if (scm_car (s) == ly_music_p_proc)
+ SCM cs = scm_car (s);
+
+ if (cs == ly_music_p_proc)
push_extra_token (EXPECT_MUSIC);
- else if (scm_car (s) == ly_lily_module_constant ("markup?"))
+ else if (cs == Pitch_type_p_proc)
+ push_extra_token (EXPECT_PITCH);
+ else if (cs == Duration_type_p_proc)
+ push_extra_token (EXPECT_DURATION);
+ else if (cs == ly_lily_module_constant ("markup?"))
push_extra_token (EXPECT_MARKUP);
- else if (ly_is_procedure (scm_car (s)))
+ else if (ly_is_procedure (cs))
push_extra_token (EXPECT_SCM);
else programming_error ("Function parameter without type-checking predicate");
}