argument parsing: add ISL_ARG_USER_OPT_CHOICE
[platform/upstream/isl.git] / isl_stream.c
index 90ca640..4d684ec 100644 (file)
@@ -95,6 +95,8 @@ void isl_stream_error(struct isl_stream *s, struct isl_token *tok, char *msg)
        if (tok) {
                if (tok->type < 256)
                        fprintf(stderr, "got '%c'\n", tok->type);
+               else if (tok->type == ISL_TOKEN_IDENT)
+                       fprintf(stderr, "got ident '%s'\n", tok->u.s);
                else
                        fprintf(stderr, "got token type %d\n", tok->type);
        }
@@ -217,6 +219,8 @@ static enum isl_token_type check_keywords(struct isl_stream *s)
                return ISL_TOKEN_INFTY;
        if (!strcasecmp(s->buffer, "NaN"))
                return ISL_TOKEN_NAN;
+       if (!strcasecmp(s->buffer, "max"))
+               return ISL_TOKEN_MAX;
 
        if (!s->keywords)
                return ISL_TOKEN_IDENT;