public void enterConstant(@NotNull ArabicPrologParser.ConstantContext ctx) { if (ctx.getParent() instanceof ArabicPrologParser.OperandContext) code += ""; else { if(Parser.constants.Exist(ctx.getText())) code+="constants.getConstant(\""+ctx.getText()+"\"),"; else code+="new Constant(\""+ctx.getText()+"\"),"; } }
public void enterNode_id(@NotNull DOTParser.Node_idContext ctx) { String nodeId = ctx.id().getText(); GraphNode node = mNodeMap.get(nodeId); if (node == null) { node = new GraphNode(nodeId); mNodeMap.put(nodeId, node); } node.setAttributes(nodeAttrs); }
public void exitEdge_stmt(@NotNull DOTParser.Edge_stmtContext ctx) { addEdges(edgeCtx.src.graph, edgeCtx.dest.graph, edgeCtx.attrs); // leave nested ctx, pop previous parent ctx edgeCtx = edgeCtx.parent; graphCtx = graphCtx.parent; }
public void enterEdgeop(@NotNull DOTParser.EdgeopContext ctx) { addEdges(edgeCtx.src.graph, edgeCtx.dest.graph, edgeCtx.attrs); if (edgeCtx.srcFlag) { // pointing to src, shift to populate dest graphCtx = edgeCtx.dest; edgeCtx.srcFlag = false; } else { // pointing to dest already, shift src/dest for next edgeop edgeCtx.src = edgeCtx.dest; edgeCtx.dest = new GraphCtx(graphCtx.parent); graphCtx = edgeCtx.dest; } }
public void syntaxError(@NotNull Recognizer<?, ?> recognizer, @Nullable Object offendingSymbol, int line, int charPositionInLine, @NotNull String msg, @Nullable RecognitionException e) { mErrMsg = "at line " + line + ":" + charPositionInLine + " " + msg; throw e; }
@Override public void reportAmbiguity(@NotNull Parser recognizer, @NotNull DFA dfa, int startIndex, int stopIndex, boolean exact, @Nullable BitSet ambigAlts, @NotNull ATNConfigSet configs) { }
@Override public void reportAttemptingFullContext(@NotNull Parser recognizer, @NotNull DFA dfa, int startIndex, int stopIndex, @Nullable BitSet conflictingAlts, @NotNull ATNConfigSet configs) { }
@Override public void reportContextSensitivity(@NotNull Parser recognizer, @NotNull DFA dfa, int startIndex, int stopIndex, int prediction, @NotNull ATNConfigSet configs) { }
@CheckForNull public static AwsCredentials getCredentials(@NotNull String accessKey, @NotNull Secret secretKey) { if (StringUtils.isBlank(accessKey) || StringUtils.isBlank(secretKey.getPlainText())) { return null; } return CredentialsMatchers.firstOrNull( CredentialsProvider.lookupCredentials(AwsCredentials.class, (Item) null, ACL.SYSTEM, null, null), CredentialsMatchers.allOf( CredentialsMatchers.withProperty("accessKey", accessKey), CredentialsMatchers.withProperty("secretKey", secretKey) ) ); }
public void enterAnonymous(@NotNull ArabicPrologParser.AnonymousContext ctx) { code+="new Anonymous(),"; }
public void exitOr(@NotNull ArabicPrologParser.OrContext ctx) { code+="),"; }
public void enterRule(@NotNull ArabicPrologParser.RuleContext ctx) { isQuery = false; code+="new Rule ("; }
public void enterRuleSet(@NotNull ArabicPrologParser.RuleSetContext ctx) { code+="new RuleSet ("; }
public void exitRuleSet(@NotNull ArabicPrologParser.RuleSetContext ctx) { code+=")"; }
public void enterAnd(@NotNull ArabicPrologParser.AndContext ctx) { code+="new And ("; }
public void enterGraph(@NotNull DOTParser.GraphContext ctx) { if (ctx.id() != null) mGraphId = ctx.id().getText(); }
public void exitGraph(@NotNull DOTParser.GraphContext ctx) { // no-op }
public void enterNode_stmt(@NotNull DOTParser.Node_stmtContext ctx) { populateAttributes(ctx.attr_list(), nodeAttrs); }
public void exitNode_stmt(@NotNull DOTParser.Node_stmtContext ctx) { nodeAttrs.clear(); }
public void enterNode_id(@NotNull DOTParser.Node_idContext ctx) { String nodeId = ctx.id().getText(); graphCtx.addNode(nodeId); }
public void enterSubgraph(@NotNull DOTParser.SubgraphContext ctx) { // enter new nested subgraph ctx graphCtx = new GraphCtx(graphCtx); }
public void enterEdge_stmt(@NotNull DOTParser.Edge_stmtContext ctx) { // enter new nested edge ctx edgeCtx = new EdgeCtx(edgeCtx, new GraphCtx(graphCtx), new GraphCtx(graphCtx), ctx.attr_list()); graphCtx = edgeCtx.src; // point to src, next node/subgraph populates it }
public void exitEdgeop(@NotNull DOTParser.EdgeopContext ctx) { // no-op }
public void enterOr(@NotNull ArabicPrologParser.OrContext ctx) { code+="new Or ("; }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */ /*@Override*/ public void exitAttr_stmt(@NotNull DOTParser.Attr_stmtContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */ /*@Override*/ public void enterEdgeop(@NotNull DOTParser.EdgeopContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */ /*@Override*/ public void enterStmt_list(@NotNull DOTParser.Stmt_listContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */ /*@Override*/ public void exitStmt_list(@NotNull DOTParser.Stmt_listContext ctx) { }
/** * Enter a parse tree produced by {@link ArabicPrologParser#operand}. * @param ctx the parse tree */ void enterOperand(@NotNull ArabicPrologParser.OperandContext ctx);
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */ /*@Override*/ public void exitStmt(@NotNull DOTParser.StmtContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */ /*@Override*/ public void enterEdgeRHS(@NotNull DOTParser.EdgeRHSContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */ /*@Override*/ public void enterNode_id(@NotNull DOTParser.Node_idContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */ /*@Override*/ public void exitNode_id(@NotNull DOTParser.Node_idContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */ /*@Override*/ public void enterId(@NotNull DOTParser.IdContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */ /*@Override*/ public void exitId(@NotNull DOTParser.IdContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */ /*@Override*/ public void enterSubgraph(@NotNull DOTParser.SubgraphContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */ /*@Override*/ public void exitSubgraph(@NotNull DOTParser.SubgraphContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */ /*@Override*/ public void enterGraph(@NotNull DOTParser.GraphContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */ /*@Override*/ public void exitGraph(@NotNull DOTParser.GraphContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */ /*@Override*/ public void enterA_list(@NotNull DOTParser.A_listContext ctx) { }