Psi CLI Language ======================== Psi is a new programming language designed with simplicity, flexibility, and performance in mind. It provides a clean and intuitive syntax that is easy to read and write, making it an excellent choice for both beginners and experienced programmers. Features -------- - **Lexer Module**: The lexer module is responsible for converting the source code into a sequence of tokens. It recognizes the basic elements of the language such as identifiers, keywords, operators, and literals. - **Parser Module**: The parser module takes the sequence of tokens generated by the lexer module and transforms it into an Abstract Syntax Tree (AST). The AST is a tree-like data structure that represents the source code in a way that is closer to the syntactic structure of the programming language. - **Built-in Types Module**: This module defines the built-in types of the Psi language, such as lists and dictionaries. It provides functions for creating and manipulating instances of these types. - **Error Handling Module**: This module provides a mechanism for catching and handling errors during runtime. It defines a set of exception classes and functions for throwing and catching these exceptions. - **Execution Environment Module**: This module defines the execution environment of the Psi language, including the scope and lifecycle of variables. It provides functions for defining and looking up variables in the execution environment. - **Interpreter Module**: The main task of this module is to traverse the AST and perform the corresponding operations in the execution environment. - **Mathematics Foundation Module**: This module provides basic mathematical functions and constants, such as addition, subtraction, multiplication, and division. - **Documentation Module**: This module uses reStructuredText and Sphinx to build the documentation, providing API interface descriptions and usage examples. Getting Started --------------- To get started with Psi, you can clone the repository and follow the instructions in the README file. The repository includes a comprehensive set of examples that demonstrate the various features of the language. +---------------------+---------------------+---------------------------------+-----------------------------------------+ | *Data Structures* | *Data Types* | *keywords* | *Special Characters* | +=====================+=====================+=================================+=========================================+ | List | Integer | `reply` `ask` | `?`: if, `!`: else, `|`: condition | +---------------------+---------------------+---------------------------------+-----------------------------------------+ | Dictionary | Float | `import` `export` | `==` `<` `>` `!=` `~=` `=` | +---------------------+---------------------+---------------------------------+-----------------------------------------+ | Set | Boolean | `def` `call` | `&`: parallel, `~`: delay | +---------------------+---------------------+---------------------------------+-----------------------------------------+ | Tuple | String | `list` `dict` `set` `tuple` | `#` `""""...""""` | +---------------------+---------------------+---------------------------------+-----------------------------------------+ | Array | Null | `try` `catch` `assert` | `>>`: output stream, `<<`: input stream | +---------------------+---------------------+---------------------------------+-----------------------------------------+ | Queue | Object | `alias` | `@`: hook events | +---------------------+---------------------+---------------------------------+-----------------------------------------+ | Stack | Function | `wait` `async` `cancel` `yield` | `*`: repeat | +---------------------+---------------------+---------------------------------+-----------------------------------------+ | Graph | Class | `match` `search` `replace` | `&&`: and, `||`: or, `!`: not | +---------------------+---------------------+---------------------------------+-----------------------------------------+ | Tree | Interface | `namespace` | `{}`: code block, refer | +---------------------+---------------------+---------------------------------+-----------------------------------------+ | LinkedList | Enum | `loop` `break` `continue` | `=>`: functional program | +---------------------+---------------------+---------------------------------+-----------------------------------------+ Contributing ------------ Contributions to the Psi project are welcome. If you have a feature request, bug report, or proposal for improvement, please open an issue on the project's GitHub page. If you wish to contribute code, please fork the repository and submit a pull request. License ------- Psi is open-source software, licensed under the MIT license. This means you are free to use, modify, and distribute it under the terms of this license.