Add cli.js and fix bug in parser.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>