void CaseClause( #line 2703 "VBNET.ATG" out CaseLabel caseClause) { #line 2705 "VBNET.ATG" Expression expr = null; Expression sexpr = null; BinaryOperatorType op = BinaryOperatorType.None; caseClause = null; if (la.kind == 86) { lexer.NextToken(); #line 2711 "VBNET.ATG" caseClause = new CaseLabel(); } else if (StartOf(39)) { if (la.kind == 113) { lexer.NextToken(); } switch (la.kind) { case 27: { lexer.NextToken(); #line 2715 "VBNET.ATG" op = BinaryOperatorType.LessThan; break; } case 26: { lexer.NextToken(); #line 2716 "VBNET.ATG" op = BinaryOperatorType.GreaterThan; break; } case 30: { lexer.NextToken(); #line 2717 "VBNET.ATG" op = BinaryOperatorType.LessThanOrEqual; break; } case 29: { lexer.NextToken(); #line 2718 "VBNET.ATG" op = BinaryOperatorType.GreaterThanOrEqual; break; } case 11: { lexer.NextToken(); #line 2719 "VBNET.ATG" op = BinaryOperatorType.Equality; break; } case 28: { lexer.NextToken(); #line 2720 "VBNET.ATG" op = BinaryOperatorType.InEquality; break; } default: SynErr(267); break; } Expr( #line 2722 "VBNET.ATG" out expr); #line 2724 "VBNET.ATG" caseClause = new CaseLabel(op, expr); } else if (StartOf(27)) { Expr( #line 2726 "VBNET.ATG" out expr); if (la.kind == 172) { lexer.NextToken(); Expr( #line 2726 "VBNET.ATG" out sexpr); } #line 2728 "VBNET.ATG" caseClause = new CaseLabel(expr, sexpr); } else SynErr(268); }
void CaseClause( #line 3540 "VBNET.ATG" out CaseLabel caseClause) { #line 3542 "VBNET.ATG" Expression expr = null; Expression sexpr = null; BinaryOperatorType op = BinaryOperatorType.None; caseClause = null; if (la.kind == 113) { lexer.NextToken(); #line 3548 "VBNET.ATG" caseClause = new CaseLabel(); } else if (StartOf(52)) { if (la.kind == 146) { lexer.NextToken(); } switch (la.kind) { case 40: { lexer.NextToken(); #line 3552 "VBNET.ATG" op = BinaryOperatorType.LessThan; break; } case 39: { lexer.NextToken(); #line 3553 "VBNET.ATG" op = BinaryOperatorType.GreaterThan; break; } case 43: { lexer.NextToken(); #line 3554 "VBNET.ATG" op = BinaryOperatorType.LessThanOrEqual; break; } case 42: { lexer.NextToken(); #line 3555 "VBNET.ATG" op = BinaryOperatorType.GreaterThanOrEqual; break; } case 20: { lexer.NextToken(); #line 3556 "VBNET.ATG" op = BinaryOperatorType.Equality; break; } case 41: { lexer.NextToken(); #line 3557 "VBNET.ATG" op = BinaryOperatorType.InEquality; break; } default: SynErr(325); break; } Expr( #line 3559 "VBNET.ATG" out expr); #line 3561 "VBNET.ATG" caseClause = new CaseLabel(op, expr); } else if (StartOf(25)) { Expr( #line 3563 "VBNET.ATG" out expr); if (la.kind == 219) { lexer.NextToken(); Expr( #line 3563 "VBNET.ATG" out sexpr); } #line 3565 "VBNET.ATG" caseClause = new CaseLabel(expr, sexpr); } else SynErr(326); }
void SwitchLabel( //#line 1698 "cs.ATG" out CaseLabel label) { //#line 1699 "cs.ATG" Expression expr = null; label = null; if (la.kind == 55) { lexer.NextToken(); Expr( //#line 1701 "cs.ATG" out expr); Expect(9); //#line 1701 "cs.ATG" label = new CaseLabel(expr); } else if (la.kind == 63) { lexer.NextToken(); Expect(9); //#line 1702 "cs.ATG" label = new CaseLabel(); } else SynErr(203); }
public override object TrackedVisitCaseLabel(CaseLabel caseLabel, object data) { return null; }
public object VisitCaseLabel(CaseLabel caseLabel, object data) { throw new ApplicationException("CaseLabel was visited."); }
public virtual object VisitCaseLabel(CaseLabel caseLabel, object data) { throw new global::System.NotImplementedException("CaseLabel"); }
public virtual object TrackedVisitCaseLabel(CaseLabel caseLabel, object data) { return base.VisitCaseLabel(caseLabel, data); }
public virtual bool VisitCaseLabel(CaseLabel caseLabel, object d) { if ((caseLabel == null)) { return SetFailure(); } if ((d == null)) { return SetFailure(); } if ((caseLabel.Label == null)) { return SetFailure(); } if ((caseLabel.ToExpression == null)) { return SetFailure(); } if(caseLabel.GetType() != d.GetType()) {return SetFailure();} var data = (CaseLabel)d; if (!IsMatch(caseLabel, data)) { return SetFailure(); } caseLabel.Label.AcceptVisitor(this, data.Label); return caseLabel.ToExpression.AcceptVisitor(this, data.ToExpression); }
public object VisitCaseLabel(CaseLabel caseLabel, object data) { throw new NotImplementedException (); }
bool CompareCase(CaseLabel label, GotoCaseStatement stmt) { if (label.IsDefault && stmt.IsDefaultCase) return true; if (stmt.Expression is PrimitiveExpression && label.Label is PrimitiveExpression) { PrimitiveExpression e1 = stmt.Expression as PrimitiveExpression; PrimitiveExpression e2 = label.Label as PrimitiveExpression; return object.Equals(e1.Value, e2.Value); } return false; }
public override object VisitCaseLabel(CaseLabel caseLabel, object data) { this.cases.Add(caseLabel); return base.VisitCaseLabel(caseLabel, data); }
public override object VisitCaseLabel(CaseLabel caseLabel, object data) { return base.VisitCaseLabel(caseLabel, data); }
private bool IsMatch(CaseLabel left, CaseLabel right) { return left.BinaryOperatorType == right.BinaryOperatorType; }
public override object VisitCaseLabel(CaseLabel caseLabel, object data) { caseLabel.Label.Parent = caseLabel; caseLabel.ToExpression.Parent = caseLabel; return base.VisitCaseLabel(caseLabel, data); }
void SwitchLabel( #line 1718 "cs.ATG" out CaseLabel label) { #line 1719 "cs.ATG" Expression expr = null; label = null; if (la.kind == 55) { lexer.NextToken(); Expr( #line 1721 "cs.ATG" out expr); Expect(9); #line 1721 "cs.ATG" label = new CaseLabel(expr); } else if (la.kind == 63) { lexer.NextToken(); Expect(9); #line 1722 "cs.ATG" label = new CaseLabel(); } else SynErr(205); }
public virtual object VisitCaseLabel(CaseLabel caseLabel, object data) { Debug.Assert((caseLabel != null)); Debug.Assert((caseLabel.Label != null)); Debug.Assert((caseLabel.ToExpression != null)); caseLabel.Label.AcceptVisitor(this, data); return caseLabel.ToExpression.AcceptVisitor(this, data); }
void CaseClause( #line 3188 "VBNET.ATG" out CaseLabel caseClause) { #line 3190 "VBNET.ATG" Expression expr = null; Expression sexpr = null; BinaryOperatorType op = BinaryOperatorType.None; caseClause = null; if (la.kind == 98) { lexer.NextToken(); #line 3196 "VBNET.ATG" caseClause = new CaseLabel(); } else if (StartOf(43)) { if (la.kind == 131) { lexer.NextToken(); } switch (la.kind) { case 28: { lexer.NextToken(); #line 3200 "VBNET.ATG" op = BinaryOperatorType.LessThan; break; } case 27: { lexer.NextToken(); #line 3201 "VBNET.ATG" op = BinaryOperatorType.GreaterThan; break; } case 31: { lexer.NextToken(); #line 3202 "VBNET.ATG" op = BinaryOperatorType.LessThanOrEqual; break; } case 30: { lexer.NextToken(); #line 3203 "VBNET.ATG" op = BinaryOperatorType.GreaterThanOrEqual; break; } case 10: { lexer.NextToken(); #line 3204 "VBNET.ATG" op = BinaryOperatorType.Equality; break; } case 29: { lexer.NextToken(); #line 3205 "VBNET.ATG" op = BinaryOperatorType.InEquality; break; } default: SynErr(285); break; } Expr( #line 3207 "VBNET.ATG" out expr); #line 3209 "VBNET.ATG" caseClause = new CaseLabel(op, expr); } else if (StartOf(29)) { Expr( #line 3211 "VBNET.ATG" out expr); if (la.kind == 201) { lexer.NextToken(); Expr( #line 3211 "VBNET.ATG" out sexpr); } #line 3213 "VBNET.ATG" caseClause = new CaseLabel(expr, sexpr); } else SynErr(286); }
public virtual object VisitCaseLabel(CaseLabel caseLabel, object data) { Debug.Assert((caseLabel != null)); Debug.Assert((caseLabel.Label != null)); Debug.Assert((caseLabel.ToExpression != null)); nodeStack.Push(caseLabel.Label); caseLabel.Label.AcceptVisitor(this, data); caseLabel.Label = ((Expression)(nodeStack.Pop())); nodeStack.Push(caseLabel.ToExpression); caseLabel.ToExpression.AcceptVisitor(this, data); caseLabel.ToExpression = ((Expression)(nodeStack.Pop())); return null; }
public sealed override object VisitCaseLabel(CaseLabel caseLabel, object data) { this.BeginVisit(caseLabel); object result = this.TrackedVisitCaseLabel(caseLabel, data); this.EndVisit(caseLabel); return result; }
public virtual object VisitCaseLabel(CaseLabel caseLabel, object data) { throw CreateException(caseLabel); }
private void CreateSwitchCaseCondition(string prefix, Expression switchExpression, CaseLabel label) { this.Append(prefix); switchExpression.AcceptVisitor(this, null); this.Append(" == "); label.Label.AcceptVisitor(this, null); }
void SwitchLabel( #line 1712 "Frames/cs.ATG" out CaseLabel label) { #line 1713 "Frames/cs.ATG" Expression expr = null; label = null; if (la.kind == 55) { lexer.NextToken(); Expr( #line 1715 "Frames/cs.ATG" out expr); Expect(9); #line 1715 "Frames/cs.ATG" label = new CaseLabel(expr); } else if (la.kind == 63) { lexer.NextToken(); Expect(9); #line 1716 "Frames/cs.ATG" label = new CaseLabel(); } else SynErr(204); }
void CaseClause( //#line 3532 "VBNET.ATG" out CaseLabel caseClause) { //#line 3534 "VBNET.ATG" Expression expr = null; Expression sexpr = null; BinaryOperatorType op = BinaryOperatorType.None; caseClause = null; if (la.kind == 111) { lexer.NextToken(); //#line 3540 "VBNET.ATG" caseClause = new CaseLabel(); } else if (StartOf(51)) { if (la.kind == 144) { lexer.NextToken(); } switch (la.kind) { case 40: { lexer.NextToken(); //#line 3544 "VBNET.ATG" op = BinaryOperatorType.LessThan; break; } case 39: { lexer.NextToken(); //#line 3545 "VBNET.ATG" op = BinaryOperatorType.GreaterThan; break; } case 43: { lexer.NextToken(); //#line 3546 "VBNET.ATG" op = BinaryOperatorType.LessThanOrEqual; break; } case 42: { lexer.NextToken(); //#line 3547 "VBNET.ATG" op = BinaryOperatorType.GreaterThanOrEqual; break; } case 20: { lexer.NextToken(); //#line 3548 "VBNET.ATG" op = BinaryOperatorType.Equality; break; } case 41: { lexer.NextToken(); //#line 3549 "VBNET.ATG" op = BinaryOperatorType.InEquality; break; } default: SynErr(321); break; } Expr( //#line 3551 "VBNET.ATG" out expr); //#line 3553 "VBNET.ATG" caseClause = new CaseLabel(op, expr); } else if (StartOf(24)) { Expr( //#line 3555 "VBNET.ATG" out expr); if (la.kind == 216) { lexer.NextToken(); Expr( //#line 3555 "VBNET.ATG" out sexpr); } //#line 3557 "VBNET.ATG" caseClause = new CaseLabel(expr, sexpr); } else SynErr(322); }
public override object VisitCaseLabel (CaseLabel node, object data) { if (node.IsDefault) { Write ("default"); } else { Write ("case "); node.Label.AcceptVisitor (this, null); } Write (":"); NewLine (); return null; }