anchor.diff:  %% API
   %%----------------------------------------------------------------------------
   
  -from_string(String) ->
  -    {ok, ParseTree} = dk_q_parser:parse(scan(String)),
  -    tree_to_query(ParseTree).
  +exec(DomId, CatId, QueryStr) ->
  +    {ok, Lang} = dk_meta:dom_lang(DomId),
  +    exec_q(DomId, CatId, from_str(QueryStr, Lang)).
   
   %%----------------------------------------------------------------------------
   %% Internal functions
   %%----------------------------------------------------------------------------
  +
  +from_str(Str, Lang) ->
  +    {ok, ParseTree} = dk_q_parser:parse(scan(Str)),
  +    tree_to_query(ParseTree, Lang).
   
   scan(<<C/utf8, Rest/bytes>>) ->
       case C of
  
positive.code:             Options = [unicode, global, {capture, all_but_first,
                                           binary}],
              case re:run(Rest, Regex, Options) of
                  {match, [[String, RestRest]]} ->
                      [{string, <<C, String/bytes>>, 1} | scan(RestRest)];
                  _ ->
                      [{string, <<C>>, 1} | scan(Rest)]
              end
  
negative.code: -module(dk_q).
  
  %% API
  -export([exec/3]).
  
  %% Record declarations
  -record(and_q, {subs}).
  