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
Spanit 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.