summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7e6760b)
Lily_parser* arg for copy ctor too.
bump version
catch all GUILE exceptions
end context snippet with '\n'
+2006-11-05 Han-Wen Nienhuys <hanwen@lilypond.org>
+
+ * lily/input.cc:
+ end context snippet with '\n'
+
+ * lily/parse-scm.cc:
+ catch all GUILE exceptions
+
+ * VERSION:
+ bump version
+
+ * lily/include/lily-lexer.hh:
+ * lily/lily-lexer.cc:
+ * lily/lily-parser.cc:
+ Lily_parser* arg for copy ctor too.
+
+ * scripts/abc2ly.py:
+ abc2ly new tempo syntax
+
2006-11-04 Heikki Junes <hjunes@gmail.com>
* po/fi.po: update Finnish translation.
2006-11-04 Heikki Junes <hjunes@gmail.com>
* po/fi.po: update Finnish translation.
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=9
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=9
Input last_input_;
Lily_lexer (Sources *, Lily_parser *);
Input last_input_;
Lily_lexer (Sources *, Lily_parser *);
- Lily_lexer (Lily_lexer const &);
+ Lily_lexer (Lily_lexer const &, Lily_parser *);
int yylex ();
void add_lexed_char (int);
int yylex ();
void add_lexed_char (int);
{
if (source_file_)
s = location_string () + ": " + s + "\n"
{
if (source_file_)
s = location_string () + ": " + s + "\n"
- + source_file_->quote_input (start_);
+ + source_file_->quote_input (start_) + "\n";
chordmodifier_tab_ = scm_make_vector (scm_from_int (1), SCM_EOL);
}
chordmodifier_tab_ = scm_make_vector (scm_from_int (1), SCM_EOL);
}
-Lily_lexer::Lily_lexer (Lily_lexer const &src)
+Lily_lexer::Lily_lexer (Lily_lexer const &src, Lily_parser *parser)
keytable_ = (src.keytable_) ? new Keyword_table (*src.keytable_) : 0;
chordmodifier_tab_ = src.chordmodifier_tab_;
pitchname_tab_stack_ = src.pitchname_tab_stack_;
keytable_ = (src.keytable_) ? new Keyword_table (*src.keytable_) : 0;
chordmodifier_tab_ = src.chordmodifier_tab_;
pitchname_tab_stack_ = src.pitchname_tab_stack_;
smobify_self ();
if (src.lexer_)
smobify_self ();
if (src.lexer_)
- lexer_ = new Lily_lexer (*src.lexer_);
-
+ {
+ lexer_ = new Lily_lexer (*src.lexer_, this);
+ }
+
-/*
- Do some magical incantations: if not, lily will exit on the first
- GUILE error, leaving no location trace.
-*/
-
-#if GUILE_MINOR_VERSION < 7
-#define READ_ERROR "misc-error"
-#else
-#define READ_ERROR "read-error"
-#endif
-
SCM
protected_ly_parse_scm (Parse_start *ps)
{
SCM
protected_ly_parse_scm (Parse_start *ps)
{
- return scm_internal_catch (ly_symbol2scm (READ_ERROR),
+ /*
+ Catch #t : catch all Scheme level errors.
+ */
+ return scm_internal_catch (SCM_BOOL_T,
&catch_protected_parse_body,
(void *) ps,
&parse_handler, (void *) ps);
&catch_protected_parse_body,
(void *) ps,
&parse_handler, (void *) ps);
# %%LY now supported.
# \breve and \longa supported.
# M:none doesn't crash lily.
# %%LY now supported.
# \breve and \longa supported.
# M:none doesn't crash lily.
+# lilypond '--' supported.
# Enhancements (Guy Gascoigne-Piggford)
#
# Enhancements (Guy Gascoigne-Piggford)
#
if string.count(a, '/') == 1:
array=string.split(a,'/')
numerator=array[0]
if string.count(a, '/') == 1:
array=string.split(a,'/')
numerator=array[0]
+ if int(numerator) != 1:
sys.stderr.write("abc2ly: Warning, unable to translate a Q specification with a numerator of %s: %s\n" % (numerator, a))
array2=string.split(array[1],'=')
denominator=array2[0]
perminute=array2[1]
duration=str(string.atoi(denominator)/string.atoi(numerator))
sys.stderr.write("abc2ly: Warning, unable to translate a Q specification with a numerator of %s: %s\n" % (numerator, a))
array2=string.split(array[1],'=')
denominator=array2[0]
perminute=array2[1]
duration=str(string.atoi(denominator)/string.atoi(numerator))
- midi_specs=string.join(["\\tempo", duration, "=", perminute])
+ midi_specs=string.join([" \n\t\t\context {\n\t\t \Score tempoWholesPerMinute = #(ly:make-moment ", perminute, " ", duration, ")\n\t\t }\n"])
else:
sys.stderr.write("abc2ly: Warning, unable to parse Q specification: %s\n" % a)
else:
sys.stderr.write("abc2ly: Warning, unable to parse Q specification: %s\n" % a)
def slyrics_append(a):
a = re.sub ( '_', ' _ ', a) # _ to ' _ '
def slyrics_append(a):
a = re.sub ( '_', ' _ ', a) # _ to ' _ '
- a = re.sub ( '-', '- ', a) # split words with -
- a = re.sub ( ' - - ', ' -- ', a) # unless was originally " -- "
+ a = re.sub ( '([^-])-([^-])', '\\1- \\2', a) # split words with "-" unless was originally "--"
a = re.sub ( '\\\\- ', '-', a) # unless \-
a = re.sub ( '~', '_', a) # ~ to space('_')
a = re.sub ( '\*', '_ ', a) # * to to space
a = re.sub ( '\\\\- ', '-', a) # unless \-
a = re.sub ( '~', '_', a) # ~ to space('_')
a = re.sub ( '\*', '_ ', a) # * to to space