FileDocCategorySizeDatePackage
RuleRefElement.javaAPI DocGlassfish v2 API1848Wed Aug 30 15:34:10 BST 2006persistence.antlr

RuleRefElement

public class RuleRefElement extends AlternativeElement

Fields Summary
protected String
targetRule
protected String
args
protected String
idAssign
protected String
label
Constructors Summary
public RuleRefElement(Grammar g, Token t, int autoGenType_)



           
        super(g, t, autoGenType_);
        targetRule = t.getText();
        //		if ( Character.isUpperCase(targetRule.charAt(0)) ) { // lexer rule?
        if (t.type == ANTLRTokenTypes.TOKEN_REF) { // lexer rule?
            targetRule = CodeGenerator.encodeLexerRuleName(targetRule);
        }
    
Methods Summary
public voidgenerate()

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

        return args;
    
public java.lang.StringgetIdAssign()

        return idAssign;
    
public java.lang.StringgetLabel()

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

        return grammar.theLLkAnalyzer.look(k, this);
    
public voidsetArgs(java.lang.String a)

        args = a;
    
public voidsetIdAssign(java.lang.String id)

        idAssign = id;
    
public voidsetLabel(java.lang.String label_)

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

        if (args != null)
            return " " + targetRule + args;
        else
            return " " + targetRule;