~ubuntu-branches/ubuntu/gutsy/jflex/gutsy

« back to all changes in this revision

Viewing changes to examples/java/JavaSymbol.java

  • Committer: Bazaar Package Importer
  • Author(s): Takashi Okamoto
  • Date: 2002-02-16 13:38:21 UTC
  • Revision ID: james.westby@ubuntu.com-20020216133821-5wsdprpt9xl7ondr
Tags: upstream-1.3.5
ImportĀ upstreamĀ versionĀ 1.3.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
public class JavaSymbol extends java_cup.runtime.Symbol {
 
3
  private int line;
 
4
  private int column;
 
5
 
 
6
  public JavaSymbol(int type, int line, int column) {
 
7
    this(type, line, column, -1, -1, null);
 
8
  }
 
9
 
 
10
  public JavaSymbol(int type, int line, int column, Object value) {
 
11
    this(type, line, column, -1, -1, value);
 
12
  }
 
13
 
 
14
  public JavaSymbol(int type, int line, int column, int left, int right, Object value) {
 
15
    super(type, left, right, value);
 
16
    this.line = line;
 
17
    this.column = column;
 
18
  }
 
19
 
 
20
  public int getLine() {
 
21
    return line;
 
22
  }
 
23
 
 
24
  public int getColumn() {
 
25
    return column;
 
26
  }
 
27
 
 
28
  public String toString() {
 
29
    return "line "+line+", column "+column;
 
30
  }
 
31
}