+elsif:
+ ELSIF_P
+ | ELSE_P IF_P
+ ;
+
+elsenode:
+ EXPR_OPEN ELSE_P EXPR_CLOSE listnodes EXPR_OPEN ENDIF_P EXPR_CLOSE {
+ $$ = $4;
+ }
+ ;
+
+elsifnode:
+ EXPR_OPEN elsif expression EXPR_CLOSE listnodes EXPR_OPEN ENDIF_P EXPR_CLOSE {
+ $$ = mc0alloc( curTmpl->templateContext, sizeof(TemplateNodeData) );
+ $$->type = ConditionNode;
+ $$->nodeData.condition.expressionNode = $3;
+ $$->nodeData.condition.ifNode = $5;
+ }
+ | EXPR_OPEN elsif expression EXPR_CLOSE listnodes elsenode {
+ $$ = mc0alloc( curTmpl->templateContext, sizeof(TemplateNodeData) );
+ $$->type = ConditionNode;
+ $$->nodeData.condition.expressionNode = $3;
+ $$->nodeData.condition.ifNode = $5;
+ $$->nodeData.condition.elseNode = $6;
+ }
+ | EXPR_OPEN elsif expression EXPR_CLOSE listnodes elsifnode {
+ $$ = mc0alloc( curTmpl->templateContext, sizeof(TemplateNodeData) );
+ $$->type = ConditionNode;
+ $$->nodeData.condition.expressionNode = $3;
+ $$->nodeData.condition.ifNode = $5;
+ $$->nodeData.condition.elseNode = $6;
+ }
+ ;
+
+ifnode:
+ EXPR_OPEN IF_P expression EXPR_CLOSE listnodes EXPR_OPEN ENDIF_P EXPR_CLOSE {
+ $$ = mc0alloc( curTmpl->templateContext, sizeof(TemplateNodeData) );
+ $$->type = ConditionNode;
+ $$->nodeData.condition.expressionNode = $3;
+ $$->nodeData.condition.ifNode = $5;
+ }
+ | EXPR_OPEN IF_P expression EXPR_CLOSE listnodes elsenode {
+ $$ = mc0alloc( curTmpl->templateContext, sizeof(TemplateNodeData) );
+ $$->type = ConditionNode;
+ $$->nodeData.condition.expressionNode = $3;
+ $$->nodeData.condition.ifNode = $5;
+ $$->nodeData.condition.elseNode = $6;
+ }
+ | EXPR_OPEN IF_P expression EXPR_CLOSE listnodes elsifnode {
+ $$ = mc0alloc( curTmpl->templateContext, sizeof(TemplateNodeData) );
+ $$->type = ConditionNode;
+ $$->nodeData.condition.expressionNode = $3;
+ $$->nodeData.condition.ifNode = $5;
+ $$->nodeData.condition.elseNode = $6;
+ }
+ ;
+
+