%{ // -*-Fundamental-*- #include #define MUDELA_VERSION "0.0.61" #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 "keyword.hh" #include "debug.hh" #include "parseconstruct.hh" #include "dimen.hh" #include "identifier.hh" #include "command-request.hh" #include "musical-request.hh" #include "my-lily-parser.hh" #include "text-def.hh" #include "input-engraver.hh" #include "score.hh" #include "music-list.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; Chord * chord; Duration *duration; Identifier *id; Input_engraver * iregs; Music *music; Music_list *musiclist; Score *score; Interval *interval; Lookup*lookup; Melodic_req * melreq; Midi_def* midi; Moment *moment; Note_req *notereq; Paper_def *paper; Real real; Request * request; General_script_def * script; String *string; Symbol * symbol; Symtable * symtable; Symtables * symtables; Text_def * textdef; 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_; lex_l->lexval_l = (void*) s; return lex_l->yylex(); } %} %pure_parser /* tokens which are not keywords */ %token CONCAT %token ALIAS %token BAR %token CADENZA %token CLEAR %token CLEF %token CONTAINS %token CONSISTS %token ACCEPTS %token CM_T %token DURATIONCOMMAND %token ABSDYNAMIC %token END %token GEOMETRIC %token GROUPING %token GROUP %token REQUESTENGRAVER %token HSHIFT %token IN_T %token ID %token INIT_END %token LYRIC %token KEY %token MELODIC %token MELODIC_REQUEST %token METER %token MIDI %token MM_T %token MULTI %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 %type dots %token INT %token NOTENAME_ID %token IDENTIFIER %token MELODIC_REQUEST_IDENTIFIER %token MUSIC_IDENTIFIER %token VOICE_IDENTIFIER %token POST_REQUEST_IDENTIFIER %token SCRIPT_IDENTIFIER %token STAFF_IDENTIFIER %token REAL_IDENTIFIER %token INT_IDENTIFIER %token SCORE_IDENTIFIER %token PAPER_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 simple_element music_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 Music transposed_music %type Voice Voice_body %type Chord Chord_body %type paper_block paper_body %type dim real %type unit %type post_request pre_request command_req verbose_command_req abbrev_command_req %type script_req dynamic_req %type score_block score_body %type