~sgdg/stado/stado30

« back to all changes in this revision

Viewing changes to src/org/postgresql/stado/parser/core/syntaxtree/NodeChoice.java

  • Committer: Jim Mlodgenski
  • Date: 2011-11-09 20:39:51 UTC
  • Revision ID: jim@cirrusql.com-20111109203951-bpj0woiwl76xkezn
Changes necessary to handle the updated versions of JTB and JavaCC

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*****************************************************************************
2
 
 * Copyright (C) 2008 EnterpriseDB Corporation.
3
 
 * Copyright (C) 2011 Stado Global Development Group.
4
 
 *
5
 
 * This file is part of Stado.
6
 
 *
7
 
 * Stado is free software: you can redistribute it and/or modify
8
 
 * it under the terms of the GNU General Public License as published by
9
 
 * the Free Software Foundation, either version 3 of the License, or
10
 
 * (at your option) any later version.
11
 
 *
12
 
 * Stado is distributed in the hope that it will be useful,
13
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
 * GNU General Public License for more details.
16
 
 *
17
 
 * You should have received a copy of the GNU General Public License
18
 
 * along with Stado.  If not, see <http://www.gnu.org/licenses/>.
19
 
 *
20
 
 * You can find Stado at http://www.stado.us
21
 
 *
22
 
 ****************************************************************************/
23
 
// Generated by JTB 1.2.2
24
 
//
25
 
 
 
1
/* Generated by JTB 1.4.4 */
26
2
package org.postgresql.stado.parser.core.syntaxtree;
27
3
 
28
 
/**
29
 
 * Represents a grammar choice, e.g. ( A | B )
30
 
 */
31
 
public class NodeChoice implements Node {
32
 
   public NodeChoice(Node node) {
33
 
      this(node, -1);
34
 
   }
35
 
 
36
 
   public NodeChoice(Node node, int whichChoice) {
37
 
      choice = node;
38
 
      which = whichChoice;
39
 
   }
40
 
 
41
 
   public void accept(org.postgresql.stado.parser.core.visitor.Visitor v) {
42
 
      choice.accept(v);
43
 
   }
44
 
   public Object accept(org.postgresql.stado.parser.core.visitor.ObjectVisitor v, Object argu) {
45
 
      return choice.accept(v,argu);
46
 
   }
47
 
 
48
 
   public Node choice;
49
 
   public int which;
 
4
import org.postgresql.stado.parser.core.visitor.IRetArguVisitor;
 
5
import org.postgresql.stado.parser.core.visitor.IRetVisitor;
 
6
import org.postgresql.stado.parser.core.visitor.IVoidArguVisitor;
 
7
import org.postgresql.stado.parser.core.visitor.IVoidVisitor;
 
8
 
 
9
public class NodeChoice implements INode {
 
10
 
 
11
  public INode choice;
 
12
 
 
13
  public int which;
 
14
 
 
15
  public int total;
 
16
 
 
17
  private static final long serialVersionUID = 144L;
 
18
 
 
19
  public NodeChoice(final INode node) {
 
20
   this(node, -1, -1);
 
21
  }
 
22
 
 
23
  public NodeChoice(final INode node, final int whichChoice, final int totalChoices) {
 
24
    choice = node;
 
25
    which = whichChoice;
 
26
    total = totalChoices;
 
27
  }
 
28
 
 
29
  public <R, A> R accept(final IRetArguVisitor<R, A> vis, final A argu) {
 
30
    return choice.accept(vis, argu);
 
31
  }
 
32
 
 
33
  public <R> R accept(final IRetVisitor<R> vis) {
 
34
    return choice.accept(vis);
 
35
  }
 
36
 
 
37
  public <A> void accept(final IVoidArguVisitor<A> vis, final A argu) {
 
38
    choice.accept(vis, argu);
 
39
  }
 
40
 
 
41
  public void accept(final IVoidVisitor vis) {
 
42
    choice.accept(vis);
 
43
  }
 
44
 
50
45
}
51