✅ Variables with Latin declensions (nominative, accusative, dative, ablative, vocative, genitive) ✅ Roman numeral support (I-MMMM) ✅ String handling with 5 operations (startswith, endswith, contains, indexof, equals) ✅ Automatic declension based on word endings (-US, -A, -VM/-UM, -OR, -IO) ✅ No-whitespace parsing with Latin morphology ✅ Structs/Objects with genitive case for field access
✅ Conditional statements (SI, ALITER, FINIS) ✅ Loops (DUM, FINIS) ✅ Proper block depth tracking for nested structures
✅ Struct/object creation using genitive case ✅ Field assignment (FIELDGENITIVE EST VALUE) ✅ Field access for reading (SCRIBEFIELDGENITIVE) ✅ Automatic object initialization as dictionary/struct
✅ Addition (ADDE - with accusative + dative) ✅ Subtraction (DEME - with accusative + ablative) ✅ Multiplication (MVLTIPLICA) ✅ Division (DVCE - with automatic division by zero exception) ✅ Comparison operators (AEQUAT, MAIVS, MINOR)
✅ Function definition (FAC - with nominative + dative parameters) ✅ Function calls (VOCA - with accusative arguments) ✅ Return values (REDDO - with accusative) ✅ Proper scope and call stack management
✅ Output (SCRIBE - with accusative) ✅ User input (LEGO - with automatic type detection) ✅ Debug output (AVDI - with [DEBUG] prefix) ✅ Log output (NOTA - with [LOG] prefix)
✅ Manual exceptions (IACE - with vocative case) ✅ Exception handlers (CAPE - with vocative case) ✅ Automatic exceptions (division by zero throws ERROR) ✅ Stack-based handler mechanism ✅ Proper cleanup and program termination after handling
SCRIBE"Salve Munde!"
SITNUMERUS
SITPRIMUS
NUMERUSESTX
PRIMUSESTV
NUMERUSESTADDEPRIMUMNUMERO
SCRIBENUMERUM
SITNUMERUS
NUMERUSESTX
SINUMERUSMAIVSI
SCRIBE"Magnus!"
FINIS
SITNUMERUS
NUMERUSESTX
DUMNUMERUSMAIVSI
SCRIBENUMERUM
NUMERUSESTDEMENUMERUM
FINIS
SITX
SITY
SITSUMMA
FACADDITORXYDATIVOYADDEDATIVOYSUMMAE
REDDOSUMMAM
FINIS
XESTX
YESTV
SUMMAESTVOCAADDITOREMXY
SCRIBESUMMA
SITERROR
CAPEERROR
NOTA"Caught error!"
FINIS
IACEERROR"Something wrong"
SITSERVUS
SITNOMEN
SITAETAS
NOMENSERVIIEST"Marcus"
NUMERUSESTXXX
AETASSERVIIESTNUMERUS
SCRIBENOMENSERVII
SCRIBEAETASSERVII
Working psychotherapy chatbot using string operations and loops!
latin.py- Main interpreter (1246 lines)README.md- Complete documentationexamples/- 19 example programs:- hello.lat
- addition.lat
- conditional.lat
- else.lat
- multiply.lat
- comparison.lat
- loop.lat
- countdown.lat
- strings.lat
- string_ops.lat
- input.lat
- calculator.lat
- greeting.lat
- eliza.lat
- function.lat
- logging.lat
- exception_simple.lat
- exceptions.lat
- division_by_zero.lat
- struct.lat
- 27 keywords
- 6 Latin cases fully implemented (including genitive for struct field access)
- 5 string operations
- 5 string operations
- 5 arithmetic operations
- 3 comparison operators
- 2 debug/logging keywords
- 2 exception handling keywords
- Automatic declension for -US, -A, -VM/-UM, -OR, -IO endings
✅ All basic features tested
✅ All control flow tested
✅ All arithmetic operations tested
✅ Function definition and calling tested
✅ Exception handling tested (manual and automatic)
✅ Debug/logging tested
✅ String operations tested
✅ User input tested
✅ ELIZA chatbot working
✅ Struct/object field access tested
- Program execution stops after exception handling (no try/catch/finally pattern)
- Exception handlers only catch one exception before terminating
- No nested exception handling
- No custom exception types beyond those declared with SIT
- Field access with direct Roman numerals can have parsing ambiguities (use intermediate variables)
- Division by zero only throws exception if CAPEERROR handler exists
- Multiple exception handlers in sequence
- Resume execution after exception handling
- Try/catch/finally pattern
- More exception types
- Exception re-throwing
- Custom exception messages accessible in handlers