protected void interface_property_accessor(
Property p
)
{
IToken gt = null;
IToken st = null;
Method m = null;
try { // for error handling
attributes();
{
if (((LA(1)==GET))&&( null == p.Getter ))
{
{
gt = LT(1);
match(GET);
if (0==inputState.guessing)
{
m = p.Getter = new Method(ToLexicalInfo(gt)); m.Name = "get";
}
}
}
else if (((LA(1)==SET))&&( null == p.Setter )) {
{
st = LT(1);
match(SET);
if (0==inputState.guessing)
{
m = p.Setter = new Method(ToLexicalInfo(st)); m.Name = "set";
}
}
}
else
{
throw new NoViableAltException(LT(1), getFilename());
}
}
{
switch ( LA(1) )
{
case EOL:
case EOS:
{
eos();
break;
}
case COLON:
{
empty_block(m);
break;
}
default:
{
throw new NoViableAltException(LT(1), getFilename());
}
}
}
if (0==inputState.guessing)
{
AddAttributes(m.Attributes);
}
}
catch (RecognitionException ex)
{
if (0 == inputState.guessing)
{
reportError(ex, "interface_property_accessor");
recover(ex,tokenSet_61_);
}
else
{
throw ex;
}
}
}