Re: alternative gmarkup parser



Havoc Pennington wrote:
>  gtk_widget_new_from_string ("<widget type=\"GtkLabel\">"
>                               "<attribute name=\"text\" value=\"Foo\"/>"
>                               "</widget>");
> 

Strange, I was just looking at a concept, building gtk menus from a
simple "menu language".  for instance, a menu (eg. gnome-foot menu) can
be created using

<MENU> "Programs"
	<MENU> "Programming"
		<IMAGE> "/usr/local/share/code.xpm" </IMAGE>
		<ITEM> "GVim"
			<ACTION> "/usr/local/bin/gvim" </ACTION>
			<IMAGE> "/usr/local/share/gvim.xpm" </IMAGE>
		<ITEM>
	...

I use flex to generate the lexer and bison for the parser.  Using this
concept I plan to build a menu (ala windows start-button) that can be
defined using this markup from a rc file.

I have a proof-of-concept working, that would parse the above code and
produce a working menu. 

Anyway, the point of this email was to
(i) offer flex, bison code as POC if anyone's interested
(ii)suggest using flex for the lexer




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]