A esolang that doesnt use any tokens or parser
Project description
Cerona is an unconventional esoteric programming language that takes a radical approach to language implementation: no parser, no lexer, no AST. Instead, it interprets code directly through string manipulation and token evaluation, making it a truly minimalist and experimental language.
Philosophy
Most programming languages follow a traditional architecture:
-
Lexer → tokenizes source code
-
Parser → builds an Abstract Syntax Tree (AST)
-
Interpreter/Compiler → executes the AST
Cerona throws this out the window. It reads your code as raw text, splits it into tokens on-the-fly, and executes commands immediately. This makes Cerona simultaneously primitive and fascinating — a language that lives on the edge between structured programming and pure text processing.
Features
✨ Zero traditional compilation phases — no lexer, parser, or AST
🔄 Dynamic variable system — variables are resolved at runtime
🧱 Experimental OOP — define classes and methods with class and new
🎯 Inline conditionals — if statements with then syntax
🔁 Loops — while and for constructs
📦 Functions — define and call user functions with parameters
💬 String handling — quote-aware parsing with escape sequences
🧮 Expression evaluation — arithmetic and logic through Python’s eval
Installation
pip install cerona
Or from source:
git clone https://github.com/dreamingcuriosity/cerona-lang.git cd cerona-lang pip install -e .
Usage
Create a .cerona file:
set x 10 set y 20 set sum x + y print sum
if x less y then print "x is smaller"
set name "World" print "Hello" name
Run it:
python -m cerona.main your_file.cerona
Syntax Guide
Variables
set variable_name value set x 42 set message "Hello, Cerona!" set result x + 10
Variables are dynamically typed and evaluated using Python expressions (sandboxed).
Printing
print value1 value2 value3 print x print "The answer is" answer
Conditionals
if x equals 10 then print "x is ten" if count greater 5 then set flag "active"
Supported operators: equals, notequals, greater, less, greaterequals, lessequals, contains, in
Functions
func add a b set result a + b print result endfunc
call add 5 10
Classes (Experimental OOP)
Cerona now has experimental class and object support — a very early form of object-oriented programming.
class Counter set count 0
func init initial
set count initial
endfunc
func increment
set count count + 1
endfunc
func get_value
print count
endfunc
endclass
Create instances
new Counter c1 0 new Counter c2 10
Use methods
call c1.increment call c1.increment call c1.get_value # prints 2 call c2.get_value # prints 10
⚠️ Note: OOP in Cerona is experimental. Attributes and method scopes work, but expression evaluation inside methods is limited — for instance, set count count + 2 may print literally as count + 2 instead of computing it.
You are, in effect, exploring the language while it’s still learning to be one.
Loops
set i 0 while i less 5 print i set i i + 1 endwhile
Input
input username "Enter your name: " print "Hello" username
How It Works — The Anti-Architecture
Cerona’s execution model is refreshingly simple:
-
Read the source as plain text
-
Split lines and tokenize dynamically
-
Execute each command immediately by pattern matching
-
Resolve variables at runtime
-
Repeat until end of file
No intermediate structures. No abstract syntax trees. Just direct interpretation.
Why Cerona?
Cerona is a love letter to absurd simplicity — an experiment in how little a language can have and still function. It’s not about performance or design purity; it’s about exploring the raw boundary between structure and chaos in language execution.
Perfect for:
🧠 Understanding how interpreters usually work — by omitting half the steps
🎨 Esolang enthusiasts
🧪 Experimental programmers
🤔 People who enjoy asking “What happens if I remove the parser?”
Limitations (By Design)
🧩 No complex parsing — nested expressions are fragile
💥 Limited error handling — expect cryptic messages
🌀 Dynamic everything — no type safety whatsoever
🧱 OOP quirks — expression evaluation in methods may not behave as expected
⚙️ Eval-based arithmetic — runs in a sandbox, but still limited
These aren’t bugs — they’re Cerona’s identity.
Contributing
Pull requests, bug reports, and philosophical arguments about “what even is a language” are all welcome.
"Why parse when you can just... not?" — The Cerona Philosophy
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cerona-0.4.0.tar.gz.
File metadata
- Download URL: cerona-0.4.0.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.12.1.2 requests/2.32.5 setuptools/80.9.0 requests-toolbelt/1.0.0 tqdm/4.67.1 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdb9d9b79d720c07c4a05bc4c36835fbd50c5c9e5c78393b70d54a1bb04c51de
|
|
| MD5 |
7ad5e4d0cf2c147309f55ff95bf50235
|
|
| BLAKE2b-256 |
07b685ab02859357f44a3a675f3c734cc3ada51f2db0f1861c116e0ad00e32ab
|
File details
Details for the file cerona-0.4.0-py3-none-any.whl.
File metadata
- Download URL: cerona-0.4.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.12.1.2 requests/2.32.5 setuptools/80.9.0 requests-toolbelt/1.0.0 tqdm/4.67.1 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e8bd39626a1aa9877db12132f83858c309db813ca4a1db6512e06dc6df12fa5
|
|
| MD5 |
0455ddbe03bfe98e0c59cf58fa35045d
|
|
| BLAKE2b-256 |
fa4ca8a8ecd6647573a7d57b29f1cd5a279bc5e5044fd16ce00f4e8971eba7ac
|