Skip to content

Commit

Permalink
Moving classes to more appropriate package
Browse files Browse the repository at this point in the history
  • Loading branch information
avishek-sen-gupta committed Jul 28, 2024
1 parent bd0bfdd commit 1f65dc4
Show file tree
Hide file tree
Showing 117 changed files with 215 additions and 205 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.smojol.common.flowchart;
package org.smojol.common.ast;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.smojol.common.flowchart;
package org.smojol.common.ast;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.smojol.common.flowchart;
package org.smojol.common.ast;

import lombok.Getter;
import lombok.Setter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.smojol.common.flowchart;
package org.smojol.common.ast;

import org.antlr.v4.runtime.tree.ParseTree;
import org.smojol.common.vm.interpreter.CobolInterpreter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.smojol.common.flowchart;
package org.smojol.common.ast;


public interface FlowNodeASTVisitor<T> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.smojol.common.flowchart;
package org.smojol.common.ast;

public interface FlowNodeCondition {
FlowNodeCondition ALWAYS_SHOW = new FlowNodeCondition() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.smojol.common.flowchart;
package org.smojol.common.ast;

import org.antlr.v4.runtime.tree.ParseTree;
import org.smojol.common.navigation.CobolEntityNavigator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.smojol.common.flowchart;
package org.smojol.common.ast;

public enum FlowNodeType {
ATOMIC,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.smojol.common.flowchart;
package org.smojol.common.ast;


import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.smojol.common.flowchart;
package org.smojol.common.ast;

import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.ParserRuleContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.smojol.common.flowchart;
package org.smojol.common.ast;

import lombok.Getter;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.smojol.common.flowchart;
package org.smojol.common.ast;


public class SerialisableFlowNodeASTVisitor implements FlowNodeASTVisitor<SerialisableASTFlowNode> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.smojol.common.flowchart;
package org.smojol.common.ast;

import org.antlr.v4.runtime.tree.ParseTree;
import org.eclipse.lsp.cobol.core.CobolParser;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.smojol.common.flowchart;
package org.smojol.common.ast;

import lombok.AllArgsConstructor;
import lombok.Data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.smojol.common.flowchart;

import org.smojol.common.ast.FlowNode;

public interface ChartOverlay {
FlowNode block(FlowNode node);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package org.smojol.common.flowchart;

import org.antlr.v4.runtime.tree.ParseTree;
import org.smojol.common.ast.FlowNode;
import org.smojol.common.ast.FlowNodeService;
import org.smojol.common.ast.VisitContext;

import java.io.IOException;
import java.util.function.Function;
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.antlr.v4.runtime.tree.ParseTree;
import org.eclipse.lsp.cobol.core.CobolLexer;
import org.eclipse.lsp.cobol.core.CobolParser;
import org.smojol.common.flowchart.NodeText;
import org.smojol.common.ast.NodeText;

/**
* This serves as a container for all IDMS-related code fragments which are then re-inserted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import org.antlr.v4.runtime.ParserRuleContext;
import org.antlr.v4.runtime.tree.ParseTree;
import org.eclipse.lsp.cobol.core.CobolParser;
import org.smojol.common.flowchart.NodeText;
import org.smojol.common.flowchart.SyntaxIdentity;
import org.smojol.common.ast.NodeText;
import org.smojol.common.ast.SyntaxIdentity;
import org.smojol.common.idms.IdmsContainerNode;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.smojol.common.vm.interpreter;

import org.eclipse.lsp.cobol.core.CobolParser;
import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.flowchart.FlowNodeService;
import org.smojol.common.ast.FlowNode;
import org.smojol.common.ast.FlowNodeService;

public class AlwaysBooleanResolver implements BooleanResolver {
public static BooleanResolver ALWAYS_TRUE = new AlwaysBooleanResolver(true);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.smojol.common.vm.interpreter;

import org.eclipse.lsp.cobol.core.CobolParser;
import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.flowchart.FlowNodeService;
import org.smojol.common.ast.FlowNode;
import org.smojol.common.ast.FlowNodeService;

public interface BooleanResolver {
boolean resolve(FlowNode node, CobolParser.ConditionContext condition, FlowNodeService nodeService);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.smojol.common.vm.interpreter;

import org.smojol.common.flowchart.FlowNodeCondition;
import org.smojol.common.ast.FlowNodeCondition;

public interface Breakpointer extends ExecutionInterceptor {
void addBreakpoint(FlowNodeCondition breakpoint);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.smojol.common.vm.interpreter;

import org.eclipse.lsp.cobol.core.CobolParser;
import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.flowchart.FlowNodeService;
import org.smojol.common.ast.FlowNode;
import org.smojol.common.ast.FlowNodeService;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.smojol.common.vm.interpreter;

import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.flowchart.FlowNodeCondition;
import org.smojol.common.flowchart.NodeText;
import org.smojol.common.ast.FlowNode;
import org.smojol.common.ast.FlowNodeCondition;
import org.smojol.common.ast.NodeText;
import org.smojol.common.vm.structure.CobolDataStructure;
import org.smojol.common.vm.stack.IStackFrame;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.smojol.common.vm.interpreter;

import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.flowchart.FlowNodeService;
import org.smojol.common.ast.FlowNode;
import org.smojol.common.ast.FlowNodeService;

public interface ConditionResolver {
boolean resolveIf(FlowNode node, FlowNodeService nodeService);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.smojol.common.vm.interpreter;

import org.eclipse.lsp.cobol.core.CobolParser;
import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.flowchart.FlowNodeService;
import org.smojol.common.ast.FlowNode;
import org.smojol.common.ast.FlowNodeService;
import org.smojol.common.flowchart.ConsoleColors;
import org.smojol.common.flowchart.NodeText;
import org.smojol.common.ast.NodeText;

import java.util.Scanner;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.smojol.common.vm.interpreter;

import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.ast.FlowNode;
import org.smojol.common.vm.stack.ExecutionContext;

import java.util.function.Supplier;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.smojol.common.vm.interpreter;

import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.ast.FlowNode;
import org.smojol.common.vm.stack.ExecutionContext;

import java.util.function.Supplier;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.smojol.common.vm.interpreter;

import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.flowchart.FlowNodeService;
import org.smojol.common.ast.FlowNode;
import org.smojol.common.ast.FlowNodeService;

public interface ExecutionListener {
void notify(String message, FlowNode node, FlowNodeService nodeService);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.smojol.common.vm.interpreter;

import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.flowchart.FlowNodeService;
import org.smojol.common.ast.FlowNode;
import org.smojol.common.ast.FlowNodeService;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.smojol.common.vm.interpreter;

import org.eclipse.lsp.cobol.core.CobolParser;
import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.flowchart.FlowNodeService;
import org.smojol.common.ast.FlowNode;
import org.smojol.common.ast.FlowNodeService;
import org.smojol.common.vm.expression.CobolExpression;
import org.smojol.common.vm.expression.ConditionVisitor;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.smojol.common.vm.stack;

import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.flowchart.FlowNodeService;
import org.smojol.common.ast.FlowNode;
import org.smojol.common.ast.FlowNodeService;

public record ExecutionContext(FlowNode node, StackFrames runtimeStackFrames, FlowNodeService nodeService) {
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.smojol.common.vm.stack;

import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.flowchart.FlowNodeCondition;
import org.smojol.common.ast.FlowNode;
import org.smojol.common.ast.FlowNodeCondition;
import org.smojol.common.vm.structure.CobolDataStructure;

public interface IStackFrame {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.smojol.common.vm.stack;

import lombok.Getter;
import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.flowchart.FlowNodeCondition;
import org.smojol.common.ast.FlowNode;
import org.smojol.common.ast.FlowNodeCondition;
import org.smojol.common.vm.structure.CobolDataStructure;

@Getter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.smojol.common.vm.stack;

import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.flowchart.FlowNodeCondition;
import org.smojol.common.ast.FlowNode;
import org.smojol.common.ast.FlowNodeCondition;
import org.smojol.common.vm.interpreter.CobolVmSignal;
import org.smojol.common.vm.structure.CobolDataStructure;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.smojol.common.vm.structure;

import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.ast.FlowNode;

import java.util.function.Function;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.smojol.common.vm.structure;

import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.ast.FlowNode;

public class NoOpCobolOperation implements CobolOperation {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.eclipse.lsp.cobol.core.CobolParser;
import org.smojol.ast.*;
import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.flowchart.FlowNodeType;
import org.smojol.common.ast.FlowNode;
import org.smojol.common.ast.FlowNodeType;
import org.smojol.common.vm.expression.ArithmeticExpressionVisitor;
import org.smojol.common.vm.expression.CobolExpression;
import org.smojol.common.vm.expression.ConditionVisitor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

import com.mojo.woof.GraphSDK;
import lombok.Getter;
import org.eclipse.lsp.cobol.core.CobolParser;
import org.smojol.common.flowchart.*;
import org.smojol.common.ast.*;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import org.smojol.analysis.graph.graphml.TypedDataStructureVertex;
import org.smojol.analysis.graph.graphml.TypedGraphEdge;
import org.smojol.analysis.graph.graphml.TypedGraphVertex;
import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.flowchart.NodeText;
import org.smojol.common.ast.FlowNode;
import org.smojol.common.ast.NodeText;
import org.smojol.common.id.IdProvider;
import org.smojol.common.id.UUIDProvider;
import org.smojol.common.vm.structure.CobolDataStructure;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.mojo.woof.NodeSpec;
import com.mojo.woof.WoofNode;
import org.neo4j.driver.Record;
import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.ast.FlowNode;
import org.smojol.common.vm.structure.CobolDataStructure;

public class NodeToWoof {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.jgrapht.Graph;
import org.smojol.analysis.graph.NodeSpecBuilder;
import org.smojol.analysis.graph.jgrapht.JGraphTCodeOperations;
import org.smojol.common.flowchart.*;
import org.smojol.common.ast.*;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import org.smojol.analysis.graph.NodeSpecBuilder;
import org.smojol.analysis.graph.jgrapht.JGraphTDataOperations;
import org.smojol.analysis.graph.jgrapht.JGraphTCodeOperations;
import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.ast.FlowNode;
import org.smojol.common.vm.structure.CobolDataStructure;
import org.smojol.interpreter.navigation.FlowNodeASTTraversal;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.smojol.analysis.graph.graphml;

import lombok.Getter;
import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.ast.FlowNode;

import java.util.Objects;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

import org.jgrapht.Graph;
import org.smojol.analysis.graph.NodeSpecBuilder;
import org.smojol.analysis.graph.graphml.TypedCodeVertex;
import org.smojol.analysis.graph.graphml.TypedGraphEdge;
import org.smojol.analysis.graph.graphml.TypedGraphVertex;
import org.smojol.common.flowchart.FlowNode;
import org.smojol.common.ast.FlowNode;

public class JGraphTCodeOperations {
private final Graph<TypedGraphVertex, TypedGraphEdge> graph;
Expand Down
Loading

0 comments on commit 1f65dc4

Please sign in to comment.