diff options
author | bloodstalker <thabogre@gmail.com> | 2019-08-30 10:55:29 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2019-08-30 10:55:29 +0000 |
commit | f11aa701c6f0a39ee1d908ae1972ce85422bc2f3 (patch) | |
tree | 80401360a4bc6932232c65ffc08320f2d8a43311 /bruiser | |
parent | do not pull this commit [ci skip] (diff) | |
download | mutator-f11aa701c6f0a39ee1d908ae1972ce85422bc2f3.tar.gz mutator-f11aa701c6f0a39ee1d908ae1972ce85422bc2f3.zip |
updated the completion and hint for bruiser. its using a fork of linenoise now. i will add lua context-sensetive completions later.
Diffstat (limited to '')
-rw-r--r-- | bruiser/CompletionHints.h | 233 | ||||
-rw-r--r-- | bruiser/bruiser-extra.h | 58 | ||||
-rw-r--r-- | bruiser/bruiser.cpp | 3 | ||||
-rw-r--r-- | bruiser/completions.h | 238 | ||||
m--------- | bruiser/linenoise | 0 | ||||
-rw-r--r-- | bruiser/makefile | 4 |
6 files changed, 241 insertions, 295 deletions
diff --git a/bruiser/CompletionHints.h b/bruiser/CompletionHints.h index 953e9b1..44d271f 100644 --- a/bruiser/CompletionHints.h +++ b/bruiser/CompletionHints.h @@ -46,239 +46,6 @@ typedef struct{ void shell_completion(const char* buf, linenoiseCompletions* lc, size_t pos); char* shell_hint(const char* buf, int* color, int* bold); - -char* LUA_FUNCS[] = - { - "help()", - "quit()", - "exit()", - "history()", - "version()", - "clear()", - "m0()", - "Funcs()", - "Vars()", - "Arrays()", - "Structs()", - "Unions()", - "Classes()", - "hijackmain()", - "make", - "historysize", - "showsource", - "readxmlfile", - "extractmutagen", - "strainrecognition()", - "setmakepath", - "run", - "setbinpath", - "getbinpath()", - "getmakepath()", - "getsourcefiles()", - "getpaths()", - "changedirectory", - "yolo", - "pwd()", - "objload()", - "listObjects", - "xobjregister", - "xobjwrapper", - "xcall(", - "xobjlist()", - "xallocglobal(", - "xallocallglobals()", - "getjmptable(", - "freejmptable(", - "dumpjmptable(", - "ramdump(", - "xsize()", - "xclear()", - "xmemusage()", - "getwasmobj(", - "_G", - "_VERSION", - "assert", - "collectgarbage", - "dofile", - "error", - "getmetatable", - "ipairs", - "load", - "loadfile", - "next", - "pairs", - "pcall", - "print", - "rawequal", - "rawget", - "rawlen", - "rawset", - "require", - "select", - "setmetatable", - "tonumber", - "tostring", - "type", - "xpcall", - "coroutine", - "coroutine.create", - "coroutine.isyieldable", - "coroutine.resume", - "coroutine.running", - "coroutine.status", - "coroutine.wrap", - "coroutine.yield", - "debug", - "debug.debug", - "debug.gethook", - "debug.getinfo", - "debug.getlocal", - "debug.getmetatable", - "debug.getregistry", - "debug.getupvalue", - "debug.getuservalue", - "debug.sethook", - "debug.setlocal", - "debug.setmetatable", - "debug.setupvalue", - "debug.setuservalue", - "debug.traceback", - "debug.upvalueid", - "debug.upvaluejoin", - "io", - "io.close", - "io.flush", - "io.input", - "io.lines", - "io.open", - "io.output", - "io.popen", - "io.read", - "io.stderr", - "io.stdin", - "io.stdout", - "io.tmpfile", - "io.type", - "io.write", - "file:close", - "file:flush", - "file:lines", - "file:read", - "file:seek", - "file:setvbuf", - "file:write", - "math", - "math.abs", - "math.acos", - "math.asin", - "math.atan", - "math.ceil", - "math.cos", - "math.deg", - "math.exp", - "math.floor", - "math.fmod", - "math.huge", - "math.log", - "math.max", - "math.maxinteger", - "math.min", - "math.mininteger", - "math.modf", - "math.pi", - "math.rad", - "math.random", - "math.randomseed", - "math.sin", - "math.sqrt", - "math.tan", - "math.tointeger", - "math.type", - "math.ult", - "os", - "os.clock", - "os.date", - "os.difftime", - "os.execute", - "os.exit", - "os.getenv", - "os.remove", - "os.rename", - "os.setlocale", - "os.time", - "os.tmpname", - "package", - "package.config", - "package.cpath", - "package.loaded", - "package.loadlib", - "package.path", - "package.preload", - "package.searchers", - "package.searchpath", - "string", - "string.byte", - "string.char", - "string.dump", - "string.find", - "string.format", - "string.gmatch", - "string.gsub", - "string.len", - "string.lower", - "string.match", - "string.pack", - "string.packsize", - "string.rep", - "string.reverse", - "string.sub", - "string.unpack", - "string.upper", - "table", - "table.concat", - "table.insert", - "table.move", - "table.pack", - "table.remove", - "table.sort", - "table.unpack", - "utf8", - "utf8.char", - "utf8.charpattern", - "utf8.codepoint", - "utf8.codes", - "utf8.len", - "utf8.offset", - "LUA_CPATH", - "LUA_CPATH_5_3", - "LUA_INIT", - "LUA_INIT_5_3", - "LUA_PATH", - "LUA_PATH_5_3", - "and", - "break", - "do", - "else", - "elseif", - "end", - "false", - "for", - "function", - "if", - "in", - "local", - "nil", - "not", - "or", - "repeat", - "return", - "then", - "true", - "until", - "while" -}; - -char ID_BREAKERS[] = {'{','}','[',']','(',')','+','=','-','.','*','/','\t',' ','.','<','>','|','?','&', '"', '\''}; /**********************************************************************************************************************/ #ifdef __cplusplus } diff --git a/bruiser/bruiser-extra.h b/bruiser/bruiser-extra.h index 285eeb3..496a71c 100644 --- a/bruiser/bruiser-extra.h +++ b/bruiser/bruiser-extra.h @@ -33,64 +33,6 @@ struct SigNames int Signal; char *SigName; }; - -#if 0 -std::vector<SigNames> SignalNames = -{ - {SIGHUP, (char*)"SIGHUP"}, - {SIGINT, (char*)"SIGINT"}, - {SIGQUIT, (char*)"SIGQUIT"}, - {SIGILL, (char*)"SIGILL"}, - {SIGTRAP, (char*)"SIGTRAP"}, - {SIGABRT, (char*)"SIGABRT"}, - {SIGIOT, (char*)"SIGIOT"}, - {SIGBUS, (char*)"SIGBUS"}, - {SIGFPE, (char*)"SIGFPE"}, - {SIGKILL, (char*)"SIGKILL"}, - {SIGUSR1, (char*)"SIGUSR1"}, - {SIGSEGV, (char*)"SIGSEGV"}, - {SIGUSR2, (char*)"SIGUSR2"}, - {SIGPIPE, (char*)"SIGPIPE"}, - {SIGALRM, (char*)"SIGALRM"}, - {SIGTERM, (char*)"SIGTERM"}, - {SIGSTKFLT, (char*)"SIGSTKFLT"}, - {SIGCHLD, (char*)"SIGCHLD"}, - {SIGCONT, (char*)"SIGCONT"}, - {SIGSTOP, (char*)"SIGSTOP"}, - {SIGTSTP, (char*)"SIGTSTP"}, - {SIGTTIN, (char*)"SIGTTIN"}, - {SIGTTOU, (char*)"SIGTTOU"}, - {SIGURG, (char*)"SIGURG"}, - {SIGXCPU, (char*)"SIGXCPU"}, - {SIGXFSZ, (char*)"SIGXFSZ"}, - {SIGVTALRM, (char*)"SIGVTALRM"}, - {SIGPROF, (char*)"SIGPROF"}, - {SIGWINCH, (char*)"SIGWINCH"}, - {SIGIO, (char*)"SIGIO"} -}; -#endif - -std::vector<std::string> BRUISR_COMMANDS = -{ - "help", - "quit", - "exit", - "list", - "list vars", - "list funcs", - "list structs", - "list classes", - "list unions", - "list records", - "history", - "shell", - "version", - "clear", - "hijack", - "hijack main", - "m0" -}; - /**********************************************************************************************************************/ #endif /*last line intentionally left balnk*/ diff --git a/bruiser/bruiser.cpp b/bruiser/bruiser.cpp index 7493372..440e72c 100644 --- a/bruiser/bruiser.cpp +++ b/bruiser/bruiser.cpp @@ -220,8 +220,7 @@ std::vector<T> getLuaTableNumber(lua_State* __ls, int numargs, int argnum) { return ret; } /**********************************************************************************************************************/ -class LuaEngine -{ +class LuaEngine { public: LuaEngine() { LS = luaL_newstate(); diff --git a/bruiser/completions.h b/bruiser/completions.h new file mode 100644 index 0000000..024f593 --- /dev/null +++ b/bruiser/completions.h @@ -0,0 +1,238 @@ + +#ifndef COMPLETIONS_H_ +#define COMPLETIONS_H_ + + +char* LUA_FUNCS[] = { + "help()", + "quit()", + "exit()", + "history()", + "version()", + "clear()", + "m0()", + "Funcs()", + "Vars()", + "Arrays()", + "Structs()", + "Unions()", + "Classes()", + "hijackmain()", + "make", + "historysize", + "showsource", + "readxmlfile", + "extractmutagen", + "strainrecognition()", + "setmakepath", + "run", + "setbinpath", + "getbinpath()", + "getmakepath()", + "getsourcefiles()", + "getpaths()", + "changedirectory", + "yolo", + "pwd()", + "objload()", + "listObjects", + "xobjregister", + "xobjwrapper", + "xcall(", + "xobjlist()", + "xallocglobal(", + "xallocallglobals()", + "getjmptable(", + "freejmptable(", + "dumpjmptable(", + "ramdump(", + "xsize()", + "xclear()", + "xmemusage()", + "getwasmobj(", + "_G", + "_VERSION", + "assert", + "collectgarbage", + "dofile", + "error", + "getmetatable", + "ipairs", + "load", + "loadfile", + "next", + "pairs", + "pcall", + "print", + "rawequal", + "rawget", + "rawlen", + "rawset", + "require", + "select", + "setmetatable", + "tonumber", + "tostring", + "type", + "xpcall", + "coroutine", + "coroutine.create", + "coroutine.isyieldable", + "coroutine.resume", + "coroutine.running", + "coroutine.status", + "coroutine.wrap", + "coroutine.yield", + "debug", + "debug.debug", + "debug.gethook", + "debug.getinfo", + "debug.getlocal", + "debug.getmetatable", + "debug.getregistry", + "debug.getupvalue", + "debug.getuservalue", + "debug.sethook", + "debug.setlocal", + "debug.setmetatable", + "debug.setupvalue", + "debug.setuservalue", + "debug.traceback", + "debug.upvalueid", + "debug.upvaluejoin", + "io", + "io.close", + "io.flush", + "io.input", + "io.lines", + "io.open", + "io.output", + "io.popen", + "io.read", + "io.stderr", + "io.stdin", + "io.stdout", + "io.tmpfile", + "io.type", + "io.write", + "file:close", + "file:flush", + "file:lines", + "file:read", + "file:seek", + "file:setvbuf", + "file:write", + "math", + "math.abs", + "math.acos", + "math.asin", + "math.atan", + "math.ceil", + "math.cos", + "math.deg", + "math.exp", + "math.floor", + "math.fmod", + "math.huge", + "math.log", + "math.max", + "math.maxinteger", + "math.min", + "math.mininteger", + "math.modf", + "math.pi", + "math.rad", + "math.random", + "math.randomseed", + "math.sin", + "math.sqrt", + "math.tan", + "math.tointeger", + "math.type", + "math.ult", + "os", + "os.clock", + "os.date", + "os.difftime", + "os.execute", + "os.exit", + "os.getenv", + "os.remove", + "os.rename", + "os.setlocale", + "os.time", + "os.tmpname", + "package", + "package.config", + "package.cpath", + "package.loaded", + "package.loadlib", + "package.path", + "package.preload", + "package.searchers", + "package.searchpath", + "string", + "string.byte", + "string.char", + "string.dump", + "string.find", + "string.format", + "string.gmatch", + "string.gsub", + "string.len", + "string.lower", + "string.match", + "string.pack", + "string.packsize", + "string.rep", + "string.reverse", + "string.sub", + "string.unpack", + "string.upper", + "table", + "table.concat", + "table.insert", + "table.move", + "table.pack", + "table.remove", + "table.sort", + "table.unpack", + "utf8", + "utf8.char", + "utf8.charpattern", + "utf8.codepoint", + "utf8.codes", + "utf8.len", + "utf8.offset", + "LUA_CPATH", + "LUA_CPATH_5_3", + "LUA_INIT", + "LUA_INIT_5_3", + "LUA_PATH", + "LUA_PATH_5_3", + "and", + "break", + "do", + "else", + "elseif", + "end", + "false", + "for", + "function", + "if", + "in", + "local", + "nil", + "not", + "or", + "repeat", + "return", + "then", + "true", + "until", + "while" +}; + +char ID_BREAKERS[] = {'{','}','[',']','(',')','+','=','-','.','*','/','\t',' ','.','<','>','|','?','&', '"', '\''}; +#endif + diff --git a/bruiser/linenoise b/bruiser/linenoise new file mode 160000 +Subproject 8d54bac2034236581e405a1fa80b5e89afd7639 diff --git a/bruiser/makefile b/bruiser/makefile index 5665ec8..2e29fd1 100644 --- a/bruiser/makefile +++ b/bruiser/makefile @@ -14,13 +14,13 @@ SHELL=bash SHELL?=bash CC=clang CC?=clang -CC_FLAGS=-fpic -std=c11 $(shell $(PY_CONF) --includes) +CC_FLAGS=-fpic $(shell $(PY_CONF) --includes) CXX=clang++ CXX?=clang++ CXX_FLAGS=-fpic -I/usr/include $(shell $(PY_CONF) --includes) CXX_EXTRA?= CTAGS_I_PATH?=./ -LD_FLAGS= +LD_FLAGS=-v EXTRA_LD_FLAGS?= ADD_SANITIZERS_CC= -g -fsanitize=address -fno-omit-frame-pointer ADD_SANITIZERS_LD= -g -fsanitize=address |