Added line numbering for tokens and implemented some additional parsing routines.