@Override public CodeBlockForAlt alternative(Alternative alt, boolean outerMost) { if ( outerMost ) return new CodeBlockForOuterMostAlt(this, alt); return new CodeBlockForAlt(this); }
public SrcOp addCodeForLoopLookaheadTempVar(IntervalSet look) { TestSetInline expr = addCodeForLookaheadTempVar(look); if (expr != null) { CaptureNextTokenType nextType = new CaptureNextTokenType(factory, expr.varName); addIterationOp(nextType); } return expr; } }
@Override public RuleFunction rule(Rule r) { if ( r instanceof LeftRecursiveRule ) { return new LeftRecursiveRuleFunction(this, (LeftRecursiveRule)r); } else { RuleFunction rf = new RuleFunction(this, r); return rf; } }
public TestSetInline(OutputModelFactory factory, GrammarAST ast, IntervalSet set, int wordSize) { super(factory, ast); bitsetWordSize = wordSize; Bitset[] withZeroOffset = createBitsets(factory, set, wordSize, true); Bitset[] withoutZeroOffset = createBitsets(factory, set, wordSize, false); this.bitsets = withZeroOffset.length <= withoutZeroOffset.length ? withZeroOffset : withoutZeroOffset; this.varName = "_la"; }
/** Return label alt or return name of rule */ public String getContextName() { CodeBlockForOuterMostAlt alt = getOuterMostAltCodeBlock(); if ( alt!=null && alt.altLabel!=null ) return alt.altLabel; return enclosingRuleRunction.name; } }
public ThrowNoViableAlt getThrowNoViableAlt(OutputModelFactory factory, GrammarAST blkAST, IntervalSet expecting) { return new ThrowNoViableAlt(factory, blkAST, expecting); } }
public SrcOp addCodeForLoopLookaheadTempVar(IntervalSet look) { TestSetInline expr = addCodeForLookaheadTempVar(look); if (expr != null) { CaptureNextTokenType nextType = new CaptureNextTokenType(factory, expr.varName); addIterationOp(nextType); } return expr; } }
@Override public CodeBlockForAlt alternative(Alternative alt, boolean outerMost) { if ( outerMost ) return new CodeBlockForOuterMostAlt(this, alt); return new CodeBlockForAlt(this); }
@Override public RuleFunction rule(Rule r) { if ( r instanceof LeftRecursiveRule ) { return new LeftRecursiveRuleFunction(this, (LeftRecursiveRule)r); } else { RuleFunction rf = new RuleFunction(this, r); return rf; } }
public TestSetInline(OutputModelFactory factory, GrammarAST ast, IntervalSet set, int wordSize) { super(factory, ast); bitsetWordSize = wordSize; Bitset[] withZeroOffset = createBitsets(factory, set, wordSize, true); Bitset[] withoutZeroOffset = createBitsets(factory, set, wordSize, false); this.bitsets = withZeroOffset.length <= withoutZeroOffset.length ? withZeroOffset : withoutZeroOffset; this.varName = "_la"; }
/** Return label alt or return name of rule */ public String getContextName() { CodeBlockForOuterMostAlt alt = getOuterMostAltCodeBlock(); if ( alt!=null && alt.altLabel!=null ) return alt.altLabel; return enclosingRuleRunction.name; } }
public SrcOp addCodeForLoopLookaheadTempVar(IntervalSet look) { TestSetInline expr = addCodeForLookaheadTempVar(look); if (expr != null) { CaptureNextTokenType nextType = new CaptureNextTokenType(factory, expr.varName); addIterationOp(nextType); } return expr; } }
@Override public CodeBlockForAlt alternative(Alternative alt, boolean outerMost) { if ( outerMost ) return new CodeBlockForOuterMostAlt(this, alt); return new CodeBlockForAlt(this); }
@Override public RuleFunction rule(Rule r) { if ( r instanceof LeftRecursiveRule ) { return new LeftRecursiveRuleFunction(this, (LeftRecursiveRule)r); } else { RuleFunction rf = new RuleFunction(this, r); return rf; } }
public SrcOp addCodeForLoopLookaheadTempVar(IntervalSet look) { TestSetInline expr = addCodeForLookaheadTempVar(look); if (expr != null) { CaptureNextTokenType nextType = new CaptureNextTokenType(factory, expr.varName); addIterationOp(nextType); } return expr; } }
@Override public CodeBlockForAlt alternative(Alternative alt, boolean outerMost) { if ( outerMost ) return new CodeBlockForOuterMostAlt(this, alt); return new CodeBlockForAlt(this); }
@Override public RuleFunction rule(Rule r) { if ( r instanceof LeftRecursiveRule ) { return new LeftRecursiveRuleFunction(this, (LeftRecursiveRule)r); } else { RuleFunction rf = new RuleFunction(this, r); return rf; } }
public SrcOp addCodeForLoopLookaheadTempVar(IntervalSet look) { TestSetInline expr = addCodeForLookaheadTempVar(look); if (expr != null) { CaptureNextTokenType nextType = new CaptureNextTokenType(factory, expr.varName); addIterationOp(nextType); } return expr; } }
@Override public CodeBlockForAlt alternative(Alternative alt, boolean outerMost) { if ( outerMost ) return new CodeBlockForOuterMostAlt(this, alt); return new CodeBlockForAlt(this); }