hobbes
a language, embedded compiler, and runtime for efficient dynamic expression evaluation, data storage and analysis
|
Classes | |
struct | Args |
struct | clearline |
struct | clearscr |
struct | eraseToEOL |
class | evaluator |
struct | movecursor |
struct | resetfmt |
struct | setbgc |
struct | setbold |
struct | setcursor |
struct | setfgc |
struct | setfont |
struct | setunderline |
class | WWWServer |
Typedefs | |
typedef unsigned char | color |
typedef std::vector< std::string > | ModuleFiles |
typedef std::pair< int, int > | PIO |
typedef std::pair< std::string, std::string > | CmdDesc |
typedef std::vector< CmdDesc > | CmdDescs |
typedef hobbes::array< char > | cstr |
typedef std::pair< const cstr *, const cstr * > | cstrpair |
Functions | |
DEFINE_STRUCT (ConsoleColors,(color, promptfg),(color, stdtextfg),(color, errorfg),(color, hlfg),(color, divfg),(color, evalfg),(color, unsweetfg),(color, typefg),(color, llvmfg),(color, instfg),(color, argdelimfg),(color, registerfg),(color, xnumfg),(color, xvalfg),(color, linenumfg),(color, linenumdelimfg),(color, evenlinebg),(color, oddlinebg)) | |
bool | extConsoleCmdsEnabled () |
void | sendCmd (std::ostream &out, char c) |
void | sendCmd (std::ostream &out, int n0, char c) |
void | sendCmd (std::ostream &out, int n0, int n1, char c) |
void | sendCmd (std::ostream &out, int n0, int n1, int n2, char c) |
std::ostream & | operator<< (std::ostream &lhs, const setbold &) |
std::ostream & | operator<< (std::ostream &lhs, const setunderline &) |
std::ostream & | operator<< (std::ostream &lhs, const setfont &f) |
std::ostream & | operator<< (std::ostream &lhs, const setfgc &c) |
std::ostream & | operator<< (std::ostream &lhs, const setbgc &c) |
std::ostream & | operator<< (std::ostream &lhs, const resetfmt &c) |
std::ostream & | operator<< (std::ostream &lhs, const clearscr &c) |
std::ostream & | operator<< (std::ostream &lhs, const setcursor &sc) |
std::ostream & | operator<< (std::ostream &lhs, const movecursor &mc) |
std::ostream & | operator<< (std::ostream &lhs, const eraseToEOL &) |
std::ostream & | operator<< (std::ostream &lhs, const clearline &) |
hobbes::array< char > * | allocGlobalStr (const char *x, size_t len) |
hobbes::array< char > * | allocGlobalStr (const std::string &x) |
void | bindArguments (hobbes::cc &ctx, const Args::NameVals &args) |
bool | hiddenFileName (const std::string &fname) |
bool | loadSilently (const std::string &mfile) |
void | printConstraint (const hobbes::ConstraintPtr &c) |
void | printQualType (const hobbes::Constraints &cs, const hobbes::MonoTypePtr &ty) |
void | writefile (const hobbes::array< char > *fname, const hobbes::array< char > *fdata) |
int | openfd (const hobbes::array< char > *fname, int flags) |
void | closefd (int fd) |
void | removefile (const hobbes::array< char > *fname) |
const hobbes::array< char > * | showTick (long x) |
void | enableConsoleCmds (bool f) |
const PIO * | pexec (const hobbes::array< char > *cmd) |
const hobbes::array< char > * | fdReadLine (int fd) |
const hobbes::array< char > * | runPath () |
void | bindHiDefs (hobbes::cc &c) |
void | setDefaultColorScheme () |
void | printAnnotatedText (const hobbes::LexicalAnnotation &la) |
void | printAnnotatedError (const hobbes::annotated_error &ae) |
void | printASM (void *, size_t) |
void | showShellHelp (const CmdDescs &cds) |
void | showShellHelp () |
std::string | prompttext () |
char * | completionStep (const char *pfx, int state) |
char ** | completions (const char *pfx, int start, int end) |
void | evalLine (char *) |
void | repl (evaluator *ev) |
std::string | saveData (void *, size_t) |
void | runProcess (const std::string &, std::ostream &) |
unsigned int | digitLen (unsigned int x) |
template<typename C > | |
unsigned int | sumSize (const C &cs) |
bool | isNum (const std::string &x) |
bool | isRegister (const std::string &x) |
void | printASMArg (const std::string &x) |
unsigned int | fmtLen (const str::seq &args) |
void | printASMTable (const str::seq &insts, const str::seqs &args, unsigned int maxlen) |
void | write (int fd, const char *s) |
void | write (int fd, const std::string &s) |
bool | fileExists (const std::string &x) |
std::string | readLink (const std::string &path) |
std::string | exeDir () |
bool | catPathToFSPath (const std::string &cat, const std::string &cpath, std::string *fsPath) |
bool | sysPathToFSPath (const std::string &sysPath, std::string *fsPath) |
bool | urlPathToFSPath (const std::string &urlPath, std::string *fsPath) |
void | translateHxpFile (std::istream &in, std::ostream &out) |
time_t | lastModification (const std::string &fpath) |
const cstr * | linkTarget (const cstr *p) |
const cstr * | slurpFile (const cstr *fpath) |
const hobbes::array< const cstr *> * | csplit (const cstr *s, const cstr *ss) |
long | unixTime () |
const cstr * | formatJSTime (long x) |
const cstr * | jsEscape (const cstr *x) |
std::string | urlDecode (const std::string &x) |
std::string | htmlEncode (const std::string &x) |
std::string | showType (hobbes::cc &c, const hobbes::QualTypePtr &t) |
void | print404 (int fd, const std::string &fpath) |
Variables | |
ConsoleColors | colors |
bool | consoleCmdsEnabled = true |
evaluator * | eval = 0 |
str::seq | completionMatches |
typedef std::pair<std::string, std::string> hi::CmdDesc |
typedef std::vector<CmdDesc> hi::CmdDescs |
typedef unsigned char hi::color |
typedef hobbes::array<char> hi::cstr |
typedef std::pair<const cstr*, const cstr*> hi::cstrpair |
typedef std::vector<std::string> hi::ModuleFiles |
typedef std::pair<int, int> hi::PIO |
hobbes::array<char>* hi::allocGlobalStr | ( | const char * | x, |
size_t | len | ||
) |
hobbes::array<char>* hi::allocGlobalStr | ( | const std::string & | x | ) |
void hi::bindArguments | ( | hobbes::cc & | ctx, |
const Args::NameVals & | args | ||
) |
void hi::bindHiDefs | ( | hobbes::cc & | c | ) |
bool hi::catPathToFSPath | ( | const std::string & | cat, |
const std::string & | cpath, | ||
std::string * | fsPath | ||
) |
void hi::closefd | ( | int | fd | ) |
char** hi::completions | ( | const char * | pfx, |
int | start, | ||
int | end | ||
) |
char* hi::completionStep | ( | const char * | pfx, |
int | state | ||
) |
const hobbes::array< const cstr* >* hi::csplit | ( | const cstr * | s, |
const cstr * | ss | ||
) |
hi::DEFINE_STRUCT | ( | ConsoleColors | , |
(color, promptfg) | , | ||
(color, stdtextfg) | , | ||
(color, errorfg) | , | ||
(color, hlfg) | , | ||
(color, divfg) | , | ||
(color, evalfg) | , | ||
(color, unsweetfg) | , | ||
(color, typefg) | , | ||
(color, llvmfg) | , | ||
(color, instfg) | , | ||
(color, argdelimfg) | , | ||
(color, registerfg) | , | ||
(color, xnumfg) | , | ||
(color, xvalfg) | , | ||
(color, linenumfg) | , | ||
(color, linenumdelimfg) | , | ||
(color, evenlinebg) | , | ||
(color, oddlinebg) | |||
) |
unsigned int hi::digitLen | ( | unsigned int | x | ) |
void hi::enableConsoleCmds | ( | bool | f | ) |
void hi::evalLine | ( | char * | x | ) |
std::string hi::exeDir | ( | ) |
bool hi::extConsoleCmdsEnabled | ( | ) |
const hobbes::array<char>* hi::fdReadLine | ( | int | fd | ) |
bool hi::fileExists | ( | const std::string & | x | ) |
unsigned int hi::fmtLen | ( | const str::seq & | args | ) |
const cstr* hi::formatJSTime | ( | long | x | ) |
bool hi::hiddenFileName | ( | const std::string & | fname | ) |
std::string hi::htmlEncode | ( | const std::string & | x | ) |
bool hi::isNum | ( | const std::string & | x | ) |
bool hi::isRegister | ( | const std::string & | x | ) |
time_t hi::lastModification | ( | const std::string & | fpath | ) |
bool hi::loadSilently | ( | const std::string & | mfile | ) |
int hi::openfd | ( | const hobbes::array< char > * | fname, |
int | flags | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
const PIO* hi::pexec | ( | const hobbes::array< char > * | cmd | ) |
void hi::print404 | ( | int | fd, |
const std::string & | fpath | ||
) |
void hi::printAnnotatedError | ( | const hobbes::annotated_error & | ae | ) |
void hi::printAnnotatedText | ( | const hobbes::LexicalAnnotation & | la | ) |
void hi::printASM | ( | void * | p, |
size_t | len | ||
) |
void hi::printASMArg | ( | const std::string & | x | ) |
void hi::printConstraint | ( | const hobbes::ConstraintPtr & | c | ) |
void hi::printQualType | ( | const hobbes::Constraints & | cs, |
const hobbes::MonoTypePtr & | ty | ||
) |
std::string hi::prompttext | ( | ) |
std::string hi::readLink | ( | const std::string & | path | ) |
void hi::removefile | ( | const hobbes::array< char > * | fname | ) |
void hi::repl | ( | evaluator * | ev | ) |
const hobbes::array<char>* hi::runPath | ( | ) |
void hi::runProcess | ( | const std::string & | cmd, |
std::ostream & | out | ||
) |
std::string hi::saveData | ( | void * | d, |
size_t | sz | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
void hi::setDefaultColorScheme | ( | ) |
void hi::showShellHelp | ( | const CmdDescs & | cds | ) |
void hi::showShellHelp | ( | ) |
const hobbes::array<char>* hi::showTick | ( | long | x | ) |
std::string hi::showType | ( | hobbes::cc & | c, |
const hobbes::QualTypePtr & | t | ||
) |
unsigned int hi::sumSize | ( | const C & | cs | ) |
bool hi::sysPathToFSPath | ( | const std::string & | sysPath, |
std::string * | fsPath | ||
) |
void hi::translateHxpFile | ( | std::istream & | in, |
std::ostream & | out | ||
) |
long hi::unixTime | ( | ) |
std::string hi::urlDecode | ( | const std::string & | x | ) |
bool hi::urlPathToFSPath | ( | const std::string & | urlPath, |
std::string * | fsPath | ||
) |
void hi::write | ( | int | fd, |
const char * | s | ||
) |
void hi::write | ( | int | fd, |
const std::string & | s | ||
) |
void hi::writefile | ( | const hobbes::array< char > * | fname, |
const hobbes::array< char > * | fdata | ||
) |
ConsoleColors hi::colors |
str::seq hi::completionMatches |
bool hi::consoleCmdsEnabled = true |
evaluator* hi::eval = 0 |