Changes to parser to allow less copying. Use of the new nsSliding[Sub]String classes so that tokens can hold substrings that keep references into the scanner buffer. Cleaned up token interface and general string usage. r=harishd,heikki sr=jst

git-svn-id: svn://10.0.0.236/trunk@83553 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
vidur%netscape.com
2000-12-12 21:58:14 +00:00
parent 33d6574ffe
commit 3e62b3f9f3
129 changed files with 5425 additions and 3603 deletions

View File

@@ -1,4 +1,4 @@
!#!nmake
#!nmake
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
@@ -23,10 +23,10 @@ DEPTH=..\..\..
MAKE_OBJ_TYPE = EXE
PROGRAM = .\$(OBJDIR)\logparse.exe
PROGRAM = .\$(OBJDIR)\TestParser.exe
OBJS = \
.\$(OBJDIR)\logparse.obj \
.\$(OBJDIR)\TestParser.obj \
$(NULL)
LINCS= \
@@ -52,4 +52,4 @@ install:: $(PROGRAM)
$(MAKE_INSTALL) $(PROGRAM) $(DIST)\bin
clobber::
rm -f $(DIST)\bin\logparse.exe
rm -f $(DIST)\bin\TestParser.exe

View File

@@ -88,7 +88,9 @@ Compare(nsString& str, nsString& aFileName)
return 0;
else
{
char* cstr = str.ToNewUTF8String();
nsAutoString left;
str.Left(left, different);
char* cstr = left.ToNewUTF8String();
printf("Comparison failed at char %d:\n-----\n%s\n-----\n",
different, cstr);
Recycle(cstr);