#include "pitch.hh"
#include "source-file.hh"
#include "std-string.hh"
-#include "string-convert.hh"
#include "version.hh"
#include "warn.hh"
return token;
}
-<INITIAL,notes,lyrics>{
+<INITIAL,notes,lyrics,chords>{
\<\< {
yylval = SCM_UNSPECIFIED;
return DOUBLE_ANGLE_OPEN;
}
}
-<INITIAL,notes>{
+<INITIAL,notes,chords>{
\< {
yylval = SCM_UNSPECIFIED;
return ANGLE_OPEN;
return -1;
/* produce requested token */
- yylloc = *unsmob_input (scm_caar (extra_tokens_));
+ yylloc = *Input::unsmob (scm_caar (extra_tokens_));
int type = scm_to_int (scm_cadar (extra_tokens_));
yylval = scm_cddar (extra_tokens_);
extra_tokens_ = scm_cdr (extra_tokens_);
return i;
SCM sid = lookup_identifier (str);
- if (Music *m = unsmob_music (sid))
+ if (Music *m = Music::unsmob (sid))
{
m->set_spot (override_input (here_input ()));
}
Lily_lexer::scan_shorthand (const string &str)
{
SCM sid = lookup_identifier (str);
- if (Music *m = unsmob_music (sid))
+ if (Music *m = Music::unsmob (sid))
{
m->set_spot (override_input (here_input ()));
}
if (scm_is_pair (handle)) {
yylval = scm_cdr (handle);
- if (unsmob_pitch (yylval))
+ if (Pitch::unsmob (yylval))
return (YYSTATE == notes) ? NOTENAME_PITCH : TONICNAME_PITCH;
else if (scm_is_symbol (yylval))
return DRUM_PITCH;
p = scm_cdr (p))
{
SCM v = scm_car (p);
- if (Music *m = unsmob_music (v))
+ if (Music *m = Music::unsmob (v))
{
- if (!unsmob_input (m->get_property ("origin")))
+ if (!Input::unsmob (m->get_property ("origin")))
m->set_spot (override_input (here_input ()));
}
sval = SCM_UNSPECIFIED;
}
- if (Music *m = unsmob_music (sval))
+ if (Music *m = Music::unsmob (sval))
{
- if (!unsmob_input (m->get_property ("origin")))
+ if (!Input::unsmob (m->get_property ("origin")))
m->set_spot (override_input (here_input ()));
}
string left = frac.substr (0, i);
string right = frac.substr (i + 1, (frac.length () - i + 1));
- int n = String_convert::dec2int (left);
- int d = String_convert::dec2int (right);
- return scm_cons (scm_from_int (n), scm_from_int (d));
+ return scm_cons (scm_c_read_string (left.c_str ()),
+ scm_c_read_string (right.c_str ()));
}
SCM