lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Support scheme0-scheme1-scheme2-scheme3 argument pattern for mar


From: Thomas Morgan
Subject: [PATCH] Support scheme0-scheme1-scheme2-scheme3 argument pattern for markup commands.
Date: Mon, 22 Feb 2010 10:55:05 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Handle in `lily/lexer.ll' and `lily/parser.yy'.
---
 lily/lexer.ll  |    2 ++
 lily/parser.yy |    4 ++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/lily/lexer.ll b/lily/lexer.ll
index ccc8dee..c4bc7b9 100644
--- a/lily/lexer.ll
+++ b/lily/lexer.ll
@@ -555,6 +555,8 @@ BOM_UTF8    \357\273\277
                                return MARKUP_HEAD_SCM0_MARKUP1_MARKUP2;
                        else if (tag == ly_symbol2scm 
("scheme0-scheme1-scheme2"))
                                return MARKUP_HEAD_SCM0_SCM1_SCM2;
+                       else if (tag == ly_symbol2scm 
("scheme0-scheme1-scheme2-scheme3"))
+                               return MARKUP_HEAD_SCM0_SCM1_SCM2_SCM3;
                        else {
                                programming_error ("no parser tag defined for 
this markup signature"); 
                                ly_display_scm (s);
diff --git a/lily/parser.yy b/lily/parser.yy
index d2f3a8c..2f9a391 100644
--- a/lily/parser.yy
+++ b/lily/parser.yy
@@ -296,6 +296,7 @@ If we give names, Bison complains.
 %token <scm> MARKUP_HEAD_SCM0_SCM1_MARKUP2_MARKUP3
 %token <scm> MARKUP_HEAD_SCM0_MARKUP1_MARKUP2
 %token <scm> MARKUP_HEAD_SCM0_SCM1_SCM2
+%token <scm> MARKUP_HEAD_SCM0_SCM1_SCM2_SCM3
 %token <scm> MARKUP_LIST_HEAD_EMPTY
 %token <scm> MARKUP_LIST_HEAD_LIST0
 %token <scm> MARKUP_LIST_HEAD_SCM0
@@ -2472,6 +2473,9 @@ simple_markup:
        | MARKUP_HEAD_SCM0_SCM1_SCM2 embedded_scm embedded_scm embedded_scm {
                $$ = scm_list_4 ($1, $2, $3, $4);
        }
+       | MARKUP_HEAD_SCM0_SCM1_SCM2_SCM3 embedded_scm embedded_scm 
embedded_scm embedded_scm {
+               $$ = scm_list_5 ($1, $2, $3, $4, $5);
+       }
        | MARKUP_HEAD_SCM0_SCM1 embedded_scm embedded_scm {
                $$ = scm_list_3 ($1, $2, $3);
        }
-- 
1.6.3.3






reply via email to

[Prev in Thread] Current Thread [Next in Thread]