*** empty log message ***

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@6293 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
mguesdon 2000-03-16 16:16:49 +00:00
parent b45dc89478
commit b13501c8e3
62 changed files with 3645 additions and 1770 deletions

View file

@ -229,9 +229,9 @@ int GSWApplicationMain(NSString* _applicationClassName,
};
};
//TODO
GSWApplicationDebugSetChange();
if (_applicationClassName && [_applicationClassName length]>0)
ASSIGNCOPY(globalApplicationClassName,_applicationClassName);
GSWApplicationDebugSetChange();
applicationClass=[GSWApplication _applicationClass];
if (!applicationClass)
{
@ -1029,6 +1029,7 @@ int GSWApplicationMain(NSString* _applicationClassName,
languages:(NSArray*)_languages
{
//OK
BOOL isCachedComponent=NO;
GSWComponentDefinition* _componentDefinition=nil;
NSString* _language=nil;
int iLanguage=0;
@ -1040,36 +1041,24 @@ int GSWApplicationMain(NSString* _applicationClassName,
if (_language)
{
NSDebugMLLog(@"gswcomponents",@"trying _language=%@",_language);
NSDebugMLLog(@"gswcomponents",@"[self isCachingEnabled]=%s",([self isCachingEnabled] ? "YES" : "NO"));
NSDebugMLLog(@"gswcomponents",@"[self isCachingEnabled]=%s",([self isCachingEnabled] ? "YES" : "NO"));
if ([self isCachingEnabled])
{
_componentDefinition=[componentDefinitionCache objectForKeys:_name,_language,nil];
NSDebugMLLog(@"gswcomponents",@"A _componentDefinition=%@",_componentDefinition);
if (_componentDefinition==(GSWComponentDefinition*)GSNotFoundMarker)
_componentDefinition=nil;
else
{
GSWLogStdOut([NSString stringWithFormat:@"cachedComponent %@ language",_name,_language]);
GSWLog([NSString stringWithFormat:@"cachedComponent %@ language",_name,_language]);
};
else if (_componentDefinition)
isCachedComponent=YES;
};
if (!_componentDefinition)
{
_componentDefinition=[self lockedLoadComponentDefinitionWithName:_name
language:_language];
NSDebugMLLog(@"gswcomponents",@"B _componentDefinition=%p",(void*)_componentDefinition);
if (_componentDefinition)
{
GSWLogStdOut([NSString stringWithFormat:@"not cachedComponent %@ language",_name,_language]);
GSWLog([NSString stringWithFormat:@"not cachedComponent %@ language",_name,_language]);
};
if ([self isCachingEnabled])
{
if (_componentDefinition)
{
[componentDefinitionCache setObject:_componentDefinition
forKeys:_name,_language,nil];
}
[componentDefinitionCache setObject:_componentDefinition
forKeys:_name,_language,nil];
else
[componentDefinitionCache setObject:GSNotFoundMarker
forKeys:_name,_language,nil];
@ -1079,25 +1068,22 @@ int GSWApplicationMain(NSString* _applicationClassName,
};
if (!_componentDefinition)
{
_language=nil;
NSDebugMLLog0(@"low",@"trying no language");
NSDebugMLLog(@"gswcomponents",@"[self isCachingEnabled]=%s",([self isCachingEnabled] ? "YES" : "NO"));
NSDebugMLLog(@"gswcomponents",@"[self isCachingEnabled]=%s",([self isCachingEnabled] ? "YES" : "NO"));
if ([self isCachingEnabled])
{
_componentDefinition=[componentDefinitionCache objectForKeys:_name,nil];
NSDebugMLLog(@"gswcomponents",@"C _componentDefinition=%@",_componentDefinition);
if (_componentDefinition==(GSWComponentDefinition*)GSNotFoundMarker)
_componentDefinition=nil;
else if (_componentDefinition)
isCachedComponent=YES;
};
NSDebugMLLog(@"gswcomponents",@"D componentDefinition for %@ %s cached",_name,(_componentDefinition ? "" : "NOT"));
if (!_componentDefinition)
{
_componentDefinition=[self lockedLoadComponentDefinitionWithName:_name
language:nil];
if (_componentDefinition)
{
GSWLogStdOut([NSString stringWithFormat:@"not cachedComponent %@ language",_name,_language]);
GSWLog([NSString stringWithFormat:@"not cachedComponent %@ language",_name,_language]);
};
language:_language];
if ([self isCachingEnabled])
{
if (_componentDefinition)
@ -1116,12 +1102,21 @@ int GSWApplicationMain(NSString* _applicationClassName,
_name,
_languages);
};
NSDebugMLLog(@"gswcomponents",@"E _componentDefinition=%@",_componentDefinition);
NSDebugMLLog(@"gswcomponents",@"F componentDefinitionCache=%@",componentDefinitionCache);
NSDebugMLLog(@"low",@"%s componentDefinition for %@ class=%@",
if (_componentDefinition)
{
NSString* _log=[NSString stringWithFormat:@"Component %@ %s language %@ (%sCached)",
_name,
(_language ? "" : "no"),
(_language ? _language : @""),
(isCachedComponent ? "" : "Not ")];
GSWLogStdOut(_log);
GSWLog(_log);
};
NSDebugMLLog(@"low",@"%s componentDefinition for %@ class=%@ %s",
(_componentDefinition ? "FOUND" : "NOTFOUND"),
_name,
(_componentDefinition ? [_componentDefinition class] : @""));
(_componentDefinition ? [_componentDefinition class] : @""),
(_componentDefinition ? (isCachedComponent ? "(Cached)" : "(Not Cached)") : ""));
LOGObjectFnStop();
return _componentDefinition;
};

View file

@ -226,10 +226,14 @@ static char rcsId[] = "$Id$";
GSWDefaultAdaptorThread* _newThread=nil;
NSFileHandle* _listenHandle=nil;
NSFileHandle* inStream = nil;
NSCalendarDate* requestDate=nil;
NSString* requestDateString=nil;
LOGObjectFnStart();
_listenHandle=[notification object];
GSWLogCStdOut("New Request");
GSWLogC("New Request");
requestDate=[NSCalendarDate calendarDate];
requestDateString=[NSString stringWithFormat:@"New Request %@",requestDate];
GSWLogCStdOut([requestDateString cString]);
GSWLogC([requestDateString cString]);
NSDebugMLLog(@"info",@"_listenHandle=%p",(void*)_listenHandle);
inStream = [[notification userInfo]objectForKey:@"NSFileHandleNotificationFileHandleItem"];
NSDebugMLLog(@"info",@"announceNewConnection notification=%@\n",notification);
@ -262,8 +266,10 @@ static char rcsId[] = "$Id$";
[threads addObject:_newThread];
if (isMultiThreadEnabled)
{
GSWLogCStdOut("Lauch Thread (Multi)");
GSWLogC("Lauch Thread (Multi)");
requestDate=[NSCalendarDate calendarDate];
requestDateString=[NSString stringWithFormat:@"Lauch Thread (Multi) %@",requestDate];
GSWLogCStdOut([requestDateString cString]);
GSWLogC([requestDateString cString]);
NSDebugMLLog(@"info",
@"Lauch Thread (Multi) %p",
(void*)_newThread);
@ -312,15 +318,20 @@ static char rcsId[] = "$Id$";
};
if (!isMultiThreadEnabled && _newThread)
{
GSWLogCStdOut("Lauch Thread (Mono)");
requestDate=[NSCalendarDate calendarDate];
requestDateString=[NSString stringWithFormat:@"Lauch Thread (Mono) %@",requestDate];
GSWLogCStdOut([requestDateString cString]);
NSDebugMLLog(@"info",
@"Lauch Thread (Mono) %p",
(void*)_newThread);
@"%@ %p",
requestDateString,
(void*)_newThread);
[_newThread run:nil];
DESTROY(_newThread);
GSWLogCStdOut("Stop Thread (Mono)");
requestDate=[NSCalendarDate calendarDate];
requestDateString=[NSString stringWithFormat:@"Stop Thread (Mono) %@",requestDate];
GSWLogCStdOut([requestDateString cString]);
NSDebugMLLog0(@"info",
@"Stop Thread (Mono)");
requestDateString);
};
if ([self tryLock])
{

View file

@ -38,6 +38,10 @@
NSRunLoop* currentRunLoop;
NSDate* runLoopDate;
BOOL isMultiThread;
NSDate* creationDate;
NSDate* runDate;
NSDate* dispatchRequestDate;
NSDate* sendResponseDate;
}
-(id)initWithApp:(GSWApplication*)_application

View file

@ -28,17 +28,30 @@ static char rcsId[] = "$Id$";
//====================================================================
@implementation GSWDefaultAdaptorThread
//--------------------------------------------------------------------
-(id)init
{
if ((self=[super init]))
{
ASSIGN(creationDate,[NSDate date]);
};
return self;
};
//--------------------------------------------------------------------
-(id)initWithApp:(GSWApplication*)application_
withAdaptor:(GSWAdaptor*)adaptor_
withStream:(NSFileHandle*)stream_
{
self=[super init];
application=application_;
adaptor=adaptor_;
ASSIGN(stream,stream_);
keepAlive=NO;
isMultiThread=[adaptor isMultiThreadEnabled];
NSDebugMLLog(@"info",@"isMultiThread=%d",(int)isMultiThread);
if ((self=[self init]))
{
application=application_;
adaptor=adaptor_;
ASSIGN(stream,stream_);
keepAlive=NO;
isMultiThread=[adaptor isMultiThreadEnabled];
NSDebugMLLog(@"info",@"isMultiThread=%d",(int)isMultiThread);
};
return self;
};
@ -47,6 +60,11 @@ static char rcsId[] = "$Id$";
{
GSWLogC("dealloc GSWDefaultAdaptorThread");
DESTROY(stream);
GSWLogC("release dates");
DESTROY(creationDate);
DESTROY(runDate);
DESTROY(dispatchRequestDate);
DESTROY(sendResponseDate);
GSWLogC("release pool");
// DESTROY(pool);
[super dealloc];
@ -84,6 +102,9 @@ static char rcsId[] = "$Id$";
NSString* _requestLine=nil;
NSDictionary* _headers=nil;
NSData* _data=nil;
ASSIGN(runDate,[NSDate date]);
DESTROY(dispatchRequestDate);
DESTROY(sendResponseDate);
GSWLogCStdOut("Thread run START");
GSWLogC("Thread run START");
pool=[NSAutoreleasePool new];
@ -145,6 +166,7 @@ static char rcsId[] = "$Id$";
//call application resourceRequestHandlerKey (retourne wr)
//call requets requestHandlerKey (retorune nil)
NSDebugMLLog(@"info",@"GSWDefaultAdaptorThread: run handleRequest:%@",request);
ASSIGN(dispatchRequestDate,[NSDate date]);
NS_DURING
{
response=[application dispatchRequest:request];
@ -165,6 +187,7 @@ static char rcsId[] = "$Id$";
if (response)
{
RETAIN(response);
ASSIGN(sendResponseDate,[NSDate date]);
NS_DURING
{
[self sendResponse:response];

View file

@ -245,19 +245,19 @@ static char rcsId[] = "$Id$";
BOOL _multipleSubmit=NO;
int i=0;
LOGObjectFnStartC("GSWForm");
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@ senderId=%@",[self class],[context_ elementID],[context_ senderID]);
_senderID=[context_ senderID];
_elementID=[context_ elementID];
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@ senderId=%@",[self class],_elementID,_senderID);
NS_DURING
{
GSWAssertCorrectElementID(context_);// Debug Only
_senderID=[context_ senderID];
_elementID=[context_ elementID];
if ([self prefixMatchSenderIDInContext:context_]) //Avoid trying to find action if we are not the good component
{
_isFormSubmited=[_elementID isEqualToString:_senderID];
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@ senderId=%@ _isFormSubmited=%s",
[self class],
[context_ elementID],
[context_ senderID],
_elementID,
_senderID,
(_isFormSubmited ? "YES" : "NO"));
#if !GSWEB_STRICT
if (_isFormSubmited && [self disabledInContext:context_])
@ -271,8 +271,8 @@ static char rcsId[] = "$Id$";
inContext:context_];
NSDebugMLLog(@"gswdync",@"ET=%@ id=%@ senderId=%@ _multipleSubmit=%s",
[self class],
[context_ elementID],
[context_ senderID],
_elementID,
_senderID,
(_multipleSubmit ? "YES" : "NO"));
[context_ _setIsMultipleSubmitForm:_multipleSubmit];
};
@ -288,9 +288,7 @@ static char rcsId[] = "$Id$";
if (_isFormSubmited)
{
if ([context_ _wasActionInvoked])
{
[context_ _setIsMultipleSubmitForm:NO];
}
else
{
NSDebugMLLog0(@"gswdync",@"formSubmitted but no action was invoked!");
@ -298,9 +296,10 @@ static char rcsId[] = "$Id$";
[context_ setInForm:NO];
[context_ _setFormSubmitted:NO];
};
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],[context_ elementID]);
_elementID=[context_ elementID];
NSDebugMLLog(@"gswdync",@"END ET=%@ id=%@",[self class],_elementID);
#ifndef NDEBBUG
NSAssert(elementsNb==[(GSWElementIDString*)[context_ elementID]elementsNb],@"GSWForm invokeActionForRequest: bad elementID");
NSAssert(elementsNb==[(GSWElementIDString*)_elementID elementsNb],@"GSWForm invokeActionForRequest: bad elementID");
#endif
};
}
@ -314,12 +313,14 @@ static char rcsId[] = "$Id$";
[localException raise];
}
NS_ENDHANDLER;
if (![context_ _wasActionInvoked] && [[context_ elementID] compare:[context_ senderID]]!=NSOrderedAscending)
_senderID=[context_ senderID];
_elementID=[context_ elementID];
if (![context_ _wasActionInvoked] && [_elementID compare:_senderID]!=NSOrderedAscending)
{
LOGError(@"Action not invoked at the end of %@ (id=%@) senderId=%@",
[self class],
[context_ elementID],
[context_ senderID]);
_elementID,
_senderID);
};
LOGObjectFnStopC("GSWForm");
return _element;

View file

@ -588,25 +588,33 @@ int _begin=[text length];
int _saveIndex;
//LOGObjectFnStart();
switch ( [self LA:1])
{
case ((unichar)('0')): case ((unichar)('1')): case ((unichar)('2')): case ((unichar)('3')):
case ((unichar)('4')): case ((unichar)('5')): case ((unichar)('6')): case ((unichar)('7')):
case ((unichar)('8')): case ((unichar)('9')):
{
[self matchRange:'0' :'9'];
break;
}
case ((unichar)('a')): case ((unichar)('b')): case ((unichar)('c')): case ((unichar)('d')):
case ((unichar)('e')): case ((unichar)('f')):
{
[self matchRange:'a' :'f'];
break;
}
default:
{
[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];
}
switch ( [self LA:1])
{
case ((unichar)('0')): case ((unichar)('1')): case ((unichar)('2')): case ((unichar)('3')):
case ((unichar)('4')): case ((unichar)('5')): case ((unichar)('6')): case ((unichar)('7')):
case ((unichar)('8')): case ((unichar)('9')):
{
[self matchRange:'0' :'9'];
break;
}
case ((unichar)('A')): case ((unichar)('B')): case ((unichar)('C')): case ((unichar)('D')):
case ((unichar)('E')): case ((unichar)('F')):
{
[self matchRange:'A' :'F'];
break;
}
case ((unichar)('a')): case ((unichar)('b')): case ((unichar)('c')): case ((unichar)('d')):
case ((unichar)('e')): case ((unichar)('f')):
{
[self matchRange:'a' :'f'];
break;
}
default:
{
[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];
}
}
}
if ( _createToken && _token==0 )
{
@ -642,7 +650,7 @@ CONST unsigned long GSWHTMLAttrLexer___tokenSet_1_data_[] = { 4294967288UL, 4294
static ANTLRBitSet* GSWHTMLAttrLexer___tokenSet_1=nil;
CONST unsigned long GSWHTMLAttrLexer___tokenSet_2_data_[] = { 4294967288UL, 4294967167UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
static ANTLRBitSet* GSWHTMLAttrLexer___tokenSet_2=nil;
CONST unsigned long GSWHTMLAttrLexer___tokenSet_3_data_[] = { 0UL, 67043328UL, 0UL, 126UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
CONST unsigned long GSWHTMLAttrLexer___tokenSet_3_data_[] = { 0UL, 67043328UL, 126UL, 126UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
static ANTLRBitSet* GSWHTMLAttrLexer___tokenSet_3=nil;
+(void)initialize
{

View file

@ -1035,31 +1035,33 @@ int _begin=[text length];
int _saveIndex;
//LOGObjectFnStart();
switch ( [self LA:1])
{
case ((unichar)('0')): case ((unichar)('1')): case ((unichar)('2')): case ((unichar)('3')):
case ((unichar)('4')): case ((unichar)('5')): case ((unichar)('6')): case ((unichar)('7')):
case ((unichar)('8')): case ((unichar)('9')):
{
[self matchRange:'0' :'9'];
break;
}
case ((unichar)('a')): case ((unichar)('b')): case ((unichar)('c')): case ((unichar)('d')):
case ((unichar)('e')): case ((unichar)('f')):
{
[self matchRange:'a' :'f'];
break;
}
case ((unichar)('A')): case ((unichar)('B')): case ((unichar)('C')): case ((unichar)('D')):
case ((unichar)('E')): case ((unichar)('F')):
{
[self matchRange:'A' :'F'];
break;
}
default:
{
[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];
}
switch ( [self LA:1])
{
case ((unichar)('0')): case ((unichar)('1')): case ((unichar)('2')): case ((unichar)('3')):
case ((unichar)('4')): case ((unichar)('5')): case ((unichar)('6')): case ((unichar)('7')):
case ((unichar)('8')): case ((unichar)('9')):
{
[self matchRange:'0' :'9'];
break;
}
case ((unichar)('A')): case ((unichar)('B')): case ((unichar)('C')): case ((unichar)('D')):
case ((unichar)('E')): case ((unichar)('F')):
{
[self matchRange:'A' :'F'];
break;
}
case ((unichar)('a')): case ((unichar)('b')): case ((unichar)('c')): case ((unichar)('d')):
case ((unichar)('e')): case ((unichar)('f')):
{
[self matchRange:'a' :'f'];
break;
}
default:
{
[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];
}
}
}
if ( _createToken && _token==0 )
{
@ -1128,11 +1130,11 @@ int _begin=[text length];
}
else
{
goto _loop63;
goto _loop64;
}
} while (YES);
_loop63:;
_loop64:;
}
[self matchCharacter:'>'];
{
@ -1163,11 +1165,11 @@ int _begin=[text length];
}
else
{
goto _loop66;
goto _loop67;
}
} while (YES);
_loop66:;
_loop67:;
}
NSLog(@"invalid tag: %@",[self text]);
break;

View file

@ -46,6 +46,7 @@
/*public: */-(void) mCOLUMNWithCreateToken:(BOOL)_createToken ;
/*public: */-(void) mASSIGNWithCreateToken:(BOOL)_createToken ;
/*public: */-(void) mWSWithCreateToken:(BOOL)_createToken ;
/*protected: */-(void) mESCWithCreateToken:(BOOL)_createToken ;
/*public: */-(void) mINTWithCreateToken:(BOOL)_createToken ;
/*public: */-(void) mHEXNUMWithCreateToken:(BOOL)_createToken ;
/*protected: */-(void) mHEXINTWithCreateToken:(BOOL)_createToken ;

View file

@ -635,48 +635,192 @@ int _begin=[text length];
//LOGObjectFnStart();
switch ( [self LA:1])
{
case ((unichar)('"')):
{
[self matchCharacter:'"'];
{
do
{
if (([GSWPageDefLexer___tokenSet_5 isMember:[self LA:1]]))
{
[self matchNotCharacter:'"'];
}
else
{
goto _loop59;
}
} while (YES);
_loop59:;
}
[self matchCharacter:'"'];
break;
}
case ((unichar)('\'')):
{
[self matchCharacter:'\''];
{
do
{
if (([GSWPageDefLexer___tokenSet_6 isMember:[self LA:1]]))
switch ( [self LA:1])
{
[self matchNotCharacter:'\''];
}
else
case ((unichar)('\\')):
{
goto _loop61;
[self mESCWithCreateToken:NO];
break;
}
case ((unichar)(0x3)): case ((unichar)(0x4)): case ((unichar)(0x5)): case ((unichar)(0x6)):
case ((unichar)(0x7)): case ((unichar)(0x8)): case ((unichar)('\t')): case ((unichar)('\n')):
case ((unichar)(0xb)): case ((unichar)(0xc)): case ((unichar)('\r')): case ((unichar)(0xe)):
case ((unichar)(0xf)): case ((unichar)(0x10)): case ((unichar)(0x11)): case ((unichar)(0x12)):
case ((unichar)(0x13)): case ((unichar)(0x14)): case ((unichar)(0x15)): case ((unichar)(0x16)):
case ((unichar)(0x17)): case ((unichar)(0x18)): case ((unichar)(0x19)): case ((unichar)(0x1a)):
case ((unichar)(0x1b)): case ((unichar)(0x1c)): case ((unichar)(0x1d)): case ((unichar)(0x1e)):
case ((unichar)(0x1f)): case ((unichar)(' ')): case ((unichar)('!')): case ((unichar)('"')):
case ((unichar)('#')): case ((unichar)('$')): case ((unichar)('%')): case ((unichar)('&')):
case ((unichar)('(')): case ((unichar)(')')): case ((unichar)('*')): case ((unichar)('+')):
case ((unichar)(',')): case ((unichar)('-')): case ((unichar)('.')): case ((unichar)('/')):
case ((unichar)('0')): case ((unichar)('1')): case ((unichar)('2')): case ((unichar)('3')):
case ((unichar)('4')): case ((unichar)('5')): case ((unichar)('6')): case ((unichar)('7')):
case ((unichar)('8')): case ((unichar)('9')): case ((unichar)(':')): case ((unichar)(';')):
case ((unichar)('<')): case ((unichar)('=')): case ((unichar)('>')): case ((unichar)('?')):
case ((unichar)('@')): case ((unichar)('A')): case ((unichar)('B')): case ((unichar)('C')):
case ((unichar)('D')): case ((unichar)('E')): case ((unichar)('F')): case ((unichar)('G')):
case ((unichar)('H')): case ((unichar)('I')): case ((unichar)('J')): case ((unichar)('K')):
case ((unichar)('L')): case ((unichar)('M')): case ((unichar)('N')): case ((unichar)('O')):
case ((unichar)('P')): case ((unichar)('Q')): case ((unichar)('R')): case ((unichar)('S')):
case ((unichar)('T')): case ((unichar)('U')): case ((unichar)('V')): case ((unichar)('W')):
case ((unichar)('X')): case ((unichar)('Y')): case ((unichar)('Z')): case ((unichar)('[')):
case ((unichar)(']')): case ((unichar)('^')): case ((unichar)('_')): case ((unichar)('`')):
case ((unichar)('a')): case ((unichar)('b')): case ((unichar)('c')): case ((unichar)('d')):
case ((unichar)('e')): case ((unichar)('f')): case ((unichar)('g')): case ((unichar)('h')):
case ((unichar)('i')): case ((unichar)('j')): case ((unichar)('k')): case ((unichar)('l')):
case ((unichar)('m')): case ((unichar)('n')): case ((unichar)('o')): case ((unichar)('p')):
case ((unichar)('q')): case ((unichar)('r')): case ((unichar)('s')): case ((unichar)('t')):
case ((unichar)('u')): case ((unichar)('v')): case ((unichar)('w')): case ((unichar)('x')):
case ((unichar)('y')): case ((unichar)('z')): case ((unichar)('{')): case ((unichar)('|')):
case ((unichar)('}')): case ((unichar)('~')): case ((unichar)(0x7f)): case ((unichar)(0x80)):
case ((unichar)(0x81)): case ((unichar)(0x82)): case ((unichar)(0x83)): case ((unichar)(0x84)):
case ((unichar)(0x85)): case ((unichar)(0x86)): case ((unichar)(0x87)): case ((unichar)(0x88)):
case ((unichar)(0x89)): case ((unichar)(0x8a)): case ((unichar)(0x8b)): case ((unichar)(0x8c)):
case ((unichar)(0x8d)): case ((unichar)(0x8e)): case ((unichar)(0x8f)): case ((unichar)(0x90)):
case ((unichar)(0x91)): case ((unichar)(0x92)): case ((unichar)(0x93)): case ((unichar)(0x94)):
case ((unichar)(0x95)): case ((unichar)(0x96)): case ((unichar)(0x97)): case ((unichar)(0x98)):
case ((unichar)(0x99)): case ((unichar)(0x9a)): case ((unichar)(0x9b)): case ((unichar)(0x9c)):
case ((unichar)(0x9d)): case ((unichar)(0x9e)): case ((unichar)(0x9f)): case ((unichar)(0xa0)):
case ((unichar)(0xa1)): case ((unichar)(0xa2)): case ((unichar)(0xa3)): case ((unichar)(0xa4)):
case ((unichar)(0xa5)): case ((unichar)(0xa6)): case ((unichar)(0xa7)): case ((unichar)(0xa8)):
case ((unichar)(0xa9)): case ((unichar)(0xaa)): case ((unichar)(0xab)): case ((unichar)(0xac)):
case ((unichar)(0xad)): case ((unichar)(0xae)): case ((unichar)(0xaf)): case ((unichar)(0xb0)):
case ((unichar)(0xb1)): case ((unichar)(0xb2)): case ((unichar)(0xb3)): case ((unichar)(0xb4)):
case ((unichar)(0xb5)): case ((unichar)(0xb6)): case ((unichar)(0xb7)): case ((unichar)(0xb8)):
case ((unichar)(0xb9)): case ((unichar)(0xba)): case ((unichar)(0xbb)): case ((unichar)(0xbc)):
case ((unichar)(0xbd)): case ((unichar)(0xbe)): case ((unichar)(0xbf)): case ((unichar)(0xc0)):
case ((unichar)(0xc1)): case ((unichar)(0xc2)): case ((unichar)(0xc3)): case ((unichar)(0xc4)):
case ((unichar)(0xc5)): case ((unichar)(0xc6)): case ((unichar)(0xc7)): case ((unichar)(0xc8)):
case ((unichar)(0xc9)): case ((unichar)(0xca)): case ((unichar)(0xcb)): case ((unichar)(0xcc)):
case ((unichar)(0xcd)): case ((unichar)(0xce)): case ((unichar)(0xcf)): case ((unichar)(0xd0)):
case ((unichar)(0xd1)): case ((unichar)(0xd2)): case ((unichar)(0xd3)): case ((unichar)(0xd4)):
case ((unichar)(0xd5)): case ((unichar)(0xd6)): case ((unichar)(0xd7)): case ((unichar)(0xd8)):
case ((unichar)(0xd9)): case ((unichar)(0xda)): case ((unichar)(0xdb)): case ((unichar)(0xdc)):
case ((unichar)(0xdd)): case ((unichar)(0xde)): case ((unichar)(0xdf)): case ((unichar)(0xe0)):
case ((unichar)(0xe1)): case ((unichar)(0xe2)): case ((unichar)(0xe3)): case ((unichar)(0xe4)):
case ((unichar)(0xe5)): case ((unichar)(0xe6)): case ((unichar)(0xe7)): case ((unichar)(0xe8)):
case ((unichar)(0xe9)): case ((unichar)(0xea)): case ((unichar)(0xeb)): case ((unichar)(0xec)):
case ((unichar)(0xed)): case ((unichar)(0xee)): case ((unichar)(0xef)): case ((unichar)(0xf0)):
case ((unichar)(0xf1)): case ((unichar)(0xf2)): case ((unichar)(0xf3)): case ((unichar)(0xf4)):
case ((unichar)(0xf5)): case ((unichar)(0xf6)): case ((unichar)(0xf7)): case ((unichar)(0xf8)):
case ((unichar)(0xf9)): case ((unichar)(0xfa)): case ((unichar)(0xfb)): case ((unichar)(0xfc)):
case ((unichar)(0xfd)): case ((unichar)(0xfe)): case ((unichar)(0xff)):
{
{
[self matchCharSet:GSWPageDefLexer___tokenSet_5];
}
break;
}
default:
{
goto _loop60;
}
}
} while (YES);
_loop61:;
_loop60:;
}
[self matchCharacter:'\''];
break;
}
case ((unichar)('"')):
{
[self matchCharacter:'"'];
{
do
{
switch ( [self LA:1])
{
case ((unichar)('\\')):
{
[self mESCWithCreateToken:NO];
break;
}
case ((unichar)(0x3)): case ((unichar)(0x4)): case ((unichar)(0x5)): case ((unichar)(0x6)):
case ((unichar)(0x7)): case ((unichar)(0x8)): case ((unichar)('\t')): case ((unichar)('\n')):
case ((unichar)(0xb)): case ((unichar)(0xc)): case ((unichar)('\r')): case ((unichar)(0xe)):
case ((unichar)(0xf)): case ((unichar)(0x10)): case ((unichar)(0x11)): case ((unichar)(0x12)):
case ((unichar)(0x13)): case ((unichar)(0x14)): case ((unichar)(0x15)): case ((unichar)(0x16)):
case ((unichar)(0x17)): case ((unichar)(0x18)): case ((unichar)(0x19)): case ((unichar)(0x1a)):
case ((unichar)(0x1b)): case ((unichar)(0x1c)): case ((unichar)(0x1d)): case ((unichar)(0x1e)):
case ((unichar)(0x1f)): case ((unichar)(' ')): case ((unichar)('!')): case ((unichar)('#')):
case ((unichar)('$')): case ((unichar)('%')): case ((unichar)('&')): case ((unichar)('\'')):
case ((unichar)('(')): case ((unichar)(')')): case ((unichar)('*')): case ((unichar)('+')):
case ((unichar)(',')): case ((unichar)('-')): case ((unichar)('.')): case ((unichar)('/')):
case ((unichar)('0')): case ((unichar)('1')): case ((unichar)('2')): case ((unichar)('3')):
case ((unichar)('4')): case ((unichar)('5')): case ((unichar)('6')): case ((unichar)('7')):
case ((unichar)('8')): case ((unichar)('9')): case ((unichar)(':')): case ((unichar)(';')):
case ((unichar)('<')): case ((unichar)('=')): case ((unichar)('>')): case ((unichar)('?')):
case ((unichar)('@')): case ((unichar)('A')): case ((unichar)('B')): case ((unichar)('C')):
case ((unichar)('D')): case ((unichar)('E')): case ((unichar)('F')): case ((unichar)('G')):
case ((unichar)('H')): case ((unichar)('I')): case ((unichar)('J')): case ((unichar)('K')):
case ((unichar)('L')): case ((unichar)('M')): case ((unichar)('N')): case ((unichar)('O')):
case ((unichar)('P')): case ((unichar)('Q')): case ((unichar)('R')): case ((unichar)('S')):
case ((unichar)('T')): case ((unichar)('U')): case ((unichar)('V')): case ((unichar)('W')):
case ((unichar)('X')): case ((unichar)('Y')): case ((unichar)('Z')): case ((unichar)('[')):
case ((unichar)(']')): case ((unichar)('^')): case ((unichar)('_')): case ((unichar)('`')):
case ((unichar)('a')): case ((unichar)('b')): case ((unichar)('c')): case ((unichar)('d')):
case ((unichar)('e')): case ((unichar)('f')): case ((unichar)('g')): case ((unichar)('h')):
case ((unichar)('i')): case ((unichar)('j')): case ((unichar)('k')): case ((unichar)('l')):
case ((unichar)('m')): case ((unichar)('n')): case ((unichar)('o')): case ((unichar)('p')):
case ((unichar)('q')): case ((unichar)('r')): case ((unichar)('s')): case ((unichar)('t')):
case ((unichar)('u')): case ((unichar)('v')): case ((unichar)('w')): case ((unichar)('x')):
case ((unichar)('y')): case ((unichar)('z')): case ((unichar)('{')): case ((unichar)('|')):
case ((unichar)('}')): case ((unichar)('~')): case ((unichar)(0x7f)): case ((unichar)(0x80)):
case ((unichar)(0x81)): case ((unichar)(0x82)): case ((unichar)(0x83)): case ((unichar)(0x84)):
case ((unichar)(0x85)): case ((unichar)(0x86)): case ((unichar)(0x87)): case ((unichar)(0x88)):
case ((unichar)(0x89)): case ((unichar)(0x8a)): case ((unichar)(0x8b)): case ((unichar)(0x8c)):
case ((unichar)(0x8d)): case ((unichar)(0x8e)): case ((unichar)(0x8f)): case ((unichar)(0x90)):
case ((unichar)(0x91)): case ((unichar)(0x92)): case ((unichar)(0x93)): case ((unichar)(0x94)):
case ((unichar)(0x95)): case ((unichar)(0x96)): case ((unichar)(0x97)): case ((unichar)(0x98)):
case ((unichar)(0x99)): case ((unichar)(0x9a)): case ((unichar)(0x9b)): case ((unichar)(0x9c)):
case ((unichar)(0x9d)): case ((unichar)(0x9e)): case ((unichar)(0x9f)): case ((unichar)(0xa0)):
case ((unichar)(0xa1)): case ((unichar)(0xa2)): case ((unichar)(0xa3)): case ((unichar)(0xa4)):
case ((unichar)(0xa5)): case ((unichar)(0xa6)): case ((unichar)(0xa7)): case ((unichar)(0xa8)):
case ((unichar)(0xa9)): case ((unichar)(0xaa)): case ((unichar)(0xab)): case ((unichar)(0xac)):
case ((unichar)(0xad)): case ((unichar)(0xae)): case ((unichar)(0xaf)): case ((unichar)(0xb0)):
case ((unichar)(0xb1)): case ((unichar)(0xb2)): case ((unichar)(0xb3)): case ((unichar)(0xb4)):
case ((unichar)(0xb5)): case ((unichar)(0xb6)): case ((unichar)(0xb7)): case ((unichar)(0xb8)):
case ((unichar)(0xb9)): case ((unichar)(0xba)): case ((unichar)(0xbb)): case ((unichar)(0xbc)):
case ((unichar)(0xbd)): case ((unichar)(0xbe)): case ((unichar)(0xbf)): case ((unichar)(0xc0)):
case ((unichar)(0xc1)): case ((unichar)(0xc2)): case ((unichar)(0xc3)): case ((unichar)(0xc4)):
case ((unichar)(0xc5)): case ((unichar)(0xc6)): case ((unichar)(0xc7)): case ((unichar)(0xc8)):
case ((unichar)(0xc9)): case ((unichar)(0xca)): case ((unichar)(0xcb)): case ((unichar)(0xcc)):
case ((unichar)(0xcd)): case ((unichar)(0xce)): case ((unichar)(0xcf)): case ((unichar)(0xd0)):
case ((unichar)(0xd1)): case ((unichar)(0xd2)): case ((unichar)(0xd3)): case ((unichar)(0xd4)):
case ((unichar)(0xd5)): case ((unichar)(0xd6)): case ((unichar)(0xd7)): case ((unichar)(0xd8)):
case ((unichar)(0xd9)): case ((unichar)(0xda)): case ((unichar)(0xdb)): case ((unichar)(0xdc)):
case ((unichar)(0xdd)): case ((unichar)(0xde)): case ((unichar)(0xdf)): case ((unichar)(0xe0)):
case ((unichar)(0xe1)): case ((unichar)(0xe2)): case ((unichar)(0xe3)): case ((unichar)(0xe4)):
case ((unichar)(0xe5)): case ((unichar)(0xe6)): case ((unichar)(0xe7)): case ((unichar)(0xe8)):
case ((unichar)(0xe9)): case ((unichar)(0xea)): case ((unichar)(0xeb)): case ((unichar)(0xec)):
case ((unichar)(0xed)): case ((unichar)(0xee)): case ((unichar)(0xef)): case ((unichar)(0xf0)):
case ((unichar)(0xf1)): case ((unichar)(0xf2)): case ((unichar)(0xf3)): case ((unichar)(0xf4)):
case ((unichar)(0xf5)): case ((unichar)(0xf6)): case ((unichar)(0xf7)): case ((unichar)(0xf8)):
case ((unichar)(0xf9)): case ((unichar)(0xfa)): case ((unichar)(0xfb)): case ((unichar)(0xfc)):
case ((unichar)(0xfd)): case ((unichar)(0xfe)): case ((unichar)(0xff)):
{
{
[self matchCharSet:GSWPageDefLexer___tokenSet_6];
}
break;
}
default:
{
goto _loop63;
}
}
} while (YES);
_loop63:;
}
[self matchCharacter:'"'];
break;
}
default:
{
[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];
@ -909,6 +1053,158 @@ int _begin=[text length];
//LOGObjectFnStop();
}
-(void) mESCWithCreateToken:(BOOL)_createToken
{
ANTLRDefToken _token=nil;
int _begin=[text length];
ANTLRTokenType _ttype = GSWPageDefTokenType_ESC;
int _saveIndex;
//LOGObjectFnStart();
[self matchCharacter:'\\'];
{
switch ( [self LA:1])
{
case ((unichar)('n')):
{
[self matchCharacter:'n'];
break;
}
case ((unichar)('r')):
{
[self matchCharacter:'r'];
break;
}
case ((unichar)('t')):
{
[self matchCharacter:'t'];
break;
}
case ((unichar)('b')):
{
[self matchCharacter:'b'];
break;
}
case ((unichar)('f')):
{
[self matchCharacter:'f'];
break;
}
case ((unichar)('"')):
{
[self matchCharacter:'"'];
break;
}
case ((unichar)('\'')):
{
[self matchCharacter:'\''];
break;
}
case ((unichar)('\\')):
{
[self matchCharacter:'\\'];
break;
}
case ((unichar)('u')):
{
{
int _cnt72=0;
do
{
if (([self LA:1]==((unichar)('u'))))
{
[self matchCharacter:'u'];
}
else
{
if ( _cnt72>=1 ) { goto _loop72; } else {[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];}
}
_cnt72++;
} while (YES);
_loop72:;
}
[self mHEXDIGITWithCreateToken:NO];
[self mHEXDIGITWithCreateToken:NO];
[self mHEXDIGITWithCreateToken:NO];
[self mHEXDIGITWithCreateToken:NO];
break;
}
case ((unichar)('0')): case ((unichar)('1')): case ((unichar)('2')): case ((unichar)('3')):
{
{
[self matchRange:'0' :'3'];
}
{
if ((([self LA:1] >= ((unichar)('0')) && [self LA:1] <= ((unichar)('9')))) && (([self LA:2] >= ((unichar)(0x3)) && [self LA:2] <= ((unichar)(0xff)))))
{
{
[self matchRange:'0' :'9'];
}
{
if ((([self LA:1] >= ((unichar)('0')) && [self LA:1] <= ((unichar)('9')))) && (([self LA:2] >= ((unichar)(0x3)) && [self LA:2] <= ((unichar)(0xff)))))
{
[self matchRange:'0' :'9'];
}
else if ((([self LA:1] >= ((unichar)(0x3)) && [self LA:1] <= ((unichar)(0xff)))))
{
}
else
{
[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];
}
}
}
else if ((([self LA:1] >= ((unichar)(0x3)) && [self LA:1] <= ((unichar)(0xff)))))
{
}
else
{
[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];
}
}
break;
}
case ((unichar)('4')): case ((unichar)('5')): case ((unichar)('6')): case ((unichar)('7')):
{
{
[self matchRange:'4' :'7'];
}
{
if ((([self LA:1] >= ((unichar)('0')) && [self LA:1] <= ((unichar)('9')))) && (([self LA:2] >= ((unichar)(0x3)) && [self LA:2] <= ((unichar)(0xff)))))
{
{
[self matchRange:'0' :'9'];
}
}
else if ((([self LA:1] >= ((unichar)(0x3)) && [self LA:1] <= ((unichar)(0xff)))))
{
}
else
{
[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];
}
}
break;
}
default:
{
[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];
}
}
}
if ( _createToken && _token==0 )
{
_token = [self makeToken:_ttype];
[_token setText:[text substringFromIndex:_begin]];
}
ASSIGN(_returnToken,_token);
//LOGObjectFnStop();
}
-(void) mINTWithCreateToken:(BOOL)_createToken
{
ANTLRDefToken _token=nil;
@ -918,7 +1214,7 @@ int _begin=[text length];
//LOGObjectFnStart();
{
int _cnt65=0;
int _cnt67=0;
do
{
if ((([self LA:1] >= ((unichar)('0')) && [self LA:1] <= ((unichar)('9')))))
@ -927,12 +1223,12 @@ int _begin=[text length];
}
else
{
if ( _cnt65>=1 ) { goto _loop65; } else {[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];}
if ( _cnt67>=1 ) { goto _loop67; } else {[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];}
}
_cnt65++;
_cnt67++;
} while (YES);
_loop65:;
_loop67:;
}
if ( _createToken && _token==0 )
{
@ -971,7 +1267,7 @@ int _begin=[text length];
//LOGObjectFnStart();
{
int _cnt69=0;
int _cnt82=0;
do
{
if (([GSWPageDefLexer___tokenSet_1 isMember:[self LA:1]]))
@ -980,12 +1276,12 @@ int _begin=[text length];
}
else
{
if ( _cnt69>=1 ) { goto _loop69; } else {[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];}
if ( _cnt82>=1 ) { goto _loop82; } else {[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];}
}
_cnt69++;
_cnt82++;
} while (YES);
_loop69:;
_loop82:;
}
if ( _createToken && _token==0 )
{
@ -1004,31 +1300,33 @@ int _begin=[text length];
int _saveIndex;
//LOGObjectFnStart();
switch ( [self LA:1])
{
case ((unichar)('0')): case ((unichar)('1')): case ((unichar)('2')): case ((unichar)('3')):
case ((unichar)('4')): case ((unichar)('5')): case ((unichar)('6')): case ((unichar)('7')):
case ((unichar)('8')): case ((unichar)('9')):
{
[self matchRange:'0' :'9'];
break;
}
case ((unichar)('a')): case ((unichar)('b')): case ((unichar)('c')): case ((unichar)('d')):
case ((unichar)('e')): case ((unichar)('f')):
{
[self matchRange:'a' :'f'];
break;
}
case ((unichar)('A')): case ((unichar)('B')): case ((unichar)('C')): case ((unichar)('D')):
case ((unichar)('E')): case ((unichar)('F')):
{
[self matchRange:'A' :'F'];
break;
}
default:
{
[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];
}
switch ( [self LA:1])
{
case ((unichar)('0')): case ((unichar)('1')): case ((unichar)('2')): case ((unichar)('3')):
case ((unichar)('4')): case ((unichar)('5')): case ((unichar)('6')): case ((unichar)('7')):
case ((unichar)('8')): case ((unichar)('9')):
{
[self matchRange:'0' :'9'];
break;
}
case ((unichar)('A')): case ((unichar)('B')): case ((unichar)('C')): case ((unichar)('D')):
case ((unichar)('E')): case ((unichar)('F')):
{
[self matchRange:'A' :'F'];
break;
}
case ((unichar)('a')): case ((unichar)('b')): case ((unichar)('c')): case ((unichar)('d')):
case ((unichar)('e')): case ((unichar)('f')):
{
[self matchRange:'a' :'f'];
break;
}
default:
{
[ANTLRScannerException raiseWithReason:[NSString stringWithFormat:@"no viable alt for char: %@",[ANTLRCharScanner charName:[self LA:1]]] line:[self line]];
}
}
}
if ( _createToken && _token==0 )
{
@ -1068,9 +1366,9 @@ CONST unsigned long GSWPageDefLexer___tokenSet_3_data_[] = { 4294958072UL, 42949
static ANTLRBitSet* GSWPageDefLexer___tokenSet_3=nil;
CONST unsigned long GSWPageDefLexer___tokenSet_4_data_[] = { 4294958072UL, 4294966271UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
static ANTLRBitSet* GSWPageDefLexer___tokenSet_4=nil;
CONST unsigned long GSWPageDefLexer___tokenSet_5_data_[] = { 4294967288UL, 4294967291UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
CONST unsigned long GSWPageDefLexer___tokenSet_5_data_[] = { 4294967288UL, 4294967167UL, 4026531839UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
static ANTLRBitSet* GSWPageDefLexer___tokenSet_5=nil;
CONST unsigned long GSWPageDefLexer___tokenSet_6_data_[] = { 4294967288UL, 4294967167UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
CONST unsigned long GSWPageDefLexer___tokenSet_6_data_[] = { 4294967288UL, 4294967291UL, 4026531839UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 4294967295UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL };
static ANTLRBitSet* GSWPageDefLexer___tokenSet_6=nil;
+(void)initialize
{

View file

@ -205,7 +205,7 @@
[astFactory addASTChild:includeObj_AST in:currentAST];
}
[self matchTokenType:GSWPageDefTokenType_STRING];
[includes addObject:[[[includeObj text] stringWithoutPrefix:@"\""] stringWithoutSuffix:@"\""]];
[includes addObject:[self unescapedString:[[[includeObj text] stringWithoutPrefix:@"\""] stringWithoutSuffix:@"\""]]];
include_AST = [currentAST root];
}
NS_HANDLER
@ -468,7 +468,7 @@
[astFactory addASTChild:assocConstantString_AST in:currentAST];
}
[self matchTokenType:GSWPageDefTokenType_STRING];
{ GSWAssociation* assoc=[GSWAssociation associationWithValue:[[[assocConstantString text] stringWithoutPrefix:@"\""] stringWithoutSuffix:@"\""]];
{ GSWAssociation* assoc=[GSWAssociation associationWithValue:[self unescapedString:[[[assocConstantString text] stringWithoutPrefix:@"\""] stringWithoutSuffix:@"\""]]];
ASSIGN(currentAssociation,assoc); };
break;
}
@ -611,6 +611,7 @@ static CONST NSString* GSWPageDefParser___tokenNames[] = {
@"SL_COMMENT",
@"ML_COMMENT",
@"POINT",
@"ESC",
@"HEXINT",
@"DIGIT",
@"HEXDIGIT",

View file

@ -39,7 +39,7 @@
-(BOOL)isWarning;
-(NSArray*)errors;
-(NSArray*)warnings;
-(NSString*)unescapedString:(NSString*)string_;
@end
#endif //_GSWPageDefParserExt_h__

View file

@ -114,6 +114,27 @@ static char rcsId[] = "$Id$";
return warnings;
};
//--------------------------------------------------------------------
-(NSString*)unescapedString:(NSString*)string_
{
//TODO
string_=[string_ stringByReplacingString:@"\\n"
withString:@"\n"];
string_=[string_ stringByReplacingString:@"\\r"
withString:@"\r"];
string_=[string_ stringByReplacingString:@"\\t"
withString:@"\t"];
string_=[string_ stringByReplacingString:@"\\b"
withString:@"\b"];
string_=[string_ stringByReplacingString:@"\\f"
withString:@"\f"];
string_=[string_ stringByReplacingString:@"\\\""
withString:@"\""];
string_=[string_ stringByReplacingString:@"\\\'"
withString:@"\'"];
return string_;
};
@end

View file

@ -35,10 +35,11 @@ enum GSWPageDefTokenTypes {
GSWPageDefTokenType_SL_COMMENT = 20,
GSWPageDefTokenType_ML_COMMENT = 21,
GSWPageDefTokenType_POINT = 22,
GSWPageDefTokenType_HEXINT = 23,
GSWPageDefTokenType_DIGIT = 24,
GSWPageDefTokenType_HEXDIGIT = 25,
GSWPageDefTokenType_LCLETTER = 26,
GSWPageDefTokenType_LETTER = 27,
GSWPageDefTokenType_ESC = 23,
GSWPageDefTokenType_HEXINT = 24,
GSWPageDefTokenType_DIGIT = 25,
GSWPageDefTokenType_HEXDIGIT = 26,
GSWPageDefTokenType_LCLETTER = 27,
GSWPageDefTokenType_LETTER = 28,
};
#endif /*INC_GSWPageDefTokenTypes_h_*/

View file

@ -18,8 +18,9 @@ PIDENT=19
SL_COMMENT=20
ML_COMMENT=21
POINT=22
HEXINT=23
DIGIT=24
HEXDIGIT=25
LCLETTER=26
LETTER=27
ESC=23
HEXINT=24
DIGIT=25
HEXDIGIT=26
LCLETTER=27
LETTER=28

View file

@ -103,6 +103,7 @@ static char rcsId[] = "$Id$";
{
GSWAssertCorrectElementID(context_);// Debug Only
_disabled=[self disabledInContext:context_];
NSDebugMLLog(@"gswdync",@"_disabled=%s",(_disabled ? "YES" : "NO"));
if (!_disabled)
{
BOOL _wasFormSubmitted=[context_ _wasFormSubmitted];
@ -132,6 +133,7 @@ static char rcsId[] = "$Id$";
[context_ _setActionInvoked:1];
NS_DURING
{
NSDebugMLLog(@"gswdync",@"Invoked Object Found: action=%@",action);
_actionValue=[action valueInComponent:_component];
}
NS_HANDLER

View file

@ -43,10 +43,10 @@ document
: ((object { [elements setObject:currentElement forKey:[currentElement elementName]]; } )
| (include))+
;
//TODO unescapedString
include:
(INCLUDE (WS)*)
includeObj:STRING { [includes addObject:[[[includeObj text] stringWithoutPrefix:@"\""] stringWithoutSuffix:@"\""]]; }
includeObj:STRING { [includes addObject:[self unescapedString:[[[includeObj text] stringWithoutPrefix:@"\""] stringWithoutSuffix:@"\""]]]; }
;
object:
@ -71,6 +71,7 @@ member:
(SEMI)*!
;
//TODO unescapedString
mvalue:
( assocKeyPath:idref
{ { GSWAssociation* assoc=[GSWAssociation associationWithKeyPath:[assocKeyPath_AST toStringListWithSiblingSeparator:@"" openSeparator:@"" closeSeparator:@""]];
@ -85,7 +86,7 @@ mvalue:
{ { GSWAssociation* assoc=[GSWAssociation associationWithValue:[NSNumber numberWithBool:NO]];
ASSIGN(currentAssociation,assoc); }; }
| assocConstantString:STRING
{ { GSWAssociation* assoc=[GSWAssociation associationWithValue:[[[assocConstantString text] stringWithoutPrefix:@"\""] stringWithoutSuffix:@"\""]];
{ { GSWAssociation* assoc=[GSWAssociation associationWithValue:[self unescapedString:[[[assocConstantString text] stringWithoutPrefix:@"\""] stringWithoutSuffix:@"\""]]];
ASSIGN(currentAssociation,assoc); }; }
| assocConstantHexNum:HEXNUM
{ { GSWAssociation* assoc=[GSWAssociation associationWithValue:[NSNumber valueFromString:[assocConstantHexNum text]]];
@ -195,8 +196,10 @@ WS:
;
STRING
: '"' (~'"')* '"'
| '\'' (~'\'')* '\''
// : '"' (~'"')* '"'
// | '\'' (~'\'')* '\''
: '\'' ( ESC |~('\''|'\\'))* '\''
| '"' ( ESC |~('"'|'\\'))* '"'
;
POINT: '.';
@ -208,6 +211,48 @@ HEXNUM
: '#' HEXINT
;
// escape sequence -- note that this is protected; it can only be called
// from another lexer rule -- it will not ever directly return a token to
// the parser
// There are various ambiguities hushed in this rule. The optional
// '0'...'9' digit matches should be matched here rather than letting
// them go back to STRING_LITERAL to be matched. ANTLR does the
// right thing by matching immediately; hence, it's ok to shut off
// the FOLLOW ambig warnings.
protected
ESC
: '\\'
( 'n'
| 'r'
| 't'
| 'b'
| 'f'
| '"'
| '\''
| '\\'
| ('u')+ HEXDIGIT HEXDIGIT HEXDIGIT HEXDIGIT
| ('0'..'3')
(
options {
warnWhenFollowAmbig = false;
}
: ('0'..'9')
(
options {
warnWhenFollowAmbig = false;
}
: '0'..'9'
)?
)?
| ('4'..'7')
(
options {
warnWhenFollowAmbig = false;
}
: ('0'..'9')
)?
)
;
protected
HEXINT
: (
@ -232,9 +277,7 @@ DIGIT
protected
HEXDIGIT
: '0'..'9'
| 'a'..'f'
| 'A'..'F'
: ('0'..'9'|'A'..'F'|'a'..'f')
;
protected

View file

@ -287,9 +287,7 @@ DIGIT
protected
HEXDIGIT
: '0'..'9'
| 'a'..'f'
| 'A'..'F'
: ('0'..'9'|'A'..'F'|'a'..'f')
;
protected

View file

@ -127,8 +127,7 @@ DIGIT
protected
HEXDIGIT
: '0'..'9'
| 'a'..'f'
: ('0'..'9'|'A'..'F'|'a'..'f')
;
protected