Paula Script
Namespaces | Classes | Functions | Variables
paula Namespace Reference

Namespaces

 core
 

Classes

class  Args
 Access callback arguments (e.g. value of "a" in "f(a)"). Set return value of the callback function, called from a script. More...
 
class  CharInput
 Input stream for constant strings. More...
 
class  FileInput
 Input stream for C++ std ifstream. More...
 
class  IInputStream
 Base class for input streams. More...
 
class  IOutputStream
 Base class for output. More...
 
class  NullPrint
 Dummy printer. Use to optimize out debug prints. More...
 
class  POut
 Base class for print output. More...
 
class  StandardInput
 Input stream for C++ std input. More...
 
class  STDErr
 Print output using C++ std err. More...
 
class  STDOut
 Print output using C++ std cout. More...
 
class  Var
 Access Paula script variable data. More...
 

Functions

void printVersion ()
 
const Error * run (const char *)
 Run a script and return error, or NO_ERROR, if everything went well. More...
 
const Error * run (IInputStream &)
 Run a script and return error, or NO_ERROR, if everything went well. More...
 
void runSafe (const char *)
 Run a script. If an error occurs, print the error. More...
 
void runSafe (IInputStream &)
 Run a script. If an error occurs, print the error. More...
 
Var get (const char *varName)
 Get a variable by name. Return 'empty' if the variable is not found. More...
 
const Error * addCallback (const char *name, const Error *(*_action)(Args &))
 Add a callback to call from a Paula script. More...
 

Variables

constexpr const char * PAULA_VERSION = "0.1"
 
constexpr INT NODE_UNDEFINED = 0xff000000
 
constexpr INT NODE_SUBTREE = 0x01000000
 
constexpr INT NODE_EXPR = 0x02000000
 
constexpr INT NODE_STATEMENT = 0x03000000
 
constexpr INT NODE_STACK = 0x05000000
 
constexpr INT NODE_MAP = 0x06000000
 
constexpr INT NODE_KV = 0x07000000
 
constexpr INT NODE_ANY_DATA = 0x20000000
 
constexpr INT NODE_NAME = 0x21000000
 
constexpr INT NODE_INTEGER = 0x22000000
 
constexpr INT NODE_DOUBLE = 0x23000000
 
constexpr INT NODE_TEXT = 0x24000000
 
constexpr INT NODE_BOOL = 0x25000000
 
constexpr INT NODE_VOID = 0x2f000000
 
constexpr INT NODE_OPERATOR = 0x31000000
 
constexpr INT TAG_MASK = 0xff000000
 
constexpr INT SIZE_MASK = 0x00ffffff
 

Function Documentation

◆ addCallback()

const Error* paula::addCallback ( const char *  name,
const Error *(*)(Args &)  _action 
)

Add a callback to call from a Paula script.

◆ get()

Var paula::get ( const char *  varName)

Get a variable by name. Return 'empty' if the variable is not found.

◆ printVersion()

void paula::printVersion ( )

◆ run() [1/2]

const Error* paula::run ( const char *  )

Run a script and return error, or NO_ERROR, if everything went well.

◆ run() [2/2]

const Error* paula::run ( IInputStream )

Run a script and return error, or NO_ERROR, if everything went well.

◆ runSafe() [1/2]

void paula::runSafe ( const char *  )

Run a script. If an error occurs, print the error.

◆ runSafe() [2/2]

void paula::runSafe ( IInputStream )

Run a script. If an error occurs, print the error.

Variable Documentation

◆ NODE_ANY_DATA

constexpr INT paula::NODE_ANY_DATA = 0x20000000

◆ NODE_BOOL

constexpr INT paula::NODE_BOOL = 0x25000000

◆ NODE_DOUBLE

constexpr INT paula::NODE_DOUBLE = 0x23000000

◆ NODE_EXPR

constexpr INT paula::NODE_EXPR = 0x02000000

◆ NODE_INTEGER

constexpr INT paula::NODE_INTEGER = 0x22000000

◆ NODE_KV

constexpr INT paula::NODE_KV = 0x07000000

◆ NODE_MAP

constexpr INT paula::NODE_MAP = 0x06000000

◆ NODE_NAME

constexpr INT paula::NODE_NAME = 0x21000000

◆ NODE_OPERATOR

constexpr INT paula::NODE_OPERATOR = 0x31000000

◆ NODE_STACK

constexpr INT paula::NODE_STACK = 0x05000000

◆ NODE_STATEMENT

constexpr INT paula::NODE_STATEMENT = 0x03000000

◆ NODE_SUBTREE

constexpr INT paula::NODE_SUBTREE = 0x01000000

◆ NODE_TEXT

constexpr INT paula::NODE_TEXT = 0x24000000

◆ NODE_UNDEFINED

constexpr INT paula::NODE_UNDEFINED = 0xff000000
constexpr

◆ NODE_VOID

constexpr INT paula::NODE_VOID = 0x2f000000

◆ PAULA_VERSION

constexpr const char* paula::PAULA_VERSION = "0.1"
constexpr

◆ SIZE_MASK

constexpr INT paula::SIZE_MASK = 0x00ffffff

◆ TAG_MASK

constexpr INT paula::TAG_MASK = 0xff000000