From: Ian Campbell Subject: Re: [PATCH RFC] libxl: support for using 'MmGg' as memory size suffix Date: Wed, 25 Sep 2013 14:36:04 +0100 Message-ID: <1380116164.23688.156.camel@kazak.uk.xensource.com> References: <1379778703-26986-1-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1379778703-26986-1-git-send-email-wei.liu2@citrix.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 Jackson , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Sat, 2013-09-21 at 16:51 +0100, Wei Liu wrote: > diff --git a/tools/libxl/libxlu_cfg_l.l b/tools/libxl/libxlu_cfg_l.l > index e0ea8cf..0b1f299 100644 > --- a/tools/libxl/libxlu_cfg_l.l > +++ b/tools/libxl/libxlu_cfg_l.l This will need Ian J's review when he gets back. > @@ -60,6 +60,10 @@ void xlu__cfg_yyset_column(int column_no, yyscan_t yyscanner); > yylval->string= xlu__cfgl_strdup(ctx,yytext); > GOT(NUMBER); > } > +[0-9][0-9a-fx]*[MmGg] { You copied this from above but "[0-9][0-9a-fx]*" looks odd to me. I think it is intended to accept decimals and hex 0xNNN but it actually ends up accepting 1111xxxxx99999ddddd and nonsensical things like that, doesn't it? I suppose we will reject such things later. > + yylval->string= xlu__cfgl_strdup(ctx,yytext); > + GOT(STRING); This sort of subtle semantic change GOT(NUMBER)=>(STRING) is what needs Ian's thoughts...