Finished scanner.

Fixed name conflicts and added missing tokens.
Implemented parser.