{"id":28292721,"url":"https://github.com/haikelfazzani/dard","last_synced_at":"2026-05-14T13:38:38.753Z","repository":{"id":62002605,"uuid":"557030777","full_name":"haikelfazzani/dard","owner":"haikelfazzani","description":"⭐ Dard is french educational programming language, it is designed as an instrument for learning 💻","archived":false,"fork":false,"pushed_at":"2026-05-06T16:55:19.000Z","size":109,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-06T18:37:06.119Z","etag":null,"topics":["c","clang","cpp","french","language","programming-language","tdd"],"latest_commit_sha":null,"homepage":"","language":"C","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/haikelfazzani.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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-10-25T00:44:04.000Z","updated_at":"2026-05-06T16:46:58.000Z","dependencies_parsed_at":"2022-10-25T01:45:22.888Z","dependency_job_id":null,"html_url":"https://github.com/haikelfazzani/dard","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/haikelfazzani/dard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haikelfazzani%2Fdard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haikelfazzani%2Fdard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haikelfazzani%2Fdard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haikelfazzani%2Fdard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haikelfazzani","download_url":"https://codeload.github.com/haikelfazzani/dard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haikelfazzani%2Fdard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33027351,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["c","clang","cpp","french","language","programming-language","tdd"],"created_at":"2025-05-22T05:11:05.589Z","updated_at":"2026-05-14T13:38:38.002Z","avatar_url":"https://github.com/haikelfazzani.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dard\n\n⭐ **Dard** is a French educational programming language, designed as an instrument for learning 💻\n\n## Overview\n\nDard is a complete custom programming language built from scratch to serve as an educational tool for learning compiler design and language implementation. It combines Lex, Yacc, and C to create a full-featured language system.\n\n## Language Composition\n\n| Language | Percentage |\n|----------|-----------|\n| C        | 94%       |\n| Yacc     | 3.7%      |\n| Lex      | 1.4%      |\n| Makefile | 0.9%      |\n\n## Features\n\n### Data Types\n- **entier** - Integer type\n- **flottant** - Floating-point numbers\n- **chaine** - String type\n- **booleen** - Boolean (vrai/faux)\n- **tableau** - Arrays\n\n### Control Structures\n- **if/else** - Conditional statements (`si`, `sinon`, `finsi`)\n- **while** - While loops (`tant`, `faire`, `fintant`)\n- **for** - For loops (`pour`, `finpour`)\n\n### Functions\n```dard\nfonction nomFonction(param1, param2)\n  entier resultat;\n  resultat = param1 + param2;\n  retour resultat;\nfin_fonction\n```\n\n### Operators\n- Arithmetic: `+`, `-`, `*`, `/`, `%`, `^` (power)\n- Comparison: `==`, `!=`, `\u003c`, `\u003e`, `\u003c=`, `\u003e=`\n- Logical: `et` (AND), `ou` (OR), `non` (NOT)\n\n### Built-in Functions\n- **ecrire()** - Print/output values\n- **lire()** - Read/input values\n- **exit** - Exit program\n\n## Example Programs\n\n### Hello World with Output\n```dard\nprogramme\n  ecrire(42);\nfin\n```\n\n### Variables and Arithmetic\n```dard\nprogramme\n  entier a;\n  entier b;\n  a = 10;\n  b = 20;\n  ecrire(a + b);\nfin\n```\n\n### If/Else Statement\n```dard\nprogramme\n  entier x;\n  x = 15;\n  \n  si (x \u003e 10)\n  {\n    ecrire(1);\n  }\n  sinon\n  {\n    ecrire(0);\n  }\n  finsi\nfin\n```\n\n### For Loop\n```dard\nprogramme\n  entier i;\n  entier sum;\n  sum = 0;\n  \n  pour (i = 0; i \u003c 10; i = i + 1)\n  {\n    sum = sum + i;\n  }\n  finpour\n  \n  ecrire(sum);\nfin\n```\n\n### While Loop\n```dard\nprogramme\n  entier x;\n  x = 5;\n  \n  tant (x \u003e 0)\n  faire\n  {\n    ecrire(x);\n    x = x - 1;\n  }\n  fintant\nfin\n```\n\n### Arrays\n```dard\nprogramme\n  tableau arr[5];\n  entier i;\n  \n  pour (i = 0; i \u003c 5; i = i + 1)\n  {\n    arr[i] = i * 2;\n  }\n  finpour\nfin\n```\n\n### Functions\n```dard\nprogramme\n  fonction ajouter(a, b)\n  {\n    entier resultat;\n    resultat = a + b;\n    retour resultat;\n  }\n  fin_fonction\n  \n  entier somme;\n  somme = ajouter(5, 3);\n  ecrire(somme);\nfin\n```\n\n## Build \u0026 Run\n\n```shell\nyacc -d parser.y \u0026\u0026 lex lexer.l \u0026\u0026 gcc -g lex.yy.c y.tab.c -o out.dard -lm\n./out.dard \u003c tests/program.dard\n```\n\nNote: The `-lm` flag is required to link the math library for power operations.\n\n### Clean Build\n```shell\nrm -rf lex.yy.c y.tab.c y.tab.h out.dard out.dSYM\n```\n\n## Language Design\n\nThe language is implemented using:\n- **Lex** - Lexical analyzer for tokenization\n  - Handles keywords, identifiers, numbers, operators\n  - Supports comments starting with `#`\n  - French keywords for educational purposes\n\n- **Yacc** - Parser generator for syntax analysis\n  - Builds abstract syntax trees\n  - Handles expressions, statements, and control flow\n  - Manages variable scoping and function definitions\n\n- **C** - Core implementation language\n  - Variable storage and management\n  - Function implementation\n  - Runtime execution engine\n\n## Implementation Details\n\n### Symbol Table\n- Stores up to 1000 variables with type information\n- Supports multiple data types with proper type checking\n- Includes array support with dynamic sizing\n\n### Stack-based Variables\n- All variables are stored in a global symbol table\n- Type conversion handled automatically where appropriate\n- Array elements stored contiguously in memory\n\n### Execution\n- Single-pass interpreter\n- Expressions evaluated left-to-right\n- Control flow statements fully supported\n\n## Topics\n\n`c` `clang` `cpp` `french` `language` `programming-language` `tdd` `compiler` `interpreter` `educational`\n\n## Getting Started\n\n1. Install Yacc and Lex on your system:\n   ```bash\n   # Ubuntu/Debian\n   sudo apt-get install bison flex\n\n   # macOS\n   brew install bison flex\n   ```\n\n2. Write a Dard program (see examples above)\n\n3. Compile and run:\n   ```bash\n   yacc -d parser.y \u0026\u0026 lex lexer.l \u0026\u0026 gcc -g lex.yy.c y.tab.c -o out.dard -lm\n   ./out.dard \u003c yourprogram.dard\n   ```\n\n## License\n\nThis project is open source and available on GitHub.\n\n---\n\nCreated: October 25, 2022  \nLast Updated: May 6, 2026  \nRepository: [github.com/haikelfazzani/dard](https://github.com/haikelfazzani/dard)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaikelfazzani%2Fdard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaikelfazzani%2Fdard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaikelfazzani%2Fdard/lists"}