At 13:26 1999-02-16 -0400, Geoff Hutchison wrote:
>
>>My stab at it would be
>>
>>      expected ')' instead of 'foo'
>>
>>for the first case, and
>>
>>      expected a word instead of 'foo'
>>
>>for the second.  Makes sense?
>
>These would make sense. This is an untest patch, but I assume it works

First makes sens to me. Second somewhat less. "Expected a word instead of
'OR'"? But OR is a word, too. That might confuse users.

How about "Expected a search word instead of 'foo'"?

Also.... these do *not* produce a syntax error at all although I would have
expected it:
        tool or bar) and toolbar
        tool or (bar)) and toolbar
        tool and (bar) or toolbar)
It seems extra brackets are accepted when they are closing brackets, but
not when they are opening brackets?? Especially thelast case is doubtful:
it matters a lot which closing bracket is discarded...

>-Geoff
>
>Index: parser.cc
>===================================================================
>RCS file: /opt/htdig/cvs/htdig3/htsearch/parser.cc,v
>retrieving revision 1.6
>diff -c -3 -p -r1.6 parser.cc
>*** parser.cc   1998/12/06 18:45:10     1.6
>--- parser.cc   1999/02/16 18:20:07
>*************** Parser::factor(int output)
>*** 155,160 ****
>--- 155,163 ----
>        else
>        {
>            valid = 0;
>+           error = 0;
>+           error << " ')' instead of '" << current->word.get();
>+           error << '\'';
>        }
>      }
>      else if (lookahead == WORD)
>*************** Parser::factor(int output)
>*** 168,173 ****
>--- 171,179 ----
>      else
>      {
>        valid = 0;
>+       error = 0;
>+       error << "expected a word instead of '" << current->word.get();
>+       error << '\'';
>      }
>  }
>
>
>
>------------------------------------
>To unsubscribe from the htdig3-dev mailing list, send a message to
>[EMAIL PROTECTED] containing the single word "unsubscribe" in
>the SUBJECT of the message.
>

Marjolein Katsma      [EMAIL PROTECTED]
Java Woman - http://javawoman.com/
------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.

Reply via email to