lexer: Add tokens for '{', '}', ':', ';' for use in the matrix language.
[pspp] / src / data / identifier.c
index db20010464cab1e3f3a1f42cc1e7a4c012bf8c1b..baa0abd1c57528ace8b76c73ebc93717dd73d821 100644 (file)
@@ -46,7 +46,6 @@ token_type_to_name (enum token_type type)
 #define TOKEN_TYPE(TYPE) case T_##TYPE: return #TYPE;
       TOKEN_TYPES
 #undef TOKEN_TYPE
-    case TOKEN_N_TYPES:
     default:
       return "unknown token type";
     }
@@ -65,6 +64,8 @@ token_type_to_string (enum token_type token)
     case T_POS_NUM:
     case T_NEG_NUM:
     case T_STRING:
+    case T_MACRO_ID:
+    case T_MACRO_PUNCT:
     case T_STOP:
       return NULL;
 
@@ -98,9 +99,21 @@ token_type_to_string (enum token_type token)
     case T_RBRACK:
       return "]";
 
+    case T_LCURLY:
+      return "{";
+
+    case T_RCURLY:
+      return "}";
+
     case T_COMMA:
       return ",";
 
+    case T_SEMICOLON:
+      return ";";
+
+    case T_COLON:
+      return ":";
+
     case T_AND:
       return "AND";
 
@@ -142,9 +155,6 @@ token_type_to_string (enum token_type token)
 
     case T_EXP:
       return "**";
-
-    case TOKEN_N_TYPES:
-      NOT_REACHED ();
     }
 
   NOT_REACHED ();