radeco icon indicating copy to clipboard operation
radeco copied to clipboard

Default VM implementation

Open sushant94 opened this issue 9 years ago • 1 comments

With the current esil-rs implementation, I find myself using the following pattern quite regularly.

// Initializations
let mut p = Parser::init(None);
while let Some(ref opinfo) = self.instruction_source.next() {
    let esil = opinfo.esil.as_ref().unwrap()
    while let Some(token) = p.parse::<_, Tokenizer>(esil) {
       let result = {
           // Do some operations with tokens returned.
      }
      p.push(result);
    }
}

It would be nice to have a default Evaluator / Consumer / VM implementation that would do this for us, while allowing us to customize it for the needed operation.

sushant94 avatar Jan 26 '16 07:01 sushant94

how do you want to handle customops

condret avatar Jun 25 '16 11:06 condret