]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/parser.yy (direction_less_char): soft code \< \> \! \( \) (
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 18 Sep 2004 10:53:08 +0000 (10:53 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 18 Sep 2004 10:53:08 +0000 (10:53 +0000)
)

* input/regression/tie.ly (texidoc): cleanup.

* ly/declarations-init.ly (tildeSymbol): soft-code meaning of [ ]
and ~

ChangeLog
input/regression/tie.ly
lily/parser.yy
ly/declarations-init.ly
ly/script-init.ly
scm/define-markup-commands.scm

index bd0d0eb9fbc573d5b34dc6426e6fb4f486ecbdc6..bac9ea8bc42c1ab01a952cd77b9d2c7d2c0385a5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2004-09-18  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/parser.yy (direction_less_char): soft code \< \> \! \( \) (
+       ) 
+
+       * input/regression/tie.ly (texidoc): cleanup.
+
+       * ly/declarations-init.ly (tildeSymbol): soft-code meaning of [ ]
+       and ~
+
        * lily/slur-scoring.cc (score_extra_encompass): check if extra
        objects are on boundary column. 
 
index 0b99a6e5d58dc00080c518b0065023bfe4f74c72..c48b0a6ff3461519d5833f56e8176166dc0d03aa 100644 (file)
@@ -7,17 +7,16 @@ Ties are strictly horizontal.  They are placed in between note heads.
 The horizontal middle should not overlap with a staffline.
 "
 }
-\score{
-       \relative c''{
-               %b2~b4~b8~b16~b32~b64 r64\break
-               %a2~a4~a8~a16~a32~a64 r64
-               \time 8/4
-               d1 ~ d2~d4~d8~d16~d32~d64 r64\break
-               a1~ a2~a4~a8~a16~a32~a64 r64
-               %c2~c4~c8~c16~c32~c64 r64
-       }
-       \paper{
-               linewidth=0.
-       }
+\paper{
+    raggedright= ##t 
 }
 
+
+\relative c''{
+                               %b2~b4~b8~b16~b32~b64 r64\break
+                               %a2~a4~a8~a16~a32~a64 r64
+    \time 8/4
+    d1 ~ d2~d4~d8~d16~d32~d64 r64\break
+    a1~ a2~a4~a8~a16~a32~a64 r64
+                               %c2~c4~c8~c16~c32~c64 r64
+}
index 1ffdfa5f35a7dc5abaef70b652d805b0bc72b66f..267ec9467d672e4e8ac52aa641e9eecf2ab9e5d9 100644 (file)
@@ -403,6 +403,7 @@ or
 %type <scm>    context_def_spec_block context_def_spec_body
 %type <scm>    context_mod context_def_mod optional_context_mod
 %type <scm>    context_prop_spec
+%type <scm>    direction_less_char
 %type <scm>    duration_length fraction
 %type <scm>    embedded_scm scalar
 %type <scm>    identifier_init
@@ -1743,45 +1744,53 @@ string_number_event:
        }
        ;
 
-
-direction_less_event:
+direction_less_char:
        '['  {
-
-
-/*
-
-TODO: should take all these defs out of the parser, adn make use
-configurable, i.e.
-
-
-(set-articulation '~ "trill")
-
-*/
-               Music *m = MY_MAKE_MUSIC ("BeamEvent");
-               m->set_spot (THIS->here_input ());
-               m->set_property ("span-direction", scm_int2num (START));
-               $$ = m;
+               $$ = ly_symbol2scm ("bracketOpenSymbol");
        }
        | ']'  {
-               Music *m = MY_MAKE_MUSIC ("BeamEvent");
-               m->set_spot (THIS->here_input ());
-               m->set_property ("span-direction", scm_int2num (STOP));
-               $$ = m;
+               $$ = ly_symbol2scm ("bracketCloseSymbol"); 
        }
-       | '~' {
-               Music *m = MY_MAKE_MUSIC ("TieEvent");
-               m->set_spot (THIS->here_input ());
-               $$ = m;
+       | '~'  {
+               $$ = ly_symbol2scm ("tildeSymbol");
        }
-       | close_event {
-               $$ = $1;
-               dynamic_cast<Music *> ($$)->set_property ("span-direction",
-                       scm_int2num (START));
+       | '('  {
+               $$ = ly_symbol2scm ("parenthesisOpenSymbol");
        }
-       | open_event {
-               $$ = $1;
-               dynamic_cast<Music *> ($$)->set_property ("span-direction",
-                       scm_int2num (STOP));
+       | ')'  {
+               $$ = ly_symbol2scm ("parenthesisCloseSymbol");
+       }
+       | E_EXCLAMATION  {
+               $$ = ly_symbol2scm ("escapedExclamationSymbol");
+       }
+       | E_OPEN  {
+               $$ = ly_symbol2scm ("escapedParenthesisOpenSymbol");
+       }
+       | E_CLOSE  {
+               $$ = ly_symbol2scm ("escapedParenthesisCloseSymbol");
+       }
+       | E_BIGGER  {
+               $$ = ly_symbol2scm ("escapedBiggerSymbol");
+       }
+       | E_SMALLER  {
+               $$ = ly_symbol2scm ("escapedSmallerSymbol");
+       }
+       ;
+
+direction_less_event:
+       direction_less_char  {
+               SCM predefd = THIS->lexer_->lookup_identifier_symbol ($1);
+               Music * m = 0:
+               if (unsmob_music (predefd))
+               {
+                       m = unsmob_music (predefd)->clone ();
+               }
+               else
+               {
+                       m = MY_MAKE_MUSIC ("Music");
+               }
+               m->set_spot (THIS->here_input ());
+               $$ = m;         
        }
        | EVENT_IDENTIFIER      {
                $$ = unsmob_music ($1);
@@ -1881,52 +1890,6 @@ pitch_also_in_chords:
        | steno_tonic_pitch
        ;
 
-close_event:
-       '('     {
-               Music *s = MY_MAKE_MUSIC ("SlurEvent");
-               $$ = s;
-               s->set_spot (THIS->here_input ());
-       }
-       | E_OPEN        {
-               Music *s = MY_MAKE_MUSIC ("PhrasingSlurEvent");
-               $$ = s;
-               s->set_spot (THIS->here_input ());
-       }
-       | E_SMALLER {
-               Music *s = MY_MAKE_MUSIC ("CrescendoEvent");
-               $$ = s;
-               s->set_spot (THIS->here_input ());
-       }
-       | E_BIGGER {
-               Music *s = MY_MAKE_MUSIC ("DecrescendoEvent");
-               $$ = s;
-               s->set_spot (THIS->here_input ());
-       }
-       ;
-
-
-open_event:
-       E_EXCLAMATION   {
-               Music *s = MY_MAKE_MUSIC ("CrescendoEvent");
-               s->set_spot (THIS->here_input ());
-
-               $$ = s;
-       }
-       | ')'   {
-               Music *s= MY_MAKE_MUSIC ("SlurEvent");
-               $$ = s;
-               s->set_spot (THIS->here_input ());
-
-       }
-       | E_CLOSE       {
-               Music *s= MY_MAKE_MUSIC ("PhrasingSlurEvent");
-               $$ = s;
-               s->set_property ("span-type",
-                       scm_makfrom0str ("phrasing-slur"));
-               s->set_spot (THIS->here_input ());
-       }
-       ;
-
 gen_text_def:
        full_markup {
                Music *t = MY_MAKE_MUSIC ("TextScriptEvent");
index 2a4921390129bfbe2052a896c88fadedf3d4a12b..e85362a8859bfa147eb3fcf12276c6ac9201e8e6 100644 (file)
@@ -40,8 +40,24 @@ noBreak = #(make-event-chord (list (make-penalty-music 10001 0)))
 pageBreak = #(make-event-chord (list (make-penalty-music -10001 -10001)))
 noPageBreak = #(make-event-chord (list (make-penalty-music 0 10001)))
 
+
+%
+% Code articulation definitions
+%
 noBeam = #(make-music 'BeamForbidEvent) 
 pipeSymbol = #(make-music 'BarCheck)
+bracketOpenSymbol = #(make-span-event 'BeamEvent START)
+bracketCloseSymbol = #(make-span-event 'BeamEvent STOP)
+tildeSymbol = #(make-music 'TieEvent)
+parenthesisOpenSymbol =  #(make-span-event 'SlurEvent START)
+parenthesisCloseSymbol = #(make-span-event 'SlurEvent STOP)
+escapedExclamationSymbol = #(make-span-event 'CrescendoEvent STOP)
+escapedParenthesisOpenSymbol = #(make-span-event 'PhrasingSlurEvent START)
+escapedParenthesisCloseSymbol = #(make-span-event 'PhrasingSlurEvent STOP)
+escapedBiggerSymbol = #(make-span-event 'CrescendoEvent START)
+escapedSmallerSymbol = #(make-span-event 'DecrescendoEvent START)
+
+
 
 foo = { \pageBreak }
 
index 2036ff4518ee790837bd078f936281a4a3425cb2..496dcc0ee279f4065dbd0965b1abd359119de921 100644 (file)
@@ -1,6 +1,8 @@
 \version "2.3.16"
 
 
+% code char abbreviations
+%
 dashHat= "marcato"
 dashPlus= "stopped"
 dashDash= "tenuto"
index 5b763322442edabb00184caed3306e35bb33a3aa..8bc1a0c1564671bafa073978a5e581d5eb5bbfbd 100644 (file)
@@ -609,8 +609,8 @@ any sort of property supported by @internalsref{font-interface} and
 
 (def-markup-command (box paper props arg) (markup?)
   "Draw a box round @var{arg}.  Looks at @code{thickness} and
-@code{box-padding} to determine line thickness and padding around the
-markup."
+@code{box-padding} properties to determine line thickness and padding
+around the markup."
   (let ((th (chain-assoc-get 'thickness props  0.1))
         (pad (chain-assoc-get 'box-padding props 0.2))
         (m (interpret-markup paper props arg)))