Pergunta de entrevista da empresa Jane Street

Write a parser for arithmetic expressions using 4 basic operations, and compute ways of making 24 using 4 given numbers and any of the above operations.