Modifier and Type | Field and Description |
---|---|
protected int |
end
Line and column where this symbol ends.
|
protected short |
id
Numeric symbol ID.
|
protected int |
start
Line and column where this symbol begins.
|
Object |
value
Value assigned to this symbol.
|
Modifier | Constructor and Description |
---|---|
protected |
Symbol()
Special case constructor that allows creation of explicitly Symbol-ized nonterminals.
|
|
Symbol(Object value)
Creates Symbol for non-symbolic results of action routines
|
|
Symbol(short id) |
|
Symbol(short id,
int start,
int end) |
|
Symbol(short id,
int start_line,
int start_column,
int length) |
|
Symbol(short id,
int start_line,
int start_column,
int length,
Object value) |
|
Symbol(short id,
int left,
int right,
Object value) |
|
Symbol(short id,
Object value) |
Modifier and Type | Method and Description |
---|---|
Symbol |
clone() |
static int |
getColumn(int position)
Extracts column number from a packed position.
|
int |
getEnd()
Returns a position in a source where this symbol ends.
|
short |
getId()
Returns an ID of this symbol.
|
static int |
getLine(int position)
Extracts line number from a packed position.
|
int |
getStart()
Returns a position in a source where this symbol starts.
|
static int |
makePosition(int line,
int column)
Packs symbol "coordinates" into a single number.
|
public Object value
protected short id
protected int start
protected int end
public Symbol(short id)
public Symbol(short id, Object value)
public Symbol(short id, int start, int end)
public Symbol(short id, int left, int right, Object value)
public Symbol(short id, int start_line, int start_column, int length)
public Symbol(short id, int start_line, int start_column, int length, Object value)
public Symbol(Object value)
value
- attached Symbol's valueprotected Symbol()
public static int makePosition(int line, int column)
public static int getLine(int position)
public static int getColumn(int position)
public short getId()
public int getStart()
public int getEnd()
public Symbol clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright © 2020 Sable. All rights reserved.