Skip to content

JoshuaEnglish/brutus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stack-vm

Simple stack based virtual machine

There are 4 components

  • A LIFO stack
  • The registry (a collections.MutableMapping object)
  • The program (a tuple of strings)
  • the counter (instruction index)

The basic VM class only supports a single rule: end. A BaseMachine class provides methods that can build simple programs.

New rules can be added with any callable object.

Brutus also adds a lexical scanner that builds concrete syntax trees that can be translated into programs for the Stack VM. Small languages can be built.

About

Stack based virtual machine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages