public static void main ( String args [ ] ) throws ParseException { SPathParser parser = new SPathParser ( System . in ) ; Path p = parser . expression ( ) ; java . util . List l = p . getSteps ( ) ; // output for simple testing System . out . println ( ) ; if ( p instanceof AbsolutePath ) System . out . println ( "Root: /" ) ; for ( int i = 0 ; i < l . size ( ) ; i ++ ) { Step s = ( Step ) l . get ( i ) ; System . out . print ( "Step: " + s . getName ( ) ) ; if ( s . isDepthUnlimited ( ) ) System . out . print ( "(*)" ) ; System . out . println ( ) ; } }
Simple command - line parser interface primarily for testing .