AST
node type FloatingPointLiteral

General Info

Production
FloatingPointLiteral : NumericLiteral;
Type Hierarchy:
java.lang.Object
  extended by beaver.Symbol
      extended by AST.ASTNode<ASTNode>
          extended by AST.Expr
              extended by AST.PrimaryExpr
                  extended by AST.Literal
                      extended by AST.NumericLiteral
                          extended by AST.FloatingPointLiteral
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<ASTNode>

Description

Java floating point literal. Can store any value representable as an IEEE 754 32-bit single-precision floating point number.
Source
Declared in Java7Frontend/Literals.ast at line 60

Member Filters

API level:

Aspect:

Constructors

public FloatingPointLiteral(java.lang.String p0)
 
public FloatingPointLiteral(beaver.Symbol p0)
 

Attributes

syn TypeDecl type()
Description copied from class: NumericLiteral
The type of a NumericLiteral is undefined. The literal must be parsed before it can have a type.
Overrides:type in class NumericLiteral
Source
Declared in Java1.4Frontend/TypeAnalysis.jrag at line 302
Aspect
TypeAnalysis
syn boolean isZero()
Returns:
true if this floating point literal is equivalent to a zero literal
Source
Declared in Java7Frontend/Literals.jrag at line 22
Aspect
Literals
Parse this literal and return a fresh Constant.
Overrides:constant in class Literal
Returns:
a fresh Constant representing this FloatingPointLiteral
Source
Declared in Java7Frontend/Literals.jrag at line 175
Aspect
Literals
syn boolean needsRewrite()
Utility attribute for literal rewriting. Any of the NumericLiteral subclasses have already been rewritten and/or parsed, and should not be rewritten again.
Overrides:needsRewrite in class NumericLiteral
Returns:
true if this literal is a "raw", not-yet-parsed NumericLiteral
Source
Declared in Java7Frontend/Literals.jrag at line 334
Aspect
Literals

Methods

public void flushCache()
Overrides:flushCache in class NumericLiteral
public void flushCollectionCache()
public FloatingPointLiteral clone()
                           throws java.lang.CloneNotSupportedException
Overrides:clone in class NumericLiteral
Throws:
java.lang.CloneNotSupportedException
Overrides:copy in class NumericLiteral
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
Overrides:fullCopy in class NumericLiteral
Returns:
dangling copy of the subtree at this node
public void typeCheck()
Overrides:typeCheck in class ASTNode<ASTNode>
Source
Declared in Java1.4Frontend/TypeCheck.jrag at line 581
Aspect
TypeCheck
public static void push(CodeGeneration gen,
                        float value)
Source
Declared in Java1.4Backend/CodeGeneration.jrag at line 515
Aspect
CodeGeneration
Overrides:emitPushConstant in class Literal
Source
Declared in Java1.4Backend/CodeGeneration.jrag at line 562
Aspect
CodeGeneration
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
Overrides:init$Children in class NumericLiteral
protected int numChildren()
Overrides:numChildren in class NumericLiteral
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class NumericLiteral
public void setLITERAL(java.lang.String value)
Replaces the lexeme LITERAL.
Overrides:setLITERAL in class NumericLiteral
Parameters:
value - The new value for the lexeme LITERAL.
public void setLITERAL(beaver.Symbol symbol)
JastAdd-internal setter for lexeme LITERAL using the Beaver parser.
Overrides:setLITERAL in class NumericLiteral
public java.lang.String getLITERAL()
Retrieves the value for the lexeme LITERAL.
Overrides:getLITERAL in class NumericLiteral
Returns:
The value for the lexeme LITERAL.
public void toString(java.lang.StringBuffer s)
Defer pretty printing to superclass.
Overrides:toString in class Literal
Source
Declared in Java7Frontend/Literals.jrag at line 105
Aspect
Literals
Overrides:rewriteTo in class NumericLiteral

Fields

protected boolean type_computed
protected boolean isZero_computed
protected boolean isZero_value
protected boolean constant_computed

Inherited Members

Attributes inherited from AST.NumericLiteral

Attributes inherited from AST.Literal

Attributes inherited from AST.Expr

Attributes inherited from AST.ASTNode

Methods inherited from class AST.NumericLiteral

Methods inherited from class AST.Literal

Methods inherited from class AST.Expr

Methods inherited from class AST.ASTNode

Methods inherited from class beaver.Symbol

getColumn
getEnd
getId
getLine
getStart
makePosition

Methods inherited from class java.lang.Object

equals
finalize
getClass
hashCode
notify
notifyAll
wait
wait
wait

Fields inherited from AST.NumericLiteral

Fields inherited from AST.Literal

Fields inherited from AST.Expr

Fields inherited from AST.ASTNode

Fields inherited from beaver.Symbol

end
id
start
value