Venice 0.751beta

nz.org.venice.parser
Class ParseMetadata

java.lang.Object
  extended bynz.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.
 
Method Summary
 Expression getFunctionBody(java.lang.String functionName)
           
 java.lang.String getLineForExpression(Expression expression)
           
 Expression getParameterNames(java.lang.String functionName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 expressions
tokenLineMap - The map containing links between the tokens and the line number on which they appeared.
Method Detail

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

Venice 0.751beta