title: Step by step evaluation with parser combinator in scala
body: <p>I'm just learning the Scala parser combinator library. I've experimented a working parser that parses some arithmetic expressions with an abstract syntax tree.
  So when I call </p>
  
  <pre><code>phrase(expr)(tokens)
  </code></pre>
  
  <p>and my parser parses all the input then gives me an evaluation. But how can I have a step by step evaluation?</p>
  
  <p>Say</p>
  
  <blockquote>
    <p>3 + 4 * 7</p>
  </blockquote>
  
  <p>it prints</p>
  
  <blockquote>
    <p>3 + 28</p>
  </blockquote>
  
  <p>then</p>
  
  <blockquote>
    <p>31</p>
  </blockquote>
  
  <p>in separate lines.</p>
  
  <p>I've scan through the apis but the docs there are not very helpful ...
  Thanks for help.</p>