1 package org.apache.oro.text.awk; 2 3 59 60 import java.util.*; 61 62 66 class StarNode extends SyntaxNode { 67 SyntaxNode _left; 68 69 StarNode(SyntaxNode child){ 70 _left = child; 71 } 72 73 boolean _nullable() { return true; } 74 75 BitSet _firstPosition() { return _left._firstPosition(); } 76 77 BitSet _lastPosition() { return _left._lastPosition(); } 78 79 void _followPosition(BitSet[] follow, SyntaxNode[] nodes) { 80 BitSet last, first; 81 int size; 82 83 _left._followPosition(follow, nodes); 84 85 last = _lastPosition(); 86 first = _firstPosition(); 87 size = last.size(); 88 89 while(0 < size--) 90 if(last.get(size)) 91 follow[size].or(first); 92 } 93 94 SyntaxNode _clone(int pos[]) { 95 return new StarNode(_left._clone(pos)); 96 } 97 } 98 | Popular Tags |