}
{UNSIGNED}/\/ | // backup rule
{UNSIGNED} {
- yylval.i = String_convert::dec2int (string (YYText ()));
+ yylval.scm = scm_c_read_string (YYText ());
return UNSIGNED;
}
{E_UNSIGNED} {
return FRACTION;
}
{UNSIGNED}/\/[^0-9] { // backup rule
- yylval.i = String_convert::dec2int (string (YYText ()));
+ yylval.scm = scm_c_read_string (YYText ());
return UNSIGNED;
}
{UNSIGNED}/\/ | // backup rule
{UNSIGNED} {
- yylval.i = String_convert::dec2int (string (YYText ()));
+ yylval.scm = scm_c_read_string (YYText ());
return UNSIGNED;
}
{NOTECOMMAND} {
return FRACTION;
}
{UNSIGNED}/\/[^0-9] { // backup rule
- yylval.i = String_convert::dec2int (string (YYText ()));
+ yylval.scm = scm_c_read_string (YYText ());
return UNSIGNED;
}
{UNSIGNED}/\/ | // backup rule
{UNSIGNED} {
- yylval.i = String_convert::dec2int (string (YYText ()));
+ yylval.scm = scm_c_read_string (YYText ());
return UNSIGNED;
}
- {
}
{UNSIGNED} {
- yylval.i = String_convert::dec2int (string (YYText ()));
+ yylval.scm = scm_c_read_string (YYText ());
return UNSIGNED;
}
%token <i> E_UNSIGNED
-%token <i> UNSIGNED
+%token <scm> UNSIGNED
/* Artificial tokens, for more generic function syntax */
%token <i> EXPECT_MARKUP "markup?"
fingering:
UNSIGNED {
Music *t = MY_MAKE_MUSIC ("FingeringEvent", @$);
- t->set_property ("digit", scm_from_int ($1));
+ t->set_property ("digit", $1);
$$ = t->unprotect ();
}
;
fraction:
FRACTION { $$ = $1; }
| UNSIGNED '/' UNSIGNED {
- $$ = scm_cons (scm_from_int ($1), scm_from_int ($3));
+ $$ = scm_cons ($1, $3);
}
;
;
bass_number:
- UNSIGNED {
- $$ = scm_from_int ($1);
- }
+ UNSIGNED { $$ = $1; }
| STRING { $$ = $1; }
| full_markup { $$ = $1; }
;
bare_number:
UNSIGNED {
- $$ = scm_from_int ($1);
+ $$ = $1;
}
| REAL {
$$ = $1;
| REAL NUMBER_IDENTIFIER {
$$ = scm_from_double (scm_to_double ($1) *scm_to_double ($2));
}
- | UNSIGNED NUMBER_IDENTIFIER {
+ | bare_unsigned NUMBER_IDENTIFIER {
$$ = scm_from_double ($1 *scm_to_double ($2));
}
;
bare_unsigned:
UNSIGNED {
- $$ = $1;
+ $$ = scm_to_int ($1);
}
;
unsigned_number:
- bare_unsigned { $$ = scm_from_int ($1); }
- | NUMBER_IDENTIFIER {
- $$ = $1;
- }
+ UNSIGNED
+ | NUMBER_IDENTIFIER
;
exclamations: