The ELIZA program now works correctly! Try these test inputs:
python3 latin.py examples/eliza.latTest interactions:
- Type
sum tristis→ responds "Cur tristis es?" (Why are you sad?) - Type
sum felix→ responds "Gaudeo!" (I rejoice!) - Type
mater mea→ responds "Dic mihi de matre tua." (Tell me about your mother.) - Type
pater meus→ responds "Quomodo pater tuus te afficit?" (How does your father affect you?) - Type
cur hoc?→ responds "Cur putas?" (Why do you think?) - Type
volo dormire→ responds "Quid accideret si id haberes?" (What would happen if you had it?) - Type
VALE→ exits with "Vale! Cura ut valeas." (Farewell! Take care!)
The program now correctly:
- Loops continuously until VALE is typed
- Checks all keywords on each iteration
- Multiple keywords can match (e.g., "mater et pater")
- FINIS correctly distinguishes between SI blocks and DUM loops using depth tracking