#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"
// needed for bison.simple's malloc () and free ()
+
#include <malloc.h>
+#include <stdlib.h>
+
#ifndef NDEBUG
#define YYDEBUG 1
%}
+/* We use SCMs to do strings, because it saves us the trouble of
+deleting them. Let's hope that a stack overflow doesnt trigger a move
+of the parse stack onto the heap. */
+
%union {
String *string; // needed by the lexer as temporary scratch area.
Music *music;
Score *score;
- Scope *scope;
Scheme_hash_table *scmhash;
Music_output_def * outputdef;
Request * request;
- /* We use SCMs to do strings, because it saves us the trouble of
-deleting them. Let's hope that a stack overflow doesnt trigger a move
-of the parse stack onto the heap. */
-
SCM scm;
Tempo_req *tempo;
%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.
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 {
b->set_mus_property ("span-type", ly_str02scm ("beam"));
$$ = b;
}
+ | E_LEFTSQUARE {
+ Span_req *b = new Span_req;
+ b->set_span_dir (START);
+ b->set_mus_property ("span-type", ly_str02scm ("ligature-bracket"));
+ $$ = b;
+ THIS->last_ligature_start_ = b->self_scm ();
+ }
+ | E_RIGHTSQUARE {
+ Span_req *b = new Span_req;
+ b->set_span_dir (STOP);
+ b->set_mus_property ("span-type", ly_str02scm ("ligature-bracket"));
+ $$ = b;
+ }
| BREATHE {
$$ = new Breathing_sign_req;
}