OLD | NEW |
1 /* -*- mode: c++; c-file-style: "linux" -*- */ | 1 /* -*- mode: c++; c-file-style: "linux" -*- */ |
2 /* | 2 /* |
3 This file is part of LilyPond, the GNU music typesetter. | 3 This file is part of LilyPond, the GNU music typesetter. |
4 | 4 |
5 Copyright (C) 1997--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> | 5 Copyright (C) 1997--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> |
6 Jan Nieuwenhuizen <janneke@gnu.org> | 6 Jan Nieuwenhuizen <janneke@gnu.org> |
7 | 7 |
8 LilyPond is free software: you can redistribute it and/or modify | 8 LilyPond is free software: you can redistribute it and/or modify |
9 it under the terms of the GNU General Public License as published by | 9 it under the terms of the GNU General Public License as published by |
10 the Free Software Foundation, either version 3 of the License, or | 10 the Free Software Foundation, either version 3 of the License, or |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 %type <scm> duration_length | 468 %type <scm> duration_length |
469 %type <scm> embedded_scm | 469 %type <scm> embedded_scm |
470 %type <scm> embedded_scm_arg | 470 %type <scm> embedded_scm_arg |
471 %type <scm> embedded_scm_arg_closed | 471 %type <scm> embedded_scm_arg_closed |
472 %type <scm> embedded_scm_bare | 472 %type <scm> embedded_scm_bare |
473 %type <scm> embedded_scm_bare_arg | 473 %type <scm> embedded_scm_bare_arg |
474 %type <scm> embedded_scm_closed | 474 %type <scm> embedded_scm_closed |
475 %type <scm> event_function_event | 475 %type <scm> event_function_event |
476 %type <scm> figure_list | 476 %type <scm> figure_list |
477 %type <scm> figure_spec | 477 %type <scm> figure_spec |
478 %type <scm> fraction | |
479 %type <scm> full_markup | 478 %type <scm> full_markup |
480 %type <scm> full_markup_list | 479 %type <scm> full_markup_list |
481 %type <scm> function_arglist | 480 %type <scm> function_arglist |
482 %type <scm> function_arglist_optional | 481 %type <scm> function_arglist_optional |
483 %type <scm> function_arglist_backup | 482 %type <scm> function_arglist_backup |
484 %type <scm> function_arglist_nonbackup | 483 %type <scm> function_arglist_nonbackup |
485 %type <scm> function_arglist_nonbackup_common | 484 %type <scm> function_arglist_nonbackup_common |
486 %type <scm> function_arglist_closed_nonbackup | 485 %type <scm> function_arglist_closed_nonbackup |
487 %type <scm> function_arglist_skip | 486 %type <scm> function_arglist_skip |
488 %type <scm> function_arglist_bare | 487 %type <scm> function_arglist_bare |
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1543 | function_arglist_backup REPARSE embedded_scm_arg_closed | 1542 | function_arglist_backup REPARSE embedded_scm_arg_closed |
1544 { | 1543 { |
1545 $$ = check_scheme_arg (parser, @3, | 1544 $$ = check_scheme_arg (parser, @3, |
1546 $3, $1, $2); | 1545 $3, $1, $2); |
1547 } | 1546 } |
1548 | function_arglist_backup REPARSE bare_number | 1547 | function_arglist_backup REPARSE bare_number |
1549 { | 1548 { |
1550 $$ = check_scheme_arg (parser, @3, | 1549 $$ = check_scheme_arg (parser, @3, |
1551 $3, $1, $2); | 1550 $3, $1, $2); |
1552 } | 1551 } |
1553 | function_arglist_backup REPARSE fraction | |
1554 { | |
1555 $$ = check_scheme_arg (parser, @3, | |
1556 $3, $1, $2); | |
1557 } | |
1558 ; | 1552 ; |
1559 | 1553 |
1560 function_arglist: | 1554 function_arglist: |
1561 function_arglist_common | 1555 function_arglist_common |
1562 | function_arglist_nonbackup | 1556 | function_arglist_nonbackup |
1563 ; | 1557 ; |
1564 | 1558 |
1565 function_arglist_common: | 1559 function_arglist_common: |
1566 function_arglist_bare | 1560 function_arglist_bare |
1567 | EXPECT_SCM function_arglist_optional embedded_scm_arg | 1561 | EXPECT_SCM function_arglist_optional embedded_scm_arg |
1568 { | 1562 { |
1569 $$ = check_scheme_arg (parser, @3, | 1563 $$ = check_scheme_arg (parser, @3, |
1570 $3, $2, $1); | 1564 $3, $2, $1); |
1571 } | 1565 } |
1572 | EXPECT_SCM function_arglist_closed_optional bare_number | 1566 | EXPECT_SCM function_arglist_closed_optional bare_number |
1573 { | 1567 { |
1574 $$ = check_scheme_arg (parser, @3, | 1568 $$ = check_scheme_arg (parser, @3, |
1575 $3, $2, $1); | 1569 $3, $2, $1); |
1576 } | 1570 } |
1577 » | EXPECT_SCM function_arglist_closed_optional fraction | 1571 » | EXPECT_SCM function_arglist_closed_optional FRACTION |
1578 { | 1572 { |
1579 $$ = check_scheme_arg (parser, @3, | 1573 $$ = check_scheme_arg (parser, @3, |
1580 $3, $2, $1); | 1574 $3, $2, $1); |
1581 } | 1575 } |
1582 | EXPECT_SCM function_arglist_closed_optional post_event_nofinger | 1576 | EXPECT_SCM function_arglist_closed_optional post_event_nofinger |
1583 { | 1577 { |
1584 $$ = check_scheme_arg (parser, @3, | 1578 $$ = check_scheme_arg (parser, @3, |
1585 $3, $2, $1); | 1579 $3, $2, $1); |
1586 } | 1580 } |
1587 | function_arglist_common_minus | 1581 | function_arglist_common_minus |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1706 { | 1700 { |
1707 $$ = check_scheme_arg (parser, @3, | 1701 $$ = check_scheme_arg (parser, @3, |
1708 scm_difference ($4, SCM_UNDEFINED), | 1702 scm_difference ($4, SCM_UNDEFINED), |
1709 $2, $1); | 1703 $2, $1); |
1710 } | 1704 } |
1711 | EXPECT_SCM function_arglist_closed_optional post_event_nofinger | 1705 | EXPECT_SCM function_arglist_closed_optional post_event_nofinger |
1712 { | 1706 { |
1713 $$ = check_scheme_arg (parser, @3, | 1707 $$ = check_scheme_arg (parser, @3, |
1714 $3, $2, $1); | 1708 $3, $2, $1); |
1715 } | 1709 } |
1716 » | EXPECT_SCM function_arglist_closed_optional fraction | 1710 » | EXPECT_SCM function_arglist_closed_optional FRACTION |
1717 { | 1711 { |
1718 $$ = check_scheme_arg (parser, @3, | 1712 $$ = check_scheme_arg (parser, @3, |
1719 $3, $2, $1); | 1713 $3, $2, $1); |
1720 } | 1714 } |
1721 | EXPECT_SCM function_arglist_optional lyric_element | 1715 | EXPECT_SCM function_arglist_optional lyric_element |
1722 { | 1716 { |
1723 $$ = check_scheme_arg (parser, @3, | 1717 $$ = check_scheme_arg (parser, @3, |
1724 $3, $2, $1); | 1718 $3, $2, $1); |
1725 } | 1719 } |
1726 ; | 1720 ; |
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2629 | multiplied_duration '*' bare_unsigned { | 2623 | multiplied_duration '*' bare_unsigned { |
2630 $$ = unsmob_duration ($$)->compressed ( $3) .smobbed_copy (); | 2624 $$ = unsmob_duration ($$)->compressed ( $3) .smobbed_copy (); |
2631 } | 2625 } |
2632 | multiplied_duration '*' FRACTION { | 2626 | multiplied_duration '*' FRACTION { |
2633 Rational m (scm_to_int (scm_car ($3)), scm_to_int (scm_cdr ($3)
)); | 2627 Rational m (scm_to_int (scm_car ($3)), scm_to_int (scm_cdr ($3)
)); |
2634 | 2628 |
2635 $$ = unsmob_duration ($$)->compressed (m).smobbed_copy (); | 2629 $$ = unsmob_duration ($$)->compressed (m).smobbed_copy (); |
2636 } | 2630 } |
2637 ; | 2631 ; |
2638 | 2632 |
2639 fraction: | |
2640 FRACTION { $$ = $1; } | |
2641 | UNSIGNED '/' UNSIGNED { | |
2642 $$ = scm_cons ($1, $3); | |
2643 } | |
2644 ; | |
2645 | |
2646 dots: | 2633 dots: |
2647 /* empty */ { | 2634 /* empty */ { |
2648 $$ = 0; | 2635 $$ = 0; |
2649 } | 2636 } |
2650 | dots '.' { | 2637 | dots '.' { |
2651 $$ ++; | 2638 $$ ++; |
2652 } | 2639 } |
2653 ; | 2640 ; |
2654 | 2641 |
2655 tremolo_type: | 2642 tremolo_type: |
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3427 int | 3414 int |
3428 yylex (YYSTYPE *s, YYLTYPE *loc, Lily_parser *parser) | 3415 yylex (YYSTYPE *s, YYLTYPE *loc, Lily_parser *parser) |
3429 { | 3416 { |
3430 Lily_lexer *lex = parser->lexer_; | 3417 Lily_lexer *lex = parser->lexer_; |
3431 | 3418 |
3432 lex->lexval_ = s; | 3419 lex->lexval_ = s; |
3433 lex->lexloc_ = loc; | 3420 lex->lexloc_ = loc; |
3434 lex->prepare_for_next_token (); | 3421 lex->prepare_for_next_token (); |
3435 return lex->yylex (); | 3422 return lex->yylex (); |
3436 } | 3423 } |
OLD | NEW |