state._fsp--;
adaptor.addChild(root_0, st.getTree());
final Statement s = new Statement((st!=null?st.r:null));
retval.r = s;
// BELStatement.g:69:5: (rel= relationship ( ( OPEN_PAREN nst= outer_term nrel= relationship not= outer_term CLOSE_PAREN ) | ot= outer_term ) )?
int alt2=2;
int LA2_0 = input.LA(1);
if ( ((LA2_0>=76 && LA2_0<=103)) ) {
alt2=1;
}
switch (alt2) {
case 1 :
// BELStatement.g:70:9: rel= relationship ( ( OPEN_PAREN nst= outer_term nrel= relationship not= outer_term CLOSE_PAREN ) | ot= outer_term )
{
pushFollow(FOLLOW_relationship_in_statement101);
rel=relationship();
state._fsp--;
adaptor.addChild(root_0, rel.getTree());
s.setRelationshipType((rel!=null?rel.r:null));
// BELStatement.g:73:9: ( ( OPEN_PAREN nst= outer_term nrel= relationship not= outer_term CLOSE_PAREN ) | ot= outer_term )
int alt1=2;
int LA1_0 = input.LA(1);
if ( (LA1_0==OPEN_PAREN) ) {
alt1=1;
}
else if ( ((LA1_0>=17 && LA1_0<=75)) ) {
alt1=2;
}
else {
NoViableAltException nvae =
new NoViableAltException("", 1, 0, input);
throw nvae;
}
switch (alt1) {
case 1 :
// BELStatement.g:74:13: ( OPEN_PAREN nst= outer_term nrel= relationship not= outer_term CLOSE_PAREN )
{
// BELStatement.g:74:13: ( OPEN_PAREN nst= outer_term nrel= relationship not= outer_term CLOSE_PAREN )
// BELStatement.g:75:17: OPEN_PAREN nst= outer_term nrel= relationship not= outer_term CLOSE_PAREN
{
OPEN_PAREN1=(Token)match(input,OPEN_PAREN,FOLLOW_OPEN_PAREN_in_statement145);
OPEN_PAREN1_tree = (Object)adaptor.create(OPEN_PAREN1);
adaptor.addChild(root_0, OPEN_PAREN1_tree);
pushFollow(FOLLOW_outer_term_in_statement166);
nst=outer_term();
state._fsp--;
adaptor.addChild(root_0, nst.getTree());
final Statement ns = new Statement((nst!=null?nst.r:null));
pushFollow(FOLLOW_relationship_in_statement188);
nrel=relationship();
state._fsp--;
adaptor.addChild(root_0, nrel.getTree());
ns.setRelationshipType((nrel!=null?nrel.r:null));
pushFollow(FOLLOW_outer_term_in_statement211);
not=outer_term();
state._fsp--;
adaptor.addChild(root_0, not.getTree());
ns.setObject(new Statement.Object((not!=null?not.r:null)));
s.setObject(new Statement.Object(ns));
retval.r = s;
CLOSE_PAREN2=(Token)match(input,CLOSE_PAREN,FOLLOW_CLOSE_PAREN_in_statement231);
CLOSE_PAREN2_tree = (Object)adaptor.create(CLOSE_PAREN2);