#include "string.hh"
#include "string-convert.hh"
#include "my-lily-lexer.hh"
-#include "array.hh"
+#include "input-file-results.hh"
#include "interval.hh"
#include "lily-guile.hh"
#include "parser.hh"
ALPHAWORD {A}+
DIGIT {N}
UNSIGNED {N}+
+E_UNSIGNED \\{N}+
FRACTION {N}+\/{N}+
INT -?{UNSIGNED}
REAL ({INT}\.{N}*)|(-?\.{N}+)
String s (YYText ()+1);
s = s.left_string (s.index_last ('"'));
- new_input (s,source_global);
+ new_input (s, &global_input_file->sources_ );
yy_pop_state ();
}
<incl>\\{BLACK}*;?{WHITE} { /* got the include identifier */
SCM sid = lookup_identifier (s);
if (gh_string_p (sid)) {
- new_input (ly_scm2string (sid), source_global);
+ new_input (ly_scm2string (sid), &global_input_file->sources_);
yy_pop_state ();
} else {
String msg (_f ("wrong or undefined identifier: `%s'", s ));
}
<chords,notes,figures>{RESTNAME} {
const char *s = YYText ();
- yylval.scm = ly_str02scm (s);
+ yylval.scm = scm_makfrom0str (s);
return RESTNAME;
}
<chords,notes,figures>R {
yylval.i = String_convert::dec2int (String (YYText ()));
return UNSIGNED;
}
+ {E_UNSIGNED} {
+ yylval.i = String_convert::dec2int (String (YYText () +1));
+ return E_UNSIGNED;
+ }
\" {
start_quote ();
/* yylval is union. Must remember STRING before setting SCM*/
String *sp = yylval.string;
- yylval.scm = ly_str02scm (sp->to_str0 ());
+ yylval.scm = scm_makfrom0str (sp->to_str0 ());
delete sp;
return STRING;
}
char c = s[s.length () - 1];
if (c == '{' || c == '}') // brace open is for not confusing dumb tools.
here_input ().warning (
- _ ("Brace found at end of lyric. Did you forget a space?"));
- yylval.scm = ly_str02scm (s.to_str0 ());
+ _ ("Brace found at end of lyric. Did you forget a space?"));
+ yylval.scm = scm_makfrom0str (s.to_str0 ());
return STRING;
\/\+ {
return CHORD_BASS;
}
+ \/ {
+ return CHORD_SLASH;
+ }
\^ {
return CHORD_CARET;
}
return UNSIGNED;
}
+
[{}] {
return YYText ()[0];
return E_TILDE;
case '\\':
return E_BACKSLASH;
+
default:
return E_CHAR;
}
String msg (_f ("unknown escaped string: `\\%s'", str));
LexerError (msg.to_str0 ());
- yylval.scm = ly_str02scm (str.to_str0 ());
+ yylval.scm = scm_makfrom0str (str.to_str0 ());
return STRING;
}
}
}
- yylval.scm = ly_str02scm (str.to_str0 ());
+ yylval.scm = scm_makfrom0str (str.to_str0 ());
return STRING;
}
Lilypond_version ver (s);
if (! ((ver >= oldest_version) && (ver <= current)))
{
- non_fatal_error (_f ("incorrect lilypond version: %s (%s, %s)", ver.string (), oldest_version.string (), current.string ()));
- non_fatal_error (_ ("Consider converting the input with the convert-ly script"));
+ non_fatal_error (_f ("Incorrect lilypond version: %s (%s, %s)", ver.string (), oldest_version.string (), current.string ()));
+ non_fatal_error (_ ("Consider updating the input with the convert-ly script"));
return false;
}
return true;