added diagram to parser code