diff options
| author | 2024-02-24 12:48:55 +0800 | |
|---|---|---|
| committer | 2024-02-24 12:48:55 +0800 | |
| commit | ae345a2f193a4d6022edda76523a39f6e891843e (patch) | |
| tree | fbe13a483db44dbb4ac222f1cd29583edda9341f /readme_cn.rst | |
| parent | 9b916be9c8db9eedabde0331aef0cc53b5918b34 (diff) | |
| download | TRPGNivis-ae345a2f193a4d6022edda76523a39f6e891843e.tar.gz TRPGNivis-ae345a2f193a4d6022edda76523a39f6e891843e.zip | |
refactor!: rewrite python package
Diffstat (limited to 'readme_cn.rst')
| -rw-r--r-- | readme_cn.rst | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/readme_cn.rst b/readme_cn.rst deleted file mode 100644 index 7330447..0000000 --- a/readme_cn.rst +++ /dev/null @@ -1,97 +0,0 @@ -Psi CLI 语言 -======================== - -Psi 是一门新的编程语言,在设计时考虑了简单性、灵活性和性能。它提供了一种简洁直观的语法,易于读写,使其成为初学者和经验丰富的程序员的绝佳选择。 - -特征 --------- - -- `词法分析器模块`_: 词法分析器模块负责将源代码转换为一系列标记。它识别语言的基本元素,例如标识符、关键字、运算符和文字。 - -- `程序解析器模块`_: 程序分析器模块采用词法分析器模块生成的标记序列,并将其转换为抽象语法树(Abstract Syntax Tree,后译 AST)。AST 是一种树状数据结构,它以更接近编程语言语法结构的方式表示源代码。``['OPERATOR', 'IDENTIFIER', 'SEPARATOR', 'SEPARATOR', 'CONTROL', 'IDENTIFIER', 'OPERATOR', 'INTEGER', 'SEPARATOR', 'IDENTIFIER', 'SEPARATOR', 'IDENTIFIER', 'OPERATOR', 'IDENTIFIER', 'SEPARATOR', 'IDENTIFIER', 'SEPARATOR', 'EOF']`` - -- `内置类型模块`_: 该模块定义了 Psi 语言的内置类型,例如列表和字典。它提供了用于创建和操作这些类型的实例的函数。 - -- `错误处理模块`_: 此模块提供在运行程序时捕获和处理错误的机制。它定义了一组异常类和函数,用于抛出和捕获这些异常。 - -- `执行环境模块`_: 该模块定义了 Psi 语言的执行环境,包括变量的范围和生命周期。它提供了用于在执行环境中定义和查找变量的函数。 - -- `解释器模块`_: 该模块的主要作用是遍历 AST 并在执行环境中执行相应的操作。 - -- `数学基础模块`_: 该模块提供基本的数学函数和常数,如加法、减法、乘法和除法。 - -- `文档模块`_: 该模块使用 reStructuredText 和 Sphinx 构建文档,提供 API 接口描述和使用示例。 - -.. _`词法分析器模块`: https://github.com/HydroRoll-Team/psi/blob/main/psi/lexer.py -.. _`程序解析器模块`: https://github.com/HydroRoll-Team/psi/blob/main/psi/parser.py -.. _`内置类型模块`: https://github.com/HydroRoll-Team/psi/blob/main/psi/type.py -.. _`错误处理模块`: https://github.com/HydroRoll-Team/psi/blob/main/psi/exception.py -.. _`执行环境模块`: https://github.com/HydroRoll-Team/psi/blob/main/psi/execution.py -.. _`解释器模块`: https://github.com/HydroRoll-Team/psi/blob/main/psi/interpreter.py -.. _`数学基础模块`: https://github.com/HydroRoll-Team/psi/blob/main/psi/mathematics.py -.. _`文档模块`: https://github.com/HydroRoll-Team/psi/blob/main/docs - -开始 ---------------- - -如何使用 Psi ?你可以克隆存储库并按照自述文件中的说明进行操作。该存储库包括一组完整的示例,用于演示该语言的各种功能。 - -+---------------------+---------------------+-----------------------------------------+---------------------------------------------+ -| *数据结构* | *数据类型* | *关键字* | *特殊字符* | -+=====================+=====================+=========================================+=============================================+ -| 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 | -+---------------------+---------------------+-----------------------------------------+---------------------------------------------+ - -贡献 ------------- - -欢迎对 Psi 项目做出贡献。如果你有功能请求、错误报告或改进建议,请在项目的 GitHub 页面上提出。如果你希望贡献代码,请分叉存储库并提交拉取请求。 - -如何构建文档 -^^^^^^^^^^^^^^^^^ - -:: - - git clone https://github.com/HydroRoll-Team/psi.git - cd docs - pip install -r requirements.txt - # mkdocs build - mkdocs serve - - -Documentation -------------- - -Psi 文档可在 `psi.retrofor <https://psi.retrofor.space>`_ 上找到。 - -你还可以通过以下链接查看它: - - `vercel-1 psi-alpha <https://psi-alpha.vercel.app>`_ - - `vercel-2 psi-retrofor <https://psi-retrofor.vercel.app>`_ - - `gh-pages from HydroRoll-Team <https://hydroroll-team.github.io/psi>`_ - - -许可证 -------- - -Psi是一款开源软件,根据 MIT 许可证获得许可,这意味着你可以根据本许可的条款自由使用、修改和分发它。 |