1 %
{ // -*-Fundamental-*-
10 #include "parseconstruct.hh"
30 %token VOICE STAFF SCORE TITLE RHYTHMSTAFF BAR NOTENAME
32 %token
<id
> IDENTIFIER
33 %token
<string> PITCH DURATION RESTNAME
37 %type
<voice
> voice_block voice_body voice_elts voice_elts_dollar
39 %type
<command
> score_command
40 %type
<score
> score_block score_body
41 %type
<staff
> staff_block rhythmstaff_block rhythmstaff_body
53 score_block: SCORE
'{' score_body
'}' { $$
= $3; }
56 score_body: { $$
= new Score
; }
57 | score_body staff_block
{ $$
->add
($2); }
58 | score_body score_command
{ $$
->add
($2); }
66 RHYTHMSTAFF
'{' rhythmstaff_body
'}' { $$
= $3; }
70 /* empty */ { $$
= get_new_rhythmstaff
(); }
71 | rhythmstaff_body voice_block
{ $$
->add_voice
($2); }
75 VOICE
'{' voice_body
'}' { $$
= $3; }
80 REAL voice_elts_dollar
{ $$
= $2; $$
->start
= $1; }
81 | voice_elts_dollar
{ $$
= $1; }
85 '$' voice_elts
'$' { $$
= $2; }
92 | voice_elts voice_elt
{
98 PITCH DURATION
{ $$
= get_note_element
(*$1, *$2);
101 | RESTNAME DURATION
{ $$
= get_rest_element
(*$1, *$2);
108 $$
= get_bar_command
($2);
117 *mlog
<< "Parsing ... ";
118 yydebug = debug_flags
& DEBUGPARSER
;