General algorithmΒΆ
We can specify the main parts of the algorithm:
Compiling
- Reading the script.
- Checking if the script is not empty (otherwise it returns null).
- Division of the code into the lines.
- Tokenization:
- lines are divided into tokens
- except of multiline tokens which can expand to multiple lines
- Eventual changing of token types (ex. from basic ones to its subtokens).
- Validation - detecting of syntax errors by the tokens order.
- Converting of Plezuro tokens into the output language tokens.
- Writing output to the file.
Binding output language (currenty Javascript) libraries.