#include <ForthMachine.h>
Public Member Functions | |
ForthMachineOf (const std::string &source, int64_t stack_max_depth=1024, int64_t recursion_max_depth=1024, int64_t string_buffer_size=1024, int64_t output_initial_size=1024, double output_resize_factor=1.5) | |
~ForthMachineOf () | |
int64_t | abi_version () const noexcept |
HERE. | |
const std::string | source () const noexcept |
HERE. | |
const std::vector< I > | bytecodes () const |
HERE. | |
const std::vector< int64_t > | bytecodes_offsets () const |
HERE. | |
const std::string | decompiled () const |
HERE. | |
const std::string | decompiled_segment (int64_t segment_position, const std::string &indent="", bool endline=true) const |
HERE. | |
const std::string | decompiled_at (int64_t bytecode_position, const std::string &indent="") const |
HERE. | |
const std::vector< std::string > | dictionary () const |
HERE. | |
int64_t | stack_max_depth () const noexcept |
HERE. | |
int64_t | recursion_max_depth () const noexcept |
HERE. | |
int64_t | string_buffer_size () const noexcept |
HERE. | |
int64_t | output_initial_size () const noexcept |
HERE. | |
double | output_resize_factor () const noexcept |
HERE. | |
const std::vector< T > | stack () const |
HERE. | |
T | stack_at (int64_t from_top) const noexcept |
HERE. | |
int64_t | stack_depth () const noexcept |
HERE. | |
bool | stack_can_push () const noexcept |
HERE. | |
bool | stack_can_pop () const noexcept |
HERE. | |
void | stack_push (T value) noexcept |
HERE. | |
T | stack_pop () noexcept |
HERE. | |
void | stack_clear () noexcept |
HERE. | |
const std::map< std::string, T > | variables () const |
HERE. | |
const std::vector< std::string > | variable_index () const |
HERE. | |
T | variable_at (const std::string &name) const |
HERE. | |
T | variable_at (int64_t index) const noexcept |
HERE. | |
bool | input_must_be_writable (const std::string &name) const |
HERE. | |
int64_t | input_position_at (const std::string &name) const |
HERE. | |
int64_t | input_position_at (int64_t index) const noexcept |
HERE. | |
const std::map< std::string, std::shared_ptr< ForthOutputBuffer > > | outputs () const |
HERE. | |
const std::vector< std::string > | output_index () const noexcept |
HERE. | |
const std::shared_ptr< ForthOutputBuffer > | output_at (const std::string &name) const |
HERE. | |
const std::shared_ptr< ForthOutputBuffer > | output_at (int64_t index) const noexcept |
HERE. | |
const std::string | string_at (int64_t index) const noexcept |
Returns a string at 'index'. The strings are defined with an 's"' core word. | |
void | reset () |
HERE. | |
void | begin (const std::map< std::string, std::shared_ptr< ForthInputBuffer > > &inputs) |
HERE. | |
void | begin () |
HERE. | |
util::ForthError | begin_again (const std::map< std::string, std::shared_ptr< ForthInputBuffer > > &inputs, bool reset_instruction) |
HERE. | |
util::ForthError | step () |
HERE. | |
util::ForthError | run (const std::map< std::string, std::shared_ptr< ForthInputBuffer > > &inputs) |
HERE. | |
util::ForthError | run () |
HERE. | |
util::ForthError | resume () |
HERE. | |
util::ForthError | call (const std::string &name) |
HERE. | |
util::ForthError | call (int64_t index) |
HERE. | |
void | maybe_throw (util::ForthError err, const std::set< util::ForthError > &ignore) const |
HERE. | |
int64_t | current_bytecode_position () const noexcept |
HERE. | |
int64_t | current_recursion_depth () const noexcept |
HERE. | |
const std::string | current_instruction () const |
HERE. | |
void | count_reset () noexcept |
HERE. | |
int64_t | count_instructions () const noexcept |
HERE. | |
int64_t | count_reads () const noexcept |
HERE. | |
int64_t | count_writes () const noexcept |
HERE. | |
int64_t | count_nanoseconds () const noexcept |
HERE. | |
bool | is_integer (const std::string &word, int64_t &value) const |
HERE. | |
bool | is_variable (const std::string &word) const |
HERE. | |
bool | is_input (const std::string &word) const |
HERE. | |
bool | is_output (const std::string &word) const |
HERE. | |
bool | is_nbit (const std::string &word, I &value) const |
HERE. | |
bool | is_reserved (const std::string &word) const |
HERE. | |
bool | is_defined (const std::string &word) const |
HERE. | |
bool | is_ready () const noexcept |
HERE. | |
bool | is_done () const noexcept |
HERE. | |
bool | is_segment_done () const noexcept |
HERE. | |
ForthMachineOf | ( | const std::string & | source, |
int64_t | stack_max_depth = 1024 , |
||
int64_t | recursion_max_depth = 1024 , |
||
int64_t | string_buffer_size = 1024 , |
||
int64_t | output_initial_size = 1024 , |
||
double | output_resize_factor = 1.5 |
||
) |
~ForthMachineOf | ( | ) |
|
noexcept |
HERE.
void begin | ( | ) |
HERE.
void begin | ( | const std::map< std::string, std::shared_ptr< ForthInputBuffer > > & | inputs | ) |
HERE.
util::ForthError begin_again | ( | const std::map< std::string, std::shared_ptr< ForthInputBuffer > > & | inputs, |
bool | reset_instruction | ||
) |
HERE.
const std::vector< I > bytecodes | ( | ) | const |
HERE.
const std::vector< int64_t > bytecodes_offsets | ( | ) | const |
HERE.
util::ForthError call | ( | const std::string & | name | ) |
HERE.
util::ForthError call | ( | int64_t | index | ) |
HERE.
|
noexcept |
HERE.
|
noexcept |
HERE.
|
noexcept |
HERE.
|
noexcept |
HERE.
|
noexcept |
HERE.
|
noexcept |
HERE.
const std::string current_instruction | ( | ) | const |
HERE.
|
noexcept |
HERE.
const std::string decompiled | ( | ) | const |
HERE.
const std::string decompiled_at | ( | int64_t | bytecode_position, |
const std::string & | indent = "" |
||
) | const |
HERE.
const std::string decompiled_segment | ( | int64_t | segment_position, |
const std::string & | indent = "" , |
||
bool | endline = true |
||
) | const |
HERE.
const std::vector< std::string > dictionary | ( | ) | const |
HERE.
bool input_must_be_writable | ( | const std::string & | name | ) | const |
HERE.
int64_t input_position_at | ( | const std::string & | name | ) | const |
HERE.
|
noexcept |
HERE.
bool is_defined | ( | const std::string & | word | ) | const |
HERE.
|
inlinenoexcept |
HERE.
bool is_input | ( | const std::string & | word | ) | const |
HERE.
bool is_integer | ( | const std::string & | word, |
int64_t & | value | ||
) | const |
HERE.
bool is_nbit | ( | const std::string & | word, |
I & | value | ||
) | const |
HERE.
bool is_output | ( | const std::string & | word | ) | const |
HERE.
|
inlinenoexcept |
HERE.
bool is_reserved | ( | const std::string & | word | ) | const |
HERE.
|
inlinenoexcept |
HERE.
bool is_variable | ( | const std::string & | word | ) | const |
HERE.
void maybe_throw | ( | util::ForthError | err, |
const std::set< util::ForthError > & | ignore | ||
) | const |
HERE.
const std::shared_ptr< ForthOutputBuffer > output_at | ( | const std::string & | name | ) | const |
HERE.
|
noexcept |
HERE.
|
noexcept |
HERE.
|
noexcept |
HERE.
|
noexcept |
HERE.
const std::map< std::string, std::shared_ptr< ForthOutputBuffer > > outputs | ( | ) | const |
HERE.
|
noexcept |
HERE.
void reset | ( | ) |
HERE.
util::ForthError resume | ( | ) |
HERE.
util::ForthError run | ( | ) |
HERE.
util::ForthError run | ( | const std::map< std::string, std::shared_ptr< ForthInputBuffer > > & | inputs | ) |
HERE.
|
noexcept |
HERE.
const std::vector< T > stack | ( | ) | const |
HERE.
|
noexcept |
HERE.
|
inlinenoexcept |
HERE.
|
inlinenoexcept |
HERE.
|
noexcept |
HERE.
|
noexcept |
HERE.
|
noexcept |
HERE.
|
inlinenoexcept |
HERE.
|
inlinenoexcept |
HERE.
util::ForthError step | ( | ) |
HERE.
|
noexcept |
Returns a string at 'index'. The strings are defined with an 's"' core word.
|
noexcept |
HERE.
T variable_at | ( | const std::string & | name | ) | const |
HERE.
|
noexcept |
HERE.
const std::vector< std::string > variable_index | ( | ) | const |
HERE.
const std::map< std::string, T > variables | ( | ) | const |
HERE.