# infix operators: ==, or, and # grouping: () # terminals : \w+ # # term := (expr) {print '[' . $expr . ']'} # | \w+ {print $word} # expr := term /and/ term {print 'and,' . $term1 . ',' . $term2} # | term /or/ term {print 'or,' . $term1 . ',' . $term2} # | term /==/ term {print '==,' . $term1 . ',' . $term2}