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.27 1997/09/08 01:03:24 hubbe Exp $"); + RCSID("$Id: lex.c,v 1.28 1997/10/11 06:48:23 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:1666:    case ')':    case '[':    case ']':    case '{':    case ';':    case '}': return c;       case '`':    {    char *tmp; +  int offset=2; +  if(GOBBLE('`')) offset--; +  if(GOBBLE('`')) offset--; +     switch(GETC())    { -  case '+': tmp="`+"; break; -  case '/': tmp="`/"; break; -  case '%': tmp="`%"; break; -  case '*': tmp="`*"; break; -  case '&': tmp="`&"; break; -  case '|': tmp="`|"; break; -  case '^': tmp="`^"; break; -  case '~': tmp="`~"; break; +  case '+': tmp="```+"; break; +  case '/': tmp="```/"; break; +  case '%': tmp="```%"; break; +  case '*': tmp="```*"; break; +  case '&': tmp="```&"; break; +  case '|': tmp="```|"; break; +  case '^': tmp="```^"; break; +  case '~': tmp="```~"; break;    case '<': -  if(GOBBLE('<')) { tmp="`<<"; break; } -  if(GOBBLE('=')) { tmp="`<="; break; } -  tmp="`<"; +  if(GOBBLE('<')) { tmp="```<<"; break; } +  if(GOBBLE('=')) { tmp="```<="; break; } +  tmp="```<";    break;       case '>': -  if(GOBBLE('>')) { tmp="`>>"; break; } -  if(GOBBLE('=')) { tmp="`>="; break; } -  tmp="`>"; +  if(GOBBLE('>')) { tmp="```>>"; break; } +  if(GOBBLE('=')) { tmp="```>="; break; } +  tmp="```>";    break;       case '!': -  if(GOBBLE('=')) { tmp="`!="; break; } -  tmp="`!"; +  if(GOBBLE('=')) { tmp="```!="; break; } +  tmp="```!";    break;       case '=': -  if(GOBBLE('=')) { tmp="`=="; break; } -  tmp="`="; +  if(GOBBLE('=')) { tmp="```=="; break; } +  tmp="```=";    break;       case '(':    if(GOBBLE(')'))    { -  tmp="`()"; +  tmp="```()";    break;    }    yyerror("Illegal ` identifier."); -  tmp=""; +  tmp="``";    break;       case '-':    if(GOBBLE('>'))    { -  tmp="`->"; -  if(GOBBLE('=')) tmp="`->="; +  tmp="```->"; +  if(GOBBLE('=')) tmp="```->=";    }else{ -  tmp="`-"; +  tmp="```-";    }    break;       case '[':    if(GOBBLE(']'))    { -  tmp="`[]"; -  if(GOBBLE('=')) tmp="`[]="; +  tmp="```[]"; +  if(GOBBLE('=')) tmp="```[]=";    break;    }       default:    yyerror("Illegal ` identifier."); -  tmp=""; +  tmp="``";    break;       }       if(literal)    { -  yylval->str=buf; +  yylval->str=tmp+offset;    }else{ -  yylval->string=make_shared_string(tmp); +  yylval->string=make_shared_string(tmp+offset);    }    return F_IDENTIFIER;    }          default:    if(isidchar(c))    {    struct pike_string *s;    UNGETC(c);