{"id":25504652,"url":"https://github.com/hediske/compiler","last_synced_at":"2026-02-23T01:03:41.618Z","repository":{"id":223865605,"uuid":"742107860","full_name":"hediske/Compiler","owner":"hediske","description":"A Compiler made using Maven that offers to the user the possibility to provide the language of the compiler .works only on SLR grammars and generates the SLR table according to the grammar given , An SLR parser generator  and type checking.","archived":false,"fork":false,"pushed_at":"2024-03-08T08:31:58.000Z","size":49,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-19T17:17:46.748Z","etag":null,"topics":["compilation","compiler","lexical-analysis","semantic-analysis","slr","slr-parser","syntax-analysis"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hediske.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-01-11T19:22:43.000Z","updated_at":"2025-05-30T22:39:36.000Z","dependencies_parsed_at":"2025-05-19T23:48:35.754Z","dependency_job_id":null,"html_url":"https://github.com/hediske/Compiler","commit_stats":null,"previous_names":["hediske/compiler"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hediske/Compiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hediske%2FCompiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hediske%2FCompiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hediske%2FCompiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hediske%2FCompiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hediske","download_url":"https://codeload.github.com/hediske/Compiler/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hediske%2FCompiler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29734082,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T20:09:16.275Z","status":"ssl_error","status_checked_at":"2026-02-22T20:09:13.750Z","response_time":110,"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":["compilation","compiler","lexical-analysis","semantic-analysis","slr","slr-parser","syntax-analysis"],"created_at":"2025-02-19T05:55:54.997Z","updated_at":"2026-02-23T01:03:41.595Z","avatar_url":"https://github.com/hediske.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Compiler\n\nHello , This project is a compiler based on three analysers :\n\t\u003cul\u003e\n\t\t\t\u003cli\u003e \u003cb\u003elexical analyser\u003c/b\u003e\n\t\t\t\t\t\u0026nbsp; This analyser provides for the user the possiblilty of using many types and symbols\n\t\t\t\u003cli\u003e \u003cb\u003eSyntax analyser\u003c/b\u003e\n\t\t\t\t\t\u0026nbsp; This analyser provides for the user the possiblilty of generating First,Follows and Slr table based on the grammar given\n\t\t\t\u003cli\u003e\u003cb\u003eSemantic analyser\u003c/b\u003e\n\t\t\t\t\t\u0026nbsp; This analyser provides for the user the possiblilty of testing if the grammar is correct semantically by verifying the Types .\n\t\t\t\t\n\u003ch1\u003e\nHow to Run \u003c/h1\u003e\n\nTo run this app you need to install Java Jdk 17 or above :\n\t\tYou can check the version by typing this command `java --version`\n\t\u003cbr\u003e\n\t\t First , change directory to compiler folder :\n\t\t\t\t\n\t   cd compiler\n\t\n\t\nThen run this command\n\t\t\t\n\t  mvn exec:java -Dexec.mainClass=\"com.mycompany.compiler.main.Compiler\"\n\u003ch1\u003eLexical Analyser\u003c/h1\u003e\n\u003ch4\u003eSymbols table\u003c/h4\u003e\n\n| Symbol| Types |\n| ----------- | ----------- |\n| if| NONE|\n| else| NONE|\n| true| BOOL|\n| false| BOOL|\n| function| NONE|\n| while| NONE|\t\t\t\t\t\t\t\n| for| NONE|\n| string| NONE|\t\t\t\n| bool| NONE|\n| int| NONE|\n| char| NONE|\t\n\n\u003ch4\u003eLanguage \u003c/h4\u003e\n\n\u003cp align=center\u003e\nDelimiter  →  space|tab|lineBreak  \u003cbr\u003e\nNum  →  (chiffre)\u003csup\u003e+\u003c/sup\u003e \u003cbr\u003e\nid  →  lettre(chiffre  +  lettre)\u003csup\u003e+\u003c/sup\u003e \u003cbr\u003e\nopari  →  +| − | ∗ | /  \u003cbr\u003e\noprel  →==  |  \u003c  |  \u003c=  |  \u003c\u003e  |  \u003e  |  \u003e=  \u003cbr\u003e\nopnot  →!  \u003cbr\u003e\nopneg→  –  \u003cbr\u003e\nstr  →  ”lettre\u003csup\u003e*\u003c/sup\u003e”  \u003cbr\u003e\nopbol→ || |  \u0026\u0026  \u003cbr\u003e\nwhile→  while  \u003cbr\u003e\nif→  if   \u003cbr\u003e\nelse→  else   \u003cbr\u003e\nchar→  char   \u003cbr\u003e\nstring→  string   \u003cbr\u003e\nbool→  bool   \u003cbr\u003e\nfunction→  f unction  \u003cbr\u003e \ntrue→  true   \u003cbr\u003e\nfalse→  false   \u003cbr\u003e\n=  →=   \u003cbr\u003e\n:  →:   \u003cbr\u003e\n;  →;   \u003cbr\u003e\n)  →)   \u003cbr\u003e\n(→  (   \u003cbr\u003e\n} →}   \u003cbr\u003e\n{ → { \u003cbr\u003e\n\u003c/p\u003e\n\n\u003ch1\u003e Syntax Analyser \u003c/h1\u003e\nThis package can generate for the user \n\t\u003cli\u003e \n\t\tFirst\n\t\t\u003c/li\u003e\n\t\t\t\u003cli\u003e \n\t\tFollows\n\t\t\u003c/li\u003e\t\u003cli\u003e \n\t\tSLR table\n\t\t\u003c/li\u003e\n\tand can verfiy if the grammar is SLR or not\n\t\nTo add a grammar to your Compiler you can modify file `grammar.json` located in **src/ressources**\n\n\u003ch4\u003eExample\u003c/h4\u003e\n\n    \u003csmall\u003e\n    {\n    \"Grammar\":  [\u003cbr\u003e\n    \"Pro → D I\",\u003cbr\u003e\n    \"D → DL ; D | ɛ\",\u003cbr\u003e\n    \"DL → T : id | F : id\",\n    \u003cbr\u003e\n    \"T → char | int | bool | string\",\n    \u003cbr\u003e\n    \"F → function ( P ) : T | function ( ) : T\",\n    \u003cbr\u003e\n    \"I → IL ; I | ɛ\",\n    \u003cbr\u003e\n    \"IL → if ( E ) { I } IFS | while ( E ) { I } | id = E | id = function ( Par ) { I } | id = function ( ) { I }\",\n    \u003cbr\u003e\n    \"IFS → else { I } | ɛ\",\n    \u003cbr\u003e\n    \"E → id ( P' ) | id ( ) | EL opari E | EL opbol E | EL oprel E | opneg E | opnot E | ( E ) | EL\",\n    \u003cbr\u003e\n    \"EL → nb | id | str | litteral | true | false\",\n    \u003cbr\u003e\n    \"P → T | T , P\",\n    \u003cbr\u003e\n    \"P' → E | E , P'\",\n    \u003cbr\u003e\n    \"Par → id : T | id : T , Par\"\n    \u003cbr\u003e\n    ]\n    \u003cbr\u003e\n     }\u003c/small\u003e\n\n\nThe grammar must respect these rules : \t\u003col\u003e\n\t\t\u003cli\u003eYou need To put a Space betwwen each element of the production\n\t\t\u003cli\u003eYou use this arrow for the rule definition `→`\n\t\t\u003cli\u003ethis symbol for the epsilon `ɛ`\n\t\t\u003cli\u003eUppercase for the Non-Terminal\n\t\t\u003c/ol\u003e\n\n\u003ch4\u003eExample\u003c/h4\u003e\n\n\u003e E' → E\u003cbr\u003e\n\u003eE → E + T\u003cbr\u003e\n\u003eE → T\u003cbr\u003e\n\u003eT → T * F\u003cbr\u003e\n\u003eT → F\u003cbr\u003e\n\u003eF → ( E )\u003cbr\u003e\n\u003eF → id\u003cbr\u003e\n\n\nTo add a code for testing the Syntax analyser ! your file must be also located under **src/ressources**\n\n\u003ch1\u003e Semantic analyser \u003c/h1\u003e\n\tThe goal of this analyser  is to check the type in the code to compile ! It checks if the variables were declared , if statements are correct and if expressions have correct types .\n\n\t\t\t\n\t\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhediske%2Fcompiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhediske%2Fcompiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhediske%2Fcompiler/lists"}