Re: [Rhythmbox-devel] My Rhythmbox Hacking ToDo

Le vendredi 25 mars 2005 à 15:31 +0600, Haran Shivanan a écrit : 
> On Fri, 2005-03-25 at 09:49 +0100, Gabriel de Perthuis wrote:
> > > 
> > I think you write a .lex, compile it into a C source, add a N_() around
> > AND, OR, by... keywords to internationalise them, and use it as your
> > lexer. Then use yacc with the language independent result. Maybe you can
> > directly use N_() in the .lex .
> > To print it, you use N_() again.
> Is it really necessary to have the language constructs
> internationalized? 
> (For one thing, it makes sharing scripts difficult.)
What do you mean, sharing scripts?
The internal db format is already locale independent, so playlists can
be shared. eg:
      <equals prop="type">0</equals>
          <like prop="title-folded">love</like>

However, the generated parser will be in different versions I think,
which flex can load dynamically. The alternative is to parse until word
level and do string comparisons to find if there is a keyword. I've
written a parser with the first solution, but I don't really have a

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