Skip to content

Latest commit

 

History

History
65 lines (50 loc) · 1.38 KB

File metadata and controls

65 lines (50 loc) · 1.38 KB

DevLang – Hindi-Based Programming Language

DevLang is a programming language with Hindi keywords, enabling easier use for Hindi speakers. It provides basic constructs: variables, conditionals, and user interaction.

Features

  • Hindi Keywords: Familiar words for programming concepts
  • Variables: String/integer assignment
  • Conditionals: dekho (if), nhi_toh (else)
  • Input/Output: puchoo (input), bolo (output)
  • Symbol Table: Variable scoping and management
  • Modular Design

Main Keywords

  • bolo – Output statement (print)
  • dekho – Conditional (if)
  • nhi_toh – Else block (else)
  • puchoo – User input (input)

Getting Started

  1. Clone the repository:
    git clone https://github.com/dev0jha/DevLang.git
    cd DevLang
  2. Ensure Node.js (v12+) is installed.
  3. Run programs:
    # From file
    node devlang.js -f program.dev
    
    # Inline code
    node devlang.js -e "code here"
    
    # Debug tokens
    node devlang.js --tokens -f

Examples

# Addition
x = 10;
y = 20;
z = x + y;
bolo z;       # Output: 30

# String output
naam = "Dev Hari Ojha";
bolo naam;    # Output: Dev Hari Ojha

# Conditionals and input
age = puchoo "Apni age batao";
dekho(age >= 18) {
    bolo "Aap adult ho";
} nhi_toh {
    bolo "Aap minor ho";
}

DevLang makes programming accessible in Hindi. Try it out!