diff options
Diffstat (limited to 'index.html')
| -rw-r--r-- | index.html | 982 |
1 files changed, 982 insertions, 0 deletions
diff --git a/index.html b/index.html new file mode 100644 index 0000000..67543a5 --- /dev/null +++ b/index.html @@ -0,0 +1,982 @@ + +<!doctype html> +<html lang="zh" class="no-js"> + <head> + + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width,initial-scale=1"> + + <meta name="description" content="Psi 是一个函数式编程语言,同时也是一个CLI语言,旨在通过人机交互实现指定的功能。 该语言的设计目标是简单、易用、易学,同时也是一个多范式语言,支持函数式、命令式、面向对象、面向过程等多种编程范式。"> + + + <meta name="author" content="Hsiang Nianian"> + + + + + <link rel="next" href="blog/"> + + + <link rel="icon" href="assets/images/favicon.png"> + <meta name="generator" content="mkdocs-1.5.3, mkdocs-material-9.5.9"> + + + + <title>Psi 文档 (草案)</title> + + + + <link rel="stylesheet" href="assets/stylesheets/main.f2e4d321.min.css"> + + + <link rel="stylesheet" href="assets/stylesheets/palette.06af60db.min.css"> + + + + + + + + + + + + + <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> + <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback"> + <style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style> + + + + <link rel="stylesheet" href="css/timeago.css"> + + <link rel="stylesheet" href="stylesheets/extra.css"> + + <link rel="stylesheet" href="css/neoteroi-mkdocs.css"> + + <script>__md_scope=new URL(".",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script> + + + + + + + </head> + + + + + + + + + + <body dir="ltr" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo"> + + + <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> + <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> + <label class="md-overlay" for="__drawer"></label> + <div data-md-component="skip"> + + </div> + <div data-md-component="announce"> + + </div> + + + + +<header class="md-header" data-md-component="header"> + <nav class="md-header__inner md-grid" aria-label="页眉"> + <a href="https://psi.retrofor.space" title="Psi 文档 (草案)" class="md-header__button md-logo" aria-label="Psi 文档 (草案)" data-md-component="logo"> + + + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 14.27 10.64 13A11.242 11.242 0 0 0 5 10.18v6.95c2.61.34 5 1.34 7 2.82 2-1.48 4.39-2.48 7-2.82v-6.95c-2.16.39-4.09 1.39-5.64 2.82M19 8.15c.65-.1 1.32-.15 2-.15v11c-3.5 0-6.64 1.35-9 3.54C9.64 20.35 6.5 19 3 19V8c.68 0 1.35.05 2 .15 2.69.41 5.1 1.63 7 3.39 1.9-1.76 4.31-2.98 7-3.39M12 6c.27 0 .5-.1.71-.29.19-.21.29-.44.29-.71s-.1-.5-.29-.71C12.5 4.11 12.27 4 12 4s-.5.11-.71.29c-.18.21-.29.45-.29.71s.11.5.29.71c.21.19.45.29.71.29m2.12 1.12a2.997 2.997 0 1 1-4.24-4.24 2.997 2.997 0 1 1 4.24 4.24Z"/></svg> + + </a> + <label class="md-header__button md-icon" for="__drawer"> + + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z"/></svg> + </label> + <div class="md-header__title" data-md-component="header-title"> + <div class="md-header__ellipsis"> + <div class="md-header__topic"> + <span class="md-ellipsis"> + Psi 文档 (草案) + </span> + </div> + <div class="md-header__topic" data-md-component="header-topic"> + <span class="md-ellipsis"> + + Home + + </span> + </div> + </div> + </div> + + + <form class="md-header__option" data-md-component="palette"> + + + + + <input class="md-option" data-md-color-media="(prefers-color-scheme)" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_0"> + + <label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m14.3 16-.7-2h-3.2l-.7 2H7.8L11 7h2l3.2 9h-1.9M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69m-9.15 3.96h2.3L12 9l-1.15 3.65Z"/></svg> + </label> + + + + + + <input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_1"> + + <label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_2" hidden> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69Z"/></svg> + </label> + + + + + + <input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to system preference" type="radio" name="__palette" id="__palette_2"> + + <label class="md-header__button md-icon" title="Switch to system preference" for="__palette_0" hidden> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12c0-2.42-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69Z"/></svg> + </label> + + +</form> + + + + <script>var media,input,key,value,palette=__md_get("__palette");if(palette&&palette.color){"(prefers-color-scheme)"===palette.color.media&&(media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']"),palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent"));for([key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script> + + + <div class="md-header__option"> + <div class="md-select"> + + <button class="md-header__button md-icon" aria-label="选择当前语言"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m12.87 15.07-2.54-2.51.03-.03A17.52 17.52 0 0 0 14.07 6H17V4h-7V2H8v2H1v2h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04M18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12m-2.62 7 1.62-4.33L19.12 17h-3.24Z"/></svg> + </button> + <div class="md-select__inner"> + <ul class="md-select__list"> + + <li class="md-select__item"> + <a href="/" hreflang="zh" class="md-select__link"> + 中文 + </a> + </li> + + </ul> + </div> + </div> +</div> + + + <label class="md-header__button md-icon" for="__search"> + + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg> + </label> + <div class="md-search" data-md-component="search" role="dialog"> + <label class="md-search__overlay" for="__search"></label> + <div class="md-search__inner" role="search"> + <form class="md-search__form" name="search"> + <input type="text" class="md-search__input" name="query" aria-label="搜索" placeholder="搜索" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required> + <label class="md-search__icon md-icon" for="__search"> + + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg> + + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"/></svg> + </label> + <nav class="md-search__options" aria-label="查找"> + + <a href="javascript:void(0)" class="md-search__icon md-icon" title="分享" aria-label="分享" data-clipboard data-clipboard-text="" data-md-component="search-share" tabindex="-1"> + + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7 0-.24-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9a3 3 0 0 0-3 3 3 3 0 0 0 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.15c-.05.21-.08.43-.08.66 0 1.61 1.31 2.91 2.92 2.91 1.61 0 2.92-1.3 2.92-2.91A2.92 2.92 0 0 0 18 16.08Z"/></svg> + </a> + + <button type="reset" class="md-search__icon md-icon" title="清空当前内容" aria-label="清空当前内容" tabindex="-1"> + + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41Z"/></svg> + </button> + </nav> + + <div class="md-search__suggest" data-md-component="search-suggest"></div> + + </form> + <div class="md-search__output"> + <div class="md-search__scrollwrap" data-md-scrollfix> + <div class="md-search-result" data-md-component="search-result"> + <div class="md-search-result__meta"> + 正在初始化搜索引擎 + </div> + <ol class="md-search-result__list" role="presentation"></ol> + </div> + </div> + </div> + </div> +</div> + + + <div class="md-header__source"> + <a href="https://github.com/HydroRoll-Team/psi" title="前往仓库" class="md-source" data-md-component="source"> + <div class="md-source__icon md-icon"> + + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg> + </div> + <div class="md-source__repository"> + HydroRoll-Team/psi + </div> +</a> + </div> + + </nav> + +</header> + + <div class="md-container" data-md-component="container"> + + + + + +<nav class="md-tabs" aria-label="标签" data-md-component="tabs"> + <div class="md-grid"> + <ul class="md-tabs__list"> + + + + + + + + <li class="md-tabs__item md-tabs__item--active"> + <a href="." class="md-tabs__link"> + + + + + Home + + </a> + </li> + + + + + + + + + + <li class="md-tabs__item"> + <a href="blog/" class="md-tabs__link"> + + + + + Blog + + </a> + </li> + + + + + + + + + + + <li class="md-tabs__item"> + <a href="changelog/" class="md-tabs__link"> + + + + + Changelog + + </a> + </li> + + + + + + + + + + + <li class="md-tabs__item"> + <a href="showcase/" class="md-tabs__link"> + + + + + Showcase + + </a> + </li> + + + + + </ul> + </div> +</nav> + + + + <main class="md-main" data-md-component="main"> + <div class="md-main__inner md-grid"> + + + + + + <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" hidden> + <div class="md-sidebar__scrollwrap"> + <div class="md-sidebar__inner"> + + + + + + +<nav class="md-nav md-nav--primary md-nav--lifted" aria-label="导航栏" data-md-level="0"> + <label class="md-nav__title" for="__drawer"> + <a href="https://psi.retrofor.space" title="Psi 文档 (草案)" class="md-nav__button md-logo" aria-label="Psi 文档 (草案)" data-md-component="logo"> + + + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 14.27 10.64 13A11.242 11.242 0 0 0 5 10.18v6.95c2.61.34 5 1.34 7 2.82 2-1.48 4.39-2.48 7-2.82v-6.95c-2.16.39-4.09 1.39-5.64 2.82M19 8.15c.65-.1 1.32-.15 2-.15v11c-3.5 0-6.64 1.35-9 3.54C9.64 20.35 6.5 19 3 19V8c.68 0 1.35.05 2 .15 2.69.41 5.1 1.63 7 3.39 1.9-1.76 4.31-2.98 7-3.39M12 6c.27 0 .5-.1.71-.29.19-.21.29-.44.29-.71s-.1-.5-.29-.71C12.5 4.11 12.27 4 12 4s-.5.11-.71.29c-.18.21-.29.45-.29.71s.11.5.29.71c.21.19.45.29.71.29m2.12 1.12a2.997 2.997 0 1 1-4.24-4.24 2.997 2.997 0 1 1 4.24 4.24Z"/></svg> + + </a> + Psi 文档 (草案) + </label> + + <div class="md-nav__source"> + <a href="https://github.com/HydroRoll-Team/psi" title="前往仓库" class="md-source" data-md-component="source"> + <div class="md-source__icon md-icon"> + + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg> + </div> + <div class="md-source__repository"> + HydroRoll-Team/psi + </div> +</a> + </div> + + <ul class="md-nav__list" data-md-scrollfix> + + + + + + + + + + <li class="md-nav__item md-nav__item--active"> + + <input class="md-nav__toggle md-toggle" type="checkbox" id="__toc"> + + + + <a href="." class="md-nav__link md-nav__link--active"> + + + <span class="md-ellipsis"> + Home + </span> + + + </a> + + </li> + + + + + + + + + + + + + + + + + + + + + + + + + + + <li class="md-nav__item md-nav__item--nested"> + + + + + + <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_2" > + + + + <div class="md-nav__link md-nav__container"> + <a href="blog/" class="md-nav__link "> + + + <span class="md-ellipsis"> + Blog + </span> + + + </a> + + + <label class="md-nav__link " for="__nav_2" id="__nav_2_label" tabindex="0"> + <span class="md-nav__icon md-icon"></span> + </label> + + </div> + + <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false"> + <label class="md-nav__title" for="__nav_2"> + <span class="md-nav__icon md-icon"></span> + Blog + </label> + <ul class="md-nav__list" data-md-scrollfix> + + + + + + + + + + <li class="md-nav__item"> + <a href="." class="md-nav__link"> + + + <span class="md-ellipsis"> + 归档 + </span> + + + </a> + </li> + + + + + </ul> + </nav> + + </li> + + + + + + + + + + + + + + + + + + + + + + + + + <li class="md-nav__item md-nav__item--nested"> + + + + + + <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_3" > + + + + <div class="md-nav__link md-nav__container"> + <a href="changelog/" class="md-nav__link "> + + + <span class="md-ellipsis"> + Changelog + </span> + + + </a> + + </div> + + <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="false"> + <label class="md-nav__title" for="__nav_3"> + <span class="md-nav__icon md-icon"></span> + Changelog + </label> + <ul class="md-nav__list" data-md-scrollfix> + + + + </ul> + </nav> + + </li> + + + + + + + + + + + + + + + + + + + + + + + + + <li class="md-nav__item md-nav__item--nested"> + + + + + + <input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_4" > + + + + <div class="md-nav__link md-nav__container"> + <a href="showcase/" class="md-nav__link "> + + + <span class="md-ellipsis"> + Showcase + </span> + + + </a> + + </div> + + <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false"> + <label class="md-nav__title" for="__nav_4"> + <span class="md-nav__icon md-icon"></span> + Showcase + </label> + <ul class="md-nav__list" data-md-scrollfix> + + + + </ul> + </nav> + + </li> + + + + </ul> +</nav> + </div> + </div> + </div> + + + + + + <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" hidden> + <div class="md-sidebar__scrollwrap"> + <div class="md-sidebar__inner"> + + +<nav class="md-nav md-nav--secondary" aria-label="目录"> + + + + +</nav> + </div> + </div> + </div> + + + + <div class="md-content" data-md-component="content"> + <article class="md-content__inner md-typeset"> + + + + + + <a href="https://github.com/HydroRoll-Team/psi/edit/main/docs/docs/index.md" title="编辑此页" class="md-content__button md-icon"> + + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 20H6V4h7v5h5v3.1l2-2V8l-6-6H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h4v-2m10.2-7c.1 0 .3.1.4.2l1.3 1.3c.2.2.2.6 0 .8l-1 1-2.1-2.1 1-1c.1-.1.2-.2.4-.2m0 3.9L14.1 23H12v-2.1l6.1-6.1 2.1 2.1Z"/></svg> + </a> + + + + + + <a href="https://github.com/HydroRoll-Team/psi/raw/main/docs/docs/index.md" title="查看本页的源代码" class="md-content__button md-icon"> + + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17 18c.56 0 1 .44 1 1s-.44 1-1 1-1-.44-1-1 .44-1 1-1m0-3c-2.73 0-5.06 1.66-6 4 .94 2.34 3.27 4 6 4s5.06-1.66 6-4c-.94-2.34-3.27-4-6-4m0 6.5a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5 2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5M9.27 20H6V4h7v5h5v4.07c.7.08 1.36.25 2 .49V8l-6-6H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4.5a8.15 8.15 0 0 1-1.23-2Z"/></svg> + </a> + + + +<div align="center"> + + <h1><font color="#002fa7">P</font>si CLI</h1> + + <q>Psi 是一个嵌入式编程语言,同时也是一个CLI语言,旨在通过人机交互实现指定的功能。该语言的设计目标是简单、易用、易学,同时也是一个多范式语言,支持命令式、面向对象、面向过程等多种编程范式。</q><br /> + <b>它是骰主以及插件或模型作者入门水系的关键。</b> + +</div> + +<div class="nt-cards nt-grid cols-2"> +<div class="nt-card"> +<div class="nt-card-wrap"> +<div> +<div class="nt-card-content"> +<p class="nt-card-title">词法分析器模块</p> +<p class="nt-card-text">词法分析器模块负责将源代码转换为一系列标记(tokens)。它识别语言的基本元素,如标识符、关键字、运算符和字面量。 +<!-- <code>['OPERATOR', 'IDENTIFIER', 'SEPARATOR', 'SEPARATOR', 'CONTROL', 'IDENTIFIER', 'OPERATOR', 'INTEGER', 'SEPARATOR', 'IDENTIFIER', 'SEPARATOR', 'IDENTIFIER', 'OPERATOR', 'IDENTIFIER', 'SEPARATOR', 'IDENTIFIER', 'SEPARATOR', 'EOF']</code> --> +</p> +</div> +</div> +</div> +</div> +<div class="nt-card"> +<div class="nt-card-wrap"> +<div> +<div class="nt-card-content"> +<p class="nt-card-title">语法分析器模块</p> +<p class="nt-card-text">语法分析器模块接收词法分析器模块生成的标记序列,并将其转换为抽象语法树(AST)。AST是一种类似树状的数据结构,以更接近编程语言的语法结构的方式表示源代码。 +</p> +</div> +</div> +</div> +</div> +<div class="nt-card"> +<div class="nt-card-wrap"> +<div> +<div class="nt-card-content"> +<p class="nt-card-title">内置类型模块</p> +<p class="nt-card-text">此模块定义了Psi语言的内置类型,如列表和字典。它提供了用于创建和操作这些类型实例的函数。 +</p> +</div> +</div> +</div> +</div> +<div class="nt-card"> +<div class="nt-card-wrap"> +<div> +<div class="nt-card-content"> +<p class="nt-card-title">错误处理模块</p> +<p class="nt-card-text">此模块提供了在运行时捕获和处理错误的机制。它定义了一组异常类和用于抛出和捕获这些异常的函数。 +</p> +</div> +</div> +</div> +</div> +<div class="nt-card"> +<div class="nt-card-wrap"> +<div> +<div class="nt-card-content"> +<p class="nt-card-title">执行环境模块</p> +<p class="nt-card-text">此模块定义了Psi语言的执行环境,包括变量的作用域和生命周期。它提供了用于在执行环境中定义和查找变量的函数。 +</p> +</div> +</div> +</div> +</div> +<div class="nt-card"> +<div class="nt-card-wrap"> +<div> +<div class="nt-card-content"> +<p class="nt-card-title">解释器模块</p> +<p class="nt-card-text">此模块的主要任务是遍历AST并在执行环境中执行相应的操作。</p> +</div> +</div> +</div> +</div> +</div> +<!-- <object data="/res/main.pdf" type="application/pdf" style="width: 40%; height: 200px"> + <embed src="/res/main.pdf" type="application/pdf" style="width: 40%; height: 40%;"/> +</object> --> + + + + + + + + + + + + + + + + <aside class="md-source-file"> + + + <span class="md-source-file__fact"> + <span class="md-icon" title="最后更新"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1-2.1-2M12.5 7v5.2l4 2.4-1 1L11 13V7h1.5M11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2v1.8Z"/></svg> + </span> + <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-timeago"><span class="timeago" datetime="2024-02-18T19:50:41+08:00" locale="en"></span></span><span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-iso_date">2024-02-18</span> + </span> + + + + + <span class="md-source-file__fact"> + <span class="md-icon" title="创建日期"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.47 15.08 11 13V7h1.5v5.25l3.08 1.83c-.41.28-.79.62-1.11 1m-1.39 4.84c-.36.05-.71.08-1.08.08-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8c0 .37-.03.72-.08 1.08.69.1 1.33.32 1.92.64.1-.56.16-1.13.16-1.72 0-5.5-4.5-10-10-10S2 6.5 2 12s4.47 10 10 10c.59 0 1.16-.06 1.72-.16-.32-.59-.54-1.23-.64-1.92M18 15v3h-3v2h3v3h2v-3h3v-2h-3v-3h-2Z"/></svg> + </span> + <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-timeago"><span class="timeago" datetime="2024-02-18T19:50:41+08:00" locale="en"></span></span><span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-iso_date">2024-02-18</span> + </span> + + + + + + <span class="md-source-file__fact"> + <span class="md-icon" title="贡献者"> + + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 4a4 4 0 0 1 4 4 4 4 0 0 1-4 4 4 4 0 0 1-4-4 4 4 0 0 1 4-4m0 10c4.42 0 8 1.79 8 4v2H4v-2c0-2.21 3.58-4 8-4Z"/></svg> + + </span> + <nav> + + <a href="mailto:i@jyunko.cn">简律纯</a> + </nav> + </span> + + + + </aside> + + + + + + + + + + + <div class="md-source-date"> + <small> + Authors: <span class='git-page-authors git-authors'><a href='mailto:i@jyunko.cn'>简律纯</a></span> + </small> + </div> + + + </article> + </div> + + +<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script> + </div> + + <button type="button" class="md-top md-icon" data-md-component="top" hidden> + + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12Z"/></svg> + 回到页面顶部 +</button> + + </main> + + <footer class="md-footer"> + + + + + + <nav class="md-footer__inner md-grid" aria-label="页脚" > + + + + <a href="blog/" class="md-footer__link md-footer__link--next" aria-label="下一页: Index"> + <div class="md-footer__title"> + <span class="md-footer__direction"> + 下一页 + </span> + <div class="md-ellipsis"> + Index + </div> + </div> + <div class="md-footer__button md-icon"> + + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4Z"/></svg> + </div> + </a> + + </nav> + + + <div class="md-footer-meta md-typeset"> + <div class="md-footer-meta__inner md-grid"> + <div class="md-copyright"> + + <div class="md-copyright__highlight"> + Copyright © 2013 - PRESENT. <a href="https://github.com/HydroRoll-Team">HydroRoll-Team</a> – <a href="#__consent">管理Cookie</a> + + </div> + + + Made with + <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> + Material for MkDocs + </a> + +</div> + + <div class="md-social"> + + + + + + + + + <a href="https://github.com/HydroRoll-Team" target="_blank" rel="noopener" title="github.com" class="md-social__link"> + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc.--><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg> + </a> + +</div> + + </div> + </div> +</footer> + + </div> + <div class="md-dialog" data-md-component="dialog"> + <div class="md-dialog__inner md-typeset"></div> + </div> + + + <div class="md-consent" data-md-component="consent" id="__consent" hidden> + <div class="md-consent__overlay"></div> + <aside class="md-consent__inner"> + <form class="md-consent__form md-grid md-typeset" name="consent"> + + + + + + + + +<h4>Cookie 偏好设置</h4> +<p>我们使用Cookie来识别您的重复访问和偏好,以及衡量我们的文档的有效性和用户是否找到他们搜索的内容。在您的同意下,这将帮助我们改善我们的文档。</p> +<input class="md-toggle" type="checkbox" id="__settings" > +<div class="md-consent__settings"> + <ul class="task-list"> + + + + + + + + + <li class="task-list-item"> + <label class="task-list-control"> + <input type="checkbox" name="analytics" checked> + <span class="task-list-indicator"></span> + Google Analytics + </label> + </li> + + + + + + + + + <li class="task-list-item"> + <label class="task-list-control"> + <input type="checkbox" name="github" checked> + <span class="task-list-indicator"></span> + GitHub + </label> + </li> + + </ul> +</div> +<div class="md-consent__controls"> + + + <button class="md-button md-button--primary">同意</button> + + + + + + + + <label class="md-button" for="__settings">管理设定</label> + + +</div> + </form> + </aside> + </div> + <script>var consent=__md_get("__consent");if(consent)for(var input of document.forms.consent.elements)input.name&&(input.checked=consent[input.name]||!1);else"file:"!==location.protocol&&setTimeout(function(){document.querySelector("[data-md-component=consent]").hidden=!1},250);var action,form=document.forms.consent;for(action of["submit","reset"])form.addEventListener(action,function(e){if(e.preventDefault(),"reset"===e.type)for(var n of document.forms.consent.elements)n.name&&(n.checked=!1);__md_set("__consent",Object.fromEntries(Array.from(new FormData(form).keys()).map(function(e){return[e,!0]}))),location.hash="",location.reload()})</script> + + <script id="__config" type="application/json">{"base": ".", "features": ["content.action.edit", "content.action.view", "navigation.footer", "navigation.tabs", "navigation.sections", "navigation.expand", "navigation.path", "navigation.indexes", "toc.follow", "navigation.top", "search.highlight", "search.suggest", "search.share", "header.autohide", "navigation.footer"], "search": "assets/javascripts/workers/search.b8dbb3d2.min.js", "translations": {"clipboard.copied": "\u5df2\u590d\u5236", "clipboard.copy": "\u590d\u5236", "search.result.more.one": "\u5728\u8be5\u9875\u4e0a\u8fd8\u6709 1 \u4e2a\u7b26\u5408\u6761\u4ef6\u7684\u7ed3\u679c", "search.result.more.other": "\u5728\u8be5\u9875\u4e0a\u8fd8\u6709 # \u4e2a\u7b26\u5408\u6761\u4ef6\u7684\u7ed3\u679c", "search.result.none": "\u6ca1\u6709\u627e\u5230\u7b26\u5408\u6761\u4ef6\u7684\u7ed3\u679c", "search.result.one": "\u627e\u5230 1 \u4e2a\u7b26\u5408\u6761\u4ef6\u7684\u7ed3\u679c", "search.result.other": "# \u4e2a\u7b26\u5408\u6761\u4ef6\u7684\u7ed3\u679c", "search.result.placeholder": "\u952e\u5165\u4ee5\u5f00\u59cb\u641c\u7d22", "search.result.term.missing": "\u7f3a\u5c11", "select.version": "\u9009\u62e9\u5f53\u524d\u7248\u672c"}}</script> + + + <script src="assets/javascripts/bundle.8fd75fb4.min.js"></script> + + <script src="js/timeago.min.js"></script> + + <script src="js/timeago_mkdocs_material.js"></script> + + <script src="javascripts/extra.js"></script> + + + </body> +</html>
\ No newline at end of file |
