views:

20

answers:

1
  YYSTYPE yyvsa[YYINITDEPTH];
  YYSTYPE *yyvs = yyvsa;
  register YYSTYPE *yyvsp;

For the code above,it just reports:

Description Resource    Path    Location    Type
syntax error before "yyvsa" yysphinxexpr.c  /sp/src line 852    C/C++ Problem

Which is far from useful,is it for configuration reasons?

A: 

That fragment looks reasonable. Whenever I run into an error message that doesn't make sense, I try to narrow it down using a process like the following:

  1. Verify that I can reproduce the error with as few dependencies as possible (e.g. removing unnecessary classes, includes, etc.)
  2. Compiling the file manually and seeing if the error is the same or is being interpreted before being displayed
  3. Preprocessing the file and then manually examining. Sometimes macros will stomp on themselves or do things you don't expect. If you can preprocess the file (e.g. gcc -E [opts] filename) you'll see what the compiler is ultimately processing, which may help.
  4. Trying with a different compiler. Sometimes a different compiler will produce an error message that makes more sense to you... or you'll find out that somebody did something that's only permitted by certain compilers.
Kaleb Pederson