PoetryAugmentedProgramming HomePage PageList

Poetry Augmented Programming is a complete redesign and overhaul of the concept of Fiction Augmented Programming(a very useless programming language I (Brett) created in high school). Basically, the words of each line of a poem encode in the number of vowels in each word, the opcodes of the instructions of an assembly-like language. It's called poetry augmented programming because the poetry is just an encoding of the program.

Features
Stack
Heap
8 registers (6 variable, 1 zero, 1 one)
Jump statement
Branch statements
Math statements

Commands
(1) Stack
   (1) Pop
   (2) Push <register>
   (3) Copy <register>
   (4) Push <value>
   (5) Push - heap location on top of stack (pops location)
   (6) Copy - heap location on top of stack, value to copy underneath it  (pops location and value)
(2) Register Math - result is placed on top of stack
   (1) Add <src1> <src2>
   (2) Sub <src1> <src2>
   (3) Mult <src1> <src2>
   (4) Div <src1> <src2>
(3) Branch - jumps to location on top of stack then pops
   (1) BNE <reg1> <reg2>
   (2) BLE <reg1> <reg2>
   (3) BGE <reg1> <reg2>
(4) I/O
   (1) Print_char - prints top of stack as character then pops
   (2) Print_val - prints top of stack as number then pops
   (3) Read_char - reads char and places it on top of stack (as value)
(5) JMP - jumps to loc on top of stack then pops

Syntax
Each line encodes in the number of vowels in the words (in sequence), the OPCODE, FUNCTION, and ARGS of the desired instruction. Only one instruction is allowed per line. Extra words are discarded as comments.

The interpreter will also take plain numerical instructions, unless otherwise specified on the command line

Download
Requires Lua 5.1 to run.

  pap_1_1.tar.bz2

The "IDE", and script to generate it.
  pap_ide.tar.bz2

A script to generate random encodings of numeric PAP source files.
Not recommended for production code. Probably buggy...
Requires the IDE files to be in the same directory.
  r_encode.lua

Powered by Pawfaliki v0.5.2