1 /* 2 * Copyright (C) 2011 Google Inc. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.google.doclava.parser; 18 19 import org.antlr.runtime.BaseRecognizer; 20 import org.antlr.runtime.BitSet; 21 import org.antlr.runtime.DFA; 22 import org.antlr.runtime.EarlyExitException; 23 import org.antlr.runtime.IntStream; 24 import org.antlr.runtime.MismatchedSetException; 25 import org.antlr.runtime.NoViableAltException; 26 import org.antlr.runtime.RecognitionException; 27 import org.antlr.runtime.RecognizerSharedState; 28 import org.antlr.runtime.TokenStream; 29 import org.antlr.runtime.debug.DebugEventListener; 30 import org.antlr.runtime.debug.DebugEventSocketProxy; 31 import org.antlr.runtime.debug.DebugParser; 32 33 import java.io.IOException; 34 import java.util.HashMap; 35 /** A Java 1.5 grammar for ANTLR v3 derived from the spec 36 * 37 * This is a very close representation of the spec; the changes 38 * are comestic (remove left recursion) and also fixes (the spec 39 * isn't exactly perfect). I have run this on the 1.4.2 source 40 * and some nasty looking enums from 1.5, but have not really 41 * tested for 1.5 compatibility. 42 * 43 * I built this with: java -Xmx100M org.antlr.Tool java.g 44 * and got two errors that are ok (for now): 45 * java.g:691:9: Decision can match input such as 46 * "'0'..'9'{'E', 'e'}{'+', '-'}'0'..'9'{'D', 'F', 'd', 'f'}" 47 * using multiple alternatives: 3, 4 48 * As a result, alternative(s) 4 were disabled for that input 49 * java.g:734:35: Decision can match input such as "{'$', 'A'..'Z', 50 * '_', 'a'..'z', '\u00C0'..'\u00D6', '\u00D8'..'\u00F6', 51 * '\u00F8'..'\u1FFF', '\u3040'..'\u318F', '\u3300'..'\u337F', 52 * '\u3400'..'\u3D2D', '\u4E00'..'\u9FFF', '\uF900'..'\uFAFF'}" 53 * using multiple alternatives: 1, 2 54 * As a result, alternative(s) 2 were disabled for that input 55 * 56 * You can turn enum on/off as a keyword :) 57 * 58 * Version 1.0 -- initial release July 5, 2006 (requires 3.0b2 or higher) 59 * 60 * Primary author: Terence Parr, July 2006 61 * 62 * Version 1.0.1 -- corrections by Koen Vanderkimpen & Marko van Dooren, 63 * October 25, 2006; 64 * fixed normalInterfaceDeclaration: now uses typeParameters instead 65 * of typeParameter (according to JLS, 3rd edition) 66 * fixed castExpression: no longer allows expression next to type 67 * (according to semantics in JLS, in contrast with syntax in JLS) 68 * 69 * Version 1.0.2 -- Terence Parr, Nov 27, 2006 70 * java spec I built this from had some bizarre for-loop control. 71 * Looked weird and so I looked elsewhere...Yep, it's messed up. 72 * simplified. 73 * 74 * Version 1.0.3 -- Chris Hogue, Feb 26, 2007 75 * Factored out an annotationName rule and used it in the annotation rule. 76 * Not sure why, but typeName wasn't recognizing references to inner 77 * annotations (e.g. @InterfaceName.InnerAnnotation()) 78 * Factored out the elementValue section of an annotation reference. Created 79 * elementValuePair and elementValuePairs rules, then used them in the 80 * annotation rule. Allows it to recognize annotation references with 81 * multiple, comma separated attributes. 82 * Updated elementValueArrayInitializer so that it allows multiple elements. 83 * (It was only allowing 0 or 1 element). 84 * Updated localVariableDeclaration to allow annotations. Interestingly the JLS 85 * doesn't appear to indicate this is legal, but it does work as of at least 86 * JDK 1.5.0_06. 87 * Moved the Identifier portion of annotationTypeElementRest to annotationMethodRest. 88 * Because annotationConstantRest already references variableDeclarator which 89 * has the Identifier portion in it, the parser would fail on constants in 90 * annotation definitions because it expected two identifiers. 91 * Added optional trailing ';' to the alternatives in annotationTypeElementRest. 92 * Wouldn't handle an inner interface that has a trailing ';'. 93 * Swapped the expression and type rule reference order in castExpression to 94 * make it check for genericized casts first. It was failing to recognize a 95 * statement like "Class<Byte> TYPE = (Class<Byte>)...;" because it was seeing 96 * 'Class<Byte' in the cast expression as a less than expression, then failing 97 * on the '>'. 98 * Changed createdName to use typeArguments instead of nonWildcardTypeArguments. 99 * 100 * Changed the 'this' alternative in primary to allow 'identifierSuffix' rather than 101 * just 'arguments'. The case it couldn't handle was a call to an explicit 102 * generic method invocation (e.g. this.<E>doSomething()). Using identifierSuffix 103 * may be overly aggressive--perhaps should create a more constrained thisSuffix rule? 104 * 105 * Version 1.0.4 -- Hiroaki Nakamura, May 3, 2007 106 * 107 * Fixed formalParameterDecls, localVariableDeclaration, forInit, 108 * and forVarControl to use variableModifier* not 'final'? (annotation)? 109 * 110 * Version 1.0.5 -- Terence, June 21, 2007 111 * --a[i].foo didn't work. Fixed unaryExpression 112 * 113 * Version 1.0.6 -- John Ridgway, March 17, 2008 114 * Made "assert" a switchable keyword like "enum". 115 * Fixed compilationUnit to disallow "annotation importDeclaration ...". 116 * Changed "Identifier ('.' Identifier)*" to "qualifiedName" in more 117 * places. 118 * Changed modifier* and/or variableModifier* to classOrInterfaceModifiers, 119 * modifiers or variableModifiers, as appropriate. 120 * Renamed "bound" to "typeBound" to better match language in the JLS. 121 * Added "memberDeclaration" which rewrites to methodDeclaration or 122 * fieldDeclaration and pulled type into memberDeclaration. So we parse 123 * type and then move on to decide whether we're dealing with a field 124 * or a method. 125 * Modified "constructorDeclaration" to use "constructorBody" instead of 126 * "methodBody". constructorBody starts with explicitConstructorInvocation, 127 * then goes on to blockStatement*. Pulling explicitConstructorInvocation 128 * out of expressions allowed me to simplify "primary". 129 * Changed variableDeclarator to simplify it. 130 * Changed type to use classOrInterfaceType, thus simplifying it; of course 131 * I then had to add classOrInterfaceType, but it is used in several 132 * places. 133 * Fixed annotations, old version allowed "@X(y,z)", which is illegal. 134 * Added optional comma to end of "elementValueArrayInitializer"; as per JLS. 135 * Changed annotationTypeElementRest to use normalClassDeclaration and 136 * normalInterfaceDeclaration rather than classDeclaration and 137 * interfaceDeclaration, thus getting rid of a couple of grammar ambiguities. 138 * Split localVariableDeclaration into localVariableDeclarationStatement 139 * (includes the terminating semi-colon) and localVariableDeclaration. 140 * This allowed me to use localVariableDeclaration in "forInit" clauses, 141 * simplifying them. 142 * Changed switchBlockStatementGroup to use multiple labels. This adds an 143 * ambiguity, but if one uses appropriately greedy parsing it yields the 144 * parse that is closest to the meaning of the switch statement. 145 * Renamed "forVarControl" to "enhancedForControl" -- JLS language. 146 * Added semantic predicates to test for shift operations rather than other 147 * things. Thus, for instance, the string "< <" will never be treated 148 * as a left-shift operator. 149 * In "creator" we rule out "nonWildcardTypeArguments" on arrayCreation, 150 * which are illegal. 151 * Moved "nonWildcardTypeArguments into innerCreator. 152 * Removed 'super' superSuffix from explicitGenericInvocation, since that 153 * is only used in explicitConstructorInvocation at the beginning of a 154 * constructorBody. (This is part of the simplification of expressions 155 * mentioned earlier.) 156 * Simplified primary (got rid of those things that are only used in 157 * explicitConstructorInvocation). 158 * Lexer -- removed "Exponent?" from FloatingPointLiteral choice 4, since it 159 * led to an ambiguity. 160 * 161 * This grammar successfully parses every .java file in the JDK 1.5 source 162 * tree (excluding those whose file names include '-', which are not 163 * valid Java compilation units). 164 * 165 * Known remaining problems: 166 * "Letter" and "JavaIDDigit" are wrong. The actual specification of 167 * "Letter" should be "a character for which the method 168 * Character.isJavaIdentifierStart(int) returns true." A "Java 169 * letter-or-digit is a character for which the method 170 * Character.isJavaIdentifierPart(int) returns true." 171 */ 172 public class JavaParser extends DebugParser { 173 public static final String[] tokenNames = new String[] { 174 "<invalid>", "<EOR>", "<DOWN>", "<UP>", "IDENTIFIER", "INTLITERAL", "LONGLITERAL", "FLOATLITERAL", "DOUBLELITERAL", "CHARLITERAL", "STRINGLITERAL", "TRUE", "FALSE", "NULL", "IntegerNumber", "LongSuffix", "HexPrefix", "HexDigit", "Exponent", "NonIntegerNumber", "FloatSuffix", "DoubleSuffix", "EscapeSequence", "UNICODECHAR", "UNICODEPART", "WS", "COMMENT", "LINE_COMMENT", "ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE", "CATCH", "CHAR", "CLASS", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE", "ENUM", "EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", "GOTO", "IF", "IMPLEMENTS", "IMPORT", "INSTANCEOF", "INT", "INTERFACE", "LONG", "NATIVE", "NEW", "PACKAGE", "PRIVATE", "PROTECTED", "PUBLIC", "RETURN", "SHORT", "STATIC", "STRICTFP", "SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS", "TRANSIENT", "TRY", "VOID", "VOLATILE", "WHILE", "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACKET", "RBRACKET", "SEMI", "COMMA", "DOT", "ELLIPSIS", "EQ", "BANG", "TILDE", "QUES", "COLON", "EQEQ", "AMPAMP", "BARBAR", "PLUSPLUS", "SUBSUB", "PLUS", "SUB", "STAR", "SLASH", "AMP", "BAR", "CARET", "PERCENT", "PLUSEQ", "SUBEQ", "STAREQ", "SLASHEQ", "AMPEQ", "BAREQ", "CARETEQ", "PERCENTEQ", "MONKEYS_AT", "BANGEQ", "GT", "LT", "IdentifierStart", "IdentifierPart", "SurrogateIdentifer" 175 }; 176 public static final int EOF=-1; 177 public static final int IDENTIFIER=4; 178 public static final int INTLITERAL=5; 179 public static final int LONGLITERAL=6; 180 public static final int FLOATLITERAL=7; 181 public static final int DOUBLELITERAL=8; 182 public static final int CHARLITERAL=9; 183 public static final int STRINGLITERAL=10; 184 public static final int TRUE=11; 185 public static final int FALSE=12; 186 public static final int NULL=13; 187 public static final int IntegerNumber=14; 188 public static final int LongSuffix=15; 189 public static final int HexPrefix=16; 190 public static final int HexDigit=17; 191 public static final int Exponent=18; 192 public static final int NonIntegerNumber=19; 193 public static final int FloatSuffix=20; 194 public static final int DoubleSuffix=21; 195 public static final int EscapeSequence=22; 196 public static final int UNICODECHAR=23; 197 public static final int UNICODEPART=24; 198 public static final int WS=25; 199 public static final int COMMENT=26; 200 public static final int LINE_COMMENT=27; 201 public static final int ABSTRACT=28; 202 public static final int ASSERT=29; 203 public static final int BOOLEAN=30; 204 public static final int BREAK=31; 205 public static final int BYTE=32; 206 public static final int CASE=33; 207 public static final int CATCH=34; 208 public static final int CHAR=35; 209 public static final int CLASS=36; 210 public static final int CONST=37; 211 public static final int CONTINUE=38; 212 public static final int DEFAULT=39; 213 public static final int DO=40; 214 public static final int DOUBLE=41; 215 public static final int ELSE=42; 216 public static final int ENUM=43; 217 public static final int EXTENDS=44; 218 public static final int FINAL=45; 219 public static final int FINALLY=46; 220 public static final int FLOAT=47; 221 public static final int FOR=48; 222 public static final int GOTO=49; 223 public static final int IF=50; 224 public static final int IMPLEMENTS=51; 225 public static final int IMPORT=52; 226 public static final int INSTANCEOF=53; 227 public static final int INT=54; 228 public static final int INTERFACE=55; 229 public static final int LONG=56; 230 public static final int NATIVE=57; 231 public static final int NEW=58; 232 public static final int PACKAGE=59; 233 public static final int PRIVATE=60; 234 public static final int PROTECTED=61; 235 public static final int PUBLIC=62; 236 public static final int RETURN=63; 237 public static final int SHORT=64; 238 public static final int STATIC=65; 239 public static final int STRICTFP=66; 240 public static final int SUPER=67; 241 public static final int SWITCH=68; 242 public static final int SYNCHRONIZED=69; 243 public static final int THIS=70; 244 public static final int THROW=71; 245 public static final int THROWS=72; 246 public static final int TRANSIENT=73; 247 public static final int TRY=74; 248 public static final int VOID=75; 249 public static final int VOLATILE=76; 250 public static final int WHILE=77; 251 public static final int LPAREN=78; 252 public static final int RPAREN=79; 253 public static final int LBRACE=80; 254 public static final int RBRACE=81; 255 public static final int LBRACKET=82; 256 public static final int RBRACKET=83; 257 public static final int SEMI=84; 258 public static final int COMMA=85; 259 public static final int DOT=86; 260 public static final int ELLIPSIS=87; 261 public static final int EQ=88; 262 public static final int BANG=89; 263 public static final int TILDE=90; 264 public static final int QUES=91; 265 public static final int COLON=92; 266 public static final int EQEQ=93; 267 public static final int AMPAMP=94; 268 public static final int BARBAR=95; 269 public static final int PLUSPLUS=96; 270 public static final int SUBSUB=97; 271 public static final int PLUS=98; 272 public static final int SUB=99; 273 public static final int STAR=100; 274 public static final int SLASH=101; 275 public static final int AMP=102; 276 public static final int BAR=103; 277 public static final int CARET=104; 278 public static final int PERCENT=105; 279 public static final int PLUSEQ=106; 280 public static final int SUBEQ=107; 281 public static final int STAREQ=108; 282 public static final int SLASHEQ=109; 283 public static final int AMPEQ=110; 284 public static final int BAREQ=111; 285 public static final int CARETEQ=112; 286 public static final int PERCENTEQ=113; 287 public static final int MONKEYS_AT=114; 288 public static final int BANGEQ=115; 289 public static final int GT=116; 290 public static final int LT=117; 291 public static final int IdentifierStart=118; 292 public static final int IdentifierPart=119; 293 public static final int SurrogateIdentifer=120; 294 295 // delegates 296 // delegators 297 298 public static final String[] ruleNames = new String[] { 299 "invalidRule", "typeList", "synpred114_Java", "synpred175_Java", 300 "synpred19_Java", "elementValuePairs", "identifierSuffix", "interfaceFieldDeclaration", 301 "synpred69_Java", "synpred263_Java", "synpred231_Java", "synpred267_Java", 302 "synpred111_Java", "block", "synpred261_Java", "elementValuePair", 303 "typeArgument", "synpred264_Java", "synpred95_Java", "synpred93_Java", 304 "synpred215_Java", "normalInterfaceDeclaration", "enumHeader", "synpred236_Java", 305 "createdName", "synpred271_Java", "synpred230_Java", "synpred30_Java", 306 "synpred212_Java", "synpred82_Java", "synpred128_Java", "synpred83_Java", 307 "synpred255_Java", "synpred190_Java", "arrayInitializer", "interfaceDeclaration", 308 "synpred92_Java", "localVariableHeader", "packageDeclaration", "formalParameter", 309 "catchClause", "synpred27_Java", "synpred270_Java", "synpred46_Java", 310 "synpred1_Java", "synpred4_Java", "synpred233_Java", "synpred120_Java", 311 "superSuffix", "literal", "classDeclaration", "synpred72_Java", 312 "synpred160_Java", "arguments", "synpred80_Java", "formalParameterDecls", 313 "synpred113_Java", "inclusiveOrExpression", "synpred71_Java", "selector", 314 "synpred194_Java", "synpred265_Java", "synpred173_Java", "synpred141_Java", 315 "synpred187_Java", "trystatement", "synpred133_Java", "interfaceHeader", 316 "synpred73_Java", "localVariableDeclarationStatement", "synpred102_Java", 317 "synpred90_Java", "equalityExpression", "synpred177_Java", "synpred149_Java", 318 "interfaceBodyDeclaration", "classCreatorRest", "synpred121_Java", 319 "synpred105_Java", "typeArguments", "synpred60_Java", "synpred195_Java", 320 "fieldDeclaration", "synpred269_Java", "synpred250_Java", "multiplicativeExpression", 321 "qualifiedNameList", "synpred86_Java", "synpred148_Java", "synpred142_Java", 322 "synpred65_Java", "synpred75_Java", "synpred235_Java", "synpred192_Java", 323 "synpred144_Java", "castExpression", "enumBody", "synpred70_Java", 324 "synpred33_Java", "synpred54_Java", "annotationTypeDeclaration", 325 "annotationHeader", "synpred107_Java", "synpred35_Java", "creator", 326 "nonWildcardTypeArguments", "variableInitializer", "enumConstants", 327 "synpred34_Java", "interfaceMethodDeclaration", "type", "synpred135_Java", 328 "synpred119_Java", "conditionalAndExpression", "synpred9_Java", 329 "synpred125_Java", "synpred40_Java", "synpred257_Java", "enumConstant", 330 "synpred143_Java", "synpred132_Java", "synpred146_Java", "synpred188_Java", 331 "ellipsisParameterDecl", "synpred245_Java", "synpred167_Java", "compilationUnit", 332 "synpred259_Java", "synpred64_Java", "synpred181_Java", "synpred23_Java", 333 "synpred12_Java", "synpred74_Java", "explicitConstructorInvocation", 334 "synpred266_Java", "synpred197_Java", "synpred147_Java", "synpred15_Java", 335 "synpred178_Java", "synpred174_Java", "exclusiveOrExpression", "forstatement", 336 "synpred7_Java", "synpred76_Java", "synpred224_Java", "parExpression", 337 "synpred241_Java", "synpred159_Java", "synpred260_Java", "synpred50_Java", 338 "synpred166_Java", "annotationMethodDeclaration", "synpred208_Java", 339 "synpred106_Java", "classOrInterfaceType", "qualifiedImportName", 340 "statement", "typeBound", "methodHeader", "synpred249_Java", "synpred55_Java", 341 "synpred131_Java", "classBodyDeclaration", "synpred189_Java", "synpred51_Java", 342 "synpred227_Java", "synpred220_Java", "synpred123_Java", "andExpression", 343 "synpred200_Java", "synpred165_Java", "relationalExpression", "annotationTypeBody", 344 "synpred210_Java", "synpred109_Java", "conditionalOrExpression", 345 "synpred161_Java", "classOrInterfaceDeclaration", "synpred180_Java", 346 "synpred154_Java", "elementValueArrayInitializer", "synpred14_Java", 347 "innerCreator", "synpred26_Java", "synpred52_Java", "synpred198_Java", 348 "synpred219_Java", "synpred126_Java", "synpred85_Java", "synpred88_Java", 349 "synpred68_Java", "synpred3_Java", "synpred203_Java", "annotations", 350 "elementValue", "synpred205_Java", "synpred6_Java", "synpred32_Java", 351 "synpred209_Java", "assignmentOperator", "synpred262_Java", "synpred139_Java", 352 "synpred29_Java", "synpred204_Java", "synpred118_Java", "synpred94_Java", 353 "synpred84_Java", "synpred63_Java", "conditionalExpression", "synpred56_Java", 354 "synpred162_Java", "primitiveType", "synpred240_Java", "synpred216_Java", 355 "synpred79_Java", "synpred99_Java", "additiveExpression", "synpred78_Java", 356 "modifiers", "synpred184_Java", "synpred168_Java", "synpred48_Java", 357 "switchBlockStatementGroups", "blockStatement", "synpred193_Java", 358 "classBody", "interfaceBody", "synpred67_Java", "synpred5_Java", 359 "synpred58_Java", "synpred254_Java", "localVariableDeclaration", 360 "annotationTypeElementDeclaration", "synpred251_Java", "arrayCreator", 361 "synpred226_Java", "synpred239_Java", "synpred191_Java", "synpred24_Java", 362 "normalClassDeclaration", "synpred98_Java", "synpred53_Java", "synpred145_Java", 363 "synpred22_Java", "synpred150_Java", "synpred238_Java", "synpred207_Java", 364 "variableModifiers", "typeParameters", "synpred38_Java", "synpred129_Java", 365 "enumBodyDeclarations", "synpred172_Java", "synpred16_Java", "synpred100_Java", 366 "fieldHeader", "synpred41_Java", "synpred248_Java", "synpred152_Java", 367 "synpred214_Java", "switchBlockStatementGroup", "synpred199_Java", 368 "switchLabel", "qualifiedName", "synpred137_Java", "synpred237_Java", 369 "synpred223_Java", "synpred156_Java", "synpred243_Java", "synpred182_Java", 370 "synpred138_Java", "synpred77_Java", "synpred127_Java", "synpred112_Java", 371 "unaryExpressionNotPlusMinus", "synpred42_Java", "synpred89_Java", 372 "formalParameters", "synpred225_Java", "synpred136_Java", "synpred186_Java", 373 "synpred122_Java", "synpred87_Java", "synpred244_Java", "synpred97_Java", 374 "synpred229_Java", "synpred170_Java", "shiftOp", "synpred134_Java", 375 "synpred253_Java", "synpred44_Java", "memberDecl", "synpred157_Java", 376 "synpred246_Java", "synpred49_Java", "synpred31_Java", "synpred256_Java", 377 "unaryExpression", "synpred13_Java", "synpred213_Java", "synpred155_Java", 378 "typeHeader", "synpred91_Java", "instanceOfExpression", "variableDeclarator", 379 "synpred140_Java", "synpred25_Java", "synpred117_Java", "synpred2_Java", 380 "synpred222_Java", "synpred10_Java", "synpred104_Java", "synpred115_Java", 381 "synpred221_Java", "synpred45_Java", "synpred211_Java", "typeParameter", 382 "synpred36_Java", "synpred103_Java", "synpred39_Java", "synpred201_Java", 383 "methodDeclaration", "synpred62_Java", "synpred110_Java", "classHeader", 384 "synpred101_Java", "synpred21_Java", "synpred196_Java", "synpred96_Java", 385 "synpred61_Java", "synpred228_Java", "synpred28_Java", "synpred218_Java", 386 "synpred179_Java", "normalParameterDecl", "enumDeclaration", "synpred17_Java", 387 "synpred18_Java", "synpred108_Java", "synpred43_Java", "synpred206_Java", 388 "synpred169_Java", "synpred130_Java", "synpred242_Java", "synpred252_Java", 389 "synpred151_Java", "forInit", "shiftExpression", "synpred81_Java", 390 "synpred247_Java", "synpred20_Java", "catches", "synpred202_Java", 391 "synpred47_Java", "synpred185_Java", "synpred158_Java", "synpred66_Java", 392 "synpred11_Java", "synpred8_Java", "synpred163_Java", "synpred217_Java", 393 "primary", "synpred153_Java", "synpred57_Java", "synpred258_Java", 394 "expressionList", "annotation", "expression", "synpred176_Java", 395 "synpred171_Java", "synpred164_Java", "importDeclaration", "synpred124_Java", 396 "synpred268_Java", "synpred234_Java", "relationalOp", "synpred59_Java", 397 "synpred37_Java", "synpred183_Java", "synpred232_Java", "synpred116_Java", 398 "typeDeclaration" 399 }; 400 public static final boolean[] decisionCanBacktrack = new boolean[] { 401 false, // invalid decision 402 false, true, false, false, false, false, false, false, false, false, 403 false, true, false, false, true, false, false, false, false, 404 false, false, false, false, false, false, false, false, false, 405 false, false, true, false, false, false, false, false, false, 406 false, true, false, false, true, false, false, false, false, 407 false, false, true, false, false, false, true, false, false, 408 false, false, false, false, false, false, false, false, false, 409 false, false, false, false, false, false, true, true, false, 410 false, false, true, false, false, false, false, false, false, 411 false, false, false, false, true, false, false, true, false, 412 false, false, true, false, false, false, true, false, false, 413 false, true, false, false, false, false, false, true, true, 414 false, false, false, false, false, false, false, false, false, 415 false, false, false, false, false, false, false, false, false, 416 false, false, true, true, true, true, true, true, false, false, 417 false, false, false, false, true, false, false, false, true, 418 false, true, false, true, false, false, false, false, false, 419 false, false, false, false, false, false, false, false, false, 420 false, false, false, false, false, false, true, false, false, 421 false, false, false, false, false, false, false, false, false, 422 false, false, false, false, false, false, false, false, false, 423 false, false, false 424 }; 425 426 427 public int ruleLevel = 0; 428 public int getRuleLevel() { return ruleLevel; } 429 public void incRuleLevel() { ruleLevel++; } 430 public void decRuleLevel() { ruleLevel--; } 431 public JavaParser(TokenStream input) { 432 this(input, DebugEventSocketProxy.DEFAULT_DEBUGGER_PORT, new RecognizerSharedState()); 433 } 434 public JavaParser(TokenStream input, int port, RecognizerSharedState state) { 435 super(input, state); 436 this.state.ruleMemo = new HashMap[381+1]; 437 438 DebugEventSocketProxy proxy = 439 new DebugEventSocketProxy(this, port, null); 440 setDebugListener(proxy); 441 try { 442 proxy.handshake(); 443 } 444 catch (IOException ioe) { 445 reportError(ioe); 446 } 447 } 448 public JavaParser(TokenStream input, DebugEventListener dbg) { 449 super(input, dbg, new RecognizerSharedState()); 450 this.state.ruleMemo = new HashMap[381+1]; 451 452 } 453 protected boolean evalPredicate(boolean result, String predicate) { 454 dbg.semanticPredicate(result, predicate); 455 return result; 456 } 457 458 459 public String[] getTokenNames() { return JavaParser.tokenNames; } 460 public String getGrammarFileName() { return "src/com/google/doclava/parser/Java.g"; } 461 462 463 464 // $ANTLR start "compilationUnit" 465 // src/com/google/doclava/parser/Java.g:293:1: compilationUnit : ( ( annotations )? packageDeclaration )? ( importDeclaration )* ( typeDeclaration )* ; 466 public final void compilationUnit() throws RecognitionException { 467 int compilationUnit_StartIndex = input.index(); 468 try { dbg.enterRule(getGrammarFileName(), "compilationUnit"); 469 if ( getRuleLevel()==0 ) {dbg.commence();} 470 incRuleLevel(); 471 dbg.location(293, 1); 472 473 try { 474 if ( state.backtracking>0 && alreadyParsedRule(input, 1) ) { return ; } 475 // src/com/google/doclava/parser/Java.g:298:5: ( ( ( annotations )? packageDeclaration )? ( importDeclaration )* ( typeDeclaration )* ) 476 dbg.enterAlt(1); 477 478 // src/com/google/doclava/parser/Java.g:298:9: ( ( annotations )? packageDeclaration )? ( importDeclaration )* ( typeDeclaration )* 479 { 480 dbg.location(298,9); 481 // src/com/google/doclava/parser/Java.g:298:9: ( ( annotations )? packageDeclaration )? 482 int alt2=2; 483 try { dbg.enterSubRule(2); 484 try { dbg.enterDecision(2, decisionCanBacktrack[2]); 485 486 try { 487 isCyclicDecision = true; 488 alt2 = dfa2.predict(input); 489 } 490 catch (NoViableAltException nvae) { 491 dbg.recognitionException(nvae); 492 throw nvae; 493 } 494 } finally {dbg.exitDecision(2);} 495 496 switch (alt2) { 497 case 1 : 498 dbg.enterAlt(1); 499 500 // src/com/google/doclava/parser/Java.g:298:13: ( annotations )? packageDeclaration 501 { 502 dbg.location(298,13); 503 // src/com/google/doclava/parser/Java.g:298:13: ( annotations )? 504 int alt1=2; 505 try { dbg.enterSubRule(1); 506 try { dbg.enterDecision(1, decisionCanBacktrack[1]); 507 508 int LA1_0 = input.LA(1); 509 510 if ( (LA1_0==MONKEYS_AT) ) { 511 alt1=1; 512 } 513 } finally {dbg.exitDecision(1);} 514 515 switch (alt1) { 516 case 1 : 517 dbg.enterAlt(1); 518 519 // src/com/google/doclava/parser/Java.g:298:14: annotations 520 { 521 dbg.location(298,14); 522 pushFollow(FOLLOW_annotations_in_compilationUnit64); 523 annotations(); 524 525 state._fsp--; 526 if (state.failed) return ; 527 528 } 529 break; 530 531 } 532 } finally {dbg.exitSubRule(1);} 533 534 dbg.location(300,13); 535 pushFollow(FOLLOW_packageDeclaration_in_compilationUnit93); 536 packageDeclaration(); 537 538 state._fsp--; 539 if (state.failed) return ; 540 541 } 542 break; 543 544 } 545 } finally {dbg.exitSubRule(2);} 546 547 dbg.location(302,9); 548 // src/com/google/doclava/parser/Java.g:302:9: ( importDeclaration )* 549 try { dbg.enterSubRule(3); 550 551 loop3: 552 do { 553 int alt3=2; 554 try { dbg.enterDecision(3, decisionCanBacktrack[3]); 555 556 int LA3_0 = input.LA(1); 557 558 if ( (LA3_0==IMPORT) ) { 559 alt3=1; 560 } 561 562 563 } finally {dbg.exitDecision(3);} 564 565 switch (alt3) { 566 case 1 : 567 dbg.enterAlt(1); 568 569 // src/com/google/doclava/parser/Java.g:302:10: importDeclaration 570 { 571 dbg.location(302,10); 572 pushFollow(FOLLOW_importDeclaration_in_compilationUnit115); 573 importDeclaration(); 574 575 state._fsp--; 576 if (state.failed) return ; 577 578 } 579 break; 580 581 default : 582 break loop3; 583 } 584 } while (true); 585 } finally {dbg.exitSubRule(3);} 586 587 dbg.location(304,9); 588 // src/com/google/doclava/parser/Java.g:304:9: ( typeDeclaration )* 589 try { dbg.enterSubRule(4); 590 591 loop4: 592 do { 593 int alt4=2; 594 try { dbg.enterDecision(4, decisionCanBacktrack[4]); 595 596 int LA4_0 = input.LA(1); 597 598 if ( (LA4_0==IDENTIFIER||LA4_0==ABSTRACT||LA4_0==BOOLEAN||LA4_0==BYTE||(LA4_0>=CHAR && LA4_0<=CLASS)||LA4_0==DOUBLE||LA4_0==ENUM||LA4_0==FINAL||LA4_0==FLOAT||(LA4_0>=INT && LA4_0<=NATIVE)||(LA4_0>=PRIVATE && LA4_0<=PUBLIC)||(LA4_0>=SHORT && LA4_0<=STRICTFP)||LA4_0==SYNCHRONIZED||LA4_0==TRANSIENT||(LA4_0>=VOID && LA4_0<=VOLATILE)||LA4_0==SEMI||LA4_0==MONKEYS_AT||LA4_0==LT) ) { 599 alt4=1; 600 } 601 602 603 } finally {dbg.exitDecision(4);} 604 605 switch (alt4) { 606 case 1 : 607 dbg.enterAlt(1); 608 609 // src/com/google/doclava/parser/Java.g:304:10: typeDeclaration 610 { 611 dbg.location(304,10); 612 pushFollow(FOLLOW_typeDeclaration_in_compilationUnit137); 613 typeDeclaration(); 614 615 state._fsp--; 616 if (state.failed) return ; 617 618 } 619 break; 620 621 default : 622 break loop4; 623 } 624 } while (true); 625 } finally {dbg.exitSubRule(4);} 626 627 628 } 629 630 } 631 catch (RecognitionException re) { 632 reportError(re); 633 recover(input,re); 634 } 635 finally { 636 if ( state.backtracking>0 ) { memoize(input, 1, compilationUnit_StartIndex); } 637 } 638 dbg.location(306, 5); 639 640 } 641 finally { 642 dbg.exitRule(getGrammarFileName(), "compilationUnit"); 643 decRuleLevel(); 644 if ( getRuleLevel()==0 ) {dbg.terminate();} 645 } 646 647 return ; 648 } 649 // $ANTLR end "compilationUnit" 650 651 652 // $ANTLR start "packageDeclaration" 653 // src/com/google/doclava/parser/Java.g:308:1: packageDeclaration : 'package' qualifiedName ';' ; 654 public final void packageDeclaration() throws RecognitionException { 655 int packageDeclaration_StartIndex = input.index(); 656 try { dbg.enterRule(getGrammarFileName(), "packageDeclaration"); 657 if ( getRuleLevel()==0 ) {dbg.commence();} 658 incRuleLevel(); 659 dbg.location(308, 1); 660 661 try { 662 if ( state.backtracking>0 && alreadyParsedRule(input, 2) ) { return ; } 663 // src/com/google/doclava/parser/Java.g:309:5: ( 'package' qualifiedName ';' ) 664 dbg.enterAlt(1); 665 666 // src/com/google/doclava/parser/Java.g:309:9: 'package' qualifiedName ';' 667 { 668 dbg.location(309,9); 669 match(input,PACKAGE,FOLLOW_PACKAGE_in_packageDeclaration167); if (state.failed) return ; 670 dbg.location(309,19); 671 pushFollow(FOLLOW_qualifiedName_in_packageDeclaration169); 672 qualifiedName(); 673 674 state._fsp--; 675 if (state.failed) return ; 676 dbg.location(310,9); 677 match(input,SEMI,FOLLOW_SEMI_in_packageDeclaration179); if (state.failed) return ; 678 679 } 680 681 } 682 catch (RecognitionException re) { 683 reportError(re); 684 recover(input,re); 685 } 686 finally { 687 if ( state.backtracking>0 ) { memoize(input, 2, packageDeclaration_StartIndex); } 688 } 689 dbg.location(311, 5); 690 691 } 692 finally { 693 dbg.exitRule(getGrammarFileName(), "packageDeclaration"); 694 decRuleLevel(); 695 if ( getRuleLevel()==0 ) {dbg.terminate();} 696 } 697 698 return ; 699 } 700 // $ANTLR end "packageDeclaration" 701 702 703 // $ANTLR start "importDeclaration" 704 // src/com/google/doclava/parser/Java.g:313:1: importDeclaration : ( 'import' ( 'static' )? IDENTIFIER '.' '*' ';' | 'import' ( 'static' )? IDENTIFIER ( '.' IDENTIFIER )+ ( '.' '*' )? ';' ); 705 public final void importDeclaration() throws RecognitionException { 706 int importDeclaration_StartIndex = input.index(); 707 try { dbg.enterRule(getGrammarFileName(), "importDeclaration"); 708 if ( getRuleLevel()==0 ) {dbg.commence();} 709 incRuleLevel(); 710 dbg.location(313, 1); 711 712 try { 713 if ( state.backtracking>0 && alreadyParsedRule(input, 3) ) { return ; } 714 // src/com/google/doclava/parser/Java.g:314:5: ( 'import' ( 'static' )? IDENTIFIER '.' '*' ';' | 'import' ( 'static' )? IDENTIFIER ( '.' IDENTIFIER )+ ( '.' '*' )? ';' ) 715 int alt9=2; 716 try { dbg.enterDecision(9, decisionCanBacktrack[9]); 717 718 int LA9_0 = input.LA(1); 719 720 if ( (LA9_0==IMPORT) ) { 721 int LA9_1 = input.LA(2); 722 723 if ( (LA9_1==STATIC) ) { 724 int LA9_2 = input.LA(3); 725 726 if ( (LA9_2==IDENTIFIER) ) { 727 int LA9_3 = input.LA(4); 728 729 if ( (LA9_3==DOT) ) { 730 int LA9_4 = input.LA(5); 731 732 if ( (LA9_4==STAR) ) { 733 alt9=1; 734 } 735 else if ( (LA9_4==IDENTIFIER) ) { 736 alt9=2; 737 } 738 else { 739 if (state.backtracking>0) {state.failed=true; return ;} 740 NoViableAltException nvae = 741 new NoViableAltException("", 9, 4, input); 742 743 dbg.recognitionException(nvae); 744 throw nvae; 745 } 746 } 747 else { 748 if (state.backtracking>0) {state.failed=true; return ;} 749 NoViableAltException nvae = 750 new NoViableAltException("", 9, 3, input); 751 752 dbg.recognitionException(nvae); 753 throw nvae; 754 } 755 } 756 else { 757 if (state.backtracking>0) {state.failed=true; return ;} 758 NoViableAltException nvae = 759 new NoViableAltException("", 9, 2, input); 760 761 dbg.recognitionException(nvae); 762 throw nvae; 763 } 764 } 765 else if ( (LA9_1==IDENTIFIER) ) { 766 int LA9_3 = input.LA(3); 767 768 if ( (LA9_3==DOT) ) { 769 int LA9_4 = input.LA(4); 770 771 if ( (LA9_4==STAR) ) { 772 alt9=1; 773 } 774 else if ( (LA9_4==IDENTIFIER) ) { 775 alt9=2; 776 } 777 else { 778 if (state.backtracking>0) {state.failed=true; return ;} 779 NoViableAltException nvae = 780 new NoViableAltException("", 9, 4, input); 781 782 dbg.recognitionException(nvae); 783 throw nvae; 784 } 785 } 786 else { 787 if (state.backtracking>0) {state.failed=true; return ;} 788 NoViableAltException nvae = 789 new NoViableAltException("", 9, 3, input); 790 791 dbg.recognitionException(nvae); 792 throw nvae; 793 } 794 } 795 else { 796 if (state.backtracking>0) {state.failed=true; return ;} 797 NoViableAltException nvae = 798 new NoViableAltException("", 9, 1, input); 799 800 dbg.recognitionException(nvae); 801 throw nvae; 802 } 803 } 804 else { 805 if (state.backtracking>0) {state.failed=true; return ;} 806 NoViableAltException nvae = 807 new NoViableAltException("", 9, 0, input); 808 809 dbg.recognitionException(nvae); 810 throw nvae; 811 } 812 } finally {dbg.exitDecision(9);} 813 814 switch (alt9) { 815 case 1 : 816 dbg.enterAlt(1); 817 818 // src/com/google/doclava/parser/Java.g:314:9: 'import' ( 'static' )? IDENTIFIER '.' '*' ';' 819 { 820 dbg.location(314,9); 821 match(input,IMPORT,FOLLOW_IMPORT_in_importDeclaration198); if (state.failed) return ; 822 dbg.location(315,9); 823 // src/com/google/doclava/parser/Java.g:315:9: ( 'static' )? 824 int alt5=2; 825 try { dbg.enterSubRule(5); 826 try { dbg.enterDecision(5, decisionCanBacktrack[5]); 827 828 int LA5_0 = input.LA(1); 829 830 if ( (LA5_0==STATIC) ) { 831 alt5=1; 832 } 833 } finally {dbg.exitDecision(5);} 834 835 switch (alt5) { 836 case 1 : 837 dbg.enterAlt(1); 838 839 // src/com/google/doclava/parser/Java.g:315:10: 'static' 840 { 841 dbg.location(315,10); 842 match(input,STATIC,FOLLOW_STATIC_in_importDeclaration209); if (state.failed) return ; 843 844 } 845 break; 846 847 } 848 } finally {dbg.exitSubRule(5);} 849 850 dbg.location(317,9); 851 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_importDeclaration230); if (state.failed) return ; 852 dbg.location(317,20); 853 match(input,DOT,FOLLOW_DOT_in_importDeclaration232); if (state.failed) return ; 854 dbg.location(317,24); 855 match(input,STAR,FOLLOW_STAR_in_importDeclaration234); if (state.failed) return ; 856 dbg.location(318,9); 857 match(input,SEMI,FOLLOW_SEMI_in_importDeclaration244); if (state.failed) return ; 858 859 } 860 break; 861 case 2 : 862 dbg.enterAlt(2); 863 864 // src/com/google/doclava/parser/Java.g:319:9: 'import' ( 'static' )? IDENTIFIER ( '.' IDENTIFIER )+ ( '.' '*' )? ';' 865 { 866 dbg.location(319,9); 867 match(input,IMPORT,FOLLOW_IMPORT_in_importDeclaration254); if (state.failed) return ; 868 dbg.location(320,9); 869 // src/com/google/doclava/parser/Java.g:320:9: ( 'static' )? 870 int alt6=2; 871 try { dbg.enterSubRule(6); 872 try { dbg.enterDecision(6, decisionCanBacktrack[6]); 873 874 int LA6_0 = input.LA(1); 875 876 if ( (LA6_0==STATIC) ) { 877 alt6=1; 878 } 879 } finally {dbg.exitDecision(6);} 880 881 switch (alt6) { 882 case 1 : 883 dbg.enterAlt(1); 884 885 // src/com/google/doclava/parser/Java.g:320:10: 'static' 886 { 887 dbg.location(320,10); 888 match(input,STATIC,FOLLOW_STATIC_in_importDeclaration265); if (state.failed) return ; 889 890 } 891 break; 892 893 } 894 } finally {dbg.exitSubRule(6);} 895 896 dbg.location(322,9); 897 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_importDeclaration286); if (state.failed) return ; 898 dbg.location(323,9); 899 // src/com/google/doclava/parser/Java.g:323:9: ( '.' IDENTIFIER )+ 900 int cnt7=0; 901 try { dbg.enterSubRule(7); 902 903 loop7: 904 do { 905 int alt7=2; 906 try { dbg.enterDecision(7, decisionCanBacktrack[7]); 907 908 int LA7_0 = input.LA(1); 909 910 if ( (LA7_0==DOT) ) { 911 int LA7_1 = input.LA(2); 912 913 if ( (LA7_1==IDENTIFIER) ) { 914 alt7=1; 915 } 916 917 918 } 919 920 921 } finally {dbg.exitDecision(7);} 922 923 switch (alt7) { 924 case 1 : 925 dbg.enterAlt(1); 926 927 // src/com/google/doclava/parser/Java.g:323:10: '.' IDENTIFIER 928 { 929 dbg.location(323,10); 930 match(input,DOT,FOLLOW_DOT_in_importDeclaration297); if (state.failed) return ; 931 dbg.location(323,14); 932 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_importDeclaration299); if (state.failed) return ; 933 934 } 935 break; 936 937 default : 938 if ( cnt7 >= 1 ) break loop7; 939 if (state.backtracking>0) {state.failed=true; return ;} 940 EarlyExitException eee = 941 new EarlyExitException(7, input); 942 dbg.recognitionException(eee); 943 944 throw eee; 945 } 946 cnt7++; 947 } while (true); 948 } finally {dbg.exitSubRule(7);} 949 950 dbg.location(325,9); 951 // src/com/google/doclava/parser/Java.g:325:9: ( '.' '*' )? 952 int alt8=2; 953 try { dbg.enterSubRule(8); 954 try { dbg.enterDecision(8, decisionCanBacktrack[8]); 955 956 int LA8_0 = input.LA(1); 957 958 if ( (LA8_0==DOT) ) { 959 alt8=1; 960 } 961 } finally {dbg.exitDecision(8);} 962 963 switch (alt8) { 964 case 1 : 965 dbg.enterAlt(1); 966 967 // src/com/google/doclava/parser/Java.g:325:10: '.' '*' 968 { 969 dbg.location(325,10); 970 match(input,DOT,FOLLOW_DOT_in_importDeclaration321); if (state.failed) return ; 971 dbg.location(325,14); 972 match(input,STAR,FOLLOW_STAR_in_importDeclaration323); if (state.failed) return ; 973 974 } 975 break; 976 977 } 978 } finally {dbg.exitSubRule(8);} 979 980 dbg.location(327,9); 981 match(input,SEMI,FOLLOW_SEMI_in_importDeclaration344); if (state.failed) return ; 982 983 } 984 break; 985 986 } 987 } 988 catch (RecognitionException re) { 989 reportError(re); 990 recover(input,re); 991 } 992 finally { 993 if ( state.backtracking>0 ) { memoize(input, 3, importDeclaration_StartIndex); } 994 } 995 dbg.location(328, 5); 996 997 } 998 finally { 999 dbg.exitRule(getGrammarFileName(), "importDeclaration"); 1000 decRuleLevel(); 1001 if ( getRuleLevel()==0 ) {dbg.terminate();} 1002 } 1003 1004 return ; 1005 } 1006 // $ANTLR end "importDeclaration" 1007 1008 1009 // $ANTLR start "qualifiedImportName" 1010 // src/com/google/doclava/parser/Java.g:330:1: qualifiedImportName : IDENTIFIER ( '.' IDENTIFIER )* ; 1011 public final void qualifiedImportName() throws RecognitionException { 1012 int qualifiedImportName_StartIndex = input.index(); 1013 try { dbg.enterRule(getGrammarFileName(), "qualifiedImportName"); 1014 if ( getRuleLevel()==0 ) {dbg.commence();} 1015 incRuleLevel(); 1016 dbg.location(330, 1); 1017 1018 try { 1019 if ( state.backtracking>0 && alreadyParsedRule(input, 4) ) { return ; } 1020 // src/com/google/doclava/parser/Java.g:331:5: ( IDENTIFIER ( '.' IDENTIFIER )* ) 1021 dbg.enterAlt(1); 1022 1023 // src/com/google/doclava/parser/Java.g:331:9: IDENTIFIER ( '.' IDENTIFIER )* 1024 { 1025 dbg.location(331,9); 1026 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_qualifiedImportName363); if (state.failed) return ; 1027 dbg.location(332,9); 1028 // src/com/google/doclava/parser/Java.g:332:9: ( '.' IDENTIFIER )* 1029 try { dbg.enterSubRule(10); 1030 1031 loop10: 1032 do { 1033 int alt10=2; 1034 try { dbg.enterDecision(10, decisionCanBacktrack[10]); 1035 1036 int LA10_0 = input.LA(1); 1037 1038 if ( (LA10_0==DOT) ) { 1039 alt10=1; 1040 } 1041 1042 1043 } finally {dbg.exitDecision(10);} 1044 1045 switch (alt10) { 1046 case 1 : 1047 dbg.enterAlt(1); 1048 1049 // src/com/google/doclava/parser/Java.g:332:10: '.' IDENTIFIER 1050 { 1051 dbg.location(332,10); 1052 match(input,DOT,FOLLOW_DOT_in_qualifiedImportName374); if (state.failed) return ; 1053 dbg.location(332,14); 1054 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_qualifiedImportName376); if (state.failed) return ; 1055 1056 } 1057 break; 1058 1059 default : 1060 break loop10; 1061 } 1062 } while (true); 1063 } finally {dbg.exitSubRule(10);} 1064 1065 1066 } 1067 1068 } 1069 catch (RecognitionException re) { 1070 reportError(re); 1071 recover(input,re); 1072 } 1073 finally { 1074 if ( state.backtracking>0 ) { memoize(input, 4, qualifiedImportName_StartIndex); } 1075 } 1076 dbg.location(334, 5); 1077 1078 } 1079 finally { 1080 dbg.exitRule(getGrammarFileName(), "qualifiedImportName"); 1081 decRuleLevel(); 1082 if ( getRuleLevel()==0 ) {dbg.terminate();} 1083 } 1084 1085 return ; 1086 } 1087 // $ANTLR end "qualifiedImportName" 1088 1089 1090 // $ANTLR start "typeDeclaration" 1091 // src/com/google/doclava/parser/Java.g:336:1: typeDeclaration : ( classOrInterfaceDeclaration | ';' ); 1092 public final void typeDeclaration() throws RecognitionException { 1093 int typeDeclaration_StartIndex = input.index(); 1094 try { dbg.enterRule(getGrammarFileName(), "typeDeclaration"); 1095 if ( getRuleLevel()==0 ) {dbg.commence();} 1096 incRuleLevel(); 1097 dbg.location(336, 1); 1098 1099 try { 1100 if ( state.backtracking>0 && alreadyParsedRule(input, 5) ) { return ; } 1101 // src/com/google/doclava/parser/Java.g:337:5: ( classOrInterfaceDeclaration | ';' ) 1102 int alt11=2; 1103 try { dbg.enterDecision(11, decisionCanBacktrack[11]); 1104 1105 int LA11_0 = input.LA(1); 1106 1107 if ( (LA11_0==IDENTIFIER||LA11_0==ABSTRACT||LA11_0==BOOLEAN||LA11_0==BYTE||(LA11_0>=CHAR && LA11_0<=CLASS)||LA11_0==DOUBLE||LA11_0==ENUM||LA11_0==FINAL||LA11_0==FLOAT||(LA11_0>=INT && LA11_0<=NATIVE)||(LA11_0>=PRIVATE && LA11_0<=PUBLIC)||(LA11_0>=SHORT && LA11_0<=STRICTFP)||LA11_0==SYNCHRONIZED||LA11_0==TRANSIENT||(LA11_0>=VOID && LA11_0<=VOLATILE)||LA11_0==MONKEYS_AT||LA11_0==LT) ) { 1108 alt11=1; 1109 } 1110 else if ( (LA11_0==SEMI) ) { 1111 alt11=2; 1112 } 1113 else { 1114 if (state.backtracking>0) {state.failed=true; return ;} 1115 NoViableAltException nvae = 1116 new NoViableAltException("", 11, 0, input); 1117 1118 dbg.recognitionException(nvae); 1119 throw nvae; 1120 } 1121 } finally {dbg.exitDecision(11);} 1122 1123 switch (alt11) { 1124 case 1 : 1125 dbg.enterAlt(1); 1126 1127 // src/com/google/doclava/parser/Java.g:337:9: classOrInterfaceDeclaration 1128 { 1129 dbg.location(337,9); 1130 pushFollow(FOLLOW_classOrInterfaceDeclaration_in_typeDeclaration406); 1131 classOrInterfaceDeclaration(); 1132 1133 state._fsp--; 1134 if (state.failed) return ; 1135 1136 } 1137 break; 1138 case 2 : 1139 dbg.enterAlt(2); 1140 1141 // src/com/google/doclava/parser/Java.g:338:9: ';' 1142 { 1143 dbg.location(338,9); 1144 match(input,SEMI,FOLLOW_SEMI_in_typeDeclaration416); if (state.failed) return ; 1145 1146 } 1147 break; 1148 1149 } 1150 } 1151 catch (RecognitionException re) { 1152 reportError(re); 1153 recover(input,re); 1154 } 1155 finally { 1156 if ( state.backtracking>0 ) { memoize(input, 5, typeDeclaration_StartIndex); } 1157 } 1158 dbg.location(339, 5); 1159 1160 } 1161 finally { 1162 dbg.exitRule(getGrammarFileName(), "typeDeclaration"); 1163 decRuleLevel(); 1164 if ( getRuleLevel()==0 ) {dbg.terminate();} 1165 } 1166 1167 return ; 1168 } 1169 // $ANTLR end "typeDeclaration" 1170 1171 1172 // $ANTLR start "classOrInterfaceDeclaration" 1173 // src/com/google/doclava/parser/Java.g:341:1: classOrInterfaceDeclaration : ( classDeclaration | interfaceDeclaration ); 1174 public final void classOrInterfaceDeclaration() throws RecognitionException { 1175 int classOrInterfaceDeclaration_StartIndex = input.index(); 1176 try { dbg.enterRule(getGrammarFileName(), "classOrInterfaceDeclaration"); 1177 if ( getRuleLevel()==0 ) {dbg.commence();} 1178 incRuleLevel(); 1179 dbg.location(341, 1); 1180 1181 try { 1182 if ( state.backtracking>0 && alreadyParsedRule(input, 6) ) { return ; } 1183 // src/com/google/doclava/parser/Java.g:342:5: ( classDeclaration | interfaceDeclaration ) 1184 int alt12=2; 1185 try { dbg.enterDecision(12, decisionCanBacktrack[12]); 1186 1187 try { 1188 isCyclicDecision = true; 1189 alt12 = dfa12.predict(input); 1190 } 1191 catch (NoViableAltException nvae) { 1192 dbg.recognitionException(nvae); 1193 throw nvae; 1194 } 1195 } finally {dbg.exitDecision(12);} 1196 1197 switch (alt12) { 1198 case 1 : 1199 dbg.enterAlt(1); 1200 1201 // src/com/google/doclava/parser/Java.g:342:10: classDeclaration 1202 { 1203 dbg.location(342,10); 1204 pushFollow(FOLLOW_classDeclaration_in_classOrInterfaceDeclaration436); 1205 classDeclaration(); 1206 1207 state._fsp--; 1208 if (state.failed) return ; 1209 1210 } 1211 break; 1212 case 2 : 1213 dbg.enterAlt(2); 1214 1215 // src/com/google/doclava/parser/Java.g:343:9: interfaceDeclaration 1216 { 1217 dbg.location(343,9); 1218 pushFollow(FOLLOW_interfaceDeclaration_in_classOrInterfaceDeclaration446); 1219 interfaceDeclaration(); 1220 1221 state._fsp--; 1222 if (state.failed) return ; 1223 1224 } 1225 break; 1226 1227 } 1228 } 1229 catch (RecognitionException re) { 1230 reportError(re); 1231 recover(input,re); 1232 } 1233 finally { 1234 if ( state.backtracking>0 ) { memoize(input, 6, classOrInterfaceDeclaration_StartIndex); } 1235 } 1236 dbg.location(344, 5); 1237 1238 } 1239 finally { 1240 dbg.exitRule(getGrammarFileName(), "classOrInterfaceDeclaration"); 1241 decRuleLevel(); 1242 if ( getRuleLevel()==0 ) {dbg.terminate();} 1243 } 1244 1245 return ; 1246 } 1247 // $ANTLR end "classOrInterfaceDeclaration" 1248 1249 1250 // $ANTLR start "modifiers" 1251 // src/com/google/doclava/parser/Java.g:347:1: modifiers : ( annotation | 'public' | 'protected' | 'private' | 'static' | 'abstract' | 'final' | 'native' | 'synchronized' | 'transient' | 'volatile' | 'strictfp' )* ; 1252 public final void modifiers() throws RecognitionException { 1253 int modifiers_StartIndex = input.index(); 1254 try { dbg.enterRule(getGrammarFileName(), "modifiers"); 1255 if ( getRuleLevel()==0 ) {dbg.commence();} 1256 incRuleLevel(); 1257 dbg.location(347, 1); 1258 1259 try { 1260 if ( state.backtracking>0 && alreadyParsedRule(input, 7) ) { return ; } 1261 // src/com/google/doclava/parser/Java.g:348:5: ( ( annotation | 'public' | 'protected' | 'private' | 'static' | 'abstract' | 'final' | 'native' | 'synchronized' | 'transient' | 'volatile' | 'strictfp' )* ) 1262 dbg.enterAlt(1); 1263 1264 // src/com/google/doclava/parser/Java.g:349:5: ( annotation | 'public' | 'protected' | 'private' | 'static' | 'abstract' | 'final' | 'native' | 'synchronized' | 'transient' | 'volatile' | 'strictfp' )* 1265 { 1266 dbg.location(349,5); 1267 // src/com/google/doclava/parser/Java.g:349:5: ( annotation | 'public' | 'protected' | 'private' | 'static' | 'abstract' | 'final' | 'native' | 'synchronized' | 'transient' | 'volatile' | 'strictfp' )* 1268 try { dbg.enterSubRule(13); 1269 1270 loop13: 1271 do { 1272 int alt13=13; 1273 try { dbg.enterDecision(13, decisionCanBacktrack[13]); 1274 1275 try { 1276 isCyclicDecision = true; 1277 alt13 = dfa13.predict(input); 1278 } 1279 catch (NoViableAltException nvae) { 1280 dbg.recognitionException(nvae); 1281 throw nvae; 1282 } 1283 } finally {dbg.exitDecision(13);} 1284 1285 switch (alt13) { 1286 case 1 : 1287 dbg.enterAlt(1); 1288 1289 // src/com/google/doclava/parser/Java.g:349:10: annotation 1290 { 1291 dbg.location(349,10); 1292 pushFollow(FOLLOW_annotation_in_modifiers473); 1293 annotation(); 1294 1295 state._fsp--; 1296 if (state.failed) return ; 1297 1298 } 1299 break; 1300 case 2 : 1301 dbg.enterAlt(2); 1302 1303 // src/com/google/doclava/parser/Java.g:350:9: 'public' 1304 { 1305 dbg.location(350,9); 1306 match(input,PUBLIC,FOLLOW_PUBLIC_in_modifiers483); if (state.failed) return ; 1307 1308 } 1309 break; 1310 case 3 : 1311 dbg.enterAlt(3); 1312 1313 // src/com/google/doclava/parser/Java.g:351:9: 'protected' 1314 { 1315 dbg.location(351,9); 1316 match(input,PROTECTED,FOLLOW_PROTECTED_in_modifiers493); if (state.failed) return ; 1317 1318 } 1319 break; 1320 case 4 : 1321 dbg.enterAlt(4); 1322 1323 // src/com/google/doclava/parser/Java.g:352:9: 'private' 1324 { 1325 dbg.location(352,9); 1326 match(input,PRIVATE,FOLLOW_PRIVATE_in_modifiers503); if (state.failed) return ; 1327 1328 } 1329 break; 1330 case 5 : 1331 dbg.enterAlt(5); 1332 1333 // src/com/google/doclava/parser/Java.g:353:9: 'static' 1334 { 1335 dbg.location(353,9); 1336 match(input,STATIC,FOLLOW_STATIC_in_modifiers513); if (state.failed) return ; 1337 1338 } 1339 break; 1340 case 6 : 1341 dbg.enterAlt(6); 1342 1343 // src/com/google/doclava/parser/Java.g:354:9: 'abstract' 1344 { 1345 dbg.location(354,9); 1346 match(input,ABSTRACT,FOLLOW_ABSTRACT_in_modifiers523); if (state.failed) return ; 1347 1348 } 1349 break; 1350 case 7 : 1351 dbg.enterAlt(7); 1352 1353 // src/com/google/doclava/parser/Java.g:355:9: 'final' 1354 { 1355 dbg.location(355,9); 1356 match(input,FINAL,FOLLOW_FINAL_in_modifiers533); if (state.failed) return ; 1357 1358 } 1359 break; 1360 case 8 : 1361 dbg.enterAlt(8); 1362 1363 // src/com/google/doclava/parser/Java.g:356:9: 'native' 1364 { 1365 dbg.location(356,9); 1366 match(input,NATIVE,FOLLOW_NATIVE_in_modifiers543); if (state.failed) return ; 1367 1368 } 1369 break; 1370 case 9 : 1371 dbg.enterAlt(9); 1372 1373 // src/com/google/doclava/parser/Java.g:357:9: 'synchronized' 1374 { 1375 dbg.location(357,9); 1376 match(input,SYNCHRONIZED,FOLLOW_SYNCHRONIZED_in_modifiers553); if (state.failed) return ; 1377 1378 } 1379 break; 1380 case 10 : 1381 dbg.enterAlt(10); 1382 1383 // src/com/google/doclava/parser/Java.g:358:9: 'transient' 1384 { 1385 dbg.location(358,9); 1386 match(input,TRANSIENT,FOLLOW_TRANSIENT_in_modifiers563); if (state.failed) return ; 1387 1388 } 1389 break; 1390 case 11 : 1391 dbg.enterAlt(11); 1392 1393 // src/com/google/doclava/parser/Java.g:359:9: 'volatile' 1394 { 1395 dbg.location(359,9); 1396 match(input,VOLATILE,FOLLOW_VOLATILE_in_modifiers573); if (state.failed) return ; 1397 1398 } 1399 break; 1400 case 12 : 1401 dbg.enterAlt(12); 1402 1403 // src/com/google/doclava/parser/Java.g:360:9: 'strictfp' 1404 { 1405 dbg.location(360,9); 1406 match(input,STRICTFP,FOLLOW_STRICTFP_in_modifiers583); if (state.failed) return ; 1407 1408 } 1409 break; 1410 1411 default : 1412 break loop13; 1413 } 1414 } while (true); 1415 } finally {dbg.exitSubRule(13);} 1416 1417 1418 } 1419 1420 } 1421 catch (RecognitionException re) { 1422 reportError(re); 1423 recover(input,re); 1424 } 1425 finally { 1426 if ( state.backtracking>0 ) { memoize(input, 7, modifiers_StartIndex); } 1427 } 1428 dbg.location(362, 5); 1429 1430 } 1431 finally { 1432 dbg.exitRule(getGrammarFileName(), "modifiers"); 1433 decRuleLevel(); 1434 if ( getRuleLevel()==0 ) {dbg.terminate();} 1435 } 1436 1437 return ; 1438 } 1439 // $ANTLR end "modifiers" 1440 1441 1442 // $ANTLR start "variableModifiers" 1443 // src/com/google/doclava/parser/Java.g:365:1: variableModifiers : ( 'final' | annotation )* ; 1444 public final void variableModifiers() throws RecognitionException { 1445 int variableModifiers_StartIndex = input.index(); 1446 try { dbg.enterRule(getGrammarFileName(), "variableModifiers"); 1447 if ( getRuleLevel()==0 ) {dbg.commence();} 1448 incRuleLevel(); 1449 dbg.location(365, 1); 1450 1451 try { 1452 if ( state.backtracking>0 && alreadyParsedRule(input, 8) ) { return ; } 1453 // src/com/google/doclava/parser/Java.g:366:5: ( ( 'final' | annotation )* ) 1454 dbg.enterAlt(1); 1455 1456 // src/com/google/doclava/parser/Java.g:366:9: ( 'final' | annotation )* 1457 { 1458 dbg.location(366,9); 1459 // src/com/google/doclava/parser/Java.g:366:9: ( 'final' | annotation )* 1460 try { dbg.enterSubRule(14); 1461 1462 loop14: 1463 do { 1464 int alt14=3; 1465 try { dbg.enterDecision(14, decisionCanBacktrack[14]); 1466 1467 int LA14_0 = input.LA(1); 1468 1469 if ( (LA14_0==FINAL) ) { 1470 alt14=1; 1471 } 1472 else if ( (LA14_0==MONKEYS_AT) ) { 1473 alt14=2; 1474 } 1475 1476 1477 } finally {dbg.exitDecision(14);} 1478 1479 switch (alt14) { 1480 case 1 : 1481 dbg.enterAlt(1); 1482 1483 // src/com/google/doclava/parser/Java.g:366:13: 'final' 1484 { 1485 dbg.location(366,13); 1486 match(input,FINAL,FOLLOW_FINAL_in_variableModifiers614); if (state.failed) return ; 1487 1488 } 1489 break; 1490 case 2 : 1491 dbg.enterAlt(2); 1492 1493 // src/com/google/doclava/parser/Java.g:367:13: annotation 1494 { 1495 dbg.location(367,13); 1496 pushFollow(FOLLOW_annotation_in_variableModifiers628); 1497 annotation(); 1498 1499 state._fsp--; 1500 if (state.failed) return ; 1501 1502 } 1503 break; 1504 1505 default : 1506 break loop14; 1507 } 1508 } while (true); 1509 } finally {dbg.exitSubRule(14);} 1510 1511 1512 } 1513 1514 } 1515 catch (RecognitionException re) { 1516 reportError(re); 1517 recover(input,re); 1518 } 1519 finally { 1520 if ( state.backtracking>0 ) { memoize(input, 8, variableModifiers_StartIndex); } 1521 } 1522 dbg.location(369, 5); 1523 1524 } 1525 finally { 1526 dbg.exitRule(getGrammarFileName(), "variableModifiers"); 1527 decRuleLevel(); 1528 if ( getRuleLevel()==0 ) {dbg.terminate();} 1529 } 1530 1531 return ; 1532 } 1533 // $ANTLR end "variableModifiers" 1534 1535 1536 // $ANTLR start "classDeclaration" 1537 // src/com/google/doclava/parser/Java.g:372:1: classDeclaration : ( normalClassDeclaration | enumDeclaration ); 1538 public final void classDeclaration() throws RecognitionException { 1539 int classDeclaration_StartIndex = input.index(); 1540 try { dbg.enterRule(getGrammarFileName(), "classDeclaration"); 1541 if ( getRuleLevel()==0 ) {dbg.commence();} 1542 incRuleLevel(); 1543 dbg.location(372, 1); 1544 1545 try { 1546 if ( state.backtracking>0 && alreadyParsedRule(input, 9) ) { return ; } 1547 // src/com/google/doclava/parser/Java.g:373:5: ( normalClassDeclaration | enumDeclaration ) 1548 int alt15=2; 1549 try { dbg.enterDecision(15, decisionCanBacktrack[15]); 1550 1551 try { 1552 isCyclicDecision = true; 1553 alt15 = dfa15.predict(input); 1554 } 1555 catch (NoViableAltException nvae) { 1556 dbg.recognitionException(nvae); 1557 throw nvae; 1558 } 1559 } finally {dbg.exitDecision(15);} 1560 1561 switch (alt15) { 1562 case 1 : 1563 dbg.enterAlt(1); 1564 1565 // src/com/google/doclava/parser/Java.g:373:9: normalClassDeclaration 1566 { 1567 dbg.location(373,9); 1568 pushFollow(FOLLOW_normalClassDeclaration_in_classDeclaration659); 1569 normalClassDeclaration(); 1570 1571 state._fsp--; 1572 if (state.failed) return ; 1573 1574 } 1575 break; 1576 case 2 : 1577 dbg.enterAlt(2); 1578 1579 // src/com/google/doclava/parser/Java.g:374:9: enumDeclaration 1580 { 1581 dbg.location(374,9); 1582 pushFollow(FOLLOW_enumDeclaration_in_classDeclaration669); 1583 enumDeclaration(); 1584 1585 state._fsp--; 1586 if (state.failed) return ; 1587 1588 } 1589 break; 1590 1591 } 1592 } 1593 catch (RecognitionException re) { 1594 reportError(re); 1595 recover(input,re); 1596 } 1597 finally { 1598 if ( state.backtracking>0 ) { memoize(input, 9, classDeclaration_StartIndex); } 1599 } 1600 dbg.location(375, 5); 1601 1602 } 1603 finally { 1604 dbg.exitRule(getGrammarFileName(), "classDeclaration"); 1605 decRuleLevel(); 1606 if ( getRuleLevel()==0 ) {dbg.terminate();} 1607 } 1608 1609 return ; 1610 } 1611 // $ANTLR end "classDeclaration" 1612 1613 1614 // $ANTLR start "normalClassDeclaration" 1615 // src/com/google/doclava/parser/Java.g:377:1: normalClassDeclaration : modifiers 'class' IDENTIFIER ( typeParameters )? ( 'extends' type )? ( 'implements' typeList )? classBody ; 1616 public final void normalClassDeclaration() throws RecognitionException { 1617 int normalClassDeclaration_StartIndex = input.index(); 1618 try { dbg.enterRule(getGrammarFileName(), "normalClassDeclaration"); 1619 if ( getRuleLevel()==0 ) {dbg.commence();} 1620 incRuleLevel(); 1621 dbg.location(377, 1); 1622 1623 try { 1624 if ( state.backtracking>0 && alreadyParsedRule(input, 10) ) { return ; } 1625 // src/com/google/doclava/parser/Java.g:378:5: ( modifiers 'class' IDENTIFIER ( typeParameters )? ( 'extends' type )? ( 'implements' typeList )? classBody ) 1626 dbg.enterAlt(1); 1627 1628 // src/com/google/doclava/parser/Java.g:378:9: modifiers 'class' IDENTIFIER ( typeParameters )? ( 'extends' type )? ( 'implements' typeList )? classBody 1629 { 1630 dbg.location(378,9); 1631 pushFollow(FOLLOW_modifiers_in_normalClassDeclaration688); 1632 modifiers(); 1633 1634 state._fsp--; 1635 if (state.failed) return ; 1636 dbg.location(378,20); 1637 match(input,CLASS,FOLLOW_CLASS_in_normalClassDeclaration691); if (state.failed) return ; 1638 dbg.location(378,28); 1639 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_normalClassDeclaration693); if (state.failed) return ; 1640 dbg.location(379,9); 1641 // src/com/google/doclava/parser/Java.g:379:9: ( typeParameters )? 1642 int alt16=2; 1643 try { dbg.enterSubRule(16); 1644 try { dbg.enterDecision(16, decisionCanBacktrack[16]); 1645 1646 int LA16_0 = input.LA(1); 1647 1648 if ( (LA16_0==LT) ) { 1649 alt16=1; 1650 } 1651 } finally {dbg.exitDecision(16);} 1652 1653 switch (alt16) { 1654 case 1 : 1655 dbg.enterAlt(1); 1656 1657 // src/com/google/doclava/parser/Java.g:379:10: typeParameters 1658 { 1659 dbg.location(379,10); 1660 pushFollow(FOLLOW_typeParameters_in_normalClassDeclaration704); 1661 typeParameters(); 1662 1663 state._fsp--; 1664 if (state.failed) return ; 1665 1666 } 1667 break; 1668 1669 } 1670 } finally {dbg.exitSubRule(16);} 1671 1672 dbg.location(381,9); 1673 // src/com/google/doclava/parser/Java.g:381:9: ( 'extends' type )? 1674 int alt17=2; 1675 try { dbg.enterSubRule(17); 1676 try { dbg.enterDecision(17, decisionCanBacktrack[17]); 1677 1678 int LA17_0 = input.LA(1); 1679 1680 if ( (LA17_0==EXTENDS) ) { 1681 alt17=1; 1682 } 1683 } finally {dbg.exitDecision(17);} 1684 1685 switch (alt17) { 1686 case 1 : 1687 dbg.enterAlt(1); 1688 1689 // src/com/google/doclava/parser/Java.g:381:10: 'extends' type 1690 { 1691 dbg.location(381,10); 1692 match(input,EXTENDS,FOLLOW_EXTENDS_in_normalClassDeclaration726); if (state.failed) return ; 1693 dbg.location(381,20); 1694 pushFollow(FOLLOW_type_in_normalClassDeclaration728); 1695 type(); 1696 1697 state._fsp--; 1698 if (state.failed) return ; 1699 1700 } 1701 break; 1702 1703 } 1704 } finally {dbg.exitSubRule(17);} 1705 1706 dbg.location(383,9); 1707 // src/com/google/doclava/parser/Java.g:383:9: ( 'implements' typeList )? 1708 int alt18=2; 1709 try { dbg.enterSubRule(18); 1710 try { dbg.enterDecision(18, decisionCanBacktrack[18]); 1711 1712 int LA18_0 = input.LA(1); 1713 1714 if ( (LA18_0==IMPLEMENTS) ) { 1715 alt18=1; 1716 } 1717 } finally {dbg.exitDecision(18);} 1718 1719 switch (alt18) { 1720 case 1 : 1721 dbg.enterAlt(1); 1722 1723 // src/com/google/doclava/parser/Java.g:383:10: 'implements' typeList 1724 { 1725 dbg.location(383,10); 1726 match(input,IMPLEMENTS,FOLLOW_IMPLEMENTS_in_normalClassDeclaration750); if (state.failed) return ; 1727 dbg.location(383,23); 1728 pushFollow(FOLLOW_typeList_in_normalClassDeclaration752); 1729 typeList(); 1730 1731 state._fsp--; 1732 if (state.failed) return ; 1733 1734 } 1735 break; 1736 1737 } 1738 } finally {dbg.exitSubRule(18);} 1739 1740 dbg.location(385,9); 1741 pushFollow(FOLLOW_classBody_in_normalClassDeclaration773); 1742 classBody(); 1743 1744 state._fsp--; 1745 if (state.failed) return ; 1746 1747 } 1748 1749 } 1750 catch (RecognitionException re) { 1751 reportError(re); 1752 recover(input,re); 1753 } 1754 finally { 1755 if ( state.backtracking>0 ) { memoize(input, 10, normalClassDeclaration_StartIndex); } 1756 } 1757 dbg.location(386, 5); 1758 1759 } 1760 finally { 1761 dbg.exitRule(getGrammarFileName(), "normalClassDeclaration"); 1762 decRuleLevel(); 1763 if ( getRuleLevel()==0 ) {dbg.terminate();} 1764 } 1765 1766 return ; 1767 } 1768 // $ANTLR end "normalClassDeclaration" 1769 1770 1771 // $ANTLR start "typeParameters" 1772 // src/com/google/doclava/parser/Java.g:389:1: typeParameters : '<' typeParameter ( ',' typeParameter )* '>' ; 1773 public final void typeParameters() throws RecognitionException { 1774 int typeParameters_StartIndex = input.index(); 1775 try { dbg.enterRule(getGrammarFileName(), "typeParameters"); 1776 if ( getRuleLevel()==0 ) {dbg.commence();} 1777 incRuleLevel(); 1778 dbg.location(389, 1); 1779 1780 try { 1781 if ( state.backtracking>0 && alreadyParsedRule(input, 11) ) { return ; } 1782 // src/com/google/doclava/parser/Java.g:390:5: ( '<' typeParameter ( ',' typeParameter )* '>' ) 1783 dbg.enterAlt(1); 1784 1785 // src/com/google/doclava/parser/Java.g:390:9: '<' typeParameter ( ',' typeParameter )* '>' 1786 { 1787 dbg.location(390,9); 1788 match(input,LT,FOLLOW_LT_in_typeParameters793); if (state.failed) return ; 1789 dbg.location(391,13); 1790 pushFollow(FOLLOW_typeParameter_in_typeParameters807); 1791 typeParameter(); 1792 1793 state._fsp--; 1794 if (state.failed) return ; 1795 dbg.location(392,13); 1796 // src/com/google/doclava/parser/Java.g:392:13: ( ',' typeParameter )* 1797 try { dbg.enterSubRule(19); 1798 1799 loop19: 1800 do { 1801 int alt19=2; 1802 try { dbg.enterDecision(19, decisionCanBacktrack[19]); 1803 1804 int LA19_0 = input.LA(1); 1805 1806 if ( (LA19_0==COMMA) ) { 1807 alt19=1; 1808 } 1809 1810 1811 } finally {dbg.exitDecision(19);} 1812 1813 switch (alt19) { 1814 case 1 : 1815 dbg.enterAlt(1); 1816 1817 // src/com/google/doclava/parser/Java.g:392:14: ',' typeParameter 1818 { 1819 dbg.location(392,14); 1820 match(input,COMMA,FOLLOW_COMMA_in_typeParameters822); if (state.failed) return ; 1821 dbg.location(392,18); 1822 pushFollow(FOLLOW_typeParameter_in_typeParameters824); 1823 typeParameter(); 1824 1825 state._fsp--; 1826 if (state.failed) return ; 1827 1828 } 1829 break; 1830 1831 default : 1832 break loop19; 1833 } 1834 } while (true); 1835 } finally {dbg.exitSubRule(19);} 1836 1837 dbg.location(394,9); 1838 match(input,GT,FOLLOW_GT_in_typeParameters849); if (state.failed) return ; 1839 1840 } 1841 1842 } 1843 catch (RecognitionException re) { 1844 reportError(re); 1845 recover(input,re); 1846 } 1847 finally { 1848 if ( state.backtracking>0 ) { memoize(input, 11, typeParameters_StartIndex); } 1849 } 1850 dbg.location(395, 5); 1851 1852 } 1853 finally { 1854 dbg.exitRule(getGrammarFileName(), "typeParameters"); 1855 decRuleLevel(); 1856 if ( getRuleLevel()==0 ) {dbg.terminate();} 1857 } 1858 1859 return ; 1860 } 1861 // $ANTLR end "typeParameters" 1862 1863 1864 // $ANTLR start "typeParameter" 1865 // src/com/google/doclava/parser/Java.g:397:1: typeParameter : IDENTIFIER ( 'extends' typeBound )? ; 1866 public final void typeParameter() throws RecognitionException { 1867 int typeParameter_StartIndex = input.index(); 1868 try { dbg.enterRule(getGrammarFileName(), "typeParameter"); 1869 if ( getRuleLevel()==0 ) {dbg.commence();} 1870 incRuleLevel(); 1871 dbg.location(397, 1); 1872 1873 try { 1874 if ( state.backtracking>0 && alreadyParsedRule(input, 12) ) { return ; } 1875 // src/com/google/doclava/parser/Java.g:398:5: ( IDENTIFIER ( 'extends' typeBound )? ) 1876 dbg.enterAlt(1); 1877 1878 // src/com/google/doclava/parser/Java.g:398:9: IDENTIFIER ( 'extends' typeBound )? 1879 { 1880 dbg.location(398,9); 1881 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_typeParameter868); if (state.failed) return ; 1882 dbg.location(399,9); 1883 // src/com/google/doclava/parser/Java.g:399:9: ( 'extends' typeBound )? 1884 int alt20=2; 1885 try { dbg.enterSubRule(20); 1886 try { dbg.enterDecision(20, decisionCanBacktrack[20]); 1887 1888 int LA20_0 = input.LA(1); 1889 1890 if ( (LA20_0==EXTENDS) ) { 1891 alt20=1; 1892 } 1893 } finally {dbg.exitDecision(20);} 1894 1895 switch (alt20) { 1896 case 1 : 1897 dbg.enterAlt(1); 1898 1899 // src/com/google/doclava/parser/Java.g:399:10: 'extends' typeBound 1900 { 1901 dbg.location(399,10); 1902 match(input,EXTENDS,FOLLOW_EXTENDS_in_typeParameter879); if (state.failed) return ; 1903 dbg.location(399,20); 1904 pushFollow(FOLLOW_typeBound_in_typeParameter881); 1905 typeBound(); 1906 1907 state._fsp--; 1908 if (state.failed) return ; 1909 1910 } 1911 break; 1912 1913 } 1914 } finally {dbg.exitSubRule(20);} 1915 1916 1917 } 1918 1919 } 1920 catch (RecognitionException re) { 1921 reportError(re); 1922 recover(input,re); 1923 } 1924 finally { 1925 if ( state.backtracking>0 ) { memoize(input, 12, typeParameter_StartIndex); } 1926 } 1927 dbg.location(401, 5); 1928 1929 } 1930 finally { 1931 dbg.exitRule(getGrammarFileName(), "typeParameter"); 1932 decRuleLevel(); 1933 if ( getRuleLevel()==0 ) {dbg.terminate();} 1934 } 1935 1936 return ; 1937 } 1938 // $ANTLR end "typeParameter" 1939 1940 1941 // $ANTLR start "typeBound" 1942 // src/com/google/doclava/parser/Java.g:404:1: typeBound : type ( '&' type )* ; 1943 public final void typeBound() throws RecognitionException { 1944 int typeBound_StartIndex = input.index(); 1945 try { dbg.enterRule(getGrammarFileName(), "typeBound"); 1946 if ( getRuleLevel()==0 ) {dbg.commence();} 1947 incRuleLevel(); 1948 dbg.location(404, 1); 1949 1950 try { 1951 if ( state.backtracking>0 && alreadyParsedRule(input, 13) ) { return ; } 1952 // src/com/google/doclava/parser/Java.g:405:5: ( type ( '&' type )* ) 1953 dbg.enterAlt(1); 1954 1955 // src/com/google/doclava/parser/Java.g:405:9: type ( '&' type )* 1956 { 1957 dbg.location(405,9); 1958 pushFollow(FOLLOW_type_in_typeBound912); 1959 type(); 1960 1961 state._fsp--; 1962 if (state.failed) return ; 1963 dbg.location(406,9); 1964 // src/com/google/doclava/parser/Java.g:406:9: ( '&' type )* 1965 try { dbg.enterSubRule(21); 1966 1967 loop21: 1968 do { 1969 int alt21=2; 1970 try { dbg.enterDecision(21, decisionCanBacktrack[21]); 1971 1972 int LA21_0 = input.LA(1); 1973 1974 if ( (LA21_0==AMP) ) { 1975 alt21=1; 1976 } 1977 1978 1979 } finally {dbg.exitDecision(21);} 1980 1981 switch (alt21) { 1982 case 1 : 1983 dbg.enterAlt(1); 1984 1985 // src/com/google/doclava/parser/Java.g:406:10: '&' type 1986 { 1987 dbg.location(406,10); 1988 match(input,AMP,FOLLOW_AMP_in_typeBound923); if (state.failed) return ; 1989 dbg.location(406,14); 1990 pushFollow(FOLLOW_type_in_typeBound925); 1991 type(); 1992 1993 state._fsp--; 1994 if (state.failed) return ; 1995 1996 } 1997 break; 1998 1999 default : 2000 break loop21; 2001 } 2002 } while (true); 2003 } finally {dbg.exitSubRule(21);} 2004 2005 2006 } 2007 2008 } 2009 catch (RecognitionException re) { 2010 reportError(re); 2011 recover(input,re); 2012 } 2013 finally { 2014 if ( state.backtracking>0 ) { memoize(input, 13, typeBound_StartIndex); } 2015 } 2016 dbg.location(408, 5); 2017 2018 } 2019 finally { 2020 dbg.exitRule(getGrammarFileName(), "typeBound"); 2021 decRuleLevel(); 2022 if ( getRuleLevel()==0 ) {dbg.terminate();} 2023 } 2024 2025 return ; 2026 } 2027 // $ANTLR end "typeBound" 2028 2029 2030 // $ANTLR start "enumDeclaration" 2031 // src/com/google/doclava/parser/Java.g:411:1: enumDeclaration : modifiers ( 'enum' ) IDENTIFIER ( 'implements' typeList )? enumBody ; 2032 public final void enumDeclaration() throws RecognitionException { 2033 int enumDeclaration_StartIndex = input.index(); 2034 try { dbg.enterRule(getGrammarFileName(), "enumDeclaration"); 2035 if ( getRuleLevel()==0 ) {dbg.commence();} 2036 incRuleLevel(); 2037 dbg.location(411, 1); 2038 2039 try { 2040 if ( state.backtracking>0 && alreadyParsedRule(input, 14) ) { return ; } 2041 // src/com/google/doclava/parser/Java.g:412:5: ( modifiers ( 'enum' ) IDENTIFIER ( 'implements' typeList )? enumBody ) 2042 dbg.enterAlt(1); 2043 2044 // src/com/google/doclava/parser/Java.g:412:9: modifiers ( 'enum' ) IDENTIFIER ( 'implements' typeList )? enumBody 2045 { 2046 dbg.location(412,9); 2047 pushFollow(FOLLOW_modifiers_in_enumDeclaration956); 2048 modifiers(); 2049 2050 state._fsp--; 2051 if (state.failed) return ; 2052 dbg.location(413,9); 2053 // src/com/google/doclava/parser/Java.g:413:9: ( 'enum' ) 2054 dbg.enterAlt(1); 2055 2056 // src/com/google/doclava/parser/Java.g:413:10: 'enum' 2057 { 2058 dbg.location(413,10); 2059 match(input,ENUM,FOLLOW_ENUM_in_enumDeclaration967); if (state.failed) return ; 2060 2061 } 2062 2063 dbg.location(415,9); 2064 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_enumDeclaration987); if (state.failed) return ; 2065 dbg.location(416,9); 2066 // src/com/google/doclava/parser/Java.g:416:9: ( 'implements' typeList )? 2067 int alt22=2; 2068 try { dbg.enterSubRule(22); 2069 try { dbg.enterDecision(22, decisionCanBacktrack[22]); 2070 2071 int LA22_0 = input.LA(1); 2072 2073 if ( (LA22_0==IMPLEMENTS) ) { 2074 alt22=1; 2075 } 2076 } finally {dbg.exitDecision(22);} 2077 2078 switch (alt22) { 2079 case 1 : 2080 dbg.enterAlt(1); 2081 2082 // src/com/google/doclava/parser/Java.g:416:10: 'implements' typeList 2083 { 2084 dbg.location(416,10); 2085 match(input,IMPLEMENTS,FOLLOW_IMPLEMENTS_in_enumDeclaration998); if (state.failed) return ; 2086 dbg.location(416,23); 2087 pushFollow(FOLLOW_typeList_in_enumDeclaration1000); 2088 typeList(); 2089 2090 state._fsp--; 2091 if (state.failed) return ; 2092 2093 } 2094 break; 2095 2096 } 2097 } finally {dbg.exitSubRule(22);} 2098 2099 dbg.location(418,9); 2100 pushFollow(FOLLOW_enumBody_in_enumDeclaration1021); 2101 enumBody(); 2102 2103 state._fsp--; 2104 if (state.failed) return ; 2105 2106 } 2107 2108 } 2109 catch (RecognitionException re) { 2110 reportError(re); 2111 recover(input,re); 2112 } 2113 finally { 2114 if ( state.backtracking>0 ) { memoize(input, 14, enumDeclaration_StartIndex); } 2115 } 2116 dbg.location(419, 5); 2117 2118 } 2119 finally { 2120 dbg.exitRule(getGrammarFileName(), "enumDeclaration"); 2121 decRuleLevel(); 2122 if ( getRuleLevel()==0 ) {dbg.terminate();} 2123 } 2124 2125 return ; 2126 } 2127 // $ANTLR end "enumDeclaration" 2128 2129 2130 // $ANTLR start "enumBody" 2131 // src/com/google/doclava/parser/Java.g:422:1: enumBody : '{' ( enumConstants )? ( ',' )? ( enumBodyDeclarations )? '}' ; 2132 public final void enumBody() throws RecognitionException { 2133 int enumBody_StartIndex = input.index(); 2134 try { dbg.enterRule(getGrammarFileName(), "enumBody"); 2135 if ( getRuleLevel()==0 ) {dbg.commence();} 2136 incRuleLevel(); 2137 dbg.location(422, 1); 2138 2139 try { 2140 if ( state.backtracking>0 && alreadyParsedRule(input, 15) ) { return ; } 2141 // src/com/google/doclava/parser/Java.g:423:5: ( '{' ( enumConstants )? ( ',' )? ( enumBodyDeclarations )? '}' ) 2142 dbg.enterAlt(1); 2143 2144 // src/com/google/doclava/parser/Java.g:423:9: '{' ( enumConstants )? ( ',' )? ( enumBodyDeclarations )? '}' 2145 { 2146 dbg.location(423,9); 2147 match(input,LBRACE,FOLLOW_LBRACE_in_enumBody1041); if (state.failed) return ; 2148 dbg.location(424,9); 2149 // src/com/google/doclava/parser/Java.g:424:9: ( enumConstants )? 2150 int alt23=2; 2151 try { dbg.enterSubRule(23); 2152 try { dbg.enterDecision(23, decisionCanBacktrack[23]); 2153 2154 int LA23_0 = input.LA(1); 2155 2156 if ( (LA23_0==IDENTIFIER||LA23_0==MONKEYS_AT) ) { 2157 alt23=1; 2158 } 2159 } finally {dbg.exitDecision(23);} 2160 2161 switch (alt23) { 2162 case 1 : 2163 dbg.enterAlt(1); 2164 2165 // src/com/google/doclava/parser/Java.g:424:10: enumConstants 2166 { 2167 dbg.location(424,10); 2168 pushFollow(FOLLOW_enumConstants_in_enumBody1052); 2169 enumConstants(); 2170 2171 state._fsp--; 2172 if (state.failed) return ; 2173 2174 } 2175 break; 2176 2177 } 2178 } finally {dbg.exitSubRule(23);} 2179 2180 dbg.location(426,9); 2181 // src/com/google/doclava/parser/Java.g:426:9: ( ',' )? 2182 int alt24=2; 2183 try { dbg.enterSubRule(24); 2184 try { dbg.enterDecision(24, decisionCanBacktrack[24]); 2185 2186 int LA24_0 = input.LA(1); 2187 2188 if ( (LA24_0==COMMA) ) { 2189 alt24=1; 2190 } 2191 } finally {dbg.exitDecision(24);} 2192 2193 switch (alt24) { 2194 case 1 : 2195 dbg.enterAlt(1); 2196 2197 // src/com/google/doclava/parser/Java.g:0:0: ',' 2198 { 2199 dbg.location(426,9); 2200 match(input,COMMA,FOLLOW_COMMA_in_enumBody1073); if (state.failed) return ; 2201 2202 } 2203 break; 2204 2205 } 2206 } finally {dbg.exitSubRule(24);} 2207 2208 dbg.location(427,9); 2209 // src/com/google/doclava/parser/Java.g:427:9: ( enumBodyDeclarations )? 2210 int alt25=2; 2211 try { dbg.enterSubRule(25); 2212 try { dbg.enterDecision(25, decisionCanBacktrack[25]); 2213 2214 int LA25_0 = input.LA(1); 2215 2216 if ( (LA25_0==SEMI) ) { 2217 alt25=1; 2218 } 2219 } finally {dbg.exitDecision(25);} 2220 2221 switch (alt25) { 2222 case 1 : 2223 dbg.enterAlt(1); 2224 2225 // src/com/google/doclava/parser/Java.g:427:10: enumBodyDeclarations 2226 { 2227 dbg.location(427,10); 2228 pushFollow(FOLLOW_enumBodyDeclarations_in_enumBody1085); 2229 enumBodyDeclarations(); 2230 2231 state._fsp--; 2232 if (state.failed) return ; 2233 2234 } 2235 break; 2236 2237 } 2238 } finally {dbg.exitSubRule(25);} 2239 2240 dbg.location(429,9); 2241 match(input,RBRACE,FOLLOW_RBRACE_in_enumBody1106); if (state.failed) return ; 2242 2243 } 2244 2245 } 2246 catch (RecognitionException re) { 2247 reportError(re); 2248 recover(input,re); 2249 } 2250 finally { 2251 if ( state.backtracking>0 ) { memoize(input, 15, enumBody_StartIndex); } 2252 } 2253 dbg.location(430, 5); 2254 2255 } 2256 finally { 2257 dbg.exitRule(getGrammarFileName(), "enumBody"); 2258 decRuleLevel(); 2259 if ( getRuleLevel()==0 ) {dbg.terminate();} 2260 } 2261 2262 return ; 2263 } 2264 // $ANTLR end "enumBody" 2265 2266 2267 // $ANTLR start "enumConstants" 2268 // src/com/google/doclava/parser/Java.g:432:1: enumConstants : enumConstant ( ',' enumConstant )* ; 2269 public final void enumConstants() throws RecognitionException { 2270 int enumConstants_StartIndex = input.index(); 2271 try { dbg.enterRule(getGrammarFileName(), "enumConstants"); 2272 if ( getRuleLevel()==0 ) {dbg.commence();} 2273 incRuleLevel(); 2274 dbg.location(432, 1); 2275 2276 try { 2277 if ( state.backtracking>0 && alreadyParsedRule(input, 16) ) { return ; } 2278 // src/com/google/doclava/parser/Java.g:433:5: ( enumConstant ( ',' enumConstant )* ) 2279 dbg.enterAlt(1); 2280 2281 // src/com/google/doclava/parser/Java.g:433:9: enumConstant ( ',' enumConstant )* 2282 { 2283 dbg.location(433,9); 2284 pushFollow(FOLLOW_enumConstant_in_enumConstants1125); 2285 enumConstant(); 2286 2287 state._fsp--; 2288 if (state.failed) return ; 2289 dbg.location(434,9); 2290 // src/com/google/doclava/parser/Java.g:434:9: ( ',' enumConstant )* 2291 try { dbg.enterSubRule(26); 2292 2293 loop26: 2294 do { 2295 int alt26=2; 2296 try { dbg.enterDecision(26, decisionCanBacktrack[26]); 2297 2298 int LA26_0 = input.LA(1); 2299 2300 if ( (LA26_0==COMMA) ) { 2301 int LA26_1 = input.LA(2); 2302 2303 if ( (LA26_1==IDENTIFIER||LA26_1==MONKEYS_AT) ) { 2304 alt26=1; 2305 } 2306 2307 2308 } 2309 2310 2311 } finally {dbg.exitDecision(26);} 2312 2313 switch (alt26) { 2314 case 1 : 2315 dbg.enterAlt(1); 2316 2317 // src/com/google/doclava/parser/Java.g:434:10: ',' enumConstant 2318 { 2319 dbg.location(434,10); 2320 match(input,COMMA,FOLLOW_COMMA_in_enumConstants1136); if (state.failed) return ; 2321 dbg.location(434,14); 2322 pushFollow(FOLLOW_enumConstant_in_enumConstants1138); 2323 enumConstant(); 2324 2325 state._fsp--; 2326 if (state.failed) return ; 2327 2328 } 2329 break; 2330 2331 default : 2332 break loop26; 2333 } 2334 } while (true); 2335 } finally {dbg.exitSubRule(26);} 2336 2337 2338 } 2339 2340 } 2341 catch (RecognitionException re) { 2342 reportError(re); 2343 recover(input,re); 2344 } 2345 finally { 2346 if ( state.backtracking>0 ) { memoize(input, 16, enumConstants_StartIndex); } 2347 } 2348 dbg.location(436, 5); 2349 2350 } 2351 finally { 2352 dbg.exitRule(getGrammarFileName(), "enumConstants"); 2353 decRuleLevel(); 2354 if ( getRuleLevel()==0 ) {dbg.terminate();} 2355 } 2356 2357 return ; 2358 } 2359 // $ANTLR end "enumConstants" 2360 2361 2362 // $ANTLR start "enumConstant" 2363 // src/com/google/doclava/parser/Java.g:438:1: enumConstant : ( annotations )? IDENTIFIER ( arguments )? ( classBody )? ; 2364 public final void enumConstant() throws RecognitionException { 2365 int enumConstant_StartIndex = input.index(); 2366 try { dbg.enterRule(getGrammarFileName(), "enumConstant"); 2367 if ( getRuleLevel()==0 ) {dbg.commence();} 2368 incRuleLevel(); 2369 dbg.location(438, 1); 2370 2371 try { 2372 if ( state.backtracking>0 && alreadyParsedRule(input, 17) ) { return ; } 2373 // src/com/google/doclava/parser/Java.g:443:5: ( ( annotations )? IDENTIFIER ( arguments )? ( classBody )? ) 2374 dbg.enterAlt(1); 2375 2376 // src/com/google/doclava/parser/Java.g:443:9: ( annotations )? IDENTIFIER ( arguments )? ( classBody )? 2377 { 2378 dbg.location(443,9); 2379 // src/com/google/doclava/parser/Java.g:443:9: ( annotations )? 2380 int alt27=2; 2381 try { dbg.enterSubRule(27); 2382 try { dbg.enterDecision(27, decisionCanBacktrack[27]); 2383 2384 int LA27_0 = input.LA(1); 2385 2386 if ( (LA27_0==MONKEYS_AT) ) { 2387 alt27=1; 2388 } 2389 } finally {dbg.exitDecision(27);} 2390 2391 switch (alt27) { 2392 case 1 : 2393 dbg.enterAlt(1); 2394 2395 // src/com/google/doclava/parser/Java.g:443:10: annotations 2396 { 2397 dbg.location(443,10); 2398 pushFollow(FOLLOW_annotations_in_enumConstant1171); 2399 annotations(); 2400 2401 state._fsp--; 2402 if (state.failed) return ; 2403 2404 } 2405 break; 2406 2407 } 2408 } finally {dbg.exitSubRule(27);} 2409 2410 dbg.location(445,9); 2411 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_enumConstant1192); if (state.failed) return ; 2412 dbg.location(446,9); 2413 // src/com/google/doclava/parser/Java.g:446:9: ( arguments )? 2414 int alt28=2; 2415 try { dbg.enterSubRule(28); 2416 try { dbg.enterDecision(28, decisionCanBacktrack[28]); 2417 2418 int LA28_0 = input.LA(1); 2419 2420 if ( (LA28_0==LPAREN) ) { 2421 alt28=1; 2422 } 2423 } finally {dbg.exitDecision(28);} 2424 2425 switch (alt28) { 2426 case 1 : 2427 dbg.enterAlt(1); 2428 2429 // src/com/google/doclava/parser/Java.g:446:10: arguments 2430 { 2431 dbg.location(446,10); 2432 pushFollow(FOLLOW_arguments_in_enumConstant1203); 2433 arguments(); 2434 2435 state._fsp--; 2436 if (state.failed) return ; 2437 2438 } 2439 break; 2440 2441 } 2442 } finally {dbg.exitSubRule(28);} 2443 2444 dbg.location(448,9); 2445 // src/com/google/doclava/parser/Java.g:448:9: ( classBody )? 2446 int alt29=2; 2447 try { dbg.enterSubRule(29); 2448 try { dbg.enterDecision(29, decisionCanBacktrack[29]); 2449 2450 int LA29_0 = input.LA(1); 2451 2452 if ( (LA29_0==LBRACE) ) { 2453 alt29=1; 2454 } 2455 } finally {dbg.exitDecision(29);} 2456 2457 switch (alt29) { 2458 case 1 : 2459 dbg.enterAlt(1); 2460 2461 // src/com/google/doclava/parser/Java.g:448:10: classBody 2462 { 2463 dbg.location(448,10); 2464 pushFollow(FOLLOW_classBody_in_enumConstant1225); 2465 classBody(); 2466 2467 state._fsp--; 2468 if (state.failed) return ; 2469 2470 } 2471 break; 2472 2473 } 2474 } finally {dbg.exitSubRule(29);} 2475 2476 2477 } 2478 2479 } 2480 catch (RecognitionException re) { 2481 reportError(re); 2482 recover(input,re); 2483 } 2484 finally { 2485 if ( state.backtracking>0 ) { memoize(input, 17, enumConstant_StartIndex); } 2486 } 2487 dbg.location(452, 5); 2488 2489 } 2490 finally { 2491 dbg.exitRule(getGrammarFileName(), "enumConstant"); 2492 decRuleLevel(); 2493 if ( getRuleLevel()==0 ) {dbg.terminate();} 2494 } 2495 2496 return ; 2497 } 2498 // $ANTLR end "enumConstant" 2499 2500 2501 // $ANTLR start "enumBodyDeclarations" 2502 // src/com/google/doclava/parser/Java.g:454:1: enumBodyDeclarations : ';' ( classBodyDeclaration )* ; 2503 public final void enumBodyDeclarations() throws RecognitionException { 2504 int enumBodyDeclarations_StartIndex = input.index(); 2505 try { dbg.enterRule(getGrammarFileName(), "enumBodyDeclarations"); 2506 if ( getRuleLevel()==0 ) {dbg.commence();} 2507 incRuleLevel(); 2508 dbg.location(454, 1); 2509 2510 try { 2511 if ( state.backtracking>0 && alreadyParsedRule(input, 18) ) { return ; } 2512 // src/com/google/doclava/parser/Java.g:455:5: ( ';' ( classBodyDeclaration )* ) 2513 dbg.enterAlt(1); 2514 2515 // src/com/google/doclava/parser/Java.g:455:9: ';' ( classBodyDeclaration )* 2516 { 2517 dbg.location(455,9); 2518 match(input,SEMI,FOLLOW_SEMI_in_enumBodyDeclarations1265); if (state.failed) return ; 2519 dbg.location(456,9); 2520 // src/com/google/doclava/parser/Java.g:456:9: ( classBodyDeclaration )* 2521 try { dbg.enterSubRule(30); 2522 2523 loop30: 2524 do { 2525 int alt30=2; 2526 try { dbg.enterDecision(30, decisionCanBacktrack[30]); 2527 2528 int LA30_0 = input.LA(1); 2529 2530 if ( (LA30_0==IDENTIFIER||LA30_0==ABSTRACT||LA30_0==BOOLEAN||LA30_0==BYTE||(LA30_0>=CHAR && LA30_0<=CLASS)||LA30_0==DOUBLE||LA30_0==ENUM||LA30_0==FINAL||LA30_0==FLOAT||(LA30_0>=INT && LA30_0<=NATIVE)||(LA30_0>=PRIVATE && LA30_0<=PUBLIC)||(LA30_0>=SHORT && LA30_0<=STRICTFP)||LA30_0==SYNCHRONIZED||LA30_0==TRANSIENT||(LA30_0>=VOID && LA30_0<=VOLATILE)||LA30_0==LBRACE||LA30_0==SEMI||LA30_0==MONKEYS_AT||LA30_0==LT) ) { 2531 alt30=1; 2532 } 2533 2534 2535 } finally {dbg.exitDecision(30);} 2536 2537 switch (alt30) { 2538 case 1 : 2539 dbg.enterAlt(1); 2540 2541 // src/com/google/doclava/parser/Java.g:456:10: classBodyDeclaration 2542 { 2543 dbg.location(456,10); 2544 pushFollow(FOLLOW_classBodyDeclaration_in_enumBodyDeclarations1276); 2545 classBodyDeclaration(); 2546 2547 state._fsp--; 2548 if (state.failed) return ; 2549 2550 } 2551 break; 2552 2553 default : 2554 break loop30; 2555 } 2556 } while (true); 2557 } finally {dbg.exitSubRule(30);} 2558 2559 2560 } 2561 2562 } 2563 catch (RecognitionException re) { 2564 reportError(re); 2565 recover(input,re); 2566 } 2567 finally { 2568 if ( state.backtracking>0 ) { memoize(input, 18, enumBodyDeclarations_StartIndex); } 2569 } 2570 dbg.location(458, 5); 2571 2572 } 2573 finally { 2574 dbg.exitRule(getGrammarFileName(), "enumBodyDeclarations"); 2575 decRuleLevel(); 2576 if ( getRuleLevel()==0 ) {dbg.terminate();} 2577 } 2578 2579 return ; 2580 } 2581 // $ANTLR end "enumBodyDeclarations" 2582 2583 2584 // $ANTLR start "interfaceDeclaration" 2585 // src/com/google/doclava/parser/Java.g:460:1: interfaceDeclaration : ( normalInterfaceDeclaration | annotationTypeDeclaration ); 2586 public final void interfaceDeclaration() throws RecognitionException { 2587 int interfaceDeclaration_StartIndex = input.index(); 2588 try { dbg.enterRule(getGrammarFileName(), "interfaceDeclaration"); 2589 if ( getRuleLevel()==0 ) {dbg.commence();} 2590 incRuleLevel(); 2591 dbg.location(460, 1); 2592 2593 try { 2594 if ( state.backtracking>0 && alreadyParsedRule(input, 19) ) { return ; } 2595 // src/com/google/doclava/parser/Java.g:461:5: ( normalInterfaceDeclaration | annotationTypeDeclaration ) 2596 int alt31=2; 2597 try { dbg.enterDecision(31, decisionCanBacktrack[31]); 2598 2599 try { 2600 isCyclicDecision = true; 2601 alt31 = dfa31.predict(input); 2602 } 2603 catch (NoViableAltException nvae) { 2604 dbg.recognitionException(nvae); 2605 throw nvae; 2606 } 2607 } finally {dbg.exitDecision(31);} 2608 2609 switch (alt31) { 2610 case 1 : 2611 dbg.enterAlt(1); 2612 2613 // src/com/google/doclava/parser/Java.g:461:9: normalInterfaceDeclaration 2614 { 2615 dbg.location(461,9); 2616 pushFollow(FOLLOW_normalInterfaceDeclaration_in_interfaceDeclaration1306); 2617 normalInterfaceDeclaration(); 2618 2619 state._fsp--; 2620 if (state.failed) return ; 2621 2622 } 2623 break; 2624 case 2 : 2625 dbg.enterAlt(2); 2626 2627 // src/com/google/doclava/parser/Java.g:462:9: annotationTypeDeclaration 2628 { 2629 dbg.location(462,9); 2630 pushFollow(FOLLOW_annotationTypeDeclaration_in_interfaceDeclaration1316); 2631 annotationTypeDeclaration(); 2632 2633 state._fsp--; 2634 if (state.failed) return ; 2635 2636 } 2637 break; 2638 2639 } 2640 } 2641 catch (RecognitionException re) { 2642 reportError(re); 2643 recover(input,re); 2644 } 2645 finally { 2646 if ( state.backtracking>0 ) { memoize(input, 19, interfaceDeclaration_StartIndex); } 2647 } 2648 dbg.location(463, 5); 2649 2650 } 2651 finally { 2652 dbg.exitRule(getGrammarFileName(), "interfaceDeclaration"); 2653 decRuleLevel(); 2654 if ( getRuleLevel()==0 ) {dbg.terminate();} 2655 } 2656 2657 return ; 2658 } 2659 // $ANTLR end "interfaceDeclaration" 2660 2661 2662 // $ANTLR start "normalInterfaceDeclaration" 2663 // src/com/google/doclava/parser/Java.g:465:1: normalInterfaceDeclaration : modifiers 'interface' IDENTIFIER ( typeParameters )? ( 'extends' typeList )? interfaceBody ; 2664 public final void normalInterfaceDeclaration() throws RecognitionException { 2665 int normalInterfaceDeclaration_StartIndex = input.index(); 2666 try { dbg.enterRule(getGrammarFileName(), "normalInterfaceDeclaration"); 2667 if ( getRuleLevel()==0 ) {dbg.commence();} 2668 incRuleLevel(); 2669 dbg.location(465, 1); 2670 2671 try { 2672 if ( state.backtracking>0 && alreadyParsedRule(input, 20) ) { return ; } 2673 // src/com/google/doclava/parser/Java.g:466:5: ( modifiers 'interface' IDENTIFIER ( typeParameters )? ( 'extends' typeList )? interfaceBody ) 2674 dbg.enterAlt(1); 2675 2676 // src/com/google/doclava/parser/Java.g:466:9: modifiers 'interface' IDENTIFIER ( typeParameters )? ( 'extends' typeList )? interfaceBody 2677 { 2678 dbg.location(466,9); 2679 pushFollow(FOLLOW_modifiers_in_normalInterfaceDeclaration1335); 2680 modifiers(); 2681 2682 state._fsp--; 2683 if (state.failed) return ; 2684 dbg.location(466,19); 2685 match(input,INTERFACE,FOLLOW_INTERFACE_in_normalInterfaceDeclaration1337); if (state.failed) return ; 2686 dbg.location(466,31); 2687 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_normalInterfaceDeclaration1339); if (state.failed) return ; 2688 dbg.location(467,9); 2689 // src/com/google/doclava/parser/Java.g:467:9: ( typeParameters )? 2690 int alt32=2; 2691 try { dbg.enterSubRule(32); 2692 try { dbg.enterDecision(32, decisionCanBacktrack[32]); 2693 2694 int LA32_0 = input.LA(1); 2695 2696 if ( (LA32_0==LT) ) { 2697 alt32=1; 2698 } 2699 } finally {dbg.exitDecision(32);} 2700 2701 switch (alt32) { 2702 case 1 : 2703 dbg.enterAlt(1); 2704 2705 // src/com/google/doclava/parser/Java.g:467:10: typeParameters 2706 { 2707 dbg.location(467,10); 2708 pushFollow(FOLLOW_typeParameters_in_normalInterfaceDeclaration1350); 2709 typeParameters(); 2710 2711 state._fsp--; 2712 if (state.failed) return ; 2713 2714 } 2715 break; 2716 2717 } 2718 } finally {dbg.exitSubRule(32);} 2719 2720 dbg.location(469,9); 2721 // src/com/google/doclava/parser/Java.g:469:9: ( 'extends' typeList )? 2722 int alt33=2; 2723 try { dbg.enterSubRule(33); 2724 try { dbg.enterDecision(33, decisionCanBacktrack[33]); 2725 2726 int LA33_0 = input.LA(1); 2727 2728 if ( (LA33_0==EXTENDS) ) { 2729 alt33=1; 2730 } 2731 } finally {dbg.exitDecision(33);} 2732 2733 switch (alt33) { 2734 case 1 : 2735 dbg.enterAlt(1); 2736 2737 // src/com/google/doclava/parser/Java.g:469:10: 'extends' typeList 2738 { 2739 dbg.location(469,10); 2740 match(input,EXTENDS,FOLLOW_EXTENDS_in_normalInterfaceDeclaration1372); if (state.failed) return ; 2741 dbg.location(469,20); 2742 pushFollow(FOLLOW_typeList_in_normalInterfaceDeclaration1374); 2743 typeList(); 2744 2745 state._fsp--; 2746 if (state.failed) return ; 2747 2748 } 2749 break; 2750 2751 } 2752 } finally {dbg.exitSubRule(33);} 2753 2754 dbg.location(471,9); 2755 pushFollow(FOLLOW_interfaceBody_in_normalInterfaceDeclaration1395); 2756 interfaceBody(); 2757 2758 state._fsp--; 2759 if (state.failed) return ; 2760 2761 } 2762 2763 } 2764 catch (RecognitionException re) { 2765 reportError(re); 2766 recover(input,re); 2767 } 2768 finally { 2769 if ( state.backtracking>0 ) { memoize(input, 20, normalInterfaceDeclaration_StartIndex); } 2770 } 2771 dbg.location(472, 5); 2772 2773 } 2774 finally { 2775 dbg.exitRule(getGrammarFileName(), "normalInterfaceDeclaration"); 2776 decRuleLevel(); 2777 if ( getRuleLevel()==0 ) {dbg.terminate();} 2778 } 2779 2780 return ; 2781 } 2782 // $ANTLR end "normalInterfaceDeclaration" 2783 2784 2785 // $ANTLR start "typeList" 2786 // src/com/google/doclava/parser/Java.g:474:1: typeList : type ( ',' type )* ; 2787 public final void typeList() throws RecognitionException { 2788 int typeList_StartIndex = input.index(); 2789 try { dbg.enterRule(getGrammarFileName(), "typeList"); 2790 if ( getRuleLevel()==0 ) {dbg.commence();} 2791 incRuleLevel(); 2792 dbg.location(474, 1); 2793 2794 try { 2795 if ( state.backtracking>0 && alreadyParsedRule(input, 21) ) { return ; } 2796 // src/com/google/doclava/parser/Java.g:475:5: ( type ( ',' type )* ) 2797 dbg.enterAlt(1); 2798 2799 // src/com/google/doclava/parser/Java.g:475:9: type ( ',' type )* 2800 { 2801 dbg.location(475,9); 2802 pushFollow(FOLLOW_type_in_typeList1414); 2803 type(); 2804 2805 state._fsp--; 2806 if (state.failed) return ; 2807 dbg.location(476,9); 2808 // src/com/google/doclava/parser/Java.g:476:9: ( ',' type )* 2809 try { dbg.enterSubRule(34); 2810 2811 loop34: 2812 do { 2813 int alt34=2; 2814 try { dbg.enterDecision(34, decisionCanBacktrack[34]); 2815 2816 int LA34_0 = input.LA(1); 2817 2818 if ( (LA34_0==COMMA) ) { 2819 alt34=1; 2820 } 2821 2822 2823 } finally {dbg.exitDecision(34);} 2824 2825 switch (alt34) { 2826 case 1 : 2827 dbg.enterAlt(1); 2828 2829 // src/com/google/doclava/parser/Java.g:476:10: ',' type 2830 { 2831 dbg.location(476,10); 2832 match(input,COMMA,FOLLOW_COMMA_in_typeList1425); if (state.failed) return ; 2833 dbg.location(476,14); 2834 pushFollow(FOLLOW_type_in_typeList1427); 2835 type(); 2836 2837 state._fsp--; 2838 if (state.failed) return ; 2839 2840 } 2841 break; 2842 2843 default : 2844 break loop34; 2845 } 2846 } while (true); 2847 } finally {dbg.exitSubRule(34);} 2848 2849 2850 } 2851 2852 } 2853 catch (RecognitionException re) { 2854 reportError(re); 2855 recover(input,re); 2856 } 2857 finally { 2858 if ( state.backtracking>0 ) { memoize(input, 21, typeList_StartIndex); } 2859 } 2860 dbg.location(478, 5); 2861 2862 } 2863 finally { 2864 dbg.exitRule(getGrammarFileName(), "typeList"); 2865 decRuleLevel(); 2866 if ( getRuleLevel()==0 ) {dbg.terminate();} 2867 } 2868 2869 return ; 2870 } 2871 // $ANTLR end "typeList" 2872 2873 2874 // $ANTLR start "classBody" 2875 // src/com/google/doclava/parser/Java.g:480:1: classBody : '{' ( classBodyDeclaration )* '}' ; 2876 public final void classBody() throws RecognitionException { 2877 int classBody_StartIndex = input.index(); 2878 try { dbg.enterRule(getGrammarFileName(), "classBody"); 2879 if ( getRuleLevel()==0 ) {dbg.commence();} 2880 incRuleLevel(); 2881 dbg.location(480, 1); 2882 2883 try { 2884 if ( state.backtracking>0 && alreadyParsedRule(input, 22) ) { return ; } 2885 // src/com/google/doclava/parser/Java.g:481:5: ( '{' ( classBodyDeclaration )* '}' ) 2886 dbg.enterAlt(1); 2887 2888 // src/com/google/doclava/parser/Java.g:481:9: '{' ( classBodyDeclaration )* '}' 2889 { 2890 dbg.location(481,9); 2891 match(input,LBRACE,FOLLOW_LBRACE_in_classBody1457); if (state.failed) return ; 2892 dbg.location(482,9); 2893 // src/com/google/doclava/parser/Java.g:482:9: ( classBodyDeclaration )* 2894 try { dbg.enterSubRule(35); 2895 2896 loop35: 2897 do { 2898 int alt35=2; 2899 try { dbg.enterDecision(35, decisionCanBacktrack[35]); 2900 2901 int LA35_0 = input.LA(1); 2902 2903 if ( (LA35_0==IDENTIFIER||LA35_0==ABSTRACT||LA35_0==BOOLEAN||LA35_0==BYTE||(LA35_0>=CHAR && LA35_0<=CLASS)||LA35_0==DOUBLE||LA35_0==ENUM||LA35_0==FINAL||LA35_0==FLOAT||(LA35_0>=INT && LA35_0<=NATIVE)||(LA35_0>=PRIVATE && LA35_0<=PUBLIC)||(LA35_0>=SHORT && LA35_0<=STRICTFP)||LA35_0==SYNCHRONIZED||LA35_0==TRANSIENT||(LA35_0>=VOID && LA35_0<=VOLATILE)||LA35_0==LBRACE||LA35_0==SEMI||LA35_0==MONKEYS_AT||LA35_0==LT) ) { 2904 alt35=1; 2905 } 2906 2907 2908 } finally {dbg.exitDecision(35);} 2909 2910 switch (alt35) { 2911 case 1 : 2912 dbg.enterAlt(1); 2913 2914 // src/com/google/doclava/parser/Java.g:482:10: classBodyDeclaration 2915 { 2916 dbg.location(482,10); 2917 pushFollow(FOLLOW_classBodyDeclaration_in_classBody1468); 2918 classBodyDeclaration(); 2919 2920 state._fsp--; 2921 if (state.failed) return ; 2922 2923 } 2924 break; 2925 2926 default : 2927 break loop35; 2928 } 2929 } while (true); 2930 } finally {dbg.exitSubRule(35);} 2931 2932 dbg.location(484,9); 2933 match(input,RBRACE,FOLLOW_RBRACE_in_classBody1489); if (state.failed) return ; 2934 2935 } 2936 2937 } 2938 catch (RecognitionException re) { 2939 reportError(re); 2940 recover(input,re); 2941 } 2942 finally { 2943 if ( state.backtracking>0 ) { memoize(input, 22, classBody_StartIndex); } 2944 } 2945 dbg.location(485, 5); 2946 2947 } 2948 finally { 2949 dbg.exitRule(getGrammarFileName(), "classBody"); 2950 decRuleLevel(); 2951 if ( getRuleLevel()==0 ) {dbg.terminate();} 2952 } 2953 2954 return ; 2955 } 2956 // $ANTLR end "classBody" 2957 2958 2959 // $ANTLR start "interfaceBody" 2960 // src/com/google/doclava/parser/Java.g:487:1: interfaceBody : '{' ( interfaceBodyDeclaration )* '}' ; 2961 public final void interfaceBody() throws RecognitionException { 2962 int interfaceBody_StartIndex = input.index(); 2963 try { dbg.enterRule(getGrammarFileName(), "interfaceBody"); 2964 if ( getRuleLevel()==0 ) {dbg.commence();} 2965 incRuleLevel(); 2966 dbg.location(487, 1); 2967 2968 try { 2969 if ( state.backtracking>0 && alreadyParsedRule(input, 23) ) { return ; } 2970 // src/com/google/doclava/parser/Java.g:488:5: ( '{' ( interfaceBodyDeclaration )* '}' ) 2971 dbg.enterAlt(1); 2972 2973 // src/com/google/doclava/parser/Java.g:488:9: '{' ( interfaceBodyDeclaration )* '}' 2974 { 2975 dbg.location(488,9); 2976 match(input,LBRACE,FOLLOW_LBRACE_in_interfaceBody1508); if (state.failed) return ; 2977 dbg.location(489,9); 2978 // src/com/google/doclava/parser/Java.g:489:9: ( interfaceBodyDeclaration )* 2979 try { dbg.enterSubRule(36); 2980 2981 loop36: 2982 do { 2983 int alt36=2; 2984 try { dbg.enterDecision(36, decisionCanBacktrack[36]); 2985 2986 int LA36_0 = input.LA(1); 2987 2988 if ( (LA36_0==IDENTIFIER||LA36_0==ABSTRACT||LA36_0==BOOLEAN||LA36_0==BYTE||(LA36_0>=CHAR && LA36_0<=CLASS)||LA36_0==DOUBLE||LA36_0==ENUM||LA36_0==FINAL||LA36_0==FLOAT||(LA36_0>=INT && LA36_0<=NATIVE)||(LA36_0>=PRIVATE && LA36_0<=PUBLIC)||(LA36_0>=SHORT && LA36_0<=STRICTFP)||LA36_0==SYNCHRONIZED||LA36_0==TRANSIENT||(LA36_0>=VOID && LA36_0<=VOLATILE)||LA36_0==SEMI||LA36_0==MONKEYS_AT||LA36_0==LT) ) { 2989 alt36=1; 2990 } 2991 2992 2993 } finally {dbg.exitDecision(36);} 2994 2995 switch (alt36) { 2996 case 1 : 2997 dbg.enterAlt(1); 2998 2999 // src/com/google/doclava/parser/Java.g:489:10: interfaceBodyDeclaration 3000 { 3001 dbg.location(489,10); 3002 pushFollow(FOLLOW_interfaceBodyDeclaration_in_interfaceBody1519); 3003 interfaceBodyDeclaration(); 3004 3005 state._fsp--; 3006 if (state.failed) return ; 3007 3008 } 3009 break; 3010 3011 default : 3012 break loop36; 3013 } 3014 } while (true); 3015 } finally {dbg.exitSubRule(36);} 3016 3017 dbg.location(491,9); 3018 match(input,RBRACE,FOLLOW_RBRACE_in_interfaceBody1540); if (state.failed) return ; 3019 3020 } 3021 3022 } 3023 catch (RecognitionException re) { 3024 reportError(re); 3025 recover(input,re); 3026 } 3027 finally { 3028 if ( state.backtracking>0 ) { memoize(input, 23, interfaceBody_StartIndex); } 3029 } 3030 dbg.location(492, 5); 3031 3032 } 3033 finally { 3034 dbg.exitRule(getGrammarFileName(), "interfaceBody"); 3035 decRuleLevel(); 3036 if ( getRuleLevel()==0 ) {dbg.terminate();} 3037 } 3038 3039 return ; 3040 } 3041 // $ANTLR end "interfaceBody" 3042 3043 3044 // $ANTLR start "classBodyDeclaration" 3045 // src/com/google/doclava/parser/Java.g:494:1: classBodyDeclaration : ( ';' | ( 'static' )? block | memberDecl ); 3046 public final void classBodyDeclaration() throws RecognitionException { 3047 int classBodyDeclaration_StartIndex = input.index(); 3048 try { dbg.enterRule(getGrammarFileName(), "classBodyDeclaration"); 3049 if ( getRuleLevel()==0 ) {dbg.commence();} 3050 incRuleLevel(); 3051 dbg.location(494, 1); 3052 3053 try { 3054 if ( state.backtracking>0 && alreadyParsedRule(input, 24) ) { return ; } 3055 // src/com/google/doclava/parser/Java.g:495:5: ( ';' | ( 'static' )? block | memberDecl ) 3056 int alt38=3; 3057 try { dbg.enterDecision(38, decisionCanBacktrack[38]); 3058 3059 switch ( input.LA(1) ) { 3060 case SEMI: 3061 { 3062 alt38=1; 3063 } 3064 break; 3065 case STATIC: 3066 { 3067 int LA38_2 = input.LA(2); 3068 3069 if ( (LA38_2==LBRACE) ) { 3070 alt38=2; 3071 } 3072 else if ( (LA38_2==IDENTIFIER||LA38_2==ABSTRACT||LA38_2==BOOLEAN||LA38_2==BYTE||(LA38_2>=CHAR && LA38_2<=CLASS)||LA38_2==DOUBLE||LA38_2==ENUM||LA38_2==FINAL||LA38_2==FLOAT||(LA38_2>=INT && LA38_2<=NATIVE)||(LA38_2>=PRIVATE && LA38_2<=PUBLIC)||(LA38_2>=SHORT && LA38_2<=STRICTFP)||LA38_2==SYNCHRONIZED||LA38_2==TRANSIENT||(LA38_2>=VOID && LA38_2<=VOLATILE)||LA38_2==MONKEYS_AT||LA38_2==LT) ) { 3073 alt38=3; 3074 } 3075 else { 3076 if (state.backtracking>0) {state.failed=true; return ;} 3077 NoViableAltException nvae = 3078 new NoViableAltException("", 38, 2, input); 3079 3080 dbg.recognitionException(nvae); 3081 throw nvae; 3082 } 3083 } 3084 break; 3085 case LBRACE: 3086 { 3087 alt38=2; 3088 } 3089 break; 3090 case IDENTIFIER: 3091 case ABSTRACT: 3092 case BOOLEAN: 3093 case BYTE: 3094 case CHAR: 3095 case CLASS: 3096 case DOUBLE: 3097 case ENUM: 3098 case FINAL: 3099 case FLOAT: 3100 case INT: 3101 case INTERFACE: 3102 case LONG: 3103 case NATIVE: 3104 case PRIVATE: 3105 case PROTECTED: 3106 case PUBLIC: 3107 case SHORT: 3108 case STRICTFP: 3109 case SYNCHRONIZED: 3110 case TRANSIENT: 3111 case VOID: 3112 case VOLATILE: 3113 case MONKEYS_AT: 3114 case LT: 3115 { 3116 alt38=3; 3117 } 3118 break; 3119 default: 3120 if (state.backtracking>0) {state.failed=true; return ;} 3121 NoViableAltException nvae = 3122 new NoViableAltException("", 38, 0, input); 3123 3124 dbg.recognitionException(nvae); 3125 throw nvae; 3126 } 3127 3128 } finally {dbg.exitDecision(38);} 3129 3130 switch (alt38) { 3131 case 1 : 3132 dbg.enterAlt(1); 3133 3134 // src/com/google/doclava/parser/Java.g:495:9: ';' 3135 { 3136 dbg.location(495,9); 3137 match(input,SEMI,FOLLOW_SEMI_in_classBodyDeclaration1559); if (state.failed) return ; 3138 3139 } 3140 break; 3141 case 2 : 3142 dbg.enterAlt(2); 3143 3144 // src/com/google/doclava/parser/Java.g:496:9: ( 'static' )? block 3145 { 3146 dbg.location(496,9); 3147 // src/com/google/doclava/parser/Java.g:496:9: ( 'static' )? 3148 int alt37=2; 3149 try { dbg.enterSubRule(37); 3150 try { dbg.enterDecision(37, decisionCanBacktrack[37]); 3151 3152 int LA37_0 = input.LA(1); 3153 3154 if ( (LA37_0==STATIC) ) { 3155 alt37=1; 3156 } 3157 } finally {dbg.exitDecision(37);} 3158 3159 switch (alt37) { 3160 case 1 : 3161 dbg.enterAlt(1); 3162 3163 // src/com/google/doclava/parser/Java.g:496:10: 'static' 3164 { 3165 dbg.location(496,10); 3166 match(input,STATIC,FOLLOW_STATIC_in_classBodyDeclaration1570); if (state.failed) return ; 3167 3168 } 3169 break; 3170 3171 } 3172 } finally {dbg.exitSubRule(37);} 3173 3174 dbg.location(498,9); 3175 pushFollow(FOLLOW_block_in_classBodyDeclaration1591); 3176 block(); 3177 3178 state._fsp--; 3179 if (state.failed) return ; 3180 3181 } 3182 break; 3183 case 3 : 3184 dbg.enterAlt(3); 3185 3186 // src/com/google/doclava/parser/Java.g:499:9: memberDecl 3187 { 3188 dbg.location(499,9); 3189 pushFollow(FOLLOW_memberDecl_in_classBodyDeclaration1601); 3190 memberDecl(); 3191 3192 state._fsp--; 3193 if (state.failed) return ; 3194 3195 } 3196 break; 3197 3198 } 3199 } 3200 catch (RecognitionException re) { 3201 reportError(re); 3202 recover(input,re); 3203 } 3204 finally { 3205 if ( state.backtracking>0 ) { memoize(input, 24, classBodyDeclaration_StartIndex); } 3206 } 3207 dbg.location(500, 5); 3208 3209 } 3210 finally { 3211 dbg.exitRule(getGrammarFileName(), "classBodyDeclaration"); 3212 decRuleLevel(); 3213 if ( getRuleLevel()==0 ) {dbg.terminate();} 3214 } 3215 3216 return ; 3217 } 3218 // $ANTLR end "classBodyDeclaration" 3219 3220 3221 // $ANTLR start "memberDecl" 3222 // src/com/google/doclava/parser/Java.g:502:1: memberDecl : ( fieldDeclaration | methodDeclaration | classDeclaration | interfaceDeclaration ); 3223 public final void memberDecl() throws RecognitionException { 3224 int memberDecl_StartIndex = input.index(); 3225 try { dbg.enterRule(getGrammarFileName(), "memberDecl"); 3226 if ( getRuleLevel()==0 ) {dbg.commence();} 3227 incRuleLevel(); 3228 dbg.location(502, 1); 3229 3230 try { 3231 if ( state.backtracking>0 && alreadyParsedRule(input, 25) ) { return ; } 3232 // src/com/google/doclava/parser/Java.g:503:5: ( fieldDeclaration | methodDeclaration | classDeclaration | interfaceDeclaration ) 3233 int alt39=4; 3234 try { dbg.enterDecision(39, decisionCanBacktrack[39]); 3235 3236 try { 3237 isCyclicDecision = true; 3238 alt39 = dfa39.predict(input); 3239 } 3240 catch (NoViableAltException nvae) { 3241 dbg.recognitionException(nvae); 3242 throw nvae; 3243 } 3244 } finally {dbg.exitDecision(39);} 3245 3246 switch (alt39) { 3247 case 1 : 3248 dbg.enterAlt(1); 3249 3250 // src/com/google/doclava/parser/Java.g:503:10: fieldDeclaration 3251 { 3252 dbg.location(503,10); 3253 pushFollow(FOLLOW_fieldDeclaration_in_memberDecl1621); 3254 fieldDeclaration(); 3255 3256 state._fsp--; 3257 if (state.failed) return ; 3258 3259 } 3260 break; 3261 case 2 : 3262 dbg.enterAlt(2); 3263 3264 // src/com/google/doclava/parser/Java.g:504:10: methodDeclaration 3265 { 3266 dbg.location(504,10); 3267 pushFollow(FOLLOW_methodDeclaration_in_memberDecl1632); 3268 methodDeclaration(); 3269 3270 state._fsp--; 3271 if (state.failed) return ; 3272 3273 } 3274 break; 3275 case 3 : 3276 dbg.enterAlt(3); 3277 3278 // src/com/google/doclava/parser/Java.g:505:10: classDeclaration 3279 { 3280 dbg.location(505,10); 3281 pushFollow(FOLLOW_classDeclaration_in_memberDecl1643); 3282 classDeclaration(); 3283 3284 state._fsp--; 3285 if (state.failed) return ; 3286 3287 } 3288 break; 3289 case 4 : 3290 dbg.enterAlt(4); 3291 3292 // src/com/google/doclava/parser/Java.g:506:10: interfaceDeclaration 3293 { 3294 dbg.location(506,10); 3295 pushFollow(FOLLOW_interfaceDeclaration_in_memberDecl1654); 3296 interfaceDeclaration(); 3297 3298 state._fsp--; 3299 if (state.failed) return ; 3300 3301 } 3302 break; 3303 3304 } 3305 } 3306 catch (RecognitionException re) { 3307 reportError(re); 3308 recover(input,re); 3309 } 3310 finally { 3311 if ( state.backtracking>0 ) { memoize(input, 25, memberDecl_StartIndex); } 3312 } 3313 dbg.location(507, 5); 3314 3315 } 3316 finally { 3317 dbg.exitRule(getGrammarFileName(), "memberDecl"); 3318 decRuleLevel(); 3319 if ( getRuleLevel()==0 ) {dbg.terminate();} 3320 } 3321 3322 return ; 3323 } 3324 // $ANTLR end "memberDecl" 3325 3326 3327 // $ANTLR start "methodDeclaration" 3328 // src/com/google/doclava/parser/Java.g:510:1: methodDeclaration : ( modifiers ( typeParameters )? IDENTIFIER formalParameters ( 'throws' qualifiedNameList )? '{' ( explicitConstructorInvocation )? ( blockStatement )* '}' | modifiers ( typeParameters )? ( type | 'void' ) IDENTIFIER formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ( block | ';' ) ); 3329 public final void methodDeclaration() throws RecognitionException { 3330 int methodDeclaration_StartIndex = input.index(); 3331 try { dbg.enterRule(getGrammarFileName(), "methodDeclaration"); 3332 if ( getRuleLevel()==0 ) {dbg.commence();} 3333 incRuleLevel(); 3334 dbg.location(510, 1); 3335 3336 try { 3337 if ( state.backtracking>0 && alreadyParsedRule(input, 26) ) { return ; } 3338 // src/com/google/doclava/parser/Java.g:511:5: ( modifiers ( typeParameters )? IDENTIFIER formalParameters ( 'throws' qualifiedNameList )? '{' ( explicitConstructorInvocation )? ( blockStatement )* '}' | modifiers ( typeParameters )? ( type | 'void' ) IDENTIFIER formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ( block | ';' ) ) 3339 int alt49=2; 3340 try { dbg.enterDecision(49, decisionCanBacktrack[49]); 3341 3342 try { 3343 isCyclicDecision = true; 3344 alt49 = dfa49.predict(input); 3345 } 3346 catch (NoViableAltException nvae) { 3347 dbg.recognitionException(nvae); 3348 throw nvae; 3349 } 3350 } finally {dbg.exitDecision(49);} 3351 3352 switch (alt49) { 3353 case 1 : 3354 dbg.enterAlt(1); 3355 3356 // src/com/google/doclava/parser/Java.g:513:10: modifiers ( typeParameters )? IDENTIFIER formalParameters ( 'throws' qualifiedNameList )? '{' ( explicitConstructorInvocation )? ( blockStatement )* '}' 3357 { 3358 dbg.location(513,10); 3359 pushFollow(FOLLOW_modifiers_in_methodDeclaration1691); 3360 modifiers(); 3361 3362 state._fsp--; 3363 if (state.failed) return ; 3364 dbg.location(514,9); 3365 // src/com/google/doclava/parser/Java.g:514:9: ( typeParameters )? 3366 int alt40=2; 3367 try { dbg.enterSubRule(40); 3368 try { dbg.enterDecision(40, decisionCanBacktrack[40]); 3369 3370 int LA40_0 = input.LA(1); 3371 3372 if ( (LA40_0==LT) ) { 3373 alt40=1; 3374 } 3375 } finally {dbg.exitDecision(40);} 3376 3377 switch (alt40) { 3378 case 1 : 3379 dbg.enterAlt(1); 3380 3381 // src/com/google/doclava/parser/Java.g:514:10: typeParameters 3382 { 3383 dbg.location(514,10); 3384 pushFollow(FOLLOW_typeParameters_in_methodDeclaration1702); 3385 typeParameters(); 3386 3387 state._fsp--; 3388 if (state.failed) return ; 3389 3390 } 3391 break; 3392 3393 } 3394 } finally {dbg.exitSubRule(40);} 3395 3396 dbg.location(516,9); 3397 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_methodDeclaration1723); if (state.failed) return ; 3398 dbg.location(517,9); 3399 pushFollow(FOLLOW_formalParameters_in_methodDeclaration1733); 3400 formalParameters(); 3401 3402 state._fsp--; 3403 if (state.failed) return ; 3404 dbg.location(518,9); 3405 // src/com/google/doclava/parser/Java.g:518:9: ( 'throws' qualifiedNameList )? 3406 int alt41=2; 3407 try { dbg.enterSubRule(41); 3408 try { dbg.enterDecision(41, decisionCanBacktrack[41]); 3409 3410 int LA41_0 = input.LA(1); 3411 3412 if ( (LA41_0==THROWS) ) { 3413 alt41=1; 3414 } 3415 } finally {dbg.exitDecision(41);} 3416 3417 switch (alt41) { 3418 case 1 : 3419 dbg.enterAlt(1); 3420 3421 // src/com/google/doclava/parser/Java.g:518:10: 'throws' qualifiedNameList 3422 { 3423 dbg.location(518,10); 3424 match(input,THROWS,FOLLOW_THROWS_in_methodDeclaration1744); if (state.failed) return ; 3425 dbg.location(518,19); 3426 pushFollow(FOLLOW_qualifiedNameList_in_methodDeclaration1746); 3427 qualifiedNameList(); 3428 3429 state._fsp--; 3430 if (state.failed) return ; 3431 3432 } 3433 break; 3434 3435 } 3436 } finally {dbg.exitSubRule(41);} 3437 3438 dbg.location(520,9); 3439 match(input,LBRACE,FOLLOW_LBRACE_in_methodDeclaration1767); if (state.failed) return ; 3440 dbg.location(521,9); 3441 // src/com/google/doclava/parser/Java.g:521:9: ( explicitConstructorInvocation )? 3442 int alt42=2; 3443 try { dbg.enterSubRule(42); 3444 try { dbg.enterDecision(42, decisionCanBacktrack[42]); 3445 3446 try { 3447 isCyclicDecision = true; 3448 alt42 = dfa42.predict(input); 3449 } 3450 catch (NoViableAltException nvae) { 3451 dbg.recognitionException(nvae); 3452 throw nvae; 3453 } 3454 } finally {dbg.exitDecision(42);} 3455 3456 switch (alt42) { 3457 case 1 : 3458 dbg.enterAlt(1); 3459 3460 // src/com/google/doclava/parser/Java.g:521:10: explicitConstructorInvocation 3461 { 3462 dbg.location(521,10); 3463 pushFollow(FOLLOW_explicitConstructorInvocation_in_methodDeclaration1778); 3464 explicitConstructorInvocation(); 3465 3466 state._fsp--; 3467 if (state.failed) return ; 3468 3469 } 3470 break; 3471 3472 } 3473 } finally {dbg.exitSubRule(42);} 3474 3475 dbg.location(523,9); 3476 // src/com/google/doclava/parser/Java.g:523:9: ( blockStatement )* 3477 try { dbg.enterSubRule(43); 3478 3479 loop43: 3480 do { 3481 int alt43=2; 3482 try { dbg.enterDecision(43, decisionCanBacktrack[43]); 3483 3484 int LA43_0 = input.LA(1); 3485 3486 if ( ((LA43_0>=IDENTIFIER && LA43_0<=NULL)||(LA43_0>=ABSTRACT && LA43_0<=BYTE)||(LA43_0>=CHAR && LA43_0<=CLASS)||LA43_0==CONTINUE||(LA43_0>=DO && LA43_0<=DOUBLE)||LA43_0==ENUM||LA43_0==FINAL||(LA43_0>=FLOAT && LA43_0<=FOR)||LA43_0==IF||(LA43_0>=INT && LA43_0<=NEW)||(LA43_0>=PRIVATE && LA43_0<=THROW)||(LA43_0>=TRANSIENT && LA43_0<=LPAREN)||LA43_0==LBRACE||LA43_0==SEMI||(LA43_0>=BANG && LA43_0<=TILDE)||(LA43_0>=PLUSPLUS && LA43_0<=SUB)||LA43_0==MONKEYS_AT||LA43_0==LT) ) { 3487 alt43=1; 3488 } 3489 3490 3491 } finally {dbg.exitDecision(43);} 3492 3493 switch (alt43) { 3494 case 1 : 3495 dbg.enterAlt(1); 3496 3497 // src/com/google/doclava/parser/Java.g:523:10: blockStatement 3498 { 3499 dbg.location(523,10); 3500 pushFollow(FOLLOW_blockStatement_in_methodDeclaration1800); 3501 blockStatement(); 3502 3503 state._fsp--; 3504 if (state.failed) return ; 3505 3506 } 3507 break; 3508 3509 default : 3510 break loop43; 3511 } 3512 } while (true); 3513 } finally {dbg.exitSubRule(43);} 3514 3515 dbg.location(525,9); 3516 match(input,RBRACE,FOLLOW_RBRACE_in_methodDeclaration1821); if (state.failed) return ; 3517 3518 } 3519 break; 3520 case 2 : 3521 dbg.enterAlt(2); 3522 3523 // src/com/google/doclava/parser/Java.g:526:9: modifiers ( typeParameters )? ( type | 'void' ) IDENTIFIER formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ( block | ';' ) 3524 { 3525 dbg.location(526,9); 3526 pushFollow(FOLLOW_modifiers_in_methodDeclaration1831); 3527 modifiers(); 3528 3529 state._fsp--; 3530 if (state.failed) return ; 3531 dbg.location(527,9); 3532 // src/com/google/doclava/parser/Java.g:527:9: ( typeParameters )? 3533 int alt44=2; 3534 try { dbg.enterSubRule(44); 3535 try { dbg.enterDecision(44, decisionCanBacktrack[44]); 3536 3537 int LA44_0 = input.LA(1); 3538 3539 if ( (LA44_0==LT) ) { 3540 alt44=1; 3541 } 3542 } finally {dbg.exitDecision(44);} 3543 3544 switch (alt44) { 3545 case 1 : 3546 dbg.enterAlt(1); 3547 3548 // src/com/google/doclava/parser/Java.g:527:10: typeParameters 3549 { 3550 dbg.location(527,10); 3551 pushFollow(FOLLOW_typeParameters_in_methodDeclaration1842); 3552 typeParameters(); 3553 3554 state._fsp--; 3555 if (state.failed) return ; 3556 3557 } 3558 break; 3559 3560 } 3561 } finally {dbg.exitSubRule(44);} 3562 3563 dbg.location(529,9); 3564 // src/com/google/doclava/parser/Java.g:529:9: ( type | 'void' ) 3565 int alt45=2; 3566 try { dbg.enterSubRule(45); 3567 try { dbg.enterDecision(45, decisionCanBacktrack[45]); 3568 3569 int LA45_0 = input.LA(1); 3570 3571 if ( (LA45_0==IDENTIFIER||LA45_0==BOOLEAN||LA45_0==BYTE||LA45_0==CHAR||LA45_0==DOUBLE||LA45_0==FLOAT||LA45_0==INT||LA45_0==LONG||LA45_0==SHORT) ) { 3572 alt45=1; 3573 } 3574 else if ( (LA45_0==VOID) ) { 3575 alt45=2; 3576 } 3577 else { 3578 if (state.backtracking>0) {state.failed=true; return ;} 3579 NoViableAltException nvae = 3580 new NoViableAltException("", 45, 0, input); 3581 3582 dbg.recognitionException(nvae); 3583 throw nvae; 3584 } 3585 } finally {dbg.exitDecision(45);} 3586 3587 switch (alt45) { 3588 case 1 : 3589 dbg.enterAlt(1); 3590 3591 // src/com/google/doclava/parser/Java.g:529:10: type 3592 { 3593 dbg.location(529,10); 3594 pushFollow(FOLLOW_type_in_methodDeclaration1864); 3595 type(); 3596 3597 state._fsp--; 3598 if (state.failed) return ; 3599 3600 } 3601 break; 3602 case 2 : 3603 dbg.enterAlt(2); 3604 3605 // src/com/google/doclava/parser/Java.g:530:13: 'void' 3606 { 3607 dbg.location(530,13); 3608 match(input,VOID,FOLLOW_VOID_in_methodDeclaration1878); if (state.failed) return ; 3609 3610 } 3611 break; 3612 3613 } 3614 } finally {dbg.exitSubRule(45);} 3615 3616 dbg.location(532,9); 3617 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_methodDeclaration1898); if (state.failed) return ; 3618 dbg.location(533,9); 3619 pushFollow(FOLLOW_formalParameters_in_methodDeclaration1908); 3620 formalParameters(); 3621 3622 state._fsp--; 3623 if (state.failed) return ; 3624 dbg.location(534,9); 3625 // src/com/google/doclava/parser/Java.g:534:9: ( '[' ']' )* 3626 try { dbg.enterSubRule(46); 3627 3628 loop46: 3629 do { 3630 int alt46=2; 3631 try { dbg.enterDecision(46, decisionCanBacktrack[46]); 3632 3633 int LA46_0 = input.LA(1); 3634 3635 if ( (LA46_0==LBRACKET) ) { 3636 alt46=1; 3637 } 3638 3639 3640 } finally {dbg.exitDecision(46);} 3641 3642 switch (alt46) { 3643 case 1 : 3644 dbg.enterAlt(1); 3645 3646 // src/com/google/doclava/parser/Java.g:534:10: '[' ']' 3647 { 3648 dbg.location(534,10); 3649 match(input,LBRACKET,FOLLOW_LBRACKET_in_methodDeclaration1919); if (state.failed) return ; 3650 dbg.location(534,14); 3651 match(input,RBRACKET,FOLLOW_RBRACKET_in_methodDeclaration1921); if (state.failed) return ; 3652 3653 } 3654 break; 3655 3656 default : 3657 break loop46; 3658 } 3659 } while (true); 3660 } finally {dbg.exitSubRule(46);} 3661 3662 dbg.location(536,9); 3663 // src/com/google/doclava/parser/Java.g:536:9: ( 'throws' qualifiedNameList )? 3664 int alt47=2; 3665 try { dbg.enterSubRule(47); 3666 try { dbg.enterDecision(47, decisionCanBacktrack[47]); 3667 3668 int LA47_0 = input.LA(1); 3669 3670 if ( (LA47_0==THROWS) ) { 3671 alt47=1; 3672 } 3673 } finally {dbg.exitDecision(47);} 3674 3675 switch (alt47) { 3676 case 1 : 3677 dbg.enterAlt(1); 3678 3679 // src/com/google/doclava/parser/Java.g:536:10: 'throws' qualifiedNameList 3680 { 3681 dbg.location(536,10); 3682 match(input,THROWS,FOLLOW_THROWS_in_methodDeclaration1943); if (state.failed) return ; 3683 dbg.location(536,19); 3684 pushFollow(FOLLOW_qualifiedNameList_in_methodDeclaration1945); 3685 qualifiedNameList(); 3686 3687 state._fsp--; 3688 if (state.failed) return ; 3689 3690 } 3691 break; 3692 3693 } 3694 } finally {dbg.exitSubRule(47);} 3695 3696 dbg.location(538,9); 3697 // src/com/google/doclava/parser/Java.g:538:9: ( block | ';' ) 3698 int alt48=2; 3699 try { dbg.enterSubRule(48); 3700 try { dbg.enterDecision(48, decisionCanBacktrack[48]); 3701 3702 int LA48_0 = input.LA(1); 3703 3704 if ( (LA48_0==LBRACE) ) { 3705 alt48=1; 3706 } 3707 else if ( (LA48_0==SEMI) ) { 3708 alt48=2; 3709 } 3710 else { 3711 if (state.backtracking>0) {state.failed=true; return ;} 3712 NoViableAltException nvae = 3713 new NoViableAltException("", 48, 0, input); 3714 3715 dbg.recognitionException(nvae); 3716 throw nvae; 3717 } 3718 } finally {dbg.exitDecision(48);} 3719 3720 switch (alt48) { 3721 case 1 : 3722 dbg.enterAlt(1); 3723 3724 // src/com/google/doclava/parser/Java.g:539:13: block 3725 { 3726 dbg.location(539,13); 3727 pushFollow(FOLLOW_block_in_methodDeclaration1980); 3728 block(); 3729 3730 state._fsp--; 3731 if (state.failed) return ; 3732 3733 } 3734 break; 3735 case 2 : 3736 dbg.enterAlt(2); 3737 3738 // src/com/google/doclava/parser/Java.g:540:13: ';' 3739 { 3740 dbg.location(540,13); 3741 match(input,SEMI,FOLLOW_SEMI_in_methodDeclaration1994); if (state.failed) return ; 3742 3743 } 3744 break; 3745 3746 } 3747 } finally {dbg.exitSubRule(48);} 3748 3749 3750 } 3751 break; 3752 3753 } 3754 } 3755 catch (RecognitionException re) { 3756 reportError(re); 3757 recover(input,re); 3758 } 3759 finally { 3760 if ( state.backtracking>0 ) { memoize(input, 26, methodDeclaration_StartIndex); } 3761 } 3762 dbg.location(542, 5); 3763 3764 } 3765 finally { 3766 dbg.exitRule(getGrammarFileName(), "methodDeclaration"); 3767 decRuleLevel(); 3768 if ( getRuleLevel()==0 ) {dbg.terminate();} 3769 } 3770 3771 return ; 3772 } 3773 // $ANTLR end "methodDeclaration" 3774 3775 3776 // $ANTLR start "fieldDeclaration" 3777 // src/com/google/doclava/parser/Java.g:545:1: fieldDeclaration : modifiers type variableDeclarator ( ',' variableDeclarator )* ';' ; 3778 public final void fieldDeclaration() throws RecognitionException { 3779 int fieldDeclaration_StartIndex = input.index(); 3780 try { dbg.enterRule(getGrammarFileName(), "fieldDeclaration"); 3781 if ( getRuleLevel()==0 ) {dbg.commence();} 3782 incRuleLevel(); 3783 dbg.location(545, 1); 3784 3785 try { 3786 if ( state.backtracking>0 && alreadyParsedRule(input, 27) ) { return ; } 3787 // src/com/google/doclava/parser/Java.g:546:5: ( modifiers type variableDeclarator ( ',' variableDeclarator )* ';' ) 3788 dbg.enterAlt(1); 3789 3790 // src/com/google/doclava/parser/Java.g:546:9: modifiers type variableDeclarator ( ',' variableDeclarator )* ';' 3791 { 3792 dbg.location(546,9); 3793 pushFollow(FOLLOW_modifiers_in_fieldDeclaration2024); 3794 modifiers(); 3795 3796 state._fsp--; 3797 if (state.failed) return ; 3798 dbg.location(547,9); 3799 pushFollow(FOLLOW_type_in_fieldDeclaration2034); 3800 type(); 3801 3802 state._fsp--; 3803 if (state.failed) return ; 3804 dbg.location(548,9); 3805 pushFollow(FOLLOW_variableDeclarator_in_fieldDeclaration2044); 3806 variableDeclarator(); 3807 3808 state._fsp--; 3809 if (state.failed) return ; 3810 dbg.location(549,9); 3811 // src/com/google/doclava/parser/Java.g:549:9: ( ',' variableDeclarator )* 3812 try { dbg.enterSubRule(50); 3813 3814 loop50: 3815 do { 3816 int alt50=2; 3817 try { dbg.enterDecision(50, decisionCanBacktrack[50]); 3818 3819 int LA50_0 = input.LA(1); 3820 3821 if ( (LA50_0==COMMA) ) { 3822 alt50=1; 3823 } 3824 3825 3826 } finally {dbg.exitDecision(50);} 3827 3828 switch (alt50) { 3829 case 1 : 3830 dbg.enterAlt(1); 3831 3832 // src/com/google/doclava/parser/Java.g:549:10: ',' variableDeclarator 3833 { 3834 dbg.location(549,10); 3835 match(input,COMMA,FOLLOW_COMMA_in_fieldDeclaration2055); if (state.failed) return ; 3836 dbg.location(549,14); 3837 pushFollow(FOLLOW_variableDeclarator_in_fieldDeclaration2057); 3838 variableDeclarator(); 3839 3840 state._fsp--; 3841 if (state.failed) return ; 3842 3843 } 3844 break; 3845 3846 default : 3847 break loop50; 3848 } 3849 } while (true); 3850 } finally {dbg.exitSubRule(50);} 3851 3852 dbg.location(551,9); 3853 match(input,SEMI,FOLLOW_SEMI_in_fieldDeclaration2078); if (state.failed) return ; 3854 3855 } 3856 3857 } 3858 catch (RecognitionException re) { 3859 reportError(re); 3860 recover(input,re); 3861 } 3862 finally { 3863 if ( state.backtracking>0 ) { memoize(input, 27, fieldDeclaration_StartIndex); } 3864 } 3865 dbg.location(552, 5); 3866 3867 } 3868 finally { 3869 dbg.exitRule(getGrammarFileName(), "fieldDeclaration"); 3870 decRuleLevel(); 3871 if ( getRuleLevel()==0 ) {dbg.terminate();} 3872 } 3873 3874 return ; 3875 } 3876 // $ANTLR end "fieldDeclaration" 3877 3878 3879 // $ANTLR start "variableDeclarator" 3880 // src/com/google/doclava/parser/Java.g:554:1: variableDeclarator : IDENTIFIER ( '[' ']' )* ( '=' variableInitializer )? ; 3881 public final void variableDeclarator() throws RecognitionException { 3882 int variableDeclarator_StartIndex = input.index(); 3883 try { dbg.enterRule(getGrammarFileName(), "variableDeclarator"); 3884 if ( getRuleLevel()==0 ) {dbg.commence();} 3885 incRuleLevel(); 3886 dbg.location(554, 1); 3887 3888 try { 3889 if ( state.backtracking>0 && alreadyParsedRule(input, 28) ) { return ; } 3890 // src/com/google/doclava/parser/Java.g:555:5: ( IDENTIFIER ( '[' ']' )* ( '=' variableInitializer )? ) 3891 dbg.enterAlt(1); 3892 3893 // src/com/google/doclava/parser/Java.g:555:9: IDENTIFIER ( '[' ']' )* ( '=' variableInitializer )? 3894 { 3895 dbg.location(555,9); 3896 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_variableDeclarator2097); if (state.failed) return ; 3897 dbg.location(556,9); 3898 // src/com/google/doclava/parser/Java.g:556:9: ( '[' ']' )* 3899 try { dbg.enterSubRule(51); 3900 3901 loop51: 3902 do { 3903 int alt51=2; 3904 try { dbg.enterDecision(51, decisionCanBacktrack[51]); 3905 3906 int LA51_0 = input.LA(1); 3907 3908 if ( (LA51_0==LBRACKET) ) { 3909 alt51=1; 3910 } 3911 3912 3913 } finally {dbg.exitDecision(51);} 3914 3915 switch (alt51) { 3916 case 1 : 3917 dbg.enterAlt(1); 3918 3919 // src/com/google/doclava/parser/Java.g:556:10: '[' ']' 3920 { 3921 dbg.location(556,10); 3922 match(input,LBRACKET,FOLLOW_LBRACKET_in_variableDeclarator2108); if (state.failed) return ; 3923 dbg.location(556,14); 3924 match(input,RBRACKET,FOLLOW_RBRACKET_in_variableDeclarator2110); if (state.failed) return ; 3925 3926 } 3927 break; 3928 3929 default : 3930 break loop51; 3931 } 3932 } while (true); 3933 } finally {dbg.exitSubRule(51);} 3934 3935 dbg.location(558,9); 3936 // src/com/google/doclava/parser/Java.g:558:9: ( '=' variableInitializer )? 3937 int alt52=2; 3938 try { dbg.enterSubRule(52); 3939 try { dbg.enterDecision(52, decisionCanBacktrack[52]); 3940 3941 int LA52_0 = input.LA(1); 3942 3943 if ( (LA52_0==EQ) ) { 3944 alt52=1; 3945 } 3946 } finally {dbg.exitDecision(52);} 3947 3948 switch (alt52) { 3949 case 1 : 3950 dbg.enterAlt(1); 3951 3952 // src/com/google/doclava/parser/Java.g:558:10: '=' variableInitializer 3953 { 3954 dbg.location(558,10); 3955 match(input,EQ,FOLLOW_EQ_in_variableDeclarator2132); if (state.failed) return ; 3956 dbg.location(558,14); 3957 pushFollow(FOLLOW_variableInitializer_in_variableDeclarator2134); 3958 variableInitializer(); 3959 3960 state._fsp--; 3961 if (state.failed) return ; 3962 3963 } 3964 break; 3965 3966 } 3967 } finally {dbg.exitSubRule(52);} 3968 3969 3970 } 3971 3972 } 3973 catch (RecognitionException re) { 3974 reportError(re); 3975 recover(input,re); 3976 } 3977 finally { 3978 if ( state.backtracking>0 ) { memoize(input, 28, variableDeclarator_StartIndex); } 3979 } 3980 dbg.location(560, 5); 3981 3982 } 3983 finally { 3984 dbg.exitRule(getGrammarFileName(), "variableDeclarator"); 3985 decRuleLevel(); 3986 if ( getRuleLevel()==0 ) {dbg.terminate();} 3987 } 3988 3989 return ; 3990 } 3991 // $ANTLR end "variableDeclarator" 3992 3993 3994 // $ANTLR start "interfaceBodyDeclaration" 3995 // src/com/google/doclava/parser/Java.g:562:1: interfaceBodyDeclaration : ( interfaceFieldDeclaration | interfaceMethodDeclaration | interfaceDeclaration | classDeclaration | ';' ); 3996 public final void interfaceBodyDeclaration() throws RecognitionException { 3997 int interfaceBodyDeclaration_StartIndex = input.index(); 3998 try { dbg.enterRule(getGrammarFileName(), "interfaceBodyDeclaration"); 3999 if ( getRuleLevel()==0 ) {dbg.commence();} 4000 incRuleLevel(); 4001 dbg.location(562, 1); 4002 4003 try { 4004 if ( state.backtracking>0 && alreadyParsedRule(input, 29) ) { return ; } 4005 // src/com/google/doclava/parser/Java.g:566:5: ( interfaceFieldDeclaration | interfaceMethodDeclaration | interfaceDeclaration | classDeclaration | ';' ) 4006 int alt53=5; 4007 try { dbg.enterDecision(53, decisionCanBacktrack[53]); 4008 4009 try { 4010 isCyclicDecision = true; 4011 alt53 = dfa53.predict(input); 4012 } 4013 catch (NoViableAltException nvae) { 4014 dbg.recognitionException(nvae); 4015 throw nvae; 4016 } 4017 } finally {dbg.exitDecision(53);} 4018 4019 switch (alt53) { 4020 case 1 : 4021 dbg.enterAlt(1); 4022 4023 // src/com/google/doclava/parser/Java.g:567:9: interfaceFieldDeclaration 4024 { 4025 dbg.location(567,9); 4026 pushFollow(FOLLOW_interfaceFieldDeclaration_in_interfaceBodyDeclaration2172); 4027 interfaceFieldDeclaration(); 4028 4029 state._fsp--; 4030 if (state.failed) return ; 4031 4032 } 4033 break; 4034 case 2 : 4035 dbg.enterAlt(2); 4036 4037 // src/com/google/doclava/parser/Java.g:568:9: interfaceMethodDeclaration 4038 { 4039 dbg.location(568,9); 4040 pushFollow(FOLLOW_interfaceMethodDeclaration_in_interfaceBodyDeclaration2182); 4041 interfaceMethodDeclaration(); 4042 4043 state._fsp--; 4044 if (state.failed) return ; 4045 4046 } 4047 break; 4048 case 3 : 4049 dbg.enterAlt(3); 4050 4051 // src/com/google/doclava/parser/Java.g:569:9: interfaceDeclaration 4052 { 4053 dbg.location(569,9); 4054 pushFollow(FOLLOW_interfaceDeclaration_in_interfaceBodyDeclaration2192); 4055 interfaceDeclaration(); 4056 4057 state._fsp--; 4058 if (state.failed) return ; 4059 4060 } 4061 break; 4062 case 4 : 4063 dbg.enterAlt(4); 4064 4065 // src/com/google/doclava/parser/Java.g:570:9: classDeclaration 4066 { 4067 dbg.location(570,9); 4068 pushFollow(FOLLOW_classDeclaration_in_interfaceBodyDeclaration2202); 4069 classDeclaration(); 4070 4071 state._fsp--; 4072 if (state.failed) return ; 4073 4074 } 4075 break; 4076 case 5 : 4077 dbg.enterAlt(5); 4078 4079 // src/com/google/doclava/parser/Java.g:571:9: ';' 4080 { 4081 dbg.location(571,9); 4082 match(input,SEMI,FOLLOW_SEMI_in_interfaceBodyDeclaration2212); if (state.failed) return ; 4083 4084 } 4085 break; 4086 4087 } 4088 } 4089 catch (RecognitionException re) { 4090 reportError(re); 4091 recover(input,re); 4092 } 4093 finally { 4094 if ( state.backtracking>0 ) { memoize(input, 29, interfaceBodyDeclaration_StartIndex); } 4095 } 4096 dbg.location(572, 5); 4097 4098 } 4099 finally { 4100 dbg.exitRule(getGrammarFileName(), "interfaceBodyDeclaration"); 4101 decRuleLevel(); 4102 if ( getRuleLevel()==0 ) {dbg.terminate();} 4103 } 4104 4105 return ; 4106 } 4107 // $ANTLR end "interfaceBodyDeclaration" 4108 4109 4110 // $ANTLR start "interfaceMethodDeclaration" 4111 // src/com/google/doclava/parser/Java.g:574:1: interfaceMethodDeclaration : modifiers ( typeParameters )? ( type | 'void' ) IDENTIFIER formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ';' ; 4112 public final void interfaceMethodDeclaration() throws RecognitionException { 4113 int interfaceMethodDeclaration_StartIndex = input.index(); 4114 try { dbg.enterRule(getGrammarFileName(), "interfaceMethodDeclaration"); 4115 if ( getRuleLevel()==0 ) {dbg.commence();} 4116 incRuleLevel(); 4117 dbg.location(574, 1); 4118 4119 try { 4120 if ( state.backtracking>0 && alreadyParsedRule(input, 30) ) { return ; } 4121 // src/com/google/doclava/parser/Java.g:575:5: ( modifiers ( typeParameters )? ( type | 'void' ) IDENTIFIER formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ';' ) 4122 dbg.enterAlt(1); 4123 4124 // src/com/google/doclava/parser/Java.g:575:9: modifiers ( typeParameters )? ( type | 'void' ) IDENTIFIER formalParameters ( '[' ']' )* ( 'throws' qualifiedNameList )? ';' 4125 { 4126 dbg.location(575,9); 4127 pushFollow(FOLLOW_modifiers_in_interfaceMethodDeclaration2231); 4128 modifiers(); 4129 4130 state._fsp--; 4131 if (state.failed) return ; 4132 dbg.location(576,9); 4133 // src/com/google/doclava/parser/Java.g:576:9: ( typeParameters )? 4134 int alt54=2; 4135 try { dbg.enterSubRule(54); 4136 try { dbg.enterDecision(54, decisionCanBacktrack[54]); 4137 4138 int LA54_0 = input.LA(1); 4139 4140 if ( (LA54_0==LT) ) { 4141 alt54=1; 4142 } 4143 } finally {dbg.exitDecision(54);} 4144 4145 switch (alt54) { 4146 case 1 : 4147 dbg.enterAlt(1); 4148 4149 // src/com/google/doclava/parser/Java.g:576:10: typeParameters 4150 { 4151 dbg.location(576,10); 4152 pushFollow(FOLLOW_typeParameters_in_interfaceMethodDeclaration2242); 4153 typeParameters(); 4154 4155 state._fsp--; 4156 if (state.failed) return ; 4157 4158 } 4159 break; 4160 4161 } 4162 } finally {dbg.exitSubRule(54);} 4163 4164 dbg.location(578,9); 4165 // src/com/google/doclava/parser/Java.g:578:9: ( type | 'void' ) 4166 int alt55=2; 4167 try { dbg.enterSubRule(55); 4168 try { dbg.enterDecision(55, decisionCanBacktrack[55]); 4169 4170 int LA55_0 = input.LA(1); 4171 4172 if ( (LA55_0==IDENTIFIER||LA55_0==BOOLEAN||LA55_0==BYTE||LA55_0==CHAR||LA55_0==DOUBLE||LA55_0==FLOAT||LA55_0==INT||LA55_0==LONG||LA55_0==SHORT) ) { 4173 alt55=1; 4174 } 4175 else if ( (LA55_0==VOID) ) { 4176 alt55=2; 4177 } 4178 else { 4179 if (state.backtracking>0) {state.failed=true; return ;} 4180 NoViableAltException nvae = 4181 new NoViableAltException("", 55, 0, input); 4182 4183 dbg.recognitionException(nvae); 4184 throw nvae; 4185 } 4186 } finally {dbg.exitDecision(55);} 4187 4188 switch (alt55) { 4189 case 1 : 4190 dbg.enterAlt(1); 4191 4192 // src/com/google/doclava/parser/Java.g:578:10: type 4193 { 4194 dbg.location(578,10); 4195 pushFollow(FOLLOW_type_in_interfaceMethodDeclaration2264); 4196 type(); 4197 4198 state._fsp--; 4199 if (state.failed) return ; 4200 4201 } 4202 break; 4203 case 2 : 4204 dbg.enterAlt(2); 4205 4206 // src/com/google/doclava/parser/Java.g:579:10: 'void' 4207 { 4208 dbg.location(579,10); 4209 match(input,VOID,FOLLOW_VOID_in_interfaceMethodDeclaration2275); if (state.failed) return ; 4210 4211 } 4212 break; 4213 4214 } 4215 } finally {dbg.exitSubRule(55);} 4216 4217 dbg.location(581,9); 4218 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_interfaceMethodDeclaration2295); if (state.failed) return ; 4219 dbg.location(582,9); 4220 pushFollow(FOLLOW_formalParameters_in_interfaceMethodDeclaration2305); 4221 formalParameters(); 4222 4223 state._fsp--; 4224 if (state.failed) return ; 4225 dbg.location(583,9); 4226 // src/com/google/doclava/parser/Java.g:583:9: ( '[' ']' )* 4227 try { dbg.enterSubRule(56); 4228 4229 loop56: 4230 do { 4231 int alt56=2; 4232 try { dbg.enterDecision(56, decisionCanBacktrack[56]); 4233 4234 int LA56_0 = input.LA(1); 4235 4236 if ( (LA56_0==LBRACKET) ) { 4237 alt56=1; 4238 } 4239 4240 4241 } finally {dbg.exitDecision(56);} 4242 4243 switch (alt56) { 4244 case 1 : 4245 dbg.enterAlt(1); 4246 4247 // src/com/google/doclava/parser/Java.g:583:10: '[' ']' 4248 { 4249 dbg.location(583,10); 4250 match(input,LBRACKET,FOLLOW_LBRACKET_in_interfaceMethodDeclaration2316); if (state.failed) return ; 4251 dbg.location(583,14); 4252 match(input,RBRACKET,FOLLOW_RBRACKET_in_interfaceMethodDeclaration2318); if (state.failed) return ; 4253 4254 } 4255 break; 4256 4257 default : 4258 break loop56; 4259 } 4260 } while (true); 4261 } finally {dbg.exitSubRule(56);} 4262 4263 dbg.location(585,9); 4264 // src/com/google/doclava/parser/Java.g:585:9: ( 'throws' qualifiedNameList )? 4265 int alt57=2; 4266 try { dbg.enterSubRule(57); 4267 try { dbg.enterDecision(57, decisionCanBacktrack[57]); 4268 4269 int LA57_0 = input.LA(1); 4270 4271 if ( (LA57_0==THROWS) ) { 4272 alt57=1; 4273 } 4274 } finally {dbg.exitDecision(57);} 4275 4276 switch (alt57) { 4277 case 1 : 4278 dbg.enterAlt(1); 4279 4280 // src/com/google/doclava/parser/Java.g:585:10: 'throws' qualifiedNameList 4281 { 4282 dbg.location(585,10); 4283 match(input,THROWS,FOLLOW_THROWS_in_interfaceMethodDeclaration2340); if (state.failed) return ; 4284 dbg.location(585,19); 4285 pushFollow(FOLLOW_qualifiedNameList_in_interfaceMethodDeclaration2342); 4286 qualifiedNameList(); 4287 4288 state._fsp--; 4289 if (state.failed) return ; 4290 4291 } 4292 break; 4293 4294 } 4295 } finally {dbg.exitSubRule(57);} 4296 4297 dbg.location(586,12); 4298 match(input,SEMI,FOLLOW_SEMI_in_interfaceMethodDeclaration2355); if (state.failed) return ; 4299 4300 } 4301 4302 } 4303 catch (RecognitionException re) { 4304 reportError(re); 4305 recover(input,re); 4306 } 4307 finally { 4308 if ( state.backtracking>0 ) { memoize(input, 30, interfaceMethodDeclaration_StartIndex); } 4309 } 4310 dbg.location(587, 5); 4311 4312 } 4313 finally { 4314 dbg.exitRule(getGrammarFileName(), "interfaceMethodDeclaration"); 4315 decRuleLevel(); 4316 if ( getRuleLevel()==0 ) {dbg.terminate();} 4317 } 4318 4319 return ; 4320 } 4321 // $ANTLR end "interfaceMethodDeclaration" 4322 4323 4324 // $ANTLR start "interfaceFieldDeclaration" 4325 // src/com/google/doclava/parser/Java.g:589:1: interfaceFieldDeclaration : modifiers type variableDeclarator ( ',' variableDeclarator )* ';' ; 4326 public final void interfaceFieldDeclaration() throws RecognitionException { 4327 int interfaceFieldDeclaration_StartIndex = input.index(); 4328 try { dbg.enterRule(getGrammarFileName(), "interfaceFieldDeclaration"); 4329 if ( getRuleLevel()==0 ) {dbg.commence();} 4330 incRuleLevel(); 4331 dbg.location(589, 1); 4332 4333 try { 4334 if ( state.backtracking>0 && alreadyParsedRule(input, 31) ) { return ; } 4335 // src/com/google/doclava/parser/Java.g:595:5: ( modifiers type variableDeclarator ( ',' variableDeclarator )* ';' ) 4336 dbg.enterAlt(1); 4337 4338 // src/com/google/doclava/parser/Java.g:595:9: modifiers type variableDeclarator ( ',' variableDeclarator )* ';' 4339 { 4340 dbg.location(595,9); 4341 pushFollow(FOLLOW_modifiers_in_interfaceFieldDeclaration2376); 4342 modifiers(); 4343 4344 state._fsp--; 4345 if (state.failed) return ; 4346 dbg.location(595,19); 4347 pushFollow(FOLLOW_type_in_interfaceFieldDeclaration2378); 4348 type(); 4349 4350 state._fsp--; 4351 if (state.failed) return ; 4352 dbg.location(595,24); 4353 pushFollow(FOLLOW_variableDeclarator_in_interfaceFieldDeclaration2380); 4354 variableDeclarator(); 4355 4356 state._fsp--; 4357 if (state.failed) return ; 4358 dbg.location(596,9); 4359 // src/com/google/doclava/parser/Java.g:596:9: ( ',' variableDeclarator )* 4360 try { dbg.enterSubRule(58); 4361 4362 loop58: 4363 do { 4364 int alt58=2; 4365 try { dbg.enterDecision(58, decisionCanBacktrack[58]); 4366 4367 int LA58_0 = input.LA(1); 4368 4369 if ( (LA58_0==COMMA) ) { 4370 alt58=1; 4371 } 4372 4373 4374 } finally {dbg.exitDecision(58);} 4375 4376 switch (alt58) { 4377 case 1 : 4378 dbg.enterAlt(1); 4379 4380 // src/com/google/doclava/parser/Java.g:596:10: ',' variableDeclarator 4381 { 4382 dbg.location(596,10); 4383 match(input,COMMA,FOLLOW_COMMA_in_interfaceFieldDeclaration2391); if (state.failed) return ; 4384 dbg.location(596,14); 4385 pushFollow(FOLLOW_variableDeclarator_in_interfaceFieldDeclaration2393); 4386 variableDeclarator(); 4387 4388 state._fsp--; 4389 if (state.failed) return ; 4390 4391 } 4392 break; 4393 4394 default : 4395 break loop58; 4396 } 4397 } while (true); 4398 } finally {dbg.exitSubRule(58);} 4399 4400 dbg.location(598,9); 4401 match(input,SEMI,FOLLOW_SEMI_in_interfaceFieldDeclaration2414); if (state.failed) return ; 4402 4403 } 4404 4405 } 4406 catch (RecognitionException re) { 4407 reportError(re); 4408 recover(input,re); 4409 } 4410 finally { 4411 if ( state.backtracking>0 ) { memoize(input, 31, interfaceFieldDeclaration_StartIndex); } 4412 } 4413 dbg.location(599, 5); 4414 4415 } 4416 finally { 4417 dbg.exitRule(getGrammarFileName(), "interfaceFieldDeclaration"); 4418 decRuleLevel(); 4419 if ( getRuleLevel()==0 ) {dbg.terminate();} 4420 } 4421 4422 return ; 4423 } 4424 // $ANTLR end "interfaceFieldDeclaration" 4425 4426 4427 // $ANTLR start "type" 4428 // src/com/google/doclava/parser/Java.g:602:1: type : ( classOrInterfaceType ( '[' ']' )* | primitiveType ( '[' ']' )* ); 4429 public final void type() throws RecognitionException { 4430 int type_StartIndex = input.index(); 4431 try { dbg.enterRule(getGrammarFileName(), "type"); 4432 if ( getRuleLevel()==0 ) {dbg.commence();} 4433 incRuleLevel(); 4434 dbg.location(602, 1); 4435 4436 try { 4437 if ( state.backtracking>0 && alreadyParsedRule(input, 32) ) { return ; } 4438 // src/com/google/doclava/parser/Java.g:603:5: ( classOrInterfaceType ( '[' ']' )* | primitiveType ( '[' ']' )* ) 4439 int alt61=2; 4440 try { dbg.enterDecision(61, decisionCanBacktrack[61]); 4441 4442 int LA61_0 = input.LA(1); 4443 4444 if ( (LA61_0==IDENTIFIER) ) { 4445 alt61=1; 4446 } 4447 else if ( (LA61_0==BOOLEAN||LA61_0==BYTE||LA61_0==CHAR||LA61_0==DOUBLE||LA61_0==FLOAT||LA61_0==INT||LA61_0==LONG||LA61_0==SHORT) ) { 4448 alt61=2; 4449 } 4450 else { 4451 if (state.backtracking>0) {state.failed=true; return ;} 4452 NoViableAltException nvae = 4453 new NoViableAltException("", 61, 0, input); 4454 4455 dbg.recognitionException(nvae); 4456 throw nvae; 4457 } 4458 } finally {dbg.exitDecision(61);} 4459 4460 switch (alt61) { 4461 case 1 : 4462 dbg.enterAlt(1); 4463 4464 // src/com/google/doclava/parser/Java.g:603:9: classOrInterfaceType ( '[' ']' )* 4465 { 4466 dbg.location(603,9); 4467 pushFollow(FOLLOW_classOrInterfaceType_in_type2434); 4468 classOrInterfaceType(); 4469 4470 state._fsp--; 4471 if (state.failed) return ; 4472 dbg.location(604,9); 4473 // src/com/google/doclava/parser/Java.g:604:9: ( '[' ']' )* 4474 try { dbg.enterSubRule(59); 4475 4476 loop59: 4477 do { 4478 int alt59=2; 4479 try { dbg.enterDecision(59, decisionCanBacktrack[59]); 4480 4481 int LA59_0 = input.LA(1); 4482 4483 if ( (LA59_0==LBRACKET) ) { 4484 alt59=1; 4485 } 4486 4487 4488 } finally {dbg.exitDecision(59);} 4489 4490 switch (alt59) { 4491 case 1 : 4492 dbg.enterAlt(1); 4493 4494 // src/com/google/doclava/parser/Java.g:604:10: '[' ']' 4495 { 4496 dbg.location(604,10); 4497 match(input,LBRACKET,FOLLOW_LBRACKET_in_type2445); if (state.failed) return ; 4498 dbg.location(604,14); 4499 match(input,RBRACKET,FOLLOW_RBRACKET_in_type2447); if (state.failed) return ; 4500 4501 } 4502 break; 4503 4504 default : 4505 break loop59; 4506 } 4507 } while (true); 4508 } finally {dbg.exitSubRule(59);} 4509 4510 4511 } 4512 break; 4513 case 2 : 4514 dbg.enterAlt(2); 4515 4516 // src/com/google/doclava/parser/Java.g:606:9: primitiveType ( '[' ']' )* 4517 { 4518 dbg.location(606,9); 4519 pushFollow(FOLLOW_primitiveType_in_type2468); 4520 primitiveType(); 4521 4522 state._fsp--; 4523 if (state.failed) return ; 4524 dbg.location(607,9); 4525 // src/com/google/doclava/parser/Java.g:607:9: ( '[' ']' )* 4526 try { dbg.enterSubRule(60); 4527 4528 loop60: 4529 do { 4530 int alt60=2; 4531 try { dbg.enterDecision(60, decisionCanBacktrack[60]); 4532 4533 int LA60_0 = input.LA(1); 4534 4535 if ( (LA60_0==LBRACKET) ) { 4536 alt60=1; 4537 } 4538 4539 4540 } finally {dbg.exitDecision(60);} 4541 4542 switch (alt60) { 4543 case 1 : 4544 dbg.enterAlt(1); 4545 4546 // src/com/google/doclava/parser/Java.g:607:10: '[' ']' 4547 { 4548 dbg.location(607,10); 4549 match(input,LBRACKET,FOLLOW_LBRACKET_in_type2479); if (state.failed) return ; 4550 dbg.location(607,14); 4551 match(input,RBRACKET,FOLLOW_RBRACKET_in_type2481); if (state.failed) return ; 4552 4553 } 4554 break; 4555 4556 default : 4557 break loop60; 4558 } 4559 } while (true); 4560 } finally {dbg.exitSubRule(60);} 4561 4562 4563 } 4564 break; 4565 4566 } 4567 } 4568 catch (RecognitionException re) { 4569 reportError(re); 4570 recover(input,re); 4571 } 4572 finally { 4573 if ( state.backtracking>0 ) { memoize(input, 32, type_StartIndex); } 4574 } 4575 dbg.location(609, 5); 4576 4577 } 4578 finally { 4579 dbg.exitRule(getGrammarFileName(), "type"); 4580 decRuleLevel(); 4581 if ( getRuleLevel()==0 ) {dbg.terminate();} 4582 } 4583 4584 return ; 4585 } 4586 // $ANTLR end "type" 4587 4588 4589 // $ANTLR start "classOrInterfaceType" 4590 // src/com/google/doclava/parser/Java.g:612:1: classOrInterfaceType : IDENTIFIER ( typeArguments )? ( '.' IDENTIFIER ( typeArguments )? )* ; 4591 public final void classOrInterfaceType() throws RecognitionException { 4592 int classOrInterfaceType_StartIndex = input.index(); 4593 try { dbg.enterRule(getGrammarFileName(), "classOrInterfaceType"); 4594 if ( getRuleLevel()==0 ) {dbg.commence();} 4595 incRuleLevel(); 4596 dbg.location(612, 1); 4597 4598 try { 4599 if ( state.backtracking>0 && alreadyParsedRule(input, 33) ) { return ; } 4600 // src/com/google/doclava/parser/Java.g:613:5: ( IDENTIFIER ( typeArguments )? ( '.' IDENTIFIER ( typeArguments )? )* ) 4601 dbg.enterAlt(1); 4602 4603 // src/com/google/doclava/parser/Java.g:613:9: IDENTIFIER ( typeArguments )? ( '.' IDENTIFIER ( typeArguments )? )* 4604 { 4605 dbg.location(613,9); 4606 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_classOrInterfaceType2512); if (state.failed) return ; 4607 dbg.location(614,9); 4608 // src/com/google/doclava/parser/Java.g:614:9: ( typeArguments )? 4609 int alt62=2; 4610 try { dbg.enterSubRule(62); 4611 try { dbg.enterDecision(62, decisionCanBacktrack[62]); 4612 4613 int LA62_0 = input.LA(1); 4614 4615 if ( (LA62_0==LT) ) { 4616 int LA62_1 = input.LA(2); 4617 4618 if ( (LA62_1==IDENTIFIER||LA62_1==BOOLEAN||LA62_1==BYTE||LA62_1==CHAR||LA62_1==DOUBLE||LA62_1==FLOAT||LA62_1==INT||LA62_1==LONG||LA62_1==SHORT||LA62_1==QUES) ) { 4619 alt62=1; 4620 } 4621 } 4622 } finally {dbg.exitDecision(62);} 4623 4624 switch (alt62) { 4625 case 1 : 4626 dbg.enterAlt(1); 4627 4628 // src/com/google/doclava/parser/Java.g:614:10: typeArguments 4629 { 4630 dbg.location(614,10); 4631 pushFollow(FOLLOW_typeArguments_in_classOrInterfaceType2523); 4632 typeArguments(); 4633 4634 state._fsp--; 4635 if (state.failed) return ; 4636 4637 } 4638 break; 4639 4640 } 4641 } finally {dbg.exitSubRule(62);} 4642 4643 dbg.location(616,9); 4644 // src/com/google/doclava/parser/Java.g:616:9: ( '.' IDENTIFIER ( typeArguments )? )* 4645 try { dbg.enterSubRule(64); 4646 4647 loop64: 4648 do { 4649 int alt64=2; 4650 try { dbg.enterDecision(64, decisionCanBacktrack[64]); 4651 4652 int LA64_0 = input.LA(1); 4653 4654 if ( (LA64_0==DOT) ) { 4655 alt64=1; 4656 } 4657 4658 4659 } finally {dbg.exitDecision(64);} 4660 4661 switch (alt64) { 4662 case 1 : 4663 dbg.enterAlt(1); 4664 4665 // src/com/google/doclava/parser/Java.g:616:10: '.' IDENTIFIER ( typeArguments )? 4666 { 4667 dbg.location(616,10); 4668 match(input,DOT,FOLLOW_DOT_in_classOrInterfaceType2545); if (state.failed) return ; 4669 dbg.location(616,14); 4670 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_classOrInterfaceType2547); if (state.failed) return ; 4671 dbg.location(617,13); 4672 // src/com/google/doclava/parser/Java.g:617:13: ( typeArguments )? 4673 int alt63=2; 4674 try { dbg.enterSubRule(63); 4675 try { dbg.enterDecision(63, decisionCanBacktrack[63]); 4676 4677 int LA63_0 = input.LA(1); 4678 4679 if ( (LA63_0==LT) ) { 4680 int LA63_1 = input.LA(2); 4681 4682 if ( (LA63_1==IDENTIFIER||LA63_1==BOOLEAN||LA63_1==BYTE||LA63_1==CHAR||LA63_1==DOUBLE||LA63_1==FLOAT||LA63_1==INT||LA63_1==LONG||LA63_1==SHORT||LA63_1==QUES) ) { 4683 alt63=1; 4684 } 4685 } 4686 } finally {dbg.exitDecision(63);} 4687 4688 switch (alt63) { 4689 case 1 : 4690 dbg.enterAlt(1); 4691 4692 // src/com/google/doclava/parser/Java.g:617:14: typeArguments 4693 { 4694 dbg.location(617,14); 4695 pushFollow(FOLLOW_typeArguments_in_classOrInterfaceType2562); 4696 typeArguments(); 4697 4698 state._fsp--; 4699 if (state.failed) return ; 4700 4701 } 4702 break; 4703 4704 } 4705 } finally {dbg.exitSubRule(63);} 4706 4707 4708 } 4709 break; 4710 4711 default : 4712 break loop64; 4713 } 4714 } while (true); 4715 } finally {dbg.exitSubRule(64);} 4716 4717 4718 } 4719 4720 } 4721 catch (RecognitionException re) { 4722 reportError(re); 4723 recover(input,re); 4724 } 4725 finally { 4726 if ( state.backtracking>0 ) { memoize(input, 33, classOrInterfaceType_StartIndex); } 4727 } 4728 dbg.location(620, 5); 4729 4730 } 4731 finally { 4732 dbg.exitRule(getGrammarFileName(), "classOrInterfaceType"); 4733 decRuleLevel(); 4734 if ( getRuleLevel()==0 ) {dbg.terminate();} 4735 } 4736 4737 return ; 4738 } 4739 // $ANTLR end "classOrInterfaceType" 4740 4741 4742 // $ANTLR start "primitiveType" 4743 // src/com/google/doclava/parser/Java.g:622:1: primitiveType : ( 'boolean' | 'char' | 'byte' | 'short' | 'int' | 'long' | 'float' | 'double' ); 4744 public final void primitiveType() throws RecognitionException { 4745 int primitiveType_StartIndex = input.index(); 4746 try { dbg.enterRule(getGrammarFileName(), "primitiveType"); 4747 if ( getRuleLevel()==0 ) {dbg.commence();} 4748 incRuleLevel(); 4749 dbg.location(622, 1); 4750 4751 try { 4752 if ( state.backtracking>0 && alreadyParsedRule(input, 34) ) { return ; } 4753 // src/com/google/doclava/parser/Java.g:623:5: ( 'boolean' | 'char' | 'byte' | 'short' | 'int' | 'long' | 'float' | 'double' ) 4754 dbg.enterAlt(1); 4755 4756 // src/com/google/doclava/parser/Java.g: 4757 { 4758 dbg.location(623,5); 4759 if ( input.LA(1)==BOOLEAN||input.LA(1)==BYTE||input.LA(1)==CHAR||input.LA(1)==DOUBLE||input.LA(1)==FLOAT||input.LA(1)==INT||input.LA(1)==LONG||input.LA(1)==SHORT ) { 4760 input.consume(); 4761 state.errorRecovery=false;state.failed=false; 4762 } 4763 else { 4764 if (state.backtracking>0) {state.failed=true; return ;} 4765 MismatchedSetException mse = new MismatchedSetException(null,input); 4766 dbg.recognitionException(mse); 4767 throw mse; 4768 } 4769 4770 4771 } 4772 4773 } 4774 catch (RecognitionException re) { 4775 reportError(re); 4776 recover(input,re); 4777 } 4778 finally { 4779 if ( state.backtracking>0 ) { memoize(input, 34, primitiveType_StartIndex); } 4780 } 4781 dbg.location(631, 5); 4782 4783 } 4784 finally { 4785 dbg.exitRule(getGrammarFileName(), "primitiveType"); 4786 decRuleLevel(); 4787 if ( getRuleLevel()==0 ) {dbg.terminate();} 4788 } 4789 4790 return ; 4791 } 4792 // $ANTLR end "primitiveType" 4793 4794 4795 // $ANTLR start "typeArguments" 4796 // src/com/google/doclava/parser/Java.g:633:1: typeArguments : '<' typeArgument ( ',' typeArgument )* '>' ; 4797 public final void typeArguments() throws RecognitionException { 4798 int typeArguments_StartIndex = input.index(); 4799 try { dbg.enterRule(getGrammarFileName(), "typeArguments"); 4800 if ( getRuleLevel()==0 ) {dbg.commence();} 4801 incRuleLevel(); 4802 dbg.location(633, 1); 4803 4804 try { 4805 if ( state.backtracking>0 && alreadyParsedRule(input, 35) ) { return ; } 4806 // src/com/google/doclava/parser/Java.g:634:5: ( '<' typeArgument ( ',' typeArgument )* '>' ) 4807 dbg.enterAlt(1); 4808 4809 // src/com/google/doclava/parser/Java.g:634:9: '<' typeArgument ( ',' typeArgument )* '>' 4810 { 4811 dbg.location(634,9); 4812 match(input,LT,FOLLOW_LT_in_typeArguments2696); if (state.failed) return ; 4813 dbg.location(634,13); 4814 pushFollow(FOLLOW_typeArgument_in_typeArguments2698); 4815 typeArgument(); 4816 4817 state._fsp--; 4818 if (state.failed) return ; 4819 dbg.location(635,9); 4820 // src/com/google/doclava/parser/Java.g:635:9: ( ',' typeArgument )* 4821 try { dbg.enterSubRule(65); 4822 4823 loop65: 4824 do { 4825 int alt65=2; 4826 try { dbg.enterDecision(65, decisionCanBacktrack[65]); 4827 4828 int LA65_0 = input.LA(1); 4829 4830 if ( (LA65_0==COMMA) ) { 4831 alt65=1; 4832 } 4833 4834 4835 } finally {dbg.exitDecision(65);} 4836 4837 switch (alt65) { 4838 case 1 : 4839 dbg.enterAlt(1); 4840 4841 // src/com/google/doclava/parser/Java.g:635:10: ',' typeArgument 4842 { 4843 dbg.location(635,10); 4844 match(input,COMMA,FOLLOW_COMMA_in_typeArguments2709); if (state.failed) return ; 4845 dbg.location(635,14); 4846 pushFollow(FOLLOW_typeArgument_in_typeArguments2711); 4847 typeArgument(); 4848 4849 state._fsp--; 4850 if (state.failed) return ; 4851 4852 } 4853 break; 4854 4855 default : 4856 break loop65; 4857 } 4858 } while (true); 4859 } finally {dbg.exitSubRule(65);} 4860 4861 dbg.location(637,9); 4862 match(input,GT,FOLLOW_GT_in_typeArguments2732); if (state.failed) return ; 4863 4864 } 4865 4866 } 4867 catch (RecognitionException re) { 4868 reportError(re); 4869 recover(input,re); 4870 } 4871 finally { 4872 if ( state.backtracking>0 ) { memoize(input, 35, typeArguments_StartIndex); } 4873 } 4874 dbg.location(638, 5); 4875 4876 } 4877 finally { 4878 dbg.exitRule(getGrammarFileName(), "typeArguments"); 4879 decRuleLevel(); 4880 if ( getRuleLevel()==0 ) {dbg.terminate();} 4881 } 4882 4883 return ; 4884 } 4885 // $ANTLR end "typeArguments" 4886 4887 4888 // $ANTLR start "typeArgument" 4889 // src/com/google/doclava/parser/Java.g:640:1: typeArgument : ( type | '?' ( ( 'extends' | 'super' ) type )? ); 4890 public final void typeArgument() throws RecognitionException { 4891 int typeArgument_StartIndex = input.index(); 4892 try { dbg.enterRule(getGrammarFileName(), "typeArgument"); 4893 if ( getRuleLevel()==0 ) {dbg.commence();} 4894 incRuleLevel(); 4895 dbg.location(640, 1); 4896 4897 try { 4898 if ( state.backtracking>0 && alreadyParsedRule(input, 36) ) { return ; } 4899 // src/com/google/doclava/parser/Java.g:641:5: ( type | '?' ( ( 'extends' | 'super' ) type )? ) 4900 int alt67=2; 4901 try { dbg.enterDecision(67, decisionCanBacktrack[67]); 4902 4903 int LA67_0 = input.LA(1); 4904 4905 if ( (LA67_0==IDENTIFIER||LA67_0==BOOLEAN||LA67_0==BYTE||LA67_0==CHAR||LA67_0==DOUBLE||LA67_0==FLOAT||LA67_0==INT||LA67_0==LONG||LA67_0==SHORT) ) { 4906 alt67=1; 4907 } 4908 else if ( (LA67_0==QUES) ) { 4909 alt67=2; 4910 } 4911 else { 4912 if (state.backtracking>0) {state.failed=true; return ;} 4913 NoViableAltException nvae = 4914 new NoViableAltException("", 67, 0, input); 4915 4916 dbg.recognitionException(nvae); 4917 throw nvae; 4918 } 4919 } finally {dbg.exitDecision(67);} 4920 4921 switch (alt67) { 4922 case 1 : 4923 dbg.enterAlt(1); 4924 4925 // src/com/google/doclava/parser/Java.g:641:9: type 4926 { 4927 dbg.location(641,9); 4928 pushFollow(FOLLOW_type_in_typeArgument2751); 4929 type(); 4930 4931 state._fsp--; 4932 if (state.failed) return ; 4933 4934 } 4935 break; 4936 case 2 : 4937 dbg.enterAlt(2); 4938 4939 // src/com/google/doclava/parser/Java.g:642:9: '?' ( ( 'extends' | 'super' ) type )? 4940 { 4941 dbg.location(642,9); 4942 match(input,QUES,FOLLOW_QUES_in_typeArgument2761); if (state.failed) return ; 4943 dbg.location(643,9); 4944 // src/com/google/doclava/parser/Java.g:643:9: ( ( 'extends' | 'super' ) type )? 4945 int alt66=2; 4946 try { dbg.enterSubRule(66); 4947 try { dbg.enterDecision(66, decisionCanBacktrack[66]); 4948 4949 int LA66_0 = input.LA(1); 4950 4951 if ( (LA66_0==EXTENDS||LA66_0==SUPER) ) { 4952 alt66=1; 4953 } 4954 } finally {dbg.exitDecision(66);} 4955 4956 switch (alt66) { 4957 case 1 : 4958 dbg.enterAlt(1); 4959 4960 // src/com/google/doclava/parser/Java.g:644:13: ( 'extends' | 'super' ) type 4961 { 4962 dbg.location(644,13); 4963 if ( input.LA(1)==EXTENDS||input.LA(1)==SUPER ) { 4964 input.consume(); 4965 state.errorRecovery=false;state.failed=false; 4966 } 4967 else { 4968 if (state.backtracking>0) {state.failed=true; return ;} 4969 MismatchedSetException mse = new MismatchedSetException(null,input); 4970 dbg.recognitionException(mse); 4971 throw mse; 4972 } 4973 4974 dbg.location(647,13); 4975 pushFollow(FOLLOW_type_in_typeArgument2829); 4976 type(); 4977 4978 state._fsp--; 4979 if (state.failed) return ; 4980 4981 } 4982 break; 4983 4984 } 4985 } finally {dbg.exitSubRule(66);} 4986 4987 4988 } 4989 break; 4990 4991 } 4992 } 4993 catch (RecognitionException re) { 4994 reportError(re); 4995 recover(input,re); 4996 } 4997 finally { 4998 if ( state.backtracking>0 ) { memoize(input, 36, typeArgument_StartIndex); } 4999 } 5000 dbg.location(649, 5); 5001 5002 } 5003 finally { 5004 dbg.exitRule(getGrammarFileName(), "typeArgument"); 5005 decRuleLevel(); 5006 if ( getRuleLevel()==0 ) {dbg.terminate();} 5007 } 5008 5009 return ; 5010 } 5011 // $ANTLR end "typeArgument" 5012 5013 5014 // $ANTLR start "qualifiedNameList" 5015 // src/com/google/doclava/parser/Java.g:651:1: qualifiedNameList : qualifiedName ( ',' qualifiedName )* ; 5016 public final void qualifiedNameList() throws RecognitionException { 5017 int qualifiedNameList_StartIndex = input.index(); 5018 try { dbg.enterRule(getGrammarFileName(), "qualifiedNameList"); 5019 if ( getRuleLevel()==0 ) {dbg.commence();} 5020 incRuleLevel(); 5021 dbg.location(651, 1); 5022 5023 try { 5024 if ( state.backtracking>0 && alreadyParsedRule(input, 37) ) { return ; } 5025 // src/com/google/doclava/parser/Java.g:652:5: ( qualifiedName ( ',' qualifiedName )* ) 5026 dbg.enterAlt(1); 5027 5028 // src/com/google/doclava/parser/Java.g:652:9: qualifiedName ( ',' qualifiedName )* 5029 { 5030 dbg.location(652,9); 5031 pushFollow(FOLLOW_qualifiedName_in_qualifiedNameList2859); 5032 qualifiedName(); 5033 5034 state._fsp--; 5035 if (state.failed) return ; 5036 dbg.location(653,9); 5037 // src/com/google/doclava/parser/Java.g:653:9: ( ',' qualifiedName )* 5038 try { dbg.enterSubRule(68); 5039 5040 loop68: 5041 do { 5042 int alt68=2; 5043 try { dbg.enterDecision(68, decisionCanBacktrack[68]); 5044 5045 int LA68_0 = input.LA(1); 5046 5047 if ( (LA68_0==COMMA) ) { 5048 alt68=1; 5049 } 5050 5051 5052 } finally {dbg.exitDecision(68);} 5053 5054 switch (alt68) { 5055 case 1 : 5056 dbg.enterAlt(1); 5057 5058 // src/com/google/doclava/parser/Java.g:653:10: ',' qualifiedName 5059 { 5060 dbg.location(653,10); 5061 match(input,COMMA,FOLLOW_COMMA_in_qualifiedNameList2870); if (state.failed) return ; 5062 dbg.location(653,14); 5063 pushFollow(FOLLOW_qualifiedName_in_qualifiedNameList2872); 5064 qualifiedName(); 5065 5066 state._fsp--; 5067 if (state.failed) return ; 5068 5069 } 5070 break; 5071 5072 default : 5073 break loop68; 5074 } 5075 } while (true); 5076 } finally {dbg.exitSubRule(68);} 5077 5078 5079 } 5080 5081 } 5082 catch (RecognitionException re) { 5083 reportError(re); 5084 recover(input,re); 5085 } 5086 finally { 5087 if ( state.backtracking>0 ) { memoize(input, 37, qualifiedNameList_StartIndex); } 5088 } 5089 dbg.location(655, 5); 5090 5091 } 5092 finally { 5093 dbg.exitRule(getGrammarFileName(), "qualifiedNameList"); 5094 decRuleLevel(); 5095 if ( getRuleLevel()==0 ) {dbg.terminate();} 5096 } 5097 5098 return ; 5099 } 5100 // $ANTLR end "qualifiedNameList" 5101 5102 5103 // $ANTLR start "formalParameters" 5104 // src/com/google/doclava/parser/Java.g:657:1: formalParameters : '(' ( formalParameterDecls )? ')' ; 5105 public final void formalParameters() throws RecognitionException { 5106 int formalParameters_StartIndex = input.index(); 5107 try { dbg.enterRule(getGrammarFileName(), "formalParameters"); 5108 if ( getRuleLevel()==0 ) {dbg.commence();} 5109 incRuleLevel(); 5110 dbg.location(657, 1); 5111 5112 try { 5113 if ( state.backtracking>0 && alreadyParsedRule(input, 38) ) { return ; } 5114 // src/com/google/doclava/parser/Java.g:658:5: ( '(' ( formalParameterDecls )? ')' ) 5115 dbg.enterAlt(1); 5116 5117 // src/com/google/doclava/parser/Java.g:658:9: '(' ( formalParameterDecls )? ')' 5118 { 5119 dbg.location(658,9); 5120 match(input,LPAREN,FOLLOW_LPAREN_in_formalParameters2902); if (state.failed) return ; 5121 dbg.location(659,9); 5122 // src/com/google/doclava/parser/Java.g:659:9: ( formalParameterDecls )? 5123 int alt69=2; 5124 try { dbg.enterSubRule(69); 5125 try { dbg.enterDecision(69, decisionCanBacktrack[69]); 5126 5127 int LA69_0 = input.LA(1); 5128 5129 if ( (LA69_0==IDENTIFIER||LA69_0==BOOLEAN||LA69_0==BYTE||LA69_0==CHAR||LA69_0==DOUBLE||LA69_0==FINAL||LA69_0==FLOAT||LA69_0==INT||LA69_0==LONG||LA69_0==SHORT||LA69_0==MONKEYS_AT) ) { 5130 alt69=1; 5131 } 5132 } finally {dbg.exitDecision(69);} 5133 5134 switch (alt69) { 5135 case 1 : 5136 dbg.enterAlt(1); 5137 5138 // src/com/google/doclava/parser/Java.g:659:10: formalParameterDecls 5139 { 5140 dbg.location(659,10); 5141 pushFollow(FOLLOW_formalParameterDecls_in_formalParameters2913); 5142 formalParameterDecls(); 5143 5144 state._fsp--; 5145 if (state.failed) return ; 5146 5147 } 5148 break; 5149 5150 } 5151 } finally {dbg.exitSubRule(69);} 5152 5153 dbg.location(661,9); 5154 match(input,RPAREN,FOLLOW_RPAREN_in_formalParameters2934); if (state.failed) return ; 5155 5156 } 5157 5158 } 5159 catch (RecognitionException re) { 5160 reportError(re); 5161 recover(input,re); 5162 } 5163 finally { 5164 if ( state.backtracking>0 ) { memoize(input, 38, formalParameters_StartIndex); } 5165 } 5166 dbg.location(662, 5); 5167 5168 } 5169 finally { 5170 dbg.exitRule(getGrammarFileName(), "formalParameters"); 5171 decRuleLevel(); 5172 if ( getRuleLevel()==0 ) {dbg.terminate();} 5173 } 5174 5175 return ; 5176 } 5177 // $ANTLR end "formalParameters" 5178 5179 5180 // $ANTLR start "formalParameterDecls" 5181 // src/com/google/doclava/parser/Java.g:664:1: formalParameterDecls : ( ellipsisParameterDecl | normalParameterDecl ( ',' normalParameterDecl )* | ( normalParameterDecl ',' )+ ellipsisParameterDecl ); 5182 public final void formalParameterDecls() throws RecognitionException { 5183 int formalParameterDecls_StartIndex = input.index(); 5184 try { dbg.enterRule(getGrammarFileName(), "formalParameterDecls"); 5185 if ( getRuleLevel()==0 ) {dbg.commence();} 5186 incRuleLevel(); 5187 dbg.location(664, 1); 5188 5189 try { 5190 if ( state.backtracking>0 && alreadyParsedRule(input, 39) ) { return ; } 5191 // src/com/google/doclava/parser/Java.g:665:5: ( ellipsisParameterDecl | normalParameterDecl ( ',' normalParameterDecl )* | ( normalParameterDecl ',' )+ ellipsisParameterDecl ) 5192 int alt72=3; 5193 try { dbg.enterDecision(72, decisionCanBacktrack[72]); 5194 5195 switch ( input.LA(1) ) { 5196 case FINAL: 5197 { 5198 int LA72_1 = input.LA(2); 5199 5200 if ( (synpred96_Java()) ) { 5201 alt72=1; 5202 } 5203 else if ( (synpred98_Java()) ) { 5204 alt72=2; 5205 } 5206 else if ( (true) ) { 5207 alt72=3; 5208 } 5209 else { 5210 if (state.backtracking>0) {state.failed=true; return ;} 5211 NoViableAltException nvae = 5212 new NoViableAltException("", 72, 1, input); 5213 5214 dbg.recognitionException(nvae); 5215 throw nvae; 5216 } 5217 } 5218 break; 5219 case MONKEYS_AT: 5220 { 5221 int LA72_2 = input.LA(2); 5222 5223 if ( (synpred96_Java()) ) { 5224 alt72=1; 5225 } 5226 else if ( (synpred98_Java()) ) { 5227 alt72=2; 5228 } 5229 else if ( (true) ) { 5230 alt72=3; 5231 } 5232 else { 5233 if (state.backtracking>0) {state.failed=true; return ;} 5234 NoViableAltException nvae = 5235 new NoViableAltException("", 72, 2, input); 5236 5237 dbg.recognitionException(nvae); 5238 throw nvae; 5239 } 5240 } 5241 break; 5242 case IDENTIFIER: 5243 { 5244 int LA72_3 = input.LA(2); 5245 5246 if ( (synpred96_Java()) ) { 5247 alt72=1; 5248 } 5249 else if ( (synpred98_Java()) ) { 5250 alt72=2; 5251 } 5252 else if ( (true) ) { 5253 alt72=3; 5254 } 5255 else { 5256 if (state.backtracking>0) {state.failed=true; return ;} 5257 NoViableAltException nvae = 5258 new NoViableAltException("", 72, 3, input); 5259 5260 dbg.recognitionException(nvae); 5261 throw nvae; 5262 } 5263 } 5264 break; 5265 case BOOLEAN: 5266 case BYTE: 5267 case CHAR: 5268 case DOUBLE: 5269 case FLOAT: 5270 case INT: 5271 case LONG: 5272 case SHORT: 5273 { 5274 int LA72_4 = input.LA(2); 5275 5276 if ( (synpred96_Java()) ) { 5277 alt72=1; 5278 } 5279 else if ( (synpred98_Java()) ) { 5280 alt72=2; 5281 } 5282 else if ( (true) ) { 5283 alt72=3; 5284 } 5285 else { 5286 if (state.backtracking>0) {state.failed=true; return ;} 5287 NoViableAltException nvae = 5288 new NoViableAltException("", 72, 4, input); 5289 5290 dbg.recognitionException(nvae); 5291 throw nvae; 5292 } 5293 } 5294 break; 5295 default: 5296 if (state.backtracking>0) {state.failed=true; return ;} 5297 NoViableAltException nvae = 5298 new NoViableAltException("", 72, 0, input); 5299 5300 dbg.recognitionException(nvae); 5301 throw nvae; 5302 } 5303 5304 } finally {dbg.exitDecision(72);} 5305 5306 switch (alt72) { 5307 case 1 : 5308 dbg.enterAlt(1); 5309 5310 // src/com/google/doclava/parser/Java.g:665:9: ellipsisParameterDecl 5311 { 5312 dbg.location(665,9); 5313 pushFollow(FOLLOW_ellipsisParameterDecl_in_formalParameterDecls2953); 5314 ellipsisParameterDecl(); 5315 5316 state._fsp--; 5317 if (state.failed) return ; 5318 5319 } 5320 break; 5321 case 2 : 5322 dbg.enterAlt(2); 5323 5324 // src/com/google/doclava/parser/Java.g:666:9: normalParameterDecl ( ',' normalParameterDecl )* 5325 { 5326 dbg.location(666,9); 5327 pushFollow(FOLLOW_normalParameterDecl_in_formalParameterDecls2963); 5328 normalParameterDecl(); 5329 5330 state._fsp--; 5331 if (state.failed) return ; 5332 dbg.location(667,9); 5333 // src/com/google/doclava/parser/Java.g:667:9: ( ',' normalParameterDecl )* 5334 try { dbg.enterSubRule(70); 5335 5336 loop70: 5337 do { 5338 int alt70=2; 5339 try { dbg.enterDecision(70, decisionCanBacktrack[70]); 5340 5341 int LA70_0 = input.LA(1); 5342 5343 if ( (LA70_0==COMMA) ) { 5344 alt70=1; 5345 } 5346 5347 5348 } finally {dbg.exitDecision(70);} 5349 5350 switch (alt70) { 5351 case 1 : 5352 dbg.enterAlt(1); 5353 5354 // src/com/google/doclava/parser/Java.g:667:10: ',' normalParameterDecl 5355 { 5356 dbg.location(667,10); 5357 match(input,COMMA,FOLLOW_COMMA_in_formalParameterDecls2974); if (state.failed) return ; 5358 dbg.location(667,14); 5359 pushFollow(FOLLOW_normalParameterDecl_in_formalParameterDecls2976); 5360 normalParameterDecl(); 5361 5362 state._fsp--; 5363 if (state.failed) return ; 5364 5365 } 5366 break; 5367 5368 default : 5369 break loop70; 5370 } 5371 } while (true); 5372 } finally {dbg.exitSubRule(70);} 5373 5374 5375 } 5376 break; 5377 case 3 : 5378 dbg.enterAlt(3); 5379 5380 // src/com/google/doclava/parser/Java.g:669:9: ( normalParameterDecl ',' )+ ellipsisParameterDecl 5381 { 5382 dbg.location(669,9); 5383 // src/com/google/doclava/parser/Java.g:669:9: ( normalParameterDecl ',' )+ 5384 int cnt71=0; 5385 try { dbg.enterSubRule(71); 5386 5387 loop71: 5388 do { 5389 int alt71=2; 5390 try { dbg.enterDecision(71, decisionCanBacktrack[71]); 5391 5392 switch ( input.LA(1) ) { 5393 case FINAL: 5394 { 5395 int LA71_1 = input.LA(2); 5396 5397 if ( (synpred99_Java()) ) { 5398 alt71=1; 5399 } 5400 5401 5402 } 5403 break; 5404 case MONKEYS_AT: 5405 { 5406 int LA71_2 = input.LA(2); 5407 5408 if ( (synpred99_Java()) ) { 5409 alt71=1; 5410 } 5411 5412 5413 } 5414 break; 5415 case IDENTIFIER: 5416 { 5417 int LA71_3 = input.LA(2); 5418 5419 if ( (synpred99_Java()) ) { 5420 alt71=1; 5421 } 5422 5423 5424 } 5425 break; 5426 case BOOLEAN: 5427 case BYTE: 5428 case CHAR: 5429 case DOUBLE: 5430 case FLOAT: 5431 case INT: 5432 case LONG: 5433 case SHORT: 5434 { 5435 int LA71_4 = input.LA(2); 5436 5437 if ( (synpred99_Java()) ) { 5438 alt71=1; 5439 } 5440 5441 5442 } 5443 break; 5444 5445 } 5446 5447 } finally {dbg.exitDecision(71);} 5448 5449 switch (alt71) { 5450 case 1 : 5451 dbg.enterAlt(1); 5452 5453 // src/com/google/doclava/parser/Java.g:669:10: normalParameterDecl ',' 5454 { 5455 dbg.location(669,10); 5456 pushFollow(FOLLOW_normalParameterDecl_in_formalParameterDecls2998); 5457 normalParameterDecl(); 5458 5459 state._fsp--; 5460 if (state.failed) return ; 5461 dbg.location(670,9); 5462 match(input,COMMA,FOLLOW_COMMA_in_formalParameterDecls3008); if (state.failed) return ; 5463 5464 } 5465 break; 5466 5467 default : 5468 if ( cnt71 >= 1 ) break loop71; 5469 if (state.backtracking>0) {state.failed=true; return ;} 5470 EarlyExitException eee = 5471 new EarlyExitException(71, input); 5472 dbg.recognitionException(eee); 5473 5474 throw eee; 5475 } 5476 cnt71++; 5477 } while (true); 5478 } finally {dbg.exitSubRule(71);} 5479 5480 dbg.location(672,9); 5481 pushFollow(FOLLOW_ellipsisParameterDecl_in_formalParameterDecls3029); 5482 ellipsisParameterDecl(); 5483 5484 state._fsp--; 5485 if (state.failed) return ; 5486 5487 } 5488 break; 5489 5490 } 5491 } 5492 catch (RecognitionException re) { 5493 reportError(re); 5494 recover(input,re); 5495 } 5496 finally { 5497 if ( state.backtracking>0 ) { memoize(input, 39, formalParameterDecls_StartIndex); } 5498 } 5499 dbg.location(673, 5); 5500 5501 } 5502 finally { 5503 dbg.exitRule(getGrammarFileName(), "formalParameterDecls"); 5504 decRuleLevel(); 5505 if ( getRuleLevel()==0 ) {dbg.terminate();} 5506 } 5507 5508 return ; 5509 } 5510 // $ANTLR end "formalParameterDecls" 5511 5512 5513 // $ANTLR start "normalParameterDecl" 5514 // src/com/google/doclava/parser/Java.g:675:1: normalParameterDecl : variableModifiers type IDENTIFIER ( '[' ']' )* ; 5515 public final void normalParameterDecl() throws RecognitionException { 5516 int normalParameterDecl_StartIndex = input.index(); 5517 try { dbg.enterRule(getGrammarFileName(), "normalParameterDecl"); 5518 if ( getRuleLevel()==0 ) {dbg.commence();} 5519 incRuleLevel(); 5520 dbg.location(675, 1); 5521 5522 try { 5523 if ( state.backtracking>0 && alreadyParsedRule(input, 40) ) { return ; } 5524 // src/com/google/doclava/parser/Java.g:676:5: ( variableModifiers type IDENTIFIER ( '[' ']' )* ) 5525 dbg.enterAlt(1); 5526 5527 // src/com/google/doclava/parser/Java.g:676:9: variableModifiers type IDENTIFIER ( '[' ']' )* 5528 { 5529 dbg.location(676,9); 5530 pushFollow(FOLLOW_variableModifiers_in_normalParameterDecl3048); 5531 variableModifiers(); 5532 5533 state._fsp--; 5534 if (state.failed) return ; 5535 dbg.location(676,27); 5536 pushFollow(FOLLOW_type_in_normalParameterDecl3050); 5537 type(); 5538 5539 state._fsp--; 5540 if (state.failed) return ; 5541 dbg.location(676,32); 5542 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_normalParameterDecl3052); if (state.failed) return ; 5543 dbg.location(677,9); 5544 // src/com/google/doclava/parser/Java.g:677:9: ( '[' ']' )* 5545 try { dbg.enterSubRule(73); 5546 5547 loop73: 5548 do { 5549 int alt73=2; 5550 try { dbg.enterDecision(73, decisionCanBacktrack[73]); 5551 5552 int LA73_0 = input.LA(1); 5553 5554 if ( (LA73_0==LBRACKET) ) { 5555 alt73=1; 5556 } 5557 5558 5559 } finally {dbg.exitDecision(73);} 5560 5561 switch (alt73) { 5562 case 1 : 5563 dbg.enterAlt(1); 5564 5565 // src/com/google/doclava/parser/Java.g:677:10: '[' ']' 5566 { 5567 dbg.location(677,10); 5568 match(input,LBRACKET,FOLLOW_LBRACKET_in_normalParameterDecl3063); if (state.failed) return ; 5569 dbg.location(677,14); 5570 match(input,RBRACKET,FOLLOW_RBRACKET_in_normalParameterDecl3065); if (state.failed) return ; 5571 5572 } 5573 break; 5574 5575 default : 5576 break loop73; 5577 } 5578 } while (true); 5579 } finally {dbg.exitSubRule(73);} 5580 5581 5582 } 5583 5584 } 5585 catch (RecognitionException re) { 5586 reportError(re); 5587 recover(input,re); 5588 } 5589 finally { 5590 if ( state.backtracking>0 ) { memoize(input, 40, normalParameterDecl_StartIndex); } 5591 } 5592 dbg.location(679, 5); 5593 5594 } 5595 finally { 5596 dbg.exitRule(getGrammarFileName(), "normalParameterDecl"); 5597 decRuleLevel(); 5598 if ( getRuleLevel()==0 ) {dbg.terminate();} 5599 } 5600 5601 return ; 5602 } 5603 // $ANTLR end "normalParameterDecl" 5604 5605 5606 // $ANTLR start "ellipsisParameterDecl" 5607 // src/com/google/doclava/parser/Java.g:681:1: ellipsisParameterDecl : variableModifiers type '...' IDENTIFIER ; 5608 public final void ellipsisParameterDecl() throws RecognitionException { 5609 int ellipsisParameterDecl_StartIndex = input.index(); 5610 try { dbg.enterRule(getGrammarFileName(), "ellipsisParameterDecl"); 5611 if ( getRuleLevel()==0 ) {dbg.commence();} 5612 incRuleLevel(); 5613 dbg.location(681, 1); 5614 5615 try { 5616 if ( state.backtracking>0 && alreadyParsedRule(input, 41) ) { return ; } 5617 // src/com/google/doclava/parser/Java.g:682:5: ( variableModifiers type '...' IDENTIFIER ) 5618 dbg.enterAlt(1); 5619 5620 // src/com/google/doclava/parser/Java.g:682:9: variableModifiers type '...' IDENTIFIER 5621 { 5622 dbg.location(682,9); 5623 pushFollow(FOLLOW_variableModifiers_in_ellipsisParameterDecl3095); 5624 variableModifiers(); 5625 5626 state._fsp--; 5627 if (state.failed) return ; 5628 dbg.location(683,9); 5629 pushFollow(FOLLOW_type_in_ellipsisParameterDecl3105); 5630 type(); 5631 5632 state._fsp--; 5633 if (state.failed) return ; 5634 dbg.location(683,15); 5635 match(input,ELLIPSIS,FOLLOW_ELLIPSIS_in_ellipsisParameterDecl3108); if (state.failed) return ; 5636 dbg.location(684,9); 5637 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_ellipsisParameterDecl3118); if (state.failed) return ; 5638 5639 } 5640 5641 } 5642 catch (RecognitionException re) { 5643 reportError(re); 5644 recover(input,re); 5645 } 5646 finally { 5647 if ( state.backtracking>0 ) { memoize(input, 41, ellipsisParameterDecl_StartIndex); } 5648 } 5649 dbg.location(685, 5); 5650 5651 } 5652 finally { 5653 dbg.exitRule(getGrammarFileName(), "ellipsisParameterDecl"); 5654 decRuleLevel(); 5655 if ( getRuleLevel()==0 ) {dbg.terminate();} 5656 } 5657 5658 return ; 5659 } 5660 // $ANTLR end "ellipsisParameterDecl" 5661 5662 5663 // $ANTLR start "explicitConstructorInvocation" 5664 // src/com/google/doclava/parser/Java.g:688:1: explicitConstructorInvocation : ( ( nonWildcardTypeArguments )? ( 'this' | 'super' ) arguments ';' | primary '.' ( nonWildcardTypeArguments )? 'super' arguments ';' ); 5665 public final void explicitConstructorInvocation() throws RecognitionException { 5666 int explicitConstructorInvocation_StartIndex = input.index(); 5667 try { dbg.enterRule(getGrammarFileName(), "explicitConstructorInvocation"); 5668 if ( getRuleLevel()==0 ) {dbg.commence();} 5669 incRuleLevel(); 5670 dbg.location(688, 1); 5671 5672 try { 5673 if ( state.backtracking>0 && alreadyParsedRule(input, 42) ) { return ; } 5674 // src/com/google/doclava/parser/Java.g:689:5: ( ( nonWildcardTypeArguments )? ( 'this' | 'super' ) arguments ';' | primary '.' ( nonWildcardTypeArguments )? 'super' arguments ';' ) 5675 int alt76=2; 5676 try { dbg.enterDecision(76, decisionCanBacktrack[76]); 5677 5678 try { 5679 isCyclicDecision = true; 5680 alt76 = dfa76.predict(input); 5681 } 5682 catch (NoViableAltException nvae) { 5683 dbg.recognitionException(nvae); 5684 throw nvae; 5685 } 5686 } finally {dbg.exitDecision(76);} 5687 5688 switch (alt76) { 5689 case 1 : 5690 dbg.enterAlt(1); 5691 5692 // src/com/google/doclava/parser/Java.g:689:9: ( nonWildcardTypeArguments )? ( 'this' | 'super' ) arguments ';' 5693 { 5694 dbg.location(689,9); 5695 // src/com/google/doclava/parser/Java.g:689:9: ( nonWildcardTypeArguments )? 5696 int alt74=2; 5697 try { dbg.enterSubRule(74); 5698 try { dbg.enterDecision(74, decisionCanBacktrack[74]); 5699 5700 int LA74_0 = input.LA(1); 5701 5702 if ( (LA74_0==LT) ) { 5703 alt74=1; 5704 } 5705 } finally {dbg.exitDecision(74);} 5706 5707 switch (alt74) { 5708 case 1 : 5709 dbg.enterAlt(1); 5710 5711 // src/com/google/doclava/parser/Java.g:689:10: nonWildcardTypeArguments 5712 { 5713 dbg.location(689,10); 5714 pushFollow(FOLLOW_nonWildcardTypeArguments_in_explicitConstructorInvocation3139); 5715 nonWildcardTypeArguments(); 5716 5717 state._fsp--; 5718 if (state.failed) return ; 5719 5720 } 5721 break; 5722 5723 } 5724 } finally {dbg.exitSubRule(74);} 5725 5726 dbg.location(691,9); 5727 if ( input.LA(1)==SUPER||input.LA(1)==THIS ) { 5728 input.consume(); 5729 state.errorRecovery=false;state.failed=false; 5730 } 5731 else { 5732 if (state.backtracking>0) {state.failed=true; return ;} 5733 MismatchedSetException mse = new MismatchedSetException(null,input); 5734 dbg.recognitionException(mse); 5735 throw mse; 5736 } 5737 5738 dbg.location(694,9); 5739 pushFollow(FOLLOW_arguments_in_explicitConstructorInvocation3197); 5740 arguments(); 5741 5742 state._fsp--; 5743 if (state.failed) return ; 5744 dbg.location(694,19); 5745 match(input,SEMI,FOLLOW_SEMI_in_explicitConstructorInvocation3199); if (state.failed) return ; 5746 5747 } 5748 break; 5749 case 2 : 5750 dbg.enterAlt(2); 5751 5752 // src/com/google/doclava/parser/Java.g:696:9: primary '.' ( nonWildcardTypeArguments )? 'super' arguments ';' 5753 { 5754 dbg.location(696,9); 5755 pushFollow(FOLLOW_primary_in_explicitConstructorInvocation3210); 5756 primary(); 5757 5758 state._fsp--; 5759 if (state.failed) return ; 5760 dbg.location(697,9); 5761 match(input,DOT,FOLLOW_DOT_in_explicitConstructorInvocation3220); if (state.failed) return ; 5762 dbg.location(698,9); 5763 // src/com/google/doclava/parser/Java.g:698:9: ( nonWildcardTypeArguments )? 5764 int alt75=2; 5765 try { dbg.enterSubRule(75); 5766 try { dbg.enterDecision(75, decisionCanBacktrack[75]); 5767 5768 int LA75_0 = input.LA(1); 5769 5770 if ( (LA75_0==LT) ) { 5771 alt75=1; 5772 } 5773 } finally {dbg.exitDecision(75);} 5774 5775 switch (alt75) { 5776 case 1 : 5777 dbg.enterAlt(1); 5778 5779 // src/com/google/doclava/parser/Java.g:698:10: nonWildcardTypeArguments 5780 { 5781 dbg.location(698,10); 5782 pushFollow(FOLLOW_nonWildcardTypeArguments_in_explicitConstructorInvocation3231); 5783 nonWildcardTypeArguments(); 5784 5785 state._fsp--; 5786 if (state.failed) return ; 5787 5788 } 5789 break; 5790 5791 } 5792 } finally {dbg.exitSubRule(75);} 5793 5794 dbg.location(700,9); 5795 match(input,SUPER,FOLLOW_SUPER_in_explicitConstructorInvocation3252); if (state.failed) return ; 5796 dbg.location(701,9); 5797 pushFollow(FOLLOW_arguments_in_explicitConstructorInvocation3262); 5798 arguments(); 5799 5800 state._fsp--; 5801 if (state.failed) return ; 5802 dbg.location(701,19); 5803 match(input,SEMI,FOLLOW_SEMI_in_explicitConstructorInvocation3264); if (state.failed) return ; 5804 5805 } 5806 break; 5807 5808 } 5809 } 5810 catch (RecognitionException re) { 5811 reportError(re); 5812 recover(input,re); 5813 } 5814 finally { 5815 if ( state.backtracking>0 ) { memoize(input, 42, explicitConstructorInvocation_StartIndex); } 5816 } 5817 dbg.location(702, 5); 5818 5819 } 5820 finally { 5821 dbg.exitRule(getGrammarFileName(), "explicitConstructorInvocation"); 5822 decRuleLevel(); 5823 if ( getRuleLevel()==0 ) {dbg.terminate();} 5824 } 5825 5826 return ; 5827 } 5828 // $ANTLR end "explicitConstructorInvocation" 5829 5830 5831 // $ANTLR start "qualifiedName" 5832 // src/com/google/doclava/parser/Java.g:704:1: qualifiedName : IDENTIFIER ( '.' IDENTIFIER )* ; 5833 public final void qualifiedName() throws RecognitionException { 5834 int qualifiedName_StartIndex = input.index(); 5835 try { dbg.enterRule(getGrammarFileName(), "qualifiedName"); 5836 if ( getRuleLevel()==0 ) {dbg.commence();} 5837 incRuleLevel(); 5838 dbg.location(704, 1); 5839 5840 try { 5841 if ( state.backtracking>0 && alreadyParsedRule(input, 43) ) { return ; } 5842 // src/com/google/doclava/parser/Java.g:705:5: ( IDENTIFIER ( '.' IDENTIFIER )* ) 5843 dbg.enterAlt(1); 5844 5845 // src/com/google/doclava/parser/Java.g:705:9: IDENTIFIER ( '.' IDENTIFIER )* 5846 { 5847 dbg.location(705,9); 5848 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_qualifiedName3283); if (state.failed) return ; 5849 dbg.location(706,9); 5850 // src/com/google/doclava/parser/Java.g:706:9: ( '.' IDENTIFIER )* 5851 try { dbg.enterSubRule(77); 5852 5853 loop77: 5854 do { 5855 int alt77=2; 5856 try { dbg.enterDecision(77, decisionCanBacktrack[77]); 5857 5858 int LA77_0 = input.LA(1); 5859 5860 if ( (LA77_0==DOT) ) { 5861 alt77=1; 5862 } 5863 5864 5865 } finally {dbg.exitDecision(77);} 5866 5867 switch (alt77) { 5868 case 1 : 5869 dbg.enterAlt(1); 5870 5871 // src/com/google/doclava/parser/Java.g:706:10: '.' IDENTIFIER 5872 { 5873 dbg.location(706,10); 5874 match(input,DOT,FOLLOW_DOT_in_qualifiedName3294); if (state.failed) return ; 5875 dbg.location(706,14); 5876 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_qualifiedName3296); if (state.failed) return ; 5877 5878 } 5879 break; 5880 5881 default : 5882 break loop77; 5883 } 5884 } while (true); 5885 } finally {dbg.exitSubRule(77);} 5886 5887 5888 } 5889 5890 } 5891 catch (RecognitionException re) { 5892 reportError(re); 5893 recover(input,re); 5894 } 5895 finally { 5896 if ( state.backtracking>0 ) { memoize(input, 43, qualifiedName_StartIndex); } 5897 } 5898 dbg.location(708, 5); 5899 5900 } 5901 finally { 5902 dbg.exitRule(getGrammarFileName(), "qualifiedName"); 5903 decRuleLevel(); 5904 if ( getRuleLevel()==0 ) {dbg.terminate();} 5905 } 5906 5907 return ; 5908 } 5909 // $ANTLR end "qualifiedName" 5910 5911 5912 // $ANTLR start "annotations" 5913 // src/com/google/doclava/parser/Java.g:710:1: annotations : ( annotation )+ ; 5914 public final void annotations() throws RecognitionException { 5915 int annotations_StartIndex = input.index(); 5916 try { dbg.enterRule(getGrammarFileName(), "annotations"); 5917 if ( getRuleLevel()==0 ) {dbg.commence();} 5918 incRuleLevel(); 5919 dbg.location(710, 1); 5920 5921 try { 5922 if ( state.backtracking>0 && alreadyParsedRule(input, 44) ) { return ; } 5923 // src/com/google/doclava/parser/Java.g:711:5: ( ( annotation )+ ) 5924 dbg.enterAlt(1); 5925 5926 // src/com/google/doclava/parser/Java.g:711:9: ( annotation )+ 5927 { 5928 dbg.location(711,9); 5929 // src/com/google/doclava/parser/Java.g:711:9: ( annotation )+ 5930 int cnt78=0; 5931 try { dbg.enterSubRule(78); 5932 5933 loop78: 5934 do { 5935 int alt78=2; 5936 try { dbg.enterDecision(78, decisionCanBacktrack[78]); 5937 5938 int LA78_0 = input.LA(1); 5939 5940 if ( (LA78_0==MONKEYS_AT) ) { 5941 alt78=1; 5942 } 5943 5944 5945 } finally {dbg.exitDecision(78);} 5946 5947 switch (alt78) { 5948 case 1 : 5949 dbg.enterAlt(1); 5950 5951 // src/com/google/doclava/parser/Java.g:711:10: annotation 5952 { 5953 dbg.location(711,10); 5954 pushFollow(FOLLOW_annotation_in_annotations3327); 5955 annotation(); 5956 5957 state._fsp--; 5958 if (state.failed) return ; 5959 5960 } 5961 break; 5962 5963 default : 5964 if ( cnt78 >= 1 ) break loop78; 5965 if (state.backtracking>0) {state.failed=true; return ;} 5966 EarlyExitException eee = 5967 new EarlyExitException(78, input); 5968 dbg.recognitionException(eee); 5969 5970 throw eee; 5971 } 5972 cnt78++; 5973 } while (true); 5974 } finally {dbg.exitSubRule(78);} 5975 5976 5977 } 5978 5979 } 5980 catch (RecognitionException re) { 5981 reportError(re); 5982 recover(input,re); 5983 } 5984 finally { 5985 if ( state.backtracking>0 ) { memoize(input, 44, annotations_StartIndex); } 5986 } 5987 dbg.location(713, 5); 5988 5989 } 5990 finally { 5991 dbg.exitRule(getGrammarFileName(), "annotations"); 5992 decRuleLevel(); 5993 if ( getRuleLevel()==0 ) {dbg.terminate();} 5994 } 5995 5996 return ; 5997 } 5998 // $ANTLR end "annotations" 5999 6000 6001 // $ANTLR start "annotation" 6002 // src/com/google/doclava/parser/Java.g:715:1: annotation : '@' qualifiedName ( '(' ( elementValuePairs | elementValue )? ')' )? ; 6003 public final void annotation() throws RecognitionException { 6004 int annotation_StartIndex = input.index(); 6005 try { dbg.enterRule(getGrammarFileName(), "annotation"); 6006 if ( getRuleLevel()==0 ) {dbg.commence();} 6007 incRuleLevel(); 6008 dbg.location(715, 1); 6009 6010 try { 6011 if ( state.backtracking>0 && alreadyParsedRule(input, 45) ) { return ; } 6012 // src/com/google/doclava/parser/Java.g:720:5: ( '@' qualifiedName ( '(' ( elementValuePairs | elementValue )? ')' )? ) 6013 dbg.enterAlt(1); 6014 6015 // src/com/google/doclava/parser/Java.g:720:9: '@' qualifiedName ( '(' ( elementValuePairs | elementValue )? ')' )? 6016 { 6017 dbg.location(720,9); 6018 match(input,MONKEYS_AT,FOLLOW_MONKEYS_AT_in_annotation3359); if (state.failed) return ; 6019 dbg.location(720,13); 6020 pushFollow(FOLLOW_qualifiedName_in_annotation3361); 6021 qualifiedName(); 6022 6023 state._fsp--; 6024 if (state.failed) return ; 6025 dbg.location(721,9); 6026 // src/com/google/doclava/parser/Java.g:721:9: ( '(' ( elementValuePairs | elementValue )? ')' )? 6027 int alt80=2; 6028 try { dbg.enterSubRule(80); 6029 try { dbg.enterDecision(80, decisionCanBacktrack[80]); 6030 6031 int LA80_0 = input.LA(1); 6032 6033 if ( (LA80_0==LPAREN) ) { 6034 alt80=1; 6035 } 6036 } finally {dbg.exitDecision(80);} 6037 6038 switch (alt80) { 6039 case 1 : 6040 dbg.enterAlt(1); 6041 6042 // src/com/google/doclava/parser/Java.g:721:13: '(' ( elementValuePairs | elementValue )? ')' 6043 { 6044 dbg.location(721,13); 6045 match(input,LPAREN,FOLLOW_LPAREN_in_annotation3375); if (state.failed) return ; 6046 dbg.location(722,19); 6047 // src/com/google/doclava/parser/Java.g:722:19: ( elementValuePairs | elementValue )? 6048 int alt79=3; 6049 try { dbg.enterSubRule(79); 6050 try { dbg.enterDecision(79, decisionCanBacktrack[79]); 6051 6052 int LA79_0 = input.LA(1); 6053 6054 if ( (LA79_0==IDENTIFIER) ) { 6055 int LA79_1 = input.LA(2); 6056 6057 if ( (LA79_1==EQ) ) { 6058 alt79=1; 6059 } 6060 else if ( (LA79_1==INSTANCEOF||(LA79_1>=LPAREN && LA79_1<=RPAREN)||LA79_1==LBRACKET||LA79_1==DOT||LA79_1==QUES||(LA79_1>=EQEQ && LA79_1<=PERCENT)||(LA79_1>=BANGEQ && LA79_1<=LT)) ) { 6061 alt79=2; 6062 } 6063 } 6064 else if ( ((LA79_0>=INTLITERAL && LA79_0<=NULL)||LA79_0==BOOLEAN||LA79_0==BYTE||LA79_0==CHAR||LA79_0==DOUBLE||LA79_0==FLOAT||LA79_0==INT||LA79_0==LONG||LA79_0==NEW||LA79_0==SHORT||LA79_0==SUPER||LA79_0==THIS||LA79_0==VOID||LA79_0==LPAREN||LA79_0==LBRACE||(LA79_0>=BANG && LA79_0<=TILDE)||(LA79_0>=PLUSPLUS && LA79_0<=SUB)||LA79_0==MONKEYS_AT) ) { 6065 alt79=2; 6066 } 6067 } finally {dbg.exitDecision(79);} 6068 6069 switch (alt79) { 6070 case 1 : 6071 dbg.enterAlt(1); 6072 6073 // src/com/google/doclava/parser/Java.g:722:23: elementValuePairs 6074 { 6075 dbg.location(722,23); 6076 pushFollow(FOLLOW_elementValuePairs_in_annotation3399); 6077 elementValuePairs(); 6078 6079 state._fsp--; 6080 if (state.failed) return ; 6081 6082 } 6083 break; 6084 case 2 : 6085 dbg.enterAlt(2); 6086 6087 // src/com/google/doclava/parser/Java.g:723:23: elementValue 6088 { 6089 dbg.location(723,23); 6090 pushFollow(FOLLOW_elementValue_in_annotation3423); 6091 elementValue(); 6092 6093 state._fsp--; 6094 if (state.failed) return ; 6095 6096 } 6097 break; 6098 6099 } 6100 } finally {dbg.exitSubRule(79);} 6101 6102 dbg.location(725,13); 6103 match(input,RPAREN,FOLLOW_RPAREN_in_annotation3458); if (state.failed) return ; 6104 6105 } 6106 break; 6107 6108 } 6109 } finally {dbg.exitSubRule(80);} 6110 6111 6112 } 6113 6114 } 6115 catch (RecognitionException re) { 6116 reportError(re); 6117 recover(input,re); 6118 } 6119 finally { 6120 if ( state.backtracking>0 ) { memoize(input, 45, annotation_StartIndex); } 6121 } 6122 dbg.location(727, 5); 6123 6124 } 6125 finally { 6126 dbg.exitRule(getGrammarFileName(), "annotation"); 6127 decRuleLevel(); 6128 if ( getRuleLevel()==0 ) {dbg.terminate();} 6129 } 6130 6131 return ; 6132 } 6133 // $ANTLR end "annotation" 6134 6135 6136 // $ANTLR start "elementValuePairs" 6137 // src/com/google/doclava/parser/Java.g:729:1: elementValuePairs : elementValuePair ( ',' elementValuePair )* ; 6138 public final void elementValuePairs() throws RecognitionException { 6139 int elementValuePairs_StartIndex = input.index(); 6140 try { dbg.enterRule(getGrammarFileName(), "elementValuePairs"); 6141 if ( getRuleLevel()==0 ) {dbg.commence();} 6142 incRuleLevel(); 6143 dbg.location(729, 1); 6144 6145 try { 6146 if ( state.backtracking>0 && alreadyParsedRule(input, 46) ) { return ; } 6147 // src/com/google/doclava/parser/Java.g:730:5: ( elementValuePair ( ',' elementValuePair )* ) 6148 dbg.enterAlt(1); 6149 6150 // src/com/google/doclava/parser/Java.g:730:9: elementValuePair ( ',' elementValuePair )* 6151 { 6152 dbg.location(730,9); 6153 pushFollow(FOLLOW_elementValuePair_in_elementValuePairs3488); 6154 elementValuePair(); 6155 6156 state._fsp--; 6157 if (state.failed) return ; 6158 dbg.location(731,9); 6159 // src/com/google/doclava/parser/Java.g:731:9: ( ',' elementValuePair )* 6160 try { dbg.enterSubRule(81); 6161 6162 loop81: 6163 do { 6164 int alt81=2; 6165 try { dbg.enterDecision(81, decisionCanBacktrack[81]); 6166 6167 int LA81_0 = input.LA(1); 6168 6169 if ( (LA81_0==COMMA) ) { 6170 alt81=1; 6171 } 6172 6173 6174 } finally {dbg.exitDecision(81);} 6175 6176 switch (alt81) { 6177 case 1 : 6178 dbg.enterAlt(1); 6179 6180 // src/com/google/doclava/parser/Java.g:731:10: ',' elementValuePair 6181 { 6182 dbg.location(731,10); 6183 match(input,COMMA,FOLLOW_COMMA_in_elementValuePairs3499); if (state.failed) return ; 6184 dbg.location(731,14); 6185 pushFollow(FOLLOW_elementValuePair_in_elementValuePairs3501); 6186 elementValuePair(); 6187 6188 state._fsp--; 6189 if (state.failed) return ; 6190 6191 } 6192 break; 6193 6194 default : 6195 break loop81; 6196 } 6197 } while (true); 6198 } finally {dbg.exitSubRule(81);} 6199 6200 6201 } 6202 6203 } 6204 catch (RecognitionException re) { 6205 reportError(re); 6206 recover(input,re); 6207 } 6208 finally { 6209 if ( state.backtracking>0 ) { memoize(input, 46, elementValuePairs_StartIndex); } 6210 } 6211 dbg.location(733, 5); 6212 6213 } 6214 finally { 6215 dbg.exitRule(getGrammarFileName(), "elementValuePairs"); 6216 decRuleLevel(); 6217 if ( getRuleLevel()==0 ) {dbg.terminate();} 6218 } 6219 6220 return ; 6221 } 6222 // $ANTLR end "elementValuePairs" 6223 6224 6225 // $ANTLR start "elementValuePair" 6226 // src/com/google/doclava/parser/Java.g:735:1: elementValuePair : IDENTIFIER '=' elementValue ; 6227 public final void elementValuePair() throws RecognitionException { 6228 int elementValuePair_StartIndex = input.index(); 6229 try { dbg.enterRule(getGrammarFileName(), "elementValuePair"); 6230 if ( getRuleLevel()==0 ) {dbg.commence();} 6231 incRuleLevel(); 6232 dbg.location(735, 1); 6233 6234 try { 6235 if ( state.backtracking>0 && alreadyParsedRule(input, 47) ) { return ; } 6236 // src/com/google/doclava/parser/Java.g:736:5: ( IDENTIFIER '=' elementValue ) 6237 dbg.enterAlt(1); 6238 6239 // src/com/google/doclava/parser/Java.g:736:9: IDENTIFIER '=' elementValue 6240 { 6241 dbg.location(736,9); 6242 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_elementValuePair3531); if (state.failed) return ; 6243 dbg.location(736,20); 6244 match(input,EQ,FOLLOW_EQ_in_elementValuePair3533); if (state.failed) return ; 6245 dbg.location(736,24); 6246 pushFollow(FOLLOW_elementValue_in_elementValuePair3535); 6247 elementValue(); 6248 6249 state._fsp--; 6250 if (state.failed) return ; 6251 6252 } 6253 6254 } 6255 catch (RecognitionException re) { 6256 reportError(re); 6257 recover(input,re); 6258 } 6259 finally { 6260 if ( state.backtracking>0 ) { memoize(input, 47, elementValuePair_StartIndex); } 6261 } 6262 dbg.location(737, 5); 6263 6264 } 6265 finally { 6266 dbg.exitRule(getGrammarFileName(), "elementValuePair"); 6267 decRuleLevel(); 6268 if ( getRuleLevel()==0 ) {dbg.terminate();} 6269 } 6270 6271 return ; 6272 } 6273 // $ANTLR end "elementValuePair" 6274 6275 6276 // $ANTLR start "elementValue" 6277 // src/com/google/doclava/parser/Java.g:739:1: elementValue : ( conditionalExpression | annotation | elementValueArrayInitializer ); 6278 public final void elementValue() throws RecognitionException { 6279 int elementValue_StartIndex = input.index(); 6280 try { dbg.enterRule(getGrammarFileName(), "elementValue"); 6281 if ( getRuleLevel()==0 ) {dbg.commence();} 6282 incRuleLevel(); 6283 dbg.location(739, 1); 6284 6285 try { 6286 if ( state.backtracking>0 && alreadyParsedRule(input, 48) ) { return ; } 6287 // src/com/google/doclava/parser/Java.g:740:5: ( conditionalExpression | annotation | elementValueArrayInitializer ) 6288 int alt82=3; 6289 try { dbg.enterDecision(82, decisionCanBacktrack[82]); 6290 6291 switch ( input.LA(1) ) { 6292 case IDENTIFIER: 6293 case INTLITERAL: 6294 case LONGLITERAL: 6295 case FLOATLITERAL: 6296 case DOUBLELITERAL: 6297 case CHARLITERAL: 6298 case STRINGLITERAL: 6299 case TRUE: 6300 case FALSE: 6301 case NULL: 6302 case BOOLEAN: 6303 case BYTE: 6304 case CHAR: 6305 case DOUBLE: 6306 case FLOAT: 6307 case INT: 6308 case LONG: 6309 case NEW: 6310 case SHORT: 6311 case SUPER: 6312 case THIS: 6313 case VOID: 6314 case LPAREN: 6315 case BANG: 6316 case TILDE: 6317 case PLUSPLUS: 6318 case SUBSUB: 6319 case PLUS: 6320 case SUB: 6321 { 6322 alt82=1; 6323 } 6324 break; 6325 case MONKEYS_AT: 6326 { 6327 alt82=2; 6328 } 6329 break; 6330 case LBRACE: 6331 { 6332 alt82=3; 6333 } 6334 break; 6335 default: 6336 if (state.backtracking>0) {state.failed=true; return ;} 6337 NoViableAltException nvae = 6338 new NoViableAltException("", 82, 0, input); 6339 6340 dbg.recognitionException(nvae); 6341 throw nvae; 6342 } 6343 6344 } finally {dbg.exitDecision(82);} 6345 6346 switch (alt82) { 6347 case 1 : 6348 dbg.enterAlt(1); 6349 6350 // src/com/google/doclava/parser/Java.g:740:9: conditionalExpression 6351 { 6352 dbg.location(740,9); 6353 pushFollow(FOLLOW_conditionalExpression_in_elementValue3554); 6354 conditionalExpression(); 6355 6356 state._fsp--; 6357 if (state.failed) return ; 6358 6359 } 6360 break; 6361 case 2 : 6362 dbg.enterAlt(2); 6363 6364 // src/com/google/doclava/parser/Java.g:741:9: annotation 6365 { 6366 dbg.location(741,9); 6367 pushFollow(FOLLOW_annotation_in_elementValue3564); 6368 annotation(); 6369 6370 state._fsp--; 6371 if (state.failed) return ; 6372 6373 } 6374 break; 6375 case 3 : 6376 dbg.enterAlt(3); 6377 6378 // src/com/google/doclava/parser/Java.g:742:9: elementValueArrayInitializer 6379 { 6380 dbg.location(742,9); 6381 pushFollow(FOLLOW_elementValueArrayInitializer_in_elementValue3574); 6382 elementValueArrayInitializer(); 6383 6384 state._fsp--; 6385 if (state.failed) return ; 6386 6387 } 6388 break; 6389 6390 } 6391 } 6392 catch (RecognitionException re) { 6393 reportError(re); 6394 recover(input,re); 6395 } 6396 finally { 6397 if ( state.backtracking>0 ) { memoize(input, 48, elementValue_StartIndex); } 6398 } 6399 dbg.location(743, 5); 6400 6401 } 6402 finally { 6403 dbg.exitRule(getGrammarFileName(), "elementValue"); 6404 decRuleLevel(); 6405 if ( getRuleLevel()==0 ) {dbg.terminate();} 6406 } 6407 6408 return ; 6409 } 6410 // $ANTLR end "elementValue" 6411 6412 6413 // $ANTLR start "elementValueArrayInitializer" 6414 // src/com/google/doclava/parser/Java.g:745:1: elementValueArrayInitializer : '{' ( elementValue ( ',' elementValue )* )? ( ',' )? '}' ; 6415 public final void elementValueArrayInitializer() throws RecognitionException { 6416 int elementValueArrayInitializer_StartIndex = input.index(); 6417 try { dbg.enterRule(getGrammarFileName(), "elementValueArrayInitializer"); 6418 if ( getRuleLevel()==0 ) {dbg.commence();} 6419 incRuleLevel(); 6420 dbg.location(745, 1); 6421 6422 try { 6423 if ( state.backtracking>0 && alreadyParsedRule(input, 49) ) { return ; } 6424 // src/com/google/doclava/parser/Java.g:746:5: ( '{' ( elementValue ( ',' elementValue )* )? ( ',' )? '}' ) 6425 dbg.enterAlt(1); 6426 6427 // src/com/google/doclava/parser/Java.g:746:9: '{' ( elementValue ( ',' elementValue )* )? ( ',' )? '}' 6428 { 6429 dbg.location(746,9); 6430 match(input,LBRACE,FOLLOW_LBRACE_in_elementValueArrayInitializer3593); if (state.failed) return ; 6431 dbg.location(747,9); 6432 // src/com/google/doclava/parser/Java.g:747:9: ( elementValue ( ',' elementValue )* )? 6433 int alt84=2; 6434 try { dbg.enterSubRule(84); 6435 try { dbg.enterDecision(84, decisionCanBacktrack[84]); 6436 6437 int LA84_0 = input.LA(1); 6438 6439 if ( ((LA84_0>=IDENTIFIER && LA84_0<=NULL)||LA84_0==BOOLEAN||LA84_0==BYTE||LA84_0==CHAR||LA84_0==DOUBLE||LA84_0==FLOAT||LA84_0==INT||LA84_0==LONG||LA84_0==NEW||LA84_0==SHORT||LA84_0==SUPER||LA84_0==THIS||LA84_0==VOID||LA84_0==LPAREN||LA84_0==LBRACE||(LA84_0>=BANG && LA84_0<=TILDE)||(LA84_0>=PLUSPLUS && LA84_0<=SUB)||LA84_0==MONKEYS_AT) ) { 6440 alt84=1; 6441 } 6442 } finally {dbg.exitDecision(84);} 6443 6444 switch (alt84) { 6445 case 1 : 6446 dbg.enterAlt(1); 6447 6448 // src/com/google/doclava/parser/Java.g:747:10: elementValue ( ',' elementValue )* 6449 { 6450 dbg.location(747,10); 6451 pushFollow(FOLLOW_elementValue_in_elementValueArrayInitializer3604); 6452 elementValue(); 6453 6454 state._fsp--; 6455 if (state.failed) return ; 6456 dbg.location(748,13); 6457 // src/com/google/doclava/parser/Java.g:748:13: ( ',' elementValue )* 6458 try { dbg.enterSubRule(83); 6459 6460 loop83: 6461 do { 6462 int alt83=2; 6463 try { dbg.enterDecision(83, decisionCanBacktrack[83]); 6464 6465 int LA83_0 = input.LA(1); 6466 6467 if ( (LA83_0==COMMA) ) { 6468 int LA83_1 = input.LA(2); 6469 6470 if ( ((LA83_1>=IDENTIFIER && LA83_1<=NULL)||LA83_1==BOOLEAN||LA83_1==BYTE||LA83_1==CHAR||LA83_1==DOUBLE||LA83_1==FLOAT||LA83_1==INT||LA83_1==LONG||LA83_1==NEW||LA83_1==SHORT||LA83_1==SUPER||LA83_1==THIS||LA83_1==VOID||LA83_1==LPAREN||LA83_1==LBRACE||(LA83_1>=BANG && LA83_1<=TILDE)||(LA83_1>=PLUSPLUS && LA83_1<=SUB)||LA83_1==MONKEYS_AT) ) { 6471 alt83=1; 6472 } 6473 6474 6475 } 6476 6477 6478 } finally {dbg.exitDecision(83);} 6479 6480 switch (alt83) { 6481 case 1 : 6482 dbg.enterAlt(1); 6483 6484 // src/com/google/doclava/parser/Java.g:748:14: ',' elementValue 6485 { 6486 dbg.location(748,14); 6487 match(input,COMMA,FOLLOW_COMMA_in_elementValueArrayInitializer3619); if (state.failed) return ; 6488 dbg.location(748,18); 6489 pushFollow(FOLLOW_elementValue_in_elementValueArrayInitializer3621); 6490 elementValue(); 6491 6492 state._fsp--; 6493 if (state.failed) return ; 6494 6495 } 6496 break; 6497 6498 default : 6499 break loop83; 6500 } 6501 } while (true); 6502 } finally {dbg.exitSubRule(83);} 6503 6504 6505 } 6506 break; 6507 6508 } 6509 } finally {dbg.exitSubRule(84);} 6510 6511 dbg.location(750,12); 6512 // src/com/google/doclava/parser/Java.g:750:12: ( ',' )? 6513 int alt85=2; 6514 try { dbg.enterSubRule(85); 6515 try { dbg.enterDecision(85, decisionCanBacktrack[85]); 6516 6517 int LA85_0 = input.LA(1); 6518 6519 if ( (LA85_0==COMMA) ) { 6520 alt85=1; 6521 } 6522 } finally {dbg.exitDecision(85);} 6523 6524 switch (alt85) { 6525 case 1 : 6526 dbg.enterAlt(1); 6527 6528 // src/com/google/doclava/parser/Java.g:750:13: ',' 6529 { 6530 dbg.location(750,13); 6531 match(input,COMMA,FOLLOW_COMMA_in_elementValueArrayInitializer3650); if (state.failed) return ; 6532 6533 } 6534 break; 6535 6536 } 6537 } finally {dbg.exitSubRule(85);} 6538 6539 dbg.location(750,19); 6540 match(input,RBRACE,FOLLOW_RBRACE_in_elementValueArrayInitializer3654); if (state.failed) return ; 6541 6542 } 6543 6544 } 6545 catch (RecognitionException re) { 6546 reportError(re); 6547 recover(input,re); 6548 } 6549 finally { 6550 if ( state.backtracking>0 ) { memoize(input, 49, elementValueArrayInitializer_StartIndex); } 6551 } 6552 dbg.location(751, 5); 6553 6554 } 6555 finally { 6556 dbg.exitRule(getGrammarFileName(), "elementValueArrayInitializer"); 6557 decRuleLevel(); 6558 if ( getRuleLevel()==0 ) {dbg.terminate();} 6559 } 6560 6561 return ; 6562 } 6563 // $ANTLR end "elementValueArrayInitializer" 6564 6565 6566 // $ANTLR start "annotationTypeDeclaration" 6567 // src/com/google/doclava/parser/Java.g:754:1: annotationTypeDeclaration : modifiers '@' 'interface' IDENTIFIER annotationTypeBody ; 6568 public final void annotationTypeDeclaration() throws RecognitionException { 6569 int annotationTypeDeclaration_StartIndex = input.index(); 6570 try { dbg.enterRule(getGrammarFileName(), "annotationTypeDeclaration"); 6571 if ( getRuleLevel()==0 ) {dbg.commence();} 6572 incRuleLevel(); 6573 dbg.location(754, 1); 6574 6575 try { 6576 if ( state.backtracking>0 && alreadyParsedRule(input, 50) ) { return ; } 6577 // src/com/google/doclava/parser/Java.g:758:5: ( modifiers '@' 'interface' IDENTIFIER annotationTypeBody ) 6578 dbg.enterAlt(1); 6579 6580 // src/com/google/doclava/parser/Java.g:758:9: modifiers '@' 'interface' IDENTIFIER annotationTypeBody 6581 { 6582 dbg.location(758,9); 6583 pushFollow(FOLLOW_modifiers_in_annotationTypeDeclaration3676); 6584 modifiers(); 6585 6586 state._fsp--; 6587 if (state.failed) return ; 6588 dbg.location(758,19); 6589 match(input,MONKEYS_AT,FOLLOW_MONKEYS_AT_in_annotationTypeDeclaration3678); if (state.failed) return ; 6590 dbg.location(759,9); 6591 match(input,INTERFACE,FOLLOW_INTERFACE_in_annotationTypeDeclaration3688); if (state.failed) return ; 6592 dbg.location(760,9); 6593 match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_annotationTypeDeclaration3698); if (state.failed) return ; 6594 dbg.location(761,9); 6595 pushFollow(FOLLOW_annotationTypeBody_in_annotationTypeDeclaration3708); 6596 annotationTypeBody(); 6597 6598 state._fsp--; 6599 if (state.failed) return ; 6600 6601 } 6602 6603 } 6604 catch (RecognitionException re) { 6605 reportError(re); 6606 recover(input,re); 6607 } 6608 finally { 6609 if ( state.backtracking>0 ) { memoize(input, 50, annotationTypeDeclaration_StartIndex); } 6610 } 6611 dbg.location(762, 5); 6612 6613 } 6614 finally { 6615 dbg.exitRule(getGrammarFileName(), "annotationTypeDeclaration"); 6616 decRuleLevel(); 6617 if ( getRuleLevel()==0 ) {dbg.terminate();} 6618 } 6619 6620 return ; 6621 } 6622 // $ANTLR end "annotationTypeDeclaration" 6623 6624 6625 // $ANTLR start "annotationTypeBody" 6626 // src/com/google/doclava/parser/Java.g:765:1: annotationTypeBody : '{' ( annotationTypeElementDeclaration )* '}' ; 6627 public final void annotationTypeBody() throws RecognitionException { 6628 int annotationTypeBody_StartIndex = input.index(); 6629 try { dbg.enterRule(getGrammarFileName(), "annotationTypeBody"); 6630 if ( getRuleLevel()==0 ) {dbg.commence();} 6631 incRuleLevel(); 6632 dbg.location(765, 1); 6633 6634 try { 6635 if ( state.backtracking>0 && alreadyParsedRule(input, 51) ) { return ; } 6636 // src/com/google/doclava/parser/Java.g:766:5: ( '{' ( annotationTypeElementDeclaration )* '}' ) 6637 dbg.enterAlt(1); 6638 6639 // src/com/google/doclava/parser/Java.g:766:9: '{' ( annotationTypeElementDeclaration )* '}' 6640 { 6641 dbg.location(766,9); 6642 match(input,LBRACE,FOLLOW_LBRACE_in_annotationTypeBody3728); if (state.failed) return ; 6643 dbg.location(767,9); 6644 // src/com/google/doclava/parser/Java.g:767:9: ( annotationTypeElementDeclaration )* 6645 try { dbg.enterSubRule(86); 6646 6647 loop86: 6648 do { 6649 int alt86=2; 6650 try { dbg.enterDecision(86, decisionCanBacktrack[86]); 6651 6652 int LA86_0 = input.LA(1); 6653 6654 if ( (LA86_0==IDENTIFIER||LA86_0==ABSTRACT||LA86_0==BOOLEAN||LA86_0==BYTE||(LA86_0>=CHAR && LA86_0<=CLASS)||LA86_0==DOUBLE||LA86_0==ENUM||LA86_0==FINAL||LA86_0==FLOAT||(LA86_0>=INT && LA86_0<=NATIVE)||(LA86_0>=PRIVATE && LA86_0<=PUBLIC)||(LA86_0>=SHORT && LA86_0<=STRICTFP)||LA86_0==SYNCHRONIZED||LA86_0==TRANSIENT||(LA86_0>=VOID && LA86_0<=VOLATILE)||LA86_0==SEMI||LA86_0==MONKEYS_AT||LA86_0==LT) ) { 6655 alt86=1; 6656 } 6657 6658 6659 } finally {dbg.exitDecision(86);} 6660 6661 switch (alt86) { 6662 case 1 : 6663 dbg.enterAlt(1); 6664 6665 // src/com/google/doclava/parser/Java.g:767:10: annotationTypeElementDeclaration 6666 { 6667 dbg.location(767,10); 6668 pushFollow(FOLLOW_annotationTypeElementDeclaration_in_annotationTypeBody3739); 6669 annotationTypeElementDeclaration(); 6670 6671 state._fsp--; 6672 if (state.failed) return ; 6673 6674 } 6675 break; 6676 6677 default : 6678 break loop86; 6679 } 6680 } while (true); 6681 } finally {dbg.exitSubRule(86);} 6682 6683 dbg.location(769,9); 6684 match(input,RBRACE,FOLLOW_RBRACE_in_annotationTypeBody3760); if (state.failed) return ; 6685 6686 } 6687 6688 } 6689 catch (RecognitionException re) { 6690 reportError(re); 6691 recover(input,re); 6692 } 6693 finally { 6694 if ( state.backtracking>0 ) { memoize(input, 51, annotationTypeBody_StartIndex); } 6695 } 6696 dbg.location(770, 5); 6697 6698 } 6699 finally { 6700 dbg.exitRule(getGrammarFileName(), "annotationTypeBody"); 6701 decRuleLevel(); 6702 if ( getRuleLevel()==0 ) {dbg.terminate();} 6703 } 6704 6705 return ; 6706 } 6707 // $ANTLR end "annotationTypeBody" 6708 6709 6710 // $ANTLR start "annotationTypeElementDeclaration" 6711 // src/com/google/doclava/parser/Java.g:772:1: annotationTypeElementDeclaration : ( annotationMethodDeclaration | interfaceFieldDeclaration | normalClassDeclaration | normalInterfaceDeclaration | enumDeclaration | annotationTypeDeclaration | ';' ); 6712 public final void annotationTypeElementDeclaration() throws RecognitionException { 6713 int annotationTypeElementDeclaration_StartIndex = input.index(); 6714 try { dbg.enterRule(getGrammarFileName(), "annotationTypeElementDeclaration"); 6715 if ( getRuleLevel()==0 ) {dbg.commence();} 6716 incRuleLevel(); 6717 dbg.location(772, 1); 6718 6719 try { 6720 if ( state.backtracking>0 && alreadyParsedRule(input, 52) ) { return ; } 6721 // src/com/google/doclava/parser/Java.g:776:5: ( annotationMethodDeclaration | interfaceFieldDeclaration | normalClassDeclaration | normalInterfaceDeclaration | enumDeclaration | annotationTypeDeclaration | ';' ) 6722 int alt87=7; 6723 try { dbg.enterDecision(87, decisionCanBacktrack[87]); 6724 6725 try { 6726 isCyclicDecision = true; 6727 alt87 = dfa87.predict(input); 6728 } 6729 catch (NoViableAltException nvae) { 6730 dbg.recognitionException(nvae); 6731 throw nvae; 6732 } 6733 } finally {dbg.exitDecision(87);} 6734 6735 switch (alt87) { 6736 case 1 : 6737 dbg.enterAlt(1); 6738 6739 // src/com/google/doclava/parser/Java.g:776:9: annotationMethodDeclaration 6740 { 6741 dbg.location(776,9); 6742 pushFollow(FOLLOW_annotationMethodDeclaration_in_annotationTypeElementDeclaration3781); 6743 annotationMethodDeclaration(); 6744 6745 state._fsp--; 6746 if (state.failed) return ; 6747 6748 } 6749 break; 6750 case 2 : 6751 dbg.enterAlt(2); 6752 6753 // src/com/google/doclava/parser/Java.g:777:9: interfaceFieldDeclaration 6754 { 6755 dbg.location(777,9); 6756 pushFollow(FOLLOW_interfaceFieldDeclaration_in_annotationTypeElementDeclaration3791); 6757 interfaceFieldDeclaration(); 6758 6759 state._fsp--; 6760 if (state.failed) return ; 6761 6762 } 6763 break; 6764 case 3 : 6765 dbg.enterAlt(3); 6766 6767 // src/com/google/doclava/parser/Java.g:778:9: normalClassDeclaration 6768 { 6769 dbg.location(778,9); 6770 pushFollow(FOLLOW_normalClassDeclaration_in_annotationTypeElementDeclaration3801); 6771 normalClassDeclaration(); 6772 6773 state._fsp--; 6774 if (state.failed) return ; 6775 6776 } 6777 break; 6778 case 4 : 6779 dbg.enterAlt(4); 6780 6781 // src/com/google/doclava/parser/Java.g:779:9: normalInterfaceDeclaration 6782 { 6783 dbg.location(779,9); 6784 pushFollow(FOLLOW_normalInterfaceDeclaration_in_annotationTypeElementDeclaration3811); 6785 normalInterfaceDeclaration(); 6786 6787 state._fsp--; 6788 if (state.failed) return ; 6789 6790 } 6791 break; 6792 case 5 : 6793 dbg.enterAlt(5); 6794 6795 // src/com/google/doclava/parser/Java.g:780:9: enumDeclaration 6796 { 6797 dbg.location(780,9); 6798 pushFollow(FOLLOW_enumDeclaration_in_annotationTypeElementDeclaration3821); 6799 enumDeclaration(); 6800 6801 state._fsp--; 6802 if (state.failed) return ; 6803 6804 } 6805 break; 6806 case 6 : 6807 dbg.enterAlt(6); 6808 6809 // src/com/google/doclava/parser/Java.g:781:9: annotationTypeDeclaration 6810 { 6811 dbg.location(781,9); 6812 pushFollow(FOLLOW_annotationTypeDeclaration_in_annotationTypeElementDeclaration3831); 6813 annotationTypeDeclaration(); 6814 6815 state._fsp--; 6816 if (state.failed) return ; 6817 6818 } 6819 break; 6820 case 7 : 6821 dbg.enterAlt(7); 6822 6823 // src/com/google/doclava/parser/Java.g:782:9: ';' 6824 { 6825 dbg.location(782,9); 6826 match(input,SEMI,FOLLOW_SEMI_in_annotationTypeElementDeclaration3841); if (state.failed) return ; 6827 6828 } 6829 break; 6830 6831 } 6832 } 6833 catch (RecognitionException re) { 6834 reportError(re); 6835 recover(input,re); 6836 } 6837 finally {