Skip to main content

Module parser

Module parser 

Source
Expand description

Prolog source parsing: tokenisation, syntax tree construction, and term encoding. Prolog source parsing.

Converts Prolog source text into compiled heap terms via three stages: tokenisation (tokeniser), syntax tree construction (build_tree), and heap encoding (execute_tree).

Modulesยง

build_tree
Syntax tree construction: parses a token stream into an AST of clauses and terms.
execute_tree
AST execution: encodes parsed terms onto the heap and populates the predicate table.
tokeniser
Lexer: converts Prolog source text into a token stream.