lojix/logic/src/main/com/thesett/aima/logic/fol/isoprologparser/TokenSource.java
public static TokenSource getTokenSourceForFile(File file) throws FileNotFoundException
    {
        // Create a token source to load the model rules from.
        Reader ins = new FileReader(file);
        SimpleCharStream inputStream = new SimpleCharStream(ins, 1, 1);
        PrologParserTokenManager tokenManager = new PrologParserTokenManager(inputStream);

        return new TokenSource(tokenManager);
    }
public static TokenSource getTokenSourceForFile(File file) throws FileNotFoundException
    {
        // Create a token source to load the model rules from.
        Reader ins = new FileReader(file);
        SimpleCharStream inputStream = new SimpleCharStream(ins, 1, 1);
        PrologParserTokenManager tokenManager = new PrologParserTokenManager(inputStream);

        return new TokenSource(tokenManager);
    }
Creates a token source on a file.

@param  file The file to tokenize.

@return A token source.

@throws FileNotFoundException If the file cannot be found.