junc.ast
Class StringLiteral

java.lang.Object
  |
  +--antlr.BaseAST
        |
        +--antlr.CommonAST
              |
              +--junc.ast.JUnCASTNode
                    |
                    +--junc.ast.ExpressionNode
                          |
                          +--junc.ast.Literal
                                |
                                +--junc.ast.StringLiteral
All Implemented Interfaces:
antlr.collections.AST, java.io.Serializable

public class StringLiteral
extends Literal

See Also:
Serialized Form

Field Summary
 java.lang.String value
           
 
Fields inherited from class junc.ast.ExpressionNode
falseList, leftValue, statementExpression, trueList, type
 
Fields inherited from class antlr.BaseAST
down, right
 
Constructor Summary
StringLiteral(java.lang.String value)
           
 
Method Summary
 int addToConstantPool(org.apache.bcel.generic.ClassGen classGen)
           
 char charAt(int i)
           
 void encode()
          This function encodes sequences like '\n' or '\166' into the corresponding ascii char.
 void translate(org.apache.bcel.generic.ClassGen classGen, org.apache.bcel.generic.MethodGen methodGen)
          Describe translate method here.
 junc.types.JUnCBaseType typeCheck(junc.symtab.SymbolTable stable)
          Describe typeCheck method here.
 
Methods inherited from class junc.ast.ExpressionNode
addFalseList, addTrueList, appendToFalseList, appendToTrueList, backPatch, desynthesize, evaluate, evaluateExp, leftValue, lookupPrimop, superExp, synthesize, thisExp, thisOrSuperExp, translateSynthesized, type, typeExp, variableExp
 
Methods inherited from class junc.ast.JUnCASTNode
getColumnNumber, getLineNumber, setColumnNumber, setLineNumber
 
Methods inherited from class antlr.CommonAST
getText, getType, initialize, initialize, initialize, setText, setType
 
Methods inherited from class antlr.BaseAST
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, getNextSibling, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toString, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

public java.lang.String value
Constructor Detail

StringLiteral

public StringLiteral(java.lang.String value)
Method Detail

charAt

public char charAt(int i)

typeCheck

public junc.types.JUnCBaseType typeCheck(junc.symtab.SymbolTable stable)
                                  throws TypeCheckError
Description copied from class: ExpressionNode
Describe typeCheck method here.

Specified by:
typeCheck in class Literal
Parameters:
stable - a SymbolTable value
Returns:
a JUnCBaseType value
Throws:
TypeCheckError - if an error occurs

encode

public void encode()
This function encodes sequences like '\n' or '\166' into the corresponding ascii char. (Untested !!)


translate

public void translate(org.apache.bcel.generic.ClassGen classGen,
                      org.apache.bcel.generic.MethodGen methodGen)
Description copied from class: ExpressionNode
Describe translate method here.

Overrides:
translate in class ExpressionNode
Parameters:
classGen - a ClassGen value
methodGen - a MethodGen value

addToConstantPool

public int addToConstantPool(org.apache.bcel.generic.ClassGen classGen)
Specified by:
addToConstantPool in class Literal