From: Ian Jackson Subject: Re: [PATCH v6 20/23] libxlu: record line and column number when parsing values Date: Fri, 6 Mar 2015 14:30:27 +0000 Message-ID: <21753.47619.246050.202800@mariner.uk.xensource.com> References: <1424966166-2388-1-git-send-email-wei.liu2@citrix.com> <1424966166-2388-21-git-send-email-wei.liu2@citrix.com> <21753.37155.743889.586465@mariner.uk.xensource.com> <20150306120313.GK12103@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150306120313.GK12103@zion.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Wei Liu writes ("Re: [PATCH v6 20/23] libxlu: record line and column number when parsing values"): > Ack. This is how it looks like now. The changes are > > 1. Use YYLTYPE instead of line and column. This is better but why not have YYLTYPE inside XLU_ConfigValue ? > 2. Handle empty rule inside list_mk and string_mk (that is when YYLTYPE > points to NULL) I hadn't spotted this in the previous patch. Why not use `yyloc', the location of the lookahead token ? > + if (loc) { > + value->line = loc->first_line; > + value->column = loc->first_column; > + } else > + value->line = value->column = 0; This code appears twice. Thanks, Ian.