Top Description Fields Constructors Methods
java_cup

public Class lalr_transition

extends Object
Class Inheritance

This class represents a transition in an LALR viable prefix recognition machine. Transitions can be under terminals for non-terminals. They are internally linked together into singly linked lists containing all the transitions out of a single state via the _next field.
Author
Scott Hudson
Version
last updated: 11/25/95
See Also
java_cup.lalr_state

Field Summary

Modifier and TypeField and Description
protected lalr_transition
_next

Next transition in linked list of transitions out of a state

protected symbol
_on_symbol

The symbol we make the transition on.

protected lalr_state
_to_state

The state we transition to.

Constructor Summary

AccessConstructor and Description
public
lalr_transition(symbol
symbol we are transitioning on.
on_sym
,
lalr_state
state we transition to.
to_st
,
lalr_transition
next transition in linked list.
nxt
)

Full constructor.

public
lalr_transition(symbol
symbol we are transitioning on.
on_sym
,
lalr_state
state we transition to.
to_st
)

Constructor with null next.

Method Summary

Modifier and TypeMethod and Description
public lalr_transition
next()

Next transition in linked list of transitions out of a state

public symbol
on_symbol()

The symbol we make the transition on.

public lalr_state
to_state()

The state we transition to.

public String
toString()

Overrides java.lang.Object.toString.

Convert to a string.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

_nextback to summary
protected lalr_transition _next

Next transition in linked list of transitions out of a state

_on_symbolback to summary
protected symbol _on_symbol

The symbol we make the transition on.

_to_stateback to summary
protected lalr_state _to_state

The state we transition to.

Constructor Detail

lalr_transitionback to summary
public lalr_transition(symbol on_sym, lalr_state to_st, lalr_transition nxt) throws internal_error

Full constructor.

Parameters
on_sym:symbol

symbol we are transitioning on.

to_st:lalr_state

state we transition to.

nxt:lalr_transition

next transition in linked list.

lalr_transitionback to summary
public lalr_transition(symbol on_sym, lalr_state to_st) throws internal_error

Constructor with null next.

Parameters
on_sym:symbol

symbol we are transitioning on.

to_st:lalr_state

state we transition to.

Method Detail

nextback to summary
public lalr_transition next()

Next transition in linked list of transitions out of a state

on_symbolback to summary
public symbol on_symbol()

The symbol we make the transition on.

to_stateback to summary
public lalr_state to_state()

The state we transition to.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Convert to a string.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object.