<INITIAL,chords,lyrics,notes>\\maininput {
- start_main_input ();
+ if (!main_input_b_)
+ {
+ start_main_input ();
+ main_input_b_ = true;
+ }
+ else
+ error ("\\maininput disallowed outside init files.");
}
<INITIAL,chords,lyrics,notes>\\include {
{ALPHAWORD} {
return scan_bare_word (YYText ());
}
+ {NOTECOMMAND} {
+ return scan_escaped_word (YYText () + 1);
+ }
{UNSIGNED} {
yylval.i = String_convert::dec2_i (String (YYText ()));
return UNSIGNED;
return id->token_code_i_;
}
if ((YYSTATE != notes) && (YYSTATE != chords)) {
- if (notename_b (str))
- {
- yylval.pitch = new Musical_pitch (lookup_pitch (str));
+ if (notename_b (str)) {
+ yylval.pitch = new Musical_pitch (lookup_notename (str));
yylval.pitch->set_spot (Input (source_file_l (),
here_ch_C ()));
return NOTENAME_PITCH;
- }
+ }
}
if (check_debug)
print_declarations (true);
if ((YYSTATE == notes) || (YYSTATE == chords)) {
if (notename_b (str)) {
DOUT << "(notename)\n";
- yylval.pitch = new Musical_pitch (lookup_pitch (str));
+ yylval.pitch = new Musical_pitch (lookup_notename (str));
yylval.pitch->set_spot (Input (source_file_l (),
here_ch_C ()));
return NOTENAME_PITCH;
+ } else if (chordmodifier_b (str)) {
+ DOUT << "(chordmodifier)\n";
+ yylval.pitch = new Musical_pitch (lookup_chordmodifier (str));
+ yylval.pitch->set_spot (Input (source_file_l (),
+ here_ch_C ()));
+ return CHORDMODIFIER_PITCH;
}
}