// $ANTLR start "json" // AnnotationParser.g:117:1: json : JSON_START ( json_arguments )? JSON_END ; public final AnnotationParser.json_return json() throws RecognitionException { AnnotationParser.json_return retval = new AnnotationParser.json_return(); retval.start = input.LT(1); AnnotationCommonTree root_0 = null; CommonToken JSON_START18 = null; CommonToken JSON_END20 = null; AnnotationParser.json_arguments_return json_arguments19 = null; AnnotationCommonTree JSON_START18_tree = null; AnnotationCommonTree JSON_END20_tree = null; try { // AnnotationParser.g:118:3: ( JSON_START ( json_arguments )? JSON_END ) // AnnotationParser.g:118:5: JSON_START ( json_arguments )? JSON_END { root_0 = (AnnotationCommonTree) adaptor.nil(); JSON_START18 = (CommonToken) match(input, JSON_START, FOLLOW_JSON_START_in_json342); JSON_START18_tree = (AnnotationCommonTree) adaptor.create(JSON_START18); adaptor.addChild(root_0, JSON_START18_tree); // AnnotationParser.g:118:16: ( json_arguments )? int alt6 = 2; int LA6_0 = input.LA(1); if ((LA6_0 == STRING_LITERAL)) { alt6 = 1; } switch (alt6) { case 1: // AnnotationParser.g:118:16: json_arguments { pushFollow(FOLLOW_json_arguments_in_json344); json_arguments19 = json_arguments(); state._fsp--; adaptor.addChild(root_0, json_arguments19.getTree()); } break; } JSON_END20 = (CommonToken) match(input, JSON_END, FOLLOW_JSON_END_in_json347); JSON_END20_tree = (AnnotationCommonTree) adaptor.create(JSON_END20); adaptor.addChild(root_0, JSON_END20_tree); } retval.stop = input.LT(-1); retval.tree = (AnnotationCommonTree) adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input, re); retval.tree = (AnnotationCommonTree) adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { } return retval; }