Andrew Sapperstein | d6eaacb | 2011-05-20 13:14:56 -0700 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | [The "BSD licence"] |
| 4 | Copyright (c) 2007-2008 Terence Parr |
| 5 | All rights reserved. |
| 6 | |
| 7 | Redistribution and use in source and binary forms, with or without |
| 8 | modification, are permitted provided that the following conditions |
| 9 | are met: |
| 10 | 1. Redistributions of source code must retain the above copyright |
| 11 | notice, this list of conditions and the following disclaimer. |
| 12 | 2. Redistributions in binary form must reproduce the above copyright |
| 13 | notice, this list of conditions and the following disclaimer in the |
| 14 | documentation and/or other materials provided with the distribution. |
| 15 | 3. The name of the author may not be used to endorse or promote products |
| 16 | derived from this software without specific prior written permission. |
| 17 | |
| 18 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
| 19 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| 20 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| 21 | IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 22 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
| 23 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 27 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 | */ |
| 29 | |
| 30 | /* |
| 31 | * This file is modified by Yang Jiang (yang.jiang.z@gmail.com), taken from the original |
| 32 | * java grammar in www.antlr.org, with the goal to provide a standard ANTLR grammar |
| 33 | * for java, as well as an implementation to construct the same AST trees as javac does. |
| 34 | * |
| 35 | * The major changes of this version as compared to the original version include: |
| 36 | * 1) Top level rules are changed to include all of their sub-components. |
| 37 | * For example, the rule |
| 38 | * |
| 39 | * classOrInterfaceDeclaration |
| 40 | * : classOrInterfaceModifiers (classDeclaration | interfaceDeclaration) |
| 41 | * ; |
| 42 | * |
| 43 | * is changed to |
| 44 | * |
| 45 | * classOrInterfaceDeclaration |
| 46 | * : classDeclaration | interfaceDeclaration |
| 47 | * ; |
| 48 | * |
| 49 | * with classOrInterfaceModifiers been moved inside classDeclaration and |
| 50 | * interfaceDeclaration. |
| 51 | * |
| 52 | * 2) The original version is not quite clear on certain rules like memberDecl, |
| 53 | * where it mixed the styles of listing of top level rules and listing of sub rules. |
| 54 | * |
| 55 | * memberDecl |
| 56 | * : genericMethodOrConstructorDecl |
| 57 | * | memberDeclaration |
| 58 | * | 'void' Identifier voidMethodDeclaratorRest |
| 59 | * | Identifier constructorDeclaratorRest |
| 60 | * | interfaceDeclaration |
| 61 | * | classDeclaration |
| 62 | * ; |
| 63 | * |
| 64 | * This is changed to a |
| 65 | * |
| 66 | * memberDecl |
| 67 | * : fieldDeclaration |
| 68 | * | methodDeclaration |
| 69 | * | classDeclaration |
| 70 | * | interfaceDeclaration |
| 71 | * ; |
| 72 | * by folding similar rules into single rule. |
| 73 | * |
| 74 | * 3) Some syntactical predicates are added for efficiency, although this is not necessary |
| 75 | * for correctness. |
| 76 | * |
| 77 | * 4) Lexer part is rewritten completely to construct tokens needed for the parser. |
| 78 | * |
| 79 | * 5) This grammar adds more source level support |
| 80 | * |
| 81 | * |
| 82 | * This grammar also adds bug fixes. |
| 83 | * |
| 84 | * 1) Adding typeArguments to superSuffix to alHexSignificandlow input like |
| 85 | * super.<TYPE>method() |
| 86 | * |
| 87 | * 2) Adding typeArguments to innerCreator to allow input like |
| 88 | * new Type1<String, Integer>().new Type2<String>() |
| 89 | * |
| 90 | * 3) conditionalExpression is changed to |
| 91 | * conditionalExpression |
| 92 | * : conditionalOrExpression ( '?' expression ':' conditionalExpression )? |
| 93 | * ; |
| 94 | * to accept input like |
| 95 | * true?1:2=3 |
| 96 | * |
| 97 | * Note: note this is by no means a valid input, by the grammar should be able to parse |
| 98 | * this as |
| 99 | * (true?1:2)=3 |
| 100 | * rather than |
| 101 | * true?1:(2=3) |
| 102 | * |
| 103 | * |
| 104 | * Know problems: |
| 105 | * Won't pass input containing unicode sequence like this |
| 106 | * char c = '\uffff' |
| 107 | * String s = "\uffff"; |
| 108 | * Because Antlr does not treat '\uffff' as an valid char. This will be fixed in the next Antlr |
| 109 | * release. [Fixed in Antlr-3.1.1] |
| 110 | * |
| 111 | * Things to do: |
| 112 | * More effort to make this grammar faster. |
| 113 | * Error reporting/recovering. |
| 114 | * |
| 115 | * |
| 116 | * NOTE: If you try to compile this file from command line and Antlr gives an exception |
| 117 | * like error message while compiling, add option |
| 118 | * -Xconversiontimeout 100000 |
| 119 | * to the command line. |
| 120 | * If it still doesn't work or the compilation process |
| 121 | * takes too long, try to comment out the following two lines: |
| 122 | * | {isValidSurrogateIdentifierStart((char)input.LT(1), (char)input.LT(2))}?=>('\ud800'..'\udbff') ('\udc00'..'\udfff') |
| 123 | * | {isValidSurrogateIdentifierPart((char)input.LT(1), (char)input.LT(2))}?=>('\ud800'..'\udbff') ('\udc00'..'\udfff') |
| 124 | * |
| 125 | * |
| 126 | * Below are comments found in the original version. |
| 127 | */ |
| 128 | |
| 129 | |
| 130 | /** A Java 1.5 grammar for ANTLR v3 derived from the spec |
| 131 | * |
| 132 | * This is a very close representation of the spec; the changes |
| 133 | * are comestic (remove left recursion) and also fixes (the spec |
| 134 | * isn't exactly perfect). I have run this on the 1.4.2 source |
| 135 | * and some nasty looking enums from 1.5, but have not really |
| 136 | * tested for 1.5 compatibility. |
| 137 | * |
| 138 | * I built this with: java -Xmx100M org.antlr.Tool java.g |
| 139 | * and got two errors that are ok (for now): |
| 140 | * java.g:691:9: Decision can match input such as |
| 141 | * "'0'..'9'{'E', 'e'}{'+', '-'}'0'..'9'{'D', 'F', 'd', 'f'}" |
| 142 | * using multiple alternatives: 3, 4 |
| 143 | * As a result, alternative(s) 4 were disabled for that input |
| 144 | * java.g:734:35: Decision can match input such as "{'$', 'A'..'Z', |
| 145 | * '_', 'a'..'z', '\u00C0'..'\u00D6', '\u00D8'..'\u00F6', |
| 146 | * '\u00F8'..'\u1FFF', '\u3040'..'\u318F', '\u3300'..'\u337F', |
| 147 | * '\u3400'..'\u3D2D', '\u4E00'..'\u9FFF', '\uF900'..'\uFAFF'}" |
| 148 | * using multiple alternatives: 1, 2 |
| 149 | * As a result, alternative(s) 2 were disabled for that input |
| 150 | * |
| 151 | * You can turn enum on/off as a keyword :) |
| 152 | * |
| 153 | * Version 1.0 -- initial release July 5, 2006 (requires 3.0b2 or higher) |
| 154 | * |
| 155 | * Primary author: Terence Parr, July 2006 |
| 156 | * |
| 157 | * Version 1.0.1 -- corrections by Koen Vanderkimpen & Marko van Dooren, |
| 158 | * October 25, 2006; |
| 159 | * fixed normalInterfaceDeclaration: now uses typeParameters instead |
| 160 | * of typeParameter (according to JLS, 3rd edition) |
| 161 | * fixed castExpression: no longer allows expression next to type |
| 162 | * (according to semantics in JLS, in contrast with syntax in JLS) |
| 163 | * |
| 164 | * Version 1.0.2 -- Terence Parr, Nov 27, 2006 |
| 165 | * java spec I built this from had some bizarre for-loop control. |
| 166 | * Looked weird and so I looked elsewhere...Yep, it's messed up. |
| 167 | * simplified. |
| 168 | * |
| 169 | * Version 1.0.3 -- Chris Hogue, Feb 26, 2007 |
| 170 | * Factored out an annotationName rule and used it in the annotation rule. |
| 171 | * Not sure why, but typeName wasn't recognizing references to inner |
| 172 | * annotations (e.g. @InterfaceName.InnerAnnotation()) |
| 173 | * Factored out the elementValue section of an annotation reference. Created |
| 174 | * elementValuePair and elementValuePairs rules, then used them in the |
| 175 | * annotation rule. Allows it to recognize annotation references with |
| 176 | * multiple, comma separated attributes. |
| 177 | * Updated elementValueArrayInitializer so that it allows multiple elements. |
| 178 | * (It was only allowing 0 or 1 element). |
| 179 | * Updated localVariableDeclaration to allow annotations. Interestingly the JLS |
| 180 | * doesn't appear to indicate this is legal, but it does work as of at least |
| 181 | * JDK 1.5.0_06. |
| 182 | * Moved the Identifier portion of annotationTypeElementRest to annotationMethodRest. |
| 183 | * Because annotationConstantRest already references variableDeclarator which |
| 184 | * has the Identifier portion in it, the parser would fail on constants in |
| 185 | * annotation definitions because it expected two identifiers. |
| 186 | * Added optional trailing ';' to the alternatives in annotationTypeElementRest. |
| 187 | * Wouldn't handle an inner interface that has a trailing ';'. |
| 188 | * Swapped the expression and type rule reference order in castExpression to |
| 189 | * make it check for genericized casts first. It was failing to recognize a |
| 190 | * statement like "Class<Byte> TYPE = (Class<Byte>)...;" because it was seeing |
| 191 | * 'Class<Byte' in the cast expression as a less than expression, then failing |
| 192 | * on the '>'. |
| 193 | * Changed createdName to use typeArguments instead of nonWildcardTypeArguments. |
| 194 | * |
| 195 | * Changed the 'this' alternative in primary to allow 'identifierSuffix' rather than |
| 196 | * just 'arguments'. The case it couldn't handle was a call to an explicit |
| 197 | * generic method invocation (e.g. this.<E>doSomething()). Using identifierSuffix |
| 198 | * may be overly aggressive--perhaps should create a more constrained thisSuffix rule? |
| 199 | * |
| 200 | * Version 1.0.4 -- Hiroaki Nakamura, May 3, 2007 |
| 201 | * |
| 202 | * Fixed formalParameterDecls, localVariableDeclaration, forInit, |
| 203 | * and forVarControl to use variableModifier* not 'final'? (annotation)? |
| 204 | * |
| 205 | * Version 1.0.5 -- Terence, June 21, 2007 |
| 206 | * --a[i].foo didn't work. Fixed unaryExpression |
| 207 | * |
| 208 | * Version 1.0.6 -- John Ridgway, March 17, 2008 |
| 209 | * Made "assert" a switchable keyword like "enum". |
| 210 | * Fixed compilationUnit to disallow "annotation importDeclaration ...". |
| 211 | * Changed "Identifier ('.' Identifier)*" to "qualifiedName" in more |
| 212 | * places. |
| 213 | * Changed modifier* and/or variableModifier* to classOrInterfaceModifiers, |
| 214 | * modifiers or variableModifiers, as appropriate. |
| 215 | * Renamed "bound" to "typeBound" to better match language in the JLS. |
| 216 | * Added "memberDeclaration" which rewrites to methodDeclaration or |
| 217 | * fieldDeclaration and pulled type into memberDeclaration. So we parse |
| 218 | * type and then move on to decide whether we're dealing with a field |
| 219 | * or a method. |
| 220 | * Modified "constructorDeclaration" to use "constructorBody" instead of |
| 221 | * "methodBody". constructorBody starts with explicitConstructorInvocation, |
| 222 | * then goes on to blockStatement*. Pulling explicitConstructorInvocation |
| 223 | * out of expressions allowed me to simplify "primary". |
| 224 | * Changed variableDeclarator to simplify it. |
| 225 | * Changed type to use classOrInterfaceType, thus simplifying it; of course |
| 226 | * I then had to add classOrInterfaceType, but it is used in several |
| 227 | * places. |
| 228 | * Fixed annotations, old version allowed "@X(y,z)", which is illegal. |
| 229 | * Added optional comma to end of "elementValueArrayInitializer"; as per JLS. |
| 230 | * Changed annotationTypeElementRest to use normalClassDeclaration and |
| 231 | * normalInterfaceDeclaration rather than classDeclaration and |
| 232 | * interfaceDeclaration, thus getting rid of a couple of grammar ambiguities. |
| 233 | * Split localVariableDeclaration into localVariableDeclarationStatement |
| 234 | * (includes the terminating semi-colon) and localVariableDeclaration. |
| 235 | * This allowed me to use localVariableDeclaration in "forInit" clauses, |
| 236 | * simplifying them. |
| 237 | * Changed switchBlockStatementGroup to use multiple labels. This adds an |
| 238 | * ambiguity, but if one uses appropriately greedy parsing it yields the |
| 239 | * parse that is closest to the meaning of the switch statement. |
| 240 | * Renamed "forVarControl" to "enhancedForControl" -- JLS language. |
| 241 | * Added semantic predicates to test for shift operations rather than other |
| 242 | * things. Thus, for instance, the string "< <" will never be treated |
| 243 | * as a left-shift operator. |
| 244 | * In "creator" we rule out "nonWildcardTypeArguments" on arrayCreation, |
| 245 | * which are illegal. |
| 246 | * Moved "nonWildcardTypeArguments into innerCreator. |
| 247 | * Removed 'super' superSuffix from explicitGenericInvocation, since that |
| 248 | * is only used in explicitConstructorInvocation at the beginning of a |
| 249 | * constructorBody. (This is part of the simplification of expressions |
| 250 | * mentioned earlier.) |
| 251 | * Simplified primary (got rid of those things that are only used in |
| 252 | * explicitConstructorInvocation). |
| 253 | * Lexer -- removed "Exponent?" from FloatingPointLiteral choice 4, since it |
| 254 | * led to an ambiguity. |
| 255 | * |
| 256 | * This grammar successfully parses every .java file in the JDK 1.5 source |
| 257 | * tree (excluding those whose file names include '-', which are not |
| 258 | * valid Java compilation units). |
| 259 | * |
| 260 | * Known remaining problems: |
| 261 | * "Letter" and "JavaIDDigit" are wrong. The actual specification of |
| 262 | * "Letter" should be "a character for which the method |
| 263 | * Character.isJavaIdentifierStart(int) returns true." A "Java |
| 264 | * letter-or-digit is a character for which the method |
| 265 | * Character.isJavaIdentifierPart(int) returns true." |
| 266 | */ |
| 267 | |
| 268 | |
| 269 | /* |
| 270 | This is a merged file, containing two versions of the Java.g grammar. |
| 271 | To extract a version from the file, run the ver.jar with the command provided below. |
| 272 | |
| 273 | Version 1 - tree building version, with all source level support, error recovery etc. |
| 274 | This is the version for compiler grammar workspace. |
| 275 | This version can be extracted by invoking: |
| 276 | java -cp ver.jar Main 1 true true true true true Java.g |
| 277 | |
| 278 | Version 2 - clean version, with no source leve support, no error recovery, no predicts, |
| 279 | assumes 1.6 level, works in Antlrworks. |
| 280 | This is the version for Alex. |
| 281 | This version can be extracted by invoking: |
| 282 | java -cp ver.jar Main 2 false false false false false Java.g |
| 283 | */ |
| 284 | |
| 285 | grammar Java; |
| 286 | |
| 287 | |
| 288 | options { |
| 289 | backtrack=true; |
| 290 | memoize=true; |
| 291 | } |
| 292 | |
| 293 | /******************************************************************************************** |
| 294 | Parser section |
| 295 | *********************************************************************************************/ |
| 296 | |
| 297 | compilationUnit |
| 298 | : ( (annotations |
| 299 | )? |
| 300 | packageDeclaration |
| 301 | )? |
| 302 | (importDeclaration |
| 303 | )* |
| 304 | (typeDeclaration |
| 305 | )* |
| 306 | ; |
| 307 | |
| 308 | packageDeclaration |
| 309 | : 'package' qualifiedName |
| 310 | ';' |
| 311 | ; |
| 312 | |
| 313 | importDeclaration |
| 314 | : 'import' |
| 315 | ('static' |
| 316 | )? |
| 317 | IDENTIFIER '.' '*' |
| 318 | ';' |
| 319 | | 'import' |
| 320 | ('static' |
| 321 | )? |
| 322 | IDENTIFIER |
| 323 | ('.' IDENTIFIER |
| 324 | )+ |
| 325 | ('.' '*' |
| 326 | )? |
| 327 | ';' |
| 328 | ; |
| 329 | |
| 330 | qualifiedImportName |
| 331 | : IDENTIFIER |
| 332 | ('.' IDENTIFIER |
| 333 | )* |
| 334 | ; |
| 335 | |
| 336 | typeDeclaration |
| 337 | : classOrInterfaceDeclaration |
| 338 | | ';' |
| 339 | ; |
| 340 | |
| 341 | classOrInterfaceDeclaration |
| 342 | : classDeclaration |
| 343 | | interfaceDeclaration |
| 344 | ; |
| 345 | |
| 346 | |
| 347 | modifiers |
| 348 | : |
| 349 | ( annotation |
| 350 | | 'public' |
| 351 | | 'protected' |
| 352 | | 'private' |
| 353 | | 'static' |
| 354 | | 'abstract' |
| 355 | | 'final' |
| 356 | | 'native' |
| 357 | | 'synchronized' |
| 358 | | 'transient' |
| 359 | | 'volatile' |
| 360 | | 'strictfp' |
| 361 | )* |
| 362 | ; |
| 363 | |
| 364 | |
| 365 | variableModifiers |
| 366 | : ( 'final' |
| 367 | | annotation |
| 368 | )* |
| 369 | ; |
| 370 | |
| 371 | |
| 372 | classDeclaration |
| 373 | : normalClassDeclaration |
| 374 | | enumDeclaration |
| 375 | ; |
| 376 | |
| 377 | normalClassDeclaration |
| 378 | : modifiers 'class' IDENTIFIER |
| 379 | (typeParameters |
| 380 | )? |
| 381 | ('extends' type |
| 382 | )? |
| 383 | ('implements' typeList |
| 384 | )? |
| 385 | classBody |
| 386 | ; |
| 387 | |
| 388 | |
| 389 | typeParameters |
| 390 | : '<' |
| 391 | typeParameter |
| 392 | (',' typeParameter |
| 393 | )* |
| 394 | '>' |
| 395 | ; |
| 396 | |
| 397 | typeParameter |
| 398 | : IDENTIFIER |
| 399 | ('extends' typeBound |
| 400 | )? |
| 401 | ; |
| 402 | |
| 403 | |
| 404 | typeBound |
| 405 | : type |
| 406 | ('&' type |
| 407 | )* |
| 408 | ; |
| 409 | |
| 410 | |
| 411 | enumDeclaration |
| 412 | : modifiers |
| 413 | ('enum' |
| 414 | ) |
| 415 | IDENTIFIER |
| 416 | ('implements' typeList |
| 417 | )? |
| 418 | enumBody |
| 419 | ; |
| 420 | |
| 421 | |
| 422 | enumBody |
| 423 | : '{' |
| 424 | (enumConstants |
| 425 | )? |
| 426 | ','? |
| 427 | (enumBodyDeclarations |
| 428 | )? |
| 429 | '}' |
| 430 | ; |
| 431 | |
| 432 | enumConstants |
| 433 | : enumConstant |
| 434 | (',' enumConstant |
| 435 | )* |
| 436 | ; |
| 437 | |
| 438 | /** |
| 439 | * NOTE: here differs from the javac grammar, missing TypeArguments. |
| 440 | * EnumeratorDeclaration = AnnotationsOpt [TypeArguments] IDENTIFIER [ Arguments ] [ "{" ClassBody "}" ] |
| 441 | */ |
| 442 | enumConstant |
| 443 | : (annotations |
| 444 | )? |
| 445 | IDENTIFIER |
| 446 | (arguments |
| 447 | )? |
| 448 | (classBody |
| 449 | )? |
| 450 | /* TODO: $GScope::name = names.empty. enum constant body is actually |
| 451 | an anonymous class, where constructor isn't allowed, have to add this check*/ |
| 452 | ; |
| 453 | |
| 454 | enumBodyDeclarations |
| 455 | : ';' |
| 456 | (classBodyDeclaration |
| 457 | )* |
| 458 | ; |
| 459 | |
| 460 | interfaceDeclaration |
| 461 | : normalInterfaceDeclaration |
| 462 | | annotationTypeDeclaration |
| 463 | ; |
| 464 | |
| 465 | normalInterfaceDeclaration |
| 466 | : modifiers 'interface' IDENTIFIER |
| 467 | (typeParameters |
| 468 | )? |
| 469 | ('extends' typeList |
| 470 | )? |
| 471 | interfaceBody |
| 472 | ; |
| 473 | |
| 474 | typeList |
| 475 | : type |
| 476 | (',' type |
| 477 | )* |
| 478 | ; |
| 479 | |
| 480 | classBody |
| 481 | : '{' |
| 482 | (classBodyDeclaration |
| 483 | )* |
| 484 | '}' |
| 485 | ; |
| 486 | |
| 487 | interfaceBody |
| 488 | : '{' |
| 489 | (interfaceBodyDeclaration |
| 490 | )* |
| 491 | '}' |
| 492 | ; |
| 493 | |
| 494 | classBodyDeclaration |
| 495 | : ';' |
| 496 | | ('static' |
| 497 | )? |
| 498 | block |
| 499 | | memberDecl |
| 500 | ; |
| 501 | |
| 502 | memberDecl |
| 503 | : fieldDeclaration |
| 504 | | methodDeclaration |
| 505 | | classDeclaration |
| 506 | | interfaceDeclaration |
| 507 | ; |
| 508 | |
| 509 | |
| 510 | methodDeclaration |
| 511 | : |
| 512 | /* For constructor, return type is null, name is 'init' */ |
| 513 | modifiers |
| 514 | (typeParameters |
| 515 | )? |
| 516 | IDENTIFIER |
| 517 | formalParameters |
| 518 | ('throws' qualifiedNameList |
| 519 | )? |
| 520 | '{' |
| 521 | (explicitConstructorInvocation |
| 522 | )? |
| 523 | (blockStatement |
| 524 | )* |
| 525 | '}' |
| 526 | | modifiers |
| 527 | (typeParameters |
| 528 | )? |
| 529 | (type |
| 530 | | 'void' |
| 531 | ) |
| 532 | IDENTIFIER |
| 533 | formalParameters |
| 534 | ('[' ']' |
| 535 | )* |
| 536 | ('throws' qualifiedNameList |
| 537 | )? |
| 538 | ( |
| 539 | block |
| 540 | | ';' |
| 541 | ) |
| 542 | ; |
| 543 | |
| 544 | |
| 545 | fieldDeclaration |
| 546 | : modifiers |
| 547 | type |
| 548 | variableDeclarator |
| 549 | (',' variableDeclarator |
| 550 | )* |
| 551 | ';' |
| 552 | ; |
| 553 | |
| 554 | variableDeclarator |
| 555 | : IDENTIFIER |
| 556 | ('[' ']' |
| 557 | )* |
| 558 | ('=' variableInitializer |
| 559 | )? |
| 560 | ; |
| 561 | |
| 562 | /** |
| 563 | *TODO: add predicates |
| 564 | */ |
| 565 | interfaceBodyDeclaration |
| 566 | : |
| 567 | interfaceFieldDeclaration |
| 568 | | interfaceMethodDeclaration |
| 569 | | interfaceDeclaration |
| 570 | | classDeclaration |
| 571 | | ';' |
| 572 | ; |
| 573 | |
| 574 | interfaceMethodDeclaration |
| 575 | : modifiers |
| 576 | (typeParameters |
| 577 | )? |
| 578 | (type |
| 579 | |'void' |
| 580 | ) |
| 581 | IDENTIFIER |
| 582 | formalParameters |
| 583 | ('[' ']' |
| 584 | )* |
| 585 | ('throws' qualifiedNameList |
| 586 | )? ';' |
| 587 | ; |
| 588 | |
| 589 | /** |
| 590 | * NOTE, should not use variableDeclarator here, as it doesn't necessary require |
| 591 | * an initializer, while an interface field does, or judge by the returned value. |
| 592 | * But this gives better diagnostic message, or antlr won't predict this rule. |
| 593 | */ |
| 594 | interfaceFieldDeclaration |
| 595 | : modifiers type variableDeclarator |
| 596 | (',' variableDeclarator |
| 597 | )* |
| 598 | ';' |
| 599 | ; |
| 600 | |
| 601 | |
| 602 | type |
| 603 | : classOrInterfaceType |
| 604 | ('[' ']' |
| 605 | )* |
| 606 | | primitiveType |
| 607 | ('[' ']' |
| 608 | )* |
| 609 | ; |
| 610 | |
| 611 | |
| 612 | classOrInterfaceType |
| 613 | : IDENTIFIER |
| 614 | (typeArguments |
| 615 | )? |
| 616 | ('.' IDENTIFIER |
| 617 | (typeArguments |
| 618 | )? |
| 619 | )* |
| 620 | ; |
| 621 | |
| 622 | primitiveType |
| 623 | : 'boolean' |
| 624 | | 'char' |
| 625 | | 'byte' |
| 626 | | 'short' |
| 627 | | 'int' |
| 628 | | 'long' |
| 629 | | 'float' |
| 630 | | 'double' |
| 631 | ; |
| 632 | |
| 633 | typeArguments |
| 634 | : '<' typeArgument |
| 635 | (',' typeArgument |
| 636 | )* |
| 637 | '>' |
| 638 | ; |
| 639 | |
| 640 | typeArgument |
| 641 | : type |
| 642 | | '?' |
| 643 | ( |
| 644 | ('extends' |
| 645 | |'super' |
| 646 | ) |
| 647 | type |
| 648 | )? |
| 649 | ; |
| 650 | |
| 651 | qualifiedNameList |
| 652 | : qualifiedName |
| 653 | (',' qualifiedName |
| 654 | )* |
| 655 | ; |
| 656 | |
| 657 | formalParameters |
| 658 | : '(' |
| 659 | (formalParameterDecls |
| 660 | )? |
| 661 | ')' |
| 662 | ; |
| 663 | |
| 664 | formalParameterDecls |
| 665 | : ellipsisParameterDecl |
| 666 | | normalParameterDecl |
| 667 | (',' normalParameterDecl |
| 668 | )* |
| 669 | | (normalParameterDecl |
| 670 | ',' |
| 671 | )+ |
| 672 | ellipsisParameterDecl |
| 673 | ; |
| 674 | |
| 675 | normalParameterDecl |
| 676 | : variableModifiers type IDENTIFIER |
| 677 | ('[' ']' |
| 678 | )* |
| 679 | ; |
| 680 | |
| 681 | ellipsisParameterDecl |
| 682 | : variableModifiers |
| 683 | type '...' |
| 684 | IDENTIFIER |
| 685 | ; |
| 686 | |
| 687 | |
| 688 | explicitConstructorInvocation |
| 689 | : (nonWildcardTypeArguments |
| 690 | )? //NOTE: the position of Identifier 'super' is set to the type args position here |
| 691 | ('this' |
| 692 | |'super' |
| 693 | ) |
| 694 | arguments ';' |
| 695 | |
| 696 | | primary |
| 697 | '.' |
| 698 | (nonWildcardTypeArguments |
| 699 | )? |
| 700 | 'super' |
| 701 | arguments ';' |
| 702 | ; |
| 703 | |
| 704 | qualifiedName |
| 705 | : IDENTIFIER |
| 706 | ('.' IDENTIFIER |
| 707 | )* |
| 708 | ; |
| 709 | |
| 710 | annotations |
| 711 | : (annotation |
| 712 | )+ |
| 713 | ; |
| 714 | |
| 715 | /** |
| 716 | * Using an annotation. |
| 717 | * '@' is flaged in modifier |
| 718 | */ |
| 719 | annotation |
| 720 | : '@' qualifiedName |
| 721 | ( '(' |
| 722 | ( elementValuePairs |
| 723 | | elementValue |
| 724 | )? |
| 725 | ')' |
| 726 | )? |
| 727 | ; |
| 728 | |
| 729 | elementValuePairs |
| 730 | : elementValuePair |
| 731 | (',' elementValuePair |
| 732 | )* |
| 733 | ; |
| 734 | |
| 735 | elementValuePair |
| 736 | : IDENTIFIER '=' elementValue |
| 737 | ; |
| 738 | |
| 739 | elementValue |
| 740 | : conditionalExpression |
| 741 | | annotation |
| 742 | | elementValueArrayInitializer |
| 743 | ; |
| 744 | |
| 745 | elementValueArrayInitializer |
| 746 | : '{' |
| 747 | (elementValue |
| 748 | (',' elementValue |
| 749 | )* |
| 750 | )? (',')? '}' |
| 751 | ; |
| 752 | |
| 753 | |
| 754 | /** |
| 755 | * Annotation declaration. |
| 756 | */ |
| 757 | annotationTypeDeclaration |
| 758 | : modifiers '@' |
| 759 | 'interface' |
| 760 | IDENTIFIER |
| 761 | annotationTypeBody |
| 762 | ; |
| 763 | |
| 764 | |
| 765 | annotationTypeBody |
| 766 | : '{' |
| 767 | (annotationTypeElementDeclaration |
| 768 | )* |
| 769 | '}' |
| 770 | ; |
| 771 | |
| 772 | /** |
| 773 | * NOTE: here use interfaceFieldDeclaration for field declared inside annotation. they are sytactically the same. |
| 774 | */ |
| 775 | annotationTypeElementDeclaration |
| 776 | : annotationMethodDeclaration |
| 777 | | interfaceFieldDeclaration |
| 778 | | normalClassDeclaration |
| 779 | | normalInterfaceDeclaration |
| 780 | | enumDeclaration |
| 781 | | annotationTypeDeclaration |
| 782 | | ';' |
| 783 | ; |
| 784 | |
| 785 | annotationMethodDeclaration |
| 786 | : modifiers type IDENTIFIER |
| 787 | '(' ')' ('default' elementValue |
| 788 | )? |
| 789 | ';' |
| 790 | ; |
| 791 | |
| 792 | block |
| 793 | : '{' |
| 794 | (blockStatement |
| 795 | )* |
| 796 | '}' |
| 797 | ; |
| 798 | |
| 799 | /* |
| 800 | staticBlock returns [JCBlock tree] |
| 801 | @init { |
| 802 | ListBuffer<JCStatement> stats = new ListBuffer<JCStatement>(); |
| 803 | int pos = ((AntlrJavacToken) $start).getStartIndex(); |
| 804 | } |
| 805 | @after { |
| 806 | $tree = T.at(pos).Block(Flags.STATIC, stats.toList()); |
| 807 | pu.storeEnd($tree, $stop); |
| 808 | // construct a dummy static modifiers for end position |
| 809 | pu.storeEnd(T.at(pos).Modifiers(Flags.STATIC, com.sun.tools.javac.util.List.<JCAnnotation>nil()),$st); |
| 810 | } |
| 811 | : st_1='static' '{' |
| 812 | (blockStatement |
| 813 | { |
| 814 | if ($blockStatement.tree == null) { |
| 815 | stats.appendList($blockStatement.list); |
| 816 | } else { |
| 817 | stats.append($blockStatement.tree); |
| 818 | } |
| 819 | } |
| 820 | )* '}' |
| 821 | ; |
| 822 | */ |
| 823 | blockStatement |
| 824 | : localVariableDeclarationStatement |
| 825 | | classOrInterfaceDeclaration |
| 826 | | statement |
| 827 | ; |
| 828 | |
| 829 | |
| 830 | localVariableDeclarationStatement |
| 831 | : localVariableDeclaration |
| 832 | ';' |
| 833 | ; |
| 834 | |
| 835 | localVariableDeclaration |
| 836 | : variableModifiers type |
| 837 | variableDeclarator |
| 838 | (',' variableDeclarator |
| 839 | )* |
| 840 | ; |
| 841 | |
| 842 | statement |
| 843 | : block |
| 844 | |
| 845 | | ('assert' |
| 846 | ) |
| 847 | expression (':' expression)? ';' |
| 848 | | 'assert' expression (':' expression)? ';' |
| 849 | | 'if' parExpression statement ('else' statement)? |
| 850 | | forstatement |
| 851 | | 'while' parExpression statement |
| 852 | | 'do' statement 'while' parExpression ';' |
| 853 | | trystatement |
| 854 | | 'switch' parExpression '{' switchBlockStatementGroups '}' |
| 855 | | 'synchronized' parExpression block |
| 856 | | 'return' (expression )? ';' |
| 857 | | 'throw' expression ';' |
| 858 | | 'break' |
| 859 | (IDENTIFIER |
| 860 | )? ';' |
| 861 | | 'continue' |
| 862 | (IDENTIFIER |
| 863 | )? ';' |
| 864 | | expression ';' |
| 865 | | IDENTIFIER ':' statement |
| 866 | | ';' |
| 867 | |
| 868 | ; |
| 869 | |
| 870 | switchBlockStatementGroups |
| 871 | : (switchBlockStatementGroup )* |
| 872 | ; |
| 873 | |
| 874 | switchBlockStatementGroup |
| 875 | : |
| 876 | switchLabel |
| 877 | (blockStatement |
| 878 | )* |
| 879 | ; |
| 880 | |
| 881 | switchLabel |
| 882 | : 'case' expression ':' |
| 883 | | 'default' ':' |
| 884 | ; |
| 885 | |
| 886 | |
| 887 | trystatement |
| 888 | : 'try' block |
| 889 | ( catches 'finally' block |
| 890 | | catches |
| 891 | | 'finally' block |
| 892 | ) |
| 893 | ; |
| 894 | |
| 895 | catches |
| 896 | : catchClause |
| 897 | (catchClause |
| 898 | )* |
| 899 | ; |
| 900 | |
| 901 | catchClause |
| 902 | : 'catch' '(' formalParameter |
| 903 | ')' block |
| 904 | ; |
| 905 | |
| 906 | formalParameter |
| 907 | : variableModifiers type IDENTIFIER |
| 908 | ('[' ']' |
| 909 | )* |
| 910 | ; |
| 911 | |
| 912 | forstatement |
| 913 | : |
| 914 | // enhanced for loop |
| 915 | 'for' '(' variableModifiers type IDENTIFIER ':' |
| 916 | expression ')' statement |
| 917 | |
| 918 | // normal for loop |
| 919 | | 'for' '(' |
| 920 | (forInit |
| 921 | )? ';' |
| 922 | (expression |
| 923 | )? ';' |
| 924 | (expressionList |
| 925 | )? ')' statement |
| 926 | ; |
| 927 | |
| 928 | forInit |
| 929 | : localVariableDeclaration |
| 930 | | expressionList |
| 931 | ; |
| 932 | |
| 933 | parExpression |
| 934 | : '(' expression ')' |
| 935 | ; |
| 936 | |
| 937 | expressionList |
| 938 | : expression |
| 939 | (',' expression |
| 940 | )* |
| 941 | ; |
| 942 | |
| 943 | |
| 944 | expression |
| 945 | : conditionalExpression |
| 946 | (assignmentOperator expression |
| 947 | )? |
| 948 | ; |
| 949 | |
| 950 | |
| 951 | assignmentOperator |
| 952 | : '=' |
| 953 | | '+=' |
| 954 | | '-=' |
| 955 | | '*=' |
| 956 | | '/=' |
| 957 | | '&=' |
| 958 | | '|=' |
| 959 | | '^=' |
| 960 | | '%=' |
| 961 | | '<' '<' '=' |
| 962 | | '>' '>' '>' '=' |
| 963 | | '>' '>' '=' |
| 964 | ; |
| 965 | |
| 966 | |
| 967 | conditionalExpression |
| 968 | : conditionalOrExpression |
| 969 | ('?' expression ':' conditionalExpression |
| 970 | )? |
| 971 | ; |
| 972 | |
| 973 | conditionalOrExpression |
| 974 | : conditionalAndExpression |
| 975 | ('||' conditionalAndExpression |
| 976 | )* |
| 977 | ; |
| 978 | |
| 979 | conditionalAndExpression |
| 980 | : inclusiveOrExpression |
| 981 | ('&&' inclusiveOrExpression |
| 982 | )* |
| 983 | ; |
| 984 | |
| 985 | inclusiveOrExpression |
| 986 | : exclusiveOrExpression |
| 987 | ('|' exclusiveOrExpression |
| 988 | )* |
| 989 | ; |
| 990 | |
| 991 | exclusiveOrExpression |
| 992 | : andExpression |
| 993 | ('^' andExpression |
| 994 | )* |
| 995 | ; |
| 996 | |
| 997 | andExpression |
| 998 | : equalityExpression |
| 999 | ('&' equalityExpression |
| 1000 | )* |
| 1001 | ; |
| 1002 | |
| 1003 | equalityExpression |
| 1004 | : instanceOfExpression |
| 1005 | ( |
| 1006 | ( '==' |
| 1007 | | '!=' |
| 1008 | ) |
| 1009 | instanceOfExpression |
| 1010 | )* |
| 1011 | ; |
| 1012 | |
| 1013 | instanceOfExpression |
| 1014 | : relationalExpression |
| 1015 | ('instanceof' type |
| 1016 | )? |
| 1017 | ; |
| 1018 | |
| 1019 | relationalExpression |
| 1020 | : shiftExpression |
| 1021 | (relationalOp shiftExpression |
| 1022 | )* |
| 1023 | ; |
| 1024 | |
| 1025 | relationalOp |
| 1026 | : '<' '=' |
| 1027 | | '>' '=' |
| 1028 | | '<' |
| 1029 | | '>' |
| 1030 | ; |
| 1031 | |
| 1032 | shiftExpression |
| 1033 | : additiveExpression |
| 1034 | (shiftOp additiveExpression |
| 1035 | )* |
| 1036 | ; |
| 1037 | |
| 1038 | |
| 1039 | shiftOp |
| 1040 | : '<' '<' |
| 1041 | | '>' '>' '>' |
| 1042 | | '>' '>' |
| 1043 | ; |
| 1044 | |
| 1045 | |
| 1046 | additiveExpression |
| 1047 | : multiplicativeExpression |
| 1048 | ( |
| 1049 | ( '+' |
| 1050 | | '-' |
| 1051 | ) |
| 1052 | multiplicativeExpression |
| 1053 | )* |
| 1054 | ; |
| 1055 | |
| 1056 | multiplicativeExpression |
| 1057 | : |
| 1058 | unaryExpression |
| 1059 | ( |
| 1060 | ( '*' |
| 1061 | | '/' |
| 1062 | | '%' |
| 1063 | ) |
| 1064 | unaryExpression |
| 1065 | )* |
| 1066 | ; |
| 1067 | |
| 1068 | /** |
| 1069 | * NOTE: for '+' and '-', if the next token is int or long interal, then it's not a unary expression. |
| 1070 | * it's a literal with signed value. INTLTERAL AND LONG LITERAL are added here for this. |
| 1071 | */ |
| 1072 | unaryExpression |
| 1073 | : '+' unaryExpression |
| 1074 | | '-' unaryExpression |
| 1075 | | '++' unaryExpression |
| 1076 | | '--' unaryExpression |
| 1077 | | unaryExpressionNotPlusMinus |
| 1078 | ; |
| 1079 | |
| 1080 | unaryExpressionNotPlusMinus |
| 1081 | : '~' unaryExpression |
| 1082 | | '!' unaryExpression |
| 1083 | | castExpression |
| 1084 | | primary |
| 1085 | (selector |
| 1086 | )* |
| 1087 | ( '++' |
| 1088 | | '--' |
| 1089 | )? |
| 1090 | ; |
| 1091 | |
| 1092 | castExpression |
| 1093 | : '(' primitiveType ')' unaryExpression |
| 1094 | | '(' type ')' unaryExpressionNotPlusMinus |
| 1095 | ; |
| 1096 | |
| 1097 | /** |
| 1098 | * have to use scope here, parameter passing isn't well supported in antlr. |
| 1099 | */ |
| 1100 | primary |
| 1101 | : parExpression |
| 1102 | | 'this' |
| 1103 | ('.' IDENTIFIER |
| 1104 | )* |
| 1105 | (identifierSuffix |
| 1106 | )? |
| 1107 | | IDENTIFIER |
| 1108 | ('.' IDENTIFIER |
| 1109 | )* |
| 1110 | (identifierSuffix |
| 1111 | )? |
| 1112 | | 'super' |
| 1113 | superSuffix |
| 1114 | | literal |
| 1115 | | creator |
| 1116 | | primitiveType |
| 1117 | ('[' ']' |
| 1118 | )* |
| 1119 | '.' 'class' |
| 1120 | | 'void' '.' 'class' |
| 1121 | ; |
| 1122 | |
| 1123 | |
| 1124 | superSuffix |
| 1125 | : arguments |
| 1126 | | '.' (typeArguments |
| 1127 | )? |
| 1128 | IDENTIFIER |
| 1129 | (arguments |
| 1130 | )? |
| 1131 | ; |
| 1132 | |
| 1133 | |
| 1134 | identifierSuffix |
| 1135 | : ('[' ']' |
| 1136 | )+ |
| 1137 | '.' 'class' |
| 1138 | | ('[' expression ']' |
| 1139 | )+ |
| 1140 | | arguments |
| 1141 | | '.' 'class' |
| 1142 | | '.' nonWildcardTypeArguments IDENTIFIER arguments |
| 1143 | | '.' 'this' |
| 1144 | | '.' 'super' arguments |
| 1145 | | innerCreator |
| 1146 | ; |
| 1147 | |
| 1148 | |
| 1149 | selector |
| 1150 | : '.' IDENTIFIER |
| 1151 | (arguments |
| 1152 | )? |
| 1153 | | '.' 'this' |
| 1154 | | '.' 'super' |
| 1155 | superSuffix |
| 1156 | | innerCreator |
| 1157 | | '[' expression ']' |
| 1158 | ; |
| 1159 | |
| 1160 | creator |
| 1161 | : 'new' nonWildcardTypeArguments classOrInterfaceType classCreatorRest |
| 1162 | | 'new' classOrInterfaceType classCreatorRest |
| 1163 | | arrayCreator |
| 1164 | ; |
| 1165 | |
| 1166 | arrayCreator |
| 1167 | : 'new' createdName |
| 1168 | '[' ']' |
| 1169 | ('[' ']' |
| 1170 | )* |
| 1171 | arrayInitializer |
| 1172 | |
| 1173 | | 'new' createdName |
| 1174 | '[' expression |
| 1175 | ']' |
| 1176 | ( '[' expression |
| 1177 | ']' |
| 1178 | )* |
| 1179 | ('[' ']' |
| 1180 | )* |
| 1181 | ; |
| 1182 | |
| 1183 | variableInitializer |
| 1184 | : arrayInitializer |
| 1185 | | expression |
| 1186 | ; |
| 1187 | |
| 1188 | arrayInitializer |
| 1189 | : '{' |
| 1190 | (variableInitializer |
| 1191 | (',' variableInitializer |
| 1192 | )* |
| 1193 | )? |
| 1194 | (',')? |
| 1195 | '}' //Yang's fix, position change. |
| 1196 | ; |
| 1197 | |
| 1198 | |
| 1199 | createdName |
| 1200 | : classOrInterfaceType |
| 1201 | | primitiveType |
| 1202 | ; |
| 1203 | |
| 1204 | innerCreator |
| 1205 | : '.' 'new' |
| 1206 | (nonWildcardTypeArguments |
| 1207 | )? |
| 1208 | IDENTIFIER |
| 1209 | (typeArguments |
| 1210 | )? |
| 1211 | classCreatorRest |
| 1212 | ; |
| 1213 | |
| 1214 | |
| 1215 | classCreatorRest |
| 1216 | : arguments |
| 1217 | (classBody |
| 1218 | )? |
| 1219 | ; |
| 1220 | |
| 1221 | |
| 1222 | nonWildcardTypeArguments |
| 1223 | : '<' typeList |
| 1224 | '>' |
| 1225 | ; |
| 1226 | |
| 1227 | arguments |
| 1228 | : '(' (expressionList |
| 1229 | )? ')' |
| 1230 | ; |
| 1231 | |
| 1232 | literal |
| 1233 | : INTLITERAL |
| 1234 | | LONGLITERAL |
| 1235 | | FLOATLITERAL |
| 1236 | | DOUBLELITERAL |
| 1237 | | CHARLITERAL |
| 1238 | | STRINGLITERAL |
| 1239 | | TRUE |
| 1240 | | FALSE |
| 1241 | | NULL |
| 1242 | ; |
| 1243 | |
| 1244 | /** |
| 1245 | * These are headers help to make syntatical predicates, not necessary but helps to make grammar faster. |
| 1246 | */ |
| 1247 | |
| 1248 | classHeader |
| 1249 | : modifiers 'class' IDENTIFIER |
| 1250 | ; |
| 1251 | |
| 1252 | enumHeader |
| 1253 | : modifiers ('enum'|IDENTIFIER) IDENTIFIER |
| 1254 | ; |
| 1255 | |
| 1256 | interfaceHeader |
| 1257 | : modifiers 'interface' IDENTIFIER |
| 1258 | ; |
| 1259 | |
| 1260 | annotationHeader |
| 1261 | : modifiers '@' 'interface' IDENTIFIER |
| 1262 | ; |
| 1263 | |
| 1264 | typeHeader |
| 1265 | : modifiers ('class'|'enum'|('@' ? 'interface')) IDENTIFIER |
| 1266 | ; |
| 1267 | |
| 1268 | methodHeader |
| 1269 | : modifiers typeParameters? (type|'void')? IDENTIFIER '(' |
| 1270 | ; |
| 1271 | |
| 1272 | fieldHeader |
| 1273 | : modifiers type IDENTIFIER ('['']')* ('='|','|';') |
| 1274 | ; |
| 1275 | |
| 1276 | localVariableHeader |
| 1277 | : variableModifiers type IDENTIFIER ('['']')* ('='|','|';') |
| 1278 | ; |
| 1279 | |
| 1280 | |
| 1281 | |
| 1282 | |
| 1283 | /******************************************************************************************** |
| 1284 | Lexer section |
| 1285 | *********************************************************************************************/ |
| 1286 | |
| 1287 | LONGLITERAL |
| 1288 | : IntegerNumber LongSuffix |
| 1289 | ; |
| 1290 | |
| 1291 | |
| 1292 | INTLITERAL |
| 1293 | : IntegerNumber |
| 1294 | ; |
| 1295 | |
| 1296 | fragment |
| 1297 | IntegerNumber |
| 1298 | : '0' |
| 1299 | | '1'..'9' ('0'..'9')* |
| 1300 | | '0' ('0'..'7')+ |
| 1301 | | HexPrefix HexDigit+ |
| 1302 | ; |
| 1303 | |
| 1304 | fragment |
| 1305 | HexPrefix |
| 1306 | : '0x' | '0X' |
| 1307 | ; |
| 1308 | |
| 1309 | fragment |
| 1310 | HexDigit |
| 1311 | : ('0'..'9'|'a'..'f'|'A'..'F') |
| 1312 | ; |
| 1313 | |
| 1314 | fragment |
| 1315 | LongSuffix |
| 1316 | : 'l' | 'L' |
| 1317 | ; |
| 1318 | |
| 1319 | |
| 1320 | fragment |
| 1321 | NonIntegerNumber |
| 1322 | : ('0' .. '9')+ '.' ('0' .. '9')* Exponent? |
| 1323 | | '.' ( '0' .. '9' )+ Exponent? |
| 1324 | | ('0' .. '9')+ Exponent |
| 1325 | | ('0' .. '9')+ |
| 1326 | | |
| 1327 | HexPrefix (HexDigit )* |
| 1328 | ( () |
| 1329 | | ('.' (HexDigit )* ) |
| 1330 | ) |
| 1331 | ( 'p' | 'P' ) |
| 1332 | ( '+' | '-' )? |
| 1333 | ( '0' .. '9' )+ |
| 1334 | ; |
| 1335 | |
| 1336 | fragment |
| 1337 | Exponent |
| 1338 | : ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ |
| 1339 | ; |
| 1340 | |
| 1341 | fragment |
| 1342 | FloatSuffix |
| 1343 | : 'f' | 'F' |
| 1344 | ; |
| 1345 | |
| 1346 | fragment |
| 1347 | DoubleSuffix |
| 1348 | : 'd' | 'D' |
| 1349 | ; |
| 1350 | |
| 1351 | FLOATLITERAL |
| 1352 | : NonIntegerNumber FloatSuffix |
| 1353 | ; |
| 1354 | |
| 1355 | DOUBLELITERAL |
| 1356 | : NonIntegerNumber DoubleSuffix? |
| 1357 | ; |
| 1358 | |
| 1359 | CHARLITERAL |
Andrew Sapperstein | 6ba612e | 2011-06-20 18:41:24 -0700 | [diff] [blame] | 1360 | : ( '\'' |
Andrew Sapperstein | d6eaacb | 2011-05-20 13:14:56 -0700 | [diff] [blame] | 1361 | ( EscapeSequence |
| 1362 | | ~( '\'' | '\\' | '\r' | '\n' ) |
Andrew Sapperstein | 6ba612e | 2011-06-20 18:41:24 -0700 | [diff] [blame] | 1363 | | UNICODECHAR |
Andrew Sapperstein | d6eaacb | 2011-05-20 13:14:56 -0700 | [diff] [blame] | 1364 | ) |
Andrew Sapperstein | 6ba612e | 2011-06-20 18:41:24 -0700 | [diff] [blame] | 1365 | '\'' ) |
Andrew Sapperstein | d6eaacb | 2011-05-20 13:14:56 -0700 | [diff] [blame] | 1366 | ; |
| 1367 | |
| 1368 | STRINGLITERAL |
| 1369 | : '"' |
| 1370 | ( EscapeSequence |
| 1371 | | ~( '\\' | '"' | '\r' | '\n' ) |
Andrew Sapperstein | 6ba612e | 2011-06-20 18:41:24 -0700 | [diff] [blame] | 1372 | | UNICODECHAR |
Andrew Sapperstein | d6eaacb | 2011-05-20 13:14:56 -0700 | [diff] [blame] | 1373 | )* |
| 1374 | '"' |
| 1375 | ; |
| 1376 | |
| 1377 | fragment |
Andrew Sapperstein | 6ba612e | 2011-06-20 18:41:24 -0700 | [diff] [blame] | 1378 | UNICODECHAR |
| 1379 | : '\\' 'u' UNICODEPART UNICODEPART UNICODEPART UNICODEPART |
| 1380 | ; |
| 1381 | |
| 1382 | fragment |
| 1383 | UNICODEPART |
| 1384 | : ( '0' |
| 1385 | | '1' |
| 1386 | | '2' |
| 1387 | | '3' |
| 1388 | | '4' |
| 1389 | | '5' |
| 1390 | | '6' |
| 1391 | | '7' |
| 1392 | | '8' |
| 1393 | | '9' |
| 1394 | | 'A' |
| 1395 | | 'B' |
| 1396 | | 'C' |
| 1397 | | 'D' |
| 1398 | | 'E' |
| 1399 | | 'F' |
| 1400 | | 'a' |
| 1401 | | 'b' |
| 1402 | | 'c' |
| 1403 | | 'd' |
| 1404 | | 'e' |
| 1405 | | 'f' |
| 1406 | ) |
| 1407 | ; |
| 1408 | |
| 1409 | fragment |
Andrew Sapperstein | d6eaacb | 2011-05-20 13:14:56 -0700 | [diff] [blame] | 1410 | EscapeSequence |
| 1411 | : '\\' ( |
| 1412 | 'b' |
| 1413 | | 't' |
| 1414 | | 'n' |
| 1415 | | 'f' |
| 1416 | | 'r' |
| 1417 | | '\"' |
| 1418 | | '\'' |
| 1419 | | '\\' |
| 1420 | | |
| 1421 | ('0'..'3') ('0'..'7') ('0'..'7') |
| 1422 | | |
| 1423 | ('0'..'7') ('0'..'7') |
| 1424 | | |
| 1425 | ('0'..'7') |
| 1426 | ) |
| 1427 | ; |
| 1428 | |
| 1429 | WS |
| 1430 | : ( |
| 1431 | ' ' |
| 1432 | | '\r' |
| 1433 | | '\t' |
| 1434 | | '\u000C' |
| 1435 | | '\n' |
| 1436 | ) |
| 1437 | { |
| 1438 | skip(); |
| 1439 | } |
| 1440 | ; |
| 1441 | |
| 1442 | COMMENT |
| 1443 | @init{ |
| 1444 | boolean isJavaDoc = false; |
| 1445 | } |
| 1446 | : '/*' |
| 1447 | { |
| 1448 | if((char)input.LA(1) == '*'){ |
| 1449 | isJavaDoc = true; |
| 1450 | } |
| 1451 | } |
| 1452 | (options {greedy=false;} : . )* |
| 1453 | '*/' |
| 1454 | { |
| 1455 | if(isJavaDoc==true){ |
| 1456 | $channel=HIDDEN; |
| 1457 | }else{ |
| 1458 | skip(); |
| 1459 | } |
| 1460 | } |
| 1461 | ; |
| 1462 | |
| 1463 | LINE_COMMENT |
| 1464 | : '//' ~('\n'|'\r')* ('\r\n' | '\r' | '\n') |
| 1465 | { |
| 1466 | skip(); |
| 1467 | } |
| 1468 | | '//' ~('\n'|'\r')* // a line comment could appear at the end of the file without CR/LF |
| 1469 | { |
| 1470 | skip(); |
| 1471 | } |
| 1472 | ; |
| 1473 | |
| 1474 | ABSTRACT |
| 1475 | : 'abstract' |
| 1476 | ; |
| 1477 | |
| 1478 | ASSERT |
| 1479 | : 'assert' |
| 1480 | ; |
| 1481 | |
| 1482 | BOOLEAN |
| 1483 | : 'boolean' |
| 1484 | ; |
| 1485 | |
| 1486 | BREAK |
| 1487 | : 'break' |
| 1488 | ; |
| 1489 | |
| 1490 | BYTE |
| 1491 | : 'byte' |
| 1492 | ; |
| 1493 | |
| 1494 | CASE |
| 1495 | : 'case' |
| 1496 | ; |
| 1497 | |
| 1498 | CATCH |
| 1499 | : 'catch' |
| 1500 | ; |
| 1501 | |
| 1502 | CHAR |
| 1503 | : 'char' |
| 1504 | ; |
| 1505 | |
| 1506 | CLASS |
| 1507 | : 'class' |
| 1508 | ; |
| 1509 | |
| 1510 | CONST |
| 1511 | : 'const' |
| 1512 | ; |
| 1513 | |
| 1514 | CONTINUE |
| 1515 | : 'continue' |
| 1516 | ; |
| 1517 | |
| 1518 | DEFAULT |
| 1519 | : 'default' |
| 1520 | ; |
| 1521 | |
| 1522 | DO |
| 1523 | : 'do' |
| 1524 | ; |
| 1525 | |
| 1526 | DOUBLE |
| 1527 | : 'double' |
| 1528 | ; |
| 1529 | |
| 1530 | ELSE |
| 1531 | : 'else' |
| 1532 | ; |
| 1533 | |
| 1534 | ENUM |
| 1535 | : 'enum' |
| 1536 | ; |
| 1537 | |
| 1538 | EXTENDS |
| 1539 | : 'extends' |
| 1540 | ; |
| 1541 | |
| 1542 | FINAL |
| 1543 | : 'final' |
| 1544 | ; |
| 1545 | |
| 1546 | FINALLY |
| 1547 | : 'finally' |
| 1548 | ; |
| 1549 | |
| 1550 | FLOAT |
| 1551 | : 'float' |
| 1552 | ; |
| 1553 | |
| 1554 | FOR |
| 1555 | : 'for' |
| 1556 | ; |
| 1557 | |
| 1558 | GOTO |
| 1559 | : 'goto' |
| 1560 | ; |
| 1561 | |
| 1562 | IF |
| 1563 | : 'if' |
| 1564 | ; |
| 1565 | |
| 1566 | IMPLEMENTS |
| 1567 | : 'implements' |
| 1568 | ; |
| 1569 | |
| 1570 | IMPORT |
| 1571 | : 'import' |
| 1572 | ; |
| 1573 | |
| 1574 | INSTANCEOF |
| 1575 | : 'instanceof' |
| 1576 | ; |
| 1577 | |
| 1578 | INT |
| 1579 | : 'int' |
| 1580 | ; |
| 1581 | |
| 1582 | INTERFACE |
| 1583 | : 'interface' |
| 1584 | ; |
| 1585 | |
| 1586 | LONG |
| 1587 | : 'long' |
| 1588 | ; |
| 1589 | |
| 1590 | NATIVE |
| 1591 | : 'native' |
| 1592 | ; |
| 1593 | |
| 1594 | NEW |
| 1595 | : 'new' |
| 1596 | ; |
| 1597 | |
| 1598 | PACKAGE |
| 1599 | : 'package' |
| 1600 | ; |
| 1601 | |
| 1602 | PRIVATE |
| 1603 | : 'private' |
| 1604 | ; |
| 1605 | |
| 1606 | PROTECTED |
| 1607 | : 'protected' |
| 1608 | ; |
| 1609 | |
| 1610 | PUBLIC |
| 1611 | : 'public' |
| 1612 | ; |
| 1613 | |
| 1614 | RETURN |
| 1615 | : 'return' |
| 1616 | ; |
| 1617 | |
| 1618 | SHORT |
| 1619 | : 'short' |
| 1620 | ; |
| 1621 | |
| 1622 | STATIC |
| 1623 | : 'static' |
| 1624 | ; |
| 1625 | |
| 1626 | STRICTFP |
| 1627 | : 'strictfp' |
| 1628 | ; |
| 1629 | |
| 1630 | SUPER |
| 1631 | : 'super' |
| 1632 | ; |
| 1633 | |
| 1634 | SWITCH |
| 1635 | : 'switch' |
| 1636 | ; |
| 1637 | |
| 1638 | SYNCHRONIZED |
| 1639 | : 'synchronized' |
| 1640 | ; |
| 1641 | |
| 1642 | THIS |
| 1643 | : 'this' |
| 1644 | ; |
| 1645 | |
| 1646 | THROW |
| 1647 | : 'throw' |
| 1648 | ; |
| 1649 | |
| 1650 | THROWS |
| 1651 | : 'throws' |
| 1652 | ; |
| 1653 | |
| 1654 | TRANSIENT |
| 1655 | : 'transient' |
| 1656 | ; |
| 1657 | |
| 1658 | TRY |
| 1659 | : 'try' |
| 1660 | ; |
| 1661 | |
| 1662 | VOID |
| 1663 | : 'void' |
| 1664 | ; |
| 1665 | |
| 1666 | VOLATILE |
| 1667 | : 'volatile' |
| 1668 | ; |
| 1669 | |
| 1670 | WHILE |
| 1671 | : 'while' |
| 1672 | ; |
| 1673 | |
| 1674 | TRUE |
| 1675 | : 'true' |
| 1676 | ; |
| 1677 | |
| 1678 | FALSE |
| 1679 | : 'false' |
| 1680 | ; |
| 1681 | |
| 1682 | NULL |
| 1683 | : 'null' |
| 1684 | ; |
| 1685 | |
| 1686 | LPAREN |
| 1687 | : '(' |
| 1688 | ; |
| 1689 | |
| 1690 | RPAREN |
| 1691 | : ')' |
| 1692 | ; |
| 1693 | |
| 1694 | LBRACE |
| 1695 | : '{' |
| 1696 | ; |
| 1697 | |
| 1698 | RBRACE |
| 1699 | : '}' |
| 1700 | ; |
| 1701 | |
| 1702 | LBRACKET |
| 1703 | : '[' |
| 1704 | ; |
| 1705 | |
| 1706 | RBRACKET |
| 1707 | : ']' |
| 1708 | ; |
| 1709 | |
| 1710 | SEMI |
| 1711 | : ';' |
| 1712 | ; |
| 1713 | |
| 1714 | COMMA |
| 1715 | : ',' |
| 1716 | ; |
| 1717 | |
| 1718 | DOT |
| 1719 | : '.' |
| 1720 | ; |
| 1721 | |
| 1722 | ELLIPSIS |
| 1723 | : '...' |
| 1724 | ; |
| 1725 | |
| 1726 | EQ |
| 1727 | : '=' |
| 1728 | ; |
| 1729 | |
| 1730 | BANG |
| 1731 | : '!' |
| 1732 | ; |
| 1733 | |
| 1734 | TILDE |
| 1735 | : '~' |
| 1736 | ; |
| 1737 | |
| 1738 | QUES |
| 1739 | : '?' |
| 1740 | ; |
| 1741 | |
| 1742 | COLON |
| 1743 | : ':' |
| 1744 | ; |
| 1745 | |
| 1746 | EQEQ |
| 1747 | : '==' |
| 1748 | ; |
| 1749 | |
| 1750 | AMPAMP |
| 1751 | : '&&' |
| 1752 | ; |
| 1753 | |
| 1754 | BARBAR |
| 1755 | : '||' |
| 1756 | ; |
| 1757 | |
| 1758 | PLUSPLUS |
| 1759 | : '++' |
| 1760 | ; |
| 1761 | |
| 1762 | SUBSUB |
| 1763 | : '--' |
| 1764 | ; |
| 1765 | |
| 1766 | PLUS |
| 1767 | : '+' |
| 1768 | ; |
| 1769 | |
| 1770 | SUB |
| 1771 | : '-' |
| 1772 | ; |
| 1773 | |
| 1774 | STAR |
| 1775 | : '*' |
| 1776 | ; |
| 1777 | |
| 1778 | SLASH |
| 1779 | : '/' |
| 1780 | ; |
| 1781 | |
| 1782 | AMP |
| 1783 | : '&' |
| 1784 | ; |
| 1785 | |
| 1786 | BAR |
| 1787 | : '|' |
| 1788 | ; |
| 1789 | |
| 1790 | CARET |
| 1791 | : '^' |
| 1792 | ; |
| 1793 | |
| 1794 | PERCENT |
| 1795 | : '%' |
| 1796 | ; |
| 1797 | |
| 1798 | PLUSEQ |
| 1799 | : '+=' |
| 1800 | ; |
| 1801 | |
| 1802 | SUBEQ |
| 1803 | : '-=' |
| 1804 | ; |
| 1805 | |
| 1806 | STAREQ |
| 1807 | : '*=' |
| 1808 | ; |
| 1809 | |
| 1810 | SLASHEQ |
| 1811 | : '/=' |
| 1812 | ; |
| 1813 | |
| 1814 | AMPEQ |
| 1815 | : '&=' |
| 1816 | ; |
| 1817 | |
| 1818 | BAREQ |
| 1819 | : '|=' |
| 1820 | ; |
| 1821 | |
| 1822 | CARETEQ |
| 1823 | : '^=' |
| 1824 | ; |
| 1825 | |
| 1826 | PERCENTEQ |
| 1827 | : '%=' |
| 1828 | ; |
| 1829 | |
| 1830 | MONKEYS_AT |
| 1831 | : '@' |
| 1832 | ; |
| 1833 | |
| 1834 | BANGEQ |
| 1835 | : '!=' |
| 1836 | ; |
| 1837 | |
| 1838 | GT |
| 1839 | : '>' |
| 1840 | ; |
| 1841 | |
| 1842 | LT |
| 1843 | : '<' |
| 1844 | ; |
| 1845 | |
| 1846 | IDENTIFIER |
| 1847 | : IdentifierStart IdentifierPart* |
| 1848 | ; |
| 1849 | |
| 1850 | fragment |
| 1851 | SurrogateIdentifer |
| 1852 | : ('\ud800'..'\udbff') ('\udc00'..'\udfff') |
| 1853 | ; |
| 1854 | |
| 1855 | fragment |
| 1856 | IdentifierStart |
| 1857 | : '\u0024' |
| 1858 | | '\u0041'..'\u005a' |
| 1859 | | '\u005f' |
| 1860 | | '\u0061'..'\u007a' |
| 1861 | | '\u00a2'..'\u00a5' |
| 1862 | | '\u00aa' |
| 1863 | | '\u00b5' |
| 1864 | | '\u00ba' |
| 1865 | | '\u00c0'..'\u00d6' |
| 1866 | | '\u00d8'..'\u00f6' |
| 1867 | | '\u00f8'..'\u0236' |
| 1868 | | '\u0250'..'\u02c1' |
| 1869 | | '\u02c6'..'\u02d1' |
| 1870 | | '\u02e0'..'\u02e4' |
| 1871 | | '\u02ee' |
| 1872 | | '\u037a' |
| 1873 | | '\u0386' |
| 1874 | | '\u0388'..'\u038a' |
| 1875 | | '\u038c' |
| 1876 | | '\u038e'..'\u03a1' |
| 1877 | | '\u03a3'..'\u03ce' |
| 1878 | | '\u03d0'..'\u03f5' |
| 1879 | | '\u03f7'..'\u03fb' |
| 1880 | | '\u0400'..'\u0481' |
| 1881 | | '\u048a'..'\u04ce' |
| 1882 | | '\u04d0'..'\u04f5' |
| 1883 | | '\u04f8'..'\u04f9' |
| 1884 | | '\u0500'..'\u050f' |
| 1885 | | '\u0531'..'\u0556' |
| 1886 | | '\u0559' |
| 1887 | | '\u0561'..'\u0587' |
| 1888 | | '\u05d0'..'\u05ea' |
| 1889 | | '\u05f0'..'\u05f2' |
| 1890 | | '\u0621'..'\u063a' |
| 1891 | | '\u0640'..'\u064a' |
| 1892 | | '\u066e'..'\u066f' |
| 1893 | | '\u0671'..'\u06d3' |
| 1894 | | '\u06d5' |
| 1895 | | '\u06e5'..'\u06e6' |
| 1896 | | '\u06ee'..'\u06ef' |
| 1897 | | '\u06fa'..'\u06fc' |
| 1898 | | '\u06ff' |
| 1899 | | '\u0710' |
| 1900 | | '\u0712'..'\u072f' |
| 1901 | | '\u074d'..'\u074f' |
| 1902 | | '\u0780'..'\u07a5' |
| 1903 | | '\u07b1' |
| 1904 | | '\u0904'..'\u0939' |
| 1905 | | '\u093d' |
| 1906 | | '\u0950' |
| 1907 | | '\u0958'..'\u0961' |
| 1908 | | '\u0985'..'\u098c' |
| 1909 | | '\u098f'..'\u0990' |
| 1910 | | '\u0993'..'\u09a8' |
| 1911 | | '\u09aa'..'\u09b0' |
| 1912 | | '\u09b2' |
| 1913 | | '\u09b6'..'\u09b9' |
| 1914 | | '\u09bd' |
| 1915 | | '\u09dc'..'\u09dd' |
| 1916 | | '\u09df'..'\u09e1' |
| 1917 | | '\u09f0'..'\u09f3' |
| 1918 | | '\u0a05'..'\u0a0a' |
| 1919 | | '\u0a0f'..'\u0a10' |
| 1920 | | '\u0a13'..'\u0a28' |
| 1921 | | '\u0a2a'..'\u0a30' |
| 1922 | | '\u0a32'..'\u0a33' |
| 1923 | | '\u0a35'..'\u0a36' |
| 1924 | | '\u0a38'..'\u0a39' |
| 1925 | | '\u0a59'..'\u0a5c' |
| 1926 | | '\u0a5e' |
| 1927 | | '\u0a72'..'\u0a74' |
| 1928 | | '\u0a85'..'\u0a8d' |
| 1929 | | '\u0a8f'..'\u0a91' |
| 1930 | | '\u0a93'..'\u0aa8' |
| 1931 | | '\u0aaa'..'\u0ab0' |
| 1932 | | '\u0ab2'..'\u0ab3' |
| 1933 | | '\u0ab5'..'\u0ab9' |
| 1934 | | '\u0abd' |
| 1935 | | '\u0ad0' |
| 1936 | | '\u0ae0'..'\u0ae1' |
| 1937 | | '\u0af1' |
| 1938 | | '\u0b05'..'\u0b0c' |
| 1939 | | '\u0b0f'..'\u0b10' |
| 1940 | | '\u0b13'..'\u0b28' |
| 1941 | | '\u0b2a'..'\u0b30' |
| 1942 | | '\u0b32'..'\u0b33' |
| 1943 | | '\u0b35'..'\u0b39' |
| 1944 | | '\u0b3d' |
| 1945 | | '\u0b5c'..'\u0b5d' |
| 1946 | | '\u0b5f'..'\u0b61' |
| 1947 | | '\u0b71' |
| 1948 | | '\u0b83' |
| 1949 | | '\u0b85'..'\u0b8a' |
| 1950 | | '\u0b8e'..'\u0b90' |
| 1951 | | '\u0b92'..'\u0b95' |
| 1952 | | '\u0b99'..'\u0b9a' |
| 1953 | | '\u0b9c' |
| 1954 | | '\u0b9e'..'\u0b9f' |
| 1955 | | '\u0ba3'..'\u0ba4' |
| 1956 | | '\u0ba8'..'\u0baa' |
| 1957 | | '\u0bae'..'\u0bb5' |
| 1958 | | '\u0bb7'..'\u0bb9' |
| 1959 | | '\u0bf9' |
| 1960 | | '\u0c05'..'\u0c0c' |
| 1961 | | '\u0c0e'..'\u0c10' |
| 1962 | | '\u0c12'..'\u0c28' |
| 1963 | | '\u0c2a'..'\u0c33' |
| 1964 | | '\u0c35'..'\u0c39' |
| 1965 | | '\u0c60'..'\u0c61' |
| 1966 | | '\u0c85'..'\u0c8c' |
| 1967 | | '\u0c8e'..'\u0c90' |
| 1968 | | '\u0c92'..'\u0ca8' |
| 1969 | | '\u0caa'..'\u0cb3' |
| 1970 | | '\u0cb5'..'\u0cb9' |
| 1971 | | '\u0cbd' |
| 1972 | | '\u0cde' |
| 1973 | | '\u0ce0'..'\u0ce1' |
| 1974 | | '\u0d05'..'\u0d0c' |
| 1975 | | '\u0d0e'..'\u0d10' |
| 1976 | | '\u0d12'..'\u0d28' |
| 1977 | | '\u0d2a'..'\u0d39' |
| 1978 | | '\u0d60'..'\u0d61' |
| 1979 | | '\u0d85'..'\u0d96' |
| 1980 | | '\u0d9a'..'\u0db1' |
| 1981 | | '\u0db3'..'\u0dbb' |
| 1982 | | '\u0dbd' |
| 1983 | | '\u0dc0'..'\u0dc6' |
| 1984 | | '\u0e01'..'\u0e30' |
| 1985 | | '\u0e32'..'\u0e33' |
| 1986 | | '\u0e3f'..'\u0e46' |
| 1987 | | '\u0e81'..'\u0e82' |
| 1988 | | '\u0e84' |
| 1989 | | '\u0e87'..'\u0e88' |
| 1990 | | '\u0e8a' |
| 1991 | | '\u0e8d' |
| 1992 | | '\u0e94'..'\u0e97' |
| 1993 | | '\u0e99'..'\u0e9f' |
| 1994 | | '\u0ea1'..'\u0ea3' |
| 1995 | | '\u0ea5' |
| 1996 | | '\u0ea7' |
| 1997 | | '\u0eaa'..'\u0eab' |
| 1998 | | '\u0ead'..'\u0eb0' |
| 1999 | | '\u0eb2'..'\u0eb3' |
| 2000 | | '\u0ebd' |
| 2001 | | '\u0ec0'..'\u0ec4' |
| 2002 | | '\u0ec6' |
| 2003 | | '\u0edc'..'\u0edd' |
| 2004 | | '\u0f00' |
| 2005 | | '\u0f40'..'\u0f47' |
| 2006 | | '\u0f49'..'\u0f6a' |
| 2007 | | '\u0f88'..'\u0f8b' |
| 2008 | | '\u1000'..'\u1021' |
| 2009 | | '\u1023'..'\u1027' |
| 2010 | | '\u1029'..'\u102a' |
| 2011 | | '\u1050'..'\u1055' |
| 2012 | | '\u10a0'..'\u10c5' |
| 2013 | | '\u10d0'..'\u10f8' |
| 2014 | | '\u1100'..'\u1159' |
| 2015 | | '\u115f'..'\u11a2' |
| 2016 | | '\u11a8'..'\u11f9' |
| 2017 | | '\u1200'..'\u1206' |
| 2018 | | '\u1208'..'\u1246' |
| 2019 | | '\u1248' |
| 2020 | | '\u124a'..'\u124d' |
| 2021 | | '\u1250'..'\u1256' |
| 2022 | | '\u1258' |
| 2023 | | '\u125a'..'\u125d' |
| 2024 | | '\u1260'..'\u1286' |
| 2025 | | '\u1288' |
| 2026 | | '\u128a'..'\u128d' |
| 2027 | | '\u1290'..'\u12ae' |
| 2028 | | '\u12b0' |
| 2029 | | '\u12b2'..'\u12b5' |
| 2030 | | '\u12b8'..'\u12be' |
| 2031 | | '\u12c0' |
| 2032 | | '\u12c2'..'\u12c5' |
| 2033 | | '\u12c8'..'\u12ce' |
| 2034 | | '\u12d0'..'\u12d6' |
| 2035 | | '\u12d8'..'\u12ee' |
| 2036 | | '\u12f0'..'\u130e' |
| 2037 | | '\u1310' |
| 2038 | | '\u1312'..'\u1315' |
| 2039 | | '\u1318'..'\u131e' |
| 2040 | | '\u1320'..'\u1346' |
| 2041 | | '\u1348'..'\u135a' |
| 2042 | | '\u13a0'..'\u13f4' |
| 2043 | | '\u1401'..'\u166c' |
| 2044 | | '\u166f'..'\u1676' |
| 2045 | | '\u1681'..'\u169a' |
| 2046 | | '\u16a0'..'\u16ea' |
| 2047 | | '\u16ee'..'\u16f0' |
| 2048 | | '\u1700'..'\u170c' |
| 2049 | | '\u170e'..'\u1711' |
| 2050 | | '\u1720'..'\u1731' |
| 2051 | | '\u1740'..'\u1751' |
| 2052 | | '\u1760'..'\u176c' |
| 2053 | | '\u176e'..'\u1770' |
| 2054 | | '\u1780'..'\u17b3' |
| 2055 | | '\u17d7' |
| 2056 | | '\u17db'..'\u17dc' |
| 2057 | | '\u1820'..'\u1877' |
| 2058 | | '\u1880'..'\u18a8' |
| 2059 | | '\u1900'..'\u191c' |
| 2060 | | '\u1950'..'\u196d' |
| 2061 | | '\u1970'..'\u1974' |
| 2062 | | '\u1d00'..'\u1d6b' |
| 2063 | | '\u1e00'..'\u1e9b' |
| 2064 | | '\u1ea0'..'\u1ef9' |
| 2065 | | '\u1f00'..'\u1f15' |
| 2066 | | '\u1f18'..'\u1f1d' |
| 2067 | | '\u1f20'..'\u1f45' |
| 2068 | | '\u1f48'..'\u1f4d' |
| 2069 | | '\u1f50'..'\u1f57' |
| 2070 | | '\u1f59' |
| 2071 | | '\u1f5b' |
| 2072 | | '\u1f5d' |
| 2073 | | '\u1f5f'..'\u1f7d' |
| 2074 | | '\u1f80'..'\u1fb4' |
| 2075 | | '\u1fb6'..'\u1fbc' |
| 2076 | | '\u1fbe' |
| 2077 | | '\u1fc2'..'\u1fc4' |
| 2078 | | '\u1fc6'..'\u1fcc' |
| 2079 | | '\u1fd0'..'\u1fd3' |
| 2080 | | '\u1fd6'..'\u1fdb' |
| 2081 | | '\u1fe0'..'\u1fec' |
| 2082 | | '\u1ff2'..'\u1ff4' |
| 2083 | | '\u1ff6'..'\u1ffc' |
| 2084 | | '\u203f'..'\u2040' |
| 2085 | | '\u2054' |
| 2086 | | '\u2071' |
| 2087 | | '\u207f' |
| 2088 | | '\u20a0'..'\u20b1' |
| 2089 | | '\u2102' |
| 2090 | | '\u2107' |
| 2091 | | '\u210a'..'\u2113' |
| 2092 | | '\u2115' |
| 2093 | | '\u2119'..'\u211d' |
| 2094 | | '\u2124' |
| 2095 | | '\u2126' |
| 2096 | | '\u2128' |
| 2097 | | '\u212a'..'\u212d' |
| 2098 | | '\u212f'..'\u2131' |
| 2099 | | '\u2133'..'\u2139' |
| 2100 | | '\u213d'..'\u213f' |
| 2101 | | '\u2145'..'\u2149' |
| 2102 | | '\u2160'..'\u2183' |
| 2103 | | '\u3005'..'\u3007' |
| 2104 | | '\u3021'..'\u3029' |
| 2105 | | '\u3031'..'\u3035' |
| 2106 | | '\u3038'..'\u303c' |
| 2107 | | '\u3041'..'\u3096' |
| 2108 | | '\u309d'..'\u309f' |
| 2109 | | '\u30a1'..'\u30ff' |
| 2110 | | '\u3105'..'\u312c' |
| 2111 | | '\u3131'..'\u318e' |
| 2112 | | '\u31a0'..'\u31b7' |
| 2113 | | '\u31f0'..'\u31ff' |
| 2114 | | '\u3400'..'\u4db5' |
| 2115 | | '\u4e00'..'\u9fa5' |
| 2116 | | '\ua000'..'\ua48c' |
| 2117 | | '\uac00'..'\ud7a3' |
| 2118 | | '\uf900'..'\ufa2d' |
| 2119 | | '\ufa30'..'\ufa6a' |
| 2120 | | '\ufb00'..'\ufb06' |
| 2121 | | '\ufb13'..'\ufb17' |
| 2122 | | '\ufb1d' |
| 2123 | | '\ufb1f'..'\ufb28' |
| 2124 | | '\ufb2a'..'\ufb36' |
| 2125 | | '\ufb38'..'\ufb3c' |
| 2126 | | '\ufb3e' |
| 2127 | | '\ufb40'..'\ufb41' |
| 2128 | | '\ufb43'..'\ufb44' |
| 2129 | | '\ufb46'..'\ufbb1' |
| 2130 | | '\ufbd3'..'\ufd3d' |
| 2131 | | '\ufd50'..'\ufd8f' |
| 2132 | | '\ufd92'..'\ufdc7' |
| 2133 | | '\ufdf0'..'\ufdfc' |
| 2134 | | '\ufe33'..'\ufe34' |
| 2135 | | '\ufe4d'..'\ufe4f' |
| 2136 | | '\ufe69' |
| 2137 | | '\ufe70'..'\ufe74' |
| 2138 | | '\ufe76'..'\ufefc' |
| 2139 | | '\uff04' |
| 2140 | | '\uff21'..'\uff3a' |
| 2141 | | '\uff3f' |
| 2142 | | '\uff41'..'\uff5a' |
| 2143 | | '\uff65'..'\uffbe' |
| 2144 | | '\uffc2'..'\uffc7' |
| 2145 | | '\uffca'..'\uffcf' |
| 2146 | | '\uffd2'..'\uffd7' |
| 2147 | | '\uffda'..'\uffdc' |
| 2148 | | '\uffe0'..'\uffe1' |
| 2149 | | '\uffe5'..'\uffe6' |
| 2150 | | ('\ud800'..'\udbff') ('\udc00'..'\udfff') |
| 2151 | ; |
| 2152 | |
| 2153 | fragment |
| 2154 | IdentifierPart |
| 2155 | : '\u0000'..'\u0008' |
| 2156 | | '\u000e'..'\u001b' |
| 2157 | | '\u0024' |
| 2158 | | '\u0030'..'\u0039' |
| 2159 | | '\u0041'..'\u005a' |
| 2160 | | '\u005f' |
| 2161 | | '\u0061'..'\u007a' |
| 2162 | | '\u007f'..'\u009f' |
| 2163 | | '\u00a2'..'\u00a5' |
| 2164 | | '\u00aa' |
| 2165 | | '\u00ad' |
| 2166 | | '\u00b5' |
| 2167 | | '\u00ba' |
| 2168 | | '\u00c0'..'\u00d6' |
| 2169 | | '\u00d8'..'\u00f6' |
| 2170 | | '\u00f8'..'\u0236' |
| 2171 | | '\u0250'..'\u02c1' |
| 2172 | | '\u02c6'..'\u02d1' |
| 2173 | | '\u02e0'..'\u02e4' |
| 2174 | | '\u02ee' |
| 2175 | | '\u0300'..'\u0357' |
| 2176 | | '\u035d'..'\u036f' |
| 2177 | | '\u037a' |
| 2178 | | '\u0386' |
| 2179 | | '\u0388'..'\u038a' |
| 2180 | | '\u038c' |
| 2181 | | '\u038e'..'\u03a1' |
| 2182 | | '\u03a3'..'\u03ce' |
| 2183 | | '\u03d0'..'\u03f5' |
| 2184 | | '\u03f7'..'\u03fb' |
| 2185 | | '\u0400'..'\u0481' |
| 2186 | | '\u0483'..'\u0486' |
| 2187 | | '\u048a'..'\u04ce' |
| 2188 | | '\u04d0'..'\u04f5' |
| 2189 | | '\u04f8'..'\u04f9' |
| 2190 | | '\u0500'..'\u050f' |
| 2191 | | '\u0531'..'\u0556' |
| 2192 | | '\u0559' |
| 2193 | | '\u0561'..'\u0587' |
| 2194 | | '\u0591'..'\u05a1' |
| 2195 | | '\u05a3'..'\u05b9' |
| 2196 | | '\u05bb'..'\u05bd' |
| 2197 | | '\u05bf' |
| 2198 | | '\u05c1'..'\u05c2' |
| 2199 | | '\u05c4' |
| 2200 | | '\u05d0'..'\u05ea' |
| 2201 | | '\u05f0'..'\u05f2' |
| 2202 | | '\u0600'..'\u0603' |
| 2203 | | '\u0610'..'\u0615' |
| 2204 | | '\u0621'..'\u063a' |
| 2205 | | '\u0640'..'\u0658' |
| 2206 | | '\u0660'..'\u0669' |
| 2207 | | '\u066e'..'\u06d3' |
| 2208 | | '\u06d5'..'\u06dd' |
| 2209 | | '\u06df'..'\u06e8' |
| 2210 | | '\u06ea'..'\u06fc' |
| 2211 | | '\u06ff' |
| 2212 | | '\u070f'..'\u074a' |
| 2213 | | '\u074d'..'\u074f' |
| 2214 | | '\u0780'..'\u07b1' |
| 2215 | | '\u0901'..'\u0939' |
| 2216 | | '\u093c'..'\u094d' |
| 2217 | | '\u0950'..'\u0954' |
| 2218 | | '\u0958'..'\u0963' |
| 2219 | | '\u0966'..'\u096f' |
| 2220 | | '\u0981'..'\u0983' |
| 2221 | | '\u0985'..'\u098c' |
| 2222 | | '\u098f'..'\u0990' |
| 2223 | | '\u0993'..'\u09a8' |
| 2224 | | '\u09aa'..'\u09b0' |
| 2225 | | '\u09b2' |
| 2226 | | '\u09b6'..'\u09b9' |
| 2227 | | '\u09bc'..'\u09c4' |
| 2228 | | '\u09c7'..'\u09c8' |
| 2229 | | '\u09cb'..'\u09cd' |
| 2230 | | '\u09d7' |
| 2231 | | '\u09dc'..'\u09dd' |
| 2232 | | '\u09df'..'\u09e3' |
| 2233 | | '\u09e6'..'\u09f3' |
| 2234 | | '\u0a01'..'\u0a03' |
| 2235 | | '\u0a05'..'\u0a0a' |
| 2236 | | '\u0a0f'..'\u0a10' |
| 2237 | | '\u0a13'..'\u0a28' |
| 2238 | | '\u0a2a'..'\u0a30' |
| 2239 | | '\u0a32'..'\u0a33' |
| 2240 | | '\u0a35'..'\u0a36' |
| 2241 | | '\u0a38'..'\u0a39' |
| 2242 | | '\u0a3c' |
| 2243 | | '\u0a3e'..'\u0a42' |
| 2244 | | '\u0a47'..'\u0a48' |
| 2245 | | '\u0a4b'..'\u0a4d' |
| 2246 | | '\u0a59'..'\u0a5c' |
| 2247 | | '\u0a5e' |
| 2248 | | '\u0a66'..'\u0a74' |
| 2249 | | '\u0a81'..'\u0a83' |
| 2250 | | '\u0a85'..'\u0a8d' |
| 2251 | | '\u0a8f'..'\u0a91' |
| 2252 | | '\u0a93'..'\u0aa8' |
| 2253 | | '\u0aaa'..'\u0ab0' |
| 2254 | | '\u0ab2'..'\u0ab3' |
| 2255 | | '\u0ab5'..'\u0ab9' |
| 2256 | | '\u0abc'..'\u0ac5' |
| 2257 | | '\u0ac7'..'\u0ac9' |
| 2258 | | '\u0acb'..'\u0acd' |
| 2259 | | '\u0ad0' |
| 2260 | | '\u0ae0'..'\u0ae3' |
| 2261 | | '\u0ae6'..'\u0aef' |
| 2262 | | '\u0af1' |
| 2263 | | '\u0b01'..'\u0b03' |
| 2264 | | '\u0b05'..'\u0b0c' |
| 2265 | | '\u0b0f'..'\u0b10' |
| 2266 | | '\u0b13'..'\u0b28' |
| 2267 | | '\u0b2a'..'\u0b30' |
| 2268 | | '\u0b32'..'\u0b33' |
| 2269 | | '\u0b35'..'\u0b39' |
| 2270 | | '\u0b3c'..'\u0b43' |
| 2271 | | '\u0b47'..'\u0b48' |
| 2272 | | '\u0b4b'..'\u0b4d' |
| 2273 | | '\u0b56'..'\u0b57' |
| 2274 | | '\u0b5c'..'\u0b5d' |
| 2275 | | '\u0b5f'..'\u0b61' |
| 2276 | | '\u0b66'..'\u0b6f' |
| 2277 | | '\u0b71' |
| 2278 | | '\u0b82'..'\u0b83' |
| 2279 | | '\u0b85'..'\u0b8a' |
| 2280 | | '\u0b8e'..'\u0b90' |
| 2281 | | '\u0b92'..'\u0b95' |
| 2282 | | '\u0b99'..'\u0b9a' |
| 2283 | | '\u0b9c' |
| 2284 | | '\u0b9e'..'\u0b9f' |
| 2285 | | '\u0ba3'..'\u0ba4' |
| 2286 | | '\u0ba8'..'\u0baa' |
| 2287 | | '\u0bae'..'\u0bb5' |
| 2288 | | '\u0bb7'..'\u0bb9' |
| 2289 | | '\u0bbe'..'\u0bc2' |
| 2290 | | '\u0bc6'..'\u0bc8' |
| 2291 | | '\u0bca'..'\u0bcd' |
| 2292 | | '\u0bd7' |
| 2293 | | '\u0be7'..'\u0bef' |
| 2294 | | '\u0bf9' |
| 2295 | | '\u0c01'..'\u0c03' |
| 2296 | | '\u0c05'..'\u0c0c' |
| 2297 | | '\u0c0e'..'\u0c10' |
| 2298 | | '\u0c12'..'\u0c28' |
| 2299 | | '\u0c2a'..'\u0c33' |
| 2300 | | '\u0c35'..'\u0c39' |
| 2301 | | '\u0c3e'..'\u0c44' |
| 2302 | | '\u0c46'..'\u0c48' |
| 2303 | | '\u0c4a'..'\u0c4d' |
| 2304 | | '\u0c55'..'\u0c56' |
| 2305 | | '\u0c60'..'\u0c61' |
| 2306 | | '\u0c66'..'\u0c6f' |
| 2307 | | '\u0c82'..'\u0c83' |
| 2308 | | '\u0c85'..'\u0c8c' |
| 2309 | | '\u0c8e'..'\u0c90' |
| 2310 | | '\u0c92'..'\u0ca8' |
| 2311 | | '\u0caa'..'\u0cb3' |
| 2312 | | '\u0cb5'..'\u0cb9' |
| 2313 | | '\u0cbc'..'\u0cc4' |
| 2314 | | '\u0cc6'..'\u0cc8' |
| 2315 | | '\u0cca'..'\u0ccd' |
| 2316 | | '\u0cd5'..'\u0cd6' |
| 2317 | | '\u0cde' |
| 2318 | | '\u0ce0'..'\u0ce1' |
| 2319 | | '\u0ce6'..'\u0cef' |
| 2320 | | '\u0d02'..'\u0d03' |
| 2321 | | '\u0d05'..'\u0d0c' |
| 2322 | | '\u0d0e'..'\u0d10' |
| 2323 | | '\u0d12'..'\u0d28' |
| 2324 | | '\u0d2a'..'\u0d39' |
| 2325 | | '\u0d3e'..'\u0d43' |
| 2326 | | '\u0d46'..'\u0d48' |
| 2327 | | '\u0d4a'..'\u0d4d' |
| 2328 | | '\u0d57' |
| 2329 | | '\u0d60'..'\u0d61' |
| 2330 | | '\u0d66'..'\u0d6f' |
| 2331 | | '\u0d82'..'\u0d83' |
| 2332 | | '\u0d85'..'\u0d96' |
| 2333 | | '\u0d9a'..'\u0db1' |
| 2334 | | '\u0db3'..'\u0dbb' |
| 2335 | | '\u0dbd' |
| 2336 | | '\u0dc0'..'\u0dc6' |
| 2337 | | '\u0dca' |
| 2338 | | '\u0dcf'..'\u0dd4' |
| 2339 | | '\u0dd6' |
| 2340 | | '\u0dd8'..'\u0ddf' |
| 2341 | | '\u0df2'..'\u0df3' |
| 2342 | | '\u0e01'..'\u0e3a' |
| 2343 | | '\u0e3f'..'\u0e4e' |
| 2344 | | '\u0e50'..'\u0e59' |
| 2345 | | '\u0e81'..'\u0e82' |
| 2346 | | '\u0e84' |
| 2347 | | '\u0e87'..'\u0e88' |
| 2348 | | '\u0e8a' |
| 2349 | | '\u0e8d' |
| 2350 | | '\u0e94'..'\u0e97' |
| 2351 | | '\u0e99'..'\u0e9f' |
| 2352 | | '\u0ea1'..'\u0ea3' |
| 2353 | | '\u0ea5' |
| 2354 | | '\u0ea7' |
| 2355 | | '\u0eaa'..'\u0eab' |
| 2356 | | '\u0ead'..'\u0eb9' |
| 2357 | | '\u0ebb'..'\u0ebd' |
| 2358 | | '\u0ec0'..'\u0ec4' |
| 2359 | | '\u0ec6' |
| 2360 | | '\u0ec8'..'\u0ecd' |
| 2361 | | '\u0ed0'..'\u0ed9' |
| 2362 | | '\u0edc'..'\u0edd' |
| 2363 | | '\u0f00' |
| 2364 | | '\u0f18'..'\u0f19' |
| 2365 | | '\u0f20'..'\u0f29' |
| 2366 | | '\u0f35' |
| 2367 | | '\u0f37' |
| 2368 | | '\u0f39' |
| 2369 | | '\u0f3e'..'\u0f47' |
| 2370 | | '\u0f49'..'\u0f6a' |
| 2371 | | '\u0f71'..'\u0f84' |
| 2372 | | '\u0f86'..'\u0f8b' |
| 2373 | | '\u0f90'..'\u0f97' |
| 2374 | | '\u0f99'..'\u0fbc' |
| 2375 | | '\u0fc6' |
| 2376 | | '\u1000'..'\u1021' |
| 2377 | | '\u1023'..'\u1027' |
| 2378 | | '\u1029'..'\u102a' |
| 2379 | | '\u102c'..'\u1032' |
| 2380 | | '\u1036'..'\u1039' |
| 2381 | | '\u1040'..'\u1049' |
| 2382 | | '\u1050'..'\u1059' |
| 2383 | | '\u10a0'..'\u10c5' |
| 2384 | | '\u10d0'..'\u10f8' |
| 2385 | | '\u1100'..'\u1159' |
| 2386 | | '\u115f'..'\u11a2' |
| 2387 | | '\u11a8'..'\u11f9' |
| 2388 | | '\u1200'..'\u1206' |
| 2389 | | '\u1208'..'\u1246' |
| 2390 | | '\u1248' |
| 2391 | | '\u124a'..'\u124d' |
| 2392 | | '\u1250'..'\u1256' |
| 2393 | | '\u1258' |
| 2394 | | '\u125a'..'\u125d' |
| 2395 | | '\u1260'..'\u1286' |
| 2396 | | '\u1288' |
| 2397 | | '\u128a'..'\u128d' |
| 2398 | | '\u1290'..'\u12ae' |
| 2399 | | '\u12b0' |
| 2400 | | '\u12b2'..'\u12b5' |
| 2401 | | '\u12b8'..'\u12be' |
| 2402 | | '\u12c0' |
| 2403 | | '\u12c2'..'\u12c5' |
| 2404 | | '\u12c8'..'\u12ce' |
| 2405 | | '\u12d0'..'\u12d6' |
| 2406 | | '\u12d8'..'\u12ee' |
| 2407 | | '\u12f0'..'\u130e' |
| 2408 | | '\u1310' |
| 2409 | | '\u1312'..'\u1315' |
| 2410 | | '\u1318'..'\u131e' |
| 2411 | | '\u1320'..'\u1346' |
| 2412 | | '\u1348'..'\u135a' |
| 2413 | | '\u1369'..'\u1371' |
| 2414 | | '\u13a0'..'\u13f4' |
| 2415 | | '\u1401'..'\u166c' |
| 2416 | | '\u166f'..'\u1676' |
| 2417 | | '\u1681'..'\u169a' |
| 2418 | | '\u16a0'..'\u16ea' |
| 2419 | | '\u16ee'..'\u16f0' |
| 2420 | | '\u1700'..'\u170c' |
| 2421 | | '\u170e'..'\u1714' |
| 2422 | | '\u1720'..'\u1734' |
| 2423 | | '\u1740'..'\u1753' |
| 2424 | | '\u1760'..'\u176c' |
| 2425 | | '\u176e'..'\u1770' |
| 2426 | | '\u1772'..'\u1773' |
| 2427 | | '\u1780'..'\u17d3' |
| 2428 | | '\u17d7' |
| 2429 | | '\u17db'..'\u17dd' |
| 2430 | | '\u17e0'..'\u17e9' |
| 2431 | | '\u180b'..'\u180d' |
| 2432 | | '\u1810'..'\u1819' |
| 2433 | | '\u1820'..'\u1877' |
| 2434 | | '\u1880'..'\u18a9' |
| 2435 | | '\u1900'..'\u191c' |
| 2436 | | '\u1920'..'\u192b' |
| 2437 | | '\u1930'..'\u193b' |
| 2438 | | '\u1946'..'\u196d' |
| 2439 | | '\u1970'..'\u1974' |
| 2440 | | '\u1d00'..'\u1d6b' |
| 2441 | | '\u1e00'..'\u1e9b' |
| 2442 | | '\u1ea0'..'\u1ef9' |
| 2443 | | '\u1f00'..'\u1f15' |
| 2444 | | '\u1f18'..'\u1f1d' |
| 2445 | | '\u1f20'..'\u1f45' |
| 2446 | | '\u1f48'..'\u1f4d' |
| 2447 | | '\u1f50'..'\u1f57' |
| 2448 | | '\u1f59' |
| 2449 | | '\u1f5b' |
| 2450 | | '\u1f5d' |
| 2451 | | '\u1f5f'..'\u1f7d' |
| 2452 | | '\u1f80'..'\u1fb4' |
| 2453 | | '\u1fb6'..'\u1fbc' |
| 2454 | | '\u1fbe' |
| 2455 | | '\u1fc2'..'\u1fc4' |
| 2456 | | '\u1fc6'..'\u1fcc' |
| 2457 | | '\u1fd0'..'\u1fd3' |
| 2458 | | '\u1fd6'..'\u1fdb' |
| 2459 | | '\u1fe0'..'\u1fec' |
| 2460 | | '\u1ff2'..'\u1ff4' |
| 2461 | | '\u1ff6'..'\u1ffc' |
| 2462 | | '\u200c'..'\u200f' |
| 2463 | | '\u202a'..'\u202e' |
| 2464 | | '\u203f'..'\u2040' |
| 2465 | | '\u2054' |
| 2466 | | '\u2060'..'\u2063' |
| 2467 | | '\u206a'..'\u206f' |
| 2468 | | '\u2071' |
| 2469 | | '\u207f' |
| 2470 | | '\u20a0'..'\u20b1' |
| 2471 | | '\u20d0'..'\u20dc' |
| 2472 | | '\u20e1' |
| 2473 | | '\u20e5'..'\u20ea' |
| 2474 | | '\u2102' |
| 2475 | | '\u2107' |
| 2476 | | '\u210a'..'\u2113' |
| 2477 | | '\u2115' |
| 2478 | | '\u2119'..'\u211d' |
| 2479 | | '\u2124' |
| 2480 | | '\u2126' |
| 2481 | | '\u2128' |
| 2482 | | '\u212a'..'\u212d' |
| 2483 | | '\u212f'..'\u2131' |
| 2484 | | '\u2133'..'\u2139' |
| 2485 | | '\u213d'..'\u213f' |
| 2486 | | '\u2145'..'\u2149' |
| 2487 | | '\u2160'..'\u2183' |
| 2488 | | '\u3005'..'\u3007' |
| 2489 | | '\u3021'..'\u302f' |
| 2490 | | '\u3031'..'\u3035' |
| 2491 | | '\u3038'..'\u303c' |
| 2492 | | '\u3041'..'\u3096' |
| 2493 | | '\u3099'..'\u309a' |
| 2494 | | '\u309d'..'\u309f' |
| 2495 | | '\u30a1'..'\u30ff' |
| 2496 | | '\u3105'..'\u312c' |
| 2497 | | '\u3131'..'\u318e' |
| 2498 | | '\u31a0'..'\u31b7' |
| 2499 | | '\u31f0'..'\u31ff' |
| 2500 | | '\u3400'..'\u4db5' |
| 2501 | | '\u4e00'..'\u9fa5' |
| 2502 | | '\ua000'..'\ua48c' |
| 2503 | | '\uac00'..'\ud7a3' |
| 2504 | | '\uf900'..'\ufa2d' |
| 2505 | | '\ufa30'..'\ufa6a' |
| 2506 | | '\ufb00'..'\ufb06' |
| 2507 | | '\ufb13'..'\ufb17' |
| 2508 | | '\ufb1d'..'\ufb28' |
| 2509 | | '\ufb2a'..'\ufb36' |
| 2510 | | '\ufb38'..'\ufb3c' |
| 2511 | | '\ufb3e' |
| 2512 | | '\ufb40'..'\ufb41' |
| 2513 | | '\ufb43'..'\ufb44' |
| 2514 | | '\ufb46'..'\ufbb1' |
| 2515 | | '\ufbd3'..'\ufd3d' |
| 2516 | | '\ufd50'..'\ufd8f' |
| 2517 | | '\ufd92'..'\ufdc7' |
| 2518 | | '\ufdf0'..'\ufdfc' |
| 2519 | | '\ufe00'..'\ufe0f' |
| 2520 | | '\ufe20'..'\ufe23' |
| 2521 | | '\ufe33'..'\ufe34' |
| 2522 | | '\ufe4d'..'\ufe4f' |
| 2523 | | '\ufe69' |
| 2524 | | '\ufe70'..'\ufe74' |
| 2525 | | '\ufe76'..'\ufefc' |
| 2526 | | '\ufeff' |
| 2527 | | '\uff04' |
| 2528 | | '\uff10'..'\uff19' |
| 2529 | | '\uff21'..'\uff3a' |
| 2530 | | '\uff3f' |
| 2531 | | '\uff41'..'\uff5a' |
| 2532 | | '\uff65'..'\uffbe' |
| 2533 | | '\uffc2'..'\uffc7' |
| 2534 | | '\uffca'..'\uffcf' |
| 2535 | | '\uffd2'..'\uffd7' |
| 2536 | | '\uffda'..'\uffdc' |
| 2537 | | '\uffe0'..'\uffe1' |
| 2538 | | '\uffe5'..'\uffe6' |
| 2539 | | '\ufff9'..'\ufffb' |
| 2540 | | ('\ud800'..'\udbff') ('\udc00'..'\udfff') |
| 2541 | ; |