Skip to content

Latest commit

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

🐱 PurrScript

A programming language that speaks cat.

PurrScript is a transpiler that translates cat commands into Python. No more boring print(), only meow(). No more True, only treat.


⚙️ Installation

Requirements

  • Python 3.6+

Quick Install

git clone https://github.com/FelineFantasy/PurrScript
cd PurrScript
python purrscript.py install

After installation, run .purr files from anywhere:

purr hello.purr

🧪 Example

  1. Create a file named hello.purr:

    MR
    treat
    meow("Привет, я кот!")
    PR
    
  2. Run the script:

    purr hello.purr
  3. Expected output:

    Привет, я кот!
    

📦 Commands Reference

PurrScriptPythonDescription
MR# program startedEntry point
PR# program finishedExit point
treattreat = TrueDefault variable
meow(...)print(...)Output
beg(...)input(...)Input
sniffifConditional
peerelifConditional
other_pawelseConditional
and_pawandLogical AND
or_paworLogical OR
not_pawnotLogical NOT
napdefFunction definition
boxclassClass definition
bringreturnReturn statement
huntwhileLoop
zoomforLoop
hissbreakBreak loop
gimmeimportImport module
out_offromImport from
with_blanketwithContext manager
as_pawasAlias
yowlraiseRaise exception
purr(...)str(...)String cast
bite(...)int(...)Integer cast
lick(...)float(...)Float cast
mood(...)bool(...)Boolean cast
tail(...)list(...)List creation
basket(...)tuple(...)Tuple creation
clowder(...)set(...)Set creation
scent(...)dict(...)Dictionary creation
void_boxNoneNone type
claw(...)open(...)Open file
scratch(...)write(...)Write to file
sniff_file(...)read(...)Read file
close_door(...)close(...)Close file
hiss_errortryTry block
catch_mouseexceptExcept block
finally_napfinallyFinally block
YESTrueBoolean True
NOFalseBoolean False

⚠️ Custom Errors

  • 🚨 EntryThresholdNotFound — missing MR at the beginning of the file.
  • 🚨 ExitDoorAjar — missing PR at the end of the file.
  • 🚨 NoSnacksError — missing required treat declaration.

💖 Support the Project

If you enjoy PurrScript and want to help keep the project alive, you can support me here:

DonationAlerts

Your support helps me:

  • 🐱 Add new cat commands
  • 🛠️ Fix bugs and improve the transpiler
  • ☕ Stay awake while coding at 4 AM

Every little bit is appreciated! ❤️


👤 Author

  • FelineFantasy
  • License: MIT

About

A cat-themed programming language that transpiles to Python.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages