Logo Lanfrica

yohanneskf/Amharic-programming-language

Domain:

natural language processing

Record type:

software
Creator:
yoh
Host:
# πŸ‡ͺπŸ‡Ή APL – αŠ αˆ›αˆ­αŠ› Programming Language A beginner-friendly programming language that uses **Amharic keywords** and translates source code into **Python**. This project was developed for a **Programming Language Design** course under the theme: > **Local Language Programming for Beginners** The language is designed to make programming easier for Ethiopian beginners by replacing English programming keywords with understandable Amharic words. --- # Features ## βœ… Variables ```am ቁαŒ₯ር x = 10 ``` Generated Python: ```python x = 10 ``` --- ## βœ… Variable Assignment ```am x = x + 1 ``` Generated Python: ```python x = x + 1 ``` --- ## βœ… Arithmetic Expressions Supported operators: ```text + - * / ``` Example: ```am ቁαŒ₯ር z = x + y ``` --- ## βœ… Comparison Operators Supported comparisons: ```text == ``` Example: ```am αŠ¨αˆ†αŠ x > 5: ``` --- ## βœ… Output (Print) ```am ፃፍ("αˆ°αˆ‹αˆ") ``` Generated Python: ```python print("αˆ°αˆ‹αˆ") ``` --- ## βœ… If Statement ```am αŠ¨αˆ†αŠ x > 5: αŒ€αˆαˆ­ ፃፍ("α‰΅αˆα‰…") ጨርሡ ``` Generated Python: ```python if x > 5: print("α‰΅αˆα‰…") ``` --- ## βœ… If / Else Statement ```am αŠ¨αˆ†αŠ x > 5: αŒ€αˆαˆ­ ፃፍ("α‰΅αˆα‰…") ጨርሡ αŠ«αˆαˆ†αŠ: αŒ€αˆαˆ­ ፃፍ("α‰΅αŠ•αˆ½") ጨርሡ ``` Generated Python: ```python if x > 5: print("α‰΅αˆα‰…") else: print("α‰΅αŠ•αˆ½") ``` --- ## βœ… While Loop ```am ቁαŒ₯ር x = 1 αˆ²αˆ†αŠ• x 5: αŒ€αˆαˆ­ ፃፍ("OK") ጨርሡ ``` --- # Source File Extension APL source files use the extension: ```text .አም ``` Example: ```text program.አም ``` Generated output: ```text program.py ``` --- # Project Structure ```text APL/ β”‚ β”œβ”€β”€ lexer.py β”œβ”€β”€ parser.py β”œβ”€β”€ nodes.py β”œβ”€β”€ codegen.py β”œβ”€β”€ translator.py β”‚ β”œβ”€β”€ README.md β”‚ └── examples/ β”œβ”€β”€ basic.አም β”œβ”€β”€ control.አም β”œβ”€β”€ function.አም ``` --- # Compiler Architecture The translator consists of three major stages: ## 1. Lexer The lexer: - Reads source code - Handles Unicode Amharic text - Recognizes keywords - Produces tokens Example: ```am ቁαŒ₯ር x = 10 ``` Tokens: ```python [ ('VAR','ቁαŒ₯ር'), ('ID','x'), ('ASSIGN','='), ('NUMBER','10') ] ``` --- ## 2. Pars …

Languages