Boo.Lang.Parser.BooParserBase.attribute C# (CSharp) Method

attribute() protected method

protected attribute ( ) : Attribute
return Boo.Lang.Compiler.Ast.Attribute
        protected AstAttribute attribute()
        {
            AstAttribute attr;

            IToken  t = null;

                antlr.IToken id = null;
            attr = null;

            try {      // for error handling
            {
                switch ( LA(1) )
                {
                case THEN:
                case ID:
                {
                    id=identifier();
                    break;
                }
                case TRANSIENT:
                {
                    t = LT(1);
                    match(TRANSIENT);
                    if (0==inputState.guessing)
                    {
                        id=t;
                    }
                    break;
                }
                default:
                {
                    throw new NoViableAltException(LT(1), getFilename());
                }
                 }
            }
            if (0==inputState.guessing)
            {

                        attr = new AstAttribute(ToLexicalInfo(id), id.getText());

            }
            {
                switch ( LA(1) )
                {
                case LPAREN:
                {
                    match(LPAREN);
                    argument_list(attr);
                    match(RPAREN);
                    break;
                }
                case RBRACK:
                case COMMA:
                {
                    break;
                }
                default:
                {
                    throw new NoViableAltException(LT(1), getFilename());
                }
                 }
            }
            }
            catch (RecognitionException ex)
            {
            if (0 == inputState.guessing)
            {
                reportError(ex, "attribute");
                recover(ex,tokenSet_49_);
            }
            else
            {
                throw ex;
            }
            }
            return attr;
        }
BooParserBase