feature_1428.patch

Ruben S. Montero, 08/28/2012 03:03 PM

Download (70.1 KB)

View differences:

include/PoolObjectSQL.h
150 150
        return gid;
151 151
    };
152 152

  
153
    const string& get_uname() const
154
    {
155
        return uname;
156
    };
157

  
158
    const string& get_gname() const
159
    {
160
        return gname;
161
    };
162
    
153 163
    /**
154 164
     * Changes the object's owner
155 165
     * @param _uid New User ID
src/template/template_parser.c
28 28
#define FLEX_SCANNER
29 29
#define YY_FLEX_MAJOR_VERSION 2
30 30
#define YY_FLEX_MINOR_VERSION 5
31
#define YY_FLEX_SUBMINOR_VERSION 35
31
#define YY_FLEX_SUBMINOR_VERSION 37
32 32
#if YY_FLEX_SUBMINOR_VERSION > 0
33 33
#define FLEX_BETA
34 34
#endif
......
73 73
typedef unsigned char flex_uint8_t; 
74 74
typedef unsigned short int flex_uint16_t;
75 75
typedef unsigned int flex_uint32_t;
76
#endif /* ! C99 */
77 76

  
78 77
/* Limits of integral types. */
79 78
#ifndef INT8_MIN
......
104 103
#define UINT32_MAX             (4294967295U)
105 104
#endif
106 105

  
106
#endif /* ! C99 */
107

  
107 108
#endif /* ! FLEXINT_H */
108 109

  
109 110
#ifdef __cplusplus
......
172 173
typedef struct yy_buffer_state *YY_BUFFER_STATE;
173 174
#endif
174 175

  
175
extern int template_leng;
176
#ifndef YY_TYPEDEF_YY_SIZE_T
177
#define YY_TYPEDEF_YY_SIZE_T
178
typedef size_t yy_size_t;
179
#endif
180

  
181
extern yy_size_t template_leng;
176 182

  
177 183
extern FILE *template_in, *template_out;
178 184

  
......
211 217

  
212 218
#define unput(c) yyunput( c, (yytext_ptr)  )
213 219

  
214
#ifndef YY_TYPEDEF_YY_SIZE_T
215
#define YY_TYPEDEF_YY_SIZE_T
216
typedef size_t yy_size_t;
217
#endif
218

  
219 220
#ifndef YY_STRUCT_YY_BUFFER_STATE
220 221
#define YY_STRUCT_YY_BUFFER_STATE
221 222
struct yy_buffer_state
......
233 234
	/* Number of characters read into yy_ch_buf, not including EOB
234 235
	 * characters.
235 236
	 */
236
	int yy_n_chars;
237
	yy_size_t yy_n_chars;
237 238

  
238 239
	/* Whether we "own" the buffer - i.e., we know we created it,
239 240
	 * and can realloc() it to grow it, and should free() it to
......
303 304

  
304 305
/* yy_hold_char holds the character lost when template_text is formed. */
305 306
static char yy_hold_char;
306
static int yy_n_chars;		/* number of characters read into yy_ch_buf */
307
int template_leng;
307
static yy_size_t yy_n_chars;		/* number of characters read into yy_ch_buf */
308
yy_size_t template_leng;
308 309

  
309 310
/* Points to current character in buffer. */
310 311
static char *yy_c_buf_p = (char *) 0;
......
332 333

  
333 334
YY_BUFFER_STATE template__scan_buffer (char *base,yy_size_t size  );
334 335
YY_BUFFER_STATE template__scan_string (yyconst char *yy_str  );
335
YY_BUFFER_STATE template__scan_bytes (yyconst char *bytes,int len  );
336
YY_BUFFER_STATE template__scan_bytes (yyconst char *bytes,yy_size_t len  );
336 337

  
337 338
void *template_alloc (yy_size_t  );
338 339
void *template_realloc (void *,yy_size_t  );
......
553 554
                        llocp->first_column = llocp->last_column;   \
554 555
                        llocp->last_column += template_leng;
555 556

  
556
#line 557 "template_parser.c"
557
#line 558 "template_parser.c"
557 558

  
558 559
#define INITIAL 0
559 560
#define VALUE 1
......
593 594

  
594 595
void template_set_out  (FILE * out_str  );
595 596

  
596
int template_get_leng (void );
597
yy_size_t template_get_leng (void );
597 598

  
598 599
char *template_get_text (void );
599 600

  
......
652 653
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
653 654
		{ \
654 655
		int c = '*'; \
655
		unsigned n; \
656
		size_t n; \
656 657
		for ( n = 0; n < max_size && \
657 658
			     (c = getc( template_in )) != EOF && c != '\n'; ++n ) \
658 659
			buf[n] = (char) c; \
......
740 741
 /* ------------------------------------------------------------------------- */
741 742
 /* Comments (lines with an starting #), and empty lines                      */
742 743
 /* ------------------------------------------------------------------------- */
743
#line 744 "template_parser.c"
744
#line 745 "template_parser.c"
744 745

  
745 746
	if ( !(yy_init) )
746 747
		{
......
917 918
#line 89 "template_parser.l"
918 919
ECHO;
919 920
	YY_BREAK
920
#line 921 "template_parser.c"
921
#line 922 "template_parser.c"
921 922
case YY_STATE_EOF(INITIAL):
922 923
case YY_STATE_EOF(VALUE):
923 924
	yyterminate();
......
1104 1105

  
1105 1106
	else
1106 1107
		{
1107
			int num_to_read =
1108
			yy_size_t num_to_read =
1108 1109
			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1109 1110

  
1110 1111
		while ( num_to_read <= 0 )
1111 1112
			{ /* Not enough room in the buffer - grow it. */
1112 1113

  
1113 1114
			/* just a shorter name for the current buffer */
1114
			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1115
			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1115 1116

  
1116 1117
			int yy_c_buf_p_offset =
1117 1118
				(int) ((yy_c_buf_p) - b->yy_ch_buf);
1118 1119

  
1119 1120
			if ( b->yy_is_our_buffer )
1120 1121
				{
1121
				int new_size = b->yy_buf_size * 2;
1122
				yy_size_t new_size = b->yy_buf_size * 2;
1122 1123

  
1123 1124
				if ( new_size <= 0 )
1124 1125
					b->yy_buf_size += b->yy_buf_size / 8;
......
1149 1150

  
1150 1151
		/* Read in more data. */
1151 1152
		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1152
			(yy_n_chars), (size_t) num_to_read );
1153
			(yy_n_chars), num_to_read );
1153 1154

  
1154 1155
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1155 1156
		}
......
1244 1245
	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1245 1246
	yy_is_jam = (yy_current_state == 43);
1246 1247

  
1247
	return yy_is_jam ? 0 : yy_current_state;
1248
		return yy_is_jam ? 0 : yy_current_state;
1248 1249
}
1249 1250

  
1250 1251
#ifndef YY_NO_INPUT
......
1271 1272

  
1272 1273
		else
1273 1274
			{ /* need more input */
1274
			int offset = (yy_c_buf_p) - (yytext_ptr);
1275
			yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1275 1276
			++(yy_c_buf_p);
1276 1277

  
1277 1278
			switch ( yy_get_next_buffer(  ) )
......
1436 1437
	template_free((void *) b  );
1437 1438
}
1438 1439

  
1439
#ifndef __cplusplus
1440
extern int isatty (int );
1441
#endif /* __cplusplus */
1442
    
1443 1440
/* Initializes or reinitializes a buffer.
1444 1441
 * This function is sometimes called more than once on the same buffer,
1445 1442
 * such as during a template_restart() or at EOF.
......
1552 1549
 */
1553 1550
static void template_ensure_buffer_stack (void)
1554 1551
{
1555
	int num_to_alloc;
1552
	yy_size_t num_to_alloc;
1556 1553
    
1557 1554
	if (!(yy_buffer_stack)) {
1558 1555

  
......
1644 1641

  
1645 1642
/** Setup the input buffer state to scan the given bytes. The next call to template_lex() will
1646 1643
 * scan from a @e copy of @a bytes.
1647
 * @param bytes the byte buffer to scan
1648
 * @param len the number of bytes in the buffer pointed to by @a bytes.
1644
 * @param yybytes the byte buffer to scan
1645
 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1649 1646
 * 
1650 1647
 * @return the newly allocated buffer state object.
1651 1648
 */
1652
YY_BUFFER_STATE template__scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
1649
YY_BUFFER_STATE template__scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
1653 1650
{
1654 1651
	YY_BUFFER_STATE b;
1655 1652
	char *buf;
......
1736 1733
/** Get the length of the current token.
1737 1734
 * 
1738 1735
 */
1739
int template_get_leng  (void)
1736
yy_size_t template_get_leng  (void)
1740 1737
{
1741 1738
        return template_leng;
1742 1739
}
src/vm/vm_var_parser.c
28 28
#define FLEX_SCANNER
29 29
#define YY_FLEX_MAJOR_VERSION 2
30 30
#define YY_FLEX_MINOR_VERSION 5
31
#define YY_FLEX_SUBMINOR_VERSION 35
31
#define YY_FLEX_SUBMINOR_VERSION 37
32 32
#if YY_FLEX_SUBMINOR_VERSION > 0
33 33
#define FLEX_BETA
34 34
#endif
......
73 73
typedef unsigned char flex_uint8_t; 
74 74
typedef unsigned short int flex_uint16_t;
75 75
typedef unsigned int flex_uint32_t;
76
#endif /* ! C99 */
77 76

  
78 77
/* Limits of integral types. */
79 78
#ifndef INT8_MIN
......
104 103
#define UINT32_MAX             (4294967295U)
105 104
#endif
106 105

  
106
#endif /* ! C99 */
107

  
107 108
#endif /* ! FLEXINT_H */
108 109

  
109 110
#ifdef __cplusplus
......
172 173
typedef struct yy_buffer_state *YY_BUFFER_STATE;
173 174
#endif
174 175

  
175
extern int vm_var_leng;
176
#ifndef YY_TYPEDEF_YY_SIZE_T
177
#define YY_TYPEDEF_YY_SIZE_T
178
typedef size_t yy_size_t;
179
#endif
180

  
181
extern yy_size_t vm_var_leng;
176 182

  
177 183
extern FILE *vm_var_in, *vm_var_out;
178 184

  
......
211 217

  
212 218
#define unput(c) yyunput( c, (yytext_ptr)  )
213 219

  
214
#ifndef YY_TYPEDEF_YY_SIZE_T
215
#define YY_TYPEDEF_YY_SIZE_T
216
typedef size_t yy_size_t;
217
#endif
218

  
219 220
#ifndef YY_STRUCT_YY_BUFFER_STATE
220 221
#define YY_STRUCT_YY_BUFFER_STATE
221 222
struct yy_buffer_state
......
233 234
	/* Number of characters read into yy_ch_buf, not including EOB
234 235
	 * characters.
235 236
	 */
236
	int yy_n_chars;
237
	yy_size_t yy_n_chars;
237 238

  
238 239
	/* Whether we "own" the buffer - i.e., we know we created it,
239 240
	 * and can realloc() it to grow it, and should free() it to
......
303 304

  
304 305
/* yy_hold_char holds the character lost when vm_var_text is formed. */
305 306
static char yy_hold_char;
306
static int yy_n_chars;		/* number of characters read into yy_ch_buf */
307
int vm_var_leng;
307
static yy_size_t yy_n_chars;		/* number of characters read into yy_ch_buf */
308
yy_size_t vm_var_leng;
308 309

  
309 310
/* Points to current character in buffer. */
310 311
static char *yy_c_buf_p = (char *) 0;
......
332 333

  
333 334
YY_BUFFER_STATE vm_var__scan_buffer (char *base,yy_size_t size  );
334 335
YY_BUFFER_STATE vm_var__scan_string (yyconst char *yy_str  );
335
YY_BUFFER_STATE vm_var__scan_bytes (yyconst char *bytes,int len  );
336
YY_BUFFER_STATE vm_var__scan_bytes (yyconst char *bytes,yy_size_t len  );
336 337

  
337 338
void *vm_var_alloc (yy_size_t  );
338 339
void *vm_var_realloc (void *,yy_size_t  );
......
537 538
                        llocp->last_column += vm_var_leng;
538 539

  
539 540

  
540
#line 541 "vm_var_parser.c"
541
#line 542 "vm_var_parser.c"
541 542

  
542 543
#define INITIAL 0
543 544
#define VAR 1
......
578 579

  
579 580
void vm_var_set_out  (FILE * out_str  );
580 581

  
581
int vm_var_get_leng (void );
582
yy_size_t vm_var_get_leng (void );
582 583

  
583 584
char *vm_var_get_text (void );
584 585

  
......
637 638
	if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
638 639
		{ \
639 640
		int c = '*'; \
640
		unsigned n; \
641
		size_t n; \
641 642
		for ( n = 0; n < max_size && \
642 643
			     (c = getc( vm_var_in )) != EOF && c != '\n'; ++n ) \
643 644
			buf[n] = (char) c; \
......
730 731
 /*   $NUM.CONTEXT_VARIABLE                                                   */
731 732
 /* ------------------------------------------------------------------------- */
732 733

  
733
#line 734 "vm_var_parser.c"
734
#line 735 "vm_var_parser.c"
734 735

  
735 736
	if ( !(yy_init) )
736 737
		{
......
906 907
#line 92 "vm_var_parser.l"
907 908
ECHO;
908 909
	YY_BREAK
909
#line 910 "vm_var_parser.c"
910
#line 911 "vm_var_parser.c"
910 911
case YY_STATE_EOF(INITIAL):
911 912
case YY_STATE_EOF(VALUE):
912 913
	yyterminate();
......
1093 1094

  
1094 1095
	else
1095 1096
		{
1096
			int num_to_read =
1097
			yy_size_t num_to_read =
1097 1098
			YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
1098 1099

  
1099 1100
		while ( num_to_read <= 0 )
1100 1101
			{ /* Not enough room in the buffer - grow it. */
1101 1102

  
1102 1103
			/* just a shorter name for the current buffer */
1103
			YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
1104
			YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
1104 1105

  
1105 1106
			int yy_c_buf_p_offset =
1106 1107
				(int) ((yy_c_buf_p) - b->yy_ch_buf);
1107 1108

  
1108 1109
			if ( b->yy_is_our_buffer )
1109 1110
				{
1110
				int new_size = b->yy_buf_size * 2;
1111
				yy_size_t new_size = b->yy_buf_size * 2;
1111 1112

  
1112 1113
				if ( new_size <= 0 )
1113 1114
					b->yy_buf_size += b->yy_buf_size / 8;
......
1138 1139

  
1139 1140
		/* Read in more data. */
1140 1141
		YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
1141
			(yy_n_chars), (size_t) num_to_read );
1142
			(yy_n_chars), num_to_read );
1142 1143

  
1143 1144
		YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
1144 1145
		}
......
1233 1234
	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1234 1235
	yy_is_jam = (yy_current_state == 33);
1235 1236

  
1236
	return yy_is_jam ? 0 : yy_current_state;
1237
		return yy_is_jam ? 0 : yy_current_state;
1237 1238
}
1238 1239

  
1239 1240
#ifndef YY_NO_INPUT
......
1260 1261

  
1261 1262
		else
1262 1263
			{ /* need more input */
1263
			int offset = (yy_c_buf_p) - (yytext_ptr);
1264
			yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1264 1265
			++(yy_c_buf_p);
1265 1266

  
1266 1267
			switch ( yy_get_next_buffer(  ) )
......
1425 1426
	vm_var_free((void *) b  );
1426 1427
}
1427 1428

  
1428
#ifndef __cplusplus
1429
extern int isatty (int );
1430
#endif /* __cplusplus */
1431
    
1432 1429
/* Initializes or reinitializes a buffer.
1433 1430
 * This function is sometimes called more than once on the same buffer,
1434 1431
 * such as during a vm_var_restart() or at EOF.
......
1541 1538
 */
1542 1539
static void vm_var_ensure_buffer_stack (void)
1543 1540
{
1544
	int num_to_alloc;
1541
	yy_size_t num_to_alloc;
1545 1542
    
1546 1543
	if (!(yy_buffer_stack)) {
1547 1544

  
......
1633 1630

  
1634 1631
/** Setup the input buffer state to scan the given bytes. The next call to vm_var_lex() will
1635 1632
 * scan from a @e copy of @a bytes.
1636
 * @param bytes the byte buffer to scan
1637
 * @param len the number of bytes in the buffer pointed to by @a bytes.
1633
 * @param yybytes the byte buffer to scan
1634
 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1638 1635
 * 
1639 1636
 * @return the newly allocated buffer state object.
1640 1637
 */
1641
YY_BUFFER_STATE vm_var__scan_bytes  (yyconst char * yybytes, int  _yybytes_len )
1638
YY_BUFFER_STATE vm_var__scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
1642 1639
{
1643 1640
	YY_BUFFER_STATE b;
1644 1641
	char *buf;
......
1725 1722
/** Get the length of the current token.
1726 1723
 * 
1727 1724
 */
1728
int vm_var_get_leng  (void)
1725
yy_size_t vm_var_get_leng  (void)
1729 1726
{
1730 1727
        return vm_var_leng;
1731 1728
}
src/vm/vm_var_syntax.cc
1
/* A Bison parser, made by GNU Bison 2.5.  */
1
/* A Bison parser, made by GNU Bison 2.6.2.  */
2 2

  
3 3
/* Bison implementation for Yacc-like parsers in C
4 4
   
5
      Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
5
      Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
6 6
   
7 7
   This program is free software: you can redistribute it and/or modify
8 8
   it under the terms of the GNU General Public License as published by
......
44 44
#define YYBISON 1
45 45

  
46 46
/* Bison version.  */
47
#define YYBISON_VERSION "2.5"
47
#define YYBISON_VERSION "2.6.2"
48 48

  
49 49
/* Skeleton name.  */
50 50
#define YYSKELETON_NAME "yacc.c"
......
58 58
/* Pull parsers.  */
59 59
#define YYPULL 1
60 60

  
61
/* Using locations.  */
62
#define YYLSP_NEEDED 1
63 61

  
64 62
/* Substitute the variable and function names.  */
65 63
#define yyparse         vm_var__parse
......
72 70
#define yylloc          vm_var__lloc
73 71

  
74 72
/* Copy the first part of user declarations.  */
75

  
76
/* Line 268 of yacc.c  */
73
/* Line 336 of yacc.c  */
77 74
#line 17 "vm_var_syntax.y"
78 75

  
79 76
#include <iostream>
......
350 347
    {
351 348
        parsed << vm->get_uid();
352 349
    }
350
    else if (name == "UNAME")
351
    {
352
        parsed << vm->get_uname();
353
    }
354
    else if (name == "GID")
355
    {
356
        parsed << vm->get_gid();
357
    }
358
    else if (name == "GNAME")
359
    {
360
        parsed << vm->get_gname();
361
    }
353 362
    else 
354 363
    {
355 364
        vm->get_template_attribute(name.c_str(),value);
......
454 463
/* -------------------------------------------------------------------------- */
455 464

  
456 465

  
466
/* Line 336 of yacc.c  */
467
#line 468 "vm_var_syntax.cc"
457 468

  
458
/* Line 268 of yacc.c  */
459
#line 460 "vm_var_syntax.cc"
460

  
461
/* Enabling traces.  */
462
#ifndef YYDEBUG
463
# define YYDEBUG 0
464
#endif
469
# ifndef YY_NULL
470
#  if defined __cplusplus && 201103L <= __cplusplus
471
#   define YY_NULL nullptr
472
#  else
473
#   define YY_NULL 0
474
#  endif
475
# endif
465 476

  
466 477
/* Enabling verbose error messages.  */
467 478
#ifdef YYERROR_VERBOSE
......
471 482
# define YYERROR_VERBOSE 0
472 483
#endif
473 484

  
474
/* Enabling the token table.  */
475
#ifndef YYTOKEN_TABLE
476
# define YYTOKEN_TABLE 0
485
/* In a future release of Bison, this section will be replaced
486
   by #include "vm_var_syntax.hh".  */
487
#ifndef VM_VAR_VM_VAR_SYNTAX_HH
488
# define VM_VAR_VM_VAR_SYNTAX_HH
489
/* Enabling traces.  */
490
#ifndef YYDEBUG
491
# define YYDEBUG 0
492
#endif
493
#if YYDEBUG
494
extern int vm_var__debug;
477 495
#endif
478

  
479 496

  
480 497
/* Tokens.  */
481 498
#ifndef YYTOKENTYPE
......
496 513
#endif
497 514

  
498 515

  
499

  
500 516
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
501 517
typedef union YYSTYPE
502 518
{
503

  
504
/* Line 293 of yacc.c  */
505
#line 404 "vm_var_syntax.y"
519
/* Line 350 of yacc.c  */
520
#line 416 "vm_var_syntax.y"
506 521

  
507 522
    char * val_str;
508 523
    int    val_int;
509 524
    char   val_char;
510 525

  
511 526

  
512

  
513
/* Line 293 of yacc.c  */
514
#line 515 "vm_var_syntax.cc"
527
/* Line 350 of yacc.c  */
528
#line 529 "vm_var_syntax.cc"
515 529
} YYSTYPE;
516 530
# define YYSTYPE_IS_TRIVIAL 1
517 531
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
......
532 546
#endif
533 547

  
534 548

  
535
/* Copy the second part of user declarations.  */
549
#ifdef YYPARSE_PARAM
550
#if defined __STDC__ || defined __cplusplus
551
int vm_var__parse (void *YYPARSE_PARAM);
552
#else
553
int vm_var__parse ();
554
#endif
555
#else /* ! YYPARSE_PARAM */
556
#if defined __STDC__ || defined __cplusplus
557
int vm_var__parse (mem_collector * mc, VirtualMachine * vm, ostringstream *  parsed, char **          errmsg);
558
#else
559
int vm_var__parse ();
560
#endif
561
#endif /* ! YYPARSE_PARAM */
536 562

  
563
#endif /* !VM_VAR_VM_VAR_SYNTAX_HH  */
537 564

  
538
/* Line 343 of yacc.c  */
539
#line 540 "vm_var_syntax.cc"
565
/* Copy the second part of user declarations.  */
566

  
567
/* Line 353 of yacc.c  */
568
#line 569 "vm_var_syntax.cc"
540 569

  
541 570
#ifdef short
542 571
# undef short
......
642 671
#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
643 672
     || defined __cplusplus || defined _MSC_VER)
644 673
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
674
      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
645 675
#     ifndef EXIT_SUCCESS
646 676
#      define EXIT_SUCCESS 0
647 677
#     endif
......
735 765
#endif
736 766

  
737 767
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
738
/* Copy COUNT objects from FROM to TO.  The source and destination do
768
/* Copy COUNT objects from SRC to DST.  The source and destination do
739 769
   not overlap.  */
740 770
# ifndef YYCOPY
741 771
#  if defined __GNUC__ && 1 < __GNUC__
742
#   define YYCOPY(To, From, Count) \
743
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
772
#   define YYCOPY(Dst, Src, Count) \
773
      __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
744 774
#  else
745
#   define YYCOPY(To, From, Count)		\
746
      do					\
747
	{					\
748
	  YYSIZE_T yyi;				\
749
	  for (yyi = 0; yyi < (Count); yyi++)	\
750
	    (To)[yyi] = (From)[yyi];		\
751
	}					\
775
#   define YYCOPY(Dst, Src, Count)              \
776
      do                                        \
777
        {                                       \
778
          YYSIZE_T yyi;                         \
779
          for (yyi = 0; yyi < (Count); yyi++)   \
780
            (Dst)[yyi] = (Src)[yyi];            \
781
        }                                       \
752 782
      while (YYID (0))
753 783
#  endif
754 784
# endif
......
826 856
/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
827 857
static const yytype_uint16 yyrline[] =
828 858
{
829
       0,   428,   428,   429,   432,   436,   449,   464
859
       0,   440,   440,   441,   444,   448,   461,   476
830 860
};
831 861
#endif
832 862

  
833
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
863
#if YYDEBUG || YYERROR_VERBOSE || 0
834 864
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
835 865
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
836 866
static const char *const yytname[] =
837 867
{
838 868
  "$end", "error", "$undefined", "EQUAL", "COMMA", "OBRACKET", "CBRACKET",
839 869
  "EOA", "STRING", "VARIABLE", "RSTRING", "INTEGER", "$accept",
840
  "vm_string", "vm_variable", 0
870
  "vm_string", "vm_variable", YY_NULL
841 871
};
842 872
#endif
843 873

  
......
950 980

  
951 981
#define YYRECOVERING()  (!!yyerrstatus)
952 982

  
953
#define YYBACKUP(Token, Value)					\
954
do								\
955
  if (yychar == YYEMPTY && yylen == 1)				\
956
    {								\
957
      yychar = (Token);						\
958
      yylval = (Value);						\
959
      YYPOPSTACK (1);						\
960
      goto yybackup;						\
961
    }								\
962
  else								\
963
    {								\
983
#define YYBACKUP(Token, Value)                                  \
984
do                                                              \
985
  if (yychar == YYEMPTY)                                        \
986
    {                                                           \
987
      yychar = (Token);                                         \
988
      yylval = (Value);                                         \
989
      YYPOPSTACK (yylen);                                       \
990
      yystate = *yyssp;                                         \
991
      goto yybackup;                                            \
992
    }                                                           \
993
  else                                                          \
994
    {                                                           \
964 995
      yyerror (&yylloc, mc, vm, parsed, errmsg, YY_("syntax error: cannot back up")); \
965 996
      YYERROR;							\
966 997
    }								\
......
970 1001
#define YYTERROR	1
971 1002
#define YYERRCODE	256
972 1003

  
973

  
974 1004
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
975 1005
   If N is 0, then set CURRENT to the empty location which ends
976 1006
   the previous symbol: RHS[0] (always defined).  */
977 1007

  
978
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
979 1008
#ifndef YYLLOC_DEFAULT
980
# define YYLLOC_DEFAULT(Current, Rhs, N)				\
981
    do									\
982
      if (YYID (N))                                                    \
983
	{								\
984
	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
985
	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
986
	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
987
	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
988
	}								\
989
      else								\
990
	{								\
991
	  (Current).first_line   = (Current).last_line   =		\
992
	    YYRHSLOC (Rhs, 0).last_line;				\
993
	  (Current).first_column = (Current).last_column =		\
994
	    YYRHSLOC (Rhs, 0).last_column;				\
995
	}								\
1009
# define YYLLOC_DEFAULT(Current, Rhs, N)                                \
1010
    do                                                                  \
1011
      if (YYID (N))                                                     \
1012
        {                                                               \
1013
          (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
1014
          (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
1015
          (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
1016
          (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
1017
        }                                                               \
1018
      else                                                              \
1019
        {                                                               \
1020
          (Current).first_line   = (Current).last_line   =              \
1021
            YYRHSLOC (Rhs, 0).last_line;                                \
1022
          (Current).first_column = (Current).last_column =              \
1023
            YYRHSLOC (Rhs, 0).last_column;                              \
1024
        }                                                               \
996 1025
    while (YYID (0))
997 1026
#endif
998 1027

  
1028
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
1029

  
1030

  
999 1031

  
1000 1032
/* YY_LOCATION_PRINT -- Print the location on the stream.
1001 1033
   This macro was not mandated originally: define only if we know
......
1069 1101
    char **          errmsg;
1070 1102
#endif
1071 1103
{
1104
  FILE *yyo = yyoutput;
1105
  YYUSE (yyo);
1072 1106
  if (!yyvaluep)
1073 1107
    return;
1074 1108
  YYUSE (yylocationp);
......
1337 1371
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1338 1372
                yytype_int16 *yyssp, int yytoken)
1339 1373
{
1340
  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
1374
  YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
1341 1375
  YYSIZE_T yysize = yysize0;
1342 1376
  YYSIZE_T yysize1;
1343 1377
  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1344 1378
  /* Internationalized format string. */
1345
  const char *yyformat = 0;
1379
  const char *yyformat = YY_NULL;
1346 1380
  /* Arguments of yyformat. */
1347 1381
  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1348 1382
  /* Number of reported tokens (one for the "unexpected", one per
......
1402 1436
                    break;
1403 1437
                  }
1404 1438
                yyarg[yycount++] = yytname[yyx];
1405
                yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1439
                yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1406 1440
                if (! (yysize <= yysize1
1407 1441
                       && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1408 1442
                  return 2;
......
1504 1538
}
1505 1539

  
1506 1540

  
1507
/* Prevent warnings from -Wmissing-prototypes.  */
1508
#ifdef YYPARSE_PARAM
1509
#if defined __STDC__ || defined __cplusplus
1510
int yyparse (void *YYPARSE_PARAM);
1511
#else
1512
int yyparse ();
1513
#endif
1514
#else /* ! YYPARSE_PARAM */
1515
#if defined __STDC__ || defined __cplusplus
1516
int yyparse (mem_collector * mc, VirtualMachine * vm, ostringstream *  parsed, char **          errmsg);
1517
#else
1518
int yyparse ();
1519
#endif
1520
#endif /* ! YYPARSE_PARAM */
1521 1541

  
1522 1542

  
1523 1543
/*----------.
......
1570 1590
       `yyvs': related to semantic values.
1571 1591
       `yyls': related to locations.
1572 1592

  
1573
       Refer to the stacks thru separate pointers, to allow yyoverflow
1593
       Refer to the stacks through separate pointers, to allow yyoverflow
1574 1594
       to reallocate them elsewhere.  */
1575 1595

  
1576 1596
    /* The state stack.  */
......
1641 1661
  yylloc.first_line   = yylloc.last_line   = 1;
1642 1662
  yylloc.first_column = yylloc.last_column = 1;
1643 1663
#endif
1644

  
1645 1664
  goto yysetstate;
1646 1665

  
1647 1666
/*------------------------------------------------------------.
......
1825 1844
  switch (yyn)
1826 1845
    {
1827 1846
        case 4:
1828

  
1829
/* Line 1806 of yacc.c  */
1830
#line 433 "vm_var_syntax.y"
1847
/* Line 1787 of yacc.c  */
1848
#line 445 "vm_var_syntax.y"
1831 1849
    {
1832 1850
        (*parsed) << (yyvsp[(1) - (1)].val_str);
1833 1851
    }
1834 1852
    break;
1835 1853

  
1836 1854
  case 5:
1837

  
1838
/* Line 1806 of yacc.c  */
1839
#line 437 "vm_var_syntax.y"
1855
/* Line 1787 of yacc.c  */
1856
#line 449 "vm_var_syntax.y"
1840 1857
    {
1841 1858
        string name((yyvsp[(1) - (2)].val_str));
1842 1859

  
......
1852 1869
    break;
1853 1870

  
1854 1871
  case 6:
1855

  
1856
/* Line 1806 of yacc.c  */
1857
#line 450 "vm_var_syntax.y"
1872
/* Line 1787 of yacc.c  */
1873
#line 462 "vm_var_syntax.y"
1858 1874
    {
1859 1875
        string name((yyvsp[(1) - (5)].val_str));
1860 1876
        string vname((yyvsp[(3) - (5)].val_str));
......
1872 1888
    break;
1873 1889

  
1874 1890
  case 7:
1875

  
1876
/* Line 1806 of yacc.c  */
1877
#line 465 "vm_var_syntax.y"
1891
/* Line 1787 of yacc.c  */
1892
#line 477 "vm_var_syntax.y"
1878 1893
    {
1879 1894
        string name((yyvsp[(1) - (9)].val_str));
1880 1895
        string vname((yyvsp[(3) - (9)].val_str));
......
1895 1910
    break;
1896 1911

  
1897 1912

  
1898

  
1899
/* Line 1806 of yacc.c  */
1900
#line 1901 "vm_var_syntax.cc"
1913
/* Line 1787 of yacc.c  */
1914
#line 1915 "vm_var_syntax.cc"
1901 1915
      default: break;
1902 1916
    }
1903 1917
  /* User semantic actions sometimes alter yychar, and that requires
......
2091 2105
  yyresult = 1;
2092 2106
  goto yyreturn;
2093 2107

  
2094
#if !defined(yyoverflow) || YYERROR_VERBOSE
2108
#if !defined yyoverflow || YYERROR_VERBOSE
2095 2109
/*-------------------------------------------------.
2096 2110
| yyexhaustedlab -- memory exhaustion comes here.  |
2097 2111
`-------------------------------------------------*/
......
2133 2147
}
2134 2148

  
2135 2149

  
2136

  
2137
/* Line 2067 of yacc.c  */
2138
#line 483 "vm_var_syntax.y"
2150
/* Line 2048 of yacc.c  */
2151
#line 495 "vm_var_syntax.y"
2139 2152

  
2140 2153

  
2141 2154
extern "C" void vm_var__error(
......
2163 2176
            llocp->last_column);
2164 2177
    }
2165 2178
}
2166

  
src/vm/vm_var_syntax.h
1
/* A Bison parser, made by GNU Bison 2.5.  */
1
/* A Bison parser, made by GNU Bison 2.6.2.  */
2 2

  
3 3
/* Bison interface for Yacc-like parsers in C
4 4
   
5
      Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
5
      Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
6 6
   
7 7
   This program is free software: you can redistribute it and/or modify
8 8
   it under the terms of the GNU General Public License as published by
......
30 30
   This special exception was added by the Free Software Foundation in
31 31
   version 2.2 of Bison.  */
32 32

  
33
#ifndef VM_VAR_VM_VAR_SYNTAX_HH
34
# define VM_VAR_VM_VAR_SYNTAX_HH
35
/* Enabling traces.  */
36
#ifndef YYDEBUG
37
# define YYDEBUG 0
38
#endif
39
#if YYDEBUG
40
extern int vm_var__debug;
41
#endif
33 42

  
34 43
/* Tokens.  */
35 44
#ifndef YYTOKENTYPE
......
50 59
#endif
51 60

  
52 61

  
53

  
54 62
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
55 63
typedef union YYSTYPE
56 64
{
57

  
58
/* Line 2068 of yacc.c  */
59
#line 404 "vm_var_syntax.y"
65
/* Line 2049 of yacc.c  */
66
#line 416 "vm_var_syntax.y"
60 67

  
61 68
    char * val_str;
62 69
    int    val_int;
63 70
    char   val_char;
64 71

  
65 72

  
66

  
67
/* Line 2068 of yacc.c  */
68
#line 69 "vm_var_syntax.hh"
73
/* Line 2049 of yacc.c  */
74
#line 75 "vm_var_syntax.hh"
69 75
} YYSTYPE;
70 76
# define YYSTYPE_IS_TRIVIAL 1
71 77
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
72 78
# define YYSTYPE_IS_DECLARED 1
73 79
#endif
74 80

  
75

  
76

  
77 81
#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
78 82
typedef struct YYLTYPE
79 83
{
......
87 91
# define YYLTYPE_IS_TRIVIAL 1
88 92
#endif
89 93

  
90

  
91

  
94
#endif /* !VM_VAR_VM_VAR_SYNTAX_HH  */
src/vm/vm_var_syntax.y
289 289
    {
290 290
        parsed << vm->get_uid();
291 291
    }
292
    else if (name == "UNAME")
293
    {
294
        parsed << vm->get_uname();
295
    }
296
    else if (name == "GID")
297
    {
298
        parsed << vm->get_gid();
299
    }
300
    else if (name == "GNAME")
301
    {
302
        parsed << vm->get_gname();
303
    }
292 304
    else 
293 305
    {
294 306
        vm->get_template_attribute(name.c_str(),value);
src/xml/expr_arith.cc
1
/* A Bison parser, made by GNU Bison 2.5.  */
1
/* A Bison parser, made by GNU Bison 2.6.2.  */
2 2

  
3 3
/* Bison implementation for Yacc-like parsers in C
4 4
   
5
      Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
5
      Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
6 6
   
7 7
   This program is free software: you can redistribute it and/or modify
8 8
   it under the terms of the GNU General Public License as published by
......
44 44
#define YYBISON 1
45 45

  
46 46
/* Bison version.  */
47
#define YYBISON_VERSION "2.5"
47
#define YYBISON_VERSION "2.6.2"
48 48

  
49 49
/* Skeleton name.  */
50 50
#define YYSKELETON_NAME "yacc.c"
......
58 58
/* Pull parsers.  */
59 59
#define YYPULL 1
60 60

  
61
/* Using locations.  */
62
#define YYLSP_NEEDED 1
63 61

  
64 62
/* Substitute the variable and function names.  */
65 63
#define yyparse         expr_arith__parse
......
72 70
#define yylloc          expr_arith__lloc
73 71

  
74 72
/* Copy the first part of user declarations.  */
75

  
76
/* Line 268 of yacc.c  */
73
/* Line 336 of yacc.c  */
77 74
#line 17 "expr_arith.y"
78 75

  
79 76
#include <iostream>
......
128 125
}
129 126

  
130 127

  
128
/* Line 336 of yacc.c  */
129
#line 130 "expr_arith.cc"
131 130

  
132
/* Line 268 of yacc.c  */
133
#line 134 "expr_arith.cc"
134

  
135
/* Enabling traces.  */
136
#ifndef YYDEBUG
137
# define YYDEBUG 0
138
#endif
131
# ifndef YY_NULL
132
#  if defined __cplusplus && 201103L <= __cplusplus
133
#   define YY_NULL nullptr
134
#  else
135
#   define YY_NULL 0
136
#  endif
137
# endif
139 138

  
140 139
/* Enabling verbose error messages.  */
141 140
#ifdef YYERROR_VERBOSE
......
145 144
# define YYERROR_VERBOSE 0
146 145
#endif
147 146

  
148
/* Enabling the token table.  */
149
#ifndef YYTOKEN_TABLE
150
# define YYTOKEN_TABLE 0
147
/* In a future release of Bison, this section will be replaced
148
   by #include "expr_arith.hh".  */
149
#ifndef EXPR_ARITH_EXPR_ARITH_HH
150
# define EXPR_ARITH_EXPR_ARITH_HH
151
/* Enabling traces.  */
152
#ifndef YYDEBUG
153
# define YYDEBUG 0
154
#endif
155
#if YYDEBUG
156
extern int expr_arith__debug;
151 157
#endif
152

  
153 158

  
154 159
/* Tokens.  */
155 160
#ifndef YYTOKENTYPE
......
164 169
#endif
165 170

  
166 171

  
167

  
168 172
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
169 173
typedef union YYSTYPE
170 174
{
171

  
172
/* Line 293 of yacc.c  */
175
/* Line 350 of yacc.c  */
173 176
#line 78 "expr_arith.y"
174 177

  
175 178
    char *  val_str;
......
177 180
    float   val_float;
178 181

  
179 182

  
180

  
181
/* Line 293 of yacc.c  */
182
#line 183 "expr_arith.cc"
183
/* Line 350 of yacc.c  */
184
#line 185 "expr_arith.cc"
183 185
} YYSTYPE;
184 186
# define YYSTYPE_IS_TRIVIAL 1
185 187
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
......
200 202
#endif
201 203

  
202 204

  
203
/* Copy the second part of user declarations.  */
205
#ifdef YYPARSE_PARAM
206
#if defined __STDC__ || defined __cplusplus
207
int expr_arith__parse (void *YYPARSE_PARAM);
208
#else
209
int expr_arith__parse ();
210
#endif
211
#else /* ! YYPARSE_PARAM */
212
#if defined __STDC__ || defined __cplusplus
213
int expr_arith__parse (mem_collector * mc, ObjectXML * oxml, int&        result, char **     error_msg);
214
#else
215
int expr_arith__parse ();
216
#endif
217
#endif /* ! YYPARSE_PARAM */
204 218

  
219
#endif /* !EXPR_ARITH_EXPR_ARITH_HH  */
205 220

  
206
/* Line 343 of yacc.c  */
207
#line 208 "expr_arith.cc"
221
/* Copy the second part of user declarations.  */
222

  
223
/* Line 353 of yacc.c  */
224
#line 225 "expr_arith.cc"
208 225

  
209 226
#ifdef short
210 227
# undef short
......
310 327
#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
311 328
     || defined __cplusplus || defined _MSC_VER)
312 329
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
330
      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
313 331
#     ifndef EXIT_SUCCESS
314 332
#      define EXIT_SUCCESS 0
315 333
#     endif
......
403 421
#endif
404 422

  
405 423
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
406
/* Copy COUNT objects from FROM to TO.  The source and destination do
424
/* Copy COUNT objects from SRC to DST.  The source and destination do
407 425
   not overlap.  */
408 426
# ifndef YYCOPY
409 427
#  if defined __GNUC__ && 1 < __GNUC__
410
#   define YYCOPY(To, From, Count) \
411
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
428
#   define YYCOPY(Dst, Src, Count) \
429
      __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
412 430
#  else
413
#   define YYCOPY(To, From, Count)		\
414
      do					\
415
	{					\
416
	  YYSIZE_T yyi;				\
417
	  for (yyi = 0; yyi < (Count); yyi++)	\
418
	    (To)[yyi] = (From)[yyi];		\
419
	}					\
431
#   define YYCOPY(Dst, Src, Count)              \
432
      do                                        \
433
        {                                       \
434
          YYSIZE_T yyi;                         \
435
          for (yyi = 0; yyi < (Count); yyi++)   \
436
            (Dst)[yyi] = (Src)[yyi];            \
437
        }                                       \
420 438
      while (YYID (0))
421 439
#  endif
422 440
# endif
......
501 519
};
502 520
#endif
503 521

  
504
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
522
#if YYDEBUG || YYERROR_VERBOSE || 0
505 523
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
506 524
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
507 525
static const char *const yytname[] =
508 526
{
509 527
  "$end", "error", "$undefined", "'+'", "'-'", "'*'", "'/'", "INTEGER",
510
  "STRING", "FLOAT", "'('", "')'", "$accept", "stmt", "expr", 0
528
  "STRING", "FLOAT", "'('", "')'", "$accept", "stmt", "expr", YY_NULL
511 529
};
512 530
#endif
513 531

  
......
624 642

  
625 643
#define YYRECOVERING()  (!!yyerrstatus)
626 644

  
627
#define YYBACKUP(Token, Value)					\
628
do								\
629
  if (yychar == YYEMPTY && yylen == 1)				\
630
    {								\
631
      yychar = (Token);						\
632
      yylval = (Value);						\
633
      YYPOPSTACK (1);						\
634
      goto yybackup;						\
635
    }								\
636
  else								\
637
    {								\
645
#define YYBACKUP(Token, Value)                                  \
646
do                                                              \
647
  if (yychar == YYEMPTY)                                        \
648
    {                                                           \
649
      yychar = (Token);                                         \
650
      yylval = (Value);                                         \
651
      YYPOPSTACK (yylen);                                       \
652
      yystate = *yyssp;                                         \
653
      goto yybackup;                                            \
654
    }                                                           \
655
  else                                                          \
656
    {                                                           \
638 657
      yyerror (&yylloc, mc, oxml, result, error_msg, YY_("syntax error: cannot back up")); \
639 658
      YYERROR;							\
640 659
    }								\
......
644 663
#define YYTERROR	1
645 664
#define YYERRCODE	256
646 665

  
647

  
648 666
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
649 667
   If N is 0, then set CURRENT to the empty location which ends
650 668
   the previous symbol: RHS[0] (always defined).  */
651 669

  
652
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
653 670
#ifndef YYLLOC_DEFAULT
654
# define YYLLOC_DEFAULT(Current, Rhs, N)				\
655
    do									\
656
      if (YYID (N))                                                    \
657
	{								\
658
	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
659
	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
660
	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
661
	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
662
	}								\
663
      else								\
664
	{								\
665
	  (Current).first_line   = (Current).last_line   =		\
666
	    YYRHSLOC (Rhs, 0).last_line;				\
667
	  (Current).first_column = (Current).last_column =		\
668
	    YYRHSLOC (Rhs, 0).last_column;				\
669
	}								\
671
# define YYLLOC_DEFAULT(Current, Rhs, N)                                \
672
    do                                                                  \
673
      if (YYID (N))                                                     \
674
        {                                                               \
675
          (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
676
          (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
677
          (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
678
          (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
679
        }                                                               \
680
      else                                                              \
681
        {                                                               \
682
          (Current).first_line   = (Current).last_line   =              \
683
            YYRHSLOC (Rhs, 0).last_line;                                \
684
          (Current).first_column = (Current).last_column =              \
685
            YYRHSLOC (Rhs, 0).last_column;                              \
686
        }                                                               \
670 687
    while (YYID (0))
671 688
#endif
672 689

  
690
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
691

  
692

  
673 693

  
674 694
/* YY_LOCATION_PRINT -- Print the location on the stream.
675 695
   This macro was not mandated originally: define only if we know
......
743 763
    char **     error_msg;
744 764
#endif
745 765
{
766
  FILE *yyo = yyoutput;
767
  YYUSE (yyo);
746 768
  if (!yyvaluep)
747 769
    return;
748 770
  YYUSE (yylocationp);
......
1011 1033
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1012 1034
                yytype_int16 *yyssp, int yytoken)
1013 1035
{
1014
  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
1036
  YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
1015 1037
  YYSIZE_T yysize = yysize0;
1016 1038
  YYSIZE_T yysize1;
1017 1039
  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1018 1040
  /* Internationalized format string. */
1019
  const char *yyformat = 0;
1041
  const char *yyformat = YY_NULL;
1020 1042
  /* Arguments of yyformat. */
1021 1043
  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1022 1044
  /* Number of reported tokens (one for the "unexpected", one per
......
1076 1098
                    break;
1077 1099
                  }
1078 1100
                yyarg[yycount++] = yytname[yyx];
1079
                yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1101
                yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
1080 1102
                if (! (yysize <= yysize1
1081 1103
                       && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1082 1104
                  return 2;
......
1178 1200
}
1179 1201

  
1180 1202

  
1181
/* Prevent warnings from -Wmissing-prototypes.  */
1182
#ifdef YYPARSE_PARAM
1183
#if defined __STDC__ || defined __cplusplus
1184
int yyparse (void *YYPARSE_PARAM);
1185
#else
1186
int yyparse ();
1187
#endif
1188
#else /* ! YYPARSE_PARAM */
1189
#if defined __STDC__ || defined __cplusplus
1190
int yyparse (mem_collector * mc, ObjectXML * oxml, int&        result, char **     error_msg);
1191
#else
1192
int yyparse ();
1193
#endif
1194
#endif /* ! YYPARSE_PARAM */
1195 1203

  
1196 1204

  
1197 1205
/*----------.
......
1244 1252
       `yyvs': related to semantic values.
1245 1253
       `yyls': related to locations.
1246 1254

  
1247
       Refer to the stacks thru separate pointers, to allow yyoverflow
1255
       Refer to the stacks through separate pointers, to allow yyoverflow
1248 1256
       to reallocate them elsewhere.  */
1249 1257

  
1250 1258
    /* The state stack.  */
......
1315 1323
  yylloc.first_line   = yylloc.last_line   = 1;
1316 1324
  yylloc.first_column = yylloc.last_column = 1;
1317 1325
#endif
1318

  
1319 1326
  goto yysetstate;
1320 1327

  
1321 1328
/*------------------------------------------------------------.
......
1499 1506
  switch (yyn)
1500 1507
    {
1501 1508
        case 2:
1502

  
1503
/* Line 1806 of yacc.c  */
1509
/* Line 1787 of yacc.c  */
1504 1510
#line 100 "expr_arith.y"
1505 1511
    { result = static_cast<int>((yyvsp[(1) - (1)].val_float));}
1506 1512
    break;
1507 1513

  
1508 1514
  case 3:
1509

  
1510
/* Line 1806 of yacc.c  */
1515
/* Line 1787 of yacc.c  */
1511 1516
#line 101 "expr_arith.y"
1512 1517
    { result = 0; }
1513 1518
    break;
1514 1519

  
1515 1520
  case 4:
1516

  
1517
/* Line 1806 of yacc.c  */
1521
/* Line 1787 of yacc.c  */
1518 1522
#line 104 "expr_arith.y"
1519 1523
    { float val = 0.0;
1520 1524

  
......
1544 1548
    break;
1545 1549

  
1546 1550
  case 5:
1547

  
1548
/* Line 1806 of yacc.c  */
1551
/* Line 1787 of yacc.c  */
1549 1552
#line 129 "expr_arith.y"
1550 1553
    { (yyval.val_float) = (yyvsp[(1) - (1)].val_float); }
1551 1554
    break;
1552 1555

  
1553 1556
  case 6:
1554

  
1555
/* Line 1806 of yacc.c  */
1557
/* Line 1787 of yacc.c  */
1556 1558
#line 130 "expr_arith.y"
1557 1559
    { (yyval.val_float) = static_cast<float>((yyvsp[(1) - (1)].val_int)); }
1558 1560
    break;
1559 1561

  
1560 1562
  case 7:
1561

  
1562
/* Line 1806 of yacc.c  */
1563
/* Line 1787 of yacc.c  */
1563 1564
#line 131 "expr_arith.y"
1564 1565
    { (yyval.val_float) = (yyvsp[(1) - (3)].val_float) + (yyvsp[(3) - (3)].val_float);}
1565 1566
    break;
1566 1567

  
1567 1568
  case 8:
1568

  
1569
/* Line 1806 of yacc.c  */
1569
/* Line 1787 of yacc.c  */
1570 1570
#line 132 "expr_arith.y"
1571 1571
    { (yyval.val_float) = (yyvsp[(1) - (3)].val_float) - (yyvsp[(3) - (3)].val_float);}
1572 1572
    break;
1573 1573

  
1574 1574
  case 9:
1575

  
1576
/* Line 1806 of yacc.c  */
1575
/* Line 1787 of yacc.c  */
1577 1576
#line 133 "expr_arith.y"
1578 1577
    { (yyval.val_float) = (yyvsp[(1) - (3)].val_float) * (yyvsp[(3) - (3)].val_float);}
1579 1578
    break;
1580 1579

  
1581 1580
  case 10:
1582

  
1583
/* Line 1806 of yacc.c  */
1581
/* Line 1787 of yacc.c  */
1584 1582
#line 134 "expr_arith.y"
1585 1583
    { (yyval.val_float) = (yyvsp[(1) - (3)].val_float) / (yyvsp[(3) - (3)].val_float);}
1586 1584
    break;
1587 1585

  
1588 1586
  case 11:
1589

  
1590
/* Line 1806 of yacc.c  */
1587
/* Line 1787 of yacc.c  */
1591 1588
#line 135 "expr_arith.y"
1592 1589
    { (yyval.val_float) = - (yyvsp[(2) - (2)].val_float);}
1593 1590
    break;
1594 1591

  
1595 1592
  case 12:
1596

  
1597
/* Line 1806 of yacc.c  */
1593
/* Line 1787 of yacc.c  */
1598 1594
#line 136 "expr_arith.y"
1599 1595
    { (yyval.val_float) = (yyvsp[(2) - (3)].val_float);}
1600 1596
    break;
1601 1597

  
... This diff was truncated because it exceeds the maximum size that can be displayed.