/** * The {@code fromIndex} argument given to * {@link TRegexExecRootNode#execute(VirtualFrame, RegexObject, Object, int)}. * * @param frame a virtual frame as described by {@link TRegexDFAExecutorProperties}. * @return the {@code fromIndex} argument given to * {@link TRegexExecRootNode#execute(VirtualFrame, RegexObject, Object, int)}. */ public int getFromIndex(VirtualFrame frame) { return FrameUtil.getIntSafe(frame, props.getFromIndexFS()); }
/** * The {@code input} argument given to * {@link TRegexExecRootNode#execute(VirtualFrame, RegexObject, Object, int)}. * * @param frame a virtual frame as described by {@link TRegexDFAExecutorProperties}. * @return the {@code input} argument given to * {@link TRegexExecRootNode#execute(VirtualFrame, RegexObject, Object, int)}. */ public Object getInput(VirtualFrame frame) { return FrameUtil.getObjectSafe(frame, props.getInputFS()); }
/** * The index pointing into {@link #getInput(VirtualFrame)}. * * @param frame a virtual frame as described by {@link TRegexDFAExecutorProperties}. * @return the current index of {@link #getInput(VirtualFrame)} that is being processed. */ public int getIndex(VirtualFrame frame) { return FrameUtil.getIntSafe(frame, props.getIndexFS()); }
public DFACaptureGroupTrackingData getCGData(VirtualFrame frame) { return (DFACaptureGroupTrackingData) FrameUtil.getObjectSafe(frame, props.getCgDataFS()); }
/** * The maximum index as given by the parent {@link TRegexExecRootNode}. * * @param frame a virtual frame as described by {@link TRegexDFAExecutorProperties}. * @return the maximum index as given by the parent {@link TRegexExecRootNode}. */ public int getMaxIndex(VirtualFrame frame) { return FrameUtil.getIntSafe(frame, props.getMaxIndexFS()); }
public int[] getResultCaptureGroups(VirtualFrame frame) { assert props.isTrackCaptureGroups(); return (int[]) FrameUtil.getObjectSafe(frame, props.getCaptureGroupResultFS()); }
/** * The maximum index as checked by {@link #hasNext(VirtualFrame)}. In most cases this value is * equal to {@link #getMaxIndex(VirtualFrame)}, but backward matching nodes change this value * while matching. * * @param frame a virtual frame as described by {@link TRegexDFAExecutorProperties}. * @return the maximum index as checked by {@link #hasNext(VirtualFrame)}. * * @see BackwardDFAStateNode */ public int getCurMaxIndex(VirtualFrame frame) { return FrameUtil.getIntSafe(frame, props.getCurMaxIndexFS()); }
public short getLastTransition(VirtualFrame frame) { return (short) FrameUtil.getIntSafe(frame, props.getLastTransitionFS()); }
public int getSuccessorIndex(VirtualFrame frame) { return FrameUtil.getIntSafe(frame, props.getSuccessorIndexFS()); }
public int getResultInt(VirtualFrame frame) { assert !props.isTrackCaptureGroups(); return FrameUtil.getIntSafe(frame, props.getResultFS()); }