From: fred Date: Sun, 24 Mar 2002 19:38:58 +0000 (+0000) Subject: lilypond-0.0.50 X-Git-Tag: release/1.5.59~4976 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=92734ad95b33c5ba6559c00076d30c3ed517517b;p=lilypond.git lilypond-0.0.50 --- diff --git a/lily/parser.y b/lily/parser.y index fd81c4f08f..7af1f3325d 100644 --- a/lily/parser.y +++ b/lily/parser.y @@ -1,6 +1,7 @@ %{ // -*-Fundamental-*- #include +#define MUDELA_VERSION "0.0.50" #include "script-def.hh" #include "symtable.hh" @@ -138,6 +139,7 @@ yylex(YYSTYPE *s, void * v_l) %token TITLE %token UNITSPACE %token WIDTH +%token VERSION /* escaped */ %token E_EXCLAMATION E_SMALLER E_BIGGER E_CHAR @@ -211,9 +213,23 @@ mudela: /* empty */ } | mudela add_declaration { } | mudela error + | mudela check_version { } | mudela add_notenames { } ; +check_version: + VERSION STRING ';' { + if (*$2 != MUDELA_VERSION) { + if (THIS->ignore_version_b_) { + THIS->here_input().error("Incorrect mudela version"); + } else { + THIS->fatal_error_i_ = 1; + THIS->parser_error("Incorrect mudela version"); + } + } + } + ; + add_notenames: NOTENAMES '{' notenames_body '}' ; @@ -788,8 +804,8 @@ script_definition: ; script_body: - STRING int int int { - $$ = new Script_def(*$1,$2, $3,$4); + STRING int int int int { + $$ = new Script_def(*$1,$2, $3,$4,$5); delete $1; } ;