lojix/logic/src/main/com/thesett/aima/logic/fol/isoprologparser/PrologParser.java
public boolean peekAndConsumeMore()
    {
        Token nextToken = tokenSource.peek();

        if ((nextToken.kind == ATOM) && ";".equals(nextToken.image))
        {
            try
            {
                consumeToken(ATOM);
            }
            catch (SourceCodeException e)
            {
                // If the peek ahead kind can not be consumed then something strange has gone wrong so report this
                // as a bug rather than try to recover from it.
                throw new IllegalStateException(e);
            }

            return true;
        }
        else
        {
            return false;
        }
    }
public boolean peekAndConsumeMore()
    {
        Token nextToken = tokenSource.peek();

        if ((nextToken.kind == ATOM) && ";".equals(nextToken.image))
        {
            try
            {
                consumeToken(ATOM);
            }
            catch (SourceCodeException e)
            {
                // If the peek ahead kind can not be consumed then something strange has gone wrong so report this
                // as a bug rather than try to recover from it.
                throw new IllegalStateException(e);
            }

            return true;
        }
        else
        {
            return false;
        }
    }
public boolean peekAndConsumeMore ( ) { Token nextToken = tokenSource . peek ( ) ; if ( ( nextToken . kind == ATOM ) && ";" . equals ( nextToken . image ) ) { try { consumeToken ( ATOM ) ; } catch ( SourceCodeException e ) { // If the peek ahead kind can not be consumed then something strange has gone wrong so report this // as a bug rather than try to recover from it. throw new IllegalStateException ( e ) ; } return true ; } else { return false ; } }
Peeks at the next token to see if it is an {@link #ATOM} which is equal to ";" and if it is consumes it. If the
symbol is consumed then the return value indicates that this has happened. This is intended to be usefull for
interactive interpreters when querying the user to see if they want more solutions to be found.

@return <tt>true</tt> if the next token is ";" and it is consumed.
Peeks at the next token to see if it is an { @link #ATOM } which is equal to ; and if it is consumes it . If the symbol is consumed then the return value indicates that this has happened . This is intended to be usefull for interactive interpreters when querying the user to see if they want more solutions to be found .