public static TokenSource getTokenSourceForString ( String stringToTokenize ) { SimpleCharStream inputStream = new SimpleCharStream ( new StringReader ( stringToTokenize ) , 1 , 1 ) ; PrologParserTokenManager tokenManager = new PrologParserTokenManager ( inputStream ) ; return new TokenSource ( tokenManager ) ; }
Creates a token source on a string .