Lines Matching full:lookahead
47 @synthesize lookahead;
68 lookahead = [NSMutableArray arrayWithCapacity:INITIAL_LOOKAHEAD_BUFFER_SIZE]; // lookahead is filled with [NSNull null] in -reset
69 [lookahead retain];
83 [lookahead release]; lookahead = nil;
99 [lookahead removeAllObjects];
103 [lookahead addObject:[NSNull null]];
118 return [lookahead objectAtIndex:(head+k-1) % [lookahead count]];
185 previousNode = [lookahead objectAtIndex:head];
186 head = (head+1) % [lookahead count];
238 head = tail = 0; // wack lookahead buffer and then refill
239 [lookahead release];
240 lookahead = [[NSMutableArray alloc] initWithArray:[state lookahead]];
241 tail = [lookahead count];
242 // make some room after the restored lookahead, so that the above line is not a bug ;)
244 [lookahead addObjectsFromArray:[NSArray arrayWithObjects:[NSNull null], [NSNull null], [NSNull null], [NSNull null], [NSNull null], nil]];
272 #pragma mark Lookahead Handling
275 [lookahead replaceObjectAtIndex:tail withObject:aNode];
276 tail = (tail+1) % [lookahead count];
279 NSMutableArray *newLookahead = [[[NSMutableArray alloc] initWithCapacity:[lookahead count]*2] retain];
281 NSRange headRange = NSMakeRange(head, [lookahead count]-head);
284 [newLookahead addObjectsFromArray:[lookahead objectsAtIndexes:[NSIndexSet indexSetWithIndexesInRange:headRange]]];
285 [newLookahead addObjectsFromArray:[lookahead objectsAtIndexes:[NSIndexSet indexSetWithIndexesInRange:tailRange]]];
291 [lookahead release];
292 lookahead = newLookahead;
295 tail = lookaheadCount; // tail is the location the _next_ lookahead node will end up in, not the last element's idx itself!
303 ? ([lookahead count] - head + tail)