001// 002// Generated by JTB 1.3.2 003// 004 005package jtb.syntaxtree; 006 007// Grammar production: 008// f0 -> ( "+" | "-" ) UnaryExpression() 009// | PreIncrementExpression() 010// | PreDecrementExpression() 011// | UnaryExpressionNotPlusMinus() 012public class UnaryExpression implements Node { 013 // This was added after running jtb to remove serializable warning. 014 static final long serialVersionUID = 20150406L; 015 016 private Node parent; 017 public NodeChoice f0; 018 019 public UnaryExpression(NodeChoice n0) { 020 f0 = n0; 021 if ( f0 != null ) f0.setParent(this); 022 } 023 024 public void accept(jtb.visitor.Visitor v) { 025 v.visit(this); 026 } 027 public <R,A> R accept(jtb.visitor.GJVisitor<R,A> v, A argu) { 028 return v.visit(this,argu); 029 } 030 public <R> R accept(jtb.visitor.GJNoArguVisitor<R> v) { 031 return v.visit(this); 032 } 033 public <A> void accept(jtb.visitor.GJVoidVisitor<A> v, A argu) { 034 v.visit(this,argu); 035 } 036 public void setParent(Node n) { parent = n; } 037 public Node getParent() { return parent; } 038} 039