Zeta is a programming language that emphasizes readability with English-like syntax while supporting fundamental programming constructs.
- Numbers: Integers (e.g.,
2,3) and decimals (e.g.,3.14,10.5). The lexer differentiates between integer and decimal tokens. - Strings & Characters: Enclosed in curly braces
{}(e.g.,{Hello, World!}). Differentiation is based on length.
- Local & Global Variables: Defined using
localorglobalkeywords.local x is 5 global y is 2.5
- Input:
ask x→ Requests user input. - Output:
tell {Hello World}→ Prints a message.
Supports basic arithmetic operations:
+(Addition)-(Subtraction)*(Multiplication)/(Division)^(Exponentiation)%(Modulus)
- Variables can be initialized or updated with expressions:
x is 2 * 3 + 6 x is now y + 2 / 52
- Assignment:
iskeyword - Update:
nowkeywordx is 5 x is now 20
<< This is a sample Zeta program
that calculates the area of a circle >>
global pi is 3.14
local radius is 0
< This line asks the user to input value of radius >
ask radius
area is 2 * pi * radius
< This line outputs the circle's area >
tell {Area of circle is} area
The Zeta Compiler Toolkit is a Java-based compiler frontend that includes lexical analysis, symbol table management, and regular expression processing using NFA/DFA automata.
- Tokenization with priority-based matching
- Supports numbers (integers/decimals), strings, comments, operators
- Handles whitespace and nested comments
- Scope-aware variable tracking (global/local)
- Constant flagging and value updates
- Regex-to-NFA conversion
- NFA-to-DFA subset construction
- Basic pattern matching
- State transition system
- ε-closure calculations
- Transition table visualization
- Java JDK 17+
- Maven 3.8+
mvn clean package🚀 Happy Coding with Zeta! ✨