My two cents worth. I prefer rewrites as I can create virtual tokens. Regards Gary expr : or -> ^(EXPR or) ; or : (and -> and) ( OR b=and -> ^( LOGICAL_OR $or $b ) )* ; and : (atom -> atom) ( AND b=atom -> ^(LOGICAL_AND $and $b) )* ; atom : id ; id : ID; ID : 'a'..'z'; AND : '&'; OR : '|';