Loading...
Searching...
No Matches
ForthMachineOf< T, I > Class Template Reference

#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.
 
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.
 
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.
 
variable_at (const std::string &name) const
 HERE.
 
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< ForthOutputBufferoutput_at (const std::string &name) const
 HERE.
 
const std::shared_ptr< ForthOutputBufferoutput_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.
 

Constructor & Destructor Documentation

◆ ForthMachineOf()

template<typename T , typename I >
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()

template<typename T , typename I >
~ForthMachineOf ( )

Member Function Documentation

◆ abi_version()

template<typename T , typename I >
int64_t abi_version ( ) const
noexcept

HERE.

◆ begin() [1/2]

template<typename T , typename I >
void begin ( )

HERE.

◆ begin() [2/2]

template<typename T , typename I >
void begin ( const std::map< std::string, std::shared_ptr< ForthInputBuffer > > & inputs)

HERE.

◆ begin_again()

template<typename T , typename I >
util::ForthError begin_again ( const std::map< std::string, std::shared_ptr< ForthInputBuffer > > & inputs,
bool reset_instruction )

HERE.

◆ bytecodes()

template<typename T , typename I >
const std::vector< I > bytecodes ( ) const

HERE.

◆ bytecodes_offsets()

template<typename T , typename I >
const std::vector< int64_t > bytecodes_offsets ( ) const

HERE.

◆ call() [1/2]

template<typename T , typename I >
util::ForthError call ( const std::string & name)

HERE.

◆ call() [2/2]

template<typename T , typename I >
util::ForthError call ( int64_t index)

HERE.

◆ count_instructions()

template<typename T , typename I >
int64_t count_instructions ( ) const
noexcept

HERE.

◆ count_nanoseconds()

template<typename T , typename I >
int64_t count_nanoseconds ( ) const
noexcept

HERE.

◆ count_reads()

template<typename T , typename I >
int64_t count_reads ( ) const
noexcept

HERE.

◆ count_reset()

template<typename T , typename I >
void count_reset ( )
noexcept

HERE.

◆ count_writes()

template<typename T , typename I >
int64_t count_writes ( ) const
noexcept

HERE.

◆ current_bytecode_position()

template<typename T , typename I >
int64_t current_bytecode_position ( ) const
noexcept

HERE.

◆ current_instruction()

template<typename T , typename I >
const std::string current_instruction ( ) const

HERE.

◆ current_recursion_depth()

template<typename T , typename I >
int64_t current_recursion_depth ( ) const
noexcept

HERE.

◆ decompiled()

template<typename T , typename I >
const std::string decompiled ( ) const

HERE.

◆ decompiled_at()

template<typename T , typename I >
const std::string decompiled_at ( int64_t bytecode_position,
const std::string & indent = "" ) const

HERE.

◆ decompiled_segment()

template<typename T , typename I >
const std::string decompiled_segment ( int64_t segment_position,
const std::string & indent = "",
bool endline = true ) const

HERE.

◆ dictionary()

template<typename T , typename I >
const std::vector< std::string > dictionary ( ) const

HERE.

◆ input_must_be_writable()

template<typename T , typename I >
bool input_must_be_writable ( const std::string & name) const

HERE.

◆ input_position_at() [1/2]

template<typename T , typename I >
int64_t input_position_at ( const std::string & name) const

HERE.

◆ input_position_at() [2/2]

template<typename T , typename I >
int64_t input_position_at ( int64_t index) const
noexcept

HERE.

◆ is_defined()

template<typename T , typename I >
bool is_defined ( const std::string & word) const

HERE.

◆ is_done()

template<typename T , typename I >
bool is_done ( ) const
inlinenoexcept

HERE.

◆ is_input()

template<typename T , typename I >
bool is_input ( const std::string & word) const

HERE.

◆ is_integer()

template<typename T , typename I >
bool is_integer ( const std::string & word,
int64_t & value ) const

HERE.

◆ is_nbit()

template<typename T , typename I >
bool is_nbit ( const std::string & word,
I & value ) const

HERE.

◆ is_output()

template<typename T , typename I >
bool is_output ( const std::string & word) const

HERE.

◆ is_ready()

template<typename T , typename I >
bool is_ready ( ) const
inlinenoexcept

HERE.

◆ is_reserved()

template<typename T , typename I >
bool is_reserved ( const std::string & word) const

HERE.

◆ is_segment_done()

template<typename T , typename I >
bool is_segment_done ( ) const
inlinenoexcept

HERE.

◆ is_variable()

template<typename T , typename I >
bool is_variable ( const std::string & word) const

HERE.

◆ maybe_throw()

template<typename T , typename I >
void maybe_throw ( util::ForthError err,
const std::set< util::ForthError > & ignore ) const

HERE.

◆ output_at() [1/2]

template<typename T , typename I >
const std::shared_ptr< ForthOutputBuffer > output_at ( const std::string & name) const

HERE.

◆ output_at() [2/2]

template<typename T , typename I >
const std::shared_ptr< ForthOutputBuffer > output_at ( int64_t index) const
noexcept

HERE.

◆ output_index()

template<typename T , typename I >
const std::vector< std::string > output_index ( ) const
noexcept

HERE.

◆ output_initial_size()

template<typename T , typename I >
int64_t output_initial_size ( ) const
noexcept

HERE.

◆ output_resize_factor()

template<typename T , typename I >
double output_resize_factor ( ) const
noexcept

HERE.

◆ outputs()

template<typename T , typename I >
const std::map< std::string, std::shared_ptr< ForthOutputBuffer > > outputs ( ) const

HERE.

◆ recursion_max_depth()

template<typename T , typename I >
int64_t recursion_max_depth ( ) const
noexcept

HERE.

◆ reset()

template<typename T , typename I >
void reset ( )

HERE.

◆ resume()

template<typename T , typename I >
util::ForthError resume ( )

HERE.

◆ run() [1/2]

template<typename T , typename I >
util::ForthError run ( )

HERE.

◆ run() [2/2]

template<typename T , typename I >
util::ForthError run ( const std::map< std::string, std::shared_ptr< ForthInputBuffer > > & inputs)

HERE.

◆ source()

template<typename T , typename I >
const std::string source ( ) const
noexcept

HERE.

◆ stack()

template<typename T , typename I >
const std::vector< T > stack ( ) const

HERE.

◆ stack_at()

template<typename T , typename I >
T stack_at ( int64_t from_top) const
noexcept

HERE.

◆ stack_can_pop()

template<typename T , typename I >
bool stack_can_pop ( ) const
inlinenoexcept

HERE.

◆ stack_can_push()

template<typename T , typename I >
bool stack_can_push ( ) const
inlinenoexcept

HERE.

◆ stack_clear()

template<typename T , typename I >
void stack_clear ( )
noexcept

HERE.

◆ stack_depth()

template<typename T , typename I >
int64_t stack_depth ( ) const
noexcept

HERE.

◆ stack_max_depth()

template<typename T , typename I >
int64_t stack_max_depth ( ) const
noexcept

HERE.

◆ stack_pop()

template<typename T , typename I >
T stack_pop ( )
inlinenoexcept

HERE.

◆ stack_push()

template<typename T , typename I >
void stack_push ( T value)
inlinenoexcept

HERE.

◆ step()

template<typename T , typename I >
util::ForthError step ( )

HERE.

◆ string_at()

template<typename T , typename I >
const std::string string_at ( int64_t index) const
noexcept

Returns a string at 'index'. The strings are defined with an 's"' core word.

◆ string_buffer_size()

template<typename T , typename I >
int64_t string_buffer_size ( ) const
noexcept

HERE.

◆ variable_at() [1/2]

template<typename T , typename I >
T variable_at ( const std::string & name) const

HERE.

◆ variable_at() [2/2]

template<typename T , typename I >
T variable_at ( int64_t index) const
noexcept

HERE.

◆ variable_index()

template<typename T , typename I >
const std::vector< std::string > variable_index ( ) const

HERE.

◆ variables()

template<typename T , typename I >
const std::map< std::string, T > variables ( ) const

HERE.


The documentation for this class was generated from the following file: