mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-22 17:57:46 +03:00
Fix compilation issues with parsers
This commit is contained in:
parent
88341b948b
commit
1ad45c3f26
@ -517,12 +517,14 @@ char *expr_text;
|
||||
#include "expr_arith.h"
|
||||
#include "mem_collector.h"
|
||||
|
||||
#define YY_NO_INPUT
|
||||
|
||||
#define YY_DECL int expr_lex (YYSTYPE *lvalp, YYLTYPE *llocp, mem_collector *mc)
|
||||
|
||||
#define YY_USER_ACTION llocp->first_line = expr_lineno; \
|
||||
llocp->first_column = llocp->last_column; \
|
||||
llocp->last_column += expr_leng;
|
||||
#line 526 "expr_parser.c"
|
||||
#line 528 "expr_parser.c"
|
||||
|
||||
#define INITIAL 0
|
||||
|
||||
@ -702,11 +704,11 @@ YY_DECL
|
||||
register char *yy_cp, *yy_bp;
|
||||
register int yy_act;
|
||||
|
||||
#line 37 "expr_parser.l"
|
||||
#line 39 "expr_parser.l"
|
||||
|
||||
/* --- Tokens --- */
|
||||
|
||||
#line 710 "expr_parser.c"
|
||||
#line 712 "expr_parser.c"
|
||||
|
||||
if ( !(yy_init) )
|
||||
{
|
||||
@ -801,26 +803,26 @@ do_action: /* This label is used only to access EOF actions. */
|
||||
|
||||
case 1:
|
||||
YY_RULE_SETUP
|
||||
#line 40 "expr_parser.l"
|
||||
#line 42 "expr_parser.l"
|
||||
{ return *expr_text;}
|
||||
YY_BREAK
|
||||
/* --- Strings, also quoted form --- */
|
||||
case 2:
|
||||
YY_RULE_SETUP
|
||||
#line 44 "expr_parser.l"
|
||||
#line 46 "expr_parser.l"
|
||||
{ lvalp->val_str = mem_collector_strdup(mc,expr_text);
|
||||
return STRING;}
|
||||
YY_BREAK
|
||||
case 3:
|
||||
YY_RULE_SETUP
|
||||
#line 47 "expr_parser.l"
|
||||
#line 49 "expr_parser.l"
|
||||
{ lvalp->val_str = NULL;
|
||||
return STRING;}
|
||||
YY_BREAK
|
||||
case 4:
|
||||
/* rule 4 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 50 "expr_parser.l"
|
||||
#line 52 "expr_parser.l"
|
||||
{ lvalp->val_str = mem_collector_strdup(mc,expr_text+1);
|
||||
lvalp->val_str[expr_leng-2] = '\0';
|
||||
return STRING;}
|
||||
@ -828,28 +830,28 @@ YY_RULE_SETUP
|
||||
/* --- Numbers --- */
|
||||
case 5:
|
||||
YY_RULE_SETUP
|
||||
#line 56 "expr_parser.l"
|
||||
#line 58 "expr_parser.l"
|
||||
{ lvalp->val_int = atoi(expr_text);
|
||||
return INTEGER;}
|
||||
YY_BREAK
|
||||
case 6:
|
||||
YY_RULE_SETUP
|
||||
#line 59 "expr_parser.l"
|
||||
#line 61 "expr_parser.l"
|
||||
{ lvalp->val_float = atof(expr_text);
|
||||
return FLOAT;}
|
||||
YY_BREAK
|
||||
/* --- blanks --- */
|
||||
case 7:
|
||||
YY_RULE_SETUP
|
||||
#line 64 "expr_parser.l"
|
||||
#line 66 "expr_parser.l"
|
||||
|
||||
YY_BREAK
|
||||
case 8:
|
||||
YY_RULE_SETUP
|
||||
#line 66 "expr_parser.l"
|
||||
#line 68 "expr_parser.l"
|
||||
ECHO;
|
||||
YY_BREAK
|
||||
#line 853 "expr_parser.c"
|
||||
#line 855 "expr_parser.c"
|
||||
case YY_STATE_EOF(INITIAL):
|
||||
yyterminate();
|
||||
|
||||
@ -1818,7 +1820,7 @@ void expr_free (void * ptr )
|
||||
|
||||
#define YYTABLES_NAME "yytables"
|
||||
|
||||
#line 66 "expr_parser.l"
|
||||
#line 68 "expr_parser.l"
|
||||
|
||||
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include "expr_arith.h"
|
||||
#include "mem_collector.h"
|
||||
|
||||
#define YY_NO_INPUT
|
||||
|
||||
#define YY_DECL int expr_lex (YYSTYPE *lvalp, YYLTYPE *llocp, mem_collector *mc)
|
||||
|
||||
#define YY_USER_ACTION llocp->first_line = yylineno; \
|
||||
|
@ -544,6 +544,8 @@ char *template_text;
|
||||
#include "template_syntax.h"
|
||||
#include "mem_collector.h"
|
||||
|
||||
#define YY_NO_INPUT
|
||||
|
||||
#define YY_DECL int template_lex (YYSTYPE *lvalp, YYLTYPE *llocp, \
|
||||
mem_collector *mc)
|
||||
|
||||
@ -551,7 +553,7 @@ char *template_text;
|
||||
llocp->first_column = llocp->last_column; \
|
||||
llocp->last_column += template_leng;
|
||||
|
||||
#line 555 "template_parser.c"
|
||||
#line 557 "template_parser.c"
|
||||
|
||||
#define INITIAL 0
|
||||
#define VALUE 1
|
||||
@ -732,13 +734,13 @@ YY_DECL
|
||||
register char *yy_cp, *yy_bp;
|
||||
register int yy_act;
|
||||
|
||||
#line 42 "template_parser.l"
|
||||
#line 44 "template_parser.l"
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Comments (lines with an starting #), and empty lines */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
#line 742 "template_parser.c"
|
||||
#line 744 "template_parser.c"
|
||||
|
||||
if ( !(yy_init) )
|
||||
{
|
||||
@ -834,13 +836,13 @@ do_action: /* This label is used only to access EOF actions. */
|
||||
case 1:
|
||||
/* rule 1 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 47 "template_parser.l"
|
||||
#line 49 "template_parser.l"
|
||||
;
|
||||
YY_BREAK
|
||||
case 2:
|
||||
/* rule 2 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 48 "template_parser.l"
|
||||
#line 50 "template_parser.l"
|
||||
;
|
||||
YY_BREAK
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@ -848,7 +850,7 @@ YY_RULE_SETUP
|
||||
/* ------------------------------------------------------------------------- */
|
||||
case 3:
|
||||
YY_RULE_SETUP
|
||||
#line 53 "template_parser.l"
|
||||
#line 55 "template_parser.l"
|
||||
{ lvalp->val_str = mem_collector_strdup(mc,template_text);
|
||||
return VARIABLE; }
|
||||
YY_BREAK
|
||||
@ -859,31 +861,31 @@ YY_RULE_SETUP
|
||||
/* ------------------------------------------------------------------------ */
|
||||
case 4:
|
||||
YY_RULE_SETUP
|
||||
#line 61 "template_parser.l"
|
||||
#line 63 "template_parser.l"
|
||||
{ BEGIN VALUE; return EQUAL;}
|
||||
YY_BREAK
|
||||
case 5:
|
||||
/* rule 5 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 63 "template_parser.l"
|
||||
#line 65 "template_parser.l"
|
||||
{ return EQUAL_EMPTY;}
|
||||
YY_BREAK
|
||||
case 6:
|
||||
/* rule 6 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 65 "template_parser.l"
|
||||
#line 67 "template_parser.l"
|
||||
{ return COMMA;}
|
||||
YY_BREAK
|
||||
case 7:
|
||||
/* rule 7 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 67 "template_parser.l"
|
||||
#line 69 "template_parser.l"
|
||||
{ return CBRACKET;}
|
||||
YY_BREAK
|
||||
case 8:
|
||||
/* rule 8 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 69 "template_parser.l"
|
||||
#line 71 "template_parser.l"
|
||||
{ BEGIN(INITIAL); return OBRACKET;}
|
||||
YY_BREAK
|
||||
/* ------------------------------------------------------------------------ */
|
||||
@ -894,7 +896,7 @@ YY_RULE_SETUP
|
||||
case 9:
|
||||
/* rule 9 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 76 "template_parser.l"
|
||||
#line 78 "template_parser.l"
|
||||
{ lvalp->val_str = mem_collector_strdup(mc,template_text+1);
|
||||
lvalp->val_str[template_leng-2] = '\0';
|
||||
BEGIN(INITIAL); return STRING; }
|
||||
@ -906,16 +908,16 @@ YY_RULE_SETUP
|
||||
*/
|
||||
case 10:
|
||||
YY_RULE_SETUP
|
||||
#line 85 "template_parser.l"
|
||||
#line 87 "template_parser.l"
|
||||
{ lvalp->val_str = mem_collector_strdup(mc,template_text);
|
||||
BEGIN(INITIAL); return STRING;}
|
||||
YY_BREAK
|
||||
case 11:
|
||||
YY_RULE_SETUP
|
||||
#line 87 "template_parser.l"
|
||||
#line 89 "template_parser.l"
|
||||
ECHO;
|
||||
YY_BREAK
|
||||
#line 919 "template_parser.c"
|
||||
#line 921 "template_parser.c"
|
||||
case YY_STATE_EOF(INITIAL):
|
||||
case YY_STATE_EOF(VALUE):
|
||||
yyterminate();
|
||||
@ -1885,7 +1887,7 @@ void template_free (void * ptr )
|
||||
|
||||
#define YYTABLES_NAME "yytables"
|
||||
|
||||
#line 87 "template_parser.l"
|
||||
#line 89 "template_parser.l"
|
||||
|
||||
|
||||
|
||||
|
@ -23,6 +23,8 @@
|
||||
#include "template_syntax.h"
|
||||
#include "mem_collector.h"
|
||||
|
||||
#define YY_NO_INPUT
|
||||
|
||||
#define YY_DECL int template_lex (YYSTYPE *lvalp, YYLTYPE *llocp, \
|
||||
mem_collector *mc)
|
||||
|
||||
|
@ -523,6 +523,8 @@ char *vm_var_text;
|
||||
#include "vm_var_syntax.h"
|
||||
#include "mem_collector.h"
|
||||
|
||||
#define YY_NO_INPUT
|
||||
|
||||
#define YY_DECL int vm_var_lex (YYSTYPE *lvalp, YYLTYPE *llocp, \
|
||||
mem_collector *mc)
|
||||
|
||||
@ -530,7 +532,7 @@ char *vm_var_text;
|
||||
llocp->first_column = llocp->last_column; \
|
||||
llocp->last_column += vm_var_leng;
|
||||
|
||||
#line 534 "vm_var_parser.c"
|
||||
#line 536 "vm_var_parser.c"
|
||||
|
||||
#define INITIAL 0
|
||||
#define VAR 1
|
||||
@ -711,7 +713,7 @@ YY_DECL
|
||||
register char *yy_cp, *yy_bp;
|
||||
register int yy_act;
|
||||
|
||||
#line 40 "vm_var_parser.l"
|
||||
#line 42 "vm_var_parser.l"
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@ -722,7 +724,7 @@ YY_DECL
|
||||
/* $NUM.CONTEXT_VARIABLE */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
#line 726 "vm_var_parser.c"
|
||||
#line 728 "vm_var_parser.c"
|
||||
|
||||
if ( !(yy_init) )
|
||||
{
|
||||
@ -817,32 +819,32 @@ do_action: /* This label is used only to access EOF actions. */
|
||||
|
||||
case 1:
|
||||
YY_RULE_SETUP
|
||||
#line 50 "vm_var_parser.l"
|
||||
#line 52 "vm_var_parser.l"
|
||||
{ BEGIN VAR;}
|
||||
YY_BREAK
|
||||
case 2:
|
||||
YY_RULE_SETUP
|
||||
#line 52 "vm_var_parser.l"
|
||||
#line 54 "vm_var_parser.l"
|
||||
{ return EQUAL;}
|
||||
YY_BREAK
|
||||
case 3:
|
||||
YY_RULE_SETUP
|
||||
#line 53 "vm_var_parser.l"
|
||||
#line 55 "vm_var_parser.l"
|
||||
{ return COMMA;}
|
||||
YY_BREAK
|
||||
case 4:
|
||||
YY_RULE_SETUP
|
||||
#line 54 "vm_var_parser.l"
|
||||
#line 56 "vm_var_parser.l"
|
||||
{ return OBRACKET;}
|
||||
YY_BREAK
|
||||
case 5:
|
||||
YY_RULE_SETUP
|
||||
#line 55 "vm_var_parser.l"
|
||||
#line 57 "vm_var_parser.l"
|
||||
{ return CBRACKET;}
|
||||
YY_BREAK
|
||||
case 6:
|
||||
YY_RULE_SETUP
|
||||
#line 57 "vm_var_parser.l"
|
||||
#line 59 "vm_var_parser.l"
|
||||
{ lvalp->val_str =
|
||||
mem_collector_strdup(mc,vm_var_text);
|
||||
return VARIABLE;}
|
||||
@ -850,7 +852,7 @@ YY_RULE_SETUP
|
||||
case 7:
|
||||
/* rule 7 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 61 "vm_var_parser.l"
|
||||
#line 63 "vm_var_parser.l"
|
||||
{ lvalp->val_str =
|
||||
mem_collector_strdup(mc,vm_var_text+1);
|
||||
lvalp->val_str[vm_var_leng-2] = '\0';
|
||||
@ -858,19 +860,19 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 8:
|
||||
YY_RULE_SETUP
|
||||
#line 66 "vm_var_parser.l"
|
||||
#line 68 "vm_var_parser.l"
|
||||
{ lvalp->val_char = '\0';
|
||||
return EOA;}
|
||||
YY_BREAK
|
||||
case 9:
|
||||
YY_RULE_SETUP
|
||||
#line 69 "vm_var_parser.l"
|
||||
#line 71 "vm_var_parser.l"
|
||||
{ lvalp->val_char = *vm_var_text;
|
||||
BEGIN(INITIAL);
|
||||
return EOA;}
|
||||
YY_BREAK
|
||||
case YY_STATE_EOF(VAR):
|
||||
#line 73 "vm_var_parser.l"
|
||||
#line 75 "vm_var_parser.l"
|
||||
{ lvalp->val_char = '\0';
|
||||
BEGIN(INITIAL);
|
||||
return EOA;}
|
||||
@ -881,15 +883,15 @@ case YY_STATE_EOF(VAR):
|
||||
case 10:
|
||||
/* rule 10 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 81 "vm_var_parser.l"
|
||||
#line 83 "vm_var_parser.l"
|
||||
{ lvalp->val_str = mem_collector_strdup(mc,vm_var_text); return RSTRING;}
|
||||
YY_BREAK
|
||||
case 11:
|
||||
YY_RULE_SETUP
|
||||
#line 83 "vm_var_parser.l"
|
||||
#line 85 "vm_var_parser.l"
|
||||
ECHO;
|
||||
YY_BREAK
|
||||
#line 893 "vm_var_parser.c"
|
||||
#line 895 "vm_var_parser.c"
|
||||
case YY_STATE_EOF(INITIAL):
|
||||
yyterminate();
|
||||
|
||||
@ -1858,7 +1860,7 @@ void vm_var_free (void * ptr )
|
||||
|
||||
#define YYTABLES_NAME "yytables"
|
||||
|
||||
#line 83 "vm_var_parser.l"
|
||||
#line 85 "vm_var_parser.l"
|
||||
|
||||
|
||||
|
||||
|
@ -23,6 +23,8 @@
|
||||
#include "vm_var_syntax.h"
|
||||
#include "mem_collector.h"
|
||||
|
||||
#define YY_NO_INPUT
|
||||
|
||||
#define YY_DECL int vm_var_lex (YYSTYPE *lvalp, YYLTYPE *llocp, \
|
||||
mem_collector *mc)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user