]> git.donarmstrong.com Git - lilypond.git/commitdiff
(context_prop_spec): check grob name for
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 14 Jul 2004 21:45:22 +0000 (21:45 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 14 Jul 2004 21:45:22 +0000 (21:45 +0000)
alphanumericness..

ChangeLog
lily/parser.yy
python/lilylib.py

index 92fbb822edc7b199d74c5b17ec7677966cf96968..576adb96f641190d2ef3962e7f46d2f69a0c6fdf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-07-14  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
+       * lily/parser.yy (context_prop_spec): check grob name for
+       alphanumericness..
+
        * lily/lyric-engraver.cc: creates LyricText objects
 
 2004-07-13  Han-Wen Nienhuys   <hanwen@xs4all.nl>
index a0c2170b51a80ce26b1d09eea98d848c6fee3548..984516cefa01b749c7c09a4ab5d611887e6d3891 100644 (file)
@@ -1295,6 +1295,11 @@ context_mod:
 
 context_prop_spec:
        simple_string {
+               if (!is_regular_identifier ($1))
+               {
+                       THIS->here_input ().error (_("Grob name should be alphanumeric"));
+               }
+
                $$ = scm_list_2 (ly_symbol2scm ("Bottom"),
                        scm_string_to_symbol ($1));
        }
index cca0c239d49ebe95d6d9f15712dfa689a40a1500..2da37b1083d9f282f4bfddf3d878b0d9d6b31e50 100644 (file)
@@ -30,7 +30,9 @@ import glob
 # If set, LILYPONDPREFIX must take prevalence
 # if datadir is not set, we're doing a build and LILYPONDPREFIX
 
-import getopt, os, sys
+import getopt
+import os
+import sys
 datadir = '@local_lilypond_datadir@'
 if not os.path.isdir (datadir):
        datadir = '@lilypond_datadir@'
@@ -237,7 +239,7 @@ def command_name (cmd):
 
        # deal with "((latex ) >& 1 ) .." too
        cmd = re.match ("([\(\)]*)([^ ]*)", cmd).group(2)
-       return os.basename (cmd)
+       return os.path.basename (cmd)
 
 def error_log (name):
        name = re.sub('[^a-z]','x', name)