nz.org.venice.parser
Class ParseMetadata
java.lang.Object
nz.org.venice.parser.ParseMetadata
- public class ParseMetadata
- extends java.lang.Object
Container for parse and lexical analysis information. Used for debugging
purposes such as returning the line number on which an error occurred.
- Author:
- Mark Hummel
|
Constructor Summary |
ParseMetadata(java.util.HashMap parseTree,
java.util.HashMap tokenLineMap)
Construct an object containing the information used to construct tghe
parse tree. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ParseMetadata
public ParseMetadata(java.util.HashMap parseTree,
java.util.HashMap tokenLineMap)
- Construct an object containing the information used to construct tghe
parse tree.
- Parameters:
parseTree - The map containing links between the tokens and
constructed expressionstokenLineMap - The map containing links between the tokens and
the line number on which they appeared.
getFunctionBody
public Expression getFunctionBody(java.lang.String functionName)
- Parameters:
functionName - The name of the function which was called.
- Returns:
- The expression containing the function body for a given function.
getParameterNames
public Expression getParameterNames(java.lang.String functionName)
- Parameters:
functionName - The name of the function.
- Returns:
- The list of parameters for a given function
getLineForExpression
public java.lang.String getLineForExpression(Expression expression)
- Returns:
- the line number as a string where a given expression appears