Skip to content

Commit

Permalink
- added handling of strictfp to Jimple parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennifer Lhoták committed Sep 26, 2005
1 parent 27911ab commit 4ecf028
Show file tree
Hide file tree
Showing 13 changed files with 1,364 additions and 1,159 deletions.
2 changes: 2 additions & 0 deletions generated/sablecc/soot/jimple/parser/analysis/Analysis.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public interface Analysis extends Switch
void caseASynchronizedModifier(ASynchronizedModifier node);
void caseATransientModifier(ATransientModifier node);
void caseAVolatileModifier(AVolatileModifier node);
void caseAStrictfpModifier(AStrictfpModifier node);
void caseAEnumModifier(AEnumModifier node);
void caseAAnnotationModifier(AAnnotationModifier node);
void caseAClassFileType(AClassFileType node);
Expand Down Expand Up @@ -175,6 +176,7 @@ public interface Analysis extends Switch
void caseTSynchronized(TSynchronized node);
void caseTTransient(TTransient node);
void caseTVolatile(TVolatile node);
void caseTStrictfp(TStrictfp node);
void caseTEnum(TEnum node);
void caseTAnnotation(TAnnotation node);
void caseTClass(TClass node);
Expand Down
10 changes: 10 additions & 0 deletions generated/sablecc/soot/jimple/parser/analysis/AnalysisAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ public void caseAVolatileModifier(AVolatileModifier node)
defaultCase(node);
}

public void caseAStrictfpModifier(AStrictfpModifier node)
{
defaultCase(node);
}

public void caseAEnumModifier(AEnumModifier node)
{
defaultCase(node);
Expand Down Expand Up @@ -878,6 +883,11 @@ public void caseTVolatile(TVolatile node)
defaultCase(node);
}

public void caseTStrictfp(TStrictfp node)
{
defaultCase(node);
}

public void caseTEnum(TEnum node)
{
defaultCase(node);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,26 @@ public void caseAVolatileModifier(AVolatileModifier node)
outAVolatileModifier(node);
}

public void inAStrictfpModifier(AStrictfpModifier node)
{
defaultIn(node);
}

public void outAStrictfpModifier(AStrictfpModifier node)
{
defaultOut(node);
}

public void caseAStrictfpModifier(AStrictfpModifier node)
{
inAStrictfpModifier(node);
if(node.getStrictfp() != null)
{
node.getStrictfp().apply(this);
}
outAStrictfpModifier(node);
}

public void inAEnumModifier(AEnumModifier node)
{
defaultIn(node);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,26 @@ public void caseAVolatileModifier(AVolatileModifier node)
outAVolatileModifier(node);
}

public void inAStrictfpModifier(AStrictfpModifier node)
{
defaultIn(node);
}

public void outAStrictfpModifier(AStrictfpModifier node)
{
defaultOut(node);
}

public void caseAStrictfpModifier(AStrictfpModifier node)
{
inAStrictfpModifier(node);
if(node.getStrictfp() != null)
{
node.getStrictfp().apply(this);
}
outAStrictfpModifier(node);
}

public void inAEnumModifier(AEnumModifier node)
{
defaultIn(node);
Expand Down
1,013 changes: 515 additions & 498 deletions generated/sablecc/soot/jimple/parser/lexer/Lexer.java

Large diffs are not rendered by default.

Binary file modified generated/sablecc/soot/jimple/parser/lexer/lexer.dat
Binary file not shown.
83 changes: 83 additions & 0 deletions generated/sablecc/soot/jimple/parser/node/AStrictfpModifier.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/* This file was generated by SableCC (http://www.sablecc.org/). */

package soot.jimple.parser.node;

import java.util.*;
import soot.jimple.parser.analysis.*;

public final class AStrictfpModifier extends PModifier
{
private TStrictfp _strictfp_;

public AStrictfpModifier()
{
}

public AStrictfpModifier(
TStrictfp _strictfp_)
{
setStrictfp(_strictfp_);

}
public Object clone()
{
return new AStrictfpModifier(
(TStrictfp) cloneNode(_strictfp_));
}

public void apply(Switch sw)
{
((Analysis) sw).caseAStrictfpModifier(this);
}

public TStrictfp getStrictfp()
{
return _strictfp_;
}

public void setStrictfp(TStrictfp node)
{
if(_strictfp_ != null)
{
_strictfp_.parent(null);
}

if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}

node.parent(this);
}

_strictfp_ = node;
}

public String toString()
{
return ""
+ toString(_strictfp_);
}

void removeChild(Node child)
{
if(_strictfp_ == child)
{
_strictfp_ = null;
return;
}

}

void replaceChild(Node oldChild, Node newChild)
{
if(_strictfp_ == oldChild)
{
setStrictfp((TStrictfp) newChild);
return;
}

}
}
35 changes: 35 additions & 0 deletions generated/sablecc/soot/jimple/parser/node/TStrictfp.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* This file was generated by SableCC (http://www.sablecc.org/). */

package soot.jimple.parser.node;

import soot.jimple.parser.analysis.*;

public final class TStrictfp extends Token
{
public TStrictfp()
{
super.setText("strictfp");
}

public TStrictfp(int line, int pos)
{
super.setText("strictfp");
setLine(line);
setPos(pos);
}

public Object clone()
{
return new TStrictfp(getLine(), getPos());
}

public void apply(Switch sw)
{
((Analysis) sw).caseTStrictfp(this);
}

public void setText(String text)
{
throw new RuntimeException("Cannot change TStrictfp text.");
}
}
Loading

0 comments on commit 4ecf028

Please sign in to comment.