{"id":19975114,"url":"https://github.com/chyyuu/compiler_lab","last_synced_at":"2025-05-04T02:33:26.204Z","repository":{"id":37270926,"uuid":"104729108","full_name":"chyyuu/compiler_lab","owner":"chyyuu","description":"Some toy labs for compiler course","archived":false,"fork":false,"pushed_at":"2022-10-05T03:39:38.000Z","size":360,"stargazers_count":53,"open_issues_count":4,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-26T01:29:16.286Z","etag":null,"topics":["c","compiler","dfa","java","kotlin","lexer","llvm","nfa","paser","python","rust"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chyyuu.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":"2017-09-25T09:21:21.000Z","updated_at":"2023-03-16T03:08:29.000Z","dependencies_parsed_at":"2023-01-19T06:15:28.560Z","dependency_job_id":null,"html_url":"https://github.com/chyyuu/compiler_lab","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chyyuu%2Fcompiler_lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chyyuu%2Fcompiler_lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chyyuu%2Fcompiler_lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chyyuu%2Fcompiler_lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chyyuu","download_url":"https://codeload.github.com/chyyuu/compiler_lab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224379796,"owners_count":17301525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["c","compiler","dfa","java","kotlin","lexer","llvm","nfa","paser","python","rust"],"created_at":"2024-11-13T03:17:08.966Z","updated_at":"2024-11-13T03:17:09.477Z","avatar_url":"https://github.com/chyyuu.png","language":"Python","readme":"# compiler_lab\n\nAll programs have been tested on ubuntu 17.04 64 bit, and  some programs have been tested on windows 10 64bit. \n\n\n## lex \u0026 yacc\n1. [count line num using lex\u0026clang](clang/lex_count/)\n1. [upper chars using lex\u0026clang](clang/lex_toupper/)\n1. [calculator using lex\u0026yacc\u0026clang](clang/yacc_lex_exp/)\n1. [calculator using jlex\u0026cup\u0026java](clang/yacc_lex_exp/)\n1. [calculator using ply\u0026python](python2/ply_calc/)\n1. [some simple examples using ply\u0026python](python2/ply_examples/)\n1. [calculator using rust](rust/calculator/)\n1. [lexers using rust/nom](rust/lexer/)\n1. [Solving LL(1) First/Follow/PS Sets](clang/LL-1-Parsing-Table-Calculator/)\n## some automaton, turing machine codes\n\nFor understanding some concepts and internals of \"Formal Languages and Automata\"\n\n### automaton\n\nFrom https://github.com/cforth/toys/tree/master/Automaton\n\n[书籍《计算的本质：深入剖析程序和计算机》](http://www.ituring.com.cn/book/1098)中第三章以及第四章的自动机实现。  \n1. [section 3.1 确定性有限自动机（Deterministic Finite Automaton，DFA）](python3/automaton/DFA.py)\n1. [section 3.2 非确定性有限自动机（Nondeterministic Finite Automata，NFA）](python3/automaton/NFA.py)  \n1. [section 3.3 正则表达式的实现](automaton/Pattern.py)  \n1. [section 3.4 NFA与DFA的等价性](automaton/NFASimulation.py)  \n1. [section 4.1 确定性下推自动机（Deterministic PushDown Automaton，DPDA）](python3/automaton/DPDA.py)  \n1. [section 4.2 非确定性下推自动机（Nondeterministic Pushdown Automaton，NPDA）](python3/automaton/NPDA.py)  \n1. [section 4.3.1 词法分析（Lexical Analyzer）](python3/automaton/LexicalAnalyzer.py)  \n1. [section 4.3.2 语法分析（Grammar Analyzer）](python3/automaton/GrammarAnalyzer.py)\n1. [minimised DFA from DFA from NFA from Regular_Expression](python2/minidfa_dfa_nfa_regex)\n\n#### automata in rust\n1. [show nfa/dfa](rust/automata)\n\n### turing machine\n\nFrom https://github.com/cforth/toys/tree/master/Turing\n\n[《计算的本质：深入剖析程序和计算机》](http://www.ituring.com.cn/book/1098)中第五章的图灵机实现。   \n1. [section 5.1 确定型图灵机（Deterministic Turing Machine，DTM）](python3/turing_machine/DTM.py)\n\n## compiler, interpreter, simulator\n\n1. [Very basic IDE and vizualization/simulation of Mini-C compiler using kotlin](kotlin/minic-edu-app/)\n1. [BASIC language \u0026 interpreter using ply \u0026python](python2/ply_BASIC_lang)\n1. [simple stack machine using python](python2/simple_stack_machine)\n\n### little toy in rust\n1. [interpreter in rust](rust/interpreter)\n1. [compiler in rust](rust/compiler)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchyyuu%2Fcompiler_lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchyyuu%2Fcompiler_lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchyyuu%2Fcompiler_lab/lists"}