1 package org.apache.oro.text.awk; 2 3 59 60 import java.util.*; 61 62 66 abstract class LeafNode extends SyntaxNode { 67 static final int _NUM_TOKENS = 256; 68 static final int _END_MARKER_TOKEN = _NUM_TOKENS; 69 70 protected int _position; 71 protected BitSet _positionSet; 72 73 LeafNode(int position){ 74 _position = position; 75 _positionSet = new BitSet(position + 1); 76 _positionSet.set(position); 77 } 78 79 abstract boolean _matches(char token); 80 final boolean _nullable() { return false; } 81 final BitSet _firstPosition() { return _positionSet; } 82 final BitSet _lastPosition() { return _positionSet; } 83 final void _followPosition(BitSet[] follow, SyntaxNode[] nodes) { 84 nodes[_position] = this; 85 } 86 } 87 | Popular Tags |