Code example for StreamTokenizer

Methods: slashSlashComments, slashStarComments, wordChars

     * Configures passed tokenizer accordingly to supported syntax. 
    protected StreamTokenizer configure(StreamTokenizer st) {
        st.wordChars('_', '_');
        st.wordChars('$', '$');
        return st;
     * Performs the main parsing loop. Starts with creating and configuring a 
     * StreamTokenizer instance; then tries to recognize <i>keystore </i> or 
     * <i>grant </i> keyword. When found, invokes read method corresponding to 
     * the clause and collects result to the passed collection. 
     * @param r 
     *            policy stream reader 
     * @param grantEntries