pike.git / src / lex.c

version» Context lines:

pike.git/src/lex.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: lex.c,v 1.40 1998/01/25 08:25:09 hubbe Exp $"); + RCSID("$Id: lex.c,v 1.41 1998/01/26 19:59:55 hubbe Exp $");   #include "language.h"   #include "array.h"   #include "lex.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "constants.h"   #include "hashtable.h"   #include "stuff.h"   #include "pike_memory.h"   #include "interpret.h"
pike.git/src/lex.c:532:       case '\\':    c=char_const();    }    if(!GOBBLE('\''))    yyerror("Unterminated character constant.");    yylval->number=c;    return F_NUMBER;       case '"': -  yylval->string=readstring(); +  { +  struct pike_string *s=readstring(); +  yylval->n=mkstrnode(s); +  free_string(s);    return F_STRING; -  +  }       case ':':    if(GOBBLE(':')) return F_COLON_COLON;    return c;       case '.':    if(GOBBLE('.'))    {    if(GOBBLE('.')) return F_DOT_DOT_DOT;    return F_DOT_DOT;
pike.git/src/lex.c:728:    break;    }       default:    yyerror("Illegal ` identifier.");    lex.pos--;    tmp="``";    break;    }    -  yylval->string=make_shared_string(tmp+offset); +  { +  struct pike_string *s=make_shared_string(tmp+offset); +  yylval->n=mkstrnode(s); +  free_string(s);    return F_IDENTIFIER;    } -  +  }          default:    if(isidchar(c))    {    struct pike_string *s;    lex.pos--;    READBUF(isidchar(C));       yylval->number=lex.current_line;
pike.git/src/lex.c:848:    if(ISWORD("typeof")) return F_TYPEOF;    break;    case TWO_CHAR('v','o'):    if(ISWORD("void")) return F_VOID_ID;    break;    case TWO_CHAR('w','h'):    if(ISWORD("while")) return F_WHILE;    break;    }    } -  yylval->string=make_shared_binary_string(buf,len); +  { +  struct pike_string *tmp=make_shared_binary_string(buf,len); +  yylval->n=mkstrnode(tmp); +  free_string(tmp);    return F_IDENTIFIER; -  +  }    }else{    char buff[100];    sprintf(buff, "Illegal character (hex %02x) '%c'", c, c);    yyerror(buff);    return ' ';    }    }    }    }   }