|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.agentfactory.common.util.Utilities
public class Utilities
Utility class that rovide various helper methods that are useful for processing the list of tokens.
| Constructor Summary | |
|---|---|
Utilities()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
context(java.util.List<Token> statement)
Generates a string represetation of a given list of tokens. |
static java.lang.String |
context(java.util.List<Token> statement,
int end)
Generates a string represetation of a given list of tokens up to a given point in the list. |
static int |
findTokenIndex(java.util.List<Token> statement,
java.lang.String token,
int offset)
Linear search that attempts to locate a given token in the list of tokens. |
static int |
scanForParameter(java.util.List<Token> statement,
int from)
This method is used by the generateParseTree(...) method to locate individual parameters within a composite first-order type structure. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Utilities()
| Method Detail |
|---|
public static java.lang.String context(java.util.List<Token> statement)
statement - a list of tokens that represents a statement in the source program
public static java.lang.String context(java.util.List<Token> statement,
int end)
statement - a list of tokens that represents a statement in the source programend - the endpoint at which the context string should cease being created
public static int findTokenIndex(java.util.List<Token> statement,
java.lang.String token,
int offset)
statement - a list of tokens that represents a statement in the source codetoken - a string representation of the token that is being searched foroffset - the starting point (in the list) of the search
public static int scanForParameter(java.util.List<Token> statement,
int from)
throws SyntaxError
statement - the list of tokens to be scannedfrom - an offet in the list of tokens.
SyntaxError
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||