RENode.Alternative alternative = disjunction.getAlternative(); if (alternative != null) { alternative.accept(this); RENode.Alternative alternative1 = new RENode.Alternative(group); alternative.replaceBy(alternative1); disjunction1.setAlternative(alternative); if (depth == 0) { disjunction.setAlternative( new RENode.Alternative( new RENode.Group( new RENode.Disjunction(), GroupType.CAPTURING_GROUP))); disjunction.setNext( new RENode.Disjunction( new RENode.Alternative( new RENode.Group( new RENode.Disjunction(), GroupType.CAPTURING_GROUP))));
RENode.Alternative alternative = disjunction.getAlternative(); if (alternative != null) { alternative.accept(this); RENode.Alternative alternative1 = new RENode.Alternative(group); alternative.replaceBy(alternative1); disjunction1.setAlternative(alternative); if (depth == 0) { disjunction.setAlternative( new RENode.Alternative( new RENode.Group( new RENode.Disjunction(), GroupType.CAPTURING_GROUP))); disjunction.setNext( new RENode.Disjunction( new RENode.Alternative( new RENode.Group( new RENode.Disjunction(), GroupType.CAPTURING_GROUP))));
RENode.Disjunction next = disjunction.getNext(); disjunction.clearNext(); RENode.Alternative group = new RENode.Alternative( new RENode.Group( new RENode.Disjunction(alternative, next), GroupType.CAPTURING_GROUP)); RENode.Alternative group = new RENode.Alternative( new RENode.Group( new RENode.Disjunction(alternative), GroupType.CAPTURING_GROUP)); RENode.Disjunction next = disjunction.getNext(); disjunction.clearNext(); RENode.Alternative group = new RENode.Alternative( new RENode.Group( new RENode.Disjunction(next), GroupType.CAPTURING_GROUP)); RENode.Alternative group = new RENode.Alternative( new RENode.Group( new RENode.Disjunction(), GroupType.CAPTURING_GROUP));
RENode.Disjunction next = disjunction.getNext(); disjunction.clearNext(); RENode.Alternative group = new RENode.Alternative( new RENode.Group( new RENode.Disjunction(alternative, next), GroupType.CAPTURING_GROUP)); RENode.Alternative group = new RENode.Alternative( new RENode.Group( new RENode.Disjunction(alternative), GroupType.CAPTURING_GROUP)); RENode.Disjunction next = disjunction.getNext(); disjunction.clearNext(); RENode.Alternative group = new RENode.Alternative( new RENode.Group( new RENode.Disjunction(next), GroupType.CAPTURING_GROUP)); RENode.Alternative group = new RENode.Alternative( new RENode.Group( new RENode.Disjunction(), GroupType.CAPTURING_GROUP));
@Override protected void visit(RENode.Disjunction disjunction) throws RuntimeException { if (current != null) { RENode.Alternative alternative = disjunction.getAlternative(); if (alternative != null) { alternative.accept(this); } } else { RENode.Alternative alternative = disjunction.getAlternative(); if (alternative != null) { current = new Alternative(); alternative.accept(this); current.suffix = current.buffer.toString(); current.buffer.setLength(0); alternatives.add(current); current = null; } // RENode.Disjunction next = disjunction.getNext(); if (next != null) { next.accept(this); } } }
@Override protected void visit(RENode.Disjunction disjunction) throws RuntimeException { if (current != null) { RENode.Alternative alternative = disjunction.getAlternative(); if (alternative != null) { alternative.accept(this); } } else { RENode.Alternative alternative = disjunction.getAlternative(); if (alternative != null) { current = new Alternative(); alternative.accept(this); current.suffix = current.buffer.toString(); current.buffer.setLength(0); alternatives.add(current); current = null; } // RENode.Disjunction next = disjunction.getNext(); if (next != null) { next.accept(this); } } }
protected void visit(RENode.Disjunction disjunction) throws IOException, NullPointerException { RENode.Alternative alternative = disjunction.getAlternative(); if (alternative != null) { alternative.accept(this); } if (disjunction.hasAlternative() && disjunction.hasNext()) { appendable.append('|'); } RENode.Disjunction next = disjunction.getNext(); if (next != null) { next.accept(this); } }
protected void visit(RENode.Disjunction disjunction) throws IOException, NullPointerException { RENode.Alternative alternative = disjunction.getAlternative(); if (alternative != null) { alternative.accept(this); } if (disjunction.hasAlternative() && disjunction.hasNext()) { appendable.append('|'); } RENode.Disjunction next = disjunction.getNext(); if (next != null) { next.accept(this); } }
public RENode.Alternative parseAlternative() throws SyntaxException { RENode.Expr expr = parseExpression(); if (expr != null) { RENode.Alternative next = parseAlternative(); return new RENode.Alternative(expr, next); } else { return null; } }
public RENode.Alternative parseAlternative() throws SyntaxException { RENode.Expr expr = parseExpression(); if (expr != null) { RENode.Alternative next = parseAlternative(); return new RENode.Alternative(expr, next); } else { return null; } }