).repeat(1) &gt;&gt; space? }
  
    rule(:space)      { match('\s').repeat(1) }
    rule(:space?)     { space.maybe }
  
    rule(:operator)   { match('[+]') &gt;&gt; space? }
  
    rule(:sum)        { integer &gt;&gt; operator &gt;&gt; expression }
    rule(:expression) { sum | integer }

    root :expression
  end

  def parse(str)
    mini = Mini.new
  
    mini.parse(str)
  rescue Parslet::ParseFailed =&gt; failure
    puts failure.parse_failure_cause.ascii_tree
  end

  parse "1 + 2 + 3"  # =&gt; "1 