From faa5f31c4901212372d2dcf7080d9f0a23d5f195 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Sat, 23 Jan 2016 22:38:00 +0000 Subject: gregorio 4.1.0-beta1 git-svn-id: svn://tug.org/texlive/trunk@39470 c570f23f-e606-0410-a88d-b1316a301751 --- .../src/gabc/gabc-score-determination.l | 112 ++++++++++----------- 1 file changed, 56 insertions(+), 56 deletions(-) (limited to 'Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.l') diff --git a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.l b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.l index 1001a2f72a6..b0c695f383f 100644 --- a/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.l +++ b/Build/source/texk/gregorio/gregorio-src/src/gabc/gabc-score-determination.l @@ -28,6 +28,7 @@ #include #include "struct.h" #include "messages.h" +#include "bool.h" #include "support.h" #include "gabc.h" @@ -35,6 +36,7 @@ #include "gabc-score-determination-y.h" static unsigned char style_stack = 0; +static bool eof_found = false; #define YY_NO_INPUT @@ -137,91 +139,78 @@ semicolon. */ return DEF_MACRO; } number-of-voices { + gabc_score_determination_lval.text = + gregorio_strdup(gabc_score_determination_text); return NUMBER_OF_VOICES; } name { + gabc_score_determination_lval.text = + gregorio_strdup(gabc_score_determination_text); return NAME; } score-copyright { + gabc_score_determination_lval.text = + gregorio_strdup(gabc_score_determination_text); return SCORE_COPYRIGHT; } gabc-copyright { + gabc_score_determination_lval.text = + gregorio_strdup(gabc_score_determination_text); return GABC_COPYRIGHT; } -office-part { - return OFFICE_PART; - } -occasion { - return OCCASION; - } -meter { - return METER; - } -commentary { - return COMMENTARY; - } -arranger { - return ARRANGER; - } -gabc-version { - return GABC_VERSION; - } initial-style { + /* DEPRECATED by 4.1 */ return INITIAL_STYLE; } mode { + gabc_score_determination_lval.text = + gregorio_strdup(gabc_score_determination_text); return MODE; } +mode-modifier { + gabc_score_determination_lval.text = + gregorio_strdup(gabc_score_determination_text); + return MODE_MODIFIER; + } +mode-differentia { + gabc_score_determination_lval.text = + gregorio_strdup(gabc_score_determination_text); + return MODE_DIFFERENTIA; + } annotation { + gabc_score_determination_lval.text = + gregorio_strdup(gabc_score_determination_text); return ANNOTATION; } author { + gabc_score_determination_lval.text = + gregorio_strdup(gabc_score_determination_text); return AUTHOR; } -date { - return DATE; - } -manuscript { - return MANUSCRIPT; - } -manuscript-reference { - return MANUSCRIPT_REFERENCE; - } -manuscript-storage-place { - return MANUSCRIPT_STORAGE_PLACE; - } -book { - return BOOK; - } -transcriber { - return TRANSCRIBER; - } -generated-by { - return GENERATED_BY; - } -centering-scheme { - return CENTERING_SCHEME; - } language { + gabc_score_determination_lval.text = + gregorio_strdup(gabc_score_determination_text); return LANGUAGE; } -transcription-date { - return TRANSCRIPTION_DATE; - } -style { - return STYLE; - } -virgula-position { - return VIRGULA_POSITION; - } -gregoriotex-font { - return GREGORIOTEX_FONT; +staff-lines { + gabc_score_determination_lval.text = + gregorio_strdup(gabc_score_determination_text); + return STAFF_LINES; } nabc-lines { + gabc_score_determination_lval.text = + gregorio_strdup(gabc_score_determination_text); return NABC_LINES; } -user-notes { - return USER_NOTES; +oriscus-orientation { + gabc_score_determination_lval.text = + gregorio_strdup(gabc_score_determination_text); + return ORISCUS_ORIENTATION; + } +[A-Za-z0-9_]+(-[A-Za-z0-9_]+)* { + gabc_score_determination_lval.text = + gregorio_strdup(gabc_score_determination_text); + return OTHER_HEADER; } --(.*) { return VOICE_CHANGE; @@ -235,11 +224,14 @@ semicolon. */ _("unrecognized character: \"%c\" in definition part"), gabc_score_determination_text[0]); } -[^\{\}\(\[\]<%]+ { +[^-\{\}\(\[\]<%]+ { gabc_score_determination_lval.text = gregorio_strdup(gabc_score_determination_text); return CHARACTERS; } +- { + return HYPHEN; + } { BEGIN(style); style_stack ++; @@ -423,5 +415,13 @@ semicolon. */ BEGIN(score); return CLOSING_BRACKET_WITH_SPACE; } +<> { + if (!eof_found) { + eof_found = true; + return END_OF_FILE; + } else { + yyterminate(); + } + } %% -- cgit v1.2.3