use enums arch specific for syscall names
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Sat, 17 Dec 2005 23:43:30 +0000 (23:43 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Sat, 17 Dec 2005 23:43:30 +0000 (23:43 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1428 04897980-b3bd-0310-b5e0-8ef037075253

genevent-new/parser.c

index 921c559ae5fed7e131107fc14f79db99d33b6fce..b8f2a6a2fc03d924847d5dda9d045c8f0c873f2b 100644 (file)
@@ -741,7 +741,7 @@ type_descriptor_t *parseType(parse_file_t *in, type_descriptor_t *inType,
     while(strcmp("label",token) == 0){
       int *label_value = malloc(sizeof(int));
       
-      str   = allocAndCopy(getNameAttribute(in));      
+      str   = allocAndCopy(getNameAttribute(in));
       token = getValueStrAttribute(in);
       
        sequence_push(&(t->labels),str);
@@ -972,7 +972,8 @@ char *getName(parse_file_t * in)
   char *token;
 
   token = getToken(in);
-  if(in->type != NAME) in->error(in,"Name token was expected");
+  // Optional descriptions
+       // if(in->type != NAME) in->error(in,"Name token was expected");
   return token;
 }
 
@@ -1154,11 +1155,11 @@ char *getToken(parse_file_t * in)
         if(pos == BUFFER_SIZE) in->error(in, "number token too large");
         in->type = NUMBER;
       }    
-      else if(isalpha(car)) {
+      else if(isalnum(car) || car == '_' || car == '-') {
         in->buffer[0] = car;
         pos = 1;
         while((car = getc(fp)) != EOF && pos < BUFFER_SIZE) {
-          if(!(isalnum(car) || car == '_')) {
+          if(!(isalnum(car) || car == '_' || car == '-')) {
             ungetc(car,fp);
             break;
           }
This page took 0.024757 seconds and 4 git commands to generate.