Re: GtkBuildable type resolver



On Tue, 2007-06-05 at 11:23 -0400, Owen Taylor wrote:
> On Mon, 2007-06-04 at 23:00 +0300, Markku Vire wrote:
> > Hi,
> > 
> > I faced similar scenario while writing a tiny gobject code generator. 
> > I ended up to use similar techinique than your second alternative. It
> > works nicely in 99% of the cases, but cannot handle cases like:
> > 
> >   GtkIMContext => gtk_i_m_context_get_type != gtk_im_context_get_type
> > 
> > Otherwise this would be a nice way to force everybody to use GObject
> > naming conventions ;)
> 
> Actually, GtkIMContext fits the standard naming rules we have for
> mixed-case names:
> 
> They are something like:
> 
>  NAME := INITIAL_WORD WORD+
>  INITIAL_WORD := [A-Z][a-z0-9]*
>  WORD := [A_Z]{2,} | [A-Z][a-z0-9]+

As I said, "something like" ... to correct myself:
                        
 WORD := [A-Z]{1,2}[a-z0-9]+ | [A_Z]{2,}

Not that anybody probably would have noticed...

						- Owen





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