
GujjuScript
A fun programming language with Gujarati-inspired keywords.
Overview
GujjuScript is a small experimental programming language that uses Gujarati-inspired keywords to make code more playful and culturally expressive.
The project started as a weekend experiment to explore how programming languages work internally. Instead of using traditional English keywords, the language replaces them with Gujarati equivalents while maintaining familiar programming concepts such as variables, functions, and control flow.
While the project was created mainly for fun, it provided a hands-on introduction to how compilers and interpreters process source code.
Problem
Most developers interact with programming languages without ever seeing how they actually work under the hood.
I wanted to explore how a programming language processes code by building a simple interpreter from scratch. The goal was to understand the full pipeline behind language execution:
- lexical analysis
- parsing
- syntax trees
- code evaluation
Creating a language with Gujarati-inspired syntax made the experiment more engaging and fun to build.
Constraints
- Weekend project scope – the language had to remain small and manageable.
- Simple grammar design – the syntax needed to stay readable while supporting basic programming constructs.
- Interpreter-based execution – compiling to machine code was outside the scope.
- Minimal tooling – the language runtime had to remain lightweight.
Key Engineering Decisions
Lexer-based tokenization
The first step in the execution pipeline was building a lexer to convert raw source code into tokens.
Reason:
Tokenization simplifies parsing by converting source text into structured language elements.
Tradeoff:
Custom tokenization logic must carefully handle whitespace, keywords, and symbols.
Parser for syntax structure
A parser was implemented to analyze token sequences and construct a syntax structure representing the program.
Reason:
Parsing ensures that source code follows the language grammar before execution.
Tradeoff:
Designing grammar rules requires balancing expressiveness with simplicity.
Interpreter-based execution
Instead of compiling code into machine instructions, GujjuScript executes programs through an interpreter.
Reason:
Interpreters are simpler to build for experimental languages and allow rapid iteration.
Tradeoff:
Interpreted execution is slower than compiled languages.
Custom language keywords
Gujarati-inspired keywords were introduced to replace traditional programming keywords.
Example:
- variable declarations
- conditionals
- loops
Reason:
Demonstrates that programming languages are simply abstractions built on grammar and semantics.
Tradeoff:
Non-English syntax can reduce familiarity for most developers.
Results
- Built a small interpreted programming language from scratch.
- Implemented a lexer and parser pipeline.
- Designed a custom grammar with Gujarati-inspired keywords.
- Published the language runtime as an npm package.
Takeaways
Building GujjuScript helped deepen my understanding of programming language internals.
Key lessons:
- Programming languages rely heavily on lexical analysis and parsing pipelines.
- Language design involves balancing grammar simplicity with expressiveness.
- Interpreters are a great way to experiment with language concepts.
- Even small language experiments can reveal how compilers and runtimes operate internally.