00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 #define YYBISON 1
00048
00049
00050 #define YYBISON_VERSION "2.3"
00051
00052
00053 #define YYSKELETON_NAME "yacc.c"
00054
00055
00056 #define YYPURE 1
00057
00058
00059 #define YYLSP_NEEDED 0
00060
00061
00062 #define yyparse search_parse
00063 #define yylex search_lex
00064 #define yyerror search_error
00065 #define yylval search_lval
00066 #define yychar search_char
00067 #define yydebug search_debug
00068 #define yynerrs search_nerrs
00069
00070
00071
00072 #ifndef YYTOKENTYPE
00073 # define YYTOKENTYPE
00074
00075
00076 enum yytokentype {
00077 T_WORD = 258
00078 };
00079 #endif
00080
00081 #define T_WORD 258
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098 #ifdef HAVE_CONFIG_H
00099 #include <config.h>
00100 #endif
00101
00102 #ifdef HAVE_STDLIB_H
00103 #include <unistd.h>
00104 #endif
00105 #ifdef HAVE_UNISTD_H
00106 #include <unistd.h>
00107 #endif
00108 #ifdef HAVE_MALLOC_H
00109 #include <malloc.h>
00110 #endif
00111
00112 #include <stdio.h>
00113
00114 #include <unac.h>
00115 #include <WordTree.h>
00116 #include <mifluzsearch.h>
00117
00118 #define YYPARSE_PARAM parm
00119 #define YYLEX_PARAM parm
00120
00121
00122 class WordTreeList {
00123 public:
00124 WordTreeList(WordTree* node) {
00125 values = (WordTree**)malloc(sizeof(WordTree*));
00126 values[0] = node;
00127 values_length = 1;
00128 }
00129
00130 void Push(WordTree* node) {
00131 values = (WordTree**)realloc(values, sizeof(WordTree*) * (values_length + 1));
00132 values[values_length] = node;
00133 values_length++;
00134 }
00135
00136 WordTree** values;
00137 int values_length;
00138 };
00139
00140
00141
00142
00143 #ifndef YYDEBUG
00144 # define YYDEBUG 0
00145 #endif
00146
00147
00148 #ifdef YYERROR_VERBOSE
00149 # undef YYERROR_VERBOSE
00150 # define YYERROR_VERBOSE 1
00151 #else
00152 # define YYERROR_VERBOSE 0
00153 #endif
00154
00155
00156 #ifndef YYTOKEN_TABLE
00157 # define YYTOKEN_TABLE 0
00158 #endif
00159
00160 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
00161 typedef union YYSTYPE
00162
00163 {
00164 WordTree* node;
00165 WordTreeList* list;
00166 }
00167
00168
00169 YYSTYPE;
00170 # define yystype YYSTYPE
00171 # define YYSTYPE_IS_DECLARED 1
00172 # define YYSTYPE_IS_TRIVIAL 1
00173 #endif
00174
00175
00176
00177
00178
00179
00180 static int yylex(YYSTYPE *lvalp, void* inputp);
00181 static int yyerror(char* message);
00182
00183
00184
00185
00186
00187 #ifdef short
00188 # undef short
00189 #endif
00190
00191 #ifdef YYTYPE_UINT8
00192 typedef YYTYPE_UINT8 yytype_uint8;
00193 #else
00194 typedef unsigned char yytype_uint8;
00195 #endif
00196
00197 #ifdef YYTYPE_INT8
00198 typedef YYTYPE_INT8 yytype_int8;
00199 #elif (defined __STDC__ || defined __C99__FUNC__ \
00200 || defined __cplusplus || defined _MSC_VER)
00201 typedef signed char yytype_int8;
00202 #else
00203 typedef short int yytype_int8;
00204 #endif
00205
00206 #ifdef YYTYPE_UINT16
00207 typedef YYTYPE_UINT16 yytype_uint16;
00208 #else
00209 typedef unsigned short int yytype_uint16;
00210 #endif
00211
00212 #ifdef YYTYPE_INT16
00213 typedef YYTYPE_INT16 yytype_int16;
00214 #else
00215 typedef short int yytype_int16;
00216 #endif
00217
00218 #ifndef YYSIZE_T
00219 # ifdef __SIZE_TYPE__
00220 # define YYSIZE_T __SIZE_TYPE__
00221 # elif defined size_t
00222 # define YYSIZE_T size_t
00223 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
00224 || defined __cplusplus || defined _MSC_VER)
00225 # include <stddef.h>
00226 # define YYSIZE_T size_t
00227 # else
00228 # define YYSIZE_T unsigned int
00229 # endif
00230 #endif
00231
00232 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
00233
00234 #ifndef YY_
00235 # if YYENABLE_NLS
00236 # if ENABLE_NLS
00237 # include <libintl.h>
00238 # define YY_(msgid) dgettext ("bison-runtime", msgid)
00239 # endif
00240 # endif
00241 # ifndef YY_
00242 # define YY_(msgid) msgid
00243 # endif
00244 #endif
00245
00246
00247 #if ! defined lint || defined __GNUC__
00248 # define YYUSE(e) ((void) (e))
00249 #else
00250 # define YYUSE(e)
00251 #endif
00252
00253
00254 #ifndef lint
00255 # define YYID(n) (n)
00256 #else
00257 #if (defined __STDC__ || defined __C99__FUNC__ \
00258 || defined __cplusplus || defined _MSC_VER)
00259 static int
00260 YYID (int i)
00261 #else
00262 static int
00263 YYID (i)
00264 int i;
00265 #endif
00266 {
00267 return i;
00268 }
00269 #endif
00270
00271 #if ! defined yyoverflow || YYERROR_VERBOSE
00272
00273
00274
00275 # ifdef YYSTACK_USE_ALLOCA
00276 # if YYSTACK_USE_ALLOCA
00277 # ifdef __GNUC__
00278 # define YYSTACK_ALLOC __builtin_alloca
00279 # elif defined __BUILTIN_VA_ARG_INCR
00280 # include <alloca.h>
00281 # elif defined _AIX
00282 # define YYSTACK_ALLOC __alloca
00283 # elif defined _MSC_VER
00284 # include <malloc.h>
00285 # define alloca _alloca
00286 # else
00287 # define YYSTACK_ALLOC alloca
00288 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00289 || defined __cplusplus || defined _MSC_VER)
00290 # include <stdlib.h>
00291 # ifndef _STDLIB_H
00292 # define _STDLIB_H 1
00293 # endif
00294 # endif
00295 # endif
00296 # endif
00297 # endif
00298
00299 # ifdef YYSTACK_ALLOC
00300
00301 # define YYSTACK_FREE(Ptr) do { ; } while (YYID (0))
00302 # ifndef YYSTACK_ALLOC_MAXIMUM
00303
00304
00305
00306
00307 # define YYSTACK_ALLOC_MAXIMUM 4032
00308 # endif
00309 # else
00310 # define YYSTACK_ALLOC YYMALLOC
00311 # define YYSTACK_FREE YYFREE
00312 # ifndef YYSTACK_ALLOC_MAXIMUM
00313 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
00314 # endif
00315 # if (defined __cplusplus && ! defined _STDLIB_H \
00316 && ! ((defined YYMALLOC || defined malloc) \
00317 && (defined YYFREE || defined free)))
00318 # include <stdlib.h>
00319 # ifndef _STDLIB_H
00320 # define _STDLIB_H 1
00321 # endif
00322 # endif
00323 # ifndef YYMALLOC
00324 # define YYMALLOC malloc
00325 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00326 || defined __cplusplus || defined _MSC_VER)
00327 void *malloc (YYSIZE_T);
00328 # endif
00329 # endif
00330 # ifndef YYFREE
00331 # define YYFREE free
00332 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00333 || defined __cplusplus || defined _MSC_VER)
00334 void free (void *);
00335 # endif
00336 # endif
00337 # endif
00338 #endif
00339
00340
00341 #if (! defined yyoverflow \
00342 && (! defined __cplusplus \
00343 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
00344
00345
00346 union yyalloc
00347 {
00348 yytype_int16 yyss;
00349 YYSTYPE yyvs;
00350 };
00351
00352
00353 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
00354
00355
00356
00357 # define YYSTACK_BYTES(N) \
00358 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
00359 + YYSTACK_GAP_MAXIMUM)
00360
00361
00362
00363 # ifndef YYCOPY
00364 # if defined __GNUC__ && 1 < __GNUC__
00365 # define YYCOPY(To, From, Count) \
00366 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
00367 # else
00368 # define YYCOPY(To, From, Count) \
00369 do \
00370 { \
00371 YYSIZE_T yyi; \
00372 for (yyi = 0; yyi < (Count); yyi++) \
00373 (To)[yyi] = (From)[yyi]; \
00374 } \
00375 while (YYID (0))
00376 # endif
00377 # endif
00378
00379
00380
00381
00382
00383
00384 # define YYSTACK_RELOCATE(Stack) \
00385 do \
00386 { \
00387 YYSIZE_T yynewbytes; \
00388 YYCOPY (&yyptr->Stack, Stack, yysize); \
00389 Stack = &yyptr->Stack; \
00390 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
00391 yyptr += yynewbytes / sizeof (*yyptr); \
00392 } \
00393 while (YYID (0))
00394
00395 #endif
00396
00397
00398 #define YYFINAL 2
00399
00400 #define YYLAST 11
00401
00402
00403 #define YYNTOKENS 7
00404
00405 #define YYNNTS 6
00406
00407 #define YYNRULES 11
00408
00409 #define YYNSTATES 16
00410
00411
00412 #define YYUNDEFTOK 2
00413 #define YYMAXUTOK 258
00414
00415 #define YYTRANSLATE(YYX) \
00416 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
00417
00418
00419 static const yytype_uint8 yytranslate[] =
00420 {
00421 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00422 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00423 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00424 2, 2, 2, 2, 6, 2, 2, 2, 2, 2,
00425 2, 2, 2, 4, 2, 5, 2, 2, 2, 2,
00426 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00427 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00428 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00429 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00430 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00431 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00432 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00433 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00434 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00435 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00436 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00437 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00438 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00439 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00440 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00441 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00443 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00444 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
00446 2, 2, 2, 2, 2, 2, 1, 2, 3
00447 };
00448
00449 #if YYDEBUG
00450
00451
00452 static const yytype_uint8 yyprhs[] =
00453 {
00454 0, 0, 3, 4, 7, 9, 12, 15, 17, 19,
00455 23, 25
00456 };
00457
00458
00459 static const yytype_int8 yyrhs[] =
00460 {
00461 8, 0, -1, -1, 8, 9, -1, 10, -1, 4,
00462 10, -1, 5, 10, -1, 11, -1, 3, -1, 6,
00463 12, 6, -1, 3, -1, 12, 3, -1
00464 };
00465
00466
00467 static const yytype_uint8 yyrline[] =
00468 {
00469 0, 74, 74, 79, 116, 117, 126, 136, 137, 139,
00470 153, 157
00471 };
00472 #endif
00473
00474 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
00475
00476
00477 static const char *const yytname[] =
00478 {
00479 "$end", "error", "$undefined", "T_WORD", "'+'", "'-'", "'\"'",
00480 "$accept", "input", "expr", "sentence", "literal", "words", 0
00481 };
00482 #endif
00483
00484 # ifdef YYPRINT
00485
00486
00487 static const yytype_uint16 yytoknum[] =
00488 {
00489 0, 256, 257, 258, 43, 45, 34
00490 };
00491 # endif
00492
00493
00494 static const yytype_uint8 yyr1[] =
00495 {
00496 0, 7, 8, 8, 9, 9, 9, 10, 10, 11,
00497 12, 12
00498 };
00499
00500
00501 static const yytype_uint8 yyr2[] =
00502 {
00503 0, 2, 0, 2, 1, 2, 2, 1, 1, 3,
00504 1, 2
00505 };
00506
00507
00508
00509
00510 static const yytype_uint8 yydefact[] =
00511 {
00512 2, 0, 1, 8, 0, 0, 0, 3, 4, 7,
00513 5, 6, 10, 0, 11, 9
00514 };
00515
00516
00517 static const yytype_int8 yydefgoto[] =
00518 {
00519 -1, 1, 7, 8, 9, 13
00520 };
00521
00522
00523
00524 #define YYPACT_NINF -4
00525 static const yytype_int8 yypact[] =
00526 {
00527 -4, 0, -4, -4, 4, 4, 6, -4, -4, -4,
00528 -4, -4, -4, 5, -4, -4
00529 };
00530
00531
00532 static const yytype_int8 yypgoto[] =
00533 {
00534 -4, -4, -4, -3, -4, -4
00535 };
00536
00537
00538
00539
00540
00541 #define YYTABLE_NINF -1
00542 static const yytype_uint8 yytable[] =
00543 {
00544 2, 10, 11, 3, 4, 5, 6, 3, 14, 12,
00545 6, 15
00546 };
00547
00548 static const yytype_uint8 yycheck[] =
00549 {
00550 0, 4, 5, 3, 4, 5, 6, 3, 3, 3,
00551 6, 6
00552 };
00553
00554
00555
00556 static const yytype_uint8 yystos[] =
00557 {
00558 0, 8, 0, 3, 4, 5, 6, 9, 10, 11,
00559 10, 10, 3, 12, 3, 6
00560 };
00561
00562 #define yyerrok (yyerrstatus = 0)
00563 #define yyclearin (yychar = YYEMPTY)
00564 #define YYEMPTY (-2)
00565 #define YYEOF 0
00566
00567 #define YYACCEPT goto yyacceptlab
00568 #define YYABORT goto yyabortlab
00569 #define YYERROR goto yyerrorlab
00570
00571
00572
00573
00574
00575
00576 #define YYFAIL goto yyerrlab
00577
00578 #define YYRECOVERING() (!!yyerrstatus)
00579
00580 #define YYBACKUP(Token, Value) \
00581 do \
00582 if (yychar == YYEMPTY && yylen == 1) \
00583 { \
00584 yychar = (Token); \
00585 yylval = (Value); \
00586 yytoken = YYTRANSLATE (yychar); \
00587 YYPOPSTACK (1); \
00588 goto yybackup; \
00589 } \
00590 else \
00591 { \
00592 yyerror (YY_("syntax error: cannot back up")); \
00593 YYERROR; \
00594 } \
00595 while (YYID (0))
00596
00597
00598 #define YYTERROR 1
00599 #define YYERRCODE 256
00600
00601
00602
00603
00604
00605
00606 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
00607 #ifndef YYLLOC_DEFAULT
00608 # define YYLLOC_DEFAULT(Current, Rhs, N) \
00609 do \
00610 if (YYID (N)) \
00611 { \
00612 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
00613 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
00614 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
00615 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
00616 } \
00617 else \
00618 { \
00619 (Current).first_line = (Current).last_line = \
00620 YYRHSLOC (Rhs, 0).last_line; \
00621 (Current).first_column = (Current).last_column = \
00622 YYRHSLOC (Rhs, 0).last_column; \
00623 } \
00624 while (YYID (0))
00625 #endif
00626
00627
00628
00629
00630
00631
00632 #ifndef YY_LOCATION_PRINT
00633 # if YYLTYPE_IS_TRIVIAL
00634 # define YY_LOCATION_PRINT(File, Loc) \
00635 fprintf (File, "%d.%d-%d.%d", \
00636 (Loc).first_line, (Loc).first_column, \
00637 (Loc).last_line, (Loc).last_column)
00638 # else
00639 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
00640 # endif
00641 #endif
00642
00643
00644
00645
00646 #ifdef YYLEX_PARAM
00647 # define YYLEX yylex (&yylval, YYLEX_PARAM)
00648 #else
00649 # define YYLEX yylex (&yylval)
00650 #endif
00651
00652
00653 #if YYDEBUG
00654
00655 # ifndef YYFPRINTF
00656 # include <stdio.h>
00657 # define YYFPRINTF fprintf
00658 # endif
00659
00660 # define YYDPRINTF(Args) \
00661 do { \
00662 if (yydebug) \
00663 YYFPRINTF Args; \
00664 } while (YYID (0))
00665
00666 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
00667 do { \
00668 if (yydebug) \
00669 { \
00670 YYFPRINTF (stderr, "%s ", Title); \
00671 yy_symbol_print (stderr, \
00672 Type, Value); \
00673 YYFPRINTF (stderr, "\n"); \
00674 } \
00675 } while (YYID (0))
00676
00677
00678
00679
00680
00681
00682
00683 #if (defined __STDC__ || defined __C99__FUNC__ \
00684 || defined __cplusplus || defined _MSC_VER)
00685 static void
00686 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
00687 #else
00688 static void
00689 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
00690 FILE *yyoutput;
00691 int yytype;
00692 YYSTYPE const * const yyvaluep;
00693 #endif
00694 {
00695 if (!yyvaluep)
00696 return;
00697 # ifdef YYPRINT
00698 if (yytype < YYNTOKENS)
00699 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
00700 # else
00701 YYUSE (yyoutput);
00702 # endif
00703 switch (yytype)
00704 {
00705 default:
00706 break;
00707 }
00708 }
00709
00710
00711
00712
00713
00714
00715 #if (defined __STDC__ || defined __C99__FUNC__ \
00716 || defined __cplusplus || defined _MSC_VER)
00717 static void
00718 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
00719 #else
00720 static void
00721 yy_symbol_print (yyoutput, yytype, yyvaluep)
00722 FILE *yyoutput;
00723 int yytype;
00724 YYSTYPE const * const yyvaluep;
00725 #endif
00726 {
00727 if (yytype < YYNTOKENS)
00728 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
00729 else
00730 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
00731
00732 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
00733 YYFPRINTF (yyoutput, ")");
00734 }
00735
00736
00737
00738
00739
00740
00741 #if (defined __STDC__ || defined __C99__FUNC__ \
00742 || defined __cplusplus || defined _MSC_VER)
00743 static void
00744 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
00745 #else
00746 static void
00747 yy_stack_print (bottom, top)
00748 yytype_int16 *bottom;
00749 yytype_int16 *top;
00750 #endif
00751 {
00752 YYFPRINTF (stderr, "Stack now");
00753 for (; bottom <= top; ++bottom)
00754 YYFPRINTF (stderr, " %d", *bottom);
00755 YYFPRINTF (stderr, "\n");
00756 }
00757
00758 # define YY_STACK_PRINT(Bottom, Top) \
00759 do { \
00760 if (yydebug) \
00761 yy_stack_print ((Bottom), (Top)); \
00762 } while (YYID (0))
00763
00764
00765
00766
00767
00768
00769 #if (defined __STDC__ || defined __C99__FUNC__ \
00770 || defined __cplusplus || defined _MSC_VER)
00771 static void
00772 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
00773 #else
00774 static void
00775 yy_reduce_print (yyvsp, yyrule)
00776 YYSTYPE *yyvsp;
00777 int yyrule;
00778 #endif
00779 {
00780 int yynrhs = yyr2[yyrule];
00781 int yyi;
00782 unsigned long int yylno = yyrline[yyrule];
00783 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
00784 yyrule - 1, yylno);
00785
00786 for (yyi = 0; yyi < yynrhs; yyi++)
00787 {
00788 fprintf (stderr, " $%d = ", yyi + 1);
00789 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
00790 &(yyvsp[(yyi + 1) - (yynrhs)])
00791 );
00792 fprintf (stderr, "\n");
00793 }
00794 }
00795
00796 # define YY_REDUCE_PRINT(Rule) \
00797 do { \
00798 if (yydebug) \
00799 yy_reduce_print (yyvsp, Rule); \
00800 } while (YYID (0))
00801
00802
00803
00804 int yydebug;
00805 #else
00806 # define YYDPRINTF(Args)
00807 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
00808 # define YY_STACK_PRINT(Bottom, Top)
00809 # define YY_REDUCE_PRINT(Rule)
00810 #endif
00811
00812
00813
00814 #ifndef YYINITDEPTH
00815 # define YYINITDEPTH 200
00816 #endif
00817
00818
00819
00820
00821
00822
00823
00824
00825 #ifndef YYMAXDEPTH
00826 # define YYMAXDEPTH 10000
00827 #endif
00828
00829
00830
00831 #if YYERROR_VERBOSE
00832
00833 # ifndef yystrlen
00834 # if defined __GLIBC__ && defined _STRING_H
00835 # define yystrlen strlen
00836 # else
00837
00838 #if (defined __STDC__ || defined __C99__FUNC__ \
00839 || defined __cplusplus || defined _MSC_VER)
00840 static YYSIZE_T
00841 yystrlen (const char *yystr)
00842 #else
00843 static YYSIZE_T
00844 yystrlen (yystr)
00845 const char *yystr;
00846 #endif
00847 {
00848 YYSIZE_T yylen;
00849 for (yylen = 0; yystr[yylen]; yylen++)
00850 continue;
00851 return yylen;
00852 }
00853 # endif
00854 # endif
00855
00856 # ifndef yystpcpy
00857 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
00858 # define yystpcpy stpcpy
00859 # else
00860
00861
00862 #if (defined __STDC__ || defined __C99__FUNC__ \
00863 || defined __cplusplus || defined _MSC_VER)
00864 static char *
00865 yystpcpy (char *yydest, const char *yysrc)
00866 #else
00867 static char *
00868 yystpcpy (yydest, yysrc)
00869 char *yydest;
00870 const char *yysrc;
00871 #endif
00872 {
00873 char *yyd = yydest;
00874 const char *yys = yysrc;
00875
00876 while ((*yyd++ = *yys++) != '\0')
00877 continue;
00878
00879 return yyd - 1;
00880 }
00881 # endif
00882 # endif
00883
00884 # ifndef yytnamerr
00885
00886
00887
00888
00889
00890
00891
00892 static YYSIZE_T
00893 yytnamerr (char *yyres, const char *yystr)
00894 {
00895 if (*yystr == '"')
00896 {
00897 YYSIZE_T yyn = 0;
00898 char const *yyp = yystr;
00899
00900 for (;;)
00901 switch (*++yyp)
00902 {
00903 case '\'':
00904 case ',':
00905 goto do_not_strip_quotes;
00906
00907 case '\\':
00908 if (*++yyp != '\\')
00909 goto do_not_strip_quotes;
00910
00911 default:
00912 if (yyres)
00913 yyres[yyn] = *yyp;
00914 yyn++;
00915 break;
00916
00917 case '"':
00918 if (yyres)
00919 yyres[yyn] = '\0';
00920 return yyn;
00921 }
00922 do_not_strip_quotes: ;
00923 }
00924
00925 if (! yyres)
00926 return yystrlen (yystr);
00927
00928 return yystpcpy (yyres, yystr) - yyres;
00929 }
00930 # endif
00931
00932
00933
00934
00935
00936
00937
00938
00939 static YYSIZE_T
00940 yysyntax_error (char *yyresult, int yystate, int yychar)
00941 {
00942 int yyn = yypact[yystate];
00943
00944 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
00945 return 0;
00946 else
00947 {
00948 int yytype = YYTRANSLATE (yychar);
00949 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
00950 YYSIZE_T yysize = yysize0;
00951 YYSIZE_T yysize1;
00952 int yysize_overflow = 0;
00953 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
00954 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
00955 int yyx;
00956
00957 # if 0
00958
00959
00960 YY_("syntax error, unexpected %s");
00961 YY_("syntax error, unexpected %s, expecting %s");
00962 YY_("syntax error, unexpected %s, expecting %s or %s");
00963 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
00964 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
00965 # endif
00966 char *yyfmt;
00967 char const *yyf;
00968 static char const yyunexpected[] = "syntax error, unexpected %s";
00969 static char const yyexpecting[] = ", expecting %s";
00970 static char const yyor[] = " or %s";
00971 char yyformat[sizeof yyunexpected
00972 + sizeof yyexpecting - 1
00973 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
00974 * (sizeof yyor - 1))];
00975 char const *yyprefix = yyexpecting;
00976
00977
00978
00979 int yyxbegin = yyn < 0 ? -yyn : 0;
00980
00981
00982 int yychecklim = YYLAST - yyn + 1;
00983 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
00984 int yycount = 1;
00985
00986 yyarg[0] = yytname[yytype];
00987 yyfmt = yystpcpy (yyformat, yyunexpected);
00988
00989 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
00990 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
00991 {
00992 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
00993 {
00994 yycount = 1;
00995 yysize = yysize0;
00996 yyformat[sizeof yyunexpected - 1] = '\0';
00997 break;
00998 }
00999 yyarg[yycount++] = yytname[yyx];
01000 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
01001 yysize_overflow |= (yysize1 < yysize);
01002 yysize = yysize1;
01003 yyfmt = yystpcpy (yyfmt, yyprefix);
01004 yyprefix = yyor;
01005 }
01006
01007 yyf = YY_(yyformat);
01008 yysize1 = yysize + yystrlen (yyf);
01009 yysize_overflow |= (yysize1 < yysize);
01010 yysize = yysize1;
01011
01012 if (yysize_overflow)
01013 return YYSIZE_MAXIMUM;
01014
01015 if (yyresult)
01016 {
01017
01018
01019
01020 char *yyp = yyresult;
01021 int yyi = 0;
01022 while ((*yyp = *yyf) != '\0')
01023 {
01024 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
01025 {
01026 yyp += yytnamerr (yyp, yyarg[yyi++]);
01027 yyf += 2;
01028 }
01029 else
01030 {
01031 yyp++;
01032 yyf++;
01033 }
01034 }
01035 }
01036 return yysize;
01037 }
01038 }
01039 #endif
01040
01041
01042
01043
01044
01045
01046
01047 #if (defined __STDC__ || defined __C99__FUNC__ \
01048 || defined __cplusplus || defined _MSC_VER)
01049 static void
01050 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
01051 #else
01052 static void
01053 yydestruct (yymsg, yytype, yyvaluep)
01054 const char *yymsg;
01055 int yytype;
01056 YYSTYPE *yyvaluep;
01057 #endif
01058 {
01059 YYUSE (yyvaluep);
01060
01061 if (!yymsg)
01062 yymsg = "Deleting";
01063 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
01064
01065 switch (yytype)
01066 {
01067
01068 default:
01069 break;
01070 }
01071 }
01072
01073
01074
01075
01076 #ifdef YYPARSE_PARAM
01077 #if defined __STDC__ || defined __cplusplus
01078 int yyparse (void *YYPARSE_PARAM);
01079 #else
01080 int yyparse ();
01081 #endif
01082 #else
01083 #if defined __STDC__ || defined __cplusplus
01084 int yyparse (void);
01085 #else
01086 int yyparse ();
01087 #endif
01088 #endif
01089
01090
01091
01092
01093
01094
01095
01096
01097
01098
01099 #ifdef YYPARSE_PARAM
01100 #if (defined __STDC__ || defined __C99__FUNC__ \
01101 || defined __cplusplus || defined _MSC_VER)
01102 int
01103 yyparse (void *YYPARSE_PARAM)
01104 #else
01105 int
01106 yyparse (YYPARSE_PARAM)
01107 void *YYPARSE_PARAM;
01108 #endif
01109 #else
01110 #if (defined __STDC__ || defined __C99__FUNC__ \
01111 || defined __cplusplus || defined _MSC_VER)
01112 int
01113 yyparse (void)
01114 #else
01115 int
01116 yyparse ()
01117
01118 #endif
01119 #endif
01120 {
01121
01122 int yychar;
01123
01124
01125 YYSTYPE yylval;
01126
01127
01128 int yynerrs;
01129
01130 int yystate;
01131 int yyn;
01132 int yyresult;
01133
01134 int yyerrstatus;
01135
01136 int yytoken = 0;
01137 #if YYERROR_VERBOSE
01138
01139 char yymsgbuf[128];
01140 char *yymsg = yymsgbuf;
01141 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
01142 #endif
01143
01144
01145
01146
01147
01148
01149
01150
01151
01152
01153 yytype_int16 yyssa[YYINITDEPTH];
01154 yytype_int16 *yyss = yyssa;
01155 yytype_int16 *yyssp;
01156
01157
01158 YYSTYPE yyvsa[YYINITDEPTH];
01159 YYSTYPE *yyvs = yyvsa;
01160 YYSTYPE *yyvsp;
01161
01162
01163
01164 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
01165
01166 YYSIZE_T yystacksize = YYINITDEPTH;
01167
01168
01169
01170 YYSTYPE yyval;
01171
01172
01173
01174
01175 int yylen = 0;
01176
01177 YYDPRINTF ((stderr, "Starting parse\n"));
01178
01179 yystate = 0;
01180 yyerrstatus = 0;
01181 yynerrs = 0;
01182 yychar = YYEMPTY;
01183
01184
01185
01186
01187
01188
01189 yyssp = yyss;
01190 yyvsp = yyvs;
01191
01192 goto yysetstate;
01193
01194
01195
01196
01197 yynewstate:
01198
01199
01200 yyssp++;
01201
01202 yysetstate:
01203 *yyssp = yystate;
01204
01205 if (yyss + yystacksize - 1 <= yyssp)
01206 {
01207
01208 YYSIZE_T yysize = yyssp - yyss + 1;
01209
01210 #ifdef yyoverflow
01211 {
01212
01213
01214
01215 YYSTYPE *yyvs1 = yyvs;
01216 yytype_int16 *yyss1 = yyss;
01217
01218
01219
01220
01221
01222
01223 yyoverflow (YY_("memory exhausted"),
01224 &yyss1, yysize * sizeof (*yyssp),
01225 &yyvs1, yysize * sizeof (*yyvsp),
01226
01227 &yystacksize);
01228
01229 yyss = yyss1;
01230 yyvs = yyvs1;
01231 }
01232 #else
01233 # ifndef YYSTACK_RELOCATE
01234 goto yyexhaustedlab;
01235 # else
01236
01237 if (YYMAXDEPTH <= yystacksize)
01238 goto yyexhaustedlab;
01239 yystacksize *= 2;
01240 if (YYMAXDEPTH < yystacksize)
01241 yystacksize = YYMAXDEPTH;
01242
01243 {
01244 yytype_int16 *yyss1 = yyss;
01245 union yyalloc *yyptr =
01246 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
01247 if (! yyptr)
01248 goto yyexhaustedlab;
01249 YYSTACK_RELOCATE (yyss);
01250 YYSTACK_RELOCATE (yyvs);
01251
01252 # undef YYSTACK_RELOCATE
01253 if (yyss1 != yyssa)
01254 YYSTACK_FREE (yyss1);
01255 }
01256 # endif
01257 #endif
01258
01259 yyssp = yyss + yysize - 1;
01260 yyvsp = yyvs + yysize - 1;
01261
01262
01263 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
01264 (unsigned long int) yystacksize));
01265
01266 if (yyss + yystacksize - 1 <= yyssp)
01267 YYABORT;
01268 }
01269
01270 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
01271
01272 goto yybackup;
01273
01274
01275
01276
01277 yybackup:
01278
01279
01280
01281
01282
01283 yyn = yypact[yystate];
01284 if (yyn == YYPACT_NINF)
01285 goto yydefault;
01286
01287
01288
01289
01290 if (yychar == YYEMPTY)
01291 {
01292 YYDPRINTF ((stderr, "Reading a token: "));
01293 yychar = YYLEX;
01294 }
01295
01296 if (yychar <= YYEOF)
01297 {
01298 yychar = yytoken = YYEOF;
01299 YYDPRINTF ((stderr, "Now at end of input.\n"));
01300 }
01301 else
01302 {
01303 yytoken = YYTRANSLATE (yychar);
01304 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
01305 }
01306
01307
01308
01309 yyn += yytoken;
01310 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
01311 goto yydefault;
01312 yyn = yytable[yyn];
01313 if (yyn <= 0)
01314 {
01315 if (yyn == 0 || yyn == YYTABLE_NINF)
01316 goto yyerrlab;
01317 yyn = -yyn;
01318 goto yyreduce;
01319 }
01320
01321 if (yyn == YYFINAL)
01322 YYACCEPT;
01323
01324
01325
01326 if (yyerrstatus)
01327 yyerrstatus--;
01328
01329
01330 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
01331
01332
01333 if (yychar != YYEOF)
01334 yychar = YYEMPTY;
01335
01336 yystate = yyn;
01337 *++yyvsp = yylval;
01338
01339 goto yynewstate;
01340
01341
01342
01343
01344
01345 yydefault:
01346 yyn = yydefact[yystate];
01347 if (yyn == 0)
01348 goto yyerrlab;
01349 goto yyreduce;
01350
01351
01352
01353
01354
01355 yyreduce:
01356
01357 yylen = yyr2[yyn];
01358
01359
01360
01361
01362
01363
01364
01365
01366
01367 yyval = yyvsp[1-yylen];
01368
01369
01370 YY_REDUCE_PRINT (yyn);
01371 switch (yyn)
01372 {
01373 case 2:
01374
01375 {
01376 MifluzSearchInput* input = (MifluzSearchInput*)parm;
01377 (yyval.node) = 0;
01378 input->query = 0;
01379 }
01380 break;
01381
01382 case 3:
01383
01384 {
01385 MifluzSearchInput* input = (MifluzSearchInput*)parm;
01386 if((yyval.node) == 0) {
01387
01388
01389
01390 (yyval.node) = (yyvsp[(2) - (2)].node);
01391 } else if((yyval.node)->IsA() == WORD_TREE_OR ||
01392 (yyval.node)->IsA() == WORD_TREE_OPTIONAL) {
01393
01394
01395
01396 WordTreeOperand* op_or = (WordTreeOperand*)(yyval.node);
01397 op_or->cursors = (WordTree**)realloc(op_or->cursors, sizeof(WordTree*) * (op_or->cursors_length + 1));
01398 op_or->cursors[op_or->cursors_length] = (yyvsp[(2) - (2)].node);
01399 op_or->cursors_length++;
01400 (yyval.node) = op_or;
01401 } else {
01402
01403
01404
01405
01406 WordTreeOperand* op_or;
01407 if(input->or_method == WORD_SEARCH_OR)
01408 op_or = new WordTreeOr(input->words, "");
01409 else
01410 op_or = new WordTreeOptional(input->words, "");
01411 op_or->cursors = (WordTree**)malloc(sizeof(WordTree*) * 2);
01412 op_or->cursors_length = 2;
01413 op_or->cursors[0] = (yyval.node);
01414 op_or->cursors[1] = (yyvsp[(2) - (2)].node);
01415 (yyval.node) = op_or;
01416 }
01417 input->query = (yyval.node);
01418 }
01419 break;
01420
01421 case 5:
01422
01423 {
01424 MifluzSearchInput* input = (MifluzSearchInput*)parm;
01425 WordTreeMandatory* mandatory = new WordTreeMandatory(input->words, "");
01426 mandatory->cursors = (WordTree**)malloc(sizeof(WordTree*));
01427 mandatory->cursors_length = 1;
01428 mandatory->cursors[0] = (yyvsp[(2) - (2)].node);
01429 (yyval.node) = mandatory;
01430 }
01431 break;
01432
01433 case 6:
01434
01435 {
01436 MifluzSearchInput* input = (MifluzSearchInput*)parm;
01437 WordTreeNot* op_not = new WordTreeNot(input->words, "");
01438 op_not->cursors = (WordTree**)malloc(sizeof(WordTree*));
01439 op_not->cursors_length = 1;
01440 op_not->cursors[0] = (yyvsp[(2) - (2)].node);
01441 (yyval.node) = op_not;
01442 }
01443 break;
01444
01445 case 9:
01446
01447 {
01448 MifluzSearchInput* input = (MifluzSearchInput*)parm;
01449 if((yyvsp[(2) - (3)].list)->values_length == 1)
01450 (yyval.node) = (yyvsp[(2) - (3)].list)->values[0];
01451 else {
01452 WordTreeNear* near = new WordTreeNear(input->words, "");
01453 near->cursors = (yyvsp[(2) - (3)].list)->values;
01454 near->cursors_length = (yyvsp[(2) - (3)].list)->values_length;
01455 near->proximity = 1;
01456 (yyval.node) = near;
01457 }
01458 }
01459 break;
01460
01461 case 10:
01462
01463 {
01464 (yyval.list) = new WordTreeList((yyvsp[(1) - (1)].node));
01465 }
01466 break;
01467
01468 case 11:
01469
01470 {
01471 (yyvsp[(1) - (2)].list)->Push((yyvsp[(2) - (2)].node));
01472 (yyval.list) = (yyvsp[(1) - (2)].list);
01473 }
01474 break;
01475
01476
01477
01478
01479 default: break;
01480 }
01481 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
01482
01483 YYPOPSTACK (yylen);
01484 yylen = 0;
01485 YY_STACK_PRINT (yyss, yyssp);
01486
01487 *++yyvsp = yyval;
01488
01489
01490
01491
01492
01493
01494 yyn = yyr1[yyn];
01495
01496 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
01497 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
01498 yystate = yytable[yystate];
01499 else
01500 yystate = yydefgoto[yyn - YYNTOKENS];
01501
01502 goto yynewstate;
01503
01504
01505
01506
01507
01508 yyerrlab:
01509
01510 if (!yyerrstatus)
01511 {
01512 ++yynerrs;
01513 #if ! YYERROR_VERBOSE
01514 yyerror (YY_("syntax error"));
01515 #else
01516 {
01517 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
01518 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
01519 {
01520 YYSIZE_T yyalloc = 2 * yysize;
01521 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
01522 yyalloc = YYSTACK_ALLOC_MAXIMUM;
01523 if (yymsg != yymsgbuf)
01524 YYSTACK_FREE (yymsg);
01525 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
01526 if (yymsg)
01527 yymsg_alloc = yyalloc;
01528 else
01529 {
01530 yymsg = yymsgbuf;
01531 yymsg_alloc = sizeof yymsgbuf;
01532 }
01533 }
01534
01535 if (0 < yysize && yysize <= yymsg_alloc)
01536 {
01537 (void) yysyntax_error (yymsg, yystate, yychar);
01538 yyerror (yymsg);
01539 }
01540 else
01541 {
01542 yyerror (YY_("syntax error"));
01543 if (yysize != 0)
01544 goto yyexhaustedlab;
01545 }
01546 }
01547 #endif
01548 }
01549
01550
01551
01552 if (yyerrstatus == 3)
01553 {
01554
01555
01556
01557 if (yychar <= YYEOF)
01558 {
01559
01560 if (yychar == YYEOF)
01561 YYABORT;
01562 }
01563 else
01564 {
01565 yydestruct ("Error: discarding",
01566 yytoken, &yylval);
01567 yychar = YYEMPTY;
01568 }
01569 }
01570
01571
01572
01573 goto yyerrlab1;
01574
01575
01576
01577
01578
01579 yyerrorlab:
01580
01581
01582
01583
01584 if ( 0)
01585 goto yyerrorlab;
01586
01587
01588
01589 YYPOPSTACK (yylen);
01590 yylen = 0;
01591 YY_STACK_PRINT (yyss, yyssp);
01592 yystate = *yyssp;
01593 goto yyerrlab1;
01594
01595
01596
01597
01598
01599 yyerrlab1:
01600 yyerrstatus = 3;
01601
01602 for (;;)
01603 {
01604 yyn = yypact[yystate];
01605 if (yyn != YYPACT_NINF)
01606 {
01607 yyn += YYTERROR;
01608 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
01609 {
01610 yyn = yytable[yyn];
01611 if (0 < yyn)
01612 break;
01613 }
01614 }
01615
01616
01617 if (yyssp == yyss)
01618 YYABORT;
01619
01620
01621 yydestruct ("Error: popping",
01622 yystos[yystate], yyvsp);
01623 YYPOPSTACK (1);
01624 yystate = *yyssp;
01625 YY_STACK_PRINT (yyss, yyssp);
01626 }
01627
01628 if (yyn == YYFINAL)
01629 YYACCEPT;
01630
01631 *++yyvsp = yylval;
01632
01633
01634
01635 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
01636
01637 yystate = yyn;
01638 goto yynewstate;
01639
01640
01641
01642
01643
01644 yyacceptlab:
01645 yyresult = 0;
01646 goto yyreturn;
01647
01648
01649
01650
01651 yyabortlab:
01652 yyresult = 1;
01653 goto yyreturn;
01654
01655 #ifndef yyoverflow
01656
01657
01658
01659 yyexhaustedlab:
01660 yyerror (YY_("memory exhausted"));
01661 yyresult = 2;
01662
01663 #endif
01664
01665 yyreturn:
01666 if (yychar != YYEOF && yychar != YYEMPTY)
01667 yydestruct ("Cleanup: discarding lookahead",
01668 yytoken, &yylval);
01669
01670
01671 YYPOPSTACK (yylen);
01672 YY_STACK_PRINT (yyss, yyssp);
01673 while (yyssp != yyss)
01674 {
01675 yydestruct ("Cleanup: popping",
01676 yystos[*yyssp], yyvsp);
01677 YYPOPSTACK (1);
01678 }
01679 #ifndef yyoverflow
01680 if (yyss != yyssa)
01681 YYSTACK_FREE (yyss);
01682 #endif
01683 #if YYERROR_VERBOSE
01684 if (yymsg != yymsgbuf)
01685 YYSTACK_FREE (yymsg);
01686 #endif
01687
01688 return YYID (yyresult);
01689 }
01690
01691
01692
01693
01694
01695 #include <ctype.h>
01696
01697 static int search_lex(YYSTYPE *lvalp, void* inputp)
01698 {
01699 MifluzSearchInput* input = (MifluzSearchInput*)inputp;
01700 char* word = 0;
01701 int word_length = 0;
01702 int& pointer = input->pointer;
01703 char*& buffer = input->buffer;
01704 int& buffer_length = input->buffer_length;
01705 WordTree*& literal = lvalp->node;
01706 literal = 0;
01707
01708 while(pointer < buffer_length) {
01709 switch(buffer[pointer]) {
01710 case '"':
01711 case '+':
01712 case '-':
01713 return buffer[pointer++];
01714 break;
01715 default:
01716 if(isalnum(buffer[pointer])) {
01717 word = buffer + pointer;
01718 while(pointer < buffer_length && isalnum(buffer[pointer]) && word_length < input->maximum_word_length) {
01719 buffer[pointer] = tolower(buffer[pointer]);
01720 word_length++;
01721 pointer++;
01722 }
01723
01724
01725
01726 while(pointer < buffer_length && isalnum(buffer[pointer]))
01727 pointer++;
01728
01729 input->words_verbatim.Add(new String(word, word_length));
01730 char* word_unaccent = 0;
01731 size_t word_unaccent_length = 0;
01732 if(unac_string(input->charset, word, word_length, &word_unaccent, &word_unaccent_length) == -1) {
01733 fprintf(stderr, "search_lex: unaccent failed");
01734 perror("");
01735 return EOF;
01736 }
01737 input->words_unaccent.Add(new String(word_unaccent, word_unaccent_length));
01738 literal = new WordTreeLiteral(input->words, word_unaccent, word_unaccent_length, "");
01739 free(word_unaccent);
01740 return T_WORD;
01741 } else
01742 pointer++;
01743 }
01744 }
01745
01746 return 0;
01747 }
01748
01749 static int search_error(char* message)
01750 {
01751 fprintf(stderr, "search_parser: %s\n", message);
01752 return 0;
01753 }
01754
01755
01756
01757
01758
01759
01760