General algorithmΒΆ

We can specify the main parts of the algorithm:

  1. Compiling

    1. Reading the script.
    2. Checking if the script is not empty (otherwise it returns null).
    3. Division of the code into the lines.
    4. Tokenization:
      • lines are divided into tokens
      • except of multiline tokens which can expand to multiple lines
    5. Eventual changing of token types (ex. from basic ones to its subtokens).
    6. Validation - detecting of syntax errors by the tokens order.
    7. Converting of Plezuro tokens into the output language tokens.
    8. Writing output to the file.
  2. Binding output language (currenty Javascript) libraries.