-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
VBrazhnik edited this page Jun 21, 2020
·
2 revisions
The processing of the input file divided into three steps:
- Lexical analysis
- Parsing
- Calculations
Lexical analysis is performed by lexer.
Lexer validates the form of the input and prepares data for the processing in the next step.
It...:
- ...clears comments and empty lines from the input files.
- ...identifies the type of each line and validates the structure of the input file.
- ...tokenizes statements (rules, initial facts, queries).
Parsing is performed by parser.
It...:
- ...receives tokenized rules, initial facts, and queries.
- ...validates that tokens form correct rules.
- ...prepares data for the next step of processing.
Calculations are made by inference engine (or just engine).
Types of engines and differences are listed in the chapter “Inference engine”.