public Interval getTemplateRange() { if ( isAnonSubtemplate ) { Interval start = sourceMap[0]; Interval stop = null; for (int i = sourceMap.length-1; i>=0; i--) { Interval I = sourceMap[i]; if ( I!=null ) { stop = I; break; } } return new Interval(start.a, stop.b); } return new Interval(0, template.length()-1); }
public Interval getTemplateRange() { if ( isAnonSubtemplate ) { int start = Integer.MAX_VALUE; int stop = Integer.MIN_VALUE; for (Interval interval : sourceMap) { if (interval == null) { continue; } start = Math.min(start, interval.a); stop = Math.max(stop, interval.b); } if (start <= stop + 1) { return new Interval(start, stop); } } return new Interval(0, template.length()-1); }
public Interval getTemplateRange() { if ( isAnonSubtemplate ) { int start = Integer.MAX_VALUE; int stop = Integer.MIN_VALUE; for (Interval interval : sourceMap) { if (interval == null) { continue; } start = Math.min(start, interval.a); stop = Math.max(stop, interval.b); } if (start <= stop + 1) { return new Interval(start, stop); } } return new Interval(0, template.length()-1); }
public Interval getTemplateRange() { if ( isAnonSubtemplate ) { int start = Integer.MAX_VALUE; int stop = Integer.MIN_VALUE; for (Interval interval : sourceMap) { if (interval == null) { continue; } start = Math.min(start, interval.a); stop = Math.max(stop, interval.b); } if (start <= stop + 1) { return new Interval(start, stop); } } return new Interval(0, template.length()-1); }
public Interval getTemplateRange() { if ( isAnonSubtemplate ) { int start = Integer.MAX_VALUE; int stop = Integer.MIN_VALUE; for (Interval interval : sourceMap) { if (interval == null) { continue; } start = Math.min(start, interval.a); stop = Math.max(stop, interval.b); } if (start <= stop + 1) { return new Interval(start, stop); } } return new Interval(0, template.length()-1); }
public Interval getTemplateRange() { if ( isAnonSubtemplate ) { int start = Integer.MAX_VALUE; int stop = Integer.MIN_VALUE; for (Interval interval : sourceMap) { if (interval == null) { continue; } start = Math.min(start, interval.a); stop = Math.max(stop, interval.b); } if (start <= stop + 1) { return new Interval(start, stop); } } return new Interval(0, template.length()-1); }
public Interval getTemplateRange() { if ( isAnonSubtemplate ) { int start = Integer.MAX_VALUE; int stop = Integer.MIN_VALUE; for (Interval interval : sourceMap) { if (interval == null) { continue; } start = Math.min(start, interval.a); stop = Math.max(stop, interval.b); } if (start <= stop + 1) { return new Interval(start, stop); } } return new Interval(0, template.length()-1); }
public Interval getTemplateRange() { if ( isAnonSubtemplate ) { int start = Integer.MAX_VALUE; int stop = Integer.MIN_VALUE; for (Interval interval : sourceMap) { if (interval == null) { continue; } start = Math.min(start, interval.a); stop = Math.max(stop, interval.b); } if (start <= stop + 1) { return new Interval(start, stop); } } return new Interval(0, template.length()-1); }
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST!=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST!=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST!=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST!=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST!=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST!=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST!=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }
public void emit(CommonTree opAST, short opcode) { ensureCapacity(1); if ( opAST!=null ) { int i = opAST.getTokenStartIndex(); int j = opAST.getTokenStopIndex(); int p = ((CommonToken)tokens.get(i)).getStartIndex(); int q = ((CommonToken)tokens.get(j)).getStopIndex(); if ( !(p<0 || q<0) ) impl.sourceMap[ip] = new Interval(p, q); } impl.instrs[ip++] = (byte)opcode; }