"putting it all together"> 
class MiniP &lt; Parslet::Parser
  # Single character rules
  rule(:lparen)     { str('(') &gt;&gt; space? }
  rule(:rparen)     { str(')') &gt;&gt; space? }
  rule(:comma)      { str(',') &gt;&gt; space? }

  rule(:space)      { match('\s').repeat(1) }
  rule(:space?)     { space.maybe }

  # Things
  rule(:integer)    { match('[0-9]').repeat(1).as(:int) &gt;&gt; space? }
  rule(:identifier) { match['a-z'].repeat(1) }
  rule(:operator)   { match('[+]') &gt;&gt; space? }
  
  # G