openjava.syntax
Class PrepPhraseRule

java.lang.Object
  |
  +--openjava.syntax.AbstractSyntaxRule
        |
        +--openjava.syntax.PrepPhraseRule

public class PrepPhraseRule
extends AbstractSyntaxRule

The class PrepPhraseRule represents the syntax rule of a prepositional phrase. Suppose there's a syntax rule A and a given identifier i. This class can represent the syntax:

 PrepPhraseRule := i A
 

Since:
%SOFTWARE% 1.0
See Also:
Object

Constructor Summary
PrepPhraseRule(java.lang.String prep, SyntaxRule words)
          Allocates a new rule representing the syntax of a prepositional phrase consisting of a preposition and a syntax.
 
Method Summary
 ParseTree consume(TokenSource token_src)
          Consumes tokens from the given token source following the rule.
 
Methods inherited from class openjava.syntax.AbstractSyntaxRule
getSyntaxException, lookahead
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrepPhraseRule

public PrepPhraseRule(java.lang.String prep,
                      SyntaxRule words)
Allocates a new rule representing the syntax of a prepositional phrase consisting of a preposition and a syntax.
Method Detail

consume

public ParseTree consume(TokenSource token_src)
                  throws SyntaxException
Description copied from class: AbstractSyntaxRule
Consumes tokens from the given token source following the rule. To be overridden.
Overrides:
consume in class AbstractSyntaxRule
Tags copied from class: AbstractSyntaxRule
Parameters:
token_src - token source to consume.
Returns:
a parse tree object consumed by following this rule.