From afac35c0b2266728e553aa4611e5ab33a2e75764 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 14 Jul 2004 21:45:22 +0000 Subject: [PATCH] (context_prop_spec): check grob name for alphanumericness.. --- ChangeLog | 3 +++ lily/parser.yy | 5 +++++ python/lilylib.py | 6 ++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 92fbb822ed..576adb96f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-07-14 Han-Wen Nienhuys + * lily/parser.yy (context_prop_spec): check grob name for + alphanumericness.. + * lily/lyric-engraver.cc: creates LyricText objects 2004-07-13 Han-Wen Nienhuys diff --git a/lily/parser.yy b/lily/parser.yy index a0c2170b51..984516cefa 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -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)); } diff --git a/python/lilylib.py b/python/lilylib.py index cca0c239d4..2da37b1083 100644 --- a/python/lilylib.py +++ b/python/lilylib.py @@ -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) -- 2.39.2