isl_stream: parse NaN
authorSven Verdoolaege <skimo@kotnet.org>
Wed, 3 Mar 2010 22:04:34 +0000 (23:04 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Thu, 4 Mar 2010 18:04:56 +0000 (19:04 +0100)
include/isl_stream.h
isl_stream.c

index b69e8ab..f3ab6f2 100644 (file)
@@ -23,7 +23,7 @@ enum isl_token_type { ISL_TOKEN_ERROR = -1,
                        ISL_TOKEN_LE, ISL_TOKEN_GT, ISL_TOKEN_LT,
                        ISL_TOKEN_TO, ISL_TOKEN_AND,
                        ISL_TOKEN_OR, ISL_TOKEN_EXISTS,
-                       ISL_TOKEN_DEF, ISL_TOKEN_INFTY,
+                       ISL_TOKEN_DEF, ISL_TOKEN_INFTY, ISL_TOKEN_NAN,
                        ISL_TOKEN_LAST };
 
 struct isl_token {
index fe5ee87..37fa75f 100644 (file)
@@ -213,6 +213,8 @@ static enum isl_token_type check_keywords(struct isl_stream *s)
                return ISL_TOKEN_INFTY;
        if (!strcasecmp(s->buffer, "infinity"))
                return ISL_TOKEN_INFTY;
+       if (!strcasecmp(s->buffer, "NaN"))
+               return ISL_TOKEN_NAN;
 
        if (!s->keywords)
                return ISL_TOKEN_IDENT;