PrologParser
Parses a LexedSource into an immutable, lossless concrete syntax tree.
Structural syntax is handled by predictive recursive descent, while dynamic prefix, infix, and postfix expressions use precedence climbing in the style of Pratt's top-down operator-precedence parser. Prolog's seven operator specifiers and their x/y operand constraints follow ISO/IEC 13211-1.
Implementations are stateless and reusable. Inputs, operator tables, and sessions may be stateful and are not intended for concurrent access.
See also
Functions
Opens a UTF-8 suspending parse session over a browser File or Blob.
Opens a UTF-8 suspending parse session over a JavaScript ReadableStream<Uint8Array>.
Opens a clause-by-clause session whose operator table may change between calls.
Opens a clause-by-clause session over asynchronously supplied text chunks.
Parses exactly one clause, including its required terminating full stop.
Parses one expression, optionally followed by a full stop, and requires EOF afterward.
Parses one non-operator term, optionally followed by a full stop, and requires EOF afterward.
Parses the complete input as zero or more clauses with a fixed operator table.