'a + b') # =&gt; {:a=&gt;"a"@0, :o=&gt;"+"@2, :b=&gt;"b"@4}
</code></pre>
<p>Think of this like using a highlighter on your input: What is there not to
like about neon yellow?</p>
<h2>Making the parser complete</h2>
<p>Let&#8217;s look at the complete parser definition that also allows for function
calls:</p>
<pre class="sh_ruby"><code title="full_parser"> 
class MiniP &lt; Parslet::Parser
  # Single character rules
  rule(:lparen)     { str('(') &gt;&gt; space? }
  rule(:rparen)     { str(')') &gt;&gt; spa