pike.git / lib / modules / Parser.pmod / Pike.pmod

version» Context lines:

pike.git/lib/modules/Parser.pmod/Pike.pmod:1:   //   // This file needs to support old pikes that e.g. don't understand   // "#pike". Some of them fail when they see an unknown cpp directive.   //   // #pike __REAL_VERSION__   // - // $Id: Pike.pmod,v 1.32 2003/06/17 23:09:31 mast Exp $ + // $Id: Pike.pmod,v 1.33 2004/03/20 06:47:28 nilsson Exp $      //! This module parses and tokenizes Pike source code.      inherit "C.pmod";      #define UNKNOWN_TOKEN \    error("Unknown pike token: %O\n", data[pos..pos+20])      static mapping(string : int) backquoteops =   ([ "/":1, "/=":2,
pike.git/lib/modules/Parser.pmod/Pike.pmod:132:       pos=s+1;    }    break;    }       pos=search(data,"\n",pos);    if(pos==-1)    error("Failed to find end of preprocessor statement.\n");    -  while(data[pos-1]=='\\') pos=search(data,"\n",pos+1); +  while(data[pos-1]=='\\' || (data[pos-1]=='\r' && data[pos-2]=='\\')) +  pos=search(data,"\n",pos+1); +     sscanf(data[start..pos], -  "#%*[ \t]charset%*[ \t\\]%s%*[ \n]", string charset); +  "#%*[ \t]charset%*[ \t\\]%s%*[ \r\n]", string charset);    if(charset)    data = (data[0..pos]+    master()->decode_charset(data[pos+1..sizeof(data)-3],    charset)    +"\n\0"); // New end sentinel.    pos++;    break;       case 'a'..'z':    case 'A'..'Z':