{"id":23527551,"url":"https://github.com/sinakarimi7/ll1-parser","last_synced_at":"2025-04-22T14:25:03.527Z","repository":{"id":235560993,"uuid":"140484603","full_name":"SinaKarimi7/LL1-Parser","owner":"SinaKarimi7","description":"for Compiler Project :)","archived":false,"fork":false,"pushed_at":"2018-07-10T22:08:04.000Z","size":5,"stargazers_count":4,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T16:02:05.158Z","etag":null,"topics":["ll1","nodejs","parser","parsing-algorithm","parsing-table"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SinaKarimi7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-07-10T20:35:47.000Z","updated_at":"2024-04-23T19:54:19.000Z","dependencies_parsed_at":"2024-04-23T21:14:33.265Z","dependency_job_id":"713f0906-d80d-40de-8b6a-86169b9a496e","html_url":"https://github.com/SinaKarimi7/LL1-Parser","commit_stats":null,"previous_names":["sinakarimi7/ll1-parser"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SinaKarimi7%2FLL1-Parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SinaKarimi7%2FLL1-Parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SinaKarimi7%2FLL1-Parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SinaKarimi7%2FLL1-Parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SinaKarimi7","download_url":"https://codeload.github.com/SinaKarimi7/LL1-Parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250257083,"owners_count":21400647,"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":["ll1","nodejs","parser","parsing-algorithm","parsing-table"],"created_at":"2024-12-25T20:16:10.681Z","updated_at":"2025-04-22T14:25:03.502Z","avatar_url":"https://github.com/SinaKarimi7.png","language":"JavaScript","readme":"# LL1-Parser\nLL1 parser implementation.\nA program to generate an LL(1) parser for a given grammar and to parse input strings.\n\nFor following grammer and input string: a+a*a+a\n\n## Output:\n```\nGrammar:\n\n   E -\u003e TX\n   X -\u003e +TX\n   X -\u003e ε\n   T -\u003e FY\n   Y -\u003e *FY\n   Y -\u003e ε\n   F -\u003e (E)\n   F -\u003e a\n\nFirst sets: \n\n   E : [ '(', 'a' ]\n   T : [ '(', 'a' ]\n   F : [ '(', 'a' ]\n   ( : [ '(' ]\n   a : [ 'a' ]\n   X : [ '+', 'ε' ]\n   + : [ '+' ]\n   Y : [ '*', 'ε' ]\n   * : [ '*' ]\n   ) : [ ')' ]\n\nFollow sets: \n\n   E : [ '$', ')' ]\n   X : [ '$', ')' ]\n   T : [ '+', '$', ')' ]\n   Y : [ '+', '$', ')' ]\n   F : [ '*', '+', '$', ')' ]\n\nNonTerminals: E,X,T,Y,F\nTerminals: +,ε,*,(,),a\n\n┌───┬───┬───┬───┬───┬───┬───┬───┐\n│   │ + │ ε │ * │ ( │ ) │ a │ $ │\n├───┼───┼───┼───┼───┼───┼───┼───┤\n│ E │   │   │   │ 1 │   │ 1 │   │\n├───┼───┼───┼───┼───┼───┼───┼───┤\n│ X │ 2 │   │   │   │ 3 │   │ 3 │\n├───┼───┼───┼───┼───┼───┼───┼───┤\n│ T │   │   │   │ 4 │   │ 4 │   │\n├───┼───┼───┼───┼───┼───┼───┼───┤\n│ Y │ 6 │   │ 5 │   │ 6 │   │ 6 │\n├───┼───┼───┼───┼───┼───┼───┼───┤\n│ F │   │   │   │ 7 │   │ 8 │   │\n└───┴───┴───┴───┴───┴───┴───┴───┘\n\n┌───────────────┬───────────┬──────────┬──────────┐\n│ CONSUMEDINPUT │ STACK     │ REMAIN   │ ACTION   │\n├───────────────┼───────────┼──────────┼──────────┤\n│               │ $,X,T     │ a+a*a+a$ │ TX       │\n├───────────────┼───────────┼──────────┼──────────┤\n│               │ $,X,Y,F   │ a+a*a+a$ │ FY       │\n├───────────────┼───────────┼──────────┼──────────┤\n│               │ $,X,Y,a   │ a+a*a+a$ │ a        │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a             │ $,X,Y     │ +a*a+a$  │ Matched! │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a             │ $,X,ε     │ +a*a+a$  │ ε        │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a             │ $,X       │ +a*a+a$  │ ε        │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a             │ $,X,T,+   │ +a*a+a$  │ +TX      │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a+            │ $,X,T     │ a*a+a$   │ Matched! │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a+            │ $,X,Y,F   │ a*a+a$   │ FY       │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a+            │ $,X,Y,a   │ a*a+a$   │ a        │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a+a           │ $,X,Y     │ *a+a$    │ Matched! │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a+a           │ $,X,Y,F,* │ *a+a$    │ *FY      │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a+a*          │ $,X,Y,F   │ a+a$     │ Matched! │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a+a*          │ $,X,Y,a   │ a+a$     │ a        │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a+a*a         │ $,X,Y     │ +a$      │ Matched! │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a+a*a         │ $,X,ε     │ +a$      │ ε        │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a+a*a         │ $,X       │ +a$      │ ε        │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a+a*a         │ $,X,T,+   │ +a$      │ +TX      │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a+a*a+        │ $,X,T     │ a$       │ Matched! │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a+a*a+        │ $,X,Y,F   │ a$       │ FY       │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a+a*a+        │ $,X,Y,a   │ a$       │ a        │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a+a*a+a       │ $,X,Y     │ $        │ Matched! │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a+a*a+a       │ $,X,ε     │ $        │ ε        │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a+a*a+a       │ $,X       │ $        │ ε        │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a+a*a+a       │ $,ε       │ $        │ ε        │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a+a*a+a       │ $         │ $        │ ε        │\n├───────────────┼───────────┼──────────┼──────────┤\n│ a+a*a+a       │ $         │ $        │ Accept!  │\n└───────────────┴───────────┴──────────┴──────────┘\nAns: Accept! (a+a*a+a)\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinakarimi7%2Fll1-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinakarimi7%2Fll1-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinakarimi7%2Fll1-parser/lists"}