On 10/8/06, Otis Gospodnetic <[EMAIL PROTECTED]> wrote:
Hi Patrick,
If I were trying to do this, I'd modify QueryParser.jj to construct the grammar
for boolean operators based on something like Locale (or LANG env. variable?).
I'd try adding code a la:
en_AND = AND
en_OR = OR
en_NOT = NOT
fr_AND = ET
fr_OR = OU
fr_NOT = SAUF
And then:
if (locale is 'fr')
// construct the grammar with fr_*
...
Something like that.
It is a good thought, but as number of locales grows with similar
languages you'll get deterministic errors in the lexer. So I would
absolutely recommend one grammar file per language. Not sure if JavaCC
allows inheritance, but with ANTlr this would be a very simple and
effective way to solve the problem.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]