FileDocCategorySizeDatePackage
BlockContext.javaAPI DocGlassfish v2 API915Wed Aug 30 15:34:04 BST 2006persistence.antlr

BlockContext

public class BlockContext extends Object
BlockContext stores the information needed when creating an alternative (list of elements). Entering a subrule requires that we save this state as each block of alternatives requires state such as "tail of current alternative."

Fields Summary
AlternativeBlock
block
int
altNum
BlockEndElement
blockEnd
Constructors Summary
Methods Summary
public voidaddAlternativeElement(persistence.antlr.AlternativeElement e)

        currentAlt().addElement(e);
    
public persistence.antlr.AlternativecurrentAlt()

        return (Alternative)block.alternatives.elementAt(altNum);
    
public persistence.antlr.AlternativeElementcurrentElement()

        return currentAlt().tail;