// $ANTLR start "quad"
// /home/andreas/workspace/ANTLRTester/antlr-files/NQuad.g:99:1: quad returns [Quad value] : subject predicate object ( graph )? DOT ;
public final Quad quad() throws RecognitionException {
Quad value = null;
Node graph3 = null;
Vector<String> subject4 = null;
Node predicate5 = null;
Vector<String> object6 = null;
try {
// /home/andreas/workspace/ANTLRTester/antlr-files/NQuad.g:100:3: ( subject predicate object ( graph )? DOT )
// /home/andreas/workspace/ANTLRTester/antlr-files/NQuad.g:100:5: subject predicate object ( graph )? DOT
{
String quadGraph = graph;
pushFollow(FOLLOW_subject_in_quad145);
subject4=subject();
state._fsp--;
pushFollow(FOLLOW_predicate_in_quad147);
predicate5=predicate();
state._fsp--;
pushFollow(FOLLOW_object_in_quad149);
object6=object();
state._fsp--;
// /home/andreas/workspace/ANTLRTester/antlr-files/NQuad.g:101:30: ( graph )?
int alt3=2;
int LA3_0 = input.LA(1);
if ( (LA3_0==URI) ) {
alt3=1;
}
switch (alt3) {
case 1 :
// /home/andreas/workspace/ANTLRTester/antlr-files/NQuad.g:101:31: graph
{
pushFollow(FOLLOW_graph_in_quad152);
graph3=graph();
state._fsp--;
quadGraph = graph3.value();
}
break;
}
match(input,DOT,FOLLOW_DOT_in_quad158);
value = new Quad(createNode(subject4, quadGraph), predicate5.value(), createNode(object6, quadGraph), quadGraph);
}
}