ALPHAWORD {A}+
-DIGIT {N}
UNSIGNED {N}+
E_UNSIGNED \\{N}+
FRACTION {N}+\/{N}+
yylval.scm = scan_fraction (YYText ());
return FRACTION;
}
- {DIGIT} {
- yylval.i = String_convert::dec2int (string (YYText ()));
- return DIGIT;
- }
- {UNSIGNED}/\/[^0-9] { // backup rule
- yylval.i = String_convert::dec2int (string (YYText ()));
- return UNSIGNED;
- }
{UNSIGNED}/\/ | // backup rule
{UNSIGNED} {
yylval.i = String_convert::dec2int (string (YYText ()));
%token MULTI_MEASURE_REST
-%token <i> DIGIT
%token <i> E_UNSIGNED
%token <i> UNSIGNED
%type <scm> direction_reqd_event
%type <scm> embedded_lilypond
%type <scm> event_chord
+%type <scm> fingering
%type <scm> gen_text_def
%type <scm> music_property_def
%type <scm> note_chord_element
%type <scm> post_event
+%type <scm> post_event_nofinger
%type <scm> re_rhythmed_music
%type <scm> relative_music
%type <scm> simple_element
else
$$ = MAKE_SYNTAX ("event-chord", @$, scm_list_1 ($1));
}
- | post_event {
+ | post_event_nofinger {
$$ = $1;
}
| number_expression {
| full_markup_list {
$$ = $1;
}
- | DIGIT {
- $$ = scm_from_int ($1);
- }
| context_modification {
$$ = $1;
}
| full_markup {
$$ = $1;
}
- | DIGIT {
- $$ = scm_from_int ($1);
- }
;
scalar: closed_scalar
}
;
-post_event:
+post_event_nofinger:
direction_less_event {
$$ = $1;
}
| string_number_event
;
+post_event:
+ post_event_nofinger
+ | script_dir fingering {
+ if ($1)
+ {
+ Music *m = unsmob_music ($2);
+ m->set_property ("direction", scm_from_int ($1));
+ }
+ $$ = $2;
+ }
+ ;
+
string_number_event:
E_UNSIGNED {
Music *s = MY_MAKE_MUSIC ("StringNumberEvent", @$);
make_simple_markup ($1));
$$ = t->unprotect ();
}
- | DIGIT {
+ ;
+
+fingering:
+ UNSIGNED {
Music *t = MY_MAKE_MUSIC ("FingeringEvent", @$);
t->set_property ("digit", scm_from_int ($1));
$$ = t->unprotect ();
;
bass_number:
- DIGIT {
- $$ = scm_from_int ($1);
- }
- | UNSIGNED {
+ UNSIGNED {
$$ = scm_from_int ($1);
}
| STRING { $$ = $1; }
UNSIGNED {
$$ = $1;
}
- | DIGIT {
- $$ = $1;
- }
;
unsigned_number: