{"id":16654208,"url":"https://github.com/letmefly666/syntaxanalysis","last_synced_at":"2026-03-07T15:32:11.573Z","repository":{"id":37815497,"uuid":"505254236","full_name":"LetMeFly666/SyntaxAnalysis","owner":"LetMeFly666","description":"编译原理 语法分析 LL(1)、LR(0)、SLR(1)、LR(1)、LALR(1)","archived":false,"fork":false,"pushed_at":"2022-06-22T15:35:23.000Z","size":396,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T18:11:32.086Z","etag":null,"topics":["bootstrap","lalr1","ll1","lr0","lr1","slr1","syntaxanalysis"],"latest_commit_sha":null,"homepage":"https://yffx.letmefly.xyz","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LetMeFly666.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-20T01:01:43.000Z","updated_at":"2023-06-24T08:20:21.000Z","dependencies_parsed_at":"2022-08-19T09:51:04.165Z","dependency_job_id":null,"html_url":"https://github.com/LetMeFly666/SyntaxAnalysis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LetMeFly666/SyntaxAnalysis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LetMeFly666%2FSyntaxAnalysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LetMeFly666%2FSyntaxAnalysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LetMeFly666%2FSyntaxAnalysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LetMeFly666%2FSyntaxAnalysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LetMeFly666","download_url":"https://codeload.github.com/LetMeFly666/SyntaxAnalysis/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LetMeFly666%2FSyntaxAnalysis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30219541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T14:02:48.375Z","status":"ssl_error","status_checked_at":"2026-03-07T14:02:43.192Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","lalr1","ll1","lr0","lr1","slr1","syntaxanalysis"],"created_at":"2024-10-12T09:49:02.783Z","updated_at":"2026-03-07T15:32:11.553Z","avatar_url":"https://github.com/LetMeFly666.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n * @Author: LetMeFly\n * @Date: 2022-06-20 21:58:59\n * @LastEditors: LetMeFly\n * @LastEditTime: 2022-06-21 14:02:38\n--\u003e\n# 语法分析\n\n编译原理语法分析，包括LL(1)、LR(0)、SLR(1)、LR(1)、LALR(1)\n\n+ 项目地址：[https://github.com/LetMeFly666/SyntaxAnalysis](https://github.com/LetMeFly666/SyntaxAnalysis)\n+ 在线文档：[https://yffx.letmefly.xyz](https://yffx.letmefly.xyz) (语法分析.letmefly.xyz)\n+ DFA可视化：使用[mermiad](https://github.com/mermaid-js/mermaid)\n+ 网页使用[BootStrap](https://www.bootcss.com/)布局、使用jQuery\n\n## 规则\n\n**符号规则：**\n\n+ **空格：** 文法和待匹配串中的空格会自动忽略，空格只可作为分隔符，不可作为终结符\n+ **“|”：** 代表“或”。例如“S -\u003e A | b” 代表 “S -\u003e A” 和 “S -\u003e b”。仅支持在“-\u003e”右侧出现\n+ **“ε”：** 代表“空”\n+ **“-\u003e”：** 代表“推出符号”，“-\u003e”左边出现过的都为非终结符，其余未提到的视为终结符\n\n**其他限制：**\n\n以下使用“_”代表空格\n\n+ 非终结符和终结符中不能包含空格（“-\u003e”右边出现空格会以空格为分隔符划分，“-\u003e”左边出现空格，则空格必须出现在非终结符前后）\n  \u003e + ```A_-\u003e_a_b_B```合法。\n  \u003e + ```_A_-\u003e_a_b_B```合法。\n  \u003e + ```___A-\u003e_a_b__B```合法。\n  \u003e + ```_AB_-\u003e_a_b__B```合法。（```AB```视为一个非终结符）\n  \u003e + ```_A_B_-\u003e_a_b__B```不合法！（不能由两个非终结符推出一个表达式）\n+ “-\u003e”前后都不能只包含空格\n  \u003e + ```-\u003e_a_b__B```不合法！\n  \u003e + ```A-\u003e_```不合法！\n  \u003e + ```A-\u003ea```合法。\n  \u003e + ```A-\u003ea|b```合法。（相当于```A-\u003ea```、```A-\u003eb```）\n  \u003e + ```A-\u003ea|```不合法！（相当于```A-\u003ea```、```A-\u003e```）\n  \u003e + ```A-\u003ea|ε```合法。（相当于```A-\u003ea```、```A-\u003eε```）\n  \u003e + ```A|B-\u003ea```不合法！（暂不支持在“-\u003e”左侧使用“|”）\n+ “ε”和“|”不能作为终结符或非终结符\n  \u003e + ```ε-\u003ea```不合法！\n  \u003e + ```|-\u003ea```不合法！\n  \u003e + ```BεA-\u003ea```不合法！\n  \u003e + ```BCA-\u003ea```合法。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletmefly666%2Fsyntaxanalysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fletmefly666%2Fsyntaxanalysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletmefly666%2Fsyntaxanalysis/lists"}