oops.parser
Class Lit

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

public class Lit
extends Node

represents explicit, quoted string.

See Also:
Serialized Form

Field Summary
protected  java.lang.String body
          content.
 
Fields inherited from class oops.parser.Node
follow, lookahead
 
Constructor Summary
Lit(java.lang.String body)
           
 
Method Summary
 boolean checkDeadLoop()
           
 void checkLL1(Parser parser)
          follow is not set; nothing to check.
 java.lang.String getBody()
           
 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)
          initializes lookahead for rules.
 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

body

protected java.lang.String body
content.
Constructor Detail

Lit

public Lit(java.lang.String body)
Method Detail

setLookahead

public Set setLookahead(Parser parser)
Description copied from class: Node
initializes lookahead for rules. Does not completely traverse sequences to avoid recursion.
Overrides:
setLookahead in class Node
Returns:
a one-element set, initialized by the parser.

setFollow

public Set setFollow(Parser parser,
                     Set succ)
follow need not be set.
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

getBody

public java.lang.String getBody()

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.