xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* Tweaking the libxlu bison grammar to include nested lists
@ 2014-07-22 14:34 Sunder
  2014-07-23  6:12 ` Elena Ufimtseva
  0 siblings, 1 reply; 5+ messages in thread
From: Sunder @ 2014-07-22 14:34 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1052 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1847 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-07-29 15:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-22 14:34 Tweaking the libxlu bison grammar to include nested lists Sunder
2014-07-23  6:12 ` Elena Ufimtseva
2014-07-23  9:32   ` Ian Campbell
2014-07-29 10:53     ` Dario Faggioli
2014-07-29 15:27       ` Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).