Skip to main content

Crate patch_prolog_frontend

Crate patch_prolog_frontend 

Source
Expand description

plg-frontend: ISO Prolog tokenizer, parser, and source-level static analysis, ported from patch-prolog.

Consumed by the compiler and the LSP. Compiled Prolog binaries carry a minimal goal-only parser inside the runtime instead.

Re-exports§

pub use error::PrologError;
pub use error::ThrownError;
pub use error::format_term;
pub use parse_error::ParseError;
pub use parser::CallSite;
pub use parser::CgClause;
pub use parser::Parser;
pub use parser::ProgramDirectives;
pub use source_map::SourceMap;
pub use tokenizer::Token;
pub use tokenizer::TokenKind;
pub use tokenizer::Tokenizer;

Modules§

error
ISO Prolog error terms.
lint
Static lint: calls to predicates that are defined nowhere.
parse_error
Structured parse error: a message plus the source Span it points at.
parser
Operator-precedence parser for ISO Prolog programs and queries.
source_map
Maps byte offsets (the stable position in a Span) back to human line/column. Built on demand from the source text a consumer already holds — positions are not threaded through parser return types.
tokenizer
Tokenizer for ISO Prolog source.