%{ // -*-Fundamental-*- #include #define MUDELA_VERSION "0.0.58" #include "script-def.hh" #include "symtable.hh" #include "lookup.hh" #include "misc.hh" #include "my-lily-lexer.hh" #include "paper-def.hh" #include "midi-def.hh" #include "main.hh" #include "input-score.hh" #include "input-staff.hh" #include "input-music.hh" #include "keyword.hh" #include "debug.hh" #include "parseconstruct.hh" #include "dimen.hh" #include "identifier.hh" #include "command-request.hh" #include "musical-request.hh" #include "voice-element.hh" #include "my-lily-parser.hh" #include "text-def.hh" #include "input-register.hh" #ifndef NDEBUG #define YYDEBUG 1 #endif #define YYERROR_VERBOSE 1 #define YYPARSE_PARAM my_lily_parser_l #define YYLEX_PARAM my_lily_parser_l #define THIS ((My_lily_parser *) my_lily_parser_l) #define yyerror THIS->parser_error %} %union { Array *melreqvec;/* should clean up naming */ Array * strvec; Array *intvec; Box *box; Duration *duration; Identifier *id; Input_register * iregs; Input_music *music; Input_score *score; Input_staff *staff; Interval *interval; Lookup*lookup; Melodic_req * melreq; Midi_def* midi; Moment *moment; Music_general_chord *chord; Music_voice *mvoice; Note_req *notereq; Paper_def *paper; Real real; Request * request; Script_def * script; String *string; Symbol * symbol; Symtable * symtable; Symtables * symtables; Text_def * textdef; Voice *voice; Voice_element *el; char c; const char *consstr; int i; int ii[10]; } %{ int yylex(YYSTYPE *s, void * v_l) { My_lily_parser *pars_l = (My_lily_parser*) v_l; My_lily_lexer * lex_l = pars_l->lexer_p_; if (pars_l->first_b_) { pars_l->first_b_ = false; pars_l->do_init_file(); } lex_l->lexval_l = (void*) s; return lex_l->yylex(); } %} %pure_parser /* tokens which are not keywords */ %token CONCAT %token BAR %token CADENZA %token CLEAR %token CLEF %token CM_T %token DURATIONCOMMAND %token ABSDYNAMIC %token END %token GEOMETRIC %token GROUPING %token GROUP %token INPUT_REGS %token HSHIFT %token IN_T %token INIT_END %token LYRIC %token KEY %token MELODIC %token MELODIC_REQUEST %token METER %token MIDI %token MM_T %token MULTIVOICE %token NOTE %token NOTENAMES %token OCTAVECOMMAND %token OUTPUT %token PAPER %token PARTIAL %token PLET %token PT_T %token SCORE %token SCRIPT %token SKIP %token SPANDYNAMIC %token STAFF %token START_T %token STEM %token SYMBOLTABLES %token TABLE %token TRANSPOSE %token TEMPO %token TEXID %token TEXTSTYLE %token TITLE %token UNITSPACE %token WIDTH %token VERSION /* escaped */ %token E_EXCLAMATION E_SMALLER E_BIGGER E_CHAR %token DOTS %token INT %token NOTENAME_ID %token REGS_IDENTIFIER %token IDENTIFIER %token MELODIC_REQUEST_IDENTIFIER %token CHORD_IDENTIFIER %token VOICE_IDENTIFIER %token POST_REQUEST_IDENTIFIER %token SCRIPT_IDENTIFIER %token STAFF_IDENTIFIER %token REAL_IDENTIFIER %token SCORE_IDENTIFIER %token REQUEST_IDENTIFIER %token REAL %token DURATION RESTNAME %token STRING %token POST_QUOTES %token PRE_QUOTES %type box %type open_request_parens close_request_parens %type open_plet_parens close_plet_parens %type music_chord music_chord_body init_music_chord %type voice_elt full_element lyrics_elt command_elt %type int %type script_dir %type declaration %type explicit_duration notemode_duration %type dinterval %type intastint_list %type symtables symtables_body %type melodic_request steno_melodic_req %type steno_note_req %type pitch_list %type midi_block midi_body %type duration_length %type init_music %type simple_horizontal_music horizontal_music horizontal_music_body %type transposed_music_voice init_lyrics_voice %type music_voice_body init_music_voice %type paper_block paper_body %type dim real %type unit %type post_request pre_request command_req verbose_command_req abbrev_command_req %type pure_post_request pure_post_request_choice %type script_req textscript_req dynamic_req %type score_block score_body %type