implemented base clases for lexic analysis