]> granicus.if.org Git - icinga2/commitdiff
Remove the __ prefix from some of the lexer tokens
authorGunnar Beutner <gunnar.beutner@netways.de>
Thu, 11 Dec 2014 12:12:35 +0000 (13:12 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Thu, 11 Dec 2014 12:12:35 +0000 (13:12 +0100)
fixes #7883

lib/config/config_lexer.ll
lib/config/config_parser.yy

index 86a6933aacf3537d179a6b17bea9e09e1de5108d..c21e3a1a1e2a16081ebaebb66424ed64db18d214 100644 (file)
@@ -186,13 +186,12 @@ where                             return T_WHERE;
 import                         return T_IMPORT;
 assign                         return T_ASSIGN;
 ignore                         return T_IGNORE;
-for                            return T_APPLY_FOR;
-__function                     return T_FUNCTION;
-__return                       return T_RETURN;
-__for                          return T_FOR;
-__signal                       return T_SIGNAL;
-__if                           return T_IF;
-__else                         return T_ELSE;
+function                       return T_FUNCTION;
+return                         return T_RETURN;
+for                            return T_FOR;
+signal                         return T_SIGNAL;
+if                             return T_IF;
+else                           return T_ELSE;
 =\>                            return T_FOLLOWS;
 \<\<                           return T_SHIFT_LEFT;
 \>\>                           return T_SHIFT_RIGHT;
index 09855dc19e3a427d80fbcc715f41b1ce79d115b0..bef34dd597e3c8b369639ff59fdfa24d3cc4bad0 100644 (file)
@@ -166,7 +166,6 @@ static void MakeRBinaryOp(Expression** result, Expression *left, Expression *rig
 %token T_IMPORT "import (T_IMPORT)"
 %token T_ASSIGN "assign (T_ASSIGN)"
 %token T_IGNORE "ignore (T_IGNORE)"
-%token T_APPLY_FOR "for (T_APPLY_FOR)"
 %token T_FUNCTION "function (T_FUNCTION)"
 %token T_RETURN "return (T_RETURN)"
 %token T_FOR "for (T_FOR)"
@@ -660,6 +659,45 @@ lterm: type
        {
                $$ = $1;
        }
+       | T_SIGNAL identifier T_SET_ADD rterm
+       {
+               $$ = new SlotExpression($2, $4, DebugInfoRange(@1, @4));
+               free($2);
+       }
+       | T_FOR '(' identifier T_FOLLOWS identifier T_IN rterm ')' rterm_scope
+       {
+               DictExpression *aexpr = dynamic_cast<DictExpression *>($9);
+               aexpr->MakeInline();
+
+               $$ = new ForExpression($3, $5, $7, aexpr, DebugInfoRange(@1, @9));
+               free($3);
+               free($5);
+       }
+       | T_FOR '(' identifier T_IN rterm ')' rterm_scope
+       {
+               DictExpression *aexpr = dynamic_cast<DictExpression *>($7);
+               aexpr->MakeInline();
+
+               $$ = new ForExpression($3, "", $5, aexpr, DebugInfoRange(@1, @7));
+               free($3);
+       }
+       | T_IF '(' rterm ')' rterm_scope
+       {
+               DictExpression *atrue = dynamic_cast<DictExpression *>($5);
+               atrue->MakeInline();
+
+               $$ = new ConditionalExpression($3, atrue, NULL, DebugInfoRange(@1, @5));
+       }
+       | T_IF '(' rterm ')' rterm_scope T_ELSE rterm_scope
+       {
+               DictExpression *atrue = dynamic_cast<DictExpression *>($5);
+               atrue->MakeInline();
+
+               DictExpression *afalse = dynamic_cast<DictExpression *>($7);
+               afalse->MakeInline();
+
+               $$ = new ConditionalExpression($3, atrue, afalse, DebugInfoRange(@1, @7));
+       }
        | rterm
        {
                $$ = $1;
@@ -825,45 +863,6 @@ rterm_without_indexer: T_STRING
                $$ = new FunctionExpression("", *$3, $5, aexpr, DebugInfoRange(@1, @5));
                delete $3;
        }
-       | T_SIGNAL identifier T_SET_ADD rterm
-       {
-               $$ = new SlotExpression($2, $4, DebugInfoRange(@1, @4));
-               free($2);
-       }
-       | T_FOR '(' identifier T_FOLLOWS identifier T_IN rterm ')' rterm_scope
-       {
-               DictExpression *aexpr = dynamic_cast<DictExpression *>($9);
-               aexpr->MakeInline();
-
-               $$ = new ForExpression($3, $5, $7, aexpr, DebugInfoRange(@1, @9));
-               free($3);
-               free($5);
-       }
-       | T_FOR '(' identifier T_IN rterm ')' rterm_scope
-       {
-               DictExpression *aexpr = dynamic_cast<DictExpression *>($7);
-               aexpr->MakeInline();
-
-               $$ = new ForExpression($3, "", $5, aexpr, DebugInfoRange(@1, @7));
-               free($3);
-       }
-       | T_IF '(' rterm ')' rterm_scope
-       {
-               DictExpression *atrue = dynamic_cast<DictExpression *>($5);
-               atrue->MakeInline();
-
-               $$ = new ConditionalExpression($3, atrue, NULL, DebugInfoRange(@1, @5));
-       }
-       | T_IF '(' rterm ')' rterm_scope T_ELSE rterm_scope
-       {
-               DictExpression *atrue = dynamic_cast<DictExpression *>($5);
-               atrue->MakeInline();
-
-               DictExpression *afalse = dynamic_cast<DictExpression *>($7);
-               afalse->MakeInline();
-
-               $$ = new ConditionalExpression($3, atrue, afalse, DebugInfoRange(@1, @7));
-       }
        ;
 
 target_type_specifier: /* empty */
@@ -911,7 +910,7 @@ use_specifier_item: identifier
        ;
 
 apply_for_specifier: /* empty */
-       | T_APPLY_FOR '(' identifier T_FOLLOWS identifier T_IN rterm ')'
+       | T_FOR '(' identifier T_FOLLOWS identifier T_IN rterm ')'
        {
                context->m_FKVar.top() = $3;
                free($3);
@@ -921,7 +920,7 @@ apply_for_specifier: /* empty */
 
                context->m_FTerm.top() = $7;
        }
-       | T_APPLY_FOR '(' identifier T_IN rterm ')'
+       | T_FOR '(' identifier T_IN rterm ')'
        {
                context->m_FKVar.top() = $3;
                free($3);