X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fparser.yy;h=300834a24872042779e92c7028826121cb59a738;hb=8f58f4428d70961938e9151097886d861b3faeb3;hp=bf82af8ec43a9a488f7f09be4dcb6fa5064444d3;hpb=30270f615f32a6b93e7b09bf55d1b8a7d7aad7ca;p=lilypond.git diff --git a/lily/parser.yy b/lily/parser.yy index bf82af8ec4..300834a248 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -10,14 +10,11 @@ */ #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" @@ -32,7 +29,7 @@ #include "command-request.hh" #include "musical-request.hh" #include "my-lily-parser.hh" -#include "text-def.hh" + #include "translator-group.hh" #include "score.hh" #include "music-list.hh" @@ -43,26 +40,17 @@ #include "scope.hh" #include "relative-music.hh" #include "transposed-music.hh" -#include "compressed-music.hh" +#include "time-scaled-music.hh" +#include "repeated-music.hh" // mmm -Mudela_version oldest_version ("1.0.7"); -Mudela_version version ("1.0.8"); +Mudela_version oldest_version ("1.0.14"); +Mudela_version version ("1.0.15"); // 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_; @@ -96,20 +84,18 @@ 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)) - %} %union { Array* intarr; Array *pitch_arr; + Link_array *reqvec; Array * strvec; Array *intvec; - Box *box; - Simultaneous_music *chord; + Notename_table *chordmodifiertab; Duration *duration; Identifier *id; - Translator* trans; Music *music; Music_list *music_list; Score *score; @@ -120,23 +106,17 @@ Paper_def* current_paper = 0; Musical_pitch * pitch; Midi_def* midi; Moment *moment; - Note_req *notereq; Notename_table *notenametab; Paper_def *paper; Real real; Request * request; - General_script_def * script; Scalar *scalar; + String *string; - Atom * symbol; - Symtable * symtable; - Symtables* symtables; - Text_def * textdef; Tempo_req *tempo; + Translator* trans; char c; - const char *consstr; int i; - int pair[2]; int ii[10]; } %{ @@ -160,14 +140,16 @@ 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 @@ -175,34 +157,29 @@ yylex (YYSTYPE *s, void * v_l) %token KEY %token KEYSIGNATURE %token LYRICS -%token MAEBTELP %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 %token SKIP %token SPANDYNAMIC -%token SYMBOLTABLES -%token TABLE -%token TELP %token TEMPO %token TIME_T %token TIMES @@ -214,16 +191,16 @@ yylex (YYSTYPE *s, void * v_l) /* escaped */ %token E_EXCLAMATION E_SMALLER E_BIGGER E_CHAR -%type dots +%type dots exclamations questions %token DIGIT %token NOTENAME_PITCH +%token TONICNAME_PITCH +%token CHORDMODIFIER_PITCH %token DURATION_IDENTIFIER %token IDENTIFIER %token NOTENAME_TABLE_IDENTIFIER %token MUSIC_IDENTIFIER -%token POST_REQUEST_IDENTIFIER -%token SCRIPT_IDENTIFIER -%token COMMAND_IDENTIFIER +%token REQUEST_IDENTIFIER %token REAL_IDENTIFIER %token STRING_IDENTIFIER %token TRANS_IDENTIFIER @@ -231,7 +208,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 @@ -240,25 +216,28 @@ yylex (YYSTYPE *s, void * v_l) %type output_def %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 open_request_parens close_request_parens open_request close_request +%type request_with_dir request_that_take_dir verbose_request %type sub_quotes sup_quotes -%type simple_element request_chord command_element Simple_music Composite_music +%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 block_identifier +%type optional_modality +%type identifier_init %type steno_duration notemode_duration %type entered_notemode_duration explicit_duration -%type dinterval %type intastint_list int_list -%type symtables symtables_body - +%type pre_requests post_requests +%type gen_text_def %type explicit_musical_pitch steno_musical_pitch musical_pitch absolute_musical_pitch -%type steno_notepitch +%type steno_tonic_pitch + %type pitch_list +%type chord notemode_chord +%type chord_additions chord_subtractions chord_notes +%type chord_addsub chord_note chord_inversion notemode_chord_inversion %type midi_block midi_body %type duration_length @@ -267,24 +246,21 @@ yylex (YYSTYPE *s, void * v_l) %type property_def translator_change %type Music_list %type paper_block paper_def_body -%type real_expression real dimension +%type real_expression real real_with_dimension %type abbrev_command_req -%type post_request structured_post_request -%type plet_fraction +%type post_request %type command_req verbose_command_req -%type script_req dynamic_req +%type extender_req %type string %type score_block score_body %type shape_array -%type