• Home
  • Raw
  • Download

Lines Matching refs:rwIndex

46 @synthesize rwIndex;
57 rwIndex = anIndex;
64 * Return the rwIndex of the next token to operate on.
68 return rwIndex;
76 return [NSString stringWithFormat:@"<%@%d:\"%@\">", opName, rwIndex, opName];
104 rwIndex = anIndex;
114 if ( ((CommonToken *)[tokens objectAtIndex:rwIndex]).type != TokenTypeEOF ) {
115 [buf appendString:[[tokens objectAtIndex:rwIndex] text]];
117 return rwIndex+1;
153 return [NSString stringWithFormat:@"<ANTLRReplaceOp@ %d..%d :>%@\n", rwIndex, lastIndex, text];
176 return [NSString stringWithFormat:@"<DeleteOp@ %d..%d\n", rwIndex, lastIndex];
291 // to insert after, just insert before next rwIndex (even if past end)
293 //addToSortedRewriteList(programName, new InsertAfterOp(rwIndex,text));
314 - (void) insertBeforeProgName:(NSString *)programName Index:(NSInteger)rwIndex Text:(NSString *)the…
316 //addToSortedRewriteList(programName, new ANTLRInsertBeforeOp(rwIndex,text));
317 RewriteOperation *op = [ANTLRInsertBeforeOp newANTLRInsertBeforeOp:rwIndex Text:theText];
480 [indexToOp setObject:nil atIndex:i]; // remove so any left have rwIndex size-1
483 // no operation at that rwIndex, just dump token
493 // include stuff after end if it's last rwIndex in buffer
503 if ( op.rwIndex >= [tokens count]-1 ) {
513 * same rwIndex need to be combined etc... Here are the cases:
529 * I.i.u = insert u before op @ rwIndex i
541 * 1. for any inserts to same rwIndex, combine even if not adjacent.
544 * 3. throw exception if rwIndex in same range as previous replace
547 * Later we can throw as we add to rwIndex -> op map.
554 * Return a map from token rwIndex to operation.
573 if ( iop.rwIndex >= rop.rwIndex && iop.rwIndex <= rop.lastIndex ) {
582 if ( prevRop.rwIndex>=rop.rwIndex && prevRop.lastIndex <= rop.lastIndex ) {
588 BOOL disjoint = prevRop.lastIndex<rop.rwIndex || prevRop.rwIndex > rop.lastIndex;
589 BOOL same = prevRop.rwIndex==rop.rwIndex && prevRop.lastIndex==rop.lastIndex;
605 // combine current insert with prior if any at same rwIndex
609 if ( prevIop.rwIndex == iop.rwIndex ) { // combine objects
617 // look for replaces where iop.rwIndex is in range; error
621 if ( iop.rwIndex == rop.rwIndex ) {
626 if ( iop.rwIndex >= rop.rwIndex && iop.rwIndex <= rop.lastIndex ) {
637 if ( [m objectAtIndex:op.rwIndex] != nil ) {
638 @throw [RuntimeException newException:@"should only be one op per rwIndex\n"];
640 //[m put(new Integer(op.rwIndex), op);
641 [m setObject:op atIndex:op.rwIndex];
643 //System.out.println("rwIndex to op: "+m);
644 if (debug > 1) NSLog(@"rwIndex to op %d\n", (NSInteger)m);
664 /** Get all operations before an rwIndex of a particular kind */