Fizz is a beginner-friendly programming language designed specifically for children aged 7-12. It removes common barriers like indentation sensitivity and cryptic syntax, replacing them with natural English-like commands that read like stories.
- Cognitive load > Syntax purity - Every rule must earn its place
- Programs read like stories - Kids understand sequences naturally
- Visual structure > invisible rules - No hidden indentation
- Errors should teach - Friendly, conversational error messages
- Immediate reward - First program runs in under 60 seconds
- No indentation requirements - Blocks use explicit
endkeywords - English-like syntax -
put 5 into scoreinstead ofscore = 5 - Conversational errors - Helpful messages that guide learning
- Built-in fun - Commands like
say,wait,play sound
say "Hello, world!"
put 10 into score
repeat 3 times
say "Jump!"
end
if score > 5
say "You win!"
otherwise
say "Try again!"
end
how to greet name
say "Hello " + name
end
greet "Alex"
kids-lang/
├── src/ # Source code
│ ├── lexer/ # Tokenization (breaking text into words/symbols)
│ ├── parser/ # Parsing (building program structure)
│ ├── ast/ # Abstract Syntax Tree (program representation)
│ ├── interpreter/ # Execution engine
│ └── main.cpp # Entry point
├── include/ # Header files
├── tests/ # Test programs
├── examples/ # Example Fizz programs
└── docs/ # Documentation
This project is designed to teach:
- C++ Programming - Modern C++17 features
- Compiler Design - Lexer, Parser, AST, Interpreter
- Language Design - Making syntax decisions that matter
Breaking source code into meaningful chunks (tokens)
- Keywords:
say,put,if,repeat,end - Identifiers: variable names
- Literals: numbers, strings
- Operators:
+,-,>,<
Building a tree structure from tokens
- Understanding grammar rules
- Creating Abstract Syntax Tree (AST)
- Handling syntax errors
Representing the program structure
- Expression nodes
- Statement nodes
- Function definitions
Executing the program
- Variable storage (environment)
- Expression evaluation
- Control flow (if, loops)
- Function calls
- C++17 compatible compiler (GCC, Clang, or MSVC)
- CMake (optional, for build system)
# Coming soon - we'll add build instructions as we go# Coming soon
fizz my_program.fizzSee LANGUAGE_SPEC.md for complete grammar and syntax.
Check the examples/ folder for:
hello.fizz- Your first programcounter.fizz- Variables and loopsfunctions.fizz- Teaching the computer tricksgame.fizz- A simple game
- Language design & specification
- Lexer implementation
- Parser implementation
- AST definition
- Basic interpreter
- Error handling
- Standard library (say, wait, etc.)
- File I/O
- Advanced features (lists, more functions)
This is a learning project! Contributions, suggestions, and feedback welcome.
MIT License - Learn, share, and have fun!
Built with ❤️ for curious young minds