+2001-11-08 Bruno Haible <haible@clisp.cons.org>
+
+ * message.h: New enum value format_smalltalk.
+ * message.c (format_language): Add value for format_smalltalk.
+ (format_language_pretty): Likewise.
+ * format.h (formatstring_smalltalk): New declaration.
+ * format-ycp.c (formatstring_smalltalk): New variable.
+ * format.c (formatstring_parsers): Add value for format_smalltalk.
+
2001-11-05 Bruno Haible <haible@clisp.cons.org>
* format-lisp.c (parse_upto): Remove 'base' argument. It is always 0.
-/* YCP format strings.
+/* YCP and Smalltalk format strings.
Copyright (C) 2001 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
/* YCP sformat strings are described in libycp documentation YCP-builtins.html.
A directive starts with '%' and is followed by '%' or a nonzero digit ('1'
to '9').
+ GNU Smalltalk format strings are described in the CharArray documentation,
+ methods 'bindWith:' and 'bindWithArguments:'. They have the same syntax.
*/
struct spec
};
+struct formatstring_parser formatstring_smalltalk =
+{
+ format_parse,
+ format_free,
+ format_get_number_of_directives,
+ format_check
+};
+
+
#ifdef TEST
/* Test program: Print the argument list specification returned by
/* Table of all format string parsers. */
struct formatstring_parser *formatstring_parsers[NFORMATS] =
{
- /* format_c */ &formatstring_c,
- /* format_python */ &formatstring_python,
- /* format_lisp */ &formatstring_lisp,
- /* format_java */ &formatstring_java,
- /* format_pascal */ &formatstring_pascal,
- /* format_ycp */ &formatstring_ycp
+ /* format_c */ &formatstring_c,
+ /* format_python */ &formatstring_python,
+ /* format_lisp */ &formatstring_lisp,
+ /* format_smalltalk */ &formatstring_smalltalk,
+ /* format_java */ &formatstring_java,
+ /* format_pascal */ &formatstring_pascal,
+ /* format_ycp */ &formatstring_ycp
};
extern struct formatstring_parser formatstring_c;
extern struct formatstring_parser formatstring_python;
extern struct formatstring_parser formatstring_lisp;
+extern struct formatstring_parser formatstring_smalltalk;
extern struct formatstring_parser formatstring_java;
extern struct formatstring_parser formatstring_pascal;
extern struct formatstring_parser formatstring_ycp;
const char *const format_language[NFORMATS] =
{
- /* format_c */ "c",
- /* format_python */ "python",
- /* format_lisp */ "lisp",
- /* format_java */ "java",
- /* format_pascal */ "object-pascal",
- /* format_ycp */ "ycp"
+ /* format_c */ "c",
+ /* format_python */ "python",
+ /* format_lisp */ "lisp",
+ /* format_smalltalk */ "smalltalk",
+ /* format_java */ "java",
+ /* format_pascal */ "object-pascal",
+ /* format_ycp */ "ycp"
};
const char *const format_language_pretty[NFORMATS] =
{
- /* format_c */ "C",
- /* format_python */ "Python",
- /* format_lisp */ "Lisp",
- /* format_java */ "Java",
- /* format_pascal */ "Object Pascal",
- /* format_ycp */ "YCP"
+ /* format_c */ "C",
+ /* format_python */ "Python",
+ /* format_lisp */ "Lisp",
+ /* format_smalltalk */ "Smalltalk",
+ /* format_java */ "Java",
+ /* format_pascal */ "Object Pascal",
+ /* format_ycp */ "YCP"
};
format_c,
format_python,
format_lisp,
+ format_smalltalk,
format_java,
format_pascal,
format_ycp