basic parsing method for building a menubar