Logo Lanfrica

Ayobami0/yoruba

Domaine:

natural language processing

Type de record:

software
Créateur:
Ayo
Hôte:
en.wikipedia.org Èdè Yorùbá ## **Table of Contents** - Introduction - Getting Started - Installation - Hello World - Language Syntax - Variables - Data Types - Arithmetic Operations - Expressions Grouping - Control Structures - Conditional Statements - Loop Structures - Functions - Comments - Builtin Functions - Examples - Contributing - License - Future Additions - Resources ## **Introduction** **yoruba** is a high-level, general-purpose programming language that integrates the syntax and semantics of the Yoruba language. ## **Getting Started** ### **Installation** To get started with **yoruba**, follow these steps: 1. **Clone the repository:** ```bash git clone github.com; cd yoruba ``` 2. **Run the interpreter:** ```bash # yoruba files have the extension .yrb ./bin/yoruba file.yrb ``` ### **Hello World** Here's how you can write and run your first program in **yoruba**: ```yoruba pe ko pelu "Aye! E kaabo si Èdè Yorùbá!" pa ``` To run this code, save it in a file called `kiki.yrb` and execute: ```bash ./yoruba kiki.yrb ``` ## **Language Syntax** ### **Variables** Variables are declared using the `jeki` keyword, followed by the variable name, assignment operator `je`, and the value. ```yoruba jeki age je 25 jeki name je "Ayobami" ``` ### **Data Types** - **Integers**: Whole numbers (`10`, `-5`) - **Strings**: Text enclosed in double quotes (`"Oruko mi ni Ayobami"`, `"Oluwa ni"`) - **Booleans**: `ooto` (true) and `eke` (false) ### **Arithmetic Operations** Arithmetic operations : - **Addition (`+`)** - **Subtraction (`-`)** - **Multiplication (`*`)** - **Division (`/`)** Example: ```yoruba jeki sum je 3 + 5 jeki product je 2 * 5 ``` ### **Expressions Grouping** Expressions can be grouped together using {} for better readability ```yoruba [[variables]] jeki a je {1 + 4} [[loop statements]] titi {x baje y} se pari [[if statement]] ti {x kobaje y} lehinna pari [[function calls]] pe ko pelu {x, y, z} pa [[nested function calls]] pe ko pelu {x, y, …

Licenses