public boolean isLocal() { return (externalName == null) || externalName.equals(getFilename()); }
@Override public String toString() { return id(); }
/** * Called by the tree parser for RUN PERSISTENT SET. Update the <handle> in "run <proc> persistent set <handle>.": * save a reference to the external procedure <proc> in <handle>. The AST structure for this form of the run is: * runstate : #( RUN filenameorvalue (#(PERSISTENT ( #(SET (field)? ) <A> )? ) where <A> is this action. Thus, we * expect a value in wipFieldNode with the name of the handle variable. This method gets the variable from the current * scope and stores a reference to it in the current call (being built), so that the Call.finalize method can update * its value. Partly implemented for Calls and Routines. * * @author pcd * @param fld is used for error reporting. */ @Override public void runPersistentSet(JPNode fld) { wipCalls.getFirst().setPersistentHandleNode((JPNode) fld); }
if (isInHandle()) { externalName = baseFilename(getFilename()); } else if (isPersistent()) {
@Override public void programTail() throws SemanticException { LOG.trace("Entering programTail"); // Now that we know what all the internal Routines are, wrap up the Calls. List<TreeParserSymbolScope> allScopes = new ArrayList<>(); allScopes.add(rootScope); allScopes.addAll(rootScope.getChildScopesDeep()); LinkedList<Call> calls = new LinkedList<>(); for (TreeParserSymbolScope scope : allScopes) { for (Call call : scope.getCallList()) { // Process IN HANDLE last to make sure PERSISTENT SET is processed first. if (call.isInHandle()) { calls.addLast(call); } else { calls.addFirst(call); } } } for (Call call : calls) { String routineId = call.getRunArgument(); call.wrapUp(rootScope.hasRoutine(routineId)); } }
/** * Called by the tree parser at the beginning of a RUN statement. * * @author pcd */ @Override public void runBegin(JPNode runNode) { LOG.trace("Entering runBegin {}", runNode); // Expect a FileName at the top of semantic stack String fileName = (String) wipExpression.getValue(); Call call = new Call(runNode); call.setRunArgument(fileName); runNode.setCall(call); wipCalls.addFirst(call); }
@Override public void callBegin(JPNode callNode) { LOG.trace("Entering callBegin {}", callNode); Call call = new Call(callNode); callNode.setCall(call); wipCalls.addFirst(call); }
@Override public void paramForCall(JPNode directionAST) { LOG.trace("Entering paramForCall {}", directionAST); Parameter param = new Parameter(); param.setDirectionNode((JPNode) directionAST); wipParameters.addFirst(param); wipCalls.getFirst().addParameter(param); }
if (isInHandle()) { externalName = baseFilename(getFilename()); } else if (isPersistent()) {
@Override public void programTail() throws SemanticException { LOG.trace("Entering programTail"); // Now that we know what all the internal Routines are, wrap up the Calls. List<TreeParserSymbolScope> allScopes = new ArrayList<>(); allScopes.add(rootScope); allScopes.addAll(rootScope.getChildScopesDeep()); LinkedList<Call> calls = new LinkedList<>(); for (TreeParserSymbolScope scope : allScopes) { for (Call call : scope.getCallList()) { // Process IN HANDLE last to make sure PERSISTENT SET is processed first. if (call.isInHandle()) { calls.addLast(call); } else { calls.addFirst(call); } } } for (Call call : calls) { String routineId = call.getRunArgument(); call.wrapUp(rootScope.hasRoutine(routineId)); } }
/** * Called by the tree parser at the beginning of a RUN statement. * * @author pcd */ @Override public void runBegin(JPNode runNode) { LOG.trace("Entering runBegin {}", runNode); // Expect a FileName at the top of semantic stack String fileName = (String) wipExpression.getValue(); Call call = new Call(runNode); call.setRunArgument(fileName); runNode.setCall(call); wipCalls.addFirst(call); }
@Override public void callBegin(JPNode callNode) { LOG.trace("Entering callBegin {}", callNode); Call call = new Call(callNode); callNode.setCall(call); wipCalls.addFirst(call); }
@Override public void paramForCall(JPNode directionAST) { LOG.trace("Entering paramForCall {}", directionAST); Parameter param = new Parameter(); param.setDirectionNode((JPNode) directionAST); wipParameters.addFirst(param); wipCalls.getFirst().addParameter(param); }
@Override public void callMethodBegin(JPNode callNode) { LOG.trace("Entering callMethodBegin {}", callNode); Call call = new Call(callNode); callNode.setCall(call); wipCalls.addFirst(call); }
@Override public String toString() { return id(); }
public boolean isLocal() { return (externalName == null) || externalName.equals(getFilename()); }
/** * Called by the tree parser for RUN PERSISTENT SET. Update the <handle> in "run <proc> persistent set <handle>.": * save a reference to the external procedure <proc> in <handle>. The AST structure for this form of the run is: * runstate : #( RUN filenameorvalue (#(PERSISTENT ( #(SET (field)? ) <A> )? ) where <A> is this action. Thus, we * expect a value in wipFieldNode with the name of the handle variable. This method gets the variable from the current * scope and stores a reference to it in the current call (being built), so that the Call.finalize method can update * its value. Partly implemented for Calls and Routines. * * @author pcd * @param fld is used for error reporting. */ @Override public void runPersistentSet(JPNode fld) { wipCalls.getFirst().setPersistentHandleNode((JPNode) fld); }
@Override public void callConstructorBegin(JPNode callNode) { LOG.trace("Entering callConstructorBegin {}", callNode); Call call = new Call(callNode); callNode.setCall(call); wipCalls.addFirst(call); }
@Override public int hashCode() { return id().hashCode(); }
@Override public void callMethodBegin(JPNode callNode) { LOG.trace("Entering callMethodBegin {}", callNode); Call call = new Call(callNode); callNode.setCall(call); wipCalls.addFirst(call); }