[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Tweaking the libxlu bison grammar to include nested lists
On Tue, Jul 22, 2014 at 10:34 AM, Sunder <u89012@xxxxxxxxx> wrote: > Hello everyone, > > I'm new to the Xen community and this is my first attempt towards a patch. > I've been given to understand that the config parser's grammar needs to be > modified to accept nested lists. I've been trying to tweak the code and > would need a bit of help in understanding the actions that are being invoked > (*store/*set/*mk, especially *mk which seems to be called with different 2nd > args based on where/what's found, which is quite confusing to me). I also > think the grammar could be further reduced as below. I'd love to hear the > expert opinions -- have I covered all cases? Are the right actions being > invoked? > > Thanks! > Sunder > > * filename: <xen>/tools/libxl/libxlu_cfg_y.y > > /*reduced grammar (mainly for understanding and local testing):*/ > > stmts: | stmts stmt > stmt: ID '=' expr nl { xlu__cfg_set_store(ctx,$1,$3,@3.first_line); } > expr: > atom { $$= xlu__cfg_set_mk(ctx,1,$1); } > | list > | expr ',' atom { xlu__cfg_set_add(ctx,$1,$3); $$= $1; } > | expr ',' list > > list: '[' expr ']' { $$= xlu__cfg_set_mk(ctx,0,0); } > atom: NUM|STR > nl: NL | nl NL > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxx > http://lists.xen.org/xen-devel > CC ing Ian. Ian, this comes from conversation about configuration of vNUMA distances we had some time ago. In that conversation we wanted to see vNUMA distance array look something like this in the config file: vdistance = [[10,20,25],[20,10,20],[25, 20. 10]] or a shorter version, but I would start with fully defined at first. Will be that what Sunder asks a acceptable solution. Thank you! -- Elena _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |