FileDocCategorySizeDatePackage
TokenRangeElement.javaAPI DocGlassfish v2 API1301Wed Aug 30 15:34:10 BST 2006persistence.antlr

TokenRangeElement

public class TokenRangeElement extends AlternativeElement

Fields Summary
String
label
protected int
begin
protected int
end
protected String
beginText
protected String
endText
Constructors Summary
public TokenRangeElement(Grammar g, Token t1, Token t2, int autoGenType)


             
        super(g, t1, autoGenType);
        begin = grammar.tokenManager.getTokenSymbol(t1.getText()).getTokenType();
        beginText = t1.getText();
        end = grammar.tokenManager.getTokenSymbol(t2.getText()).getTokenType();
        endText = t2.getText();
        line = t1.getLine();
    
Methods Summary
public voidgenerate()

        grammar.generator.gen(this);
    
public java.lang.StringgetLabel()

        return label;
    
public persistence.antlr.Lookaheadlook(int k)

        return grammar.theLLkAnalyzer.look(k, this);
    
public voidsetLabel(java.lang.String label_)

        label = label_;
    
public java.lang.StringtoString()

        if (label != null) {
            return " " + label + ":" + beginText + ".." + endText;
        }
        else {
            return " " + beginText + ".." + endText;
        }