coins.ast.expr
Class StringLiteral

java.lang.Object
  extended bycoins.ast.ASTree
      extended bycoins.ast.expr.StringLiteral
All Implemented Interfaces:
Expr, LvalueExpr, java.io.Serializable, TypeId
Direct Known Subclasses:
WcharLiteral

public class StringLiteral
extends ASTree
implements Expr, LvalueExpr, TypeId

Constant character string.

See Also:
Serialized Form

Field Summary
protected  java.lang.String string
           
 
Fields inherited from interface coins.ast.TypeId
ARRAY_T, CHAR_T, CONST_T, DOUBLE_T, ELLIPSIS_T, ENUM_BEGIN, ENUM_END, FLOAT_T, FUNCTION_T, INT_T, LONG_DOUBLE_T, LONG_LONG_T, LONG_T, NO_DIMENSION_T, OFFSET_T, POINTER_T, RESTRICT_T, RETURN_T, S_AUTO, S_EXTERN, S_INLINE, S_NONE, S_REGISTER, S_STATIC, SHORT_T, SIGNED_T, SIZE_T, STRUCT_BEGIN, STRUCT_END, UNION_BEGIN, UNION_END, UNSIGNED_T, VOID_T, VOLATILE_T
 
Constructor Summary
StringLiteral(java.lang.String s)
           
 
Method Summary
 void accept(Visitor v)
          Is a method for the visitor pattern.
 java.lang.String get()
           
 ASTree getLeft()
          Returns null.
 ASTree getRight()
          Returns null.
 byte[] getType()
          Returns the char* type.
 boolean hasAddress()
          Returns true if the expression can be an operand of '&'.
 boolean isLvalue()
          Returns true if the expression is really an l-value.
 void setLeft(ASTree _left)
           
 void setRight(ASTree _right)
           
 java.lang.String toString()
           
 
Methods inherited from class coins.ast.ASTree
getTag, putSeparator, rightToString, toString1
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

string

protected java.lang.String string
Constructor Detail

StringLiteral

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

isLvalue

public boolean isLvalue()
Description copied from interface: LvalueExpr
Returns true if the expression is really an l-value.

Specified by:
isLvalue in interface LvalueExpr

hasAddress

public boolean hasAddress()
Description copied from interface: LvalueExpr
Returns true if the expression can be an operand of '&'.

Specified by:
hasAddress in interface LvalueExpr

get

public java.lang.String get()

accept

public void accept(Visitor v)
Description copied from class: ASTree
Is a method for the visitor pattern. It calls atXXX() on the given visitor, where XXX is the class name of the node object.

Specified by:
accept in class ASTree

getLeft

public ASTree getLeft()
Returns null.

Specified by:
getLeft in class ASTree

getRight

public ASTree getRight()
Returns null.

Specified by:
getRight in class ASTree

setLeft

public void setLeft(ASTree _left)
Specified by:
setLeft in class ASTree

setRight

public void setRight(ASTree _right)
Specified by:
setRight in class ASTree

getType

public byte[] getType()
Returns the char* type.

Specified by:
getType in interface Expr
Returns:
the encoded type.

toString

public java.lang.String toString()
Overrides:
toString in class ASTree