SuspendingPrologParseSession

Stateful clause-by-clause parsing whose input chunks are obtained asynchronously.

The session is single-consumer and its operator table may be updated between calls. Always call close, preferably from finally, to release the underlying asynchronous source.

Properties

Link copied to clipboard

Start position of the next candidate clause.

Link copied to clipboard
abstract val isAtEnd: Boolean

True only after EOF has been observed and no candidate clause remains.

Link copied to clipboard

Session-local operators used for subsequent clauses.

Functions

Link copied to clipboard
abstract suspend fun close()

Closes the underlying chunk source; repeated calls are safe.

Link copied to clipboard
abstract suspend fun parseNextClause(): SyntaxTree<ClauseNode>?

Parses and commits the next clause, or returns null at EOF.