X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fparser.yy;h=405d9c1e30c40ff2ee018c7d16a80f4b41dfb437;hb=afa5829cd270e1b0c616b7ba5c5e6cdc0e920e5f;hp=99af0e5ec1d7b1ea3aaf9b22dc617179007ca82a;hpb=e99a6533b0a5cfdf1d8ec5b00ed4010459285deb;p=lilypond.git diff --git a/lily/parser.yy b/lily/parser.yy index 99af0e5ec1..405d9c1e30 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -10,14 +10,13 @@ */ #include +#include "lily-guile.hh" #include "notename-table.hh" #include "scalar.hh" #include "translation-property.hh" #include "script-def.hh" #include "symtable.hh" #include "lookup.hh" -#include "ps-lookup.hh" -#include "tex-lookup.hh" #include "misc.hh" #include "my-lily-lexer.hh" #include "paper-def.hh" @@ -27,7 +26,7 @@ #include "keyword.hh" #include "debug.hh" #include "parseconstruct.hh" -#include "dimension.hh" +#include "dimensions.hh" #include "identifier.hh" #include "command-request.hh" #include "musical-request.hh" @@ -36,7 +35,6 @@ #include "translator-group.hh" #include "score.hh" #include "music-list.hh" -#include "header.hh" #include "duration-convert.hh" #include "change-translator.hh" #include "file-results.hh" @@ -44,23 +42,33 @@ #include "scope.hh" #include "relative-music.hh" #include "transposed-music.hh" +#include "compressed-music.hh" +#include "repeated-music.hh" // mmm -Mudela_version oldest_version ("1.0.6"); -Mudela_version version ("1.0.6"); +Mudela_version oldest_version ("1.0.14"); +Mudela_version version ("1.0.14"); // needed for bison.simple's malloc() and free() #include -int const GUESS_PLET = 5; -int guess_plet_a[GUESS_PLET] = -{ - 1, - 3, - 2, - 3, - 4 +struct Assignment { + String *name_p_; + Identifier *id_p_; + ~Assignment () { + delete name_p_; + delete id_p_; + } + Assignment () { + name_p_ = 0; + id_p_ =0; + } + Assignment (Assignment const&s) + { + name_p_ = new String (*s.name_p_); + id_p_ = s.id_p_->clone (); + } }; Paper_def* current_paper = 0; @@ -78,7 +86,6 @@ Paper_def* current_paper = 0; #define yyerror THIS->parser_error #define ARRAY_SIZE(a,s) if (a.size () != s) THIS->parser_error (_f("expecting %d arguments", s)) - %} @@ -87,15 +94,16 @@ Paper_def* current_paper = 0; Array *pitch_arr; Array * strvec; Array *intvec; + Atom * symbol; Box *box; - Simultaneous_music *chord; + Notename_table *chordmodifiertab; Duration *duration; + General_script_def * script; Identifier *id; - Translator* trans; Music *music; Music_list *music_list; Score *score; - Header *header; + Scope *scope; Interval *interval; Musical_req* musreq; Music_output_def * outputdef; @@ -107,18 +115,17 @@ Paper_def* current_paper = 0; Paper_def *paper; Real real; Request * request; - General_script_def * script; Scalar *scalar; + Simultaneous_music *chord; String *string; - Atom * symbol; Symtable * symtable; Symtables* symtables; - Text_def * textdef; Tempo_req *tempo; + Text_def * textdef; + Translator* trans; char c; const char *consstr; int i; - int pair[2]; int ii[10]; } %{ @@ -142,40 +149,41 @@ yylex (YYSTYPE *s, void * v_l) %token ABSDYNAMIC %token ACCEPTS +%token ALTERNATIVE %token BAR -%token BEAMPLET %token CADENZA +%token CHORDMODIFIERS +%token CHORDS %token CLEF %token CM_T %token CONSISTS %token DURATION -%token END +%token EXTENDER %token FONT %token GROUPING %token HEADER %token IN_T %token KEY %token KEYSIGNATURE -%token LYRIC -%token MAEBTELP +%token LYRICS %token MARK %token MEASURES %token MIDI %token MM_T -%token MUSIC %token MUSICAL_PITCH +%token NAME %token NOTENAMES %token NOTES -%token OCTAVE -%token OUTPUT %token PAPER %token PARTIAL %token PENALTY -%token PLET %token PROPERTY %token PT_T %token RELATIVE %token REMOVE +%token REPEAT +%token SCM_T +%token SCMFILE %token SCORE %token SCRIPT %token SHAPE @@ -183,9 +191,9 @@ yylex (YYSTYPE *s, void * v_l) %token SPANDYNAMIC %token SYMBOLTABLES %token TABLE -%token TELP %token TEMPO %token TIME_T +%token TIMES %token TRANSLATOR %token TRANSPOSE %token TYPE @@ -197,6 +205,8 @@ yylex (YYSTYPE *s, void * v_l) %type dots %token DIGIT %token NOTENAME_PITCH +%token TONICNAME_PITCH +%token CHORDMODIFIER_PITCH %token DURATION_IDENTIFIER %token IDENTIFIER %token NOTENAME_TABLE_IDENTIFIER @@ -211,7 +221,6 @@ yylex (YYSTYPE *s, void * v_l) %token SCORE_IDENTIFIER %token MIDI_IDENTIFIER %token PAPER_IDENTIFIER -%token REQUEST_IDENTIFIER %token REAL %token DURATION RESTNAME %token STRING @@ -219,17 +228,17 @@ yylex (YYSTYPE *s, void * v_l) %type output_def -%type
mudela_header mudela_header_body +%type mudela_header mudela_header_body %type box %type open_request_parens close_request_parens -%type open_abbrev_parens -%type open_plet_parens close_plet_parens %type sub_quotes sup_quotes -%type simple_element request_chord command_element +%type simple_element request_chord command_element Simple_music Composite_music +%type Alternative_music Repeated_music %type abbrev_type %type int unsigned %type script_dir -%type identifier_init simple_identifier_init +%type optional_modality +%type identifier_init simple_identifier_init block_identifier %type steno_duration notemode_duration %type entered_notemode_duration explicit_duration %type dinterval @@ -237,8 +246,12 @@ yylex (YYSTYPE *s, void * v_l) %type symtables symtables_body %type explicit_musical_pitch steno_musical_pitch musical_pitch absolute_musical_pitch +%type steno_tonic_pitch %type steno_notepitch %type pitch_list +%type chord notemode_chord +%type chord_additions chord_subtractions +%type chord_addsub chord_note chord_inversion notemode_chord_inversion %type midi_block midi_body %type duration_length @@ -247,16 +260,12 @@ yylex (YYSTYPE *s, void * v_l) %type property_def translator_change %type Music_list %type paper_block paper_def_body -%type dim real -%type real_mult_expression real_primary -%type unit +%type real_expression real dimension %type abbrev_command_req %type post_request structured_post_request -%type plet_fraction %type command_req verbose_command_req -%type script_req dynamic_req +%type script_req dynamic_req extender_req %type string -%type string_primary %type score_block score_body %type shape_array %type