Cleanup
This commit is contained in:
parent
73a093cf4d
commit
34e374729e
2 changed files with 0 additions and 21 deletions
|
@ -145,17 +145,6 @@ public class JavaParser extends Parser<JavaFile> {
|
|||
StateTree<JavaFile> main = new StateTree<>();
|
||||
StateTree<JavaElement> value_q0 = value(LAMBDA_5, LAMBDA_6, LAMBDA_7, LAMBDA_8, LAMBDA_10, LAMBDA_11, LAMBDA_12, LAMBDA_13, LAMBDA_14, LAMBDA_15, LAMBDA_16, LAMBDA_17, LAMBDA_18, LAMBDA_19, LAMBDA_20, LAMBDA_21, LAMBDA_23, LAMBDA_24, LAMBDA_25, LAMBDA_26, LAMBDA_27, LAMBDA_28, LAMBDA_29);
|
||||
|
||||
System.out.println("----");
|
||||
//(ab = (cd & 34))
|
||||
// tokenizer.getTokens().addAll(build("(","ab","=","(","cd","&","34",")",")"));
|
||||
// tokenizer.getTokens().addAll(build("(","ab","=","(","cd","&","(","ay","/","34",")",")",")"));
|
||||
// tokenizer.getTokens().addAll(build("(","ab","=","cd",")"));
|
||||
// tokenizer.getTokens().addAll(build("(","ab",")"));
|
||||
// tokenizer.getTokens().addAll(build("ab","=","cd","/","ef"));
|
||||
tokenizer.getTokens().addAll(build("main","=","=","null","?","\"","seks","\"",":","\"","noSeks","\""));
|
||||
value_q0.seed(tokenizer, null);
|
||||
System.out.println("----");
|
||||
|
||||
System.out.println((System.currentTimeMillis()-time)+"ms");
|
||||
|
||||
// try {
|
||||
|
@ -235,13 +224,11 @@ public class JavaParser extends Parser<JavaFile> {
|
|||
return result;
|
||||
};
|
||||
BiFunction<JavaElement, TokenValidator, JavaElement> END_VALUE = (element, validator) -> {
|
||||
//single value
|
||||
Value v = new Value(validator.getBag().get());
|
||||
validator.getBag().set(v);
|
||||
return v;
|
||||
};
|
||||
BiFunction<JavaElement, TokenValidator, JavaElement> END_BIVALUE = (element, validator) -> {
|
||||
//create new value from parent & created single value
|
||||
Value origin = (Value)element;
|
||||
Value right = validator.getBag().<Bag>get("?").get();
|
||||
if(right.get() != null) right = right.get();
|
||||
|
@ -260,9 +247,6 @@ public class JavaParser extends Parser<JavaFile> {
|
|||
return v;
|
||||
};
|
||||
BiFunction<JavaElement, TokenValidator, JavaElement> END_TRIVALUE = (element, validator) -> {
|
||||
//same but for val ? val : val
|
||||
System.out.println("\t"+element);
|
||||
System.out.println("\t"+validator.getBag());
|
||||
Bag bag = validator.getBag();
|
||||
Value origin = (Value)element;
|
||||
Value v = new TriValue(origin, bag.<Bag>get("true").get(), bag.<Bag>get("false").get());
|
||||
|
|
|
@ -12,11 +12,9 @@ public class Value extends JavaElement{
|
|||
|
||||
public Value(Token token){
|
||||
this.token = token;
|
||||
System.out.println(this);
|
||||
}
|
||||
|
||||
public void switchInto(Value value){
|
||||
System.out.println("\tswitch "+this+" onto "+value);
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
|
@ -41,7 +39,6 @@ public class Value extends JavaElement{
|
|||
this.right = right.get() == null ? right : right.get();
|
||||
|
||||
this.type = operation;
|
||||
System.out.println(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -61,8 +58,6 @@ public class Value extends JavaElement{
|
|||
this.condition = condition;
|
||||
this.success = success;
|
||||
this.fail = fail;
|
||||
|
||||
System.out.println(this);
|
||||
}
|
||||
|
||||
public void setCondition(Value value){
|
||||
|
|
Loading…
Add table
Reference in a new issue