#include "property-iterator.hh"
#include "file-results.hh"
#include "input.hh"
-#include "scope.hh"
#include "relative-music.hh"
#include "lyric-combine-music.hh"
#include "transposed-music.hh"
#include <stdlib.h>
-#ifndef NDEBUG
-#define YYDEBUG 1
-#endif
#define YYERROR_VERBOSE 1
String *string; // needed by the lexer as temporary scratch area.
Music *music;
Score *score;
- Scope *scope;
Scheme_hash_table *scmhash;
Music_output_def * outputdef;
%token REST
/* escaped */
-%token E_CHAR E_EXCLAMATION E_SMALLER E_BIGGER E_OPEN E_CLOSE E_TILDE
+%token E_CHAR E_EXCLAMATION E_SMALLER E_BIGGER E_OPEN E_CLOSE
+%token E_LEFTSQUARE E_RIGHTSQUARE E_TILDE
%token E_BACKSLASH
%token CHORD_BASS CHORD_COLON CHORD_MINUS CHORD_CARET
%token FIGURE_SPACE
}
| output_def {
if (dynamic_cast<Paper_def*> ($1))
- THIS->lexer_p_->set_identifier ("$defaultpaper", $1->self_scm ());
+ THIS->lexer_p_->set_identifier (gh_str02scm ("$defaultpaper"), $1->self_scm ());
else if (dynamic_cast<Midi_def*> ($1))
- THIS->lexer_p_->set_identifier ("$defaultmidi", $1->self_scm ());
+ THIS->lexer_p_->set_identifier (gh_str02scm ("$defaultmidi"), $1->self_scm ());
}
| embedded_scm {
// junk value
lilypond_header_body:
{
$$ = new Scheme_hash_table;
-
- Scope *sc = new Scope ($$);
- THIS->lexer_p_-> scope_l_arr_.push (sc);
+ THIS->lexer_p_-> scope_l_arr_.push ($$);
}
| lilypond_header_body assignment {
lilypond_header:
HEADER '{' lilypond_header_body '}' {
$$ = $3;
- delete THIS->lexer_p_-> scope_l_arr_.pop ();
+ THIS->lexer_p_->scope_l_arr_.pop ();
}
;
ip.warning (_ ("Identifier should have alphabetic characters only"));
}
- THIS->lexer_p_->set_identifier (ly_scm2string ($1), $4);
+ THIS->lexer_p_->set_identifier ($1, $4);
/*
TODO: devise standard for protection in parser.
SCM m = $1->self_scm ();
scm_gc_unprotect_object (m);
$$->music_ = m;
+
+ /*
+ guh.
+ */
+ SCM check_func = scm_c_eval_string ("check-start-chords");
+ gh_call1 (check_func, m);
+
}
| SCORE_IDENTIFIER {
$$ = new Score (*unsmob_score ($1));
p = new Midi_def;
$$ = p;
- THIS->lexer_p_->scope_l_arr_.push (p->scope_p_);
+ THIS->lexer_p_->scope_l_arr_.push (p->variable_tab_);
}
| PAPER '{' {
Music_output_def *id = unsmob_music_output_def (THIS->lexer_p_->lookup_identifier ("$defaultpaper"));
p = dynamic_cast<Paper_def*> (id->clone ());
else
p = new Paper_def;
- THIS-> lexer_p_-> scope_l_arr_.push (p->scope_p_);
+ THIS-> lexer_p_-> scope_l_arr_.push (p->variable_tab_);
$$ = p;
}
| PAPER '{' MUSIC_OUTPUT_DEF_IDENTIFIER {
Music_output_def *p = unsmob_music_output_def ($3);
p = p->clone ();
- THIS->lexer_p_->scope_l_arr_.push (p->scope_p_);
+ THIS->lexer_p_->scope_l_arr_.push (p->variable_tab_);
$$ = p;
}
| MIDI '{' MUSIC_OUTPUT_DEF_IDENTIFIER {
Music_output_def *p = unsmob_music_output_def ($3);
p = p->clone ();
- THIS->lexer_p_->scope_l_arr_.push (p->scope_p_);
+ THIS->lexer_p_->scope_l_arr_.push (p->variable_tab_);
$$ = p;
}
| music_output_def_body assignment {
SEQUENTIAL '{' Music_list '}' {
$$ = new Sequential_music (SCM_EOL);
$$->set_mus_property ("elements", ly_car ($3));
+ $$->set_spot(THIS->here_input());
}
| '{' Music_list '}' {
$$ = new Sequential_music (SCM_EOL);
$$->set_mus_property ("elements", ly_car ($2));
+ $$->set_spot(THIS->here_input());
}
;
SIMULTANEOUS '{' Music_list '}'{
$$ = new Simultaneous_music (SCM_EOL);
$$->set_mus_property ("elements", ly_car ($3));
+ $$->set_spot(THIS->here_input());
}
| '<' Music_list '>' {
$$ = new Simultaneous_music (SCM_EOL);
$$->set_mus_property ("elements", ly_car ($2));
+ $$->set_spot(THIS->here_input());
}
;
}
| MUSIC_IDENTIFIER {
$$ = unsmob_music ($1)->clone ();
+
+ $$->set_spot (THIS->here_input());
}
| property_def
| translator_change
$$-> set_spot (THIS->here_input ());
$1-> set_spot (THIS->here_input ());
}
+ | E_LEFTSQUARE {
+ Span_req *l = new Span_req;
+ l->set_span_dir (START);
+ l->set_mus_property ("span-type", ly_str02scm ("ligature"));
+ l->set_spot (THIS->here_input ());
+
+ $$ = new Request_chord (SCM_EOL);
+ $$->set_mus_property ("elements", gh_cons (l->self_scm (), SCM_EOL));
+ $$->set_spot (THIS->here_input ());
+ }
+ | E_RIGHTSQUARE {
+ Span_req *l = new Span_req;
+ l->set_span_dir (STOP);
+ l->set_mus_property ("span-type", ly_str02scm ("ligature"));
+ l->set_spot (THIS->here_input ());
+
+ $$ = new Request_chord (SCM_EOL);
+ $$->set_mus_property ("elements", gh_cons (l->self_scm (), SCM_EOL));
+ $$->set_spot (THIS->here_input ());
+ }
| E_BACKSLASH {
$$ = new Music (gh_list (gh_cons (ly_symbol2scm ("name"), ly_symbol2scm ("separator")), SCM_UNDEFINED));
$$->set_spot (THIS->here_input ());
$$ = $1;
dynamic_cast<Span_req*> ($$)->set_span_dir ( START);
}
-
+ ;
+
close_request_parens:
'(' {
Span_req* s= new Span_req;
%%
void
-My_lily_parser::set_yydebug (bool b)
+My_lily_parser::set_yydebug (bool )
{
-#ifdef YYDEBUG
+#if 0
yydebug = b;
#endif
}