diff --git a/src/be/jeffcheasey88/peeratcode/parser/Parser.java b/src/be/jeffcheasey88/peeratcode/parser/Parser.java index abf183c..c54dc39 100644 --- a/src/be/jeffcheasey88/peeratcode/parser/Parser.java +++ b/src/be/jeffcheasey88/peeratcode/parser/Parser.java @@ -28,7 +28,7 @@ public class Parser{ //tmp public void build(BufferedWriter writer) throws Exception{ - Token[] confirmed = new Token[TokenValidator.MAX_VALIDATE]; + Token[] confirmed = new Token[TokenValidator.MAX_VALIDATE+1]; System.arraycopy(tokenizer.getTokens().toArray(), 0, confirmed, 0, confirmed.length); int line = 1; int character = 1; diff --git a/src/be/jeffcheasey88/peeratcode/parser/java/JavaParser.java b/src/be/jeffcheasey88/peeratcode/parser/java/JavaParser.java index 140e836..25dda7c 100644 --- a/src/be/jeffcheasey88/peeratcode/parser/java/JavaParser.java +++ b/src/be/jeffcheasey88/peeratcode/parser/java/JavaParser.java @@ -182,25 +182,28 @@ public class JavaParser extends Parser { variable_q5.then(variable_q2); variable_q10.then(variable_q1); variable_q11.then(variable_q1); + + + StateTree function_q17 = new StateTree<>(); + StateTree function_q18 = function_q17.then(LAMBDA_42); + StateTree operation_q0 = new StateTree<>(); StateTree operation_q1 = operation_q0.then(LAMBDA_name); operation_q1.then(LAMBDA_8).then(new RedirectStateTree<>(value_q0,(bag) -> "op_value")).then(LAMBDA_1).end(END_OP); StateTree operation_q5 = operation_q1.then(LAMBDA_25); operation_q5.then(operation_q1); - operation_q0.then(LAMBDA_32).then(LAMBDA_23).then(new RedirectStateTree<>(value_q0,(bag) -> "op_value")).then(LAMBDA_24).end(END_OP); - operation_q0.then(LAMBDA_33).then(LAMBDA_23).then(new RedirectStateTree<>(value_q0,(bag) -> "op_value")).then(LAMBDA_24).end(END_OP); - operation_q0.then(LAMBDA_34).then(LAMBDA_23).then(new RedirectStateTree<>(value_q0,(bag) -> "op_value")).then(LAMBDA_24).end(END_OP); + operation_q0.then(LAMBDA_32).then(LAMBDA_23).then(new RedirectStateTree<>(value_q0,(bag) -> "op_value")).then(LAMBDA_24).end(END_OP).then(function_q18); + operation_q0.then(LAMBDA_33).then(LAMBDA_23).then(new RedirectStateTree<>(value_q0,(bag) -> "op_value")).then(LAMBDA_24).end(END_OP).then(function_q18); + operation_q0.then(LAMBDA_34).then(LAMBDA_23).then(new RedirectStateTree<>(value_q0,(bag) -> "op_value")).then(LAMBDA_24).end(END_OP).then(function_q18); operation_q0.then(LAMBDA_35).then(new RedirectStateTree<>(value_q0,(bag) -> "op_value(190)")).then(LAMBDA_1).end(END_OP); operation_q0.then(LAMBDA_36).then(new RedirectStateTree<>(value_q0,(bag) -> "op_value(191)")).end(END_OP); - operation_q0.then(LAMBDA_37).then(LAMBDA_23).then(new RedirectStateTree<>(value_q0,(bag) -> "op_value(192)")).then(LAMBDA_24).end(END_OP); + operation_q0.then(LAMBDA_37).then(LAMBDA_23).then(new RedirectStateTree<>(value_q0,(bag) -> "op_value(192)")).then(LAMBDA_24).end(END_OP).then(function_q18); operation_q0.then(LAMBDA_38).then(LAMBDA_1).end(END_OP); operation_q0.then(LAMBDA_39).then(new RedirectStateTree<>(value_q0,(bag) -> "op_value(194)")).then(LAMBDA_1).end(END_OP); operation_q0.then(LAMBDA_40).then(LAMBDA_1).end(END_OP); operation_q0.then(LAMBDA_41).end(END_OP); - StateTree function_q17 = new StateTree<>(); - StateTree function_q18 = function_q17.then(LAMBDA_42); StateTree function_q19 = function_q18.then(LAMBDA_43); function_q19.end((a,b) -> { System.out.println("\t\tolala"); return a;}); StateTree function_q21 = function_q18.then(new RedirectStateTree<>(variable_q0,(bag) -> "func_var")).loop(); diff --git a/src/be/jeffcheasey88/peeratcode/parser/state/StateTree.java b/src/be/jeffcheasey88/peeratcode/parser/state/StateTree.java index fc031f4..ca5bada 100644 --- a/src/be/jeffcheasey88/peeratcode/parser/state/StateTree.java +++ b/src/be/jeffcheasey88/peeratcode/parser/state/StateTree.java @@ -28,7 +28,7 @@ public class StateTree{ E build = internalSeed(validator, container); if(build == null) break; } - System.out.println("Validate "+validator.MAX_VALIDATE+" tokens !"); + System.out.println("Validate "+validator.MAX_VALIDATE+"/"+tokenizer.getTokens().size()+" tokens !"); } B internalSeed(TokenValidator validator, E element){