diff options
Diffstat (limited to 'readme.rst')
| -rw-r--r-- | readme.rst | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/readme.rst b/readme.rst new file mode 100644 index 0000000..3dd6db5 --- /dev/null +++ b/readme.rst @@ -0,0 +1,94 @@ +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 | ++=====================+=====================+=====================+ +| List | Integer | if | ++---------------------+---------------------+---------------------+ +| Dictionary | Float | else | ++---------------------+---------------------+---------------------+ +| Set | String | while | ++---------------------+---------------------+---------------------+ +| Tuple | Boolean | for | ++---------------------+---------------------+---------------------+ +| | Null | return | ++---------------------+---------------------+---------------------+ + + ++---------------------+---------------------+---------------------+ +| Data Structures | Data Types | Keywords | ++=====================+=====================+=====================+ +| List | Integer | if | ++---------------------+---------------------+---------------------+ +| Dictionary | Float | else | ++---------------------+---------------------+---------------------+ +| Set | Boolean | for | ++---------------------+---------------------+---------------------+ +| Tuple | String | while | ++---------------------+---------------------+---------------------+ +| Array | Null | return | ++---------------------+---------------------+---------------------+ +| Queue | Object | break | ++---------------------+---------------------+---------------------+ +| Stack | Function | continue | ++---------------------+---------------------+---------------------+ +| Graph | Class | import | ++---------------------+---------------------+---------------------+ +| Tree | Interface | from | ++---------------------+---------------------+---------------------+ +| LinkedList | Enum | as | ++---------------------+---------------------+---------------------+ + +Some Other Keywords: + ++---------------------+---------------------+---------------------+ +| if | else | elif | ++---------------------+---------------------+---------------------+ +| for | while | do | ++---------------------+---------------------+---------------------+ +| switch | case | default | ++---------------------+---------------------+---------------------+ +| try | catch | finally | ++---------------------+---------------------+---------------------+ +| throw | assert | import | ++---------------------+---------------------+---------------------+ +| export | from | as | ++---------------------+---------------------+---------------------+ + +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. |
