Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Devel

[PATCH] xl: fix xl config parser

 

 

Xen devel RSS feed   Index | Next | Previous | View Threaded


choonho.son at gmail

Apr 10, 2013, 12:52 AM

Post #1 of 5 (255 views)
Permalink
[PATCH] xl: fix xl config parser

Bug: xl lexical analyzer cannot parse keyword which has .(dot) character like vif.default.script

ref: 733b9c524dbc2bec318bfc3588ed1652455d30ec
Error log: /etc/xen/xl.conf:28: config parsing error near `.default.script="vif-bridge"': lexical error

Signed-off-by: Choonho Son <choonho.son [at] gmail>
---
tools/libxl/libxlu_cfg_l.l | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxlu_cfg_l.l b/tools/libxl/libxlu_cfg_l.l
index efac884..d5241e1 100644
--- a/tools/libxl/libxlu_cfg_l.l
+++ b/tools/libxl/libxlu_cfg_l.l
@@ -52,7 +52,7 @@ void xlu__cfg_yyset_column(int column_no, yyscan_t yyscanner);

%%

-[a-z][_0-9a-z]* {
+[a-z][._0-9a-z]* {
yylval->string= xlu__cfgl_strdup(ctx,yytext);
GOT(IDENT);
}
--
1.7.1


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Campbell at citrix

Apr 10, 2013, 6:08 AM

Post #2 of 5 (239 views)
Permalink
Re: [PATCH] xl: fix xl config parser [In reply to]

On Wed, 2013-04-10 at 08:52 +0100, Choonho Son wrote:
> Bug: xl lexical analyzer cannot parse keyword which has .(dot) character like vif.default.script
>
> ref: 733b9c524dbc2bec318bfc3588ed1652455d30ec
> Error log: /etc/xen/xl.conf:28: config parsing error near `.default.script="vif-bridge"': lexical error

Hrm. Roger, how did this ever work for you?

>
> Signed-off-by: Choonho Son <choonho.son [at] gmail>
> ---
> tools/libxl/libxlu_cfg_l.l | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tools/libxl/libxlu_cfg_l.l b/tools/libxl/libxlu_cfg_l.l
> index efac884..d5241e1 100644
> --- a/tools/libxl/libxlu_cfg_l.l
> +++ b/tools/libxl/libxlu_cfg_l.l
> @@ -52,7 +52,7 @@ void xlu__cfg_yyset_column(int column_no, yyscan_t yyscanner);
>
> %%
>
> -[a-z][_0-9a-z]* {
> +[a-z][._0-9a-z]* {
> yylval->string= xlu__cfgl_strdup(ctx,yytext);
> GOT(IDENT);
> }



_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


roger.pau at citrix

Apr 10, 2013, 8:51 AM

Post #3 of 5 (241 views)
Permalink
Re: [PATCH] xl: fix xl config parser [In reply to]

On 10/04/13 15:08, Ian Campbell wrote:
> On Wed, 2013-04-10 at 08:52 +0100, Choonho Son wrote:
>> Bug: xl lexical analyzer cannot parse keyword which has .(dot) character like vif.default.script
>>
>> ref: 733b9c524dbc2bec318bfc3588ed1652455d30ec
>> Error log: /etc/xen/xl.conf:28: config parsing error near `.default.script="vif-bridge"': lexical error
>
> Hrm. Roger, how did this ever work for you?

I have no idea what on hell I did to test this options. Dunno if somehow
I managed to not include this diff on the patches I sent. This should be
added for sure.

>
>>
>> Signed-off-by: Choonho Son <choonho.son [at] gmail>
Acked-by: Roger Pau Monné <roger.pau [at] citrix>

>> ---
>> tools/libxl/libxlu_cfg_l.l | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/tools/libxl/libxlu_cfg_l.l b/tools/libxl/libxlu_cfg_l.l
>> index efac884..d5241e1 100644
>> --- a/tools/libxl/libxlu_cfg_l.l
>> +++ b/tools/libxl/libxlu_cfg_l.l
>> @@ -52,7 +52,7 @@ void xlu__cfg_yyset_column(int column_no, yyscan_t yyscanner);
>>
>> %%
>>
>> -[a-z][_0-9a-z]* {
>> +[a-z][._0-9a-z]* {
>> yylval->string= xlu__cfgl_strdup(ctx,yytext);
>> GOT(IDENT);
>> }
>
>


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Jackson at eu

Apr 11, 2013, 5:18 AM

Post #4 of 5 (240 views)
Permalink
Re: [PATCH] xl: fix xl config parser [In reply to]

Roger Pau Monne writes ("Re: [PATCH] xl: fix xl config parser"):
> On 10/04/13 15:08, Ian Campbell wrote:
> > Hrm. Roger, how did this ever work for you?
>
> I have no idea what on hell I did to test this options. Dunno if somehow
> I managed to not include this diff on the patches I sent. This should be
> added for sure.

Maybe you tested it with a previous version of the name.

I have acked and applied the patch, thanks.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Campbell at citrix

Apr 12, 2013, 12:56 AM

Post #5 of 5 (240 views)
Permalink
Re: [PATCH] xl: fix xl config parser [In reply to]

On Thu, 2013-04-11 at 13:18 +0100, Ian Jackson wrote:
> Roger Pau Monne writes ("Re: [PATCH] xl: fix xl config parser"):
> > On 10/04/13 15:08, Ian Campbell wrote:
> > > Hrm. Roger, how did this ever work for you?
> >
> > I have no idea what on hell I did to test this options. Dunno if somehow
> > I managed to not include this diff on the patches I sent. This should be
> > added for sure.
>
> Maybe you tested it with a previous version of the name.
>
> I have acked and applied the patch, thanks.

You forgot to rerun flex and/or to checkin the generated files though.

I have pushed the following, I fixed up the whitespace alignment in the
source file while I was there.

commit cf38606aad623cdb4de4de81e86d44f514fa0c8e
Author: Ian Campbell <ian.campbell [at] citrix>
Date: Fri Apr 12 08:55:18 2013 +0100

libxl: regenerate libxlu cfg parser after 9e14c516b6cb

Fixup whitespace alignment while I'm there.

Signed-off-by: Ian Campbell <ian.campbell [at] citrix>

diff --git a/tools/libxl/libxlu_cfg_l.c b/tools/libxl/libxlu_cfg_l.c
index e906ff9..df352aa 100644
--- a/tools/libxl/libxlu_cfg_l.c
+++ b/tools/libxl/libxlu_cfg_l.c
@@ -393,16 +393,16 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 1, 4, 5, 1, 1, 1, 6, 7,
- 7, 1, 7, 8, 7, 7, 1, 9, 9, 9,
- 9, 9, 9, 9, 9, 9, 9, 7, 10, 1,
- 11, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 7, 1, 7, 8, 7, 9, 1, 10, 10, 10,
+ 10, 10, 10, 10, 10, 10, 10, 7, 11, 1,
+ 12, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 12, 13, 14, 1, 15, 1, 16, 16, 16, 16,
+ 13, 14, 15, 1, 16, 1, 17, 17, 17, 17,

- 16, 16, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 17, 17, 16,
- 17, 17, 1, 1, 1, 1, 1, 1, 1, 1,
+ 17, 17, 18, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18, 18, 18, 18, 18, 18, 17,
+ 18, 18, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -419,18 +419,18 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;

-static yyconst flex_int32_t yy_meta[18] =
+static yyconst flex_int32_t yy_meta[19] =
{ 0,
- 1, 2, 3, 1, 1, 1, 1, 1, 4, 1,
- 1, 1, 1, 1, 4, 4, 4
+ 1, 2, 3, 1, 1, 1, 1, 1, 4, 4,
+ 1, 1, 1, 1, 1, 4, 4, 4
} ;

static yyconst flex_int16_t yy_base[41] =
{ 0,
- 0, 0, 16, 18, 50, 56, 56, 56, 18, 39,
- 17, 56, 56, 16, 56, 56, 56, 56, 0, 0,
- 56, 56, 20, 56, 0, 26, 56, 21, 56, 0,
- 19, 0, 0, 56, 35, 39, 43, 47, 22, 51
+ 0, 0, 17, 19, 44, 58, 58, 58, 19, 28,
+ 18, 58, 58, 17, 58, 58, 58, 58, 0, 0,
+ 58, 58, 21, 58, 0, 26, 58, 22, 58, 0,
+ 20, 0, 0, 58, 37, 41, 45, 49, 22, 53
} ;

static yyconst flex_int16_t yy_def[41] =
@@ -441,28 +441,28 @@ static yyconst flex_int16_t yy_def[41] =
34, 39, 40, 0, 34, 34, 34, 34, 34, 34
} ;

-static yyconst flex_int16_t yy_nxt[74] =
+static yyconst flex_int16_t yy_nxt[77] =
{ 0,
- 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 6, 18, 6, 19, 19, 21, 22, 21,
- 22, 24, 29, 24, 31, 32, 29, 31, 27, 30,
- 25, 31, 25, 30, 31, 20, 20, 20, 20, 23,
- 23, 27, 23, 26, 26, 26, 26, 28, 28, 34,
- 28, 33, 34, 34, 33, 5, 34, 34, 34, 34,
+ 6, 7, 8, 9, 10, 11, 12, 13, 12, 14,
+ 15, 16, 17, 6, 18, 6, 19, 19, 21, 22,
+ 21, 22, 24, 29, 24, 32, 31, 29, 27, 31,
+ 27, 30, 25, 31, 25, 30, 31, 20, 20, 20,
+ 20, 23, 23, 34, 23, 26, 26, 26, 26, 28,
+ 28, 34, 28, 33, 34, 34, 33, 5, 34, 34,
34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34
+ 34, 34, 34, 34, 34, 34
} ;

-static yyconst flex_int16_t yy_chk[74] =
+static yyconst flex_int16_t yy_chk[77] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 3, 3, 4,
- 4, 9, 11, 23, 14, 39, 28, 31, 26, 11,
- 9, 14, 23, 28, 31, 35, 35, 35, 35, 36,
- 36, 10, 36, 37, 37, 37, 37, 38, 38, 5,
- 38, 40, 0, 0, 40, 34, 34, 34, 34, 34,
+ 1, 1, 1, 1, 1, 1, 1, 1, 3, 3,
+ 4, 4, 9, 11, 23, 39, 14, 28, 26, 31,
+ 10, 11, 9, 14, 23, 28, 31, 35, 35, 35,
+ 35, 36, 36, 5, 36, 37, 37, 37, 37, 38,
+ 38, 0, 38, 40, 0, 0, 40, 34, 34, 34,
34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
- 34, 34, 34
+ 34, 34, 34, 34, 34, 34
} ;

/* Table of booleans, true if rule could match eol. */
diff --git a/tools/libxl/libxlu_cfg_l.l b/tools/libxl/libxlu_cfg_l.l
index d5241e1..e0ea8cf 100644
--- a/tools/libxl/libxlu_cfg_l.l
+++ b/tools/libxl/libxlu_cfg_l.l
@@ -52,7 +52,7 @@ void xlu__cfg_yyset_column(int column_no, yyscan_t yyscanner);

%%

-[a-z][._0-9a-z]* {
+[a-z][._0-9a-z]* {
yylval->string= xlu__cfgl_strdup(ctx,yytext);
GOT(IDENT);
}



_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel

Xen devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.