oops.parser
Class Id

java.lang.Object
  |
  +--oops.parser.Node
        |
        +--oops.parser.Id

public class Id
extends Node

represents identifier.

See Also:
Serialized Form

Field Summary
protected  java.lang.String name
          name of Token or Rule.
protected  Node peer
          Token or Rule.
 
Fields inherited from class oops.parser.Node
follow, lookahead
 
Constructor Summary
Id(java.lang.String name)
           
 
Method Summary
 boolean checkDeadLoop()
           
 void checkLL1(Parser parser)
          follow is not set; nothing to check.
 java.lang.String getName()
           
 void parse(Scanner scanner, Goal goal, Parser parser, oops.parser.Activation caller)
          performs recognition.
 Set setFollow(Parser parser, Set succ)
          follow need not be set.
 Set setLookahead(Parser parser)
          initially asks parser for peer.
 java.lang.String toString()
           
 
Methods inherited from class oops.parser.Node
add, degree, getLookahead, node, sub
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
name of Token or Rule.

peer

protected Node peer
Token or Rule.
Constructor Detail

Id

public Id(java.lang.String name)
Method Detail

setLookahead

public Set setLookahead(Parser parser)
initially asks parser for peer.
Overrides:
setLookahead in class Node
Returns:
lookahead set of peer.

setFollow

public Set setFollow(Parser parser,
                     Set succ)
follow need not be set. if Rule, send succ to it.
Overrides:
setFollow in class Node
Tags copied from class: Node
Parameters:
parser - Parser for token setup.
succ - lookahead of successor.
Returns:
lookahead, i.e., follow for predecessor.

checkLL1

public void checkLL1(Parser parser)
follow is not set; nothing to check.
Overrides:
checkLL1 in class Node

checkDeadLoop

public boolean checkDeadLoop()
Overrides:
checkDeadLoop in class Node

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getName

public java.lang.String getName()

parse

public void parse(Scanner scanner,
                  Goal goal,
                  Parser parser,
                  oops.parser.Activation caller)
           throws java.io.IOException,
                  oops.parser.Activation
performs recognition.
Overrides:
parse in class Node
Parameters:
scanner - delivers input tokens.
goal - represents current nonterminal and is informed about shifts/reduces.
caller - Activation frame.