#include <config.h>
+#include "language/lexer/format-parser.h"
+
#include <ctype.h>
#include <stdint.h>
#include <stdlib.h>
#include "data/format.h"
#include "data/variable.h"
-#include "language/lexer/format-parser.h"
#include "language/lexer/lexer.h"
#include "libpspp/message.h"
#include "libpspp/misc.h"
static bool
parse_abstract_format_specifier__ (struct lexer *lexer,
char type[FMT_TYPE_LEN_MAX + 1],
- int *width, int *decimals)
+ uint16_t *width, uint8_t *decimals)
{
struct substring s;
struct substring type_ss, width_ss, decimals_ss;
bool has_decimals;
- if (lex_token (lexer) != T_ID)
+ if (lex_token (lexer) != T_ID && lex_token (lexer) != T_STRING)
goto error;
/* Extract pieces. */
bool
parse_abstract_format_specifier (struct lexer *lexer,
char type[FMT_TYPE_LEN_MAX + 1],
- int *width, int *decimals)
+ uint16_t *width, uint8_t *decimals)
{
bool ok = parse_abstract_format_specifier__ (lexer, type, width, decimals);
if (ok)