1 # $ANTLR 3.0.1 C.g 2010-02-23 09:58:53
4 from antlr3
.compat
import set, frozenset
7 # The file defines the Lexer for C source files.
9 # THIS FILE IS AUTO-GENENERATED. PLEASE DON NOT MODIFY THIS FILE.
10 # This file is generated by running:
11 # java org.antlr.Tool C.g
13 # Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
15 # This program and the accompanying materials are licensed and made available
16 # under the terms and conditions of the BSD License which accompanies this
17 # distribution. The full text of the license may be found at:
18 # http://opensource.org/licenses/bsd-license.php
20 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
21 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
27 # for convenience in actions
28 HIDDEN
= BaseRecognizer
.HIDDEN
44 FLOATING_POINT_LITERAL
=10
150 grammarFileName
= "C.g"
152 def __init__(self
, input=None):
153 Lexer
.__init
__(self
, input)
154 self
.dfa25
= self
.DFA25(
156 eot
= self
.DFA25_eot
,
157 eof
= self
.DFA25_eof
,
158 min = self
.DFA25_min
,
159 max = self
.DFA25_max
,
160 accept
= self
.DFA25_accept
,
161 special
= self
.DFA25_special
,
162 transition
= self
.DFA25_transition
164 self
.dfa35
= self
.DFA35(
166 eot
= self
.DFA35_eot
,
167 eof
= self
.DFA35_eof
,
168 min = self
.DFA35_min
,
169 max = self
.DFA35_max
,
170 accept
= self
.DFA35_accept
,
171 special
= self
.DFA35_special
,
172 transition
= self
.DFA35_transition
208 # C.g:28:5: ( 'typedef' )
209 # C.g:28:7: 'typedef'
210 self
.match("typedef")
275 # C.g:31:5: ( 'extern' )
298 # C.g:32:5: ( 'static' )
321 # C.g:33:5: ( 'auto' )
344 # C.g:34:5: ( 'register' )
345 # C.g:34:7: 'register'
346 self
.match("register")
367 # C.g:35:5: ( 'STATIC' )
390 # C.g:36:5: ( 'void' )
413 # C.g:37:5: ( 'char' )
436 # C.g:38:5: ( 'short' )
459 # C.g:39:5: ( 'int' )
482 # C.g:40:5: ( 'long' )
505 # C.g:41:5: ( 'float' )
528 # C.g:42:5: ( 'double' )
551 # C.g:43:5: ( 'signed' )
574 # C.g:44:5: ( 'unsigned' )
575 # C.g:44:7: 'unsigned'
576 self
.match("unsigned")
641 # C.g:47:5: ( 'struct' )
664 # C.g:48:5: ( 'union' )
709 # C.g:50:5: ( 'enum' )
732 # C.g:51:5: ( 'const' )
755 # C.g:52:5: ( 'volatile' )
756 # C.g:52:7: 'volatile'
757 self
.match("volatile")
801 # C.g:54:5: ( 'OUT' )
824 # C.g:55:5: ( 'OPTIONAL' )
825 # C.g:55:7: 'OPTIONAL'
826 self
.match("OPTIONAL")
847 # C.g:56:5: ( 'CONST' )
870 # C.g:57:5: ( 'UNALIGNED' )
871 # C.g:57:7: 'UNALIGNED'
872 self
.match("UNALIGNED")
893 # C.g:58:5: ( 'VOLATILE' )
894 # C.g:58:7: 'VOLATILE'
895 self
.match("VOLATILE")
916 # C.g:59:5: ( 'GLOBAL_REMOVE_IF_UNREFERENCED' )
917 # C.g:59:7: 'GLOBAL_REMOVE_IF_UNREFERENCED'
918 self
.match("GLOBAL_REMOVE_IF_UNREFERENCED")
939 # C.g:60:5: ( 'EFIAPI' )
962 # C.g:61:5: ( 'EFI_BOOTSERVICE' )
963 # C.g:61:7: 'EFI_BOOTSERVICE'
964 self
.match("EFI_BOOTSERVICE")
985 # C.g:62:5: ( 'EFI_RUNTIMESERVICE' )
986 # C.g:62:7: 'EFI_RUNTIMESERVICE'
987 self
.match("EFI_RUNTIMESERVICE")
1008 # C.g:63:5: ( 'PACKED' )
1009 # C.g:63:7: 'PACKED'
1010 self
.match("PACKED")
1141 # C.g:69:5: ( '...' )
1252 # C.g:74:5: ( '++' )
1275 # C.g:75:5: ( '--' )
1298 # C.g:76:5: ( 'sizeof' )
1299 # C.g:76:7: 'sizeof'
1300 self
.match("sizeof")
1343 # C.g:78:5: ( '->' )
1432 # C.g:82:5: ( '*=' )
1455 # C.g:83:5: ( '/=' )
1478 # C.g:84:5: ( '%=' )
1501 # C.g:85:5: ( '+=' )
1524 # C.g:86:5: ( '-=' )
1547 # C.g:87:5: ( '<<=' )
1570 # C.g:88:5: ( '>>=' )
1593 # C.g:89:5: ( '&=' )
1616 # C.g:90:5: ( '^=' )
1639 # C.g:91:5: ( '|=' )
1684 # C.g:93:5: ( '||' )
1707 # C.g:94:5: ( '&&' )
1774 # C.g:97:5: ( '==' )
1797 # C.g:98:5: ( '!=' )
1842 # C.g:100:5: ( '>' )
1864 # C.g:101:5: ( '<=' )
1887 # C.g:102:6: ( '>=' )
1910 # C.g:103:6: ( '<<' )
1933 # C.g:104:6: ( '>>' )
1956 # C.g:105:6: ( '__asm__' )
1957 # C.g:105:8: '__asm__'
1958 self
.match("__asm__")
1979 # C.g:106:6: ( '_asm' )
2002 # C.g:107:6: ( '__asm' )
2003 # C.g:107:8: '__asm'
2025 # C.g:108:6: ( 'case' )
2048 # C.g:109:6: ( 'default' )
2049 # C.g:109:8: 'default'
2050 self
.match("default")
2071 # C.g:110:6: ( 'if' )
2094 # C.g:111:6: ( 'else' )
2117 # C.g:112:6: ( 'switch' )
2118 # C.g:112:8: 'switch'
2119 self
.match("switch")
2140 # C.g:113:6: ( 'while' )
2141 # C.g:113:8: 'while'
2163 # C.g:114:6: ( 'do' )
2186 # C.g:115:6: ( 'for' )
2209 # C.g:116:6: ( 'goto' )
2232 # C.g:117:6: ( 'continue' )
2233 # C.g:117:8: 'continue'
2234 self
.match("continue")
2255 # C.g:118:6: ( 'break' )
2256 # C.g:118:8: 'break'
2278 # C.g:119:6: ( 'return' )
2279 # C.g:119:8: 'return'
2280 self
.match("return")
2295 # $ANTLR start IDENTIFIER
2296 def mIDENTIFIER(self
, ):
2299 self
.type = IDENTIFIER
2301 # C.g:586:2: ( LETTER ( LETTER | '0' .. '9' )* )
2302 # C.g:586:4: LETTER ( LETTER | '0' .. '9' )*
2305 # C.g:586:11: ( LETTER | '0' .. '9' )*
2308 LA1_0
= self
.input.LA(1)
2310 if (LA1_0
== u
'$' or (u
'0' <= LA1_0
<= u
'9') or (u
'A' <= LA1_0
<= u
'Z') or LA1_0
== u
'_' or (u
'a' <= LA1_0
<= u
'z')) :
2316 if self
.input.LA(1) == u
'$' or (u
'0' <= self
.input.LA(1) <= u
'9') or (u
'A' <= self
.input.LA(1) <= u
'Z') or self
.input.LA(1) == u
'_' or (u
'a' <= self
.input.LA(1) <= u
'z'):
2317 self
.input.consume();
2320 mse
= MismatchedSetException(None, self
.input)
2339 # $ANTLR end IDENTIFIER
2343 # $ANTLR start LETTER
2344 def mLETTER(self
, ):
2347 # C.g:591:2: ( '$' | 'A' .. 'Z' | 'a' .. 'z' | '_' )
2349 if self
.input.LA(1) == u
'$' or (u
'A' <= self
.input.LA(1) <= u
'Z') or self
.input.LA(1) == u
'_' or (u
'a' <= self
.input.LA(1) <= u
'z'):
2350 self
.input.consume();
2353 mse
= MismatchedSetException(None, self
.input)
2370 # $ANTLR start CHARACTER_LITERAL
2371 def mCHARACTER_LITERAL(self
, ):
2374 self
.type = CHARACTER_LITERAL
2376 # C.g:598:5: ( ( 'L' )? '\\'' ( EscapeSequence | ~ ( '\\'' | '\\\\' ) ) '\\'' )
2377 # C.g:598:9: ( 'L' )? '\\'' ( EscapeSequence | ~ ( '\\'' | '\\\\' ) ) '\\''
2378 # C.g:598:9: ( 'L' )?
2380 LA2_0
= self
.input.LA(1)
2382 if (LA2_0
== u
'L') :
2393 # C.g:598:21: ( EscapeSequence | ~ ( '\\'' | '\\\\' ) )
2395 LA3_0
= self
.input.LA(1)
2397 if (LA3_0
== u
'\\') :
2399 elif ((u
'\u0000' <= LA3_0
<= u
'&') or (u
'(' <= LA3_0
<= u
'[') or (u
']' <= LA3_0
<= u
'\uFFFE')) :
2402 nvae
= NoViableAltException("598:21: ( EscapeSequence | ~ ( '\\'' | '\\\\' ) )", 3, 0, self
.input)
2407 # C.g:598:23: EscapeSequence
2408 self
.mEscapeSequence()
2413 # C.g:598:40: ~ ( '\\'' | '\\\\' )
2414 if (u
'\u0000' <= self
.input.LA(1) <= u
'&') or (u
'(' <= self
.input.LA(1) <= u
'[') or (u
']' <= self
.input.LA(1) <= u
'\uFFFE'):
2415 self
.input.consume();
2418 mse
= MismatchedSetException(None, self
.input)
2436 # $ANTLR end CHARACTER_LITERAL
2440 # $ANTLR start STRING_LITERAL
2441 def mSTRING_LITERAL(self
, ):
2444 self
.type = STRING_LITERAL
2446 # C.g:602:5: ( ( 'L' )? '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
2447 # C.g:602:8: ( 'L' )? '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
2448 # C.g:602:8: ( 'L' )?
2450 LA4_0
= self
.input.LA(1)
2452 if (LA4_0
== u
'L') :
2463 # C.g:602:19: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
2466 LA5_0
= self
.input.LA(1)
2468 if (LA5_0
== u
'\\') :
2470 elif ((u
'\u0000' <= LA5_0
<= u
'!') or (u
'#' <= LA5_0
<= u
'[') or (u
']' <= LA5_0
<= u
'\uFFFE')) :
2475 # C.g:602:21: EscapeSequence
2476 self
.mEscapeSequence()
2481 # C.g:602:38: ~ ( '\\\\' | '\"' )
2482 if (u
'\u0000' <= self
.input.LA(1) <= u
'!') or (u
'#' <= self
.input.LA(1) <= u
'[') or (u
']' <= self
.input.LA(1) <= u
'\uFFFE'):
2483 self
.input.consume();
2486 mse
= MismatchedSetException(None, self
.input)
2507 # $ANTLR end STRING_LITERAL
2511 # $ANTLR start HEX_LITERAL
2512 def mHEX_LITERAL(self
, ):
2515 self
.type = HEX_LITERAL
2517 # C.g:605:13: ( '0' ( 'x' | 'X' ) ( HexDigit )+ ( IntegerTypeSuffix )? )
2518 # C.g:605:15: '0' ( 'x' | 'X' ) ( HexDigit )+ ( IntegerTypeSuffix )?
2521 if self
.input.LA(1) == u
'X' or self
.input.LA(1) == u
'x':
2522 self
.input.consume();
2525 mse
= MismatchedSetException(None, self
.input)
2530 # C.g:605:29: ( HexDigit )+
2534 LA6_0
= self
.input.LA(1)
2536 if ((u
'0' <= LA6_0
<= u
'9') or (u
'A' <= LA6_0
<= u
'F') or (u
'a' <= LA6_0
<= u
'f')) :
2541 # C.g:605:29: HexDigit
2550 eee
= EarlyExitException(6, self
.input)
2556 # C.g:605:39: ( IntegerTypeSuffix )?
2558 LA7_0
= self
.input.LA(1)
2560 if (LA7_0
== u
'L' or LA7_0
== u
'U' or LA7_0
== u
'l' or LA7_0
== u
'u') :
2563 # C.g:605:39: IntegerTypeSuffix
2564 self
.mIntegerTypeSuffix()
2577 # $ANTLR end HEX_LITERAL
2581 # $ANTLR start DECIMAL_LITERAL
2582 def mDECIMAL_LITERAL(self
, ):
2585 self
.type = DECIMAL_LITERAL
2587 # C.g:607:17: ( ( '0' | '1' .. '9' ( '0' .. '9' )* ) ( IntegerTypeSuffix )? )
2588 # C.g:607:19: ( '0' | '1' .. '9' ( '0' .. '9' )* ) ( IntegerTypeSuffix )?
2589 # C.g:607:19: ( '0' | '1' .. '9' ( '0' .. '9' )* )
2591 LA9_0
= self
.input.LA(1)
2593 if (LA9_0
== u
'0') :
2595 elif ((u
'1' <= LA9_0
<= u
'9')) :
2598 nvae
= NoViableAltException("607:19: ( '0' | '1' .. '9' ( '0' .. '9' )* )", 9, 0, self
.input)
2609 # C.g:607:26: '1' .. '9' ( '0' .. '9' )*
2610 self
.matchRange(u
'1', u
'9')
2612 # C.g:607:35: ( '0' .. '9' )*
2615 LA8_0
= self
.input.LA(1)
2617 if ((u
'0' <= LA8_0
<= u
'9')) :
2622 # C.g:607:35: '0' .. '9'
2623 self
.matchRange(u
'0', u
'9')
2634 # C.g:607:46: ( IntegerTypeSuffix )?
2636 LA10_0
= self
.input.LA(1)
2638 if (LA10_0
== u
'L' or LA10_0
== u
'U' or LA10_0
== u
'l' or LA10_0
== u
'u') :
2641 # C.g:607:46: IntegerTypeSuffix
2642 self
.mIntegerTypeSuffix()
2655 # $ANTLR end DECIMAL_LITERAL
2659 # $ANTLR start OCTAL_LITERAL
2660 def mOCTAL_LITERAL(self
, ):
2663 self
.type = OCTAL_LITERAL
2665 # C.g:609:15: ( '0' ( '0' .. '7' )+ ( IntegerTypeSuffix )? )
2666 # C.g:609:17: '0' ( '0' .. '7' )+ ( IntegerTypeSuffix )?
2669 # C.g:609:21: ( '0' .. '7' )+
2673 LA11_0
= self
.input.LA(1)
2675 if ((u
'0' <= LA11_0
<= u
'7')) :
2680 # C.g:609:22: '0' .. '7'
2681 self
.matchRange(u
'0', u
'7')
2689 eee
= EarlyExitException(11, self
.input)
2695 # C.g:609:33: ( IntegerTypeSuffix )?
2697 LA12_0
= self
.input.LA(1)
2699 if (LA12_0
== u
'L' or LA12_0
== u
'U' or LA12_0
== u
'l' or LA12_0
== u
'u') :
2702 # C.g:609:33: IntegerTypeSuffix
2703 self
.mIntegerTypeSuffix()
2716 # $ANTLR end OCTAL_LITERAL
2720 # $ANTLR start HexDigit
2721 def mHexDigit(self
, ):
2724 # C.g:612:10: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
2725 # C.g:612:12: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )
2726 if (u
'0' <= self
.input.LA(1) <= u
'9') or (u
'A' <= self
.input.LA(1) <= u
'F') or (u
'a' <= self
.input.LA(1) <= u
'f'):
2727 self
.input.consume();
2730 mse
= MismatchedSetException(None, self
.input)
2743 # $ANTLR end HexDigit
2747 # $ANTLR start IntegerTypeSuffix
2748 def mIntegerTypeSuffix(self
, ):
2751 # C.g:616:2: ( ( 'u' | 'U' ) | ( 'l' | 'L' ) | ( 'u' | 'U' ) ( 'l' | 'L' ) | ( 'u' | 'U' ) ( 'l' | 'L' ) ( 'l' | 'L' ) )
2753 LA13_0
= self
.input.LA(1)
2755 if (LA13_0
== u
'U' or LA13_0
== u
'u') :
2756 LA13_1
= self
.input.LA(2)
2758 if (LA13_1
== u
'L' or LA13_1
== u
'l') :
2759 LA13_3
= self
.input.LA(3)
2761 if (LA13_3
== u
'L' or LA13_3
== u
'l') :
2767 elif (LA13_0
== u
'L' or LA13_0
== u
'l') :
2770 nvae
= NoViableAltException("614:1: fragment IntegerTypeSuffix : ( ( 'u' | 'U' ) | ( 'l' | 'L' ) | ( 'u' | 'U' ) ( 'l' | 'L' ) | ( 'u' | 'U' ) ( 'l' | 'L' ) ( 'l' | 'L' ) );", 13, 0, self
.input)
2775 # C.g:616:4: ( 'u' | 'U' )
2776 if self
.input.LA(1) == u
'U' or self
.input.LA(1) == u
'u':
2777 self
.input.consume();
2780 mse
= MismatchedSetException(None, self
.input)
2788 # C.g:617:4: ( 'l' | 'L' )
2789 if self
.input.LA(1) == u
'L' or self
.input.LA(1) == u
'l':
2790 self
.input.consume();
2793 mse
= MismatchedSetException(None, self
.input)
2801 # C.g:618:4: ( 'u' | 'U' ) ( 'l' | 'L' )
2802 if self
.input.LA(1) == u
'U' or self
.input.LA(1) == u
'u':
2803 self
.input.consume();
2806 mse
= MismatchedSetException(None, self
.input)
2811 if self
.input.LA(1) == u
'L' or self
.input.LA(1) == u
'l':
2812 self
.input.consume();
2815 mse
= MismatchedSetException(None, self
.input)
2823 # C.g:619:4: ( 'u' | 'U' ) ( 'l' | 'L' ) ( 'l' | 'L' )
2824 if self
.input.LA(1) == u
'U' or self
.input.LA(1) == u
'u':
2825 self
.input.consume();
2828 mse
= MismatchedSetException(None, self
.input)
2833 if self
.input.LA(1) == u
'L' or self
.input.LA(1) == u
'l':
2834 self
.input.consume();
2837 mse
= MismatchedSetException(None, self
.input)
2842 if self
.input.LA(1) == u
'L' or self
.input.LA(1) == u
'l':
2843 self
.input.consume();
2846 mse
= MismatchedSetException(None, self
.input)
2858 # $ANTLR end IntegerTypeSuffix
2862 # $ANTLR start FLOATING_POINT_LITERAL
2863 def mFLOATING_POINT_LITERAL(self
, ):
2866 self
.type = FLOATING_POINT_LITERAL
2868 # C.g:623:5: ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( Exponent )? ( FloatTypeSuffix )? | '.' ( '0' .. '9' )+ ( Exponent )? ( FloatTypeSuffix )? | ( '0' .. '9' )+ Exponent ( FloatTypeSuffix )? | ( '0' .. '9' )+ ( Exponent )? FloatTypeSuffix )
2870 alt25
= self
.dfa25
.predict(self
.input)
2872 # C.g:623:9: ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( Exponent )? ( FloatTypeSuffix )?
2873 # C.g:623:9: ( '0' .. '9' )+
2877 LA14_0
= self
.input.LA(1)
2879 if ((u
'0' <= LA14_0
<= u
'9')) :
2884 # C.g:623:10: '0' .. '9'
2885 self
.matchRange(u
'0', u
'9')
2893 eee
= EarlyExitException(14, self
.input)
2901 # C.g:623:25: ( '0' .. '9' )*
2904 LA15_0
= self
.input.LA(1)
2906 if ((u
'0' <= LA15_0
<= u
'9')) :
2911 # C.g:623:26: '0' .. '9'
2912 self
.matchRange(u
'0', u
'9')
2920 # C.g:623:37: ( Exponent )?
2922 LA16_0
= self
.input.LA(1)
2924 if (LA16_0
== u
'E' or LA16_0
== u
'e') :
2927 # C.g:623:37: Exponent
2933 # C.g:623:47: ( FloatTypeSuffix )?
2935 LA17_0
= self
.input.LA(1)
2937 if (LA17_0
== u
'D' or LA17_0
== u
'F' or LA17_0
== u
'd' or LA17_0
== u
'f') :
2940 # C.g:623:47: FloatTypeSuffix
2941 self
.mFloatTypeSuffix()
2949 # C.g:624:9: '.' ( '0' .. '9' )+ ( Exponent )? ( FloatTypeSuffix )?
2952 # C.g:624:13: ( '0' .. '9' )+
2956 LA18_0
= self
.input.LA(1)
2958 if ((u
'0' <= LA18_0
<= u
'9')) :
2963 # C.g:624:14: '0' .. '9'
2964 self
.matchRange(u
'0', u
'9')
2972 eee
= EarlyExitException(18, self
.input)
2978 # C.g:624:25: ( Exponent )?
2980 LA19_0
= self
.input.LA(1)
2982 if (LA19_0
== u
'E' or LA19_0
== u
'e') :
2985 # C.g:624:25: Exponent
2991 # C.g:624:35: ( FloatTypeSuffix )?
2993 LA20_0
= self
.input.LA(1)
2995 if (LA20_0
== u
'D' or LA20_0
== u
'F' or LA20_0
== u
'd' or LA20_0
== u
'f') :
2998 # C.g:624:35: FloatTypeSuffix
2999 self
.mFloatTypeSuffix()
3007 # C.g:625:9: ( '0' .. '9' )+ Exponent ( FloatTypeSuffix )?
3008 # C.g:625:9: ( '0' .. '9' )+
3012 LA21_0
= self
.input.LA(1)
3014 if ((u
'0' <= LA21_0
<= u
'9')) :
3019 # C.g:625:10: '0' .. '9'
3020 self
.matchRange(u
'0', u
'9')
3028 eee
= EarlyExitException(21, self
.input)
3036 # C.g:625:30: ( FloatTypeSuffix )?
3038 LA22_0
= self
.input.LA(1)
3040 if (LA22_0
== u
'D' or LA22_0
== u
'F' or LA22_0
== u
'd' or LA22_0
== u
'f') :
3043 # C.g:625:30: FloatTypeSuffix
3044 self
.mFloatTypeSuffix()
3052 # C.g:626:9: ( '0' .. '9' )+ ( Exponent )? FloatTypeSuffix
3053 # C.g:626:9: ( '0' .. '9' )+
3057 LA23_0
= self
.input.LA(1)
3059 if ((u
'0' <= LA23_0
<= u
'9')) :
3064 # C.g:626:10: '0' .. '9'
3065 self
.matchRange(u
'0', u
'9')
3073 eee
= EarlyExitException(23, self
.input)
3079 # C.g:626:21: ( Exponent )?
3081 LA24_0
= self
.input.LA(1)
3083 if (LA24_0
== u
'E' or LA24_0
== u
'e') :
3086 # C.g:626:21: Exponent
3092 self
.mFloatTypeSuffix()
3101 # $ANTLR end FLOATING_POINT_LITERAL
3105 # $ANTLR start Exponent
3106 def mExponent(self
, ):
3109 # C.g:630:10: ( ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ )
3110 # C.g:630:12: ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+
3111 if self
.input.LA(1) == u
'E' or self
.input.LA(1) == u
'e':
3112 self
.input.consume();
3115 mse
= MismatchedSetException(None, self
.input)
3120 # C.g:630:22: ( '+' | '-' )?
3122 LA26_0
= self
.input.LA(1)
3124 if (LA26_0
== u
'+' or LA26_0
== u
'-') :
3128 if self
.input.LA(1) == u
'+' or self
.input.LA(1) == u
'-':
3129 self
.input.consume();
3132 mse
= MismatchedSetException(None, self
.input)
3140 # C.g:630:33: ( '0' .. '9' )+
3144 LA27_0
= self
.input.LA(1)
3146 if ((u
'0' <= LA27_0
<= u
'9')) :
3151 # C.g:630:34: '0' .. '9'
3152 self
.matchRange(u
'0', u
'9')
3160 eee
= EarlyExitException(27, self
.input)
3174 # $ANTLR end Exponent
3178 # $ANTLR start FloatTypeSuffix
3179 def mFloatTypeSuffix(self
, ):
3182 # C.g:633:17: ( ( 'f' | 'F' | 'd' | 'D' ) )
3183 # C.g:633:19: ( 'f' | 'F' | 'd' | 'D' )
3184 if self
.input.LA(1) == u
'D' or self
.input.LA(1) == u
'F' or self
.input.LA(1) == u
'd' or self
.input.LA(1) == u
'f':
3185 self
.input.consume();
3188 mse
= MismatchedSetException(None, self
.input)
3201 # $ANTLR end FloatTypeSuffix
3205 # $ANTLR start EscapeSequence
3206 def mEscapeSequence(self
, ):
3209 # C.g:637:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | OctalEscape )
3211 LA28_0
= self
.input.LA(1)
3213 if (LA28_0
== u
'\\') :
3214 LA28_1
= self
.input.LA(2)
3216 if (LA28_1
== u
'"' or LA28_1
== u
'\'' or LA28_1
== u
'\\' or LA28_1
== u
'b' or LA28_1
== u
'f' or LA28_1
== u
'n' or LA28_1
== u
'r' or LA28_1
== u
't') :
3218 elif ((u
'0' <= LA28_1
<= u
'7')) :
3221 nvae
= NoViableAltException("635:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | OctalEscape );", 28, 1, self
.input)
3226 nvae
= NoViableAltException("635:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | OctalEscape );", 28, 0, self
.input)
3231 # C.g:637:8: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
3234 if self
.input.LA(1) == u
'"' or self
.input.LA(1) == u
'\'' or self
.input.LA(1) == u
'\\' or self
.input.LA(1) == u
'b' or self
.input.LA(1) == u
'f' or self
.input.LA(1) == u
'n' or self
.input.LA(1) == u
'r' or self
.input.LA(1) == u
't':
3235 self
.input.consume();
3238 mse
= MismatchedSetException(None, self
.input)
3246 # C.g:638:9: OctalEscape
3256 # $ANTLR end EscapeSequence
3260 # $ANTLR start OctalEscape
3261 def mOctalEscape(self
, ):
3264 # C.g:643:5: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
3266 LA29_0
= self
.input.LA(1)
3268 if (LA29_0
== u
'\\') :
3269 LA29_1
= self
.input.LA(2)
3271 if ((u
'0' <= LA29_1
<= u
'3')) :
3272 LA29_2
= self
.input.LA(3)
3274 if ((u
'0' <= LA29_2
<= u
'7')) :
3275 LA29_4
= self
.input.LA(4)
3277 if ((u
'0' <= LA29_4
<= u
'7')) :
3283 elif ((u
'4' <= LA29_1
<= u
'7')) :
3284 LA29_3
= self
.input.LA(3)
3286 if ((u
'0' <= LA29_3
<= u
'7')) :
3291 nvae
= NoViableAltException("641:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 29, 1, self
.input)
3296 nvae
= NoViableAltException("641:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 29, 0, self
.input)
3301 # C.g:643:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
3304 # C.g:643:14: ( '0' .. '3' )
3305 # C.g:643:15: '0' .. '3'
3306 self
.matchRange(u
'0', u
'3')
3311 # C.g:643:25: ( '0' .. '7' )
3312 # C.g:643:26: '0' .. '7'
3313 self
.matchRange(u
'0', u
'7')
3318 # C.g:643:36: ( '0' .. '7' )
3319 # C.g:643:37: '0' .. '7'
3320 self
.matchRange(u
'0', u
'7')
3328 # C.g:644:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
3331 # C.g:644:14: ( '0' .. '7' )
3332 # C.g:644:15: '0' .. '7'
3333 self
.matchRange(u
'0', u
'7')
3338 # C.g:644:25: ( '0' .. '7' )
3339 # C.g:644:26: '0' .. '7'
3340 self
.matchRange(u
'0', u
'7')
3348 # C.g:645:9: '\\\\' ( '0' .. '7' )
3351 # C.g:645:14: ( '0' .. '7' )
3352 # C.g:645:15: '0' .. '7'
3353 self
.matchRange(u
'0', u
'7')
3365 # $ANTLR end OctalEscape
3369 # $ANTLR start UnicodeEscape
3370 def mUnicodeEscape(self
, ):
3373 # C.g:650:5: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
3374 # C.g:650:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
3395 # $ANTLR end UnicodeEscape
3405 # C.g:653:5: ( ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' ) )
3406 # C.g:653:8: ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' )
3407 if (u
'\t' <= self
.input.LA(1) <= u
'\n') or (u
'\f' <= self
.input.LA(1) <= u
'\r') or self
.input.LA(1) == u
' ':
3408 self
.input.consume();
3411 mse
= MismatchedSetException(None, self
.input)
3417 self
.channel
=HIDDEN
;
3437 # C.g:657:5: ( ( '\\\\' ) )
3438 # C.g:657:7: ( '\\\\' )
3439 # C.g:657:7: ( '\\\\' )
3447 self
.channel
=HIDDEN
;
3461 # $ANTLR start UnicodeVocabulary
3462 def mUnicodeVocabulary(self
, ):
3465 self
.type = UnicodeVocabulary
3467 # C.g:665:5: ( '\\u0003' .. '\\uFFFE' )
3468 # C.g:665:7: '\\u0003' .. '\\uFFFE'
3469 self
.matchRange(u
'\u0003', u
'\uFFFE')
3479 # $ANTLR end UnicodeVocabulary
3483 # $ANTLR start COMMENT
3484 def mCOMMENT(self
, ):
3489 # C.g:668:5: ( '/*' ( options {greedy=false; } : . )* '*/' )
3490 # C.g:668:9: '/*' ( options {greedy=false; } : . )* '*/'
3494 # C.g:668:14: ( options {greedy=false; } : . )*
3497 LA30_0
= self
.input.LA(1)
3499 if (LA30_0
== u
'*') :
3500 LA30_1
= self
.input.LA(2)
3502 if (LA30_1
== u
'/') :
3504 elif ((u
'\u0000' <= LA30_1
<= u
'.') or (u
'0' <= LA30_1
<= u
'\uFFFE')) :
3508 elif ((u
'\u0000' <= LA30_0
<= u
')') or (u
'+' <= LA30_0
<= u
'\uFFFE')) :
3526 self
.channel
=HIDDEN
;
3536 # $ANTLR end COMMENT
3540 # $ANTLR start LINE_COMMENT
3541 def mLINE_COMMENT(self
, ):
3544 self
.type = LINE_COMMENT
3546 # C.g:673:5: ( '//' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' )
3547 # C.g:673:7: '//' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n'
3551 # C.g:673:12: (~ ( '\\n' | '\\r' ) )*
3554 LA31_0
= self
.input.LA(1)
3556 if ((u
'\u0000' <= LA31_0
<= u
'\t') or (u
'\u000B' <= LA31_0
<= u
'\f') or (u
'\u000E' <= LA31_0
<= u
'\uFFFE')) :
3561 # C.g:673:12: ~ ( '\\n' | '\\r' )
3562 if (u
'\u0000' <= self
.input.LA(1) <= u
'\t') or (u
'\u000B' <= self
.input.LA(1) <= u
'\f') or (u
'\u000E' <= self
.input.LA(1) <= u
'\uFFFE'):
3563 self
.input.consume();
3566 mse
= MismatchedSetException(None, self
.input)
3577 # C.g:673:26: ( '\\r' )?
3579 LA32_0
= self
.input.LA(1)
3581 if (LA32_0
== u
'\r') :
3593 self
.channel
=HIDDEN
;
3603 # $ANTLR end LINE_COMMENT
3607 # $ANTLR start LINE_COMMAND
3608 def mLINE_COMMAND(self
, ):
3611 self
.type = LINE_COMMAND
3613 # C.g:678:5: ( '#' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' )