Added parser for main func.

Signed-off-by: Kouhei Maeda <mkouhei@palmtb.net>