question: public String byteStringNoSlash ( ) { StringBuilder retval = new StringBuilder ( ) ; try { while ( true ) { char next = lookAhead ( 0 ) ; if ( next == '\0' || next == '\n' || next == '/' ) { break ; } else { consume ( 1 ) ; retval . append ( next ) ; } } } catch ( ParseException ex ) { return retval . toString ( ) ; } return retval . toString ( ) ; }
target:  Scan until you see a slash or an EOL.