msi: Set the source path for uncompressed files when loading the file.
[wine] / dlls / msi / sql.y
1 %{
2
3 /*
4  * Implementation of the Microsoft Installer (msi.dll)
5  *
6  * Copyright 2002-2004 Mike McCormack for CodeWeavers
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21  */
22
23
24 #include "config.h"
25
26 #include <stdarg.h>
27 #include <stdio.h>
28 #include <stdlib.h>
29
30 #include "windef.h"
31 #include "winbase.h"
32 #include "query.h"
33 #include "wine/list.h"
34 #include "wine/debug.h"
35
36 #define YYLEX_PARAM info
37 #define YYPARSE_PARAM info
38
39 static int sql_error(const char *str);
40
41 WINE_DEFAULT_DEBUG_CHANNEL(msi);
42
43 typedef struct tag_SQL_input
44 {
45     MSIDATABASE *db;
46     LPCWSTR command;
47     DWORD n, len;
48     MSIVIEW **view;  /* view structure for the resulting query */
49     struct list *mem;
50 } SQL_input;
51
52 static LPWSTR SQL_getstring( void *info, const struct sql_str *str );
53 static INT SQL_getint( void *info );
54 static int sql_lex( void *SQL_lval, SQL_input *info );
55
56 static LPWSTR parser_add_table( LPWSTR list, LPWSTR table );
57 static void *parser_alloc( void *info, unsigned int sz );
58 static column_info *parser_alloc_column( void *info, LPCWSTR table, LPCWSTR column );
59
60 static BOOL SQL_MarkPrimaryKeys( column_info *cols, column_info *keys);
61
62 static struct expr * EXPR_complex( void *info, struct expr *l, UINT op, struct expr *r );
63 static struct expr * EXPR_unary( void *info, struct expr *l, UINT op );
64 static struct expr * EXPR_column( void *info, const column_info *column );
65 static struct expr * EXPR_ival( void *info, int val );
66 static struct expr * EXPR_sval( void *info, const struct sql_str *str );
67 static struct expr * EXPR_wildcard( void *info );
68
69 %}
70
71 %pure-parser
72
73 %union
74 {
75     struct sql_str str;
76     LPWSTR string;
77     column_info *column_list;
78     MSIVIEW *query;
79     struct expr *expr;
80     USHORT column_type;
81     int integer;
82 }
83
84 %token TK_ALTER TK_AND TK_BY TK_CHAR TK_COMMA TK_CREATE TK_DELETE
85 %token TK_DISTINCT TK_DOT TK_EQ TK_FREE TK_FROM TK_GE TK_GT TK_HOLD TK_ADD
86 %token <str> TK_ID
87 %token TK_ILLEGAL TK_INSERT TK_INT
88 %token <str> TK_INTEGER
89 %token TK_INTO TK_IS TK_KEY TK_LE TK_LONG TK_LONGCHAR TK_LP TK_LT
90 %token TK_LOCALIZABLE TK_MINUS TK_NE TK_NOT TK_NULL
91 %token TK_OBJECT TK_OR TK_ORDER TK_PRIMARY TK_RP
92 %token TK_SELECT TK_SET TK_SHORT TK_SPACE TK_STAR
93 %token <str> TK_STRING
94 %token TK_TABLE TK_TEMPORARY TK_UPDATE TK_VALUES TK_WHERE TK_WILDCARD
95
96 /*
97  * These are extra tokens used by the lexer but never seen by the
98  * parser.  We put them in a rule so that the parser generator will
99  * add them to the parse.h output file.
100  *
101  */
102 %nonassoc END_OF_FILE ILLEGAL SPACE UNCLOSED_STRING COMMENT FUNCTION
103           COLUMN AGG_FUNCTION.
104
105 %type <string> table tablelist id
106 %type <column_list> selcollist column column_and_type column_def table_def
107 %type <column_list> column_assignment update_assign_list constlist
108 %type <query> query from fromtable selectfrom unorderedsel
109 %type <query> oneupdate onedelete oneselect onequery onecreate oneinsert onealter
110 %type <expr> expr val column_val const_val
111 %type <column_type> column_type data_type data_type_l data_count
112 %type <integer> number alterop
113
114 /* Reference: http://mates.ms.mff.cuni.cz/oracle/doc/ora815nt/server.815/a67779/operator.htm */
115 %left TK_OR
116 %left TK_AND
117 %left TK_NOT
118 %left TK_EQ TK_NE TK_LT TK_GT TK_LE TK_GE TK_LIKE
119 %right TK_NEGATION
120
121 %%
122
123 query:
124     onequery
125     {
126         SQL_input* sql = (SQL_input*) info;
127         *sql->view = $1;
128     }
129     ;
130
131 onequery:
132     oneselect
133   | onecreate
134   | oneinsert
135   | oneupdate
136   | onedelete
137   | onealter
138     ;
139
140 oneinsert:
141     TK_INSERT TK_INTO table TK_LP selcollist TK_RP TK_VALUES TK_LP constlist TK_RP
142         {
143             SQL_input *sql = (SQL_input*) info;
144             MSIVIEW *insert = NULL;
145
146             INSERT_CreateView( sql->db, &insert, $3, $5, $9, FALSE );
147             if( !insert )
148                 YYABORT;
149             $$ = insert;
150         }
151   | TK_INSERT TK_INTO table TK_LP selcollist TK_RP TK_VALUES TK_LP constlist TK_RP TK_TEMPORARY
152         {
153             SQL_input *sql = (SQL_input*) info;
154             MSIVIEW *insert = NULL;
155
156             INSERT_CreateView( sql->db, &insert, $3, $5, $9, TRUE );
157             if( !insert )
158                 YYABORT;
159             $$ = insert;
160         }
161     ;
162
163 onecreate:
164     TK_CREATE TK_TABLE table TK_LP table_def TK_RP
165         {
166             SQL_input* sql = (SQL_input*) info;
167             MSIVIEW *create = NULL;
168
169             if( !$5 )
170                 YYABORT;
171             CREATE_CreateView( sql->db, &create, $3, $5, FALSE );
172             if( !create )
173                 YYABORT;
174             $$ = create;
175         }
176   | TK_CREATE TK_TABLE table TK_LP table_def TK_RP TK_HOLD
177         {
178             SQL_input* sql = (SQL_input*) info;
179             MSIVIEW *create = NULL;
180
181             if( !$5 )
182                 YYABORT;
183             CREATE_CreateView( sql->db, &create, $3, $5, TRUE );
184             if( !create )
185                 YYABORT;
186             $$ = create;
187         }
188     ;
189
190 oneupdate:
191     TK_UPDATE table TK_SET update_assign_list TK_WHERE expr
192         {
193             SQL_input* sql = (SQL_input*) info;
194             MSIVIEW *update = NULL;
195
196             UPDATE_CreateView( sql->db, &update, $2, $4, $6 );
197             if( !update )
198                 YYABORT;
199             $$ = update;
200         }
201   | TK_UPDATE table TK_SET update_assign_list
202         {
203             SQL_input* sql = (SQL_input*) info;
204             MSIVIEW *update = NULL;
205
206             UPDATE_CreateView( sql->db, &update, $2, $4, NULL );
207             if( !update )
208                 YYABORT;
209             $$ = update;
210         }
211     ;
212
213 onedelete:
214     TK_DELETE from
215         {
216             SQL_input* sql = (SQL_input*) info;
217             MSIVIEW *delete = NULL;
218
219             DELETE_CreateView( sql->db, &delete, $2 );
220             if( !delete )
221                 YYABORT;
222             $$ = delete;
223         }
224     ;
225
226 onealter:
227     TK_ALTER TK_TABLE table alterop
228         {
229             SQL_input* sql = (SQL_input*) info;
230             MSIVIEW *alter = NULL;
231
232             ALTER_CreateView( sql->db, &alter, $3, NULL, $4 );
233             if( !alter )
234                 YYABORT;
235             $$ = alter;
236         }
237   | TK_ALTER TK_TABLE table TK_ADD column_and_type
238         {
239             SQL_input *sql = (SQL_input *)info;
240             MSIVIEW *alter = NULL;
241
242             ALTER_CreateView( sql->db, &alter, $3, $5, 0 );
243             if (!alter)
244                 YYABORT;
245             $$ = alter;
246         }
247   | TK_ALTER TK_TABLE table TK_ADD column_and_type TK_HOLD
248         {
249             SQL_input *sql = (SQL_input *)info;
250             MSIVIEW *alter = NULL;
251
252             ALTER_CreateView( sql->db, &alter, $3, $5, 1 );
253             if (!alter)
254                 YYABORT;
255             $$ = alter;
256         }
257     ;
258
259 alterop:
260     TK_HOLD
261         {
262             $$ = 1;
263         }
264   | TK_FREE
265         {
266             $$ = -1;
267         }
268   ;
269
270 table_def:
271     column_def TK_PRIMARY TK_KEY selcollist
272         {
273             if( SQL_MarkPrimaryKeys( $1, $4 ) )
274                 $$ = $1;
275             else
276                 $$ = NULL;
277         }
278     ;
279
280 column_def:
281     column_def TK_COMMA column_and_type
282         {
283             column_info *ci;
284
285             for( ci = $1; ci->next; ci = ci->next )
286                 ;
287
288             ci->next = $3;
289             $$ = $1;
290         }
291   | column_and_type
292         {
293             $$ = $1;
294         }
295     ;
296
297 column_and_type:
298     column column_type
299         {
300             $$ = $1;
301             $$->type = ($2 | MSITYPE_VALID);
302             $$->temporary = $2 & MSITYPE_TEMPORARY ? TRUE : FALSE;
303         }
304     ;
305
306 column_type:
307     data_type_l
308         {
309             $$ = $1;
310         }
311   | data_type_l TK_LOCALIZABLE
312         {
313             $$ = $1 | MSITYPE_LOCALIZABLE;
314         }
315   | data_type_l TK_TEMPORARY
316         {
317             $$ = $1 | MSITYPE_TEMPORARY;
318         }
319     ;
320
321 data_type_l:
322     data_type
323         {
324             $$ |= MSITYPE_NULLABLE;
325         }
326   | data_type TK_NOT TK_NULL
327         {
328             $$ = $1;
329         }
330     ;
331
332 data_type:
333     TK_CHAR
334         {
335             $$ = MSITYPE_STRING | 1;
336         }
337   | TK_CHAR TK_LP data_count TK_RP
338         {
339             $$ = MSITYPE_STRING | 0x400 | $3;
340         }
341   | TK_LONGCHAR
342         {
343             $$ = 2;
344         }
345   | TK_SHORT
346         {
347             $$ = 2;
348         }
349   | TK_INT
350         {
351             $$ = 2;
352         }
353   | TK_LONG
354         {
355             $$ = 4;
356         }
357   | TK_OBJECT
358         {
359             $$ = MSITYPE_STRING | MSITYPE_VALID;
360         }
361     ;
362
363 data_count:
364     number
365         {
366             if( ( $1 > 255 ) || ( $1 < 0 ) )
367                 YYABORT;
368             $$ = $1;
369         }
370     ;
371
372 oneselect:
373     unorderedsel TK_ORDER TK_BY selcollist
374         {
375             UINT r;
376
377             if( $4 )
378             {
379                 r = $1->ops->sort( $1, $4 );
380                 if ( r != ERROR_SUCCESS)
381                     YYABORT;
382             }
383
384             $$ = $1;
385         }
386   | unorderedsel
387     ;
388
389 unorderedsel:
390     TK_SELECT selectfrom
391         {
392             $$ = $2;
393         }
394   | TK_SELECT TK_DISTINCT selectfrom
395         {
396             SQL_input* sql = (SQL_input*) info;
397             UINT r;
398
399             $$ = NULL;
400             r = DISTINCT_CreateView( sql->db, &$$, $3 );
401             if (r != ERROR_SUCCESS)
402             {
403                 $3->ops->delete($3);
404                 YYABORT;
405             }
406         }
407     ;
408
409 selectfrom:
410     selcollist from
411         {
412             SQL_input* sql = (SQL_input*) info;
413             UINT r;
414
415             $$ = NULL;
416             if( $1 )
417             {
418                 r = SELECT_CreateView( sql->db, &$$, $2, $1 );
419                 if (r != ERROR_SUCCESS)
420                 {
421                     $2->ops->delete($2);
422                     YYABORT;
423                 }
424             }
425             else
426                 $$ = $2;
427         }
428     ;
429
430 selcollist:
431     column
432   | column TK_COMMA selcollist
433         {
434             $1->next = $3;
435         }
436   | TK_STAR
437         {
438             $$ = NULL;
439         }
440     ;
441
442 from:
443     fromtable
444   | fromtable TK_WHERE expr
445         {
446             SQL_input* sql = (SQL_input*) info;
447             UINT r;
448
449             $$ = NULL;
450             r = WHERE_CreateView( sql->db, &$$, $1, $3 );
451             if( r != ERROR_SUCCESS )
452             {
453                 $1->ops->delete( $1 );
454                 YYABORT;
455             }
456         }
457     ;
458
459 fromtable:
460     TK_FROM table
461         {
462             SQL_input* sql = (SQL_input*) info;
463             UINT r;
464
465             $$ = NULL;
466             r = TABLE_CreateView( sql->db, $2, &$$ );
467             if( r != ERROR_SUCCESS || !$$ )
468                 YYABORT;
469         }
470   | TK_FROM tablelist
471         {
472             SQL_input* sql = (SQL_input*) info;
473             UINT r;
474
475             r = JOIN_CreateView( sql->db, &$$, $2 );
476             msi_free( $2 );
477             if( r != ERROR_SUCCESS )
478                 YYABORT;
479         }
480     ;
481
482 tablelist:
483     table
484         {
485             $$ = strdupW($1);
486         }
487   |
488     table TK_COMMA tablelist
489         {
490             $$ = parser_add_table($3, $1);
491             if (!$$)
492                 YYABORT;
493         }
494     ;
495
496 expr:
497     TK_LP expr TK_RP
498         {
499             $$ = $2;
500             if( !$$ )
501                 YYABORT;
502         }
503   | expr TK_AND expr
504         {
505             $$ = EXPR_complex( info, $1, OP_AND, $3 );
506             if( !$$ )
507                 YYABORT;
508         }
509   | expr TK_OR expr
510         {
511             $$ = EXPR_complex( info, $1, OP_OR, $3 );
512             if( !$$ )
513                 YYABORT;
514         }
515   | column_val TK_EQ val
516         {
517             $$ = EXPR_complex( info, $1, OP_EQ, $3 );
518             if( !$$ )
519                 YYABORT;
520         }
521   | column_val TK_GT val
522         {
523             $$ = EXPR_complex( info, $1, OP_GT, $3 );
524             if( !$$ )
525                 YYABORT;
526         }
527   | column_val TK_LT val
528         {
529             $$ = EXPR_complex( info, $1, OP_LT, $3 );
530             if( !$$ )
531                 YYABORT;
532         }
533   | column_val TK_LE val
534         {
535             $$ = EXPR_complex( info, $1, OP_LE, $3 );
536             if( !$$ )
537                 YYABORT;
538         }
539   | column_val TK_GE val
540         {
541             $$ = EXPR_complex( info, $1, OP_GE, $3 );
542             if( !$$ )
543                 YYABORT;
544         }
545   | column_val TK_NE val
546         {
547             $$ = EXPR_complex( info, $1, OP_NE, $3 );
548             if( !$$ )
549                 YYABORT;
550         }
551   | column_val TK_IS TK_NULL
552         {
553             $$ = EXPR_unary( info, $1, OP_ISNULL );
554             if( !$$ )
555                 YYABORT;
556         }
557   | column_val TK_IS TK_NOT TK_NULL
558         {
559             $$ = EXPR_unary( info, $1, OP_NOTNULL );
560             if( !$$ )
561                 YYABORT;
562         }
563     ;
564
565 val:
566     column_val
567   | const_val
568     ;
569
570 constlist:
571     const_val
572         {
573             $$ = parser_alloc_column( info, NULL, NULL );
574             if( !$$ )
575                 YYABORT;
576             $$->val = $1;
577         }
578   | const_val TK_COMMA constlist
579         {
580             $$ = parser_alloc_column( info, NULL, NULL );
581             if( !$$ )
582                 YYABORT;
583             $$->val = $1;
584             $$->next = $3;
585         }
586     ;
587
588 update_assign_list:
589     column_assignment
590   | column_assignment TK_COMMA update_assign_list
591         {
592             $$ = $1;
593             $$->next = $3;
594         }
595     ;
596
597 column_assignment:
598     column TK_EQ const_val
599         {
600             $$ = $1;
601             $$->val = $3;
602         }
603     ;
604
605 const_val:
606     number
607         {
608             $$ = EXPR_ival( info, $1 );
609             if( !$$ )
610                 YYABORT;
611         }
612   | TK_MINUS number %prec TK_NEGATION
613         {
614             $$ = EXPR_ival( info, -$2 );
615             if( !$$ )
616                 YYABORT;
617         }
618   | TK_STRING
619         {
620             $$ = EXPR_sval( info, &$1 );
621             if( !$$ )
622                 YYABORT;
623         }
624   | TK_WILDCARD
625         {
626             $$ = EXPR_wildcard( info );
627             if( !$$ )
628                 YYABORT;
629         }
630     ;
631
632 column_val:
633     column
634         {
635             $$ = EXPR_column( info, $1 );
636             if( !$$ )
637                 YYABORT;
638         }
639     ;
640
641 column:
642     table TK_DOT id
643         {
644             $$ = parser_alloc_column( info, $1, $3 );
645             if( !$$ )
646                 YYABORT;
647         }
648   | id
649         {
650             $$ = parser_alloc_column( info, NULL, $1 );
651             if( !$$ )
652                 YYABORT;
653         }
654     ;
655
656 table:
657     id
658         {
659             $$ = $1;
660         }
661     ;
662
663 id:
664     TK_ID
665         {
666             $$ = SQL_getstring( info, &$1 );
667             if( !$$ )
668                 YYABORT;
669         }
670     ;
671
672 number:
673     TK_INTEGER
674         {
675             $$ = SQL_getint( info );
676         }
677     ;
678
679 %%
680
681 static LPWSTR parser_add_table(LPWSTR list, LPWSTR table)
682 {
683     DWORD size = lstrlenW(list) + lstrlenW(table) + 2;
684     static const WCHAR space[] = {' ',0};
685
686     list = msi_realloc(list, size * sizeof(WCHAR));
687     if (!list) return NULL;
688
689     lstrcatW(list, space);
690     lstrcatW(list, table);
691     return list;
692 }
693
694 static void *parser_alloc( void *info, unsigned int sz )
695 {
696     SQL_input* sql = (SQL_input*) info;
697     struct list *mem;
698
699     mem = msi_alloc( sizeof (struct list) + sz );
700     list_add_tail( sql->mem, mem );
701     return &mem[1];
702 }
703
704 static column_info *parser_alloc_column( void *info, LPCWSTR table, LPCWSTR column )
705 {
706     column_info *col;
707
708     col = parser_alloc( info, sizeof (*col) );
709     if( col )
710     {
711         col->table = table;
712         col->column = column;
713         col->val = NULL;
714         col->type = 0;
715         col->next = NULL;
716     }
717
718     return col;
719 }
720
721 static int sql_lex( void *SQL_lval, SQL_input *sql )
722 {
723     int token;
724     struct sql_str * str = SQL_lval;
725
726     do
727     {
728         sql->n += sql->len;
729         if( ! sql->command[sql->n] )
730             return 0;  /* end of input */
731
732         /* TRACE("string : %s\n", debugstr_w(&sql->command[sql->n])); */
733         sql->len = sqliteGetToken( &sql->command[sql->n], &token );
734         if( sql->len==0 )
735             break;
736         str->data = &sql->command[sql->n];
737         str->len = sql->len;
738     }
739     while( token == TK_SPACE );
740
741     /* TRACE("token : %d (%s)\n", token, debugstr_wn(&sql->command[sql->n], sql->len)); */
742
743     return token;
744 }
745
746 LPWSTR SQL_getstring( void *info, const struct sql_str *strdata )
747 {
748     LPCWSTR p = strdata->data;
749     UINT len = strdata->len;
750     LPWSTR str;
751
752     /* if there's quotes, remove them */
753     if( ( (p[0]=='`') && (p[len-1]=='`') ) ||
754         ( (p[0]=='\'') && (p[len-1]=='\'') ) )
755     {
756         p++;
757         len -= 2;
758     }
759     str = parser_alloc( info, (len + 1)*sizeof(WCHAR) );
760     if( !str )
761         return str;
762     memcpy( str, p, len*sizeof(WCHAR) );
763     str[len]=0;
764
765     return str;
766 }
767
768 INT SQL_getint( void *info )
769 {
770     SQL_input* sql = (SQL_input*) info;
771     LPCWSTR p = &sql->command[sql->n];
772     INT i, r = 0;
773
774     for( i=0; i<sql->len; i++ )
775     {
776         if( '0' > p[i] || '9' < p[i] )
777         {
778             ERR("should only be numbers here!\n");
779             break;
780         }
781         r = (p[i]-'0') + r*10;
782     }
783
784     return r;
785 }
786
787 static int sql_error( const char *str )
788 {
789     return 0;
790 }
791
792 static struct expr * EXPR_wildcard( void *info )
793 {
794     struct expr *e = parser_alloc( info, sizeof *e );
795     if( e )
796     {
797         e->type = EXPR_WILDCARD;
798     }
799     return e;
800 }
801
802 static struct expr * EXPR_complex( void *info, struct expr *l, UINT op, struct expr *r )
803 {
804     struct expr *e = parser_alloc( info, sizeof *e );
805     if( e )
806     {
807         e->type = EXPR_COMPLEX;
808         e->u.expr.left = l;
809         e->u.expr.op = op;
810         e->u.expr.right = r;
811     }
812     return e;
813 }
814
815 static struct expr * EXPR_unary( void *info, struct expr *l, UINT op )
816 {
817     struct expr *e = parser_alloc( info, sizeof *e );
818     if( e )
819     {
820         e->type = EXPR_UNARY;
821         e->u.expr.left = l;
822         e->u.expr.op = op;
823         e->u.expr.right = NULL;
824     }
825     return e;
826 }
827
828 static struct expr * EXPR_column( void *info, const column_info *column )
829 {
830     struct expr *e = parser_alloc( info, sizeof *e );
831     if( e )
832     {
833         e->type = EXPR_COLUMN;
834         e->u.sval = column->column;
835     }
836     return e;
837 }
838
839 static struct expr * EXPR_ival( void *info, int val )
840 {
841     struct expr *e = parser_alloc( info, sizeof *e );
842     if( e )
843     {
844         e->type = EXPR_IVAL;
845         e->u.ival = val;
846     }
847     return e;
848 }
849
850 static struct expr * EXPR_sval( void *info, const struct sql_str *str )
851 {
852     struct expr *e = parser_alloc( info, sizeof *e );
853     if( e )
854     {
855         e->type = EXPR_SVAL;
856         e->u.sval = SQL_getstring( info, str );
857     }
858     return e;
859 }
860
861 static BOOL SQL_MarkPrimaryKeys( column_info *cols,
862                                  column_info *keys )
863 {
864     column_info *k;
865     BOOL found = TRUE;
866
867     for( k = keys; k && found; k = k->next )
868     {
869         column_info *c;
870
871         found = FALSE;
872         for( c = cols; c && !found; c = c->next )
873         {
874              if( lstrcmpW( k->column, c->column ) )
875                  continue;
876              c->type |= MSITYPE_KEY;
877              found = TRUE;
878         }
879     }
880
881     return found;
882 }
883
884 UINT MSI_ParseSQL( MSIDATABASE *db, LPCWSTR command, MSIVIEW **phview,
885                    struct list *mem )
886 {
887     SQL_input sql;
888     int r;
889
890     *phview = NULL;
891
892     sql.db = db;
893     sql.command = command;
894     sql.n = 0;
895     sql.len = 0;
896     sql.view = phview;
897     sql.mem = mem;
898
899     r = sql_parse(&sql);
900
901     TRACE("Parse returned %d\n", r);
902     if( r )
903     {
904         *sql.view = NULL;
905         return ERROR_BAD_QUERY_SYNTAX;
906     }
907
908     return ERROR_SUCCESS;
909 }