private static < A > ForwardNavigator < RegExp < A > > concatNav ( ) { return new ForwardNavigator < RegExp < A > > ( ) { private Visitor < A , List < RegExp < A > > > concatVis = new Visitor < A , List < RegExp < A > > > ( ) { public List < RegExp < A > > visit ( Concat < A > ure ) { return Arrays . < RegExp < A > > asList ( ure . left , ure . right ) ; } public List < RegExp < A > > visit ( RegExp < A > re ) { return Collections . < RegExp < A > > emptyList ( ) ; } } ; public List < RegExp < A > > next ( RegExp < A > re ) { return re . accept ( concatVis ) ; } } ; }
forward navigator through the sons of Concat nodes .