Modified grammar rule for main function