Branch: Tag:

2004-11-01

2004-11-01 01:33:30 by Martin Stjernholm <mast@lysator.liu.se>

Added \u and \U unicode style escapes. Broke out the escape parser so that
it can be used from other places. Warn about too large character values in
escapes and replace them with the char 0xffffffff (it used to silently
truncate them instead).

Rev: src/lex.c:1.120
Rev: src/lex.h:1.35
Rev: src/lexer.h:1.52

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: lex.c,v 1.119 2004/09/18 20:50:51 nilsson Exp $ + || $Id: lex.c,v 1.120 2004/11/01 01:33:30 mast Exp $   */      #include "global.h"   #include "lex.h"   #include "stuff.h" -  + #include "bignum.h"      #include <ctype.h>   
15:      struct lex lex;    + /* Must do like this since at least gcc is a little too keen on +  * optimizing INT_TYPE_MUL_OVERFLOW otherwise. */ + static unsigned INT32 eight = 8, sixteen = 16, ten = 10; +    /* Make lexers for shifts 0, 1 and 2. */      #define SHIFT 0