From f4b744a282712f0a3698bc9319770ca7f0f8ac2e Mon Sep 17 00:00:00 2001 From: jlin16 Date: Tue, 25 Dec 2007 11:21:35 +0000 Subject: [PATCH] code fragment storage initial check-in. git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@932 7335b38e-4728-0410-8992-fb3ffe349368 --- Source/Python/Ecc/C.g | 110 +- Source/Python/Ecc/CLexer.py | 516 +- Source/Python/Ecc/CParser.py | 6757 ++++++++++---------- Source/Python/Ecc/CodeFragment.py | 149 + Source/Python/Ecc/CodeFragmentCollector.py | 335 + Source/Python/Ecc/FileProfile.py | 57 + Source/Python/Ecc/ParserWarning.py | 17 + Source/Python/Ecc/c.py | 14 +- 8 files changed, 4329 insertions(+), 3626 deletions(-) create mode 100644 Source/Python/Ecc/CodeFragment.py create mode 100644 Source/Python/Ecc/CodeFragmentCollector.py create mode 100644 Source/Python/Ecc/FileProfile.py create mode 100644 Source/Python/Ecc/ParserWarning.py diff --git a/Source/Python/Ecc/C.g b/Source/Python/Ecc/C.g index 8caea3e..714966d 100644 --- a/Source/Python/Ecc/C.g +++ b/Source/Python/Ecc/C.g @@ -7,33 +7,43 @@ options { k=2; } -scope Symbols { - types; - inFunc; +@header { + import CodeFragment + import FileProfile } @members { - def isTypeName(self, name): - for scope in reversed(self.Symbols_stack): - if name in scope.types: - return True - - return False def printTokenInfo(self, line, offset, tokenText): print str(line)+ ',' + str(offset) + ':' + str(tokenText) + + def StorePredicateExpression(self, StartLine, StartOffset, EndLine, EndOffset, Text): + PredExp = CodeFragment.PredicateExpression(Text, (StartLine, StartOffset), (EndLine, EndOffset)) + FileProfile.PredicateExpressionList.append(PredExp) + + def StoreEnumerationDefinition(self, StartLine, StartOffset, EndLine, EndOffset, Text): + EnumDef = CodeFragment.EnumerationDefinition(Text, (StartLine, StartOffset), (EndLine, EndOffset)) + FileProfile.EnumerationDefinitionList.append(EnumDef) + + def StoreStructUnionDefinition(self, StartLine, StartOffset, EndLine, EndOffset, Text): + SUDef = CodeFragment.StructUnionDefinition(Text, (StartLine, StartOffset), (EndLine, EndOffset)) + FileProfile.StructUnionDefinitionList.append(SUDef) + + def StoreTypedefDefinition(self, StartLine, StartOffset, EndLine, EndOffset, FromText, ToText): + Tdef = CodeFragment.TypedefDefinition(FromText, ToText, (StartLine, StartOffset), (EndLine, EndOffset)) + FileProfile.TypedefDefinitionList.append(Tdef) + + def StoreFunctionDefinition(self, StartLine, StartOffset, EndLine, EndOffset, ModifierText, DeclText): + FuncDef = CodeFragment.FunctionDefinition(ModifierText, DeclText, (StartLine, StartOffset), (EndLine, EndOffset)) + FileProfile.FunctionDefinitionList.append(FuncDef) - def printFuncHeader(self, line, offset, tokenText): - print str(line)+ ',' + str(offset) + ':' + str(tokenText) + ' is function header.' + def StoreVariableDeclaration(self, StartLine, StartOffset, EndLine, EndOffset, ModifierText, DeclText): + VarDecl = CodeFragment.VariableDeclaration(ModifierText, DeclText, (StartLine, StartOffset), (EndLine, EndOffset)) + FileProfile.VariableDeclarationList.append(VarDecl) } translation_unit -scope Symbols; // entire file is a scope -@init { - $Symbols::types = set() - $Symbols::inFunc = False -} : external_declaration+ ; @@ -52,37 +62,41 @@ options {k=1;} }*/ : ( declaration_specifiers? declarator declaration* '{' )=> function_definition | declaration - | macro_statement + | macro_statement (';')? ; function_definition -scope Symbols; -@init{ - $Symbols::inFunc = True -}/* +scope { + ModifierText; + DeclText; +} +@init { + $function_definition::ModifierText = ''; + $function_definition::DeclText = ''; +} @after{ - print str($function_definition.start.line) + ',' + str($function_definition.start.charPositionInLine) - print str($function_definition.stop.line) + ',' + str($function_definition.stop.charPositionInLine) -}*/ + self.StoreFunctionDefinition($function_definition.start.line, $function_definition.start.charPositionInLine, $function_definition.stop.line, $function_definition.stop.charPositionInLine, $function_definition::ModifierText, $function_definition::DeclText) +} : declaration_specifiers? declarator ( declaration+ compound_statement // K&R style | compound_statement // ANSI style - ) //{self.printFuncHeader($declarator.start.line, $declarator.start.charPositionInLine, $declarator.text)} + ) { $function_definition::ModifierText = $declaration_specifiers.text + $function_definition::DeclText = $declarator.text} ; declaration -scope { - isTypedef; -} -@init { - $declaration::isTypedef = False; -} - : a='typedef' declaration_specifiers? //{self.printTokenInfo($a.line, $a.pos, $a.text)} - init_declarator_list ';' // special case, looking for typedef - | declaration_specifiers init_declarator_list? ';' - //| function_declaration + : a='typedef' b=declaration_specifiers? + c=init_declarator_list d=';' + { + if b != None: + self.StoreTypedefDefinition($a.line, $a.charPositionInLine, $d.line, $d.charPositionInLine, $b.text, $c.text) + else: + self.StoreTypedefDefinition($a.line, $a.charPositionInLine, $d.line, $d.charPositionInLine, '', $c.text) + } + | s=declaration_specifiers t=init_declarator_list? e=';' + {self.StoreVariableDeclaration($s.start.line, $s.start.charPositionInLine, $e.line, $e.charPositionInLine, $s.text, $t.text)} ; declaration_specifiers @@ -98,7 +112,6 @@ init_declarator_list init_declarator : declarator ('=' initializer)? - //{self.printTokenInfo($declarator.start.line, $declarator.start.charPositionInLine, $declarator.text)} ; storage_class_specifier @@ -109,7 +122,6 @@ storage_class_specifier ; type_specifier -options {k=3;} : 'void' | 'char' | 'short' @@ -119,8 +131,8 @@ options {k=3;} | 'double' | 'signed' | 'unsigned' - | struct_or_union_specifier - | enum_specifier + | s=struct_or_union_specifier {self.StoreStructUnionDefinition($s.start.line, $s.start.charPositionInLine, $s.stop.line, $s.stop.charPositionInLine, $s.text)} + | e=enum_specifier {self.StoreEnumerationDefinition($e.start.line, $e.start.charPositionInLine, $e.stop.line, $e.stop.charPositionInLine, $e.text)} | (IDENTIFIER declarator)=> type_id ; @@ -131,10 +143,6 @@ type_id struct_or_union_specifier options {k=3;} -scope Symbols; // structs are scopes -@init { - $Symbols::types = set() -} : struct_or_union IDENTIFIER? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER ; @@ -193,9 +201,7 @@ declarator ; direct_declarator -scope Symbols; : IDENTIFIER declarator_suffix* - //{if $Symbols::inFunc: self.printFuncName($IDENTIFIER.line, $IDENTIFIER.charPositonInLine, $IDENTIFIER.text)} | '(' declarator ')' declarator_suffix+ ; @@ -360,7 +366,7 @@ assignment_operator ; conditional_expression - : e=logical_or_expression ('?' expression ':' conditional_expression {self.printTokenInfo($e.start.line, $e.start.charPositionInLine, $e.text)})? + : e=logical_or_expression ('?' expression ':' conditional_expression {self.StorePredicateExpression($e.start.line, $e.start.charPositionInLine, $e.stop.line, $e.stop.charPositionInLine, $e.text)})? ; logical_or_expression @@ -417,10 +423,6 @@ labeled_statement ; compound_statement -scope Symbols; // blocks have a scope of symbols -@init { - $Symbols::types = set() -} : '{' declaration* statement_list? '}' ; @@ -434,14 +436,14 @@ expression_statement ; selection_statement - : 'if' '(' e=expression ')' {self.printTokenInfo($e.start.line, $e.start.charPositionInLine, $e.text)} statement (options {k=1; backtrack=false;}:'else' statement)? + : 'if' '(' e=expression ')' {self.StorePredicateExpression($e.start.line, $e.start.charPositionInLine, $e.stop.line, $e.stop.charPositionInLine, $e.text)} statement (options {k=1; backtrack=false;}:'else' statement)? | 'switch' '(' expression ')' statement ; iteration_statement - : 'while' '(' e=expression ')' statement {self.printTokenInfo($e.start.line, $e.start.charPositionInLine, $e.text)} - | 'do' statement 'while' '(' e=expression ')' ';' {self.printTokenInfo($e.start.line, $e.start.charPositionInLine, $e.text)} - | 'for' '(' expression_statement e=expression_statement expression? ')' statement {self.printTokenInfo($e.start.line, $e.start.charPositionInLine, $e.text)} + : 'while' '(' e=expression ')' statement {self.StorePredicateExpression($e.start.line, $e.start.charPositionInLine, $e.stop.line, $e.stop.charPositionInLine, $e.text)} + | 'do' statement 'while' '(' e=expression ')' ';' {self.StorePredicateExpression($e.start.line, $e.start.charPositionInLine, $e.stop.line, $e.stop.charPositionInLine, $e.text)} + | 'for' '(' expression_statement e=expression_statement expression? ')' statement {self.StorePredicateExpression($e.start.line, $e.start.charPositionInLine, $e.stop.line, $e.stop.charPositionInLine, $e.text)} ; jump_statement diff --git a/Source/Python/Ecc/CLexer.py b/Source/Python/Ecc/CLexer.py index 1127c26..27f9761 100644 --- a/Source/Python/Ecc/CLexer.py +++ b/Source/Python/Ecc/CLexer.py @@ -1,4 +1,4 @@ -# $ANTLR 3.0.1 C.g 2007-12-12 15:55:53 +# $ANTLR 3.0.1 C.g 2007-12-25 19:09:36 from antlr3 import * from antlr3.compat import set, frozenset @@ -149,10 +149,9 @@ class CLexer(Lexer): try: self.type = T24 - # C.g:7:5: ( 'typedef' ) - # C.g:7:7: 'typedef' - self.match("typedef") - + # C.g:7:5: ( ';' ) + # C.g:7:7: ';' + self.match(u';') @@ -172,9 +171,10 @@ class CLexer(Lexer): try: self.type = T25 - # C.g:8:5: ( ';' ) - # C.g:8:7: ';' - self.match(u';') + # C.g:8:5: ( 'typedef' ) + # C.g:8:7: 'typedef' + self.match("typedef") + @@ -1965,11 +1965,11 @@ class CLexer(Lexer): try: self.type = IDENTIFIER - # C.g:457:2: ( LETTER ( LETTER | '0' .. '9' )* ) - # C.g:457:4: LETTER ( LETTER | '0' .. '9' )* + # C.g:458:2: ( LETTER ( LETTER | '0' .. '9' )* ) + # C.g:458:4: LETTER ( LETTER | '0' .. '9' )* self.mLETTER() - # C.g:457:11: ( LETTER | '0' .. '9' )* + # C.g:458:11: ( LETTER | '0' .. '9' )* while True: #loop1 alt1 = 2 LA1_0 = self.input.LA(1) @@ -2011,7 +2011,7 @@ class CLexer(Lexer): def mLETTER(self, ): try: - # C.g:462:2: ( '$' | 'A' .. 'Z' | 'a' .. 'z' | '_' ) + # C.g:463:2: ( '$' | 'A' .. 'Z' | 'a' .. 'z' | '_' ) # C.g: 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'): self.input.consume(); @@ -2040,11 +2040,11 @@ class CLexer(Lexer): try: self.type = CHARACTER_LITERAL - # C.g:469:5: ( '\\'' ( EscapeSequence | ~ ( '\\'' | '\\\\' ) ) '\\'' ) - # C.g:469:9: '\\'' ( EscapeSequence | ~ ( '\\'' | '\\\\' ) ) '\\'' + # C.g:470:5: ( '\\'' ( EscapeSequence | ~ ( '\\'' | '\\\\' ) ) '\\'' ) + # C.g:470:9: '\\'' ( EscapeSequence | ~ ( '\\'' | '\\\\' ) ) '\\'' self.match(u'\'') - # C.g:469:14: ( EscapeSequence | ~ ( '\\'' | '\\\\' ) ) + # C.g:470:14: ( EscapeSequence | ~ ( '\\'' | '\\\\' ) ) alt2 = 2 LA2_0 = self.input.LA(1) @@ -2053,18 +2053,18 @@ class CLexer(Lexer): elif ((u'\u0000' <= LA2_0 <= u'&') or (u'(' <= LA2_0 <= u'[') or (u']' <= LA2_0 <= u'\uFFFE')) : alt2 = 2 else: - nvae = NoViableAltException("469:14: ( EscapeSequence | ~ ( '\\'' | '\\\\' ) )", 2, 0, self.input) + nvae = NoViableAltException("470:14: ( EscapeSequence | ~ ( '\\'' | '\\\\' ) )", 2, 0, self.input) raise nvae if alt2 == 1: - # C.g:469:16: EscapeSequence + # C.g:470:16: EscapeSequence self.mEscapeSequence() elif alt2 == 2: - # C.g:469:33: ~ ( '\\'' | '\\\\' ) + # C.g:470:33: ~ ( '\\'' | '\\\\' ) if (u'\u0000' <= self.input.LA(1) <= u'&') or (u'(' <= self.input.LA(1) <= u'[') or (u']' <= self.input.LA(1) <= u'\uFFFE'): self.input.consume(); @@ -2097,16 +2097,16 @@ class CLexer(Lexer): try: self.type = STRING_LITERAL - # C.g:473:5: ( ( 'L' )? '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) - # C.g:473:8: ( 'L' )? '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' - # C.g:473:8: ( 'L' )? + # C.g:474:5: ( ( 'L' )? '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) + # C.g:474:8: ( 'L' )? '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' + # C.g:474:8: ( 'L' )? alt3 = 2 LA3_0 = self.input.LA(1) if (LA3_0 == u'L') : alt3 = 1 if alt3 == 1: - # C.g:473:9: 'L' + # C.g:474:9: 'L' self.match(u'L') @@ -2114,7 +2114,7 @@ class CLexer(Lexer): self.match(u'"') - # C.g:473:19: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* + # C.g:474:19: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* while True: #loop4 alt4 = 3 LA4_0 = self.input.LA(1) @@ -2126,13 +2126,13 @@ class CLexer(Lexer): if alt4 == 1: - # C.g:473:21: EscapeSequence + # C.g:474:21: EscapeSequence self.mEscapeSequence() elif alt4 == 2: - # C.g:473:38: ~ ( '\\\\' | '\"' ) + # C.g:474:38: ~ ( '\\\\' | '\"' ) if (u'\u0000' <= self.input.LA(1) <= u'!') or (u'#' <= self.input.LA(1) <= u'[') or (u']' <= self.input.LA(1) <= u'\uFFFE'): self.input.consume(); @@ -2168,8 +2168,8 @@ class CLexer(Lexer): try: self.type = HEX_LITERAL - # C.g:476:13: ( '0' ( 'x' | 'X' ) ( HexDigit )+ ( IntegerTypeSuffix )? ) - # C.g:476:15: '0' ( 'x' | 'X' ) ( HexDigit )+ ( IntegerTypeSuffix )? + # C.g:477:13: ( '0' ( 'x' | 'X' ) ( HexDigit )+ ( IntegerTypeSuffix )? ) + # C.g:477:15: '0' ( 'x' | 'X' ) ( HexDigit )+ ( IntegerTypeSuffix )? self.match(u'0') if self.input.LA(1) == u'X' or self.input.LA(1) == u'x': @@ -2181,7 +2181,7 @@ class CLexer(Lexer): raise mse - # C.g:476:29: ( HexDigit )+ + # C.g:477:29: ( HexDigit )+ cnt5 = 0 while True: #loop5 alt5 = 2 @@ -2192,7 +2192,7 @@ class CLexer(Lexer): if alt5 == 1: - # C.g:476:29: HexDigit + # C.g:477:29: HexDigit self.mHexDigit() @@ -2207,14 +2207,14 @@ class CLexer(Lexer): cnt5 += 1 - # C.g:476:39: ( IntegerTypeSuffix )? + # C.g:477:39: ( IntegerTypeSuffix )? alt6 = 2 LA6_0 = self.input.LA(1) if (LA6_0 == u'L' or LA6_0 == u'U' or LA6_0 == u'l' or LA6_0 == u'u') : alt6 = 1 if alt6 == 1: - # C.g:476:39: IntegerTypeSuffix + # C.g:477:39: IntegerTypeSuffix self.mIntegerTypeSuffix() @@ -2238,9 +2238,9 @@ class CLexer(Lexer): try: self.type = DECIMAL_LITERAL - # C.g:478:17: ( ( '0' | '1' .. '9' ( '0' .. '9' )* ) ( IntegerTypeSuffix )? ) - # C.g:478:19: ( '0' | '1' .. '9' ( '0' .. '9' )* ) ( IntegerTypeSuffix )? - # C.g:478:19: ( '0' | '1' .. '9' ( '0' .. '9' )* ) + # C.g:479:17: ( ( '0' | '1' .. '9' ( '0' .. '9' )* ) ( IntegerTypeSuffix )? ) + # C.g:479:19: ( '0' | '1' .. '9' ( '0' .. '9' )* ) ( IntegerTypeSuffix )? + # C.g:479:19: ( '0' | '1' .. '9' ( '0' .. '9' )* ) alt8 = 2 LA8_0 = self.input.LA(1) @@ -2249,21 +2249,21 @@ class CLexer(Lexer): elif ((u'1' <= LA8_0 <= u'9')) : alt8 = 2 else: - nvae = NoViableAltException("478:19: ( '0' | '1' .. '9' ( '0' .. '9' )* )", 8, 0, self.input) + nvae = NoViableAltException("479:19: ( '0' | '1' .. '9' ( '0' .. '9' )* )", 8, 0, self.input) raise nvae if alt8 == 1: - # C.g:478:20: '0' + # C.g:479:20: '0' self.match(u'0') elif alt8 == 2: - # C.g:478:26: '1' .. '9' ( '0' .. '9' )* + # C.g:479:26: '1' .. '9' ( '0' .. '9' )* self.matchRange(u'1', u'9') - # C.g:478:35: ( '0' .. '9' )* + # C.g:479:35: ( '0' .. '9' )* while True: #loop7 alt7 = 2 LA7_0 = self.input.LA(1) @@ -2273,7 +2273,7 @@ class CLexer(Lexer): if alt7 == 1: - # C.g:478:35: '0' .. '9' + # C.g:479:35: '0' .. '9' self.matchRange(u'0', u'9') @@ -2285,14 +2285,14 @@ class CLexer(Lexer): - # C.g:478:46: ( IntegerTypeSuffix )? + # C.g:479:46: ( IntegerTypeSuffix )? alt9 = 2 LA9_0 = self.input.LA(1) if (LA9_0 == u'L' or LA9_0 == u'U' or LA9_0 == u'l' or LA9_0 == u'u') : alt9 = 1 if alt9 == 1: - # C.g:478:46: IntegerTypeSuffix + # C.g:479:46: IntegerTypeSuffix self.mIntegerTypeSuffix() @@ -2316,11 +2316,11 @@ class CLexer(Lexer): try: self.type = OCTAL_LITERAL - # C.g:480:15: ( '0' ( '0' .. '7' )+ ( IntegerTypeSuffix )? ) - # C.g:480:17: '0' ( '0' .. '7' )+ ( IntegerTypeSuffix )? + # C.g:481:15: ( '0' ( '0' .. '7' )+ ( IntegerTypeSuffix )? ) + # C.g:481:17: '0' ( '0' .. '7' )+ ( IntegerTypeSuffix )? self.match(u'0') - # C.g:480:21: ( '0' .. '7' )+ + # C.g:481:21: ( '0' .. '7' )+ cnt10 = 0 while True: #loop10 alt10 = 2 @@ -2331,7 +2331,7 @@ class CLexer(Lexer): if alt10 == 1: - # C.g:480:22: '0' .. '7' + # C.g:481:22: '0' .. '7' self.matchRange(u'0', u'7') @@ -2346,14 +2346,14 @@ class CLexer(Lexer): cnt10 += 1 - # C.g:480:33: ( IntegerTypeSuffix )? + # C.g:481:33: ( IntegerTypeSuffix )? alt11 = 2 LA11_0 = self.input.LA(1) if (LA11_0 == u'L' or LA11_0 == u'U' or LA11_0 == u'l' or LA11_0 == u'u') : alt11 = 1 if alt11 == 1: - # C.g:480:33: IntegerTypeSuffix + # C.g:481:33: IntegerTypeSuffix self.mIntegerTypeSuffix() @@ -2375,8 +2375,8 @@ class CLexer(Lexer): def mHexDigit(self, ): try: - # C.g:483:10: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) ) - # C.g:483:12: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) + # C.g:484:10: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) ) + # C.g:484:12: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) 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'): self.input.consume(); @@ -2402,7 +2402,7 @@ class CLexer(Lexer): def mIntegerTypeSuffix(self, ): try: - # C.g:487:2: ( ( 'u' | 'U' )? ( 'l' | 'L' ) | ( 'u' | 'U' ) ( 'l' | 'L' )? ) + # C.g:488:2: ( ( 'u' | 'U' )? ( 'l' | 'L' ) | ( 'u' | 'U' ) ( 'l' | 'L' )? ) alt14 = 2 LA14_0 = self.input.LA(1) @@ -2416,13 +2416,13 @@ class CLexer(Lexer): elif (LA14_0 == u'L' or LA14_0 == u'l') : alt14 = 1 else: - nvae = NoViableAltException("485:1: fragment IntegerTypeSuffix : ( ( 'u' | 'U' )? ( 'l' | 'L' ) | ( 'u' | 'U' ) ( 'l' | 'L' )? );", 14, 0, self.input) + nvae = NoViableAltException("486:1: fragment IntegerTypeSuffix : ( ( 'u' | 'U' )? ( 'l' | 'L' ) | ( 'u' | 'U' ) ( 'l' | 'L' )? );", 14, 0, self.input) raise nvae if alt14 == 1: - # C.g:487:4: ( 'u' | 'U' )? ( 'l' | 'L' ) - # C.g:487:4: ( 'u' | 'U' )? + # C.g:488:4: ( 'u' | 'U' )? ( 'l' | 'L' ) + # C.g:488:4: ( 'u' | 'U' )? alt12 = 2 LA12_0 = self.input.LA(1) @@ -2454,7 +2454,7 @@ class CLexer(Lexer): elif alt14 == 2: - # C.g:488:4: ( 'u' | 'U' ) ( 'l' | 'L' )? + # C.g:489:4: ( 'u' | 'U' ) ( 'l' | 'L' )? if self.input.LA(1) == u'U' or self.input.LA(1) == u'u': self.input.consume(); @@ -2464,7 +2464,7 @@ class CLexer(Lexer): raise mse - # C.g:488:15: ( 'l' | 'L' )? + # C.g:489:15: ( 'l' | 'L' )? alt13 = 2 LA13_0 = self.input.LA(1) @@ -2501,12 +2501,12 @@ class CLexer(Lexer): try: self.type = FLOATING_POINT_LITERAL - # C.g:492:5: ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( Exponent )? ( FloatTypeSuffix )? | '.' ( '0' .. '9' )+ ( Exponent )? ( FloatTypeSuffix )? | ( '0' .. '9' )+ Exponent ( FloatTypeSuffix )? | ( '0' .. '9' )+ ( Exponent )? FloatTypeSuffix ) + # C.g:493:5: ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( Exponent )? ( FloatTypeSuffix )? | '.' ( '0' .. '9' )+ ( Exponent )? ( FloatTypeSuffix )? | ( '0' .. '9' )+ Exponent ( FloatTypeSuffix )? | ( '0' .. '9' )+ ( Exponent )? FloatTypeSuffix ) alt26 = 4 alt26 = self.dfa26.predict(self.input) if alt26 == 1: - # C.g:492:9: ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( Exponent )? ( FloatTypeSuffix )? - # C.g:492:9: ( '0' .. '9' )+ + # C.g:493:9: ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( Exponent )? ( FloatTypeSuffix )? + # C.g:493:9: ( '0' .. '9' )+ cnt15 = 0 while True: #loop15 alt15 = 2 @@ -2517,7 +2517,7 @@ class CLexer(Lexer): if alt15 == 1: - # C.g:492:10: '0' .. '9' + # C.g:493:10: '0' .. '9' self.matchRange(u'0', u'9') @@ -2534,7 +2534,7 @@ class CLexer(Lexer): self.match(u'.') - # C.g:492:25: ( '0' .. '9' )* + # C.g:493:25: ( '0' .. '9' )* while True: #loop16 alt16 = 2 LA16_0 = self.input.LA(1) @@ -2544,7 +2544,7 @@ class CLexer(Lexer): if alt16 == 1: - # C.g:492:26: '0' .. '9' + # C.g:493:26: '0' .. '9' self.matchRange(u'0', u'9') @@ -2553,27 +2553,27 @@ class CLexer(Lexer): break #loop16 - # C.g:492:37: ( Exponent )? + # C.g:493:37: ( Exponent )? alt17 = 2 LA17_0 = self.input.LA(1) if (LA17_0 == u'E' or LA17_0 == u'e') : alt17 = 1 if alt17 == 1: - # C.g:492:37: Exponent + # C.g:493:37: Exponent self.mExponent() - # C.g:492:47: ( FloatTypeSuffix )? + # C.g:493:47: ( FloatTypeSuffix )? alt18 = 2 LA18_0 = self.input.LA(1) if (LA18_0 == u'D' or LA18_0 == u'F' or LA18_0 == u'd' or LA18_0 == u'f') : alt18 = 1 if alt18 == 1: - # C.g:492:47: FloatTypeSuffix + # C.g:493:47: FloatTypeSuffix self.mFloatTypeSuffix() @@ -2582,10 +2582,10 @@ class CLexer(Lexer): elif alt26 == 2: - # C.g:493:9: '.' ( '0' .. '9' )+ ( Exponent )? ( FloatTypeSuffix )? + # C.g:494:9: '.' ( '0' .. '9' )+ ( Exponent )? ( FloatTypeSuffix )? self.match(u'.') - # C.g:493:13: ( '0' .. '9' )+ + # C.g:494:13: ( '0' .. '9' )+ cnt19 = 0 while True: #loop19 alt19 = 2 @@ -2596,7 +2596,7 @@ class CLexer(Lexer): if alt19 == 1: - # C.g:493:14: '0' .. '9' + # C.g:494:14: '0' .. '9' self.matchRange(u'0', u'9') @@ -2611,27 +2611,27 @@ class CLexer(Lexer): cnt19 += 1 - # C.g:493:25: ( Exponent )? + # C.g:494:25: ( Exponent )? alt20 = 2 LA20_0 = self.input.LA(1) if (LA20_0 == u'E' or LA20_0 == u'e') : alt20 = 1 if alt20 == 1: - # C.g:493:25: Exponent + # C.g:494:25: Exponent self.mExponent() - # C.g:493:35: ( FloatTypeSuffix )? + # C.g:494:35: ( FloatTypeSuffix )? alt21 = 2 LA21_0 = self.input.LA(1) if (LA21_0 == u'D' or LA21_0 == u'F' or LA21_0 == u'd' or LA21_0 == u'f') : alt21 = 1 if alt21 == 1: - # C.g:493:35: FloatTypeSuffix + # C.g:494:35: FloatTypeSuffix self.mFloatTypeSuffix() @@ -2640,8 +2640,8 @@ class CLexer(Lexer): elif alt26 == 3: - # C.g:494:9: ( '0' .. '9' )+ Exponent ( FloatTypeSuffix )? - # C.g:494:9: ( '0' .. '9' )+ + # C.g:495:9: ( '0' .. '9' )+ Exponent ( FloatTypeSuffix )? + # C.g:495:9: ( '0' .. '9' )+ cnt22 = 0 while True: #loop22 alt22 = 2 @@ -2652,7 +2652,7 @@ class CLexer(Lexer): if alt22 == 1: - # C.g:494:10: '0' .. '9' + # C.g:495:10: '0' .. '9' self.matchRange(u'0', u'9') @@ -2669,14 +2669,14 @@ class CLexer(Lexer): self.mExponent() - # C.g:494:30: ( FloatTypeSuffix )? + # C.g:495:30: ( FloatTypeSuffix )? alt23 = 2 LA23_0 = self.input.LA(1) if (LA23_0 == u'D' or LA23_0 == u'F' or LA23_0 == u'd' or LA23_0 == u'f') : alt23 = 1 if alt23 == 1: - # C.g:494:30: FloatTypeSuffix + # C.g:495:30: FloatTypeSuffix self.mFloatTypeSuffix() @@ -2685,8 +2685,8 @@ class CLexer(Lexer): elif alt26 == 4: - # C.g:495:9: ( '0' .. '9' )+ ( Exponent )? FloatTypeSuffix - # C.g:495:9: ( '0' .. '9' )+ + # C.g:496:9: ( '0' .. '9' )+ ( Exponent )? FloatTypeSuffix + # C.g:496:9: ( '0' .. '9' )+ cnt24 = 0 while True: #loop24 alt24 = 2 @@ -2697,7 +2697,7 @@ class CLexer(Lexer): if alt24 == 1: - # C.g:495:10: '0' .. '9' + # C.g:496:10: '0' .. '9' self.matchRange(u'0', u'9') @@ -2712,14 +2712,14 @@ class CLexer(Lexer): cnt24 += 1 - # C.g:495:21: ( Exponent )? + # C.g:496:21: ( Exponent )? alt25 = 2 LA25_0 = self.input.LA(1) if (LA25_0 == u'E' or LA25_0 == u'e') : alt25 = 1 if alt25 == 1: - # C.g:495:21: Exponent + # C.g:496:21: Exponent self.mExponent() @@ -2742,8 +2742,8 @@ class CLexer(Lexer): def mExponent(self, ): try: - # C.g:499:10: ( ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ ) - # C.g:499:12: ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ + # C.g:500:10: ( ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ ) + # C.g:500:12: ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ if self.input.LA(1) == u'E' or self.input.LA(1) == u'e': self.input.consume(); @@ -2753,7 +2753,7 @@ class CLexer(Lexer): raise mse - # C.g:499:22: ( '+' | '-' )? + # C.g:500:22: ( '+' | '-' )? alt27 = 2 LA27_0 = self.input.LA(1) @@ -2773,7 +2773,7 @@ class CLexer(Lexer): - # C.g:499:33: ( '0' .. '9' )+ + # C.g:500:33: ( '0' .. '9' )+ cnt28 = 0 while True: #loop28 alt28 = 2 @@ -2784,7 +2784,7 @@ class CLexer(Lexer): if alt28 == 1: - # C.g:499:34: '0' .. '9' + # C.g:500:34: '0' .. '9' self.matchRange(u'0', u'9') @@ -2815,8 +2815,8 @@ class CLexer(Lexer): def mFloatTypeSuffix(self, ): try: - # C.g:502:17: ( ( 'f' | 'F' | 'd' | 'D' ) ) - # C.g:502:19: ( 'f' | 'F' | 'd' | 'D' ) + # C.g:503:17: ( ( 'f' | 'F' | 'd' | 'D' ) ) + # C.g:503:19: ( 'f' | 'F' | 'd' | 'D' ) 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': self.input.consume(); @@ -2842,7 +2842,7 @@ class CLexer(Lexer): def mEscapeSequence(self, ): try: - # C.g:506:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | OctalEscape ) + # C.g:507:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | OctalEscape ) alt29 = 2 LA29_0 = self.input.LA(1) @@ -2854,17 +2854,17 @@ class CLexer(Lexer): elif ((u'0' <= LA29_1 <= u'7')) : alt29 = 2 else: - nvae = NoViableAltException("504:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | OctalEscape );", 29, 1, self.input) + nvae = NoViableAltException("505:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | OctalEscape );", 29, 1, self.input) raise nvae else: - nvae = NoViableAltException("504:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | OctalEscape );", 29, 0, self.input) + nvae = NoViableAltException("505:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | OctalEscape );", 29, 0, self.input) raise nvae if alt29 == 1: - # C.g:506:9: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) + # C.g:507:9: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) self.match(u'\\') 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': @@ -2879,7 +2879,7 @@ class CLexer(Lexer): elif alt29 == 2: - # C.g:507:9: OctalEscape + # C.g:508:9: OctalEscape self.mOctalEscape() @@ -2897,7 +2897,7 @@ class CLexer(Lexer): def mOctalEscape(self, ): try: - # C.g:512:5: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ) + # C.g:513:5: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ) alt30 = 3 LA30_0 = self.input.LA(1) @@ -2924,35 +2924,35 @@ class CLexer(Lexer): else: alt30 = 3 else: - nvae = NoViableAltException("510:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 30, 1, self.input) + nvae = NoViableAltException("511:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 30, 1, self.input) raise nvae else: - nvae = NoViableAltException("510:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 30, 0, self.input) + nvae = NoViableAltException("511:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 30, 0, self.input) raise nvae if alt30 == 1: - # C.g:512:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) + # C.g:513:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) self.match(u'\\') - # C.g:512:14: ( '0' .. '3' ) - # C.g:512:15: '0' .. '3' + # C.g:513:14: ( '0' .. '3' ) + # C.g:513:15: '0' .. '3' self.matchRange(u'0', u'3') - # C.g:512:25: ( '0' .. '7' ) - # C.g:512:26: '0' .. '7' + # C.g:513:25: ( '0' .. '7' ) + # C.g:513:26: '0' .. '7' self.matchRange(u'0', u'7') - # C.g:512:36: ( '0' .. '7' ) - # C.g:512:37: '0' .. '7' + # C.g:513:36: ( '0' .. '7' ) + # C.g:513:37: '0' .. '7' self.matchRange(u'0', u'7') @@ -2961,18 +2961,18 @@ class CLexer(Lexer): elif alt30 == 2: - # C.g:513:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) + # C.g:514:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) self.match(u'\\') - # C.g:513:14: ( '0' .. '7' ) - # C.g:513:15: '0' .. '7' + # C.g:514:14: ( '0' .. '7' ) + # C.g:514:15: '0' .. '7' self.matchRange(u'0', u'7') - # C.g:513:25: ( '0' .. '7' ) - # C.g:513:26: '0' .. '7' + # C.g:514:25: ( '0' .. '7' ) + # C.g:514:26: '0' .. '7' self.matchRange(u'0', u'7') @@ -2981,11 +2981,11 @@ class CLexer(Lexer): elif alt30 == 3: - # C.g:514:9: '\\\\' ( '0' .. '7' ) + # C.g:515:9: '\\\\' ( '0' .. '7' ) self.match(u'\\') - # C.g:514:14: ( '0' .. '7' ) - # C.g:514:15: '0' .. '7' + # C.g:515:14: ( '0' .. '7' ) + # C.g:515:15: '0' .. '7' self.matchRange(u'0', u'7') @@ -3006,8 +3006,8 @@ class CLexer(Lexer): def mUnicodeEscape(self, ): try: - # C.g:519:5: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit ) - # C.g:519:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit + # C.g:520:5: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit ) + # C.g:520:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit self.match(u'\\') self.match(u'u') @@ -3038,8 +3038,8 @@ class CLexer(Lexer): try: self.type = WS - # C.g:522:5: ( ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' ) ) - # C.g:522:8: ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' ) + # C.g:523:5: ( ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' ) ) + # C.g:523:8: ( ' ' | '\\r' | '\\t' | '\\u000C' | '\\n' ) if (u'\t' <= self.input.LA(1) <= u'\n') or (u'\f' <= self.input.LA(1) <= u'\r') or self.input.LA(1) == u' ': self.input.consume(); @@ -3070,8 +3070,8 @@ class CLexer(Lexer): try: self.type = UnicodeVocabulary - # C.g:530:5: ( '\\u0003' .. '\\uFFFE' ) - # C.g:530:7: '\\u0003' .. '\\uFFFE' + # C.g:531:5: ( '\\u0003' .. '\\uFFFE' ) + # C.g:531:7: '\\u0003' .. '\\uFFFE' self.matchRange(u'\u0003', u'\uFFFE') @@ -3092,12 +3092,12 @@ class CLexer(Lexer): try: self.type = COMMENT - # C.g:533:5: ( '/*' ( options {greedy=false; } : . )* '*/' ) - # C.g:533:9: '/*' ( options {greedy=false; } : . )* '*/' + # C.g:534:5: ( '/*' ( options {greedy=false; } : . )* '*/' ) + # C.g:534:9: '/*' ( options {greedy=false; } : . )* '*/' self.match("/*") - # C.g:533:14: ( options {greedy=false; } : . )* + # C.g:534:14: ( options {greedy=false; } : . )* while True: #loop31 alt31 = 2 LA31_0 = self.input.LA(1) @@ -3116,7 +3116,7 @@ class CLexer(Lexer): if alt31 == 1: - # C.g:533:42: . + # C.g:534:42: . self.matchAny() @@ -3149,12 +3149,12 @@ class CLexer(Lexer): try: self.type = LINE_COMMENT - # C.g:538:5: ( '//' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' ) - # C.g:538:7: '//' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' + # C.g:539:5: ( '//' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' ) + # C.g:539:7: '//' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' self.match("//") - # C.g:538:12: (~ ( '\\n' | '\\r' ) )* + # C.g:539:12: (~ ( '\\n' | '\\r' ) )* while True: #loop32 alt32 = 2 LA32_0 = self.input.LA(1) @@ -3164,7 +3164,7 @@ class CLexer(Lexer): if alt32 == 1: - # C.g:538:12: ~ ( '\\n' | '\\r' ) + # C.g:539:12: ~ ( '\\n' | '\\r' ) 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'): self.input.consume(); @@ -3180,14 +3180,14 @@ class CLexer(Lexer): break #loop32 - # C.g:538:26: ( '\\r' )? + # C.g:539:26: ( '\\r' )? alt33 = 2 LA33_0 = self.input.LA(1) if (LA33_0 == u'\r') : alt33 = 1 if alt33 == 1: - # C.g:538:26: '\\r' + # C.g:539:26: '\\r' self.match(u'\r') @@ -3216,11 +3216,11 @@ class CLexer(Lexer): try: self.type = LINE_COMMAND - # C.g:543:5: ( '#' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' ) - # C.g:543:7: '#' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' + # C.g:544:5: ( '#' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' ) + # C.g:544:7: '#' (~ ( '\\n' | '\\r' ) )* ( '\\r' )? '\\n' self.match(u'#') - # C.g:543:11: (~ ( '\\n' | '\\r' ) )* + # C.g:544:11: (~ ( '\\n' | '\\r' ) )* while True: #loop34 alt34 = 2 LA34_0 = self.input.LA(1) @@ -3230,7 +3230,7 @@ class CLexer(Lexer): if alt34 == 1: - # C.g:543:11: ~ ( '\\n' | '\\r' ) + # C.g:544:11: ~ ( '\\n' | '\\r' ) 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'): self.input.consume(); @@ -3246,14 +3246,14 @@ class CLexer(Lexer): break #loop34 - # C.g:543:25: ( '\\r' )? + # C.g:544:25: ( '\\r' )? alt35 = 2 LA35_0 = self.input.LA(1) if (LA35_0 == u'\r') : alt35 = 1 if alt35 == 1: - # C.g:543:25: '\\r' + # C.g:544:25: '\\r' self.match(u'\r') @@ -3885,20 +3885,20 @@ class CLexer(Lexer): # lookup tables for DFA #36 DFA36_eot = DFA.unpack( - u"\1\uffff\1\64\2\uffff\1\70\13\64\3\uffff\2\64\4\uffff\1\130\1\132" + u"\2\uffff\1\65\1\uffff\1\70\13\65\3\uffff\2\65\4\uffff\1\130\1\132" u"\1\136\1\142\1\146\1\150\1\153\1\uffff\1\156\1\161\1\164\1\166" - u"\1\171\1\uffff\4\64\1\62\1\uffff\1\62\2\u0081\1\uffff\1\62\1\uffff" - u"\1\64\5\uffff\15\64\1\u0098\4\64\1\u009e\2\64\3\uffff\1\u00a2\1" - u"\64\34\uffff\1\u00a5\2\uffff\1\u00a7\10\uffff\3\64\4\uffff\1\u00ab" - u"\1\u0081\2\uffff\22\64\1\uffff\1\u00bf\2\64\1\u00c2\1\64\1\uffff" - u"\3\64\1\uffff\1\u00c7\4\uffff\3\64\1\uffff\1\64\1\u00cc\1\64\1" - u"\u00ce\6\64\1\u00d5\2\64\1\u00d8\3\64\1\u00dc\1\u00dd\1\uffff\1" - u"\u00de\1\64\1\uffff\4\64\1\uffff\1\64\1\u00e5\2\64\1\uffff\1\64" - u"\1\uffff\4\64\1\u00ed\1\64\1\uffff\2\64\1\uffff\2\64\1\u00f3\3" - u"\uffff\1\u00f4\2\64\1\u00f7\1\64\1\u00f9\1\uffff\1\u00fa\1\64\1" + u"\1\171\1\uffff\4\65\1\62\1\uffff\1\62\2\u0081\1\uffff\1\62\2\uffff" + u"\1\65\4\uffff\15\65\1\u0098\4\65\1\u009e\2\65\3\uffff\1\u00a2\1" + u"\65\34\uffff\1\u00a5\2\uffff\1\u00a7\10\uffff\3\65\4\uffff\1\u00ab" + u"\1\u0081\2\uffff\22\65\1\uffff\1\u00bf\2\65\1\u00c2\1\65\1\uffff" + u"\3\65\1\uffff\1\u00c7\4\uffff\3\65\1\uffff\1\65\1\u00cc\1\65\1" + u"\u00ce\6\65\1\u00d5\2\65\1\u00d8\3\65\1\u00dc\1\u00dd\1\uffff\1" + u"\u00de\1\65\1\uffff\4\65\1\uffff\1\65\1\u00e5\2\65\1\uffff\1\65" + u"\1\uffff\4\65\1\u00ed\1\65\1\uffff\2\65\1\uffff\2\65\1\u00f3\3" + u"\uffff\1\u00f4\2\65\1\u00f7\1\65\1\u00f9\1\uffff\1\u00fa\1\65\1" u"\u00fc\1\u00fd\1\u00fe\1\u00ff\1\u0100\1\uffff\1\u0101\1\u0102" - u"\3\64\2\uffff\1\u0106\1\64\1\uffff\1\64\2\uffff\1\u0109\7\uffff" - u"\3\64\1\uffff\1\u010d\1\64\1\uffff\1\u010f\1\u0110\1\u0111\1\uffff" + u"\3\65\2\uffff\1\u0106\1\65\1\uffff\1\65\2\uffff\1\u0109\7\uffff" + u"\3\65\1\uffff\1\u010d\1\65\1\uffff\1\u010f\1\u0110\1\u0111\1\uffff" u"\1\u0112\4\uffff" ) @@ -3907,35 +3907,35 @@ class CLexer(Lexer): ) DFA36_min = DFA.unpack( - u"\1\3\1\171\2\uffff\1\75\1\154\1\150\1\165\1\145\1\157\1\141\1\146" - u"\1\157\1\154\1\145\1\156\3\uffff\1\116\1\125\4\uffff\1\75\1\56" - u"\1\53\1\55\1\52\1\75\1\46\1\uffff\1\75\1\74\3\75\1\uffff\1\150" - u"\1\157\1\162\1\42\1\0\1\uffff\1\0\2\56\1\uffff\1\0\1\uffff\1\160" - u"\5\uffff\1\165\1\164\1\163\1\147\1\141\1\157\1\151\1\164\1\147" - u"\1\151\1\156\1\163\1\141\1\44\1\164\1\156\1\157\1\162\1\44\1\146" - u"\1\151\3\uffff\1\44\1\124\34\uffff\1\75\2\uffff\1\75\10\uffff\1" - u"\151\1\164\1\145\4\uffff\2\56\2\uffff\1\145\1\155\3\145\1\156\1" - u"\164\1\165\1\162\1\164\1\157\1\165\1\151\1\144\1\141\1\163\1\145" - u"\1\162\1\uffff\1\44\1\147\1\141\1\44\1\142\1\uffff\1\141\1\157" - u"\1\151\1\uffff\1\44\4\uffff\1\154\1\157\1\141\1\uffff\1\144\1\44" - u"\1\162\1\44\1\157\1\145\1\151\1\143\1\164\1\143\1\44\1\162\1\163" - u"\1\44\1\164\1\151\1\164\2\44\1\uffff\1\44\1\164\1\uffff\1\154\1" - u"\165\1\156\1\147\1\uffff\1\145\1\44\1\153\1\145\1\uffff\1\156\1" - u"\uffff\1\146\1\144\1\143\1\164\1\44\1\150\1\uffff\1\156\1\164\1" - u"\uffff\1\151\1\156\1\44\3\uffff\1\44\1\145\1\154\1\44\1\156\1\44" - u"\1\uffff\1\44\1\146\5\44\1\uffff\2\44\1\145\1\154\1\165\2\uffff" - u"\1\44\1\164\1\uffff\1\145\2\uffff\1\44\7\uffff\1\162\2\145\1\uffff" - u"\1\44\1\144\1\uffff\3\44\1\uffff\1\44\4\uffff" + u"\1\3\1\uffff\1\171\1\uffff\1\75\1\154\1\150\1\165\1\145\1\157\1" + u"\141\1\146\1\157\1\154\1\145\1\156\3\uffff\1\116\1\125\4\uffff" + u"\1\75\1\56\1\53\1\55\1\52\1\75\1\46\1\uffff\1\75\1\74\3\75\1\uffff" + u"\1\150\1\157\1\162\1\42\1\0\1\uffff\1\0\2\56\1\uffff\1\0\2\uffff" + u"\1\160\4\uffff\1\165\1\164\1\163\1\147\1\141\1\157\1\151\1\164" + u"\1\147\1\151\1\156\1\163\1\141\1\44\1\164\1\156\1\157\1\162\1\44" + u"\1\146\1\151\3\uffff\1\44\1\124\34\uffff\1\75\2\uffff\1\75\10\uffff" + u"\1\151\1\164\1\145\4\uffff\2\56\2\uffff\1\145\1\155\3\145\1\156" + u"\1\164\1\165\1\162\1\164\1\157\1\165\1\151\1\144\1\141\1\163\1" + u"\145\1\162\1\uffff\1\44\1\147\1\141\1\44\1\142\1\uffff\1\141\1" + u"\157\1\151\1\uffff\1\44\4\uffff\1\154\1\157\1\141\1\uffff\1\144" + u"\1\44\1\162\1\44\1\157\1\145\1\151\1\143\1\164\1\143\1\44\1\162" + u"\1\163\1\44\1\164\1\151\1\164\2\44\1\uffff\1\44\1\164\1\uffff\1" + u"\154\1\165\1\156\1\147\1\uffff\1\145\1\44\1\153\1\145\1\uffff\1" + u"\156\1\uffff\1\146\1\144\1\143\1\164\1\44\1\150\1\uffff\1\156\1" + u"\164\1\uffff\1\151\1\156\1\44\3\uffff\1\44\1\145\1\154\1\44\1\156" + u"\1\44\1\uffff\1\44\1\146\5\44\1\uffff\2\44\1\145\1\154\1\165\2" + u"\uffff\1\44\1\164\1\uffff\1\145\2\uffff\1\44\7\uffff\1\162\2\145" + u"\1\uffff\1\44\1\144\1\uffff\3\44\1\uffff\1\44\4\uffff" ) DFA36_max = DFA.unpack( - u"\1\ufffe\1\171\2\uffff\1\75\1\170\1\167\1\165\1\145\2\157\1\156" - u"\3\157\1\156\3\uffff\1\116\1\125\4\uffff\1\75\1\71\1\75\1\76\3" - u"\75\1\uffff\2\75\1\76\1\75\1\174\1\uffff\1\150\1\157\1\162\1\42" - u"\1\ufffe\1\uffff\1\ufffe\1\170\1\146\1\uffff\1\ufffe\1\uffff\1" - u"\160\5\uffff\1\165\1\164\1\163\1\172\1\162\1\157\1\151\2\164\1" - u"\154\1\156\1\163\1\141\1\172\1\164\1\156\1\157\1\162\1\172\1\146" - u"\1\163\3\uffff\1\172\1\124\34\uffff\1\75\2\uffff\1\75\10\uffff" + u"\1\ufffe\1\uffff\1\171\1\uffff\1\75\1\170\1\167\1\165\1\145\2\157" + u"\1\156\3\157\1\156\3\uffff\1\116\1\125\4\uffff\1\75\1\71\1\75\1" + u"\76\3\75\1\uffff\2\75\1\76\1\75\1\174\1\uffff\1\150\1\157\1\162" + u"\1\42\1\ufffe\1\uffff\1\ufffe\1\170\1\146\1\uffff\1\ufffe\2\uffff" + u"\1\160\4\uffff\1\165\1\164\1\163\1\172\1\162\1\157\1\151\2\164" + u"\1\154\1\156\1\163\1\141\1\172\1\164\1\156\1\157\1\162\1\172\1" + u"\146\1\163\3\uffff\1\172\1\124\34\uffff\1\75\2\uffff\1\75\10\uffff" u"\1\151\1\164\1\145\4\uffff\2\146\2\uffff\1\145\1\155\3\145\1\156" u"\1\164\1\165\1\162\1\164\1\157\1\165\1\151\1\144\1\141\1\164\1" u"\145\1\162\1\uffff\1\172\1\147\1\141\1\172\1\142\1\uffff\1\141" @@ -3952,20 +3952,20 @@ class CLexer(Lexer): ) DFA36_accept = DFA.unpack( - u"\2\uffff\1\2\1\3\14\uffff\1\22\1\23\1\26\2\uffff\1\34\1\35\1\36" - u"\1\37\7\uffff\1\54\5\uffff\1\70\5\uffff\1\121\3\uffff\1\130\1\uffff" - u"\1\131\1\uffff\1\121\1\2\1\3\1\75\1\4\25\uffff\1\22\1\23\1\26\2" - u"\uffff\1\34\1\35\1\36\1\37\1\56\1\40\1\41\1\51\1\127\1\46\1\61" - u"\1\42\1\62\1\52\1\47\1\43\1\57\1\132\1\133\1\44\1\60\1\45\1\72" - u"\1\65\1\53\1\54\1\76\1\55\1\uffff\1\101\1\77\1\uffff\1\102\1\100" - u"\1\66\1\74\1\67\1\71\1\73\1\70\3\uffff\1\123\1\122\1\124\1\125" - u"\2\uffff\1\130\1\134\22\uffff\1\107\5\uffff\1\113\3\uffff\1\32" - u"\1\uffff\1\63\1\103\1\64\1\104\3\uffff\1\126\23\uffff\1\14\2\uffff" - u"\1\114\4\uffff\1\33\4\uffff\1\27\1\uffff\1\110\6\uffff\1\7\2\uffff" - u"\1\11\3\uffff\1\105\1\12\1\15\6\uffff\1\115\7\uffff\1\13\5\uffff" - u"\1\30\1\16\2\uffff\1\25\1\uffff\1\112\1\117\1\uffff\1\5\1\50\1" - u"\20\1\6\1\24\1\111\1\120\3\uffff\1\17\2\uffff\1\1\3\uffff\1\106" - u"\1\uffff\1\10\1\31\1\116\1\21" + u"\1\uffff\1\1\1\uffff\1\3\14\uffff\1\22\1\23\1\26\2\uffff\1\34\1" + u"\35\1\36\1\37\7\uffff\1\54\5\uffff\1\70\5\uffff\1\121\3\uffff\1" + u"\130\1\uffff\1\131\1\1\1\uffff\1\121\1\3\1\75\1\4\25\uffff\1\22" + u"\1\23\1\26\2\uffff\1\34\1\35\1\36\1\37\1\56\1\40\1\41\1\51\1\127" + u"\1\46\1\61\1\42\1\62\1\52\1\47\1\43\1\57\1\132\1\133\1\44\1\60" + u"\1\45\1\72\1\65\1\53\1\54\1\76\1\55\1\uffff\1\101\1\77\1\uffff" + u"\1\102\1\100\1\66\1\74\1\67\1\71\1\73\1\70\3\uffff\1\123\1\122" + u"\1\124\1\125\2\uffff\1\130\1\134\22\uffff\1\107\5\uffff\1\113\3" + u"\uffff\1\32\1\uffff\1\63\1\103\1\64\1\104\3\uffff\1\126\23\uffff" + u"\1\14\2\uffff\1\114\4\uffff\1\33\4\uffff\1\27\1\uffff\1\110\6\uffff" + u"\1\7\2\uffff\1\11\3\uffff\1\105\1\12\1\15\6\uffff\1\115\7\uffff" + u"\1\13\5\uffff\1\30\1\16\2\uffff\1\25\1\uffff\1\112\1\117\1\uffff" + u"\1\5\1\50\1\20\1\6\1\24\1\111\1\120\3\uffff\1\17\2\uffff\1\2\3" + u"\uffff\1\106\1\uffff\1\10\1\31\1\116\1\21" ) DFA36_special = DFA.unpack( @@ -3976,12 +3976,12 @@ class CLexer(Lexer): DFA36_transition = [ DFA.unpack(u"\6\62\2\60\1\62\2\60\22\62\1\60\1\41\1\55\1\61\1\54" u"\1\36\1\37\1\53\1\25\1\26\1\31\1\33\1\3\1\34\1\32\1\35\1\56\11" - u"\57\1\22\1\2\1\42\1\4\1\43\1\46\1\62\10\54\1\23\2\54\1\52\2\54" + u"\57\1\22\1\1\1\42\1\4\1\43\1\46\1\62\10\54\1\23\2\54\1\52\2\54" u"\1\24\13\54\1\27\1\62\1\30\1\44\1\54\1\62\1\7\1\51\1\12\1\16\1" - u"\5\1\15\1\50\1\54\1\13\2\54\1\14\5\54\1\10\1\6\1\1\1\17\1\11\1" + u"\5\1\15\1\50\1\54\1\13\2\54\1\14\5\54\1\10\1\6\1\2\1\17\1\11\1" u"\47\3\54\1\20\1\45\1\21\1\40\uff80\62"), - DFA.unpack(u"\1\63"), DFA.unpack(u""), + DFA.unpack(u"\1\64"), DFA.unpack(u""), DFA.unpack(u"\1\67"), DFA.unpack(u"\1\73\1\uffff\1\71\11\uffff\1\72"), @@ -4031,8 +4031,8 @@ class CLexer(Lexer): DFA.unpack(u""), DFA.unpack(u"\uffff\u0085"), DFA.unpack(u""), - DFA.unpack(u"\1\u0086"), DFA.unpack(u""), + DFA.unpack(u"\1\u0086"), DFA.unpack(u""), DFA.unpack(u""), DFA.unpack(u""), @@ -4050,21 +4050,21 @@ class CLexer(Lexer): DFA.unpack(u"\1\u0095"), DFA.unpack(u"\1\u0096"), DFA.unpack(u"\1\u0097"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u"\1\u0099"), DFA.unpack(u"\1\u009a"), DFA.unpack(u"\1\u009b"), DFA.unpack(u"\1\u009c"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\24\64\1\u009d\5\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\24\65\1\u009d\5\65"), DFA.unpack(u"\1\u009f"), DFA.unpack(u"\1\u00a0\11\uffff\1\u00a1"), DFA.unpack(u""), DFA.unpack(u""), DFA.unpack(u""), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u"\1\u00a3"), DFA.unpack(u""), DFA.unpack(u""), @@ -4137,20 +4137,20 @@ class CLexer(Lexer): DFA.unpack(u"\1\u00bd"), DFA.unpack(u"\1\u00be"), DFA.unpack(u""), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u"\1\u00c0"), DFA.unpack(u"\1\u00c1"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u"\1\u00c3"), DFA.unpack(u""), DFA.unpack(u"\1\u00c4"), DFA.unpack(u"\1\u00c5"), DFA.unpack(u"\1\u00c6"), DFA.unpack(u""), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u""), DFA.unpack(u""), DFA.unpack(u""), @@ -4160,33 +4160,33 @@ class CLexer(Lexer): DFA.unpack(u"\1\u00ca"), DFA.unpack(u""), DFA.unpack(u"\1\u00cb"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u"\1\u00cd"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u"\1\u00cf"), DFA.unpack(u"\1\u00d0"), DFA.unpack(u"\1\u00d1"), DFA.unpack(u"\1\u00d2"), DFA.unpack(u"\1\u00d3"), DFA.unpack(u"\1\u00d4"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u"\1\u00d6"), DFA.unpack(u"\1\u00d7"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u"\1\u00d9"), DFA.unpack(u"\1\u00da"), DFA.unpack(u"\1\u00db"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u""), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u"\1\u00df"), DFA.unpack(u""), DFA.unpack(u"\1\u00e0"), @@ -4195,8 +4195,8 @@ class CLexer(Lexer): DFA.unpack(u"\1\u00e3"), DFA.unpack(u""), DFA.unpack(u"\1\u00e4"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u"\1\u00e6"), DFA.unpack(u"\1\u00e7"), DFA.unpack(u""), @@ -4206,8 +4206,8 @@ class CLexer(Lexer): DFA.unpack(u"\1\u00ea"), DFA.unpack(u"\1\u00eb"), DFA.unpack(u"\1\u00ec"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u"\1\u00ee"), DFA.unpack(u""), DFA.unpack(u"\1\u00ef"), @@ -4215,53 +4215,53 @@ class CLexer(Lexer): DFA.unpack(u""), DFA.unpack(u"\1\u00f1"), DFA.unpack(u"\1\u00f2"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u""), DFA.unpack(u""), DFA.unpack(u""), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u"\1\u00f5"), DFA.unpack(u"\1\u00f6"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u"\1\u00f8"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u""), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u"\1\u00fb"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u""), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u"\1\u0103"), DFA.unpack(u"\1\u0104"), DFA.unpack(u"\1\u0105"), DFA.unpack(u""), DFA.unpack(u""), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u"\1\u0107"), DFA.unpack(u""), DFA.unpack(u"\1\u0108"), DFA.unpack(u""), DFA.unpack(u""), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u""), DFA.unpack(u""), DFA.unpack(u""), @@ -4273,19 +4273,19 @@ class CLexer(Lexer): DFA.unpack(u"\1\u010b"), DFA.unpack(u"\1\u010c"), DFA.unpack(u""), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u"\1\u010e"), DFA.unpack(u""), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u""), - DFA.unpack(u"\1\64\13\uffff\12\64\7\uffff\32\64\4\uffff\1\64\1\uffff" - u"\32\64"), + DFA.unpack(u"\1\65\13\uffff\12\65\7\uffff\32\65\4\uffff\1\65\1\uffff" + u"\32\65"), DFA.unpack(u""), DFA.unpack(u""), DFA.unpack(u""), diff --git a/Source/Python/Ecc/CParser.py b/Source/Python/Ecc/CParser.py index 1d911af..f341e67 100644 --- a/Source/Python/Ecc/CParser.py +++ b/Source/Python/Ecc/CParser.py @@ -1,7 +1,11 @@ -# $ANTLR 3.0.1 C.g 2007-12-12 15:55:52 +# $ANTLR 3.0.1 C.g 2007-12-25 19:09:35 from antlr3 import * from antlr3.compat import set, frozenset + +import CodeFragment +import FileProfile + # for convenience in actions @@ -37,7 +41,7 @@ tokenNames = [ "STRING_LITERAL", "FLOATING_POINT_LITERAL", "LETTER", "EscapeSequence", "HexDigit", "IntegerTypeSuffix", "Exponent", "FloatTypeSuffix", "OctalEscape", "UnicodeEscape", "WS", "UnicodeVocabulary", "COMMENT", "LINE_COMMENT", - "LINE_COMMAND", "'typedef'", "';'", "','", "'='", "'extern'", "'static'", + "LINE_COMMAND", "';'", "'typedef'", "','", "'='", "'extern'", "'static'", "'auto'", "'register'", "'void'", "'char'", "'short'", "'int'", "'long'", "'float'", "'double'", "'signed'", "'unsigned'", "'{'", "'}'", "'struct'", "'union'", "':'", "'enum'", "'const'", "'volatile'", "'IN'", "'OUT'", @@ -49,15 +53,11 @@ tokenNames = [ "'while'", "'do'", "'for'", "'goto'", "'continue'", "'break'", "'return'" ] -class Symbols_scope(object): - def __init__(self): - self.types = None - self.inFunc = None - -class declaration_scope(object): +class function_definition_scope(object): def __init__(self): - self.isTypedef = None + self.ModifierText = None + self.DeclText = None class CParser(Parser): @@ -68,9 +68,7 @@ class CParser(Parser): Parser.__init__(self, input) self.ruleMemo = {} - self.Symbols_stack = [] - - self.declaration_stack = [] + self.function_definition_stack = [] @@ -78,52 +76,62 @@ class CParser(Parser): - def isTypeName(self, name): - for scope in reversed(self.Symbols_stack): - if name in scope.types: - return True - - return False - + def printTokenInfo(self, line, offset, tokenText): print str(line)+ ',' + str(offset) + ':' + str(tokenText) + + def StorePredicateExpression(self, StartLine, StartOffset, EndLine, EndOffset, Text): + PredExp = CodeFragment.PredicateExpression(Text, (StartLine, StartOffset), (EndLine, EndOffset)) + FileProfile.PredicateExpressionList.append(PredExp) - def printFuncHeader(self, line, offset, tokenText): - print str(line)+ ',' + str(offset) + ':' + str(tokenText) + ' is function header.' + def StoreEnumerationDefinition(self, StartLine, StartOffset, EndLine, EndOffset, Text): + EnumDef = CodeFragment.EnumerationDefinition(Text, (StartLine, StartOffset), (EndLine, EndOffset)) + FileProfile.EnumerationDefinitionList.append(EnumDef) + + def StoreStructUnionDefinition(self, StartLine, StartOffset, EndLine, EndOffset, Text): + SUDef = CodeFragment.StructUnionDefinition(Text, (StartLine, StartOffset), (EndLine, EndOffset)) + FileProfile.StructUnionDefinitionList.append(SUDef) + + def StoreTypedefDefinition(self, StartLine, StartOffset, EndLine, EndOffset, FromText, ToText): + Tdef = CodeFragment.TypedefDefinition(FromText, ToText, (StartLine, StartOffset), (EndLine, EndOffset)) + FileProfile.TypedefDefinitionList.append(Tdef) + + def StoreFunctionDefinition(self, StartLine, StartOffset, EndLine, EndOffset, ModifierText, DeclText): + FuncDef = CodeFragment.FunctionDefinition(ModifierText, DeclText, (StartLine, StartOffset), (EndLine, EndOffset)) + FileProfile.FunctionDefinitionList.append(FuncDef) + + def StoreVariableDeclaration(self, StartLine, StartOffset, EndLine, EndOffset, ModifierText, DeclText): + VarDecl = CodeFragment.VariableDeclaration(ModifierText, DeclText, (StartLine, StartOffset), (EndLine, EndOffset)) + FileProfile.VariableDeclarationList.append(VarDecl) # $ANTLR start translation_unit - # C.g:31:1: translation_unit : ( external_declaration )+ ; + # C.g:46:1: translation_unit : ( external_declaration )+ ; def translation_unit(self, ): - self.Symbols_stack.append(Symbols_scope()) translation_unit_StartIndex = self.input.index() - - self.Symbols_stack[-1].types = set() - self.Symbols_stack[-1].inFunc = False - try: try: if self.backtracking > 0 and self.alreadyParsedRule(self.input, 1): return - # C.g:37:2: ( ( external_declaration )+ ) - # C.g:37:4: ( external_declaration )+ - # C.g:37:4: ( external_declaration )+ + # C.g:47:2: ( ( external_declaration )+ ) + # C.g:47:4: ( external_declaration )+ + # C.g:47:4: ( external_declaration )+ cnt1 = 0 while True: #loop1 alt1 = 2 LA1_0 = self.input.LA(1) - if (LA1_0 == IDENTIFIER or LA1_0 == 24 or (28 <= LA1_0 <= 40) or (43 <= LA1_0 <= 44) or (46 <= LA1_0 <= 51) or LA1_0 == 55) : + if (LA1_0 == IDENTIFIER or LA1_0 == 25 or (28 <= LA1_0 <= 40) or (43 <= LA1_0 <= 44) or (46 <= LA1_0 <= 51) or LA1_0 == 55) : alt1 = 1 if alt1 == 1: # C.g:0:0: external_declaration - self.following.append(self.FOLLOW_external_declaration_in_translation_unit76) + self.following.append(self.FOLLOW_external_declaration_in_translation_unit64) self.external_declaration() self.following.pop() if self.failed: @@ -155,8 +163,6 @@ class CParser(Parser): if self.backtracking > 0: self.memoize(self.input, 1, translation_unit_StartIndex) - self.Symbols_stack.pop() - pass return @@ -165,7 +171,7 @@ class CParser(Parser): # $ANTLR start external_declaration - # C.g:48:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ); + # C.g:58:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? ); def external_declaration(self, ): external_declaration_StartIndex = self.input.index() @@ -174,276 +180,290 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 2): return - # C.g:53:2: ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ) - alt2 = 3 - LA2_0 = self.input.LA(1) + # C.g:63:2: ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? ) + alt3 = 3 + LA3_0 = self.input.LA(1) - if ((28 <= LA2_0 <= 31)) : - LA2_1 = self.input.LA(2) + if ((28 <= LA3_0 <= 31)) : + LA3_1 = self.input.LA(2) if (self.synpred4()) : - alt2 = 1 + alt3 = 1 elif (self.synpred5()) : - alt2 = 2 + alt3 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("48:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement );", 2, 1, self.input) + nvae = NoViableAltException("58:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 1, self.input) raise nvae - elif (LA2_0 == 32) : - LA2_2 = self.input.LA(2) + elif (LA3_0 == 32) : + LA3_2 = self.input.LA(2) if (self.synpred4()) : - alt2 = 1 + alt3 = 1 elif (self.synpred5()) : - alt2 = 2 + alt3 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("48:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement );", 2, 2, self.input) + nvae = NoViableAltException("58:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 2, self.input) raise nvae - elif (LA2_0 == 33) : - LA2_3 = self.input.LA(2) + elif (LA3_0 == 33) : + LA3_3 = self.input.LA(2) if (self.synpred4()) : - alt2 = 1 + alt3 = 1 elif (self.synpred5()) : - alt2 = 2 + alt3 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("48:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement );", 2, 3, self.input) + nvae = NoViableAltException("58:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 3, self.input) raise nvae - elif (LA2_0 == 34) : - LA2_4 = self.input.LA(2) + elif (LA3_0 == 34) : + LA3_4 = self.input.LA(2) if (self.synpred4()) : - alt2 = 1 + alt3 = 1 elif (self.synpred5()) : - alt2 = 2 + alt3 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("48:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement );", 2, 4, self.input) + nvae = NoViableAltException("58:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 4, self.input) raise nvae - elif (LA2_0 == 35) : - LA2_5 = self.input.LA(2) + elif (LA3_0 == 35) : + LA3_5 = self.input.LA(2) if (self.synpred4()) : - alt2 = 1 + alt3 = 1 elif (self.synpred5()) : - alt2 = 2 + alt3 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("48:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement );", 2, 5, self.input) + nvae = NoViableAltException("58:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 5, self.input) raise nvae - elif (LA2_0 == 36) : - LA2_6 = self.input.LA(2) + elif (LA3_0 == 36) : + LA3_6 = self.input.LA(2) if (self.synpred4()) : - alt2 = 1 + alt3 = 1 elif (self.synpred5()) : - alt2 = 2 + alt3 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("48:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement );", 2, 6, self.input) + nvae = NoViableAltException("58:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 6, self.input) raise nvae - elif (LA2_0 == 37) : - LA2_7 = self.input.LA(2) + elif (LA3_0 == 37) : + LA3_7 = self.input.LA(2) if (self.synpred4()) : - alt2 = 1 + alt3 = 1 elif (self.synpred5()) : - alt2 = 2 + alt3 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("48:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement );", 2, 7, self.input) + nvae = NoViableAltException("58:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 7, self.input) raise nvae - elif (LA2_0 == 38) : - LA2_8 = self.input.LA(2) + elif (LA3_0 == 38) : + LA3_8 = self.input.LA(2) if (self.synpred4()) : - alt2 = 1 + alt3 = 1 elif (self.synpred5()) : - alt2 = 2 + alt3 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("48:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement );", 2, 8, self.input) + nvae = NoViableAltException("58:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 8, self.input) raise nvae - elif (LA2_0 == 39) : - LA2_9 = self.input.LA(2) + elif (LA3_0 == 39) : + LA3_9 = self.input.LA(2) if (self.synpred4()) : - alt2 = 1 + alt3 = 1 elif (self.synpred5()) : - alt2 = 2 + alt3 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("48:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement );", 2, 9, self.input) + nvae = NoViableAltException("58:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 9, self.input) raise nvae - elif (LA2_0 == 40) : - LA2_10 = self.input.LA(2) + elif (LA3_0 == 40) : + LA3_10 = self.input.LA(2) if (self.synpred4()) : - alt2 = 1 + alt3 = 1 elif (self.synpred5()) : - alt2 = 2 + alt3 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("48:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement );", 2, 10, self.input) + nvae = NoViableAltException("58:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 10, self.input) raise nvae - elif ((43 <= LA2_0 <= 44)) : - LA2_11 = self.input.LA(2) + elif ((43 <= LA3_0 <= 44)) : + LA3_11 = self.input.LA(2) if (self.synpred4()) : - alt2 = 1 + alt3 = 1 elif (self.synpred5()) : - alt2 = 2 + alt3 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("48:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement );", 2, 11, self.input) + nvae = NoViableAltException("58:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 11, self.input) raise nvae - elif (LA2_0 == 46) : - LA2_12 = self.input.LA(2) + elif (LA3_0 == 46) : + LA3_12 = self.input.LA(2) if (self.synpred4()) : - alt2 = 1 + alt3 = 1 elif (self.synpred5()) : - alt2 = 2 + alt3 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("48:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement );", 2, 12, self.input) + nvae = NoViableAltException("58:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 12, self.input) raise nvae - elif (LA2_0 == IDENTIFIER) : - LA2_13 = self.input.LA(2) + elif (LA3_0 == IDENTIFIER) : + LA3_13 = self.input.LA(2) if (self.synpred4()) : - alt2 = 1 + alt3 = 1 elif (self.synpred5()) : - alt2 = 2 + alt3 = 2 elif (True) : - alt2 = 3 + alt3 = 3 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("48:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement );", 2, 13, self.input) + nvae = NoViableAltException("58:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 13, self.input) raise nvae - elif ((47 <= LA2_0 <= 50)) : - LA2_14 = self.input.LA(2) + elif ((47 <= LA3_0 <= 50)) : + LA3_14 = self.input.LA(2) if (self.synpred4()) : - alt2 = 1 + alt3 = 1 elif (self.synpred5()) : - alt2 = 2 + alt3 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("48:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement );", 2, 14, self.input) + nvae = NoViableAltException("58:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 14, self.input) raise nvae - elif (LA2_0 == 55) and (self.synpred4()): - alt2 = 1 - elif (LA2_0 == 51) and (self.synpred4()): - alt2 = 1 - elif (LA2_0 == 24) : - alt2 = 2 + elif (LA3_0 == 55) and (self.synpred4()): + alt3 = 1 + elif (LA3_0 == 51) and (self.synpred4()): + alt3 = 1 + elif (LA3_0 == 25) : + alt3 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("48:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement );", 2, 0, self.input) + nvae = NoViableAltException("58:1: external_declaration options {k=1; } : ( ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition | declaration | macro_statement ( ';' )? );", 3, 0, self.input) raise nvae - if alt2 == 1: - # C.g:53:4: ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition - self.following.append(self.FOLLOW_function_definition_in_external_declaration115) + if alt3 == 1: + # C.g:63:4: ( ( declaration_specifiers )? declarator ( declaration )* '{' )=> function_definition + self.following.append(self.FOLLOW_function_definition_in_external_declaration103) self.function_definition() self.following.pop() if self.failed: return - elif alt2 == 2: - # C.g:54:4: declaration - self.following.append(self.FOLLOW_declaration_in_external_declaration120) + elif alt3 == 2: + # C.g:64:4: declaration + self.following.append(self.FOLLOW_declaration_in_external_declaration108) self.declaration() self.following.pop() if self.failed: return - elif alt2 == 3: - # C.g:55:4: macro_statement - self.following.append(self.FOLLOW_macro_statement_in_external_declaration125) + elif alt3 == 3: + # C.g:65:4: macro_statement ( ';' )? + self.following.append(self.FOLLOW_macro_statement_in_external_declaration113) self.macro_statement() self.following.pop() if self.failed: return + # C.g:65:20: ( ';' )? + alt2 = 2 + LA2_0 = self.input.LA(1) + + if (LA2_0 == 24) : + alt2 = 1 + if alt2 == 1: + # C.g:65:21: ';' + self.match(self.input, 24, self.FOLLOW_24_in_external_declaration116) + if self.failed: + return + + + @@ -468,158 +488,160 @@ class CParser(Parser): # $ANTLR start function_definition - # C.g:61:1: function_definition : ( declaration_specifiers )? declarator ( ( declaration )+ compound_statement | compound_statement ) ; + # C.g:70:1: function_definition : ( declaration_specifiers )? declarator ( ( declaration )+ compound_statement | compound_statement ) ; def function_definition(self, ): - self.Symbols_stack.append(Symbols_scope()) - + self.function_definition_stack.append(function_definition_scope()) retval = self.function_definition_return() retval.start = self.input.LT(1) function_definition_StartIndex = self.input.index() - declarator1 = None + declaration_specifiers1 = None + declarator2 = None - - self.Symbols_stack[-1].inFunc = True + + + self.function_definition_stack[-1].ModifierText = '' + self.function_definition_stack[-1].DeclText = '' try: try: if self.backtracking > 0 and self.alreadyParsedRule(self.input, 3): return retval - # C.g:70:2: ( ( declaration_specifiers )? declarator ( ( declaration )+ compound_statement | compound_statement ) ) - # C.g:70:4: ( declaration_specifiers )? declarator ( ( declaration )+ compound_statement | compound_statement ) - # C.g:70:4: ( declaration_specifiers )? - alt3 = 2 - LA3_0 = self.input.LA(1) + # C.g:82:2: ( ( declaration_specifiers )? declarator ( ( declaration )+ compound_statement | compound_statement ) ) + # C.g:82:4: ( declaration_specifiers )? declarator ( ( declaration )+ compound_statement | compound_statement ) + # C.g:82:4: ( declaration_specifiers )? + alt4 = 2 + LA4_0 = self.input.LA(1) - if ((28 <= LA3_0 <= 40) or (43 <= LA3_0 <= 44) or (46 <= LA3_0 <= 50)) : - alt3 = 1 - elif (LA3_0 == IDENTIFIER) : - LA3 = self.input.LA(2) - if LA3 == 51: - LA3_18 = self.input.LA(3) - - if (self.synpred6()) : - alt3 = 1 - elif LA3 == 28 or LA3 == 29 or LA3 == 30 or LA3 == 31: - LA3_20 = self.input.LA(3) - - if (self.synpred6()) : - alt3 = 1 - elif LA3 == 32: - LA3_21 = self.input.LA(3) - - if (self.synpred6()) : - alt3 = 1 - elif LA3 == 33: - LA3_22 = self.input.LA(3) - - if (self.synpred6()) : - alt3 = 1 - elif LA3 == 34: - LA3_23 = self.input.LA(3) - - if (self.synpred6()) : - alt3 = 1 - elif LA3 == 35: - LA3_24 = self.input.LA(3) - - if (self.synpred6()) : - alt3 = 1 - elif LA3 == 36: - LA3_25 = self.input.LA(3) - - if (self.synpred6()) : - alt3 = 1 - elif LA3 == 37: - LA3_26 = self.input.LA(3) - - if (self.synpred6()) : - alt3 = 1 - elif LA3 == 38: - LA3_27 = self.input.LA(3) - - if (self.synpred6()) : - alt3 = 1 - elif LA3 == 39: - LA3_28 = self.input.LA(3) - - if (self.synpred6()) : - alt3 = 1 - elif LA3 == 40: - LA3_29 = self.input.LA(3) - - if (self.synpred6()) : - alt3 = 1 - elif LA3 == 43 or LA3 == 44: - LA3_30 = self.input.LA(3) - - if (self.synpred6()) : - alt3 = 1 - elif LA3 == 46: - LA3_31 = self.input.LA(3) - - if (self.synpred6()) : - alt3 = 1 - elif LA3 == IDENTIFIER: - LA3_32 = self.input.LA(3) - - if (self.synpred6()) : - alt3 = 1 - elif LA3 == 47 or LA3 == 48 or LA3 == 49 or LA3 == 50: - LA3_33 = self.input.LA(3) - - if (self.synpred6()) : - alt3 = 1 - elif LA3 == 55: - alt3 = 1 - if alt3 == 1: + if ((28 <= LA4_0 <= 40) or (43 <= LA4_0 <= 44) or (46 <= LA4_0 <= 50)) : + alt4 = 1 + elif (LA4_0 == IDENTIFIER) : + LA4 = self.input.LA(2) + if LA4 == 51: + LA4_18 = self.input.LA(3) + + if (self.synpred7()) : + alt4 = 1 + elif LA4 == 28 or LA4 == 29 or LA4 == 30 or LA4 == 31: + LA4_20 = self.input.LA(3) + + if (self.synpred7()) : + alt4 = 1 + elif LA4 == 32: + LA4_21 = self.input.LA(3) + + if (self.synpred7()) : + alt4 = 1 + elif LA4 == 33: + LA4_22 = self.input.LA(3) + + if (self.synpred7()) : + alt4 = 1 + elif LA4 == 34: + LA4_23 = self.input.LA(3) + + if (self.synpred7()) : + alt4 = 1 + elif LA4 == 35: + LA4_24 = self.input.LA(3) + + if (self.synpred7()) : + alt4 = 1 + elif LA4 == 36: + LA4_25 = self.input.LA(3) + + if (self.synpred7()) : + alt4 = 1 + elif LA4 == 37: + LA4_26 = self.input.LA(3) + + if (self.synpred7()) : + alt4 = 1 + elif LA4 == 38: + LA4_27 = self.input.LA(3) + + if (self.synpred7()) : + alt4 = 1 + elif LA4 == 39: + LA4_28 = self.input.LA(3) + + if (self.synpred7()) : + alt4 = 1 + elif LA4 == 40: + LA4_29 = self.input.LA(3) + + if (self.synpred7()) : + alt4 = 1 + elif LA4 == 43 or LA4 == 44: + LA4_30 = self.input.LA(3) + + if (self.synpred7()) : + alt4 = 1 + elif LA4 == 46: + LA4_31 = self.input.LA(3) + + if (self.synpred7()) : + alt4 = 1 + elif LA4 == IDENTIFIER: + LA4_32 = self.input.LA(3) + + if (self.synpred7()) : + alt4 = 1 + elif LA4 == 47 or LA4 == 48 or LA4 == 49 or LA4 == 50: + LA4_33 = self.input.LA(3) + + if (self.synpred7()) : + alt4 = 1 + elif LA4 == 55: + alt4 = 1 + if alt4 == 1: # C.g:0:0: declaration_specifiers - self.following.append(self.FOLLOW_declaration_specifiers_in_function_definition153) - self.declaration_specifiers() + self.following.append(self.FOLLOW_declaration_specifiers_in_function_definition145) + declaration_specifiers1 = self.declaration_specifiers() self.following.pop() if self.failed: return retval - self.following.append(self.FOLLOW_declarator_in_function_definition156) - declarator1 = self.declarator() + self.following.append(self.FOLLOW_declarator_in_function_definition148) + declarator2 = self.declarator() self.following.pop() if self.failed: return retval - # C.g:71:3: ( ( declaration )+ compound_statement | compound_statement ) - alt5 = 2 - LA5_0 = self.input.LA(1) - - if (LA5_0 == IDENTIFIER or LA5_0 == 24 or (28 <= LA5_0 <= 40) or (43 <= LA5_0 <= 44) or (46 <= LA5_0 <= 50)) : - alt5 = 1 - elif (LA5_0 == 41) : - alt5 = 2 + # C.g:83:3: ( ( declaration )+ compound_statement | compound_statement ) + alt6 = 2 + LA6_0 = self.input.LA(1) + + if (LA6_0 == IDENTIFIER or LA6_0 == 25 or (28 <= LA6_0 <= 40) or (43 <= LA6_0 <= 44) or (46 <= LA6_0 <= 50)) : + alt6 = 1 + elif (LA6_0 == 41) : + alt6 = 2 else: if self.backtracking > 0: self.failed = True return retval - nvae = NoViableAltException("71:3: ( ( declaration )+ compound_statement | compound_statement )", 5, 0, self.input) + nvae = NoViableAltException("83:3: ( ( declaration )+ compound_statement | compound_statement )", 6, 0, self.input) raise nvae - if alt5 == 1: - # C.g:71:5: ( declaration )+ compound_statement - # C.g:71:5: ( declaration )+ - cnt4 = 0 - while True: #loop4 - alt4 = 2 - LA4_0 = self.input.LA(1) + if alt6 == 1: + # C.g:83:5: ( declaration )+ compound_statement + # C.g:83:5: ( declaration )+ + cnt5 = 0 + while True: #loop5 + alt5 = 2 + LA5_0 = self.input.LA(1) - if (LA4_0 == IDENTIFIER or LA4_0 == 24 or (28 <= LA4_0 <= 40) or (43 <= LA4_0 <= 44) or (46 <= LA4_0 <= 50)) : - alt4 = 1 + if (LA5_0 == IDENTIFIER or LA5_0 == 25 or (28 <= LA5_0 <= 40) or (43 <= LA5_0 <= 44) or (46 <= LA5_0 <= 50)) : + alt5 = 1 - if alt4 == 1: + if alt5 == 1: # C.g:0:0: declaration - self.following.append(self.FOLLOW_declaration_in_function_definition162) + self.following.append(self.FOLLOW_declaration_in_function_definition154) self.declaration() self.following.pop() if self.failed: @@ -627,29 +649,29 @@ class CParser(Parser): else: - if cnt4 >= 1: - break #loop4 + if cnt5 >= 1: + break #loop5 if self.backtracking > 0: self.failed = True return retval - eee = EarlyExitException(4, self.input) + eee = EarlyExitException(5, self.input) raise eee - cnt4 += 1 + cnt5 += 1 - self.following.append(self.FOLLOW_compound_statement_in_function_definition165) + self.following.append(self.FOLLOW_compound_statement_in_function_definition157) self.compound_statement() self.following.pop() if self.failed: return retval - elif alt5 == 2: - # C.g:72:5: compound_statement - self.following.append(self.FOLLOW_compound_statement_in_function_definition172) + elif alt6 == 2: + # C.g:84:5: compound_statement + self.following.append(self.FOLLOW_compound_statement_in_function_definition164) self.compound_statement() self.following.pop() if self.failed: @@ -658,7 +680,8 @@ class CParser(Parser): if self.backtracking == 0: - self.printFuncHeader(declarator1.start.line, declarator1.start.charPositionInLine, self.input.toString(declarator1.start,declarator1.stop)) + self.function_definition_stack[-1].ModifierText = self.input.toString(declaration_specifiers1.start,declaration_specifiers1.stop) + self.function_definition_stack[-1].DeclText = self.input.toString(declarator2.start,declarator2.stop) @@ -667,8 +690,7 @@ class CParser(Parser): if self.backtracking == 0: - print str(retval.start.line) + ',' + str(retval.start.charPositionInLine) - print str(retval.stop.line) + ',' + str(retval.stop.charPositionInLine) + self.StoreFunctionDefinition(retval.start.line, retval.start.charPositionInLine, retval.stop.line, retval.stop.charPositionInLine, self.function_definition_stack[-1].ModifierText, self.function_definition_stack[-1].DeclText) @@ -679,8 +701,7 @@ class CParser(Parser): if self.backtracking > 0: self.memoize(self.input, 3, function_definition_StartIndex) - self.Symbols_stack.pop() - + self.function_definition_stack.pop() pass return retval @@ -689,105 +710,125 @@ class CParser(Parser): # $ANTLR start declaration - # C.g:76:1: declaration : (a= 'typedef' ( declaration_specifiers )? init_declarator_list ';' | declaration_specifiers ( init_declarator_list )? ';' ); + # C.g:89:1: declaration : (a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' | s= declaration_specifiers (t= init_declarator_list )? e= ';' ); def declaration(self, ): - self.declaration_stack.append(declaration_scope()) + declaration_StartIndex = self.input.index() a = None + d = None + e = None + b = None + + c = None + + s = None + + t = None - - self.declaration_stack[-1].isTypedef = False try: try: if self.backtracking > 0 and self.alreadyParsedRule(self.input, 4): return - # C.g:83:2: (a= 'typedef' ( declaration_specifiers )? init_declarator_list ';' | declaration_specifiers ( init_declarator_list )? ';' ) - alt8 = 2 - LA8_0 = self.input.LA(1) + # C.g:90:2: (a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' | s= declaration_specifiers (t= init_declarator_list )? e= ';' ) + alt9 = 2 + LA9_0 = self.input.LA(1) - if (LA8_0 == 24) : - alt8 = 1 - elif (LA8_0 == IDENTIFIER or (28 <= LA8_0 <= 40) or (43 <= LA8_0 <= 44) or (46 <= LA8_0 <= 50)) : - alt8 = 2 + if (LA9_0 == 25) : + alt9 = 1 + elif (LA9_0 == IDENTIFIER or (28 <= LA9_0 <= 40) or (43 <= LA9_0 <= 44) or (46 <= LA9_0 <= 50)) : + alt9 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("76:1: declaration : (a= 'typedef' ( declaration_specifiers )? init_declarator_list ';' | declaration_specifiers ( init_declarator_list )? ';' );", 8, 0, self.input) + nvae = NoViableAltException("89:1: declaration : (a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' | s= declaration_specifiers (t= init_declarator_list )? e= ';' );", 9, 0, self.input) raise nvae - if alt8 == 1: - # C.g:83:4: a= 'typedef' ( declaration_specifiers )? init_declarator_list ';' + if alt9 == 1: + # C.g:90:4: a= 'typedef' (b= declaration_specifiers )? c= init_declarator_list d= ';' a = self.input.LT(1) - self.match(self.input, 24, self.FOLLOW_24_in_declaration204) + self.match(self.input, 25, self.FOLLOW_25_in_declaration187) if self.failed: return - # C.g:83:16: ( declaration_specifiers )? - alt6 = 2 - LA6_0 = self.input.LA(1) - - if ((28 <= LA6_0 <= 40) or (43 <= LA6_0 <= 44) or (46 <= LA6_0 <= 50)) : - alt6 = 1 - elif (LA6_0 == IDENTIFIER) : - LA6_13 = self.input.LA(2) - - if (LA6_13 == 51) : - LA6_18 = self.input.LA(3) - - if (self.synpred9()) : - alt6 = 1 - elif (LA6_13 == IDENTIFIER or (28 <= LA6_13 <= 40) or (43 <= LA6_13 <= 44) or (46 <= LA6_13 <= 50) or LA6_13 == 55) : - alt6 = 1 - if alt6 == 1: - # C.g:0:0: declaration_specifiers - self.following.append(self.FOLLOW_declaration_specifiers_in_declaration206) - self.declaration_specifiers() + # C.g:90:17: (b= declaration_specifiers )? + alt7 = 2 + LA7_0 = self.input.LA(1) + + if ((28 <= LA7_0 <= 40) or (43 <= LA7_0 <= 44) or (46 <= LA7_0 <= 50)) : + alt7 = 1 + elif (LA7_0 == IDENTIFIER) : + LA7_13 = self.input.LA(2) + + if (LA7_13 == IDENTIFIER or (28 <= LA7_13 <= 40) or (43 <= LA7_13 <= 44) or (46 <= LA7_13 <= 50) or LA7_13 == 55) : + alt7 = 1 + elif (LA7_13 == 51) : + LA7_19 = self.input.LA(3) + + if (self.synpred10()) : + alt7 = 1 + if alt7 == 1: + # C.g:0:0: b= declaration_specifiers + self.following.append(self.FOLLOW_declaration_specifiers_in_declaration191) + b = self.declaration_specifiers() self.following.pop() if self.failed: return - self.following.append(self.FOLLOW_init_declarator_list_in_declaration213) - self.init_declarator_list() + self.following.append(self.FOLLOW_init_declarator_list_in_declaration200) + c = self.init_declarator_list() self.following.pop() if self.failed: return - self.match(self.input, 25, self.FOLLOW_25_in_declaration215) + d = self.input.LT(1) + self.match(self.input, 24, self.FOLLOW_24_in_declaration204) if self.failed: return + if self.backtracking == 0: + + if b != None: + self.StoreTypedefDefinition(a.line, a.charPositionInLine, d.line, d.charPositionInLine, self.input.toString(b.start,b.stop), self.input.toString(c.start,c.stop)) + else: + self.StoreTypedefDefinition(a.line, a.charPositionInLine, d.line, d.charPositionInLine, '', self.input.toString(c.start,c.stop)) + + - elif alt8 == 2: - # C.g:85:4: declaration_specifiers ( init_declarator_list )? ';' - self.following.append(self.FOLLOW_declaration_specifiers_in_declaration221) - self.declaration_specifiers() + elif alt9 == 2: + # C.g:98:4: s= declaration_specifiers (t= init_declarator_list )? e= ';' + self.following.append(self.FOLLOW_declaration_specifiers_in_declaration218) + s = self.declaration_specifiers() self.following.pop() if self.failed: return - # C.g:85:27: ( init_declarator_list )? - alt7 = 2 - LA7_0 = self.input.LA(1) - - if (LA7_0 == IDENTIFIER or LA7_0 == 51 or LA7_0 == 55) : - alt7 = 1 - if alt7 == 1: - # C.g:0:0: init_declarator_list - self.following.append(self.FOLLOW_init_declarator_list_in_declaration223) - self.init_declarator_list() + # C.g:98:30: (t= init_declarator_list )? + alt8 = 2 + LA8_0 = self.input.LA(1) + + if (LA8_0 == IDENTIFIER or LA8_0 == 51 or LA8_0 == 55) : + alt8 = 1 + if alt8 == 1: + # C.g:0:0: t= init_declarator_list + self.following.append(self.FOLLOW_init_declarator_list_in_declaration222) + t = self.init_declarator_list() self.following.pop() if self.failed: return - self.match(self.input, 25, self.FOLLOW_25_in_declaration226) + e = self.input.LT(1) + self.match(self.input, 24, self.FOLLOW_24_in_declaration227) if self.failed: return + if self.backtracking == 0: + self.StoreVariableDeclaration(s.start.line, s.start.charPositionInLine, e.line, e.charPositionInLine, self.input.toString(s.start,s.stop), self.input.toString(t.start,t.stop)) + @@ -798,88 +839,97 @@ class CParser(Parser): if self.backtracking > 0: self.memoize(self.input, 4, declaration_StartIndex) - self.declaration_stack.pop() pass return # $ANTLR end declaration + class declaration_specifiers_return(object): + def __init__(self): + self.start = None + self.stop = None + + # $ANTLR start declaration_specifiers - # C.g:89:1: declaration_specifiers : ( storage_class_specifier | type_specifier | type_qualifier )+ ; + # C.g:102:1: declaration_specifiers : ( storage_class_specifier | type_specifier | type_qualifier )+ ; def declaration_specifiers(self, ): + retval = self.declaration_specifiers_return() + retval.start = self.input.LT(1) declaration_specifiers_StartIndex = self.input.index() try: try: if self.backtracking > 0 and self.alreadyParsedRule(self.input, 5): - return + return retval + + # C.g:103:2: ( ( storage_class_specifier | type_specifier | type_qualifier )+ ) + # C.g:103:6: ( storage_class_specifier | type_specifier | type_qualifier )+ + # C.g:103:6: ( storage_class_specifier | type_specifier | type_qualifier )+ + cnt10 = 0 + while True: #loop10 + alt10 = 4 + LA10 = self.input.LA(1) + if LA10 == IDENTIFIER: + LA10_2 = self.input.LA(2) - # C.g:90:2: ( ( storage_class_specifier | type_specifier | type_qualifier )+ ) - # C.g:90:6: ( storage_class_specifier | type_specifier | type_qualifier )+ - # C.g:90:6: ( storage_class_specifier | type_specifier | type_qualifier )+ - cnt9 = 0 - while True: #loop9 - alt9 = 4 - LA9 = self.input.LA(1) - if LA9 == IDENTIFIER: - LA9_2 = self.input.LA(2) - - if (self.synpred13()) : - alt9 = 2 - - - elif LA9 == 28 or LA9 == 29 or LA9 == 30 or LA9 == 31: - alt9 = 1 - elif LA9 == 32 or LA9 == 33 or LA9 == 34 or LA9 == 35 or LA9 == 36 or LA9 == 37 or LA9 == 38 or LA9 == 39 or LA9 == 40 or LA9 == 43 or LA9 == 44 or LA9 == 46: - alt9 = 2 - elif LA9 == 47 or LA9 == 48 or LA9 == 49 or LA9 == 50: - alt9 = 3 - - if alt9 == 1: - # C.g:90:10: storage_class_specifier - self.following.append(self.FOLLOW_storage_class_specifier_in_declaration_specifiers245) + if (self.synpred14()) : + alt10 = 2 + + + elif LA10 == 28 or LA10 == 29 or LA10 == 30 or LA10 == 31: + alt10 = 1 + elif LA10 == 32 or LA10 == 33 or LA10 == 34 or LA10 == 35 or LA10 == 36 or LA10 == 37 or LA10 == 38 or LA10 == 39 or LA10 == 40 or LA10 == 43 or LA10 == 44 or LA10 == 46: + alt10 = 2 + elif LA10 == 47 or LA10 == 48 or LA10 == 49 or LA10 == 50: + alt10 = 3 + + if alt10 == 1: + # C.g:103:10: storage_class_specifier + self.following.append(self.FOLLOW_storage_class_specifier_in_declaration_specifiers248) self.storage_class_specifier() self.following.pop() if self.failed: - return + return retval - elif alt9 == 2: - # C.g:91:7: type_specifier - self.following.append(self.FOLLOW_type_specifier_in_declaration_specifiers253) + elif alt10 == 2: + # C.g:104:7: type_specifier + self.following.append(self.FOLLOW_type_specifier_in_declaration_specifiers256) self.type_specifier() self.following.pop() if self.failed: - return + return retval - elif alt9 == 3: - # C.g:92:13: type_qualifier - self.following.append(self.FOLLOW_type_qualifier_in_declaration_specifiers267) + elif alt10 == 3: + # C.g:105:13: type_qualifier + self.following.append(self.FOLLOW_type_qualifier_in_declaration_specifiers270) self.type_qualifier() self.following.pop() if self.failed: - return + return retval else: - if cnt9 >= 1: - break #loop9 + if cnt10 >= 1: + break #loop10 if self.backtracking > 0: self.failed = True - return + return retval - eee = EarlyExitException(9, self.input) + eee = EarlyExitException(10, self.input) raise eee - cnt9 += 1 + cnt10 += 1 + + retval.stop = self.input.LT(-1) except RecognitionException, re: @@ -891,56 +941,66 @@ class CParser(Parser): pass - return + return retval # $ANTLR end declaration_specifiers + class init_declarator_list_return(object): + def __init__(self): + self.start = None + self.stop = None + + # $ANTLR start init_declarator_list - # C.g:96:1: init_declarator_list : init_declarator ( ',' init_declarator )* ; + # C.g:109:1: init_declarator_list : init_declarator ( ',' init_declarator )* ; def init_declarator_list(self, ): + retval = self.init_declarator_list_return() + retval.start = self.input.LT(1) init_declarator_list_StartIndex = self.input.index() try: try: if self.backtracking > 0 and self.alreadyParsedRule(self.input, 6): - return + return retval - # C.g:97:2: ( init_declarator ( ',' init_declarator )* ) - # C.g:97:4: init_declarator ( ',' init_declarator )* - self.following.append(self.FOLLOW_init_declarator_in_init_declarator_list289) + # C.g:110:2: ( init_declarator ( ',' init_declarator )* ) + # C.g:110:4: init_declarator ( ',' init_declarator )* + self.following.append(self.FOLLOW_init_declarator_in_init_declarator_list292) self.init_declarator() self.following.pop() if self.failed: - return - # C.g:97:20: ( ',' init_declarator )* - while True: #loop10 - alt10 = 2 - LA10_0 = self.input.LA(1) + return retval + # C.g:110:20: ( ',' init_declarator )* + while True: #loop11 + alt11 = 2 + LA11_0 = self.input.LA(1) - if (LA10_0 == 26) : - alt10 = 1 + if (LA11_0 == 26) : + alt11 = 1 - if alt10 == 1: - # C.g:97:21: ',' init_declarator - self.match(self.input, 26, self.FOLLOW_26_in_init_declarator_list292) + if alt11 == 1: + # C.g:110:21: ',' init_declarator + self.match(self.input, 26, self.FOLLOW_26_in_init_declarator_list295) if self.failed: - return - self.following.append(self.FOLLOW_init_declarator_in_init_declarator_list294) + return retval + self.following.append(self.FOLLOW_init_declarator_in_init_declarator_list297) self.init_declarator() self.following.pop() if self.failed: - return + return retval else: - break #loop10 + break #loop11 + retval.stop = self.input.LT(-1) + except RecognitionException, re: self.reportError(re) @@ -951,13 +1011,13 @@ class CParser(Parser): pass - return + return retval # $ANTLR end init_declarator_list # $ANTLR start init_declarator - # C.g:100:1: init_declarator : declarator ( '=' initializer )? ; + # C.g:113:1: init_declarator : declarator ( '=' initializer )? ; def init_declarator(self, ): init_declarator_StartIndex = self.input.index() @@ -966,25 +1026,25 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 7): return - # C.g:101:2: ( declarator ( '=' initializer )? ) - # C.g:101:4: declarator ( '=' initializer )? - self.following.append(self.FOLLOW_declarator_in_init_declarator307) + # C.g:114:2: ( declarator ( '=' initializer )? ) + # C.g:114:4: declarator ( '=' initializer )? + self.following.append(self.FOLLOW_declarator_in_init_declarator310) self.declarator() self.following.pop() if self.failed: return - # C.g:101:15: ( '=' initializer )? - alt11 = 2 - LA11_0 = self.input.LA(1) + # C.g:114:15: ( '=' initializer )? + alt12 = 2 + LA12_0 = self.input.LA(1) - if (LA11_0 == 27) : - alt11 = 1 - if alt11 == 1: - # C.g:101:16: '=' initializer - self.match(self.input, 27, self.FOLLOW_27_in_init_declarator310) + if (LA12_0 == 27) : + alt12 = 1 + if alt12 == 1: + # C.g:114:16: '=' initializer + self.match(self.input, 27, self.FOLLOW_27_in_init_declarator313) if self.failed: return - self.following.append(self.FOLLOW_initializer_in_init_declarator312) + self.following.append(self.FOLLOW_initializer_in_init_declarator315) self.initializer() self.following.pop() if self.failed: @@ -1011,7 +1071,7 @@ class CParser(Parser): # $ANTLR start storage_class_specifier - # C.g:105:1: storage_class_specifier : ( 'extern' | 'static' | 'auto' | 'register' ); + # C.g:117:1: storage_class_specifier : ( 'extern' | 'static' | 'auto' | 'register' ); def storage_class_specifier(self, ): storage_class_specifier_StartIndex = self.input.index() @@ -1020,7 +1080,7 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 8): return - # C.g:106:2: ( 'extern' | 'static' | 'auto' | 'register' ) + # C.g:118:2: ( 'extern' | 'static' | 'auto' | 'register' ) # C.g: if (28 <= self.input.LA(1) <= 31): self.input.consume(); @@ -1058,136 +1118,147 @@ class CParser(Parser): # $ANTLR start type_specifier - # C.g:112:1: type_specifier options {k=3; } : ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | struct_or_union_specifier | enum_specifier | ( IDENTIFIER declarator )=> type_id ); + # C.g:124:1: type_specifier : ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | s= struct_or_union_specifier | e= enum_specifier | ( IDENTIFIER declarator )=> type_id ); def type_specifier(self, ): type_specifier_StartIndex = self.input.index() + s = None + + e = None + + try: try: if self.backtracking > 0 and self.alreadyParsedRule(self.input, 9): return - # C.g:114:2: ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | struct_or_union_specifier | enum_specifier | ( IDENTIFIER declarator )=> type_id ) - alt12 = 12 - LA12_0 = self.input.LA(1) + # C.g:125:2: ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | s= struct_or_union_specifier | e= enum_specifier | ( IDENTIFIER declarator )=> type_id ) + alt13 = 12 + LA13_0 = self.input.LA(1) - if (LA12_0 == 32) : - alt12 = 1 - elif (LA12_0 == 33) : - alt12 = 2 - elif (LA12_0 == 34) : - alt12 = 3 - elif (LA12_0 == 35) : - alt12 = 4 - elif (LA12_0 == 36) : - alt12 = 5 - elif (LA12_0 == 37) : - alt12 = 6 - elif (LA12_0 == 38) : - alt12 = 7 - elif (LA12_0 == 39) : - alt12 = 8 - elif (LA12_0 == 40) : - alt12 = 9 - elif ((43 <= LA12_0 <= 44)) : - alt12 = 10 - elif (LA12_0 == 46) : - alt12 = 11 - elif (LA12_0 == IDENTIFIER) and (self.synpred31()): - alt12 = 12 + if (LA13_0 == 32) : + alt13 = 1 + elif (LA13_0 == 33) : + alt13 = 2 + elif (LA13_0 == 34) : + alt13 = 3 + elif (LA13_0 == 35) : + alt13 = 4 + elif (LA13_0 == 36) : + alt13 = 5 + elif (LA13_0 == 37) : + alt13 = 6 + elif (LA13_0 == 38) : + alt13 = 7 + elif (LA13_0 == 39) : + alt13 = 8 + elif (LA13_0 == 40) : + alt13 = 9 + elif ((43 <= LA13_0 <= 44)) : + alt13 = 10 + elif (LA13_0 == 46) : + alt13 = 11 + elif (LA13_0 == IDENTIFIER) and (self.synpred32()): + alt13 = 12 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("112:1: type_specifier options {k=3; } : ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | struct_or_union_specifier | enum_specifier | ( IDENTIFIER declarator )=> type_id );", 12, 0, self.input) + nvae = NoViableAltException("124:1: type_specifier : ( 'void' | 'char' | 'short' | 'int' | 'long' | 'float' | 'double' | 'signed' | 'unsigned' | s= struct_or_union_specifier | e= enum_specifier | ( IDENTIFIER declarator )=> type_id );", 13, 0, self.input) raise nvae - if alt12 == 1: - # C.g:114:4: 'void' - self.match(self.input, 32, self.FOLLOW_32_in_type_specifier361) + if alt13 == 1: + # C.g:125:4: 'void' + self.match(self.input, 32, self.FOLLOW_32_in_type_specifier355) if self.failed: return - elif alt12 == 2: - # C.g:115:4: 'char' - self.match(self.input, 33, self.FOLLOW_33_in_type_specifier366) + elif alt13 == 2: + # C.g:126:4: 'char' + self.match(self.input, 33, self.FOLLOW_33_in_type_specifier360) if self.failed: return - elif alt12 == 3: - # C.g:116:4: 'short' - self.match(self.input, 34, self.FOLLOW_34_in_type_specifier371) + elif alt13 == 3: + # C.g:127:4: 'short' + self.match(self.input, 34, self.FOLLOW_34_in_type_specifier365) if self.failed: return - elif alt12 == 4: - # C.g:117:4: 'int' - self.match(self.input, 35, self.FOLLOW_35_in_type_specifier376) + elif alt13 == 4: + # C.g:128:4: 'int' + self.match(self.input, 35, self.FOLLOW_35_in_type_specifier370) if self.failed: return - elif alt12 == 5: - # C.g:118:4: 'long' - self.match(self.input, 36, self.FOLLOW_36_in_type_specifier381) + elif alt13 == 5: + # C.g:129:4: 'long' + self.match(self.input, 36, self.FOLLOW_36_in_type_specifier375) if self.failed: return - elif alt12 == 6: - # C.g:119:4: 'float' - self.match(self.input, 37, self.FOLLOW_37_in_type_specifier386) + elif alt13 == 6: + # C.g:130:4: 'float' + self.match(self.input, 37, self.FOLLOW_37_in_type_specifier380) if self.failed: return - elif alt12 == 7: - # C.g:120:4: 'double' - self.match(self.input, 38, self.FOLLOW_38_in_type_specifier391) + elif alt13 == 7: + # C.g:131:4: 'double' + self.match(self.input, 38, self.FOLLOW_38_in_type_specifier385) if self.failed: return - elif alt12 == 8: - # C.g:121:4: 'signed' - self.match(self.input, 39, self.FOLLOW_39_in_type_specifier396) + elif alt13 == 8: + # C.g:132:4: 'signed' + self.match(self.input, 39, self.FOLLOW_39_in_type_specifier390) if self.failed: return - elif alt12 == 9: - # C.g:122:4: 'unsigned' - self.match(self.input, 40, self.FOLLOW_40_in_type_specifier401) + elif alt13 == 9: + # C.g:133:4: 'unsigned' + self.match(self.input, 40, self.FOLLOW_40_in_type_specifier395) if self.failed: return - elif alt12 == 10: - # C.g:123:4: struct_or_union_specifier - self.following.append(self.FOLLOW_struct_or_union_specifier_in_type_specifier406) - self.struct_or_union_specifier() + elif alt13 == 10: + # C.g:134:4: s= struct_or_union_specifier + self.following.append(self.FOLLOW_struct_or_union_specifier_in_type_specifier402) + s = self.struct_or_union_specifier() self.following.pop() if self.failed: return + if self.backtracking == 0: + self.StoreStructUnionDefinition(s.start.line, s.start.charPositionInLine, s.stop.line, s.stop.charPositionInLine, self.input.toString(s.start,s.stop)) - elif alt12 == 11: - # C.g:124:4: enum_specifier + + elif alt13 == 11: + # C.g:135:4: e= enum_specifier self.following.append(self.FOLLOW_enum_specifier_in_type_specifier411) - self.enum_specifier() + e = self.enum_specifier() self.following.pop() if self.failed: return + if self.backtracking == 0: + self.StoreEnumerationDefinition(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop)) + - elif alt12 == 12: - # C.g:125:4: ( IDENTIFIER declarator )=> type_id - self.following.append(self.FOLLOW_type_id_in_type_specifier423) + elif alt13 == 12: + # C.g:136:4: ( IDENTIFIER declarator )=> type_id + self.following.append(self.FOLLOW_type_id_in_type_specifier425) self.type_id() self.following.pop() if self.failed: @@ -1210,7 +1281,7 @@ class CParser(Parser): # $ANTLR start type_id - # C.g:128:1: type_id : IDENTIFIER ; + # C.g:139:1: type_id : IDENTIFIER ; def type_id(self, ): type_id_StartIndex = self.input.index() @@ -1219,9 +1290,9 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 10): return - # C.g:129:5: ( IDENTIFIER ) - # C.g:129:9: IDENTIFIER - self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_type_id439) + # C.g:140:5: ( IDENTIFIER ) + # C.g:140:9: IDENTIFIER + self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_type_id441) if self.failed: return @@ -1241,109 +1312,115 @@ class CParser(Parser): # $ANTLR end type_id + class struct_or_union_specifier_return(object): + def __init__(self): + self.start = None + self.stop = None + + # $ANTLR start struct_or_union_specifier - # C.g:133:1: struct_or_union_specifier options {k=3; } : ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER ); + # C.g:144:1: struct_or_union_specifier options {k=3; } : ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER ); def struct_or_union_specifier(self, ): - self.Symbols_stack.append(Symbols_scope()) + retval = self.struct_or_union_specifier_return() + retval.start = self.input.LT(1) struct_or_union_specifier_StartIndex = self.input.index() - - self.Symbols_stack[-1].types = set() - try: try: if self.backtracking > 0 and self.alreadyParsedRule(self.input, 11): - return + return retval - # C.g:139:2: ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER ) - alt14 = 2 - LA14_0 = self.input.LA(1) + # C.g:146:2: ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER ) + alt15 = 2 + LA15_0 = self.input.LA(1) - if ((43 <= LA14_0 <= 44)) : - LA14_1 = self.input.LA(2) + if ((43 <= LA15_0 <= 44)) : + LA15_1 = self.input.LA(2) - if (LA14_1 == IDENTIFIER) : - LA14_2 = self.input.LA(3) + if (LA15_1 == IDENTIFIER) : + LA15_2 = self.input.LA(3) - if (LA14_2 == 41) : - alt14 = 1 - elif (LA14_2 == EOF or LA14_2 == IDENTIFIER or LA14_2 == 25 or (28 <= LA14_2 <= 40) or (43 <= LA14_2 <= 53) or LA14_2 == 55) : - alt14 = 2 + if (LA15_2 == 41) : + alt15 = 1 + elif (LA15_2 == EOF or LA15_2 == IDENTIFIER or LA15_2 == 24 or (28 <= LA15_2 <= 40) or (43 <= LA15_2 <= 53) or LA15_2 == 55) : + alt15 = 2 else: if self.backtracking > 0: self.failed = True - return + return retval - nvae = NoViableAltException("133:1: struct_or_union_specifier options {k=3; } : ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER );", 14, 2, self.input) + nvae = NoViableAltException("144:1: struct_or_union_specifier options {k=3; } : ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER );", 15, 2, self.input) raise nvae - elif (LA14_1 == 41) : - alt14 = 1 + elif (LA15_1 == 41) : + alt15 = 1 else: if self.backtracking > 0: self.failed = True - return + return retval - nvae = NoViableAltException("133:1: struct_or_union_specifier options {k=3; } : ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER );", 14, 1, self.input) + nvae = NoViableAltException("144:1: struct_or_union_specifier options {k=3; } : ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER );", 15, 1, self.input) raise nvae else: if self.backtracking > 0: self.failed = True - return + return retval - nvae = NoViableAltException("133:1: struct_or_union_specifier options {k=3; } : ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER );", 14, 0, self.input) + nvae = NoViableAltException("144:1: struct_or_union_specifier options {k=3; } : ( struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' | struct_or_union IDENTIFIER );", 15, 0, self.input) raise nvae - if alt14 == 1: - # C.g:139:4: struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' - self.following.append(self.FOLLOW_struct_or_union_in_struct_or_union_specifier478) + if alt15 == 1: + # C.g:146:4: struct_or_union ( IDENTIFIER )? '{' struct_declaration_list '}' + self.following.append(self.FOLLOW_struct_or_union_in_struct_or_union_specifier469) self.struct_or_union() self.following.pop() if self.failed: - return - # C.g:139:20: ( IDENTIFIER )? - alt13 = 2 - LA13_0 = self.input.LA(1) + return retval + # C.g:146:20: ( IDENTIFIER )? + alt14 = 2 + LA14_0 = self.input.LA(1) - if (LA13_0 == IDENTIFIER) : - alt13 = 1 - if alt13 == 1: + if (LA14_0 == IDENTIFIER) : + alt14 = 1 + if alt14 == 1: # C.g:0:0: IDENTIFIER - self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_struct_or_union_specifier480) + self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_struct_or_union_specifier471) if self.failed: - return + return retval - self.match(self.input, 41, self.FOLLOW_41_in_struct_or_union_specifier483) + self.match(self.input, 41, self.FOLLOW_41_in_struct_or_union_specifier474) if self.failed: - return - self.following.append(self.FOLLOW_struct_declaration_list_in_struct_or_union_specifier485) + return retval + self.following.append(self.FOLLOW_struct_declaration_list_in_struct_or_union_specifier476) self.struct_declaration_list() self.following.pop() if self.failed: - return - self.match(self.input, 42, self.FOLLOW_42_in_struct_or_union_specifier487) + return retval + self.match(self.input, 42, self.FOLLOW_42_in_struct_or_union_specifier478) if self.failed: - return + return retval - elif alt14 == 2: - # C.g:140:4: struct_or_union IDENTIFIER - self.following.append(self.FOLLOW_struct_or_union_in_struct_or_union_specifier492) + elif alt15 == 2: + # C.g:147:4: struct_or_union IDENTIFIER + self.following.append(self.FOLLOW_struct_or_union_in_struct_or_union_specifier483) self.struct_or_union() self.following.pop() if self.failed: - return - self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_struct_or_union_specifier494) + return retval + self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_struct_or_union_specifier485) if self.failed: - return + return retval + + retval.stop = self.input.LT(-1) except RecognitionException, re: @@ -1353,17 +1430,15 @@ class CParser(Parser): if self.backtracking > 0: self.memoize(self.input, 11, struct_or_union_specifier_StartIndex) - self.Symbols_stack.pop() - pass - return + return retval # $ANTLR end struct_or_union_specifier # $ANTLR start struct_or_union - # C.g:143:1: struct_or_union : ( 'struct' | 'union' ); + # C.g:150:1: struct_or_union : ( 'struct' | 'union' ); def struct_or_union(self, ): struct_or_union_StartIndex = self.input.index() @@ -1372,7 +1447,7 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 12): return - # C.g:144:2: ( 'struct' | 'union' ) + # C.g:151:2: ( 'struct' | 'union' ) # C.g: if (43 <= self.input.LA(1) <= 44): self.input.consume(); @@ -1410,7 +1485,7 @@ class CParser(Parser): # $ANTLR start struct_declaration_list - # C.g:148:1: struct_declaration_list : ( struct_declaration )+ ; + # C.g:155:1: struct_declaration_list : ( struct_declaration )+ ; def struct_declaration_list(self, ): struct_declaration_list_StartIndex = self.input.index() @@ -1419,21 +1494,21 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 13): return - # C.g:149:2: ( ( struct_declaration )+ ) - # C.g:149:4: ( struct_declaration )+ - # C.g:149:4: ( struct_declaration )+ - cnt15 = 0 - while True: #loop15 - alt15 = 2 - LA15_0 = self.input.LA(1) + # C.g:156:2: ( ( struct_declaration )+ ) + # C.g:156:4: ( struct_declaration )+ + # C.g:156:4: ( struct_declaration )+ + cnt16 = 0 + while True: #loop16 + alt16 = 2 + LA16_0 = self.input.LA(1) - if (LA15_0 == IDENTIFIER or (32 <= LA15_0 <= 40) or (43 <= LA15_0 <= 44) or (46 <= LA15_0 <= 50)) : - alt15 = 1 + if (LA16_0 == IDENTIFIER or (32 <= LA16_0 <= 40) or (43 <= LA16_0 <= 44) or (46 <= LA16_0 <= 50)) : + alt16 = 1 - if alt15 == 1: + if alt16 == 1: # C.g:0:0: struct_declaration - self.following.append(self.FOLLOW_struct_declaration_in_struct_declaration_list521) + self.following.append(self.FOLLOW_struct_declaration_in_struct_declaration_list512) self.struct_declaration() self.following.pop() if self.failed: @@ -1441,17 +1516,17 @@ class CParser(Parser): else: - if cnt15 >= 1: - break #loop15 + if cnt16 >= 1: + break #loop16 if self.backtracking > 0: self.failed = True return - eee = EarlyExitException(15, self.input) + eee = EarlyExitException(16, self.input) raise eee - cnt15 += 1 + cnt16 += 1 @@ -1473,7 +1548,7 @@ class CParser(Parser): # $ANTLR start struct_declaration - # C.g:152:1: struct_declaration : specifier_qualifier_list struct_declarator_list ';' ; + # C.g:159:1: struct_declaration : specifier_qualifier_list struct_declarator_list ';' ; def struct_declaration(self, ): struct_declaration_StartIndex = self.input.index() @@ -1482,19 +1557,19 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 14): return - # C.g:153:2: ( specifier_qualifier_list struct_declarator_list ';' ) - # C.g:153:4: specifier_qualifier_list struct_declarator_list ';' - self.following.append(self.FOLLOW_specifier_qualifier_list_in_struct_declaration533) + # C.g:160:2: ( specifier_qualifier_list struct_declarator_list ';' ) + # C.g:160:4: specifier_qualifier_list struct_declarator_list ';' + self.following.append(self.FOLLOW_specifier_qualifier_list_in_struct_declaration524) self.specifier_qualifier_list() self.following.pop() if self.failed: return - self.following.append(self.FOLLOW_struct_declarator_list_in_struct_declaration535) + self.following.append(self.FOLLOW_struct_declarator_list_in_struct_declaration526) self.struct_declarator_list() self.following.pop() if self.failed: return - self.match(self.input, 25, self.FOLLOW_25_in_struct_declaration537) + self.match(self.input, 24, self.FOLLOW_24_in_struct_declaration528) if self.failed: return @@ -1516,7 +1591,7 @@ class CParser(Parser): # $ANTLR start specifier_qualifier_list - # C.g:156:1: specifier_qualifier_list : ( type_qualifier | type_specifier )+ ; + # C.g:163:1: specifier_qualifier_list : ( type_qualifier | type_specifier )+ ; def specifier_qualifier_list(self, ): specifier_qualifier_list_StartIndex = self.input.index() @@ -1525,56 +1600,56 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 15): return - # C.g:157:2: ( ( type_qualifier | type_specifier )+ ) - # C.g:157:4: ( type_qualifier | type_specifier )+ - # C.g:157:4: ( type_qualifier | type_specifier )+ - cnt16 = 0 - while True: #loop16 - alt16 = 3 - LA16 = self.input.LA(1) - if LA16 == IDENTIFIER: - LA16 = self.input.LA(2) - if LA16 == 53: - LA16_20 = self.input.LA(3) + # C.g:164:2: ( ( type_qualifier | type_specifier )+ ) + # C.g:164:4: ( type_qualifier | type_specifier )+ + # C.g:164:4: ( type_qualifier | type_specifier )+ + cnt17 = 0 + while True: #loop17 + alt17 = 3 + LA17 = self.input.LA(1) + if LA17 == IDENTIFIER: + LA17 = self.input.LA(2) + if LA17 == EOF or LA17 == IDENTIFIER or LA17 == 32 or LA17 == 33 or LA17 == 34 or LA17 == 35 or LA17 == 36 or LA17 == 37 or LA17 == 38 or LA17 == 39 or LA17 == 40 or LA17 == 43 or LA17 == 44 or LA17 == 46 or LA17 == 47 or LA17 == 48 or LA17 == 49 or LA17 == 50 or LA17 == 52 or LA17 == 55: + alt17 = 2 + elif LA17 == 51: + LA17_22 = self.input.LA(3) - if (self.synpred37()) : - alt16 = 2 + if (self.synpred38()) : + alt17 = 2 - elif LA16 == 51: - LA16_21 = self.input.LA(3) + elif LA17 == 45: + LA17_23 = self.input.LA(3) - if (self.synpred37()) : - alt16 = 2 + if (self.synpred38()) : + alt17 = 2 - elif LA16 == 45: - LA16_22 = self.input.LA(3) + elif LA17 == 53: + LA17_24 = self.input.LA(3) - if (self.synpred37()) : - alt16 = 2 + if (self.synpred38()) : + alt17 = 2 - elif LA16 == EOF or LA16 == IDENTIFIER or LA16 == 32 or LA16 == 33 or LA16 == 34 or LA16 == 35 or LA16 == 36 or LA16 == 37 or LA16 == 38 or LA16 == 39 or LA16 == 40 or LA16 == 43 or LA16 == 44 or LA16 == 46 or LA16 == 47 or LA16 == 48 or LA16 == 49 or LA16 == 50 or LA16 == 52 or LA16 == 55: - alt16 = 2 - elif LA16 == 47 or LA16 == 48 or LA16 == 49 or LA16 == 50: - alt16 = 1 - elif LA16 == 32 or LA16 == 33 or LA16 == 34 or LA16 == 35 or LA16 == 36 or LA16 == 37 or LA16 == 38 or LA16 == 39 or LA16 == 40 or LA16 == 43 or LA16 == 44 or LA16 == 46: - alt16 = 2 + elif LA17 == 47 or LA17 == 48 or LA17 == 49 or LA17 == 50: + alt17 = 1 + elif LA17 == 32 or LA17 == 33 or LA17 == 34 or LA17 == 35 or LA17 == 36 or LA17 == 37 or LA17 == 38 or LA17 == 39 or LA17 == 40 or LA17 == 43 or LA17 == 44 or LA17 == 46: + alt17 = 2 - if alt16 == 1: - # C.g:157:6: type_qualifier - self.following.append(self.FOLLOW_type_qualifier_in_specifier_qualifier_list550) + if alt17 == 1: + # C.g:164:6: type_qualifier + self.following.append(self.FOLLOW_type_qualifier_in_specifier_qualifier_list541) self.type_qualifier() self.following.pop() if self.failed: return - elif alt16 == 2: - # C.g:157:23: type_specifier - self.following.append(self.FOLLOW_type_specifier_in_specifier_qualifier_list554) + elif alt17 == 2: + # C.g:164:23: type_specifier + self.following.append(self.FOLLOW_type_specifier_in_specifier_qualifier_list545) self.type_specifier() self.following.pop() if self.failed: @@ -1582,17 +1657,17 @@ class CParser(Parser): else: - if cnt16 >= 1: - break #loop16 + if cnt17 >= 1: + break #loop17 if self.backtracking > 0: self.failed = True return - eee = EarlyExitException(16, self.input) + eee = EarlyExitException(17, self.input) raise eee - cnt16 += 1 + cnt17 += 1 @@ -1614,7 +1689,7 @@ class CParser(Parser): # $ANTLR start struct_declarator_list - # C.g:160:1: struct_declarator_list : struct_declarator ( ',' struct_declarator )* ; + # C.g:167:1: struct_declarator_list : struct_declarator ( ',' struct_declarator )* ; def struct_declarator_list(self, ): struct_declarator_list_StartIndex = self.input.index() @@ -1623,28 +1698,28 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 16): return - # C.g:161:2: ( struct_declarator ( ',' struct_declarator )* ) - # C.g:161:4: struct_declarator ( ',' struct_declarator )* - self.following.append(self.FOLLOW_struct_declarator_in_struct_declarator_list568) + # C.g:168:2: ( struct_declarator ( ',' struct_declarator )* ) + # C.g:168:4: struct_declarator ( ',' struct_declarator )* + self.following.append(self.FOLLOW_struct_declarator_in_struct_declarator_list559) self.struct_declarator() self.following.pop() if self.failed: return - # C.g:161:22: ( ',' struct_declarator )* - while True: #loop17 - alt17 = 2 - LA17_0 = self.input.LA(1) + # C.g:168:22: ( ',' struct_declarator )* + while True: #loop18 + alt18 = 2 + LA18_0 = self.input.LA(1) - if (LA17_0 == 26) : - alt17 = 1 + if (LA18_0 == 26) : + alt18 = 1 - if alt17 == 1: - # C.g:161:23: ',' struct_declarator - self.match(self.input, 26, self.FOLLOW_26_in_struct_declarator_list571) + if alt18 == 1: + # C.g:168:23: ',' struct_declarator + self.match(self.input, 26, self.FOLLOW_26_in_struct_declarator_list562) if self.failed: return - self.following.append(self.FOLLOW_struct_declarator_in_struct_declarator_list573) + self.following.append(self.FOLLOW_struct_declarator_in_struct_declarator_list564) self.struct_declarator() self.following.pop() if self.failed: @@ -1652,7 +1727,7 @@ class CParser(Parser): else: - break #loop17 + break #loop18 @@ -1674,7 +1749,7 @@ class CParser(Parser): # $ANTLR start struct_declarator - # C.g:164:1: struct_declarator : ( declarator ( ':' constant_expression )? | ':' constant_expression ); + # C.g:171:1: struct_declarator : ( declarator ( ':' constant_expression )? | ':' constant_expression ); def struct_declarator(self, ): struct_declarator_StartIndex = self.input.index() @@ -1683,42 +1758,42 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 17): return - # C.g:165:2: ( declarator ( ':' constant_expression )? | ':' constant_expression ) - alt19 = 2 - LA19_0 = self.input.LA(1) + # C.g:172:2: ( declarator ( ':' constant_expression )? | ':' constant_expression ) + alt20 = 2 + LA20_0 = self.input.LA(1) - if (LA19_0 == IDENTIFIER or LA19_0 == 51 or LA19_0 == 55) : - alt19 = 1 - elif (LA19_0 == 45) : - alt19 = 2 + if (LA20_0 == IDENTIFIER or LA20_0 == 51 or LA20_0 == 55) : + alt20 = 1 + elif (LA20_0 == 45) : + alt20 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("164:1: struct_declarator : ( declarator ( ':' constant_expression )? | ':' constant_expression );", 19, 0, self.input) + nvae = NoViableAltException("171:1: struct_declarator : ( declarator ( ':' constant_expression )? | ':' constant_expression );", 20, 0, self.input) raise nvae - if alt19 == 1: - # C.g:165:4: declarator ( ':' constant_expression )? - self.following.append(self.FOLLOW_declarator_in_struct_declarator586) + if alt20 == 1: + # C.g:172:4: declarator ( ':' constant_expression )? + self.following.append(self.FOLLOW_declarator_in_struct_declarator577) self.declarator() self.following.pop() if self.failed: return - # C.g:165:15: ( ':' constant_expression )? - alt18 = 2 - LA18_0 = self.input.LA(1) + # C.g:172:15: ( ':' constant_expression )? + alt19 = 2 + LA19_0 = self.input.LA(1) - if (LA18_0 == 45) : - alt18 = 1 - if alt18 == 1: - # C.g:165:16: ':' constant_expression - self.match(self.input, 45, self.FOLLOW_45_in_struct_declarator589) + if (LA19_0 == 45) : + alt19 = 1 + if alt19 == 1: + # C.g:172:16: ':' constant_expression + self.match(self.input, 45, self.FOLLOW_45_in_struct_declarator580) if self.failed: return - self.following.append(self.FOLLOW_constant_expression_in_struct_declarator591) + self.following.append(self.FOLLOW_constant_expression_in_struct_declarator582) self.constant_expression() self.following.pop() if self.failed: @@ -1728,12 +1803,12 @@ class CParser(Parser): - elif alt19 == 2: - # C.g:166:4: ':' constant_expression - self.match(self.input, 45, self.FOLLOW_45_in_struct_declarator598) + elif alt20 == 2: + # C.g:173:4: ':' constant_expression + self.match(self.input, 45, self.FOLLOW_45_in_struct_declarator589) if self.failed: return - self.following.append(self.FOLLOW_constant_expression_in_struct_declarator600) + self.following.append(self.FOLLOW_constant_expression_in_struct_declarator591) self.constant_expression() self.following.pop() if self.failed: @@ -1754,109 +1829,119 @@ class CParser(Parser): # $ANTLR end struct_declarator + class enum_specifier_return(object): + def __init__(self): + self.start = None + self.stop = None + + # $ANTLR start enum_specifier - # C.g:169:1: enum_specifier options {k=3; } : ( 'enum' '{' enumerator_list '}' | 'enum' IDENTIFIER '{' enumerator_list '}' | 'enum' IDENTIFIER ); + # C.g:176:1: enum_specifier options {k=3; } : ( 'enum' '{' enumerator_list '}' | 'enum' IDENTIFIER '{' enumerator_list '}' | 'enum' IDENTIFIER ); def enum_specifier(self, ): + retval = self.enum_specifier_return() + retval.start = self.input.LT(1) enum_specifier_StartIndex = self.input.index() try: try: if self.backtracking > 0 and self.alreadyParsedRule(self.input, 18): - return + return retval - # C.g:171:2: ( 'enum' '{' enumerator_list '}' | 'enum' IDENTIFIER '{' enumerator_list '}' | 'enum' IDENTIFIER ) - alt20 = 3 - LA20_0 = self.input.LA(1) + # C.g:178:2: ( 'enum' '{' enumerator_list '}' | 'enum' IDENTIFIER '{' enumerator_list '}' | 'enum' IDENTIFIER ) + alt21 = 3 + LA21_0 = self.input.LA(1) - if (LA20_0 == 46) : - LA20_1 = self.input.LA(2) + if (LA21_0 == 46) : + LA21_1 = self.input.LA(2) - if (LA20_1 == IDENTIFIER) : - LA20_2 = self.input.LA(3) + if (LA21_1 == IDENTIFIER) : + LA21_2 = self.input.LA(3) - if (LA20_2 == 41) : - alt20 = 2 - elif (LA20_2 == EOF or LA20_2 == IDENTIFIER or LA20_2 == 25 or (28 <= LA20_2 <= 40) or (43 <= LA20_2 <= 53) or LA20_2 == 55) : - alt20 = 3 + if (LA21_2 == 41) : + alt21 = 2 + elif (LA21_2 == EOF or LA21_2 == IDENTIFIER or LA21_2 == 24 or (28 <= LA21_2 <= 40) or (43 <= LA21_2 <= 53) or LA21_2 == 55) : + alt21 = 3 else: if self.backtracking > 0: self.failed = True - return + return retval - nvae = NoViableAltException("169:1: enum_specifier options {k=3; } : ( 'enum' '{' enumerator_list '}' | 'enum' IDENTIFIER '{' enumerator_list '}' | 'enum' IDENTIFIER );", 20, 2, self.input) + nvae = NoViableAltException("176:1: enum_specifier options {k=3; } : ( 'enum' '{' enumerator_list '}' | 'enum' IDENTIFIER '{' enumerator_list '}' | 'enum' IDENTIFIER );", 21, 2, self.input) raise nvae - elif (LA20_1 == 41) : - alt20 = 1 + elif (LA21_1 == 41) : + alt21 = 1 else: if self.backtracking > 0: self.failed = True - return + return retval - nvae = NoViableAltException("169:1: enum_specifier options {k=3; } : ( 'enum' '{' enumerator_list '}' | 'enum' IDENTIFIER '{' enumerator_list '}' | 'enum' IDENTIFIER );", 20, 1, self.input) + nvae = NoViableAltException("176:1: enum_specifier options {k=3; } : ( 'enum' '{' enumerator_list '}' | 'enum' IDENTIFIER '{' enumerator_list '}' | 'enum' IDENTIFIER );", 21, 1, self.input) raise nvae else: if self.backtracking > 0: self.failed = True - return + return retval - nvae = NoViableAltException("169:1: enum_specifier options {k=3; } : ( 'enum' '{' enumerator_list '}' | 'enum' IDENTIFIER '{' enumerator_list '}' | 'enum' IDENTIFIER );", 20, 0, self.input) + nvae = NoViableAltException("176:1: enum_specifier options {k=3; } : ( 'enum' '{' enumerator_list '}' | 'enum' IDENTIFIER '{' enumerator_list '}' | 'enum' IDENTIFIER );", 21, 0, self.input) raise nvae - if alt20 == 1: - # C.g:171:4: 'enum' '{' enumerator_list '}' - self.match(self.input, 46, self.FOLLOW_46_in_enum_specifier618) + if alt21 == 1: + # C.g:178:4: 'enum' '{' enumerator_list '}' + self.match(self.input, 46, self.FOLLOW_46_in_enum_specifier609) if self.failed: - return - self.match(self.input, 41, self.FOLLOW_41_in_enum_specifier620) + return retval + self.match(self.input, 41, self.FOLLOW_41_in_enum_specifier611) if self.failed: - return - self.following.append(self.FOLLOW_enumerator_list_in_enum_specifier622) + return retval + self.following.append(self.FOLLOW_enumerator_list_in_enum_specifier613) self.enumerator_list() self.following.pop() if self.failed: - return - self.match(self.input, 42, self.FOLLOW_42_in_enum_specifier624) + return retval + self.match(self.input, 42, self.FOLLOW_42_in_enum_specifier615) if self.failed: - return + return retval - elif alt20 == 2: - # C.g:172:4: 'enum' IDENTIFIER '{' enumerator_list '}' - self.match(self.input, 46, self.FOLLOW_46_in_enum_specifier629) + elif alt21 == 2: + # C.g:179:4: 'enum' IDENTIFIER '{' enumerator_list '}' + self.match(self.input, 46, self.FOLLOW_46_in_enum_specifier620) if self.failed: - return - self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_enum_specifier631) + return retval + self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_enum_specifier622) if self.failed: - return - self.match(self.input, 41, self.FOLLOW_41_in_enum_specifier633) + return retval + self.match(self.input, 41, self.FOLLOW_41_in_enum_specifier624) if self.failed: - return - self.following.append(self.FOLLOW_enumerator_list_in_enum_specifier635) + return retval + self.following.append(self.FOLLOW_enumerator_list_in_enum_specifier626) self.enumerator_list() self.following.pop() if self.failed: - return - self.match(self.input, 42, self.FOLLOW_42_in_enum_specifier637) + return retval + self.match(self.input, 42, self.FOLLOW_42_in_enum_specifier628) if self.failed: - return + return retval - elif alt20 == 3: - # C.g:173:4: 'enum' IDENTIFIER - self.match(self.input, 46, self.FOLLOW_46_in_enum_specifier642) + elif alt21 == 3: + # C.g:180:4: 'enum' IDENTIFIER + self.match(self.input, 46, self.FOLLOW_46_in_enum_specifier633) if self.failed: - return - self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_enum_specifier644) + return retval + self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_enum_specifier635) if self.failed: - return + return retval + retval.stop = self.input.LT(-1) + except RecognitionException, re: self.reportError(re) @@ -1867,13 +1952,13 @@ class CParser(Parser): pass - return + return retval # $ANTLR end enum_specifier # $ANTLR start enumerator_list - # C.g:176:1: enumerator_list : enumerator ( ',' enumerator )* ; + # C.g:183:1: enumerator_list : enumerator ( ',' enumerator )* ; def enumerator_list(self, ): enumerator_list_StartIndex = self.input.index() @@ -1882,28 +1967,28 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 19): return - # C.g:177:2: ( enumerator ( ',' enumerator )* ) - # C.g:177:4: enumerator ( ',' enumerator )* - self.following.append(self.FOLLOW_enumerator_in_enumerator_list655) + # C.g:184:2: ( enumerator ( ',' enumerator )* ) + # C.g:184:4: enumerator ( ',' enumerator )* + self.following.append(self.FOLLOW_enumerator_in_enumerator_list646) self.enumerator() self.following.pop() if self.failed: return - # C.g:177:15: ( ',' enumerator )* - while True: #loop21 - alt21 = 2 - LA21_0 = self.input.LA(1) + # C.g:184:15: ( ',' enumerator )* + while True: #loop22 + alt22 = 2 + LA22_0 = self.input.LA(1) - if (LA21_0 == 26) : - alt21 = 1 + if (LA22_0 == 26) : + alt22 = 1 - if alt21 == 1: - # C.g:177:16: ',' enumerator - self.match(self.input, 26, self.FOLLOW_26_in_enumerator_list658) + if alt22 == 1: + # C.g:184:16: ',' enumerator + self.match(self.input, 26, self.FOLLOW_26_in_enumerator_list649) if self.failed: return - self.following.append(self.FOLLOW_enumerator_in_enumerator_list660) + self.following.append(self.FOLLOW_enumerator_in_enumerator_list651) self.enumerator() self.following.pop() if self.failed: @@ -1911,7 +1996,7 @@ class CParser(Parser): else: - break #loop21 + break #loop22 @@ -1933,7 +2018,7 @@ class CParser(Parser): # $ANTLR start enumerator - # C.g:180:1: enumerator : IDENTIFIER ( '=' constant_expression )? ; + # C.g:187:1: enumerator : IDENTIFIER ( '=' constant_expression )? ; def enumerator(self, ): enumerator_StartIndex = self.input.index() @@ -1942,23 +2027,23 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 20): return - # C.g:181:2: ( IDENTIFIER ( '=' constant_expression )? ) - # C.g:181:4: IDENTIFIER ( '=' constant_expression )? - self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_enumerator673) + # C.g:188:2: ( IDENTIFIER ( '=' constant_expression )? ) + # C.g:188:4: IDENTIFIER ( '=' constant_expression )? + self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_enumerator664) if self.failed: return - # C.g:181:15: ( '=' constant_expression )? - alt22 = 2 - LA22_0 = self.input.LA(1) + # C.g:188:15: ( '=' constant_expression )? + alt23 = 2 + LA23_0 = self.input.LA(1) - if (LA22_0 == 27) : - alt22 = 1 - if alt22 == 1: - # C.g:181:16: '=' constant_expression - self.match(self.input, 27, self.FOLLOW_27_in_enumerator676) + if (LA23_0 == 27) : + alt23 = 1 + if alt23 == 1: + # C.g:188:16: '=' constant_expression + self.match(self.input, 27, self.FOLLOW_27_in_enumerator667) if self.failed: return - self.following.append(self.FOLLOW_constant_expression_in_enumerator678) + self.following.append(self.FOLLOW_constant_expression_in_enumerator669) self.constant_expression() self.following.pop() if self.failed: @@ -1985,7 +2070,7 @@ class CParser(Parser): # $ANTLR start type_qualifier - # C.g:184:1: type_qualifier : ( 'const' | 'volatile' | 'IN' | 'OUT' ); + # C.g:191:1: type_qualifier : ( 'const' | 'volatile' | 'IN' | 'OUT' ); def type_qualifier(self, ): type_qualifier_StartIndex = self.input.index() @@ -1994,7 +2079,7 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 21): return - # C.g:185:2: ( 'const' | 'volatile' | 'IN' | 'OUT' ) + # C.g:192:2: ( 'const' | 'volatile' | 'IN' | 'OUT' ) # C.g: if (47 <= self.input.LA(1) <= 50): self.input.consume(); @@ -2038,7 +2123,7 @@ class CParser(Parser): # $ANTLR start declarator - # C.g:191:1: declarator : ( ( pointer )? direct_declarator | pointer ); + # C.g:198:1: declarator : ( ( pointer )? direct_declarator | pointer ); def declarator(self, ): retval = self.declarator_return() @@ -2049,48 +2134,48 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 22): return retval - # C.g:192:2: ( ( pointer )? direct_declarator | pointer ) - alt24 = 2 - LA24_0 = self.input.LA(1) + # C.g:199:2: ( ( pointer )? direct_declarator | pointer ) + alt25 = 2 + LA25_0 = self.input.LA(1) - if (LA24_0 == 55) : - LA24_1 = self.input.LA(2) + if (LA25_0 == 55) : + LA25_1 = self.input.LA(2) - if (self.synpred49()) : - alt24 = 1 + if (self.synpred50()) : + alt25 = 1 elif (True) : - alt24 = 2 + alt25 = 2 else: if self.backtracking > 0: self.failed = True return retval - nvae = NoViableAltException("191:1: declarator : ( ( pointer )? direct_declarator | pointer );", 24, 1, self.input) + nvae = NoViableAltException("198:1: declarator : ( ( pointer )? direct_declarator | pointer );", 25, 1, self.input) raise nvae - elif (LA24_0 == IDENTIFIER or LA24_0 == 51) : - alt24 = 1 + elif (LA25_0 == IDENTIFIER or LA25_0 == 51) : + alt25 = 1 else: if self.backtracking > 0: self.failed = True return retval - nvae = NoViableAltException("191:1: declarator : ( ( pointer )? direct_declarator | pointer );", 24, 0, self.input) + nvae = NoViableAltException("198:1: declarator : ( ( pointer )? direct_declarator | pointer );", 25, 0, self.input) raise nvae - if alt24 == 1: - # C.g:192:4: ( pointer )? direct_declarator - # C.g:192:4: ( pointer )? - alt23 = 2 - LA23_0 = self.input.LA(1) + if alt25 == 1: + # C.g:199:4: ( pointer )? direct_declarator + # C.g:199:4: ( pointer )? + alt24 = 2 + LA24_0 = self.input.LA(1) - if (LA23_0 == 55) : - alt23 = 1 - if alt23 == 1: + if (LA24_0 == 55) : + alt24 = 1 + if alt24 == 1: # C.g:0:0: pointer - self.following.append(self.FOLLOW_pointer_in_declarator717) + self.following.append(self.FOLLOW_pointer_in_declarator708) self.pointer() self.following.pop() if self.failed: @@ -2098,16 +2183,16 @@ class CParser(Parser): - self.following.append(self.FOLLOW_direct_declarator_in_declarator720) + self.following.append(self.FOLLOW_direct_declarator_in_declarator711) self.direct_declarator() self.following.pop() if self.failed: return retval - elif alt24 == 2: - # C.g:193:4: pointer - self.following.append(self.FOLLOW_pointer_in_declarator725) + elif alt25 == 2: + # C.g:200:4: pointer + self.following.append(self.FOLLOW_pointer_in_declarator716) self.pointer() self.following.pop() if self.failed: @@ -2132,9 +2217,8 @@ class CParser(Parser): # $ANTLR start direct_declarator - # C.g:196:1: direct_declarator : ( IDENTIFIER ( declarator_suffix )* | '(' declarator ')' ( declarator_suffix )+ ); + # C.g:203:1: direct_declarator : ( IDENTIFIER ( declarator_suffix )* | '(' declarator ')' ( declarator_suffix )+ ); def direct_declarator(self, ): - self.Symbols_stack.append(Symbols_scope()) direct_declarator_StartIndex = self.input.index() try: @@ -2142,205 +2226,205 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 23): return - # C.g:198:2: ( IDENTIFIER ( declarator_suffix )* | '(' declarator ')' ( declarator_suffix )+ ) - alt27 = 2 - LA27_0 = self.input.LA(1) + # C.g:204:2: ( IDENTIFIER ( declarator_suffix )* | '(' declarator ')' ( declarator_suffix )+ ) + alt28 = 2 + LA28_0 = self.input.LA(1) - if (LA27_0 == IDENTIFIER) : - alt27 = 1 - elif (LA27_0 == 51) : - alt27 = 2 + if (LA28_0 == IDENTIFIER) : + alt28 = 1 + elif (LA28_0 == 51) : + alt28 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("196:1: direct_declarator : ( IDENTIFIER ( declarator_suffix )* | '(' declarator ')' ( declarator_suffix )+ );", 27, 0, self.input) + nvae = NoViableAltException("203:1: direct_declarator : ( IDENTIFIER ( declarator_suffix )* | '(' declarator ')' ( declarator_suffix )+ );", 28, 0, self.input) raise nvae - if alt27 == 1: - # C.g:198:4: IDENTIFIER ( declarator_suffix )* - self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_direct_declarator741) + if alt28 == 1: + # C.g:204:4: IDENTIFIER ( declarator_suffix )* + self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_direct_declarator727) if self.failed: return - # C.g:198:15: ( declarator_suffix )* - while True: #loop25 - alt25 = 2 - LA25_0 = self.input.LA(1) + # C.g:204:15: ( declarator_suffix )* + while True: #loop26 + alt26 = 2 + LA26_0 = self.input.LA(1) - if (LA25_0 == 51) : - LA25 = self.input.LA(2) - if LA25 == 52: - LA25_26 = self.input.LA(3) + if (LA26_0 == 51) : + LA26 = self.input.LA(2) + if LA26 == 52: + LA26_26 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == IDENTIFIER: - LA25_27 = self.input.LA(3) + elif LA26 == 28 or LA26 == 29 or LA26 == 30 or LA26 == 31: + LA26_30 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == 28 or LA25 == 29 or LA25 == 30 or LA25 == 31: - LA25_28 = self.input.LA(3) + elif LA26 == 32: + LA26_31 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == 32: - LA25_29 = self.input.LA(3) + elif LA26 == 33: + LA26_32 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == 33: - LA25_30 = self.input.LA(3) + elif LA26 == 34: + LA26_33 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == 34: - LA25_31 = self.input.LA(3) + elif LA26 == 35: + LA26_34 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == 35: - LA25_32 = self.input.LA(3) + elif LA26 == 36: + LA26_35 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == 36: - LA25_33 = self.input.LA(3) + elif LA26 == 37: + LA26_36 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == 37: - LA25_34 = self.input.LA(3) + elif LA26 == 38: + LA26_37 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == 38: - LA25_35 = self.input.LA(3) + elif LA26 == 39: + LA26_38 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == 39: - LA25_36 = self.input.LA(3) + elif LA26 == 40: + LA26_39 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == 40: - LA25_37 = self.input.LA(3) + elif LA26 == 43 or LA26 == 44: + LA26_40 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == 43 or LA25 == 44: - LA25_38 = self.input.LA(3) + elif LA26 == 46: + LA26_41 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == 46: - LA25_39 = self.input.LA(3) + elif LA26 == IDENTIFIER: + LA26_42 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == 47 or LA25 == 48 or LA25 == 49 or LA25 == 50: - LA25_40 = self.input.LA(3) + elif LA26 == 47 or LA26 == 48 or LA26 == 49 or LA26 == 50: + LA26_43 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif (LA25_0 == 53) : - LA25 = self.input.LA(2) - if LA25 == 54: - LA25_44 = self.input.LA(3) + elif (LA26_0 == 53) : + LA26 = self.input.LA(2) + if LA26 == 54: + LA26_44 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == 51: - LA25_45 = self.input.LA(3) + elif LA26 == 51: + LA26_45 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == IDENTIFIER: - LA25_46 = self.input.LA(3) + elif LA26 == IDENTIFIER: + LA26_46 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == HEX_LITERAL or LA25 == OCTAL_LITERAL or LA25 == DECIMAL_LITERAL or LA25 == CHARACTER_LITERAL or LA25 == STRING_LITERAL or LA25 == FLOATING_POINT_LITERAL: - LA25_47 = self.input.LA(3) + elif LA26 == HEX_LITERAL or LA26 == OCTAL_LITERAL or LA26 == DECIMAL_LITERAL or LA26 == CHARACTER_LITERAL or LA26 == STRING_LITERAL or LA26 == FLOATING_POINT_LITERAL: + LA26_47 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == 61: - LA25_48 = self.input.LA(3) + elif LA26 == 61: + LA26_48 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == 62: - LA25_49 = self.input.LA(3) + elif LA26 == 62: + LA26_49 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == 55 or LA25 == 57 or LA25 == 58 or LA25 == 66 or LA25 == 67 or LA25 == 68: - LA25_50 = self.input.LA(3) + elif LA26 == 55 or LA26 == 57 or LA26 == 58 or LA26 == 66 or LA26 == 67 or LA26 == 68: + LA26_50 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - elif LA25 == 63: - LA25_51 = self.input.LA(3) + elif LA26 == 63: + LA26_51 = self.input.LA(3) - if (self.synpred50()) : - alt25 = 1 + if (self.synpred51()) : + alt26 = 1 - if alt25 == 1: + if alt26 == 1: # C.g:0:0: declarator_suffix - self.following.append(self.FOLLOW_declarator_suffix_in_direct_declarator743) + self.following.append(self.FOLLOW_declarator_suffix_in_direct_declarator729) self.declarator_suffix() self.following.pop() if self.failed: @@ -2348,202 +2432,202 @@ class CParser(Parser): else: - break #loop25 + break #loop26 - elif alt27 == 2: - # C.g:200:4: '(' declarator ')' ( declarator_suffix )+ - self.match(self.input, 51, self.FOLLOW_51_in_direct_declarator753) + elif alt28 == 2: + # C.g:205:4: '(' declarator ')' ( declarator_suffix )+ + self.match(self.input, 51, self.FOLLOW_51_in_direct_declarator735) if self.failed: return - self.following.append(self.FOLLOW_declarator_in_direct_declarator755) + self.following.append(self.FOLLOW_declarator_in_direct_declarator737) self.declarator() self.following.pop() if self.failed: return - self.match(self.input, 52, self.FOLLOW_52_in_direct_declarator757) + self.match(self.input, 52, self.FOLLOW_52_in_direct_declarator739) if self.failed: - return - # C.g:200:23: ( declarator_suffix )+ - cnt26 = 0 - while True: #loop26 - alt26 = 2 - LA26_0 = self.input.LA(1) - - if (LA26_0 == 51) : - LA26 = self.input.LA(2) - if LA26 == 52: - LA26_26 = self.input.LA(3) + return + # C.g:205:23: ( declarator_suffix )+ + cnt27 = 0 + while True: #loop27 + alt27 = 2 + LA27_0 = self.input.LA(1) - if (self.synpred52()) : - alt26 = 1 + if (LA27_0 == 51) : + LA27 = self.input.LA(2) + if LA27 == 52: + LA27_26 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == 28 or LA26 == 29 or LA26 == 30 or LA26 == 31: - LA26_27 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == 28 or LA27 == 29 or LA27 == 30 or LA27 == 31: + LA27_30 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == 32: - LA26_28 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == 32: + LA27_31 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == 33: - LA26_29 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == 33: + LA27_32 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == 34: - LA26_30 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == 34: + LA27_33 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == 35: - LA26_31 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == 35: + LA27_34 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == 36: - LA26_32 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == 36: + LA27_35 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == 37: - LA26_33 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == 37: + LA27_36 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == 38: - LA26_34 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == 38: + LA27_37 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == 39: - LA26_35 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == 39: + LA27_38 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == 40: - LA26_36 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == 40: + LA27_39 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == 43 or LA26 == 44: - LA26_37 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == 43 or LA27 == 44: + LA27_40 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == 46: - LA26_38 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == 46: + LA27_41 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == IDENTIFIER: - LA26_39 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == IDENTIFIER: + LA27_42 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == 47 or LA26 == 48 or LA26 == 49 or LA26 == 50: - LA26_40 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == 47 or LA27 == 48 or LA27 == 49 or LA27 == 50: + LA27_43 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif (LA26_0 == 53) : - LA26 = self.input.LA(2) - if LA26 == 54: - LA26_44 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif (LA27_0 == 53) : + LA27 = self.input.LA(2) + if LA27 == 54: + LA27_44 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == 51: - LA26_45 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == 51: + LA27_45 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == IDENTIFIER: - LA26_46 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == IDENTIFIER: + LA27_46 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == HEX_LITERAL or LA26 == OCTAL_LITERAL or LA26 == DECIMAL_LITERAL or LA26 == CHARACTER_LITERAL or LA26 == STRING_LITERAL or LA26 == FLOATING_POINT_LITERAL: - LA26_47 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == HEX_LITERAL or LA27 == OCTAL_LITERAL or LA27 == DECIMAL_LITERAL or LA27 == CHARACTER_LITERAL or LA27 == STRING_LITERAL or LA27 == FLOATING_POINT_LITERAL: + LA27_47 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == 61: - LA26_48 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == 61: + LA27_48 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == 62: - LA26_49 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == 62: + LA27_49 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == 55 or LA26 == 57 or LA26 == 58 or LA26 == 66 or LA26 == 67 or LA26 == 68: - LA26_50 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == 55 or LA27 == 57 or LA27 == 58 or LA27 == 66 or LA27 == 67 or LA27 == 68: + LA27_50 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - elif LA26 == 63: - LA26_51 = self.input.LA(3) - if (self.synpred52()) : - alt26 = 1 + elif LA27 == 63: + LA27_51 = self.input.LA(3) + if (self.synpred53()) : + alt27 = 1 - if alt26 == 1: + + if alt27 == 1: # C.g:0:0: declarator_suffix - self.following.append(self.FOLLOW_declarator_suffix_in_direct_declarator759) + self.following.append(self.FOLLOW_declarator_suffix_in_direct_declarator741) self.declarator_suffix() self.following.pop() if self.failed: @@ -2551,17 +2635,17 @@ class CParser(Parser): else: - if cnt26 >= 1: - break #loop26 + if cnt27 >= 1: + break #loop27 if self.backtracking > 0: self.failed = True return - eee = EarlyExitException(26, self.input) + eee = EarlyExitException(27, self.input) raise eee - cnt26 += 1 + cnt27 += 1 @@ -2574,8 +2658,6 @@ class CParser(Parser): if self.backtracking > 0: self.memoize(self.input, 23, direct_declarator_StartIndex) - self.Symbols_stack.pop() - pass return @@ -2584,7 +2666,7 @@ class CParser(Parser): # $ANTLR start declarator_suffix - # C.g:203:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' ); + # C.g:208:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' ); def declarator_suffix(self, ): declarator_suffix_StartIndex = self.input.index() @@ -2593,54 +2675,54 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 24): return - # C.g:204:2: ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' ) - alt28 = 5 - LA28_0 = self.input.LA(1) + # C.g:209:2: ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' ) + alt29 = 5 + LA29_0 = self.input.LA(1) - if (LA28_0 == 53) : - LA28_1 = self.input.LA(2) + if (LA29_0 == 53) : + LA29_1 = self.input.LA(2) - if (LA28_1 == 54) : - alt28 = 2 - elif ((IDENTIFIER <= LA28_1 <= FLOATING_POINT_LITERAL) or LA28_1 == 51 or LA28_1 == 55 or (57 <= LA28_1 <= 58) or (61 <= LA28_1 <= 63) or (66 <= LA28_1 <= 68)) : - alt28 = 1 + if (LA29_1 == 54) : + alt29 = 2 + elif ((IDENTIFIER <= LA29_1 <= FLOATING_POINT_LITERAL) or LA29_1 == 51 or LA29_1 == 55 or (57 <= LA29_1 <= 58) or (61 <= LA29_1 <= 63) or (66 <= LA29_1 <= 68)) : + alt29 = 1 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("203:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 28, 1, self.input) + nvae = NoViableAltException("208:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 29, 1, self.input) raise nvae - elif (LA28_0 == 51) : - LA28 = self.input.LA(2) - if LA28 == 52: - alt28 = 5 - elif LA28 == 28 or LA28 == 29 or LA28 == 30 or LA28 == 31 or LA28 == 32 or LA28 == 33 or LA28 == 34 or LA28 == 35 or LA28 == 36 or LA28 == 37 or LA28 == 38 or LA28 == 39 or LA28 == 40 or LA28 == 43 or LA28 == 44 or LA28 == 46 or LA28 == 47 or LA28 == 48 or LA28 == 49 or LA28 == 50: - alt28 = 3 - elif LA28 == IDENTIFIER: - LA28_24 = self.input.LA(3) - - if (self.synpred55()) : - alt28 = 3 - elif (self.synpred56()) : - alt28 = 4 + elif (LA29_0 == 51) : + LA29 = self.input.LA(2) + if LA29 == 52: + alt29 = 5 + elif LA29 == IDENTIFIER: + LA29_12 = self.input.LA(3) + + if (self.synpred56()) : + alt29 = 3 + elif (self.synpred57()) : + alt29 = 4 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("203:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 28, 24, self.input) + nvae = NoViableAltException("208:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 29, 12, self.input) raise nvae + elif LA29 == 28 or LA29 == 29 or LA29 == 30 or LA29 == 31 or LA29 == 32 or LA29 == 33 or LA29 == 34 or LA29 == 35 or LA29 == 36 or LA29 == 37 or LA29 == 38 or LA29 == 39 or LA29 == 40 or LA29 == 43 or LA29 == 44 or LA29 == 46 or LA29 == 47 or LA29 == 48 or LA29 == 49 or LA29 == 50: + alt29 = 3 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("203:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 28, 2, self.input) + nvae = NoViableAltException("208:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 29, 2, self.input) raise nvae @@ -2649,71 +2731,71 @@ class CParser(Parser): self.failed = True return - nvae = NoViableAltException("203:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 28, 0, self.input) + nvae = NoViableAltException("208:1: declarator_suffix : ( '[' constant_expression ']' | '[' ']' | '(' parameter_type_list ')' | '(' identifier_list ')' | '(' ')' );", 29, 0, self.input) raise nvae - if alt28 == 1: - # C.g:204:6: '[' constant_expression ']' - self.match(self.input, 53, self.FOLLOW_53_in_declarator_suffix773) + if alt29 == 1: + # C.g:209:6: '[' constant_expression ']' + self.match(self.input, 53, self.FOLLOW_53_in_declarator_suffix755) if self.failed: return - self.following.append(self.FOLLOW_constant_expression_in_declarator_suffix775) + self.following.append(self.FOLLOW_constant_expression_in_declarator_suffix757) self.constant_expression() self.following.pop() if self.failed: return - self.match(self.input, 54, self.FOLLOW_54_in_declarator_suffix777) + self.match(self.input, 54, self.FOLLOW_54_in_declarator_suffix759) if self.failed: return - elif alt28 == 2: - # C.g:205:9: '[' ']' - self.match(self.input, 53, self.FOLLOW_53_in_declarator_suffix787) + elif alt29 == 2: + # C.g:210:9: '[' ']' + self.match(self.input, 53, self.FOLLOW_53_in_declarator_suffix769) if self.failed: return - self.match(self.input, 54, self.FOLLOW_54_in_declarator_suffix789) + self.match(self.input, 54, self.FOLLOW_54_in_declarator_suffix771) if self.failed: return - elif alt28 == 3: - # C.g:206:9: '(' parameter_type_list ')' - self.match(self.input, 51, self.FOLLOW_51_in_declarator_suffix799) + elif alt29 == 3: + # C.g:211:9: '(' parameter_type_list ')' + self.match(self.input, 51, self.FOLLOW_51_in_declarator_suffix781) if self.failed: return - self.following.append(self.FOLLOW_parameter_type_list_in_declarator_suffix801) + self.following.append(self.FOLLOW_parameter_type_list_in_declarator_suffix783) self.parameter_type_list() self.following.pop() if self.failed: return - self.match(self.input, 52, self.FOLLOW_52_in_declarator_suffix803) + self.match(self.input, 52, self.FOLLOW_52_in_declarator_suffix785) if self.failed: return - elif alt28 == 4: - # C.g:207:9: '(' identifier_list ')' - self.match(self.input, 51, self.FOLLOW_51_in_declarator_suffix813) + elif alt29 == 4: + # C.g:212:9: '(' identifier_list ')' + self.match(self.input, 51, self.FOLLOW_51_in_declarator_suffix795) if self.failed: return - self.following.append(self.FOLLOW_identifier_list_in_declarator_suffix815) + self.following.append(self.FOLLOW_identifier_list_in_declarator_suffix797) self.identifier_list() self.following.pop() if self.failed: return - self.match(self.input, 52, self.FOLLOW_52_in_declarator_suffix817) + self.match(self.input, 52, self.FOLLOW_52_in_declarator_suffix799) if self.failed: return - elif alt28 == 5: - # C.g:208:9: '(' ')' - self.match(self.input, 51, self.FOLLOW_51_in_declarator_suffix827) + elif alt29 == 5: + # C.g:213:9: '(' ')' + self.match(self.input, 51, self.FOLLOW_51_in_declarator_suffix809) if self.failed: return - self.match(self.input, 52, self.FOLLOW_52_in_declarator_suffix829) + self.match(self.input, 52, self.FOLLOW_52_in_declarator_suffix811) if self.failed: return @@ -2734,7 +2816,7 @@ class CParser(Parser): # $ANTLR start pointer - # C.g:211:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | s= '*' ); + # C.g:216:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | s= '*' ); def pointer(self, ): pointer_StartIndex = self.input.index() @@ -2745,43 +2827,43 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 25): return - # C.g:212:2: ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | s= '*' ) - alt31 = 3 - LA31_0 = self.input.LA(1) + # C.g:217:2: ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | s= '*' ) + alt32 = 3 + LA32_0 = self.input.LA(1) - if (LA31_0 == 55) : - LA31 = self.input.LA(2) - if LA31 == 55: - LA31_2 = self.input.LA(3) + if (LA32_0 == 55) : + LA32 = self.input.LA(2) + if LA32 == 55: + LA32_2 = self.input.LA(3) - if (self.synpred60()) : - alt31 = 2 + if (self.synpred61()) : + alt32 = 2 elif (True) : - alt31 = 3 + alt32 = 3 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("211:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | s= '*' );", 31, 2, self.input) + nvae = NoViableAltException("216:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | s= '*' );", 32, 2, self.input) raise nvae - elif LA31 == EOF or LA31 == IDENTIFIER or LA31 == 24 or LA31 == 25 or LA31 == 26 or LA31 == 27 or LA31 == 28 or LA31 == 29 or LA31 == 30 or LA31 == 31 or LA31 == 32 or LA31 == 33 or LA31 == 34 or LA31 == 35 or LA31 == 36 or LA31 == 37 or LA31 == 38 or LA31 == 39 or LA31 == 40 or LA31 == 41 or LA31 == 43 or LA31 == 44 or LA31 == 45 or LA31 == 46 or LA31 == 51 or LA31 == 52 or LA31 == 53: - alt31 = 3 - elif LA31 == 47 or LA31 == 48 or LA31 == 49 or LA31 == 50: - LA31_18 = self.input.LA(3) + elif LA32 == EOF or LA32 == IDENTIFIER or LA32 == 24 or LA32 == 25 or LA32 == 26 or LA32 == 27 or LA32 == 28 or LA32 == 29 or LA32 == 30 or LA32 == 31 or LA32 == 32 or LA32 == 33 or LA32 == 34 or LA32 == 35 or LA32 == 36 or LA32 == 37 or LA32 == 38 or LA32 == 39 or LA32 == 40 or LA32 == 41 or LA32 == 43 or LA32 == 44 or LA32 == 45 or LA32 == 46 or LA32 == 51 or LA32 == 52 or LA32 == 53: + alt32 = 3 + elif LA32 == 47 or LA32 == 48 or LA32 == 49 or LA32 == 50: + LA32_18 = self.input.LA(3) - if (self.synpred59()) : - alt31 = 1 + if (self.synpred60()) : + alt32 = 1 elif (True) : - alt31 = 3 + alt32 = 3 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("211:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | s= '*' );", 31, 18, self.input) + nvae = NoViableAltException("216:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | s= '*' );", 32, 18, self.input) raise nvae @@ -2790,7 +2872,7 @@ class CParser(Parser): self.failed = True return - nvae = NoViableAltException("211:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | s= '*' );", 31, 1, self.input) + nvae = NoViableAltException("216:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | s= '*' );", 32, 1, self.input) raise nvae @@ -2799,33 +2881,33 @@ class CParser(Parser): self.failed = True return - nvae = NoViableAltException("211:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | s= '*' );", 31, 0, self.input) + nvae = NoViableAltException("216:1: pointer : ( '*' ( type_qualifier )+ ( pointer )? | '*' pointer | s= '*' );", 32, 0, self.input) raise nvae - if alt31 == 1: - # C.g:212:4: '*' ( type_qualifier )+ ( pointer )? - self.match(self.input, 55, self.FOLLOW_55_in_pointer840) + if alt32 == 1: + # C.g:217:4: '*' ( type_qualifier )+ ( pointer )? + self.match(self.input, 55, self.FOLLOW_55_in_pointer822) if self.failed: return - # C.g:212:8: ( type_qualifier )+ - cnt29 = 0 - while True: #loop29 - alt29 = 2 - LA29_0 = self.input.LA(1) + # C.g:217:8: ( type_qualifier )+ + cnt30 = 0 + while True: #loop30 + alt30 = 2 + LA30_0 = self.input.LA(1) - if ((47 <= LA29_0 <= 50)) : - LA29_17 = self.input.LA(2) + if ((47 <= LA30_0 <= 50)) : + LA30_17 = self.input.LA(2) - if (self.synpred57()) : - alt29 = 1 + if (self.synpred58()) : + alt30 = 1 - if alt29 == 1: + if alt30 == 1: # C.g:0:0: type_qualifier - self.following.append(self.FOLLOW_type_qualifier_in_pointer842) + self.following.append(self.FOLLOW_type_qualifier_in_pointer824) self.type_qualifier() self.following.pop() if self.failed: @@ -2833,31 +2915,31 @@ class CParser(Parser): else: - if cnt29 >= 1: - break #loop29 + if cnt30 >= 1: + break #loop30 if self.backtracking > 0: self.failed = True return - eee = EarlyExitException(29, self.input) + eee = EarlyExitException(30, self.input) raise eee - cnt29 += 1 + cnt30 += 1 - # C.g:212:24: ( pointer )? - alt30 = 2 - LA30_0 = self.input.LA(1) + # C.g:217:24: ( pointer )? + alt31 = 2 + LA31_0 = self.input.LA(1) - if (LA30_0 == 55) : - LA30_1 = self.input.LA(2) + if (LA31_0 == 55) : + LA31_1 = self.input.LA(2) - if (self.synpred58()) : - alt30 = 1 - if alt30 == 1: + if (self.synpred59()) : + alt31 = 1 + if alt31 == 1: # C.g:0:0: pointer - self.following.append(self.FOLLOW_pointer_in_pointer845) + self.following.append(self.FOLLOW_pointer_in_pointer827) self.pointer() self.following.pop() if self.failed: @@ -2867,22 +2949,22 @@ class CParser(Parser): - elif alt31 == 2: - # C.g:213:4: '*' pointer - self.match(self.input, 55, self.FOLLOW_55_in_pointer851) + elif alt32 == 2: + # C.g:218:4: '*' pointer + self.match(self.input, 55, self.FOLLOW_55_in_pointer833) if self.failed: return - self.following.append(self.FOLLOW_pointer_in_pointer853) + self.following.append(self.FOLLOW_pointer_in_pointer835) self.pointer() self.following.pop() if self.failed: return - elif alt31 == 3: - # C.g:214:4: s= '*' + elif alt32 == 3: + # C.g:219:4: s= '*' s = self.input.LT(1) - self.match(self.input, 55, self.FOLLOW_55_in_pointer860) + self.match(self.input, 55, self.FOLLOW_55_in_pointer842) if self.failed: return @@ -2903,7 +2985,7 @@ class CParser(Parser): # $ANTLR start parameter_type_list - # C.g:217:1: parameter_type_list : parameter_list ( ',' '...' )? ; + # C.g:222:1: parameter_type_list : parameter_list ( ',' '...' )? ; def parameter_type_list(self, ): parameter_type_list_StartIndex = self.input.index() @@ -2912,25 +2994,25 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 26): return - # C.g:218:2: ( parameter_list ( ',' '...' )? ) - # C.g:218:4: parameter_list ( ',' '...' )? - self.following.append(self.FOLLOW_parameter_list_in_parameter_type_list871) + # C.g:223:2: ( parameter_list ( ',' '...' )? ) + # C.g:223:4: parameter_list ( ',' '...' )? + self.following.append(self.FOLLOW_parameter_list_in_parameter_type_list853) self.parameter_list() self.following.pop() if self.failed: return - # C.g:218:19: ( ',' '...' )? - alt32 = 2 - LA32_0 = self.input.LA(1) + # C.g:223:19: ( ',' '...' )? + alt33 = 2 + LA33_0 = self.input.LA(1) - if (LA32_0 == 26) : - alt32 = 1 - if alt32 == 1: - # C.g:218:20: ',' '...' - self.match(self.input, 26, self.FOLLOW_26_in_parameter_type_list874) + if (LA33_0 == 26) : + alt33 = 1 + if alt33 == 1: + # C.g:223:20: ',' '...' + self.match(self.input, 26, self.FOLLOW_26_in_parameter_type_list856) if self.failed: return - self.match(self.input, 56, self.FOLLOW_56_in_parameter_type_list876) + self.match(self.input, 56, self.FOLLOW_56_in_parameter_type_list858) if self.failed: return @@ -2955,7 +3037,7 @@ class CParser(Parser): # $ANTLR start parameter_list - # C.g:221:1: parameter_list : parameter_declaration ( ',' parameter_declaration )* ; + # C.g:226:1: parameter_list : parameter_declaration ( ',' parameter_declaration )* ; def parameter_list(self, ): parameter_list_StartIndex = self.input.index() @@ -2964,33 +3046,33 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 27): return - # C.g:222:2: ( parameter_declaration ( ',' parameter_declaration )* ) - # C.g:222:4: parameter_declaration ( ',' parameter_declaration )* - self.following.append(self.FOLLOW_parameter_declaration_in_parameter_list889) + # C.g:227:2: ( parameter_declaration ( ',' parameter_declaration )* ) + # C.g:227:4: parameter_declaration ( ',' parameter_declaration )* + self.following.append(self.FOLLOW_parameter_declaration_in_parameter_list871) self.parameter_declaration() self.following.pop() if self.failed: return - # C.g:222:26: ( ',' parameter_declaration )* - while True: #loop33 - alt33 = 2 - LA33_0 = self.input.LA(1) + # C.g:227:26: ( ',' parameter_declaration )* + while True: #loop34 + alt34 = 2 + LA34_0 = self.input.LA(1) - if (LA33_0 == 26) : - LA33_1 = self.input.LA(2) + if (LA34_0 == 26) : + LA34_1 = self.input.LA(2) - if (LA33_1 == IDENTIFIER or (28 <= LA33_1 <= 40) or (43 <= LA33_1 <= 44) or (46 <= LA33_1 <= 50)) : - alt33 = 1 + if (LA34_1 == IDENTIFIER or (28 <= LA34_1 <= 40) or (43 <= LA34_1 <= 44) or (46 <= LA34_1 <= 50)) : + alt34 = 1 - if alt33 == 1: - # C.g:222:27: ',' parameter_declaration - self.match(self.input, 26, self.FOLLOW_26_in_parameter_list892) + if alt34 == 1: + # C.g:227:27: ',' parameter_declaration + self.match(self.input, 26, self.FOLLOW_26_in_parameter_list874) if self.failed: return - self.following.append(self.FOLLOW_parameter_declaration_in_parameter_list894) + self.following.append(self.FOLLOW_parameter_declaration_in_parameter_list876) self.parameter_declaration() self.following.pop() if self.failed: @@ -2998,7 +3080,7 @@ class CParser(Parser): else: - break #loop33 + break #loop34 @@ -3020,7 +3102,7 @@ class CParser(Parser): # $ANTLR start parameter_declaration - # C.g:225:1: parameter_declaration : declaration_specifiers ( declarator | abstract_declarator )+ ; + # C.g:230:1: parameter_declaration : declaration_specifiers ( declarator | abstract_declarator )+ ; def parameter_declaration(self, ): parameter_declaration_StartIndex = self.input.index() @@ -3029,76 +3111,76 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 28): return - # C.g:226:2: ( declaration_specifiers ( declarator | abstract_declarator )+ ) - # C.g:226:4: declaration_specifiers ( declarator | abstract_declarator )+ - self.following.append(self.FOLLOW_declaration_specifiers_in_parameter_declaration907) + # C.g:231:2: ( declaration_specifiers ( declarator | abstract_declarator )+ ) + # C.g:231:4: declaration_specifiers ( declarator | abstract_declarator )+ + self.following.append(self.FOLLOW_declaration_specifiers_in_parameter_declaration889) self.declaration_specifiers() self.following.pop() if self.failed: return - # C.g:226:27: ( declarator | abstract_declarator )+ - cnt34 = 0 - while True: #loop34 - alt34 = 3 - LA34 = self.input.LA(1) - if LA34 == 55: - LA34_4 = self.input.LA(2) + # C.g:231:27: ( declarator | abstract_declarator )+ + cnt35 = 0 + while True: #loop35 + alt35 = 3 + LA35 = self.input.LA(1) + if LA35 == 55: + LA35_4 = self.input.LA(2) - if (self.synpred63()) : - alt34 = 1 - elif (self.synpred64()) : - alt34 = 2 + if (self.synpred64()) : + alt35 = 1 + elif (self.synpred65()) : + alt35 = 2 - elif LA34 == IDENTIFIER: - alt34 = 1 - elif LA34 == 51: - LA34 = self.input.LA(2) - if LA34 == 28 or LA34 == 29 or LA34 == 30 or LA34 == 31 or LA34 == 32 or LA34 == 33 or LA34 == 34 or LA34 == 35 or LA34 == 36 or LA34 == 37 or LA34 == 38 or LA34 == 39 or LA34 == 40 or LA34 == 43 or LA34 == 44 or LA34 == 46 or LA34 == 47 or LA34 == 48 or LA34 == 49 or LA34 == 50 or LA34 == 52 or LA34 == 53: - alt34 = 2 - elif LA34 == IDENTIFIER: - LA34_29 = self.input.LA(3) + elif LA35 == IDENTIFIER: + alt35 = 1 + elif LA35 == 51: + LA35 = self.input.LA(2) + if LA35 == 28 or LA35 == 29 or LA35 == 30 or LA35 == 31 or LA35 == 32 or LA35 == 33 or LA35 == 34 or LA35 == 35 or LA35 == 36 or LA35 == 37 or LA35 == 38 or LA35 == 39 or LA35 == 40 or LA35 == 43 or LA35 == 44 or LA35 == 46 or LA35 == 47 or LA35 == 48 or LA35 == 49 or LA35 == 50 or LA35 == 52 or LA35 == 53: + alt35 = 2 + elif LA35 == 55: + LA35_17 = self.input.LA(3) - if (self.synpred63()) : - alt34 = 1 - elif (self.synpred64()) : - alt34 = 2 + if (self.synpred64()) : + alt35 = 1 + elif (self.synpred65()) : + alt35 = 2 - elif LA34 == 55: - LA34_31 = self.input.LA(3) + elif LA35 == 51: + LA35_18 = self.input.LA(3) - if (self.synpred63()) : - alt34 = 1 - elif (self.synpred64()) : - alt34 = 2 + if (self.synpred64()) : + alt35 = 1 + elif (self.synpred65()) : + alt35 = 2 - elif LA34 == 51: - LA34_32 = self.input.LA(3) + elif LA35 == IDENTIFIER: + LA35_32 = self.input.LA(3) - if (self.synpred63()) : - alt34 = 1 - elif (self.synpred64()) : - alt34 = 2 + if (self.synpred64()) : + alt35 = 1 + elif (self.synpred65()) : + alt35 = 2 - elif LA34 == 53: - alt34 = 2 + elif LA35 == 53: + alt35 = 2 - if alt34 == 1: - # C.g:226:28: declarator - self.following.append(self.FOLLOW_declarator_in_parameter_declaration910) + if alt35 == 1: + # C.g:231:28: declarator + self.following.append(self.FOLLOW_declarator_in_parameter_declaration892) self.declarator() self.following.pop() if self.failed: return - elif alt34 == 2: - # C.g:226:39: abstract_declarator - self.following.append(self.FOLLOW_abstract_declarator_in_parameter_declaration912) + elif alt35 == 2: + # C.g:231:39: abstract_declarator + self.following.append(self.FOLLOW_abstract_declarator_in_parameter_declaration894) self.abstract_declarator() self.following.pop() if self.failed: @@ -3106,17 +3188,17 @@ class CParser(Parser): else: - if cnt34 >= 1: - break #loop34 + if cnt35 >= 1: + break #loop35 if self.backtracking > 0: self.failed = True return - eee = EarlyExitException(34, self.input) + eee = EarlyExitException(35, self.input) raise eee - cnt34 += 1 + cnt35 += 1 @@ -3138,46 +3220,41 @@ class CParser(Parser): # $ANTLR start identifier_list - # C.g:229:1: identifier_list : i= IDENTIFIER ( ',' d= IDENTIFIER )* ; + # C.g:234:1: identifier_list : IDENTIFIER ( ',' IDENTIFIER )* ; def identifier_list(self, ): identifier_list_StartIndex = self.input.index() - i = None - d = None - try: try: if self.backtracking > 0 and self.alreadyParsedRule(self.input, 29): return - # C.g:230:2: (i= IDENTIFIER ( ',' d= IDENTIFIER )* ) - # C.g:230:4: i= IDENTIFIER ( ',' d= IDENTIFIER )* - i = self.input.LT(1) - self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_identifier_list927) + # C.g:235:2: ( IDENTIFIER ( ',' IDENTIFIER )* ) + # C.g:235:4: IDENTIFIER ( ',' IDENTIFIER )* + self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_identifier_list907) if self.failed: return - # C.g:231:2: ( ',' d= IDENTIFIER )* - while True: #loop35 - alt35 = 2 - LA35_0 = self.input.LA(1) + # C.g:236:2: ( ',' IDENTIFIER )* + while True: #loop36 + alt36 = 2 + LA36_0 = self.input.LA(1) - if (LA35_0 == 26) : - alt35 = 1 + if (LA36_0 == 26) : + alt36 = 1 - if alt35 == 1: - # C.g:231:3: ',' d= IDENTIFIER - self.match(self.input, 26, self.FOLLOW_26_in_identifier_list932) + if alt36 == 1: + # C.g:236:3: ',' IDENTIFIER + self.match(self.input, 26, self.FOLLOW_26_in_identifier_list911) if self.failed: return - d = self.input.LT(1) - self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_identifier_list936) + self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_identifier_list913) if self.failed: return else: - break #loop35 + break #loop36 @@ -3199,7 +3276,7 @@ class CParser(Parser): # $ANTLR start type_name - # C.g:234:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id ); + # C.g:239:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id ); def type_name(self, ): type_name_StartIndex = self.input.index() @@ -3208,25 +3285,25 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 30): return - # C.g:235:2: ( specifier_qualifier_list ( abstract_declarator )? | type_id ) - alt37 = 2 - LA37_0 = self.input.LA(1) + # C.g:240:2: ( specifier_qualifier_list ( abstract_declarator )? | type_id ) + alt38 = 2 + LA38_0 = self.input.LA(1) - if ((32 <= LA37_0 <= 40) or (43 <= LA37_0 <= 44) or (46 <= LA37_0 <= 50)) : - alt37 = 1 - elif (LA37_0 == IDENTIFIER) : - LA37_13 = self.input.LA(2) + if ((32 <= LA38_0 <= 40) or (43 <= LA38_0 <= 44) or (46 <= LA38_0 <= 50)) : + alt38 = 1 + elif (LA38_0 == IDENTIFIER) : + LA38_13 = self.input.LA(2) - if (self.synpred67()) : - alt37 = 1 + if (self.synpred68()) : + alt38 = 1 elif (True) : - alt37 = 2 + alt38 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("234:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );", 37, 13, self.input) + nvae = NoViableAltException("239:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );", 38, 13, self.input) raise nvae @@ -3235,26 +3312,26 @@ class CParser(Parser): self.failed = True return - nvae = NoViableAltException("234:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );", 37, 0, self.input) + nvae = NoViableAltException("239:1: type_name : ( specifier_qualifier_list ( abstract_declarator )? | type_id );", 38, 0, self.input) raise nvae - if alt37 == 1: - # C.g:235:4: specifier_qualifier_list ( abstract_declarator )? - self.following.append(self.FOLLOW_specifier_qualifier_list_in_type_name951) + if alt38 == 1: + # C.g:240:4: specifier_qualifier_list ( abstract_declarator )? + self.following.append(self.FOLLOW_specifier_qualifier_list_in_type_name926) self.specifier_qualifier_list() self.following.pop() if self.failed: return - # C.g:235:29: ( abstract_declarator )? - alt36 = 2 - LA36_0 = self.input.LA(1) + # C.g:240:29: ( abstract_declarator )? + alt37 = 2 + LA37_0 = self.input.LA(1) - if (LA36_0 == 51 or LA36_0 == 53 or LA36_0 == 55) : - alt36 = 1 - if alt36 == 1: + if (LA37_0 == 51 or LA37_0 == 53 or LA37_0 == 55) : + alt37 = 1 + if alt37 == 1: # C.g:0:0: abstract_declarator - self.following.append(self.FOLLOW_abstract_declarator_in_type_name953) + self.following.append(self.FOLLOW_abstract_declarator_in_type_name928) self.abstract_declarator() self.following.pop() if self.failed: @@ -3264,9 +3341,9 @@ class CParser(Parser): - elif alt37 == 2: - # C.g:236:4: type_id - self.following.append(self.FOLLOW_type_id_in_type_name959) + elif alt38 == 2: + # C.g:241:4: type_id + self.following.append(self.FOLLOW_type_id_in_type_name934) self.type_id() self.following.pop() if self.failed: @@ -3289,7 +3366,7 @@ class CParser(Parser): # $ANTLR start abstract_declarator - # C.g:239:1: abstract_declarator : ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator ); + # C.g:244:1: abstract_declarator : ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator ); def abstract_declarator(self, ): abstract_declarator_StartIndex = self.input.index() @@ -3298,171 +3375,171 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 31): return - # C.g:240:2: ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator ) - alt39 = 2 - LA39_0 = self.input.LA(1) + # C.g:245:2: ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator ) + alt40 = 2 + LA40_0 = self.input.LA(1) - if (LA39_0 == 55) : - alt39 = 1 - elif (LA39_0 == 51 or LA39_0 == 53) : - alt39 = 2 + if (LA40_0 == 55) : + alt40 = 1 + elif (LA40_0 == 51 or LA40_0 == 53) : + alt40 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("239:1: abstract_declarator : ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator );", 39, 0, self.input) + nvae = NoViableAltException("244:1: abstract_declarator : ( pointer ( direct_abstract_declarator )? | direct_abstract_declarator );", 40, 0, self.input) raise nvae - if alt39 == 1: - # C.g:240:4: pointer ( direct_abstract_declarator )? - self.following.append(self.FOLLOW_pointer_in_abstract_declarator970) + if alt40 == 1: + # C.g:245:4: pointer ( direct_abstract_declarator )? + self.following.append(self.FOLLOW_pointer_in_abstract_declarator945) self.pointer() self.following.pop() if self.failed: return - # C.g:240:12: ( direct_abstract_declarator )? - alt38 = 2 - LA38_0 = self.input.LA(1) - - if (LA38_0 == 51) : - LA38 = self.input.LA(2) - if LA38 == 52: - LA38_8 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 28 or LA38 == 29 or LA38 == 30 or LA38 == 31: - LA38_9 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 32: - LA38_10 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 33: - LA38_11 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 34: - LA38_12 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 35: - LA38_13 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 36: - LA38_14 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 37: - LA38_15 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 38: - LA38_16 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 39: - LA38_17 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 40: - LA38_18 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 43 or LA38 == 44: - LA38_19 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 46: - LA38_20 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == IDENTIFIER: - LA38_21 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 47 or LA38 == 48 or LA38 == 49 or LA38 == 50: - LA38_22 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 55: - LA38_23 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 51: - LA38_24 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 53: - LA38_25 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif (LA38_0 == 53) : - LA38 = self.input.LA(2) - if LA38 == 54: - LA38_26 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 51: - LA38_27 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == IDENTIFIER: - LA38_28 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == HEX_LITERAL or LA38 == OCTAL_LITERAL or LA38 == DECIMAL_LITERAL or LA38 == CHARACTER_LITERAL or LA38 == STRING_LITERAL or LA38 == FLOATING_POINT_LITERAL: - LA38_29 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 61: - LA38_30 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 62: - LA38_31 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 55 or LA38 == 57 or LA38 == 58 or LA38 == 66 or LA38 == 67 or LA38 == 68: - LA38_32 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - elif LA38 == 63: - LA38_33 = self.input.LA(3) - - if (self.synpred68()) : - alt38 = 1 - if alt38 == 1: + # C.g:245:12: ( direct_abstract_declarator )? + alt39 = 2 + LA39_0 = self.input.LA(1) + + if (LA39_0 == 51) : + LA39 = self.input.LA(2) + if LA39 == 52: + LA39_8 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 55: + LA39_9 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 51: + LA39_10 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 53: + LA39_11 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 28 or LA39 == 29 or LA39 == 30 or LA39 == 31: + LA39_12 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 32: + LA39_13 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 33: + LA39_14 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 34: + LA39_15 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 35: + LA39_16 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 36: + LA39_17 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 37: + LA39_18 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 38: + LA39_19 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 39: + LA39_20 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 40: + LA39_21 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 43 or LA39 == 44: + LA39_22 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 46: + LA39_23 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == IDENTIFIER: + LA39_24 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 47 or LA39 == 48 or LA39 == 49 or LA39 == 50: + LA39_25 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif (LA39_0 == 53) : + LA39 = self.input.LA(2) + if LA39 == 54: + LA39_26 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 51: + LA39_27 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == IDENTIFIER: + LA39_28 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == HEX_LITERAL or LA39 == OCTAL_LITERAL or LA39 == DECIMAL_LITERAL or LA39 == CHARACTER_LITERAL or LA39 == STRING_LITERAL or LA39 == FLOATING_POINT_LITERAL: + LA39_29 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 61: + LA39_30 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 62: + LA39_31 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 55 or LA39 == 57 or LA39 == 58 or LA39 == 66 or LA39 == 67 or LA39 == 68: + LA39_32 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + elif LA39 == 63: + LA39_33 = self.input.LA(3) + + if (self.synpred69()) : + alt39 = 1 + if alt39 == 1: # C.g:0:0: direct_abstract_declarator - self.following.append(self.FOLLOW_direct_abstract_declarator_in_abstract_declarator972) + self.following.append(self.FOLLOW_direct_abstract_declarator_in_abstract_declarator947) self.direct_abstract_declarator() self.following.pop() if self.failed: @@ -3472,9 +3549,9 @@ class CParser(Parser): - elif alt39 == 2: - # C.g:241:4: direct_abstract_declarator - self.following.append(self.FOLLOW_direct_abstract_declarator_in_abstract_declarator978) + elif alt40 == 2: + # C.g:246:4: direct_abstract_declarator + self.following.append(self.FOLLOW_direct_abstract_declarator_in_abstract_declarator953) self.direct_abstract_declarator() self.following.pop() if self.failed: @@ -3497,7 +3574,7 @@ class CParser(Parser): # $ANTLR start direct_abstract_declarator - # C.g:244:1: direct_abstract_declarator : ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )* ; + # C.g:249:1: direct_abstract_declarator : ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )* ; def direct_abstract_declarator(self, ): direct_abstract_declarator_StartIndex = self.input.index() @@ -3506,57 +3583,57 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 32): return - # C.g:245:2: ( ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )* ) - # C.g:245:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )* - # C.g:245:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix ) - alt40 = 2 - LA40_0 = self.input.LA(1) + # C.g:250:2: ( ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )* ) + # C.g:250:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix ) ( abstract_declarator_suffix )* + # C.g:250:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix ) + alt41 = 2 + LA41_0 = self.input.LA(1) - if (LA40_0 == 51) : - LA40_1 = self.input.LA(2) + if (LA41_0 == 51) : + LA41_1 = self.input.LA(2) - if (LA40_1 == IDENTIFIER or (28 <= LA40_1 <= 40) or (43 <= LA40_1 <= 44) or (46 <= LA40_1 <= 50) or LA40_1 == 52) : - alt40 = 2 - elif (LA40_1 == 51 or LA40_1 == 53 or LA40_1 == 55) : - alt40 = 1 + if (LA41_1 == IDENTIFIER or (28 <= LA41_1 <= 40) or (43 <= LA41_1 <= 44) or (46 <= LA41_1 <= 50) or LA41_1 == 52) : + alt41 = 2 + elif (LA41_1 == 51 or LA41_1 == 53 or LA41_1 == 55) : + alt41 = 1 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("245:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 40, 1, self.input) + nvae = NoViableAltException("250:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 41, 1, self.input) raise nvae - elif (LA40_0 == 53) : - alt40 = 2 + elif (LA41_0 == 53) : + alt41 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("245:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 40, 0, self.input) + nvae = NoViableAltException("250:4: ( '(' abstract_declarator ')' | abstract_declarator_suffix )", 41, 0, self.input) raise nvae - if alt40 == 1: - # C.g:245:6: '(' abstract_declarator ')' - self.match(self.input, 51, self.FOLLOW_51_in_direct_abstract_declarator991) + if alt41 == 1: + # C.g:250:6: '(' abstract_declarator ')' + self.match(self.input, 51, self.FOLLOW_51_in_direct_abstract_declarator966) if self.failed: return - self.following.append(self.FOLLOW_abstract_declarator_in_direct_abstract_declarator993) + self.following.append(self.FOLLOW_abstract_declarator_in_direct_abstract_declarator968) self.abstract_declarator() self.following.pop() if self.failed: return - self.match(self.input, 52, self.FOLLOW_52_in_direct_abstract_declarator995) + self.match(self.input, 52, self.FOLLOW_52_in_direct_abstract_declarator970) if self.failed: return - elif alt40 == 2: - # C.g:245:36: abstract_declarator_suffix - self.following.append(self.FOLLOW_abstract_declarator_suffix_in_direct_abstract_declarator999) + elif alt41 == 2: + # C.g:250:36: abstract_declarator_suffix + self.following.append(self.FOLLOW_abstract_declarator_suffix_in_direct_abstract_declarator974) self.abstract_declarator_suffix() self.following.pop() if self.failed: @@ -3564,183 +3641,183 @@ class CParser(Parser): - # C.g:245:65: ( abstract_declarator_suffix )* - while True: #loop41 - alt41 = 2 - LA41_0 = self.input.LA(1) + # C.g:250:65: ( abstract_declarator_suffix )* + while True: #loop42 + alt42 = 2 + LA42_0 = self.input.LA(1) - if (LA41_0 == 51) : - LA41 = self.input.LA(2) - if LA41 == 52: - LA41_8 = self.input.LA(3) + if (LA42_0 == 51) : + LA42 = self.input.LA(2) + if LA42 == 52: + LA42_8 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == 28 or LA41 == 29 or LA41 == 30 or LA41 == 31: - LA41_9 = self.input.LA(3) + elif LA42 == 28 or LA42 == 29 or LA42 == 30 or LA42 == 31: + LA42_12 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == 32: - LA41_10 = self.input.LA(3) + elif LA42 == 32: + LA42_13 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == 33: - LA41_11 = self.input.LA(3) + elif LA42 == 33: + LA42_14 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == 34: - LA41_12 = self.input.LA(3) + elif LA42 == 34: + LA42_15 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == 35: - LA41_13 = self.input.LA(3) + elif LA42 == 35: + LA42_16 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == 36: - LA41_14 = self.input.LA(3) + elif LA42 == 36: + LA42_17 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == 37: - LA41_15 = self.input.LA(3) + elif LA42 == 37: + LA42_18 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == 38: - LA41_16 = self.input.LA(3) + elif LA42 == 38: + LA42_19 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == 39: - LA41_17 = self.input.LA(3) + elif LA42 == 39: + LA42_20 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == 40: - LA41_18 = self.input.LA(3) + elif LA42 == 40: + LA42_21 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == 43 or LA41 == 44: - LA41_19 = self.input.LA(3) + elif LA42 == 43 or LA42 == 44: + LA42_22 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == 46: - LA41_20 = self.input.LA(3) + elif LA42 == 46: + LA42_23 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == IDENTIFIER: - LA41_21 = self.input.LA(3) + elif LA42 == IDENTIFIER: + LA42_24 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == 47 or LA41 == 48 or LA41 == 49 or LA41 == 50: - LA41_22 = self.input.LA(3) + elif LA42 == 47 or LA42 == 48 or LA42 == 49 or LA42 == 50: + LA42_25 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif (LA41_0 == 53) : - LA41 = self.input.LA(2) - if LA41 == 54: - LA41_26 = self.input.LA(3) + elif (LA42_0 == 53) : + LA42 = self.input.LA(2) + if LA42 == 54: + LA42_26 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == 51: - LA41_27 = self.input.LA(3) + elif LA42 == 51: + LA42_27 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == IDENTIFIER: - LA41_28 = self.input.LA(3) + elif LA42 == IDENTIFIER: + LA42_28 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == HEX_LITERAL or LA41 == OCTAL_LITERAL or LA41 == DECIMAL_LITERAL or LA41 == CHARACTER_LITERAL or LA41 == STRING_LITERAL or LA41 == FLOATING_POINT_LITERAL: - LA41_29 = self.input.LA(3) + elif LA42 == HEX_LITERAL or LA42 == OCTAL_LITERAL or LA42 == DECIMAL_LITERAL or LA42 == CHARACTER_LITERAL or LA42 == STRING_LITERAL or LA42 == FLOATING_POINT_LITERAL: + LA42_29 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == 61: - LA41_30 = self.input.LA(3) + elif LA42 == 61: + LA42_30 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == 62: - LA41_31 = self.input.LA(3) + elif LA42 == 62: + LA42_31 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == 55 or LA41 == 57 or LA41 == 58 or LA41 == 66 or LA41 == 67 or LA41 == 68: - LA41_32 = self.input.LA(3) + elif LA42 == 55 or LA42 == 57 or LA42 == 58 or LA42 == 66 or LA42 == 67 or LA42 == 68: + LA42_32 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - elif LA41 == 63: - LA41_33 = self.input.LA(3) + elif LA42 == 63: + LA42_33 = self.input.LA(3) - if (self.synpred71()) : - alt41 = 1 + if (self.synpred72()) : + alt42 = 1 - if alt41 == 1: + if alt42 == 1: # C.g:0:0: abstract_declarator_suffix - self.following.append(self.FOLLOW_abstract_declarator_suffix_in_direct_abstract_declarator1003) + self.following.append(self.FOLLOW_abstract_declarator_suffix_in_direct_abstract_declarator978) self.abstract_declarator_suffix() self.following.pop() if self.failed: @@ -3748,7 +3825,7 @@ class CParser(Parser): else: - break #loop41 + break #loop42 @@ -3770,7 +3847,7 @@ class CParser(Parser): # $ANTLR start abstract_declarator_suffix - # C.g:248:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' ); + # C.g:253:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' ); def abstract_declarator_suffix(self, ): abstract_declarator_suffix_StartIndex = self.input.index() @@ -3779,39 +3856,39 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 33): return - # C.g:249:2: ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' ) - alt42 = 4 - LA42_0 = self.input.LA(1) + # C.g:254:2: ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' ) + alt43 = 4 + LA43_0 = self.input.LA(1) - if (LA42_0 == 53) : - LA42_1 = self.input.LA(2) + if (LA43_0 == 53) : + LA43_1 = self.input.LA(2) - if (LA42_1 == 54) : - alt42 = 1 - elif ((IDENTIFIER <= LA42_1 <= FLOATING_POINT_LITERAL) or LA42_1 == 51 or LA42_1 == 55 or (57 <= LA42_1 <= 58) or (61 <= LA42_1 <= 63) or (66 <= LA42_1 <= 68)) : - alt42 = 2 + if (LA43_1 == 54) : + alt43 = 1 + elif ((IDENTIFIER <= LA43_1 <= FLOATING_POINT_LITERAL) or LA43_1 == 51 or LA43_1 == 55 or (57 <= LA43_1 <= 58) or (61 <= LA43_1 <= 63) or (66 <= LA43_1 <= 68)) : + alt43 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("248:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 42, 1, self.input) + nvae = NoViableAltException("253:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 43, 1, self.input) raise nvae - elif (LA42_0 == 51) : - LA42_2 = self.input.LA(2) + elif (LA43_0 == 51) : + LA43_2 = self.input.LA(2) - if (LA42_2 == 52) : - alt42 = 3 - elif (LA42_2 == IDENTIFIER or (28 <= LA42_2 <= 40) or (43 <= LA42_2 <= 44) or (46 <= LA42_2 <= 50)) : - alt42 = 4 + if (LA43_2 == 52) : + alt43 = 3 + elif (LA43_2 == IDENTIFIER or (28 <= LA43_2 <= 40) or (43 <= LA43_2 <= 44) or (46 <= LA43_2 <= 50)) : + alt43 = 4 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("248:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 42, 2, self.input) + nvae = NoViableAltException("253:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 43, 2, self.input) raise nvae @@ -3820,56 +3897,56 @@ class CParser(Parser): self.failed = True return - nvae = NoViableAltException("248:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 42, 0, self.input) + nvae = NoViableAltException("253:1: abstract_declarator_suffix : ( '[' ']' | '[' constant_expression ']' | '(' ')' | '(' parameter_type_list ')' );", 43, 0, self.input) raise nvae - if alt42 == 1: - # C.g:249:4: '[' ']' - self.match(self.input, 53, self.FOLLOW_53_in_abstract_declarator_suffix1015) + if alt43 == 1: + # C.g:254:4: '[' ']' + self.match(self.input, 53, self.FOLLOW_53_in_abstract_declarator_suffix990) if self.failed: return - self.match(self.input, 54, self.FOLLOW_54_in_abstract_declarator_suffix1017) + self.match(self.input, 54, self.FOLLOW_54_in_abstract_declarator_suffix992) if self.failed: return - elif alt42 == 2: - # C.g:250:4: '[' constant_expression ']' - self.match(self.input, 53, self.FOLLOW_53_in_abstract_declarator_suffix1022) + elif alt43 == 2: + # C.g:255:4: '[' constant_expression ']' + self.match(self.input, 53, self.FOLLOW_53_in_abstract_declarator_suffix997) if self.failed: return - self.following.append(self.FOLLOW_constant_expression_in_abstract_declarator_suffix1024) + self.following.append(self.FOLLOW_constant_expression_in_abstract_declarator_suffix999) self.constant_expression() self.following.pop() if self.failed: return - self.match(self.input, 54, self.FOLLOW_54_in_abstract_declarator_suffix1026) + self.match(self.input, 54, self.FOLLOW_54_in_abstract_declarator_suffix1001) if self.failed: return - elif alt42 == 3: - # C.g:251:4: '(' ')' - self.match(self.input, 51, self.FOLLOW_51_in_abstract_declarator_suffix1031) + elif alt43 == 3: + # C.g:256:4: '(' ')' + self.match(self.input, 51, self.FOLLOW_51_in_abstract_declarator_suffix1006) if self.failed: return - self.match(self.input, 52, self.FOLLOW_52_in_abstract_declarator_suffix1033) + self.match(self.input, 52, self.FOLLOW_52_in_abstract_declarator_suffix1008) if self.failed: return - elif alt42 == 4: - # C.g:252:4: '(' parameter_type_list ')' - self.match(self.input, 51, self.FOLLOW_51_in_abstract_declarator_suffix1038) + elif alt43 == 4: + # C.g:257:4: '(' parameter_type_list ')' + self.match(self.input, 51, self.FOLLOW_51_in_abstract_declarator_suffix1013) if self.failed: return - self.following.append(self.FOLLOW_parameter_type_list_in_abstract_declarator_suffix1040) + self.following.append(self.FOLLOW_parameter_type_list_in_abstract_declarator_suffix1015) self.parameter_type_list() self.following.pop() if self.failed: return - self.match(self.input, 52, self.FOLLOW_52_in_abstract_declarator_suffix1042) + self.match(self.input, 52, self.FOLLOW_52_in_abstract_declarator_suffix1017) if self.failed: return @@ -3890,7 +3967,7 @@ class CParser(Parser): # $ANTLR start initializer - # C.g:255:1: initializer : ( assignment_expression | '{' initializer_list ( ',' )? '}' ); + # C.g:260:1: initializer : ( assignment_expression | '{' initializer_list ( ',' )? '}' ); def initializer(self, ): initializer_StartIndex = self.input.index() @@ -3899,57 +3976,57 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 34): return - # C.g:257:2: ( assignment_expression | '{' initializer_list ( ',' )? '}' ) - alt44 = 2 - LA44_0 = self.input.LA(1) + # C.g:262:2: ( assignment_expression | '{' initializer_list ( ',' )? '}' ) + alt45 = 2 + LA45_0 = self.input.LA(1) - if ((IDENTIFIER <= LA44_0 <= FLOATING_POINT_LITERAL) or LA44_0 == 51 or LA44_0 == 55 or (57 <= LA44_0 <= 58) or (61 <= LA44_0 <= 63) or (66 <= LA44_0 <= 68)) : - alt44 = 1 - elif (LA44_0 == 41) : - alt44 = 2 + if ((IDENTIFIER <= LA45_0 <= FLOATING_POINT_LITERAL) or LA45_0 == 51 or LA45_0 == 55 or (57 <= LA45_0 <= 58) or (61 <= LA45_0 <= 63) or (66 <= LA45_0 <= 68)) : + alt45 = 1 + elif (LA45_0 == 41) : + alt45 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("255:1: initializer : ( assignment_expression | '{' initializer_list ( ',' )? '}' );", 44, 0, self.input) + nvae = NoViableAltException("260:1: initializer : ( assignment_expression | '{' initializer_list ( ',' )? '}' );", 45, 0, self.input) raise nvae - if alt44 == 1: - # C.g:257:4: assignment_expression - self.following.append(self.FOLLOW_assignment_expression_in_initializer1055) + if alt45 == 1: + # C.g:262:4: assignment_expression + self.following.append(self.FOLLOW_assignment_expression_in_initializer1030) self.assignment_expression() self.following.pop() if self.failed: return - elif alt44 == 2: - # C.g:258:4: '{' initializer_list ( ',' )? '}' - self.match(self.input, 41, self.FOLLOW_41_in_initializer1060) + elif alt45 == 2: + # C.g:263:4: '{' initializer_list ( ',' )? '}' + self.match(self.input, 41, self.FOLLOW_41_in_initializer1035) if self.failed: return - self.following.append(self.FOLLOW_initializer_list_in_initializer1062) + self.following.append(self.FOLLOW_initializer_list_in_initializer1037) self.initializer_list() self.following.pop() if self.failed: return - # C.g:258:25: ( ',' )? - alt43 = 2 - LA43_0 = self.input.LA(1) + # C.g:263:25: ( ',' )? + alt44 = 2 + LA44_0 = self.input.LA(1) - if (LA43_0 == 26) : - alt43 = 1 - if alt43 == 1: + if (LA44_0 == 26) : + alt44 = 1 + if alt44 == 1: # C.g:0:0: ',' - self.match(self.input, 26, self.FOLLOW_26_in_initializer1064) + self.match(self.input, 26, self.FOLLOW_26_in_initializer1039) if self.failed: return - self.match(self.input, 42, self.FOLLOW_42_in_initializer1067) + self.match(self.input, 42, self.FOLLOW_42_in_initializer1042) if self.failed: return @@ -3970,7 +4047,7 @@ class CParser(Parser): # $ANTLR start initializer_list - # C.g:261:1: initializer_list : initializer ( ',' initializer )* ; + # C.g:266:1: initializer_list : initializer ( ',' initializer )* ; def initializer_list(self, ): initializer_list_StartIndex = self.input.index() @@ -3979,33 +4056,33 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 35): return - # C.g:262:2: ( initializer ( ',' initializer )* ) - # C.g:262:4: initializer ( ',' initializer )* - self.following.append(self.FOLLOW_initializer_in_initializer_list1078) + # C.g:267:2: ( initializer ( ',' initializer )* ) + # C.g:267:4: initializer ( ',' initializer )* + self.following.append(self.FOLLOW_initializer_in_initializer_list1053) self.initializer() self.following.pop() if self.failed: return - # C.g:262:16: ( ',' initializer )* - while True: #loop45 - alt45 = 2 - LA45_0 = self.input.LA(1) + # C.g:267:16: ( ',' initializer )* + while True: #loop46 + alt46 = 2 + LA46_0 = self.input.LA(1) - if (LA45_0 == 26) : - LA45_1 = self.input.LA(2) + if (LA46_0 == 26) : + LA46_1 = self.input.LA(2) - if ((IDENTIFIER <= LA45_1 <= FLOATING_POINT_LITERAL) or LA45_1 == 41 or LA45_1 == 51 or LA45_1 == 55 or (57 <= LA45_1 <= 58) or (61 <= LA45_1 <= 63) or (66 <= LA45_1 <= 68)) : - alt45 = 1 + if ((IDENTIFIER <= LA46_1 <= FLOATING_POINT_LITERAL) or LA46_1 == 41 or LA46_1 == 51 or LA46_1 == 55 or (57 <= LA46_1 <= 58) or (61 <= LA46_1 <= 63) or (66 <= LA46_1 <= 68)) : + alt46 = 1 - if alt45 == 1: - # C.g:262:17: ',' initializer - self.match(self.input, 26, self.FOLLOW_26_in_initializer_list1081) + if alt46 == 1: + # C.g:267:17: ',' initializer + self.match(self.input, 26, self.FOLLOW_26_in_initializer_list1056) if self.failed: return - self.following.append(self.FOLLOW_initializer_in_initializer_list1083) + self.following.append(self.FOLLOW_initializer_in_initializer_list1058) self.initializer() self.following.pop() if self.failed: @@ -4013,7 +4090,7 @@ class CParser(Parser): else: - break #loop45 + break #loop46 @@ -4035,7 +4112,7 @@ class CParser(Parser): # $ANTLR start argument_expression_list - # C.g:267:1: argument_expression_list : assignment_expression ( ',' assignment_expression )* ; + # C.g:272:1: argument_expression_list : assignment_expression ( ',' assignment_expression )* ; def argument_expression_list(self, ): argument_expression_list_StartIndex = self.input.index() @@ -4044,28 +4121,28 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 36): return - # C.g:268:2: ( assignment_expression ( ',' assignment_expression )* ) - # C.g:268:6: assignment_expression ( ',' assignment_expression )* - self.following.append(self.FOLLOW_assignment_expression_in_argument_expression_list1101) + # C.g:273:2: ( assignment_expression ( ',' assignment_expression )* ) + # C.g:273:6: assignment_expression ( ',' assignment_expression )* + self.following.append(self.FOLLOW_assignment_expression_in_argument_expression_list1076) self.assignment_expression() self.following.pop() if self.failed: return - # C.g:268:28: ( ',' assignment_expression )* - while True: #loop46 - alt46 = 2 - LA46_0 = self.input.LA(1) + # C.g:273:28: ( ',' assignment_expression )* + while True: #loop47 + alt47 = 2 + LA47_0 = self.input.LA(1) - if (LA46_0 == 26) : - alt46 = 1 + if (LA47_0 == 26) : + alt47 = 1 - if alt46 == 1: - # C.g:268:29: ',' assignment_expression - self.match(self.input, 26, self.FOLLOW_26_in_argument_expression_list1104) + if alt47 == 1: + # C.g:273:29: ',' assignment_expression + self.match(self.input, 26, self.FOLLOW_26_in_argument_expression_list1079) if self.failed: return - self.following.append(self.FOLLOW_assignment_expression_in_argument_expression_list1106) + self.following.append(self.FOLLOW_assignment_expression_in_argument_expression_list1081) self.assignment_expression() self.following.pop() if self.failed: @@ -4073,7 +4150,7 @@ class CParser(Parser): else: - break #loop46 + break #loop47 @@ -4095,7 +4172,7 @@ class CParser(Parser): # $ANTLR start additive_expression - # C.g:271:1: additive_expression : ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )* ; + # C.g:276:1: additive_expression : ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )* ; def additive_expression(self, ): additive_expression_StartIndex = self.input.index() @@ -4104,11 +4181,11 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 37): return - # C.g:272:2: ( ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )* ) - # C.g:272:4: ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )* - # C.g:272:4: ( multiplicative_expression ) - # C.g:272:5: multiplicative_expression - self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1120) + # C.g:277:2: ( ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )* ) + # C.g:277:4: ( multiplicative_expression ) ( '+' multiplicative_expression | '-' multiplicative_expression )* + # C.g:277:4: ( multiplicative_expression ) + # C.g:277:5: multiplicative_expression + self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1095) self.multiplicative_expression() self.following.pop() if self.failed: @@ -4116,35 +4193,35 @@ class CParser(Parser): - # C.g:272:32: ( '+' multiplicative_expression | '-' multiplicative_expression )* - while True: #loop47 - alt47 = 3 - LA47_0 = self.input.LA(1) + # C.g:277:32: ( '+' multiplicative_expression | '-' multiplicative_expression )* + while True: #loop48 + alt48 = 3 + LA48_0 = self.input.LA(1) - if (LA47_0 == 57) : - alt47 = 1 - elif (LA47_0 == 58) : - alt47 = 2 + if (LA48_0 == 57) : + alt48 = 1 + elif (LA48_0 == 58) : + alt48 = 2 - if alt47 == 1: - # C.g:272:33: '+' multiplicative_expression - self.match(self.input, 57, self.FOLLOW_57_in_additive_expression1124) + if alt48 == 1: + # C.g:277:33: '+' multiplicative_expression + self.match(self.input, 57, self.FOLLOW_57_in_additive_expression1099) if self.failed: return - self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1126) + self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1101) self.multiplicative_expression() self.following.pop() if self.failed: return - elif alt47 == 2: - # C.g:272:65: '-' multiplicative_expression - self.match(self.input, 58, self.FOLLOW_58_in_additive_expression1130) + elif alt48 == 2: + # C.g:277:65: '-' multiplicative_expression + self.match(self.input, 58, self.FOLLOW_58_in_additive_expression1105) if self.failed: return - self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1132) + self.following.append(self.FOLLOW_multiplicative_expression_in_additive_expression1107) self.multiplicative_expression() self.following.pop() if self.failed: @@ -4152,7 +4229,7 @@ class CParser(Parser): else: - break #loop47 + break #loop48 @@ -4174,7 +4251,7 @@ class CParser(Parser): # $ANTLR start multiplicative_expression - # C.g:275:1: multiplicative_expression : ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )* ; + # C.g:280:1: multiplicative_expression : ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )* ; def multiplicative_expression(self, ): multiplicative_expression_StartIndex = self.input.index() @@ -4183,11 +4260,11 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 38): return - # C.g:276:2: ( ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )* ) - # C.g:276:4: ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )* - # C.g:276:4: ( cast_expression ) - # C.g:276:5: cast_expression - self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1146) + # C.g:281:2: ( ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )* ) + # C.g:281:4: ( cast_expression ) ( '*' cast_expression | '/' cast_expression | '%' cast_expression )* + # C.g:281:4: ( cast_expression ) + # C.g:281:5: cast_expression + self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1121) self.cast_expression() self.following.pop() if self.failed: @@ -4195,47 +4272,47 @@ class CParser(Parser): - # C.g:276:22: ( '*' cast_expression | '/' cast_expression | '%' cast_expression )* - while True: #loop48 - alt48 = 4 - LA48 = self.input.LA(1) - if LA48 == 55: - alt48 = 1 - elif LA48 == 59: - alt48 = 2 - elif LA48 == 60: - alt48 = 3 + # C.g:281:22: ( '*' cast_expression | '/' cast_expression | '%' cast_expression )* + while True: #loop49 + alt49 = 4 + LA49 = self.input.LA(1) + if LA49 == 55: + alt49 = 1 + elif LA49 == 59: + alt49 = 2 + elif LA49 == 60: + alt49 = 3 - if alt48 == 1: - # C.g:276:23: '*' cast_expression - self.match(self.input, 55, self.FOLLOW_55_in_multiplicative_expression1150) + if alt49 == 1: + # C.g:281:23: '*' cast_expression + self.match(self.input, 55, self.FOLLOW_55_in_multiplicative_expression1125) if self.failed: return - self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1152) + self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1127) self.cast_expression() self.following.pop() if self.failed: return - elif alt48 == 2: - # C.g:276:45: '/' cast_expression - self.match(self.input, 59, self.FOLLOW_59_in_multiplicative_expression1156) + elif alt49 == 2: + # C.g:281:45: '/' cast_expression + self.match(self.input, 59, self.FOLLOW_59_in_multiplicative_expression1131) if self.failed: return - self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1158) + self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1133) self.cast_expression() self.following.pop() if self.failed: return - elif alt48 == 3: - # C.g:276:67: '%' cast_expression - self.match(self.input, 60, self.FOLLOW_60_in_multiplicative_expression1162) + elif alt49 == 3: + # C.g:281:67: '%' cast_expression + self.match(self.input, 60, self.FOLLOW_60_in_multiplicative_expression1137) if self.failed: return - self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1164) + self.following.append(self.FOLLOW_cast_expression_in_multiplicative_expression1139) self.cast_expression() self.following.pop() if self.failed: @@ -4243,7 +4320,7 @@ class CParser(Parser): else: - break #loop48 + break #loop49 @@ -4265,7 +4342,7 @@ class CParser(Parser): # $ANTLR start cast_expression - # C.g:279:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression ); + # C.g:284:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression ); def cast_expression(self, ): cast_expression_StartIndex = self.input.index() @@ -4274,75 +4351,75 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 39): return - # C.g:280:2: ( '(' type_name ')' cast_expression | unary_expression ) - alt49 = 2 - LA49_0 = self.input.LA(1) + # C.g:285:2: ( '(' type_name ')' cast_expression | unary_expression ) + alt50 = 2 + LA50_0 = self.input.LA(1) - if (LA49_0 == 51) : - LA49 = self.input.LA(2) - if LA49 == IDENTIFIER: - LA49_8 = self.input.LA(3) + if (LA50_0 == 51) : + LA50 = self.input.LA(2) + if LA50 == 32 or LA50 == 33 or LA50 == 34 or LA50 == 35 or LA50 == 36 or LA50 == 37 or LA50 == 38 or LA50 == 39 or LA50 == 40 or LA50 == 43 or LA50 == 44 or LA50 == 46 or LA50 == 47 or LA50 == 48 or LA50 == 49 or LA50 == 50: + alt50 = 1 + elif LA50 == IDENTIFIER: + LA50_20 = self.input.LA(3) - if (self.synpred84()) : - alt49 = 1 + if (self.synpred85()) : + alt50 = 1 elif (True) : - alt49 = 2 + alt50 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("279:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 49, 8, self.input) + nvae = NoViableAltException("284:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 50, 20, self.input) raise nvae - elif LA49 == HEX_LITERAL or LA49 == OCTAL_LITERAL or LA49 == DECIMAL_LITERAL or LA49 == CHARACTER_LITERAL or LA49 == STRING_LITERAL or LA49 == FLOATING_POINT_LITERAL or LA49 == 51 or LA49 == 55 or LA49 == 57 or LA49 == 58 or LA49 == 61 or LA49 == 62 or LA49 == 63 or LA49 == 66 or LA49 == 67 or LA49 == 68: - alt49 = 2 - elif LA49 == 32 or LA49 == 33 or LA49 == 34 or LA49 == 35 or LA49 == 36 or LA49 == 37 or LA49 == 38 or LA49 == 39 or LA49 == 40 or LA49 == 43 or LA49 == 44 or LA49 == 46 or LA49 == 47 or LA49 == 48 or LA49 == 49 or LA49 == 50: - alt49 = 1 + elif LA50 == HEX_LITERAL or LA50 == OCTAL_LITERAL or LA50 == DECIMAL_LITERAL or LA50 == CHARACTER_LITERAL or LA50 == STRING_LITERAL or LA50 == FLOATING_POINT_LITERAL or LA50 == 51 or LA50 == 55 or LA50 == 57 or LA50 == 58 or LA50 == 61 or LA50 == 62 or LA50 == 63 or LA50 == 66 or LA50 == 67 or LA50 == 68: + alt50 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("279:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 49, 1, self.input) + nvae = NoViableAltException("284:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 50, 1, self.input) raise nvae - elif ((IDENTIFIER <= LA49_0 <= FLOATING_POINT_LITERAL) or LA49_0 == 55 or (57 <= LA49_0 <= 58) or (61 <= LA49_0 <= 63) or (66 <= LA49_0 <= 68)) : - alt49 = 2 + elif ((IDENTIFIER <= LA50_0 <= FLOATING_POINT_LITERAL) or LA50_0 == 55 or (57 <= LA50_0 <= 58) or (61 <= LA50_0 <= 63) or (66 <= LA50_0 <= 68)) : + alt50 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("279:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 49, 0, self.input) + nvae = NoViableAltException("284:1: cast_expression : ( '(' type_name ')' cast_expression | unary_expression );", 50, 0, self.input) raise nvae - if alt49 == 1: - # C.g:280:4: '(' type_name ')' cast_expression - self.match(self.input, 51, self.FOLLOW_51_in_cast_expression1177) + if alt50 == 1: + # C.g:285:4: '(' type_name ')' cast_expression + self.match(self.input, 51, self.FOLLOW_51_in_cast_expression1152) if self.failed: return - self.following.append(self.FOLLOW_type_name_in_cast_expression1179) + self.following.append(self.FOLLOW_type_name_in_cast_expression1154) self.type_name() self.following.pop() if self.failed: return - self.match(self.input, 52, self.FOLLOW_52_in_cast_expression1181) + self.match(self.input, 52, self.FOLLOW_52_in_cast_expression1156) if self.failed: return - self.following.append(self.FOLLOW_cast_expression_in_cast_expression1183) + self.following.append(self.FOLLOW_cast_expression_in_cast_expression1158) self.cast_expression() self.following.pop() if self.failed: return - elif alt49 == 2: - # C.g:281:4: unary_expression - self.following.append(self.FOLLOW_unary_expression_in_cast_expression1188) + elif alt50 == 2: + # C.g:286:4: unary_expression + self.following.append(self.FOLLOW_unary_expression_in_cast_expression1163) self.unary_expression() self.following.pop() if self.failed: @@ -4365,7 +4442,7 @@ class CParser(Parser): # $ANTLR start unary_expression - # C.g:284:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' ); + # C.g:289:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' ); def unary_expression(self, ): unary_expression_StartIndex = self.input.index() @@ -4374,44 +4451,44 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 40): return - # C.g:285:2: ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' ) - alt50 = 6 - LA50 = self.input.LA(1) - if LA50 == IDENTIFIER or LA50 == HEX_LITERAL or LA50 == OCTAL_LITERAL or LA50 == DECIMAL_LITERAL or LA50 == CHARACTER_LITERAL or LA50 == STRING_LITERAL or LA50 == FLOATING_POINT_LITERAL or LA50 == 51: - alt50 = 1 - elif LA50 == 61: - alt50 = 2 - elif LA50 == 62: - alt50 = 3 - elif LA50 == 55 or LA50 == 57 or LA50 == 58 or LA50 == 66 or LA50 == 67 or LA50 == 68: - alt50 = 4 - elif LA50 == 63: - LA50_7 = self.input.LA(2) - - if (LA50_7 == 51) : - LA50_8 = self.input.LA(3) - - if (self.synpred89()) : - alt50 = 5 + # C.g:290:2: ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' ) + alt51 = 6 + LA51 = self.input.LA(1) + if LA51 == IDENTIFIER or LA51 == HEX_LITERAL or LA51 == OCTAL_LITERAL or LA51 == DECIMAL_LITERAL or LA51 == CHARACTER_LITERAL or LA51 == STRING_LITERAL or LA51 == FLOATING_POINT_LITERAL or LA51 == 51: + alt51 = 1 + elif LA51 == 61: + alt51 = 2 + elif LA51 == 62: + alt51 = 3 + elif LA51 == 55 or LA51 == 57 or LA51 == 58 or LA51 == 66 or LA51 == 67 or LA51 == 68: + alt51 = 4 + elif LA51 == 63: + LA51_7 = self.input.LA(2) + + if (LA51_7 == 51) : + LA51_8 = self.input.LA(3) + + if (self.synpred90()) : + alt51 = 5 elif (True) : - alt50 = 6 + alt51 = 6 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("284:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 50, 8, self.input) + nvae = NoViableAltException("289:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 51, 8, self.input) raise nvae - elif ((IDENTIFIER <= LA50_7 <= FLOATING_POINT_LITERAL) or LA50_7 == 55 or (57 <= LA50_7 <= 58) or (61 <= LA50_7 <= 63) or (66 <= LA50_7 <= 68)) : - alt50 = 5 + elif ((IDENTIFIER <= LA51_7 <= FLOATING_POINT_LITERAL) or LA51_7 == 55 or (57 <= LA51_7 <= 58) or (61 <= LA51_7 <= 63) or (66 <= LA51_7 <= 68)) : + alt51 = 5 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("284:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 50, 7, self.input) + nvae = NoViableAltException("289:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 51, 7, self.input) raise nvae @@ -4420,83 +4497,83 @@ class CParser(Parser): self.failed = True return - nvae = NoViableAltException("284:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 50, 0, self.input) + nvae = NoViableAltException("289:1: unary_expression : ( postfix_expression | '++' unary_expression | '--' unary_expression | unary_operator cast_expression | 'sizeof' unary_expression | 'sizeof' '(' type_name ')' );", 51, 0, self.input) raise nvae - if alt50 == 1: - # C.g:285:4: postfix_expression - self.following.append(self.FOLLOW_postfix_expression_in_unary_expression1199) + if alt51 == 1: + # C.g:290:4: postfix_expression + self.following.append(self.FOLLOW_postfix_expression_in_unary_expression1174) self.postfix_expression() self.following.pop() if self.failed: return - elif alt50 == 2: - # C.g:286:4: '++' unary_expression - self.match(self.input, 61, self.FOLLOW_61_in_unary_expression1204) + elif alt51 == 2: + # C.g:291:4: '++' unary_expression + self.match(self.input, 61, self.FOLLOW_61_in_unary_expression1179) if self.failed: return - self.following.append(self.FOLLOW_unary_expression_in_unary_expression1206) + self.following.append(self.FOLLOW_unary_expression_in_unary_expression1181) self.unary_expression() self.following.pop() if self.failed: return - elif alt50 == 3: - # C.g:287:4: '--' unary_expression - self.match(self.input, 62, self.FOLLOW_62_in_unary_expression1211) + elif alt51 == 3: + # C.g:292:4: '--' unary_expression + self.match(self.input, 62, self.FOLLOW_62_in_unary_expression1186) if self.failed: return - self.following.append(self.FOLLOW_unary_expression_in_unary_expression1213) + self.following.append(self.FOLLOW_unary_expression_in_unary_expression1188) self.unary_expression() self.following.pop() if self.failed: return - elif alt50 == 4: - # C.g:288:4: unary_operator cast_expression - self.following.append(self.FOLLOW_unary_operator_in_unary_expression1218) + elif alt51 == 4: + # C.g:293:4: unary_operator cast_expression + self.following.append(self.FOLLOW_unary_operator_in_unary_expression1193) self.unary_operator() self.following.pop() if self.failed: return - self.following.append(self.FOLLOW_cast_expression_in_unary_expression1220) + self.following.append(self.FOLLOW_cast_expression_in_unary_expression1195) self.cast_expression() self.following.pop() if self.failed: return - elif alt50 == 5: - # C.g:289:4: 'sizeof' unary_expression - self.match(self.input, 63, self.FOLLOW_63_in_unary_expression1225) + elif alt51 == 5: + # C.g:294:4: 'sizeof' unary_expression + self.match(self.input, 63, self.FOLLOW_63_in_unary_expression1200) if self.failed: return - self.following.append(self.FOLLOW_unary_expression_in_unary_expression1227) + self.following.append(self.FOLLOW_unary_expression_in_unary_expression1202) self.unary_expression() self.following.pop() if self.failed: return - elif alt50 == 6: - # C.g:290:4: 'sizeof' '(' type_name ')' - self.match(self.input, 63, self.FOLLOW_63_in_unary_expression1232) + elif alt51 == 6: + # C.g:295:4: 'sizeof' '(' type_name ')' + self.match(self.input, 63, self.FOLLOW_63_in_unary_expression1207) if self.failed: return - self.match(self.input, 51, self.FOLLOW_51_in_unary_expression1234) + self.match(self.input, 51, self.FOLLOW_51_in_unary_expression1209) if self.failed: return - self.following.append(self.FOLLOW_type_name_in_unary_expression1236) + self.following.append(self.FOLLOW_type_name_in_unary_expression1211) self.type_name() self.following.pop() if self.failed: return - self.match(self.input, 52, self.FOLLOW_52_in_unary_expression1238) + self.match(self.input, 52, self.FOLLOW_52_in_unary_expression1213) if self.failed: return @@ -4517,144 +4594,149 @@ class CParser(Parser): # $ANTLR start postfix_expression - # C.g:293:1: postfix_expression : primary_expression ( '[' expression ']' | '(' ')' | '(' argument_expression_list ')' | '.' IDENTIFIER | '*' IDENTIFIER | '->' IDENTIFIER | '++' | '--' )* ; + # C.g:298:1: postfix_expression : p= primary_expression ( '[' expression ']' | '(' ')' | a= '(' c= argument_expression_list b= ')' | '.' IDENTIFIER | '*' IDENTIFIER | '->' IDENTIFIER | '++' | '--' )* ; def postfix_expression(self, ): postfix_expression_StartIndex = self.input.index() + a = None + b = None + try: try: if self.backtracking > 0 and self.alreadyParsedRule(self.input, 41): return - # C.g:294:2: ( primary_expression ( '[' expression ']' | '(' ')' | '(' argument_expression_list ')' | '.' IDENTIFIER | '*' IDENTIFIER | '->' IDENTIFIER | '++' | '--' )* ) - # C.g:294:6: primary_expression ( '[' expression ']' | '(' ')' | '(' argument_expression_list ')' | '.' IDENTIFIER | '*' IDENTIFIER | '->' IDENTIFIER | '++' | '--' )* - self.following.append(self.FOLLOW_primary_expression_in_postfix_expression1251) + # C.g:299:2: (p= primary_expression ( '[' expression ']' | '(' ')' | a= '(' c= argument_expression_list b= ')' | '.' IDENTIFIER | '*' IDENTIFIER | '->' IDENTIFIER | '++' | '--' )* ) + # C.g:299:6: p= primary_expression ( '[' expression ']' | '(' ')' | a= '(' c= argument_expression_list b= ')' | '.' IDENTIFIER | '*' IDENTIFIER | '->' IDENTIFIER | '++' | '--' )* + self.following.append(self.FOLLOW_primary_expression_in_postfix_expression1228) self.primary_expression() self.following.pop() if self.failed: return - # C.g:295:9: ( '[' expression ']' | '(' ')' | '(' argument_expression_list ')' | '.' IDENTIFIER | '*' IDENTIFIER | '->' IDENTIFIER | '++' | '--' )* - while True: #loop51 - alt51 = 9 - LA51 = self.input.LA(1) - if LA51 == 55: - LA51_1 = self.input.LA(2) + # C.g:300:9: ( '[' expression ']' | '(' ')' | a= '(' c= argument_expression_list b= ')' | '.' IDENTIFIER | '*' IDENTIFIER | '->' IDENTIFIER | '++' | '--' )* + while True: #loop52 + alt52 = 9 + LA52 = self.input.LA(1) + if LA52 == 55: + LA52_1 = self.input.LA(2) - if (LA51_1 == IDENTIFIER) : - LA51_29 = self.input.LA(3) + if (LA52_1 == IDENTIFIER) : + LA52_29 = self.input.LA(3) - if (self.synpred94()) : - alt51 = 5 + if (self.synpred95()) : + alt52 = 5 - elif LA51 == 53: - alt51 = 1 - elif LA51 == 51: - LA51_24 = self.input.LA(2) + elif LA52 == 53: + alt52 = 1 + elif LA52 == 51: + LA52_24 = self.input.LA(2) - if (LA51_24 == 52) : - alt51 = 2 - elif ((IDENTIFIER <= LA51_24 <= FLOATING_POINT_LITERAL) or LA51_24 == 51 or LA51_24 == 55 or (57 <= LA51_24 <= 58) or (61 <= LA51_24 <= 63) or (66 <= LA51_24 <= 68)) : - alt51 = 3 + if (LA52_24 == 52) : + alt52 = 2 + elif ((IDENTIFIER <= LA52_24 <= FLOATING_POINT_LITERAL) or LA52_24 == 51 or LA52_24 == 55 or (57 <= LA52_24 <= 58) or (61 <= LA52_24 <= 63) or (66 <= LA52_24 <= 68)) : + alt52 = 3 - elif LA51 == 64: - alt51 = 4 - elif LA51 == 65: - alt51 = 6 - elif LA51 == 61: - alt51 = 7 - elif LA51 == 62: - alt51 = 8 + elif LA52 == 64: + alt52 = 4 + elif LA52 == 65: + alt52 = 6 + elif LA52 == 61: + alt52 = 7 + elif LA52 == 62: + alt52 = 8 - if alt51 == 1: - # C.g:295:13: '[' expression ']' - self.match(self.input, 53, self.FOLLOW_53_in_postfix_expression1265) + if alt52 == 1: + # C.g:300:13: '[' expression ']' + self.match(self.input, 53, self.FOLLOW_53_in_postfix_expression1242) if self.failed: return - self.following.append(self.FOLLOW_expression_in_postfix_expression1267) + self.following.append(self.FOLLOW_expression_in_postfix_expression1244) self.expression() self.following.pop() if self.failed: return - self.match(self.input, 54, self.FOLLOW_54_in_postfix_expression1269) + self.match(self.input, 54, self.FOLLOW_54_in_postfix_expression1246) if self.failed: return - elif alt51 == 2: - # C.g:296:13: '(' ')' - self.match(self.input, 51, self.FOLLOW_51_in_postfix_expression1283) + elif alt52 == 2: + # C.g:301:13: '(' ')' + self.match(self.input, 51, self.FOLLOW_51_in_postfix_expression1260) if self.failed: return - self.match(self.input, 52, self.FOLLOW_52_in_postfix_expression1285) + self.match(self.input, 52, self.FOLLOW_52_in_postfix_expression1262) if self.failed: return - elif alt51 == 3: - # C.g:297:13: '(' argument_expression_list ')' - self.match(self.input, 51, self.FOLLOW_51_in_postfix_expression1299) + elif alt52 == 3: + # C.g:302:13: a= '(' c= argument_expression_list b= ')' + a = self.input.LT(1) + self.match(self.input, 51, self.FOLLOW_51_in_postfix_expression1278) if self.failed: return - self.following.append(self.FOLLOW_argument_expression_list_in_postfix_expression1301) + self.following.append(self.FOLLOW_argument_expression_list_in_postfix_expression1282) self.argument_expression_list() self.following.pop() if self.failed: return - self.match(self.input, 52, self.FOLLOW_52_in_postfix_expression1303) + b = self.input.LT(1) + self.match(self.input, 52, self.FOLLOW_52_in_postfix_expression1286) if self.failed: return - elif alt51 == 4: - # C.g:298:13: '.' IDENTIFIER - self.match(self.input, 64, self.FOLLOW_64_in_postfix_expression1317) + elif alt52 == 4: + # C.g:303:13: '.' IDENTIFIER + self.match(self.input, 64, self.FOLLOW_64_in_postfix_expression1301) if self.failed: return - self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1319) + self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1303) if self.failed: return - elif alt51 == 5: - # C.g:299:13: '*' IDENTIFIER - self.match(self.input, 55, self.FOLLOW_55_in_postfix_expression1333) + elif alt52 == 5: + # C.g:304:13: '*' IDENTIFIER + self.match(self.input, 55, self.FOLLOW_55_in_postfix_expression1317) if self.failed: return - self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1335) + self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1319) if self.failed: return - elif alt51 == 6: - # C.g:300:13: '->' IDENTIFIER - self.match(self.input, 65, self.FOLLOW_65_in_postfix_expression1349) + elif alt52 == 6: + # C.g:305:13: '->' IDENTIFIER + self.match(self.input, 65, self.FOLLOW_65_in_postfix_expression1333) if self.failed: return - self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1351) + self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_postfix_expression1335) if self.failed: return - elif alt51 == 7: - # C.g:301:13: '++' - self.match(self.input, 61, self.FOLLOW_61_in_postfix_expression1365) + elif alt52 == 7: + # C.g:306:13: '++' + self.match(self.input, 61, self.FOLLOW_61_in_postfix_expression1349) if self.failed: return - elif alt51 == 8: - # C.g:302:13: '--' - self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1379) + elif alt52 == 8: + # C.g:307:13: '--' + self.match(self.input, 62, self.FOLLOW_62_in_postfix_expression1363) if self.failed: return else: - break #loop51 + break #loop52 @@ -4676,7 +4758,7 @@ class CParser(Parser): # $ANTLR start unary_operator - # C.g:306:1: unary_operator : ( '&' | '*' | '+' | '-' | '~' | '!' ); + # C.g:311:1: unary_operator : ( '&' | '*' | '+' | '-' | '~' | '!' ); def unary_operator(self, ): unary_operator_StartIndex = self.input.index() @@ -4685,7 +4767,7 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 42): return - # C.g:307:2: ( '&' | '*' | '+' | '-' | '~' | '!' ) + # C.g:312:2: ( '&' | '*' | '+' | '-' | '~' | '!' ) # C.g: if self.input.LA(1) == 55 or (57 <= self.input.LA(1) <= 58) or (66 <= self.input.LA(1) <= 68): self.input.consume(); @@ -4723,7 +4805,7 @@ class CParser(Parser): # $ANTLR start primary_expression - # C.g:315:1: primary_expression : ( IDENTIFIER | constant | '(' expression ')' ); + # C.g:320:1: primary_expression : ( IDENTIFIER | constant | '(' expression ')' ); def primary_expression(self, ): primary_expression_StartIndex = self.input.index() @@ -4732,51 +4814,51 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 43): return - # C.g:316:2: ( IDENTIFIER | constant | '(' expression ')' ) - alt52 = 3 - LA52 = self.input.LA(1) - if LA52 == IDENTIFIER: - alt52 = 1 - elif LA52 == HEX_LITERAL or LA52 == OCTAL_LITERAL or LA52 == DECIMAL_LITERAL or LA52 == CHARACTER_LITERAL or LA52 == STRING_LITERAL or LA52 == FLOATING_POINT_LITERAL: - alt52 = 2 - elif LA52 == 51: - alt52 = 3 + # C.g:321:2: ( IDENTIFIER | constant | '(' expression ')' ) + alt53 = 3 + LA53 = self.input.LA(1) + if LA53 == IDENTIFIER: + alt53 = 1 + elif LA53 == HEX_LITERAL or LA53 == OCTAL_LITERAL or LA53 == DECIMAL_LITERAL or LA53 == CHARACTER_LITERAL or LA53 == STRING_LITERAL or LA53 == FLOATING_POINT_LITERAL: + alt53 = 2 + elif LA53 == 51: + alt53 = 3 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("315:1: primary_expression : ( IDENTIFIER | constant | '(' expression ')' );", 52, 0, self.input) + nvae = NoViableAltException("320:1: primary_expression : ( IDENTIFIER | constant | '(' expression ')' );", 53, 0, self.input) raise nvae - if alt52 == 1: - # C.g:316:4: IDENTIFIER - self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_primary_expression1437) + if alt53 == 1: + # C.g:321:4: IDENTIFIER + self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_primary_expression1421) if self.failed: return - elif alt52 == 2: - # C.g:317:4: constant - self.following.append(self.FOLLOW_constant_in_primary_expression1442) + elif alt53 == 2: + # C.g:322:4: constant + self.following.append(self.FOLLOW_constant_in_primary_expression1426) self.constant() self.following.pop() if self.failed: return - elif alt52 == 3: - # C.g:318:4: '(' expression ')' - self.match(self.input, 51, self.FOLLOW_51_in_primary_expression1447) + elif alt53 == 3: + # C.g:323:4: '(' expression ')' + self.match(self.input, 51, self.FOLLOW_51_in_primary_expression1431) if self.failed: return - self.following.append(self.FOLLOW_expression_in_primary_expression1449) + self.following.append(self.FOLLOW_expression_in_primary_expression1433) self.expression() self.following.pop() if self.failed: return - self.match(self.input, 52, self.FOLLOW_52_in_primary_expression1451) + self.match(self.input, 52, self.FOLLOW_52_in_primary_expression1435) if self.failed: return @@ -4797,7 +4879,7 @@ class CParser(Parser): # $ANTLR start constant - # C.g:321:1: constant : ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | STRING_LITERAL | FLOATING_POINT_LITERAL ); + # C.g:326:1: constant : ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | STRING_LITERAL | FLOATING_POINT_LITERAL ); def constant(self, ): constant_StartIndex = self.input.index() @@ -4806,7 +4888,7 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 44): return - # C.g:322:5: ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | STRING_LITERAL | FLOATING_POINT_LITERAL ) + # C.g:327:5: ( HEX_LITERAL | OCTAL_LITERAL | DECIMAL_LITERAL | CHARACTER_LITERAL | STRING_LITERAL | FLOATING_POINT_LITERAL ) # C.g: if (HEX_LITERAL <= self.input.LA(1) <= FLOATING_POINT_LITERAL): self.input.consume(); @@ -4842,51 +4924,61 @@ class CParser(Parser): # $ANTLR end constant + class expression_return(object): + def __init__(self): + self.start = None + self.stop = None + + # $ANTLR start expression - # C.g:332:1: expression : assignment_expression ( ',' assignment_expression )* ; + # C.g:337:1: expression : assignment_expression ( ',' assignment_expression )* ; def expression(self, ): + retval = self.expression_return() + retval.start = self.input.LT(1) expression_StartIndex = self.input.index() try: try: if self.backtracking > 0 and self.alreadyParsedRule(self.input, 45): - return + return retval - # C.g:333:2: ( assignment_expression ( ',' assignment_expression )* ) - # C.g:333:4: assignment_expression ( ',' assignment_expression )* - self.following.append(self.FOLLOW_assignment_expression_in_expression1529) + # C.g:338:2: ( assignment_expression ( ',' assignment_expression )* ) + # C.g:338:4: assignment_expression ( ',' assignment_expression )* + self.following.append(self.FOLLOW_assignment_expression_in_expression1513) self.assignment_expression() self.following.pop() if self.failed: - return - # C.g:333:26: ( ',' assignment_expression )* - while True: #loop53 - alt53 = 2 - LA53_0 = self.input.LA(1) + return retval + # C.g:338:26: ( ',' assignment_expression )* + while True: #loop54 + alt54 = 2 + LA54_0 = self.input.LA(1) - if (LA53_0 == 26) : - alt53 = 1 + if (LA54_0 == 26) : + alt54 = 1 - if alt53 == 1: - # C.g:333:27: ',' assignment_expression - self.match(self.input, 26, self.FOLLOW_26_in_expression1532) + if alt54 == 1: + # C.g:338:27: ',' assignment_expression + self.match(self.input, 26, self.FOLLOW_26_in_expression1516) if self.failed: - return - self.following.append(self.FOLLOW_assignment_expression_in_expression1534) + return retval + self.following.append(self.FOLLOW_assignment_expression_in_expression1518) self.assignment_expression() self.following.pop() if self.failed: - return + return retval else: - break #loop53 + break #loop54 + + retval.stop = self.input.LT(-1) except RecognitionException, re: @@ -4898,13 +4990,13 @@ class CParser(Parser): pass - return + return retval # $ANTLR end expression # $ANTLR start constant_expression - # C.g:336:1: constant_expression : conditional_expression ; + # C.g:341:1: constant_expression : conditional_expression ; def constant_expression(self, ): constant_expression_StartIndex = self.input.index() @@ -4913,9 +5005,9 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 46): return - # C.g:337:2: ( conditional_expression ) - # C.g:337:4: conditional_expression - self.following.append(self.FOLLOW_conditional_expression_in_constant_expression1547) + # C.g:342:2: ( conditional_expression ) + # C.g:342:4: conditional_expression + self.following.append(self.FOLLOW_conditional_expression_in_constant_expression1531) self.conditional_expression() self.following.pop() if self.failed: @@ -4939,7 +5031,7 @@ class CParser(Parser): # $ANTLR start assignment_expression - # C.g:340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression ); + # C.g:345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression ); def assignment_expression(self, ): assignment_expression_StartIndex = self.input.index() @@ -4948,499 +5040,499 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 47): return - # C.g:341:2: ( lvalue assignment_operator assignment_expression | conditional_expression ) - alt54 = 2 - LA54 = self.input.LA(1) - if LA54 == IDENTIFIER: - LA54 = self.input.LA(2) - if LA54 == 53: - LA54_8 = self.input.LA(3) - - if (self.synpred111()) : - alt54 = 1 + # C.g:346:2: ( lvalue assignment_operator assignment_expression | conditional_expression ) + alt55 = 2 + LA55 = self.input.LA(1) + if LA55 == IDENTIFIER: + LA55 = self.input.LA(2) + if LA55 == 53: + LA55_8 = self.input.LA(3) + + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 8, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 8, self.input) raise nvae - elif LA54 == 51: - LA54_9 = self.input.LA(3) + elif LA55 == 51: + LA55_9 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 9, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 9, self.input) raise nvae - elif LA54 == 64: - LA54_10 = self.input.LA(3) + elif LA55 == 64: + LA55_10 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 10, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 10, self.input) raise nvae - elif LA54 == 55: - LA54_11 = self.input.LA(3) + elif LA55 == 55: + LA55_11 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 11, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 11, self.input) raise nvae - elif LA54 == 65: - LA54_12 = self.input.LA(3) + elif LA55 == 65: + LA55_12 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 12, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 12, self.input) raise nvae - elif LA54 == 61: - LA54_13 = self.input.LA(3) + elif LA55 == 61: + LA55_13 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 13, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 13, self.input) raise nvae - elif LA54 == 62: - LA54_14 = self.input.LA(3) + elif LA55 == 62: + LA55_14 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 14, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 14, self.input) raise nvae - elif LA54 == 27 or LA54 == 69 or LA54 == 70 or LA54 == 71 or LA54 == 72 or LA54 == 73 or LA54 == 74 or LA54 == 75 or LA54 == 76 or LA54 == 77 or LA54 == 78: - alt54 = 1 - elif LA54 == EOF or LA54 == 25 or LA54 == 26 or LA54 == 42 or LA54 == 45 or LA54 == 52 or LA54 == 54 or LA54 == 57 or LA54 == 58 or LA54 == 59 or LA54 == 60 or LA54 == 66 or LA54 == 79 or LA54 == 80 or LA54 == 81 or LA54 == 82 or LA54 == 83 or LA54 == 84 or LA54 == 85 or LA54 == 86 or LA54 == 87 or LA54 == 88 or LA54 == 89 or LA54 == 90 or LA54 == 91: - alt54 = 2 + elif LA55 == EOF or LA55 == 24 or LA55 == 26 or LA55 == 42 or LA55 == 45 or LA55 == 52 or LA55 == 54 or LA55 == 57 or LA55 == 58 or LA55 == 59 or LA55 == 60 or LA55 == 66 or LA55 == 79 or LA55 == 80 or LA55 == 81 or LA55 == 82 or LA55 == 83 or LA55 == 84 or LA55 == 85 or LA55 == 86 or LA55 == 87 or LA55 == 88 or LA55 == 89 or LA55 == 90 or LA55 == 91: + alt55 = 2 + elif LA55 == 27 or LA55 == 69 or LA55 == 70 or LA55 == 71 or LA55 == 72 or LA55 == 73 or LA55 == 74 or LA55 == 75 or LA55 == 76 or LA55 == 77 or LA55 == 78: + alt55 = 1 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 1, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 1, self.input) raise nvae - elif LA54 == HEX_LITERAL or LA54 == OCTAL_LITERAL or LA54 == DECIMAL_LITERAL or LA54 == CHARACTER_LITERAL or LA54 == STRING_LITERAL or LA54 == FLOATING_POINT_LITERAL: - LA54 = self.input.LA(2) - if LA54 == 53: - LA54_36 = self.input.LA(3) + elif LA55 == HEX_LITERAL or LA55 == OCTAL_LITERAL or LA55 == DECIMAL_LITERAL or LA55 == CHARACTER_LITERAL or LA55 == STRING_LITERAL or LA55 == FLOATING_POINT_LITERAL: + LA55 = self.input.LA(2) + if LA55 == 53: + LA55_36 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 36, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 36, self.input) raise nvae - elif LA54 == 51: - LA54_37 = self.input.LA(3) + elif LA55 == 51: + LA55_37 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 37, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 37, self.input) raise nvae - elif LA54 == 64: - LA54_38 = self.input.LA(3) + elif LA55 == 64: + LA55_38 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 38, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 38, self.input) raise nvae - elif LA54 == 55: - LA54_39 = self.input.LA(3) + elif LA55 == 55: + LA55_39 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 39, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 39, self.input) raise nvae - elif LA54 == 65: - LA54_40 = self.input.LA(3) + elif LA55 == 65: + LA55_40 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 40, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 40, self.input) raise nvae - elif LA54 == 61: - LA54_41 = self.input.LA(3) + elif LA55 == 61: + LA55_41 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 41, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 41, self.input) raise nvae - elif LA54 == 62: - LA54_42 = self.input.LA(3) + elif LA55 == 62: + LA55_42 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 42, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 42, self.input) raise nvae - elif LA54 == EOF or LA54 == 25 or LA54 == 26 or LA54 == 42 or LA54 == 45 or LA54 == 52 or LA54 == 54 or LA54 == 57 or LA54 == 58 or LA54 == 59 or LA54 == 60 or LA54 == 66 or LA54 == 79 or LA54 == 80 or LA54 == 81 or LA54 == 82 or LA54 == 83 or LA54 == 84 or LA54 == 85 or LA54 == 86 or LA54 == 87 or LA54 == 88 or LA54 == 89 or LA54 == 90 or LA54 == 91: - alt54 = 2 - elif LA54 == 27 or LA54 == 69 or LA54 == 70 or LA54 == 71 or LA54 == 72 or LA54 == 73 or LA54 == 74 or LA54 == 75 or LA54 == 76 or LA54 == 77 or LA54 == 78: - alt54 = 1 + elif LA55 == 27 or LA55 == 69 or LA55 == 70 or LA55 == 71 or LA55 == 72 or LA55 == 73 or LA55 == 74 or LA55 == 75 or LA55 == 76 or LA55 == 77 or LA55 == 78: + alt55 = 1 + elif LA55 == EOF or LA55 == 24 or LA55 == 26 or LA55 == 42 or LA55 == 45 or LA55 == 52 or LA55 == 54 or LA55 == 57 or LA55 == 58 or LA55 == 59 or LA55 == 60 or LA55 == 66 or LA55 == 79 or LA55 == 80 or LA55 == 81 or LA55 == 82 or LA55 == 83 or LA55 == 84 or LA55 == 85 or LA55 == 86 or LA55 == 87 or LA55 == 88 or LA55 == 89 or LA55 == 90 or LA55 == 91: + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 2, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 2, self.input) raise nvae - elif LA54 == 51: - LA54 = self.input.LA(2) - if LA54 == IDENTIFIER: - LA54_64 = self.input.LA(3) + elif LA55 == 51: + LA55 = self.input.LA(2) + if LA55 == IDENTIFIER: + LA55_64 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 64, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 64, self.input) raise nvae - elif LA54 == HEX_LITERAL or LA54 == OCTAL_LITERAL or LA54 == DECIMAL_LITERAL or LA54 == CHARACTER_LITERAL or LA54 == STRING_LITERAL or LA54 == FLOATING_POINT_LITERAL: - LA54_65 = self.input.LA(3) + elif LA55 == HEX_LITERAL or LA55 == OCTAL_LITERAL or LA55 == DECIMAL_LITERAL or LA55 == CHARACTER_LITERAL or LA55 == STRING_LITERAL or LA55 == FLOATING_POINT_LITERAL: + LA55_65 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 65, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 65, self.input) raise nvae - elif LA54 == 51: - LA54_66 = self.input.LA(3) + elif LA55 == 51: + LA55_66 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 66, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 66, self.input) raise nvae - elif LA54 == 61: - LA54_67 = self.input.LA(3) + elif LA55 == 61: + LA55_67 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 67, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 67, self.input) raise nvae - elif LA54 == 62: - LA54_68 = self.input.LA(3) + elif LA55 == 62: + LA55_68 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 68, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 68, self.input) raise nvae - elif LA54 == 55 or LA54 == 57 or LA54 == 58 or LA54 == 66 or LA54 == 67 or LA54 == 68: - LA54_69 = self.input.LA(3) + elif LA55 == 55 or LA55 == 57 or LA55 == 58 or LA55 == 66 or LA55 == 67 or LA55 == 68: + LA55_69 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 69, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 69, self.input) raise nvae - elif LA54 == 63: - LA54_70 = self.input.LA(3) + elif LA55 == 63: + LA55_70 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 70, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 70, self.input) raise nvae - elif LA54 == 32 or LA54 == 33 or LA54 == 34 or LA54 == 35 or LA54 == 36 or LA54 == 37 or LA54 == 38 or LA54 == 39 or LA54 == 40 or LA54 == 43 or LA54 == 44 or LA54 == 46 or LA54 == 47 or LA54 == 48 or LA54 == 49 or LA54 == 50: - alt54 = 2 + elif LA55 == 32 or LA55 == 33 or LA55 == 34 or LA55 == 35 or LA55 == 36 or LA55 == 37 or LA55 == 38 or LA55 == 39 or LA55 == 40 or LA55 == 43 or LA55 == 44 or LA55 == 46 or LA55 == 47 or LA55 == 48 or LA55 == 49 or LA55 == 50: + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 3, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 3, self.input) raise nvae - elif LA54 == 61: - LA54 = self.input.LA(2) - if LA54 == IDENTIFIER: - LA54_83 = self.input.LA(3) + elif LA55 == 61: + LA55 = self.input.LA(2) + if LA55 == IDENTIFIER: + LA55_83 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 83, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 83, self.input) raise nvae - elif LA54 == HEX_LITERAL or LA54 == OCTAL_LITERAL or LA54 == DECIMAL_LITERAL or LA54 == CHARACTER_LITERAL or LA54 == STRING_LITERAL or LA54 == FLOATING_POINT_LITERAL: - LA54_84 = self.input.LA(3) + elif LA55 == HEX_LITERAL or LA55 == OCTAL_LITERAL or LA55 == DECIMAL_LITERAL or LA55 == CHARACTER_LITERAL or LA55 == STRING_LITERAL or LA55 == FLOATING_POINT_LITERAL: + LA55_84 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 84, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 84, self.input) raise nvae - elif LA54 == 51: - LA54_85 = self.input.LA(3) + elif LA55 == 51: + LA55_85 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 85, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 85, self.input) raise nvae - elif LA54 == 61: - LA54_86 = self.input.LA(3) + elif LA55 == 61: + LA55_86 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 86, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 86, self.input) raise nvae - elif LA54 == 62: - LA54_87 = self.input.LA(3) + elif LA55 == 62: + LA55_87 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 87, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 87, self.input) raise nvae - elif LA54 == 55 or LA54 == 57 or LA54 == 58 or LA54 == 66 or LA54 == 67 or LA54 == 68: - LA54_88 = self.input.LA(3) + elif LA55 == 55 or LA55 == 57 or LA55 == 58 or LA55 == 66 or LA55 == 67 or LA55 == 68: + LA55_88 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 88, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 88, self.input) raise nvae - elif LA54 == 63: - LA54_89 = self.input.LA(3) + elif LA55 == 63: + LA55_89 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 89, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 89, self.input) raise nvae @@ -5449,121 +5541,121 @@ class CParser(Parser): self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 4, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 4, self.input) raise nvae - elif LA54 == 62: - LA54 = self.input.LA(2) - if LA54 == IDENTIFIER: - LA54_90 = self.input.LA(3) + elif LA55 == 62: + LA55 = self.input.LA(2) + if LA55 == IDENTIFIER: + LA55_90 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 90, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 90, self.input) raise nvae - elif LA54 == HEX_LITERAL or LA54 == OCTAL_LITERAL or LA54 == DECIMAL_LITERAL or LA54 == CHARACTER_LITERAL or LA54 == STRING_LITERAL or LA54 == FLOATING_POINT_LITERAL: - LA54_91 = self.input.LA(3) + elif LA55 == HEX_LITERAL or LA55 == OCTAL_LITERAL or LA55 == DECIMAL_LITERAL or LA55 == CHARACTER_LITERAL or LA55 == STRING_LITERAL or LA55 == FLOATING_POINT_LITERAL: + LA55_91 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 91, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 91, self.input) raise nvae - elif LA54 == 51: - LA54_92 = self.input.LA(3) + elif LA55 == 51: + LA55_92 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 92, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 92, self.input) raise nvae - elif LA54 == 61: - LA54_93 = self.input.LA(3) + elif LA55 == 61: + LA55_93 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 93, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 93, self.input) raise nvae - elif LA54 == 62: - LA54_94 = self.input.LA(3) + elif LA55 == 62: + LA55_94 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 94, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 94, self.input) raise nvae - elif LA54 == 55 or LA54 == 57 or LA54 == 58 or LA54 == 66 or LA54 == 67 or LA54 == 68: - LA54_95 = self.input.LA(3) + elif LA55 == 55 or LA55 == 57 or LA55 == 58 or LA55 == 66 or LA55 == 67 or LA55 == 68: + LA55_95 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 95, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 95, self.input) raise nvae - elif LA54 == 63: - LA54_96 = self.input.LA(3) + elif LA55 == 63: + LA55_96 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 96, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 96, self.input) raise nvae @@ -5572,121 +5664,121 @@ class CParser(Parser): self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 5, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 5, self.input) raise nvae - elif LA54 == 55 or LA54 == 57 or LA54 == 58 or LA54 == 66 or LA54 == 67 or LA54 == 68: - LA54 = self.input.LA(2) - if LA54 == 51: - LA54_97 = self.input.LA(3) + elif LA55 == 55 or LA55 == 57 or LA55 == 58 or LA55 == 66 or LA55 == 67 or LA55 == 68: + LA55 = self.input.LA(2) + if LA55 == 51: + LA55_97 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 97, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 97, self.input) raise nvae - elif LA54 == IDENTIFIER: - LA54_98 = self.input.LA(3) + elif LA55 == IDENTIFIER: + LA55_98 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 98, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 98, self.input) raise nvae - elif LA54 == HEX_LITERAL or LA54 == OCTAL_LITERAL or LA54 == DECIMAL_LITERAL or LA54 == CHARACTER_LITERAL or LA54 == STRING_LITERAL or LA54 == FLOATING_POINT_LITERAL: - LA54_99 = self.input.LA(3) + elif LA55 == HEX_LITERAL or LA55 == OCTAL_LITERAL or LA55 == DECIMAL_LITERAL or LA55 == CHARACTER_LITERAL or LA55 == STRING_LITERAL or LA55 == FLOATING_POINT_LITERAL: + LA55_99 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 99, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 99, self.input) raise nvae - elif LA54 == 61: - LA54_100 = self.input.LA(3) + elif LA55 == 61: + LA55_100 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 100, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 100, self.input) raise nvae - elif LA54 == 62: - LA54_101 = self.input.LA(3) + elif LA55 == 62: + LA55_101 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 101, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 101, self.input) raise nvae - elif LA54 == 55 or LA54 == 57 or LA54 == 58 or LA54 == 66 or LA54 == 67 or LA54 == 68: - LA54_102 = self.input.LA(3) + elif LA55 == 55 or LA55 == 57 or LA55 == 58 or LA55 == 66 or LA55 == 67 or LA55 == 68: + LA55_102 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 102, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 102, self.input) raise nvae - elif LA54 == 63: - LA54_103 = self.input.LA(3) + elif LA55 == 63: + LA55_103 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 103, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 103, self.input) raise nvae @@ -5695,121 +5787,121 @@ class CParser(Parser): self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 6, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 6, self.input) raise nvae - elif LA54 == 63: - LA54 = self.input.LA(2) - if LA54 == 51: - LA54_104 = self.input.LA(3) + elif LA55 == 63: + LA55 = self.input.LA(2) + if LA55 == 51: + LA55_104 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 104, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 104, self.input) raise nvae - elif LA54 == IDENTIFIER: - LA54_105 = self.input.LA(3) + elif LA55 == IDENTIFIER: + LA55_105 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 105, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 105, self.input) raise nvae - elif LA54 == HEX_LITERAL or LA54 == OCTAL_LITERAL or LA54 == DECIMAL_LITERAL or LA54 == CHARACTER_LITERAL or LA54 == STRING_LITERAL or LA54 == FLOATING_POINT_LITERAL: - LA54_106 = self.input.LA(3) + elif LA55 == HEX_LITERAL or LA55 == OCTAL_LITERAL or LA55 == DECIMAL_LITERAL or LA55 == CHARACTER_LITERAL or LA55 == STRING_LITERAL or LA55 == FLOATING_POINT_LITERAL: + LA55_106 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 106, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 106, self.input) raise nvae - elif LA54 == 61: - LA54_107 = self.input.LA(3) + elif LA55 == 61: + LA55_107 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 107, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 107, self.input) raise nvae - elif LA54 == 62: - LA54_108 = self.input.LA(3) + elif LA55 == 62: + LA55_108 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 108, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 108, self.input) raise nvae - elif LA54 == 55 or LA54 == 57 or LA54 == 58 or LA54 == 66 or LA54 == 67 or LA54 == 68: - LA54_109 = self.input.LA(3) + elif LA55 == 55 or LA55 == 57 or LA55 == 58 or LA55 == 66 or LA55 == 67 or LA55 == 68: + LA55_109 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 109, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 109, self.input) raise nvae - elif LA54 == 63: - LA54_110 = self.input.LA(3) + elif LA55 == 63: + LA55_110 = self.input.LA(3) - if (self.synpred111()) : - alt54 = 1 + if (self.synpred112()) : + alt55 = 1 elif (True) : - alt54 = 2 + alt55 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 110, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 110, self.input) raise nvae @@ -5818,7 +5910,7 @@ class CParser(Parser): self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 7, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 7, self.input) raise nvae @@ -5827,32 +5919,32 @@ class CParser(Parser): self.failed = True return - nvae = NoViableAltException("340:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 54, 0, self.input) + nvae = NoViableAltException("345:1: assignment_expression : ( lvalue assignment_operator assignment_expression | conditional_expression );", 55, 0, self.input) raise nvae - if alt54 == 1: - # C.g:341:4: lvalue assignment_operator assignment_expression - self.following.append(self.FOLLOW_lvalue_in_assignment_expression1558) + if alt55 == 1: + # C.g:346:4: lvalue assignment_operator assignment_expression + self.following.append(self.FOLLOW_lvalue_in_assignment_expression1542) self.lvalue() self.following.pop() if self.failed: return - self.following.append(self.FOLLOW_assignment_operator_in_assignment_expression1560) + self.following.append(self.FOLLOW_assignment_operator_in_assignment_expression1544) self.assignment_operator() self.following.pop() if self.failed: return - self.following.append(self.FOLLOW_assignment_expression_in_assignment_expression1562) + self.following.append(self.FOLLOW_assignment_expression_in_assignment_expression1546) self.assignment_expression() self.following.pop() if self.failed: return - elif alt54 == 2: - # C.g:342:4: conditional_expression - self.following.append(self.FOLLOW_conditional_expression_in_assignment_expression1567) + elif alt55 == 2: + # C.g:347:4: conditional_expression + self.following.append(self.FOLLOW_conditional_expression_in_assignment_expression1551) self.conditional_expression() self.following.pop() if self.failed: @@ -5875,7 +5967,7 @@ class CParser(Parser): # $ANTLR start lvalue - # C.g:345:1: lvalue : unary_expression ; + # C.g:350:1: lvalue : unary_expression ; def lvalue(self, ): lvalue_StartIndex = self.input.index() @@ -5884,9 +5976,9 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 48): return - # C.g:346:2: ( unary_expression ) - # C.g:346:4: unary_expression - self.following.append(self.FOLLOW_unary_expression_in_lvalue1579) + # C.g:351:2: ( unary_expression ) + # C.g:351:4: unary_expression + self.following.append(self.FOLLOW_unary_expression_in_lvalue1563) self.unary_expression() self.following.pop() if self.failed: @@ -5910,7 +6002,7 @@ class CParser(Parser): # $ANTLR start assignment_operator - # C.g:349:1: assignment_operator : ( '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '&=' | '^=' | '|=' ); + # C.g:354:1: assignment_operator : ( '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '&=' | '^=' | '|=' ); def assignment_operator(self, ): assignment_operator_StartIndex = self.input.index() @@ -5919,7 +6011,7 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 49): return - # C.g:350:2: ( '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '&=' | '^=' | '|=' ) + # C.g:355:2: ( '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '&=' | '^=' | '|=' ) # C.g: if self.input.LA(1) == 27 or (69 <= self.input.LA(1) <= 78): self.input.consume(); @@ -5957,46 +6049,52 @@ class CParser(Parser): # $ANTLR start conditional_expression - # C.g:363:1: conditional_expression : logical_or_expression ( '?' expression ':' conditional_expression )? ; + # C.g:368:1: conditional_expression : e= logical_or_expression ( '?' expression ':' conditional_expression )? ; def conditional_expression(self, ): conditional_expression_StartIndex = self.input.index() + e = None + + try: try: if self.backtracking > 0 and self.alreadyParsedRule(self.input, 50): return - # C.g:364:2: ( logical_or_expression ( '?' expression ':' conditional_expression )? ) - # C.g:364:4: logical_or_expression ( '?' expression ':' conditional_expression )? - self.following.append(self.FOLLOW_logical_or_expression_in_conditional_expression1651) - self.logical_or_expression() + # C.g:369:2: (e= logical_or_expression ( '?' expression ':' conditional_expression )? ) + # C.g:369:4: e= logical_or_expression ( '?' expression ':' conditional_expression )? + self.following.append(self.FOLLOW_logical_or_expression_in_conditional_expression1637) + e = self.logical_or_expression() self.following.pop() if self.failed: return - # C.g:364:26: ( '?' expression ':' conditional_expression )? - alt55 = 2 - LA55_0 = self.input.LA(1) + # C.g:369:28: ( '?' expression ':' conditional_expression )? + alt56 = 2 + LA56_0 = self.input.LA(1) - if (LA55_0 == 79) : - alt55 = 1 - if alt55 == 1: - # C.g:364:27: '?' expression ':' conditional_expression - self.match(self.input, 79, self.FOLLOW_79_in_conditional_expression1654) + if (LA56_0 == 79) : + alt56 = 1 + if alt56 == 1: + # C.g:369:29: '?' expression ':' conditional_expression + self.match(self.input, 79, self.FOLLOW_79_in_conditional_expression1640) if self.failed: return - self.following.append(self.FOLLOW_expression_in_conditional_expression1656) + self.following.append(self.FOLLOW_expression_in_conditional_expression1642) self.expression() self.following.pop() if self.failed: return - self.match(self.input, 45, self.FOLLOW_45_in_conditional_expression1658) + self.match(self.input, 45, self.FOLLOW_45_in_conditional_expression1644) if self.failed: return - self.following.append(self.FOLLOW_conditional_expression_in_conditional_expression1660) + self.following.append(self.FOLLOW_conditional_expression_in_conditional_expression1646) self.conditional_expression() self.following.pop() if self.failed: return + if self.backtracking == 0: + self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop)) + @@ -6017,51 +6115,61 @@ class CParser(Parser): # $ANTLR end conditional_expression + class logical_or_expression_return(object): + def __init__(self): + self.start = None + self.stop = None + + # $ANTLR start logical_or_expression - # C.g:367:1: logical_or_expression : logical_and_expression ( '||' logical_and_expression )* ; + # C.g:372:1: logical_or_expression : logical_and_expression ( '||' logical_and_expression )* ; def logical_or_expression(self, ): + retval = self.logical_or_expression_return() + retval.start = self.input.LT(1) logical_or_expression_StartIndex = self.input.index() try: try: if self.backtracking > 0 and self.alreadyParsedRule(self.input, 51): - return + return retval - # C.g:368:2: ( logical_and_expression ( '||' logical_and_expression )* ) - # C.g:368:4: logical_and_expression ( '||' logical_and_expression )* - self.following.append(self.FOLLOW_logical_and_expression_in_logical_or_expression1673) + # C.g:373:2: ( logical_and_expression ( '||' logical_and_expression )* ) + # C.g:373:4: logical_and_expression ( '||' logical_and_expression )* + self.following.append(self.FOLLOW_logical_and_expression_in_logical_or_expression1661) self.logical_and_expression() self.following.pop() if self.failed: - return - # C.g:368:27: ( '||' logical_and_expression )* - while True: #loop56 - alt56 = 2 - LA56_0 = self.input.LA(1) + return retval + # C.g:373:27: ( '||' logical_and_expression )* + while True: #loop57 + alt57 = 2 + LA57_0 = self.input.LA(1) - if (LA56_0 == 80) : - alt56 = 1 + if (LA57_0 == 80) : + alt57 = 1 - if alt56 == 1: - # C.g:368:28: '||' logical_and_expression - self.match(self.input, 80, self.FOLLOW_80_in_logical_or_expression1676) + if alt57 == 1: + # C.g:373:28: '||' logical_and_expression + self.match(self.input, 80, self.FOLLOW_80_in_logical_or_expression1664) if self.failed: - return - self.following.append(self.FOLLOW_logical_and_expression_in_logical_or_expression1678) + return retval + self.following.append(self.FOLLOW_logical_and_expression_in_logical_or_expression1666) self.logical_and_expression() self.following.pop() if self.failed: - return + return retval else: - break #loop56 + break #loop57 + + retval.stop = self.input.LT(-1) except RecognitionException, re: @@ -6073,13 +6181,13 @@ class CParser(Parser): pass - return + return retval # $ANTLR end logical_or_expression # $ANTLR start logical_and_expression - # C.g:371:1: logical_and_expression : inclusive_or_expression ( '&&' inclusive_or_expression )* ; + # C.g:376:1: logical_and_expression : inclusive_or_expression ( '&&' inclusive_or_expression )* ; def logical_and_expression(self, ): logical_and_expression_StartIndex = self.input.index() @@ -6088,28 +6196,28 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 52): return - # C.g:372:2: ( inclusive_or_expression ( '&&' inclusive_or_expression )* ) - # C.g:372:4: inclusive_or_expression ( '&&' inclusive_or_expression )* - self.following.append(self.FOLLOW_inclusive_or_expression_in_logical_and_expression1691) + # C.g:377:2: ( inclusive_or_expression ( '&&' inclusive_or_expression )* ) + # C.g:377:4: inclusive_or_expression ( '&&' inclusive_or_expression )* + self.following.append(self.FOLLOW_inclusive_or_expression_in_logical_and_expression1679) self.inclusive_or_expression() self.following.pop() if self.failed: return - # C.g:372:28: ( '&&' inclusive_or_expression )* - while True: #loop57 - alt57 = 2 - LA57_0 = self.input.LA(1) + # C.g:377:28: ( '&&' inclusive_or_expression )* + while True: #loop58 + alt58 = 2 + LA58_0 = self.input.LA(1) - if (LA57_0 == 81) : - alt57 = 1 + if (LA58_0 == 81) : + alt58 = 1 - if alt57 == 1: - # C.g:372:29: '&&' inclusive_or_expression - self.match(self.input, 81, self.FOLLOW_81_in_logical_and_expression1694) + if alt58 == 1: + # C.g:377:29: '&&' inclusive_or_expression + self.match(self.input, 81, self.FOLLOW_81_in_logical_and_expression1682) if self.failed: return - self.following.append(self.FOLLOW_inclusive_or_expression_in_logical_and_expression1696) + self.following.append(self.FOLLOW_inclusive_or_expression_in_logical_and_expression1684) self.inclusive_or_expression() self.following.pop() if self.failed: @@ -6117,7 +6225,7 @@ class CParser(Parser): else: - break #loop57 + break #loop58 @@ -6139,7 +6247,7 @@ class CParser(Parser): # $ANTLR start inclusive_or_expression - # C.g:375:1: inclusive_or_expression : exclusive_or_expression ( '|' exclusive_or_expression )* ; + # C.g:380:1: inclusive_or_expression : exclusive_or_expression ( '|' exclusive_or_expression )* ; def inclusive_or_expression(self, ): inclusive_or_expression_StartIndex = self.input.index() @@ -6148,28 +6256,28 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 53): return - # C.g:376:2: ( exclusive_or_expression ( '|' exclusive_or_expression )* ) - # C.g:376:4: exclusive_or_expression ( '|' exclusive_or_expression )* - self.following.append(self.FOLLOW_exclusive_or_expression_in_inclusive_or_expression1709) + # C.g:381:2: ( exclusive_or_expression ( '|' exclusive_or_expression )* ) + # C.g:381:4: exclusive_or_expression ( '|' exclusive_or_expression )* + self.following.append(self.FOLLOW_exclusive_or_expression_in_inclusive_or_expression1697) self.exclusive_or_expression() self.following.pop() if self.failed: return - # C.g:376:28: ( '|' exclusive_or_expression )* - while True: #loop58 - alt58 = 2 - LA58_0 = self.input.LA(1) + # C.g:381:28: ( '|' exclusive_or_expression )* + while True: #loop59 + alt59 = 2 + LA59_0 = self.input.LA(1) - if (LA58_0 == 82) : - alt58 = 1 + if (LA59_0 == 82) : + alt59 = 1 - if alt58 == 1: - # C.g:376:29: '|' exclusive_or_expression - self.match(self.input, 82, self.FOLLOW_82_in_inclusive_or_expression1712) + if alt59 == 1: + # C.g:381:29: '|' exclusive_or_expression + self.match(self.input, 82, self.FOLLOW_82_in_inclusive_or_expression1700) if self.failed: return - self.following.append(self.FOLLOW_exclusive_or_expression_in_inclusive_or_expression1714) + self.following.append(self.FOLLOW_exclusive_or_expression_in_inclusive_or_expression1702) self.exclusive_or_expression() self.following.pop() if self.failed: @@ -6177,7 +6285,7 @@ class CParser(Parser): else: - break #loop58 + break #loop59 @@ -6199,7 +6307,7 @@ class CParser(Parser): # $ANTLR start exclusive_or_expression - # C.g:379:1: exclusive_or_expression : and_expression ( '^' and_expression )* ; + # C.g:384:1: exclusive_or_expression : and_expression ( '^' and_expression )* ; def exclusive_or_expression(self, ): exclusive_or_expression_StartIndex = self.input.index() @@ -6208,28 +6316,28 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 54): return - # C.g:380:2: ( and_expression ( '^' and_expression )* ) - # C.g:380:4: and_expression ( '^' and_expression )* - self.following.append(self.FOLLOW_and_expression_in_exclusive_or_expression1727) + # C.g:385:2: ( and_expression ( '^' and_expression )* ) + # C.g:385:4: and_expression ( '^' and_expression )* + self.following.append(self.FOLLOW_and_expression_in_exclusive_or_expression1715) self.and_expression() self.following.pop() if self.failed: return - # C.g:380:19: ( '^' and_expression )* - while True: #loop59 - alt59 = 2 - LA59_0 = self.input.LA(1) + # C.g:385:19: ( '^' and_expression )* + while True: #loop60 + alt60 = 2 + LA60_0 = self.input.LA(1) - if (LA59_0 == 83) : - alt59 = 1 + if (LA60_0 == 83) : + alt60 = 1 - if alt59 == 1: - # C.g:380:20: '^' and_expression - self.match(self.input, 83, self.FOLLOW_83_in_exclusive_or_expression1730) + if alt60 == 1: + # C.g:385:20: '^' and_expression + self.match(self.input, 83, self.FOLLOW_83_in_exclusive_or_expression1718) if self.failed: return - self.following.append(self.FOLLOW_and_expression_in_exclusive_or_expression1732) + self.following.append(self.FOLLOW_and_expression_in_exclusive_or_expression1720) self.and_expression() self.following.pop() if self.failed: @@ -6237,7 +6345,7 @@ class CParser(Parser): else: - break #loop59 + break #loop60 @@ -6259,7 +6367,7 @@ class CParser(Parser): # $ANTLR start and_expression - # C.g:383:1: and_expression : equality_expression ( '&' equality_expression )* ; + # C.g:388:1: and_expression : equality_expression ( '&' equality_expression )* ; def and_expression(self, ): and_expression_StartIndex = self.input.index() @@ -6268,28 +6376,28 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 55): return - # C.g:384:2: ( equality_expression ( '&' equality_expression )* ) - # C.g:384:4: equality_expression ( '&' equality_expression )* - self.following.append(self.FOLLOW_equality_expression_in_and_expression1745) + # C.g:389:2: ( equality_expression ( '&' equality_expression )* ) + # C.g:389:4: equality_expression ( '&' equality_expression )* + self.following.append(self.FOLLOW_equality_expression_in_and_expression1733) self.equality_expression() self.following.pop() if self.failed: return - # C.g:384:24: ( '&' equality_expression )* - while True: #loop60 - alt60 = 2 - LA60_0 = self.input.LA(1) + # C.g:389:24: ( '&' equality_expression )* + while True: #loop61 + alt61 = 2 + LA61_0 = self.input.LA(1) - if (LA60_0 == 66) : - alt60 = 1 + if (LA61_0 == 66) : + alt61 = 1 - if alt60 == 1: - # C.g:384:25: '&' equality_expression - self.match(self.input, 66, self.FOLLOW_66_in_and_expression1748) + if alt61 == 1: + # C.g:389:25: '&' equality_expression + self.match(self.input, 66, self.FOLLOW_66_in_and_expression1736) if self.failed: return - self.following.append(self.FOLLOW_equality_expression_in_and_expression1750) + self.following.append(self.FOLLOW_equality_expression_in_and_expression1738) self.equality_expression() self.following.pop() if self.failed: @@ -6297,7 +6405,7 @@ class CParser(Parser): else: - break #loop60 + break #loop61 @@ -6319,7 +6427,7 @@ class CParser(Parser): # $ANTLR start equality_expression - # C.g:386:1: equality_expression : relational_expression ( ( '==' | '!=' ) relational_expression )* ; + # C.g:391:1: equality_expression : relational_expression ( ( '==' | '!=' ) relational_expression )* ; def equality_expression(self, ): equality_expression_StartIndex = self.input.index() @@ -6328,24 +6436,24 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 56): return - # C.g:387:2: ( relational_expression ( ( '==' | '!=' ) relational_expression )* ) - # C.g:387:4: relational_expression ( ( '==' | '!=' ) relational_expression )* - self.following.append(self.FOLLOW_relational_expression_in_equality_expression1762) + # C.g:392:2: ( relational_expression ( ( '==' | '!=' ) relational_expression )* ) + # C.g:392:4: relational_expression ( ( '==' | '!=' ) relational_expression )* + self.following.append(self.FOLLOW_relational_expression_in_equality_expression1750) self.relational_expression() self.following.pop() if self.failed: return - # C.g:387:26: ( ( '==' | '!=' ) relational_expression )* - while True: #loop61 - alt61 = 2 - LA61_0 = self.input.LA(1) + # C.g:392:26: ( ( '==' | '!=' ) relational_expression )* + while True: #loop62 + alt62 = 2 + LA62_0 = self.input.LA(1) - if ((84 <= LA61_0 <= 85)) : - alt61 = 1 + if ((84 <= LA62_0 <= 85)) : + alt62 = 1 - if alt61 == 1: - # C.g:387:27: ( '==' | '!=' ) relational_expression + if alt62 == 1: + # C.g:392:27: ( '==' | '!=' ) relational_expression if (84 <= self.input.LA(1) <= 85): self.input.consume(); self.errorRecovery = False @@ -6358,12 +6466,12 @@ class CParser(Parser): mse = MismatchedSetException(None, self.input) self.recoverFromMismatchedSet( - self.input, mse, self.FOLLOW_set_in_equality_expression1765 + self.input, mse, self.FOLLOW_set_in_equality_expression1753 ) raise mse - self.following.append(self.FOLLOW_relational_expression_in_equality_expression1771) + self.following.append(self.FOLLOW_relational_expression_in_equality_expression1759) self.relational_expression() self.following.pop() if self.failed: @@ -6371,7 +6479,7 @@ class CParser(Parser): else: - break #loop61 + break #loop62 @@ -6393,7 +6501,7 @@ class CParser(Parser): # $ANTLR start relational_expression - # C.g:390:1: relational_expression : shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )* ; + # C.g:395:1: relational_expression : shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )* ; def relational_expression(self, ): relational_expression_StartIndex = self.input.index() @@ -6402,24 +6510,24 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 57): return - # C.g:391:2: ( shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )* ) - # C.g:391:4: shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )* - self.following.append(self.FOLLOW_shift_expression_in_relational_expression1784) + # C.g:396:2: ( shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )* ) + # C.g:396:4: shift_expression ( ( '<' | '>' | '<=' | '>=' ) shift_expression )* + self.following.append(self.FOLLOW_shift_expression_in_relational_expression1773) self.shift_expression() self.following.pop() if self.failed: return - # C.g:391:21: ( ( '<' | '>' | '<=' | '>=' ) shift_expression )* - while True: #loop62 - alt62 = 2 - LA62_0 = self.input.LA(1) + # C.g:396:21: ( ( '<' | '>' | '<=' | '>=' ) shift_expression )* + while True: #loop63 + alt63 = 2 + LA63_0 = self.input.LA(1) - if ((86 <= LA62_0 <= 89)) : - alt62 = 1 + if ((86 <= LA63_0 <= 89)) : + alt63 = 1 - if alt62 == 1: - # C.g:391:22: ( '<' | '>' | '<=' | '>=' ) shift_expression + if alt63 == 1: + # C.g:396:22: ( '<' | '>' | '<=' | '>=' ) shift_expression if (86 <= self.input.LA(1) <= 89): self.input.consume(); self.errorRecovery = False @@ -6432,12 +6540,12 @@ class CParser(Parser): mse = MismatchedSetException(None, self.input) self.recoverFromMismatchedSet( - self.input, mse, self.FOLLOW_set_in_relational_expression1787 + self.input, mse, self.FOLLOW_set_in_relational_expression1776 ) raise mse - self.following.append(self.FOLLOW_shift_expression_in_relational_expression1797) + self.following.append(self.FOLLOW_shift_expression_in_relational_expression1786) self.shift_expression() self.following.pop() if self.failed: @@ -6445,7 +6553,7 @@ class CParser(Parser): else: - break #loop62 + break #loop63 @@ -6467,7 +6575,7 @@ class CParser(Parser): # $ANTLR start shift_expression - # C.g:394:1: shift_expression : additive_expression ( ( '<<' | '>>' ) additive_expression )* ; + # C.g:399:1: shift_expression : additive_expression ( ( '<<' | '>>' ) additive_expression )* ; def shift_expression(self, ): shift_expression_StartIndex = self.input.index() @@ -6476,24 +6584,24 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 58): return - # C.g:395:2: ( additive_expression ( ( '<<' | '>>' ) additive_expression )* ) - # C.g:395:4: additive_expression ( ( '<<' | '>>' ) additive_expression )* - self.following.append(self.FOLLOW_additive_expression_in_shift_expression1810) + # C.g:400:2: ( additive_expression ( ( '<<' | '>>' ) additive_expression )* ) + # C.g:400:4: additive_expression ( ( '<<' | '>>' ) additive_expression )* + self.following.append(self.FOLLOW_additive_expression_in_shift_expression1799) self.additive_expression() self.following.pop() if self.failed: return - # C.g:395:24: ( ( '<<' | '>>' ) additive_expression )* - while True: #loop63 - alt63 = 2 - LA63_0 = self.input.LA(1) + # C.g:400:24: ( ( '<<' | '>>' ) additive_expression )* + while True: #loop64 + alt64 = 2 + LA64_0 = self.input.LA(1) - if ((90 <= LA63_0 <= 91)) : - alt63 = 1 + if ((90 <= LA64_0 <= 91)) : + alt64 = 1 - if alt63 == 1: - # C.g:395:25: ( '<<' | '>>' ) additive_expression + if alt64 == 1: + # C.g:400:25: ( '<<' | '>>' ) additive_expression if (90 <= self.input.LA(1) <= 91): self.input.consume(); self.errorRecovery = False @@ -6506,12 +6614,12 @@ class CParser(Parser): mse = MismatchedSetException(None, self.input) self.recoverFromMismatchedSet( - self.input, mse, self.FOLLOW_set_in_shift_expression1813 + self.input, mse, self.FOLLOW_set_in_shift_expression1802 ) raise mse - self.following.append(self.FOLLOW_additive_expression_in_shift_expression1819) + self.following.append(self.FOLLOW_additive_expression_in_shift_expression1808) self.additive_expression() self.following.pop() if self.failed: @@ -6519,7 +6627,7 @@ class CParser(Parser): else: - break #loop63 + break #loop64 @@ -6541,7 +6649,7 @@ class CParser(Parser): # $ANTLR start statement - # C.g:400:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement ); + # C.g:405:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement ); def statement(self, ): statement_StartIndex = self.input.index() @@ -6550,118 +6658,118 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 59): return - # C.g:401:2: ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement ) - alt64 = 7 - LA64 = self.input.LA(1) - if LA64 == IDENTIFIER: - LA64 = self.input.LA(2) - if LA64 == 45: - alt64 = 1 - elif LA64 == 51: - LA64_22 = self.input.LA(3) + # C.g:406:2: ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement ) + alt65 = 7 + LA65 = self.input.LA(1) + if LA65 == IDENTIFIER: + LA65 = self.input.LA(2) + if LA65 == 51: + LA65_21 = self.input.LA(3) - if (self.synpred138()) : - alt64 = 3 + if (self.synpred139()) : + alt65 = 3 elif (True) : - alt64 = 7 + alt65 = 7 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("400:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement );", 64, 22, self.input) + nvae = NoViableAltException("405:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement );", 65, 21, self.input) raise nvae - elif LA64 == 25 or LA64 == 26 or LA64 == 27 or LA64 == 53 or LA64 == 55 or LA64 == 57 or LA64 == 58 or LA64 == 59 or LA64 == 60 or LA64 == 61 or LA64 == 62 or LA64 == 64 or LA64 == 65 or LA64 == 66 or LA64 == 69 or LA64 == 70 or LA64 == 71 or LA64 == 72 or LA64 == 73 or LA64 == 74 or LA64 == 75 or LA64 == 76 or LA64 == 77 or LA64 == 78 or LA64 == 79 or LA64 == 80 or LA64 == 81 or LA64 == 82 or LA64 == 83 or LA64 == 84 or LA64 == 85 or LA64 == 86 or LA64 == 87 or LA64 == 88 or LA64 == 89 or LA64 == 90 or LA64 == 91: - alt64 = 3 + elif LA65 == 45: + alt65 = 1 + elif LA65 == 24 or LA65 == 26 or LA65 == 27 or LA65 == 53 or LA65 == 55 or LA65 == 57 or LA65 == 58 or LA65 == 59 or LA65 == 60 or LA65 == 61 or LA65 == 62 or LA65 == 64 or LA65 == 65 or LA65 == 66 or LA65 == 69 or LA65 == 70 or LA65 == 71 or LA65 == 72 or LA65 == 73 or LA65 == 74 or LA65 == 75 or LA65 == 76 or LA65 == 77 or LA65 == 78 or LA65 == 79 or LA65 == 80 or LA65 == 81 or LA65 == 82 or LA65 == 83 or LA65 == 84 or LA65 == 85 or LA65 == 86 or LA65 == 87 or LA65 == 88 or LA65 == 89 or LA65 == 90 or LA65 == 91: + alt65 = 3 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("400:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement );", 64, 1, self.input) + nvae = NoViableAltException("405:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement );", 65, 1, self.input) raise nvae - elif LA64 == 92 or LA64 == 93: - alt64 = 1 - elif LA64 == 41: - alt64 = 2 - elif LA64 == HEX_LITERAL or LA64 == OCTAL_LITERAL or LA64 == DECIMAL_LITERAL or LA64 == CHARACTER_LITERAL or LA64 == STRING_LITERAL or LA64 == FLOATING_POINT_LITERAL or LA64 == 25 or LA64 == 51 or LA64 == 55 or LA64 == 57 or LA64 == 58 or LA64 == 61 or LA64 == 62 or LA64 == 63 or LA64 == 66 or LA64 == 67 or LA64 == 68: - alt64 = 3 - elif LA64 == 94 or LA64 == 96: - alt64 = 4 - elif LA64 == 97 or LA64 == 98 or LA64 == 99: - alt64 = 5 - elif LA64 == 100 or LA64 == 101 or LA64 == 102 or LA64 == 103: - alt64 = 6 + elif LA65 == 92 or LA65 == 93: + alt65 = 1 + elif LA65 == 41: + alt65 = 2 + elif LA65 == HEX_LITERAL or LA65 == OCTAL_LITERAL or LA65 == DECIMAL_LITERAL or LA65 == CHARACTER_LITERAL or LA65 == STRING_LITERAL or LA65 == FLOATING_POINT_LITERAL or LA65 == 24 or LA65 == 51 or LA65 == 55 or LA65 == 57 or LA65 == 58 or LA65 == 61 or LA65 == 62 or LA65 == 63 or LA65 == 66 or LA65 == 67 or LA65 == 68: + alt65 = 3 + elif LA65 == 94 or LA65 == 96: + alt65 = 4 + elif LA65 == 97 or LA65 == 98 or LA65 == 99: + alt65 = 5 + elif LA65 == 100 or LA65 == 101 or LA65 == 102 or LA65 == 103: + alt65 = 6 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("400:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement );", 64, 0, self.input) + nvae = NoViableAltException("405:1: statement : ( labeled_statement | compound_statement | expression_statement | selection_statement | iteration_statement | jump_statement | macro_statement );", 65, 0, self.input) raise nvae - if alt64 == 1: - # C.g:401:4: labeled_statement - self.following.append(self.FOLLOW_labeled_statement_in_statement1834) + if alt65 == 1: + # C.g:406:4: labeled_statement + self.following.append(self.FOLLOW_labeled_statement_in_statement1823) self.labeled_statement() self.following.pop() if self.failed: return - elif alt64 == 2: - # C.g:402:4: compound_statement - self.following.append(self.FOLLOW_compound_statement_in_statement1839) + elif alt65 == 2: + # C.g:407:4: compound_statement + self.following.append(self.FOLLOW_compound_statement_in_statement1828) self.compound_statement() self.following.pop() if self.failed: return - elif alt64 == 3: - # C.g:403:4: expression_statement - self.following.append(self.FOLLOW_expression_statement_in_statement1844) + elif alt65 == 3: + # C.g:408:4: expression_statement + self.following.append(self.FOLLOW_expression_statement_in_statement1833) self.expression_statement() self.following.pop() if self.failed: return - elif alt64 == 4: - # C.g:404:4: selection_statement - self.following.append(self.FOLLOW_selection_statement_in_statement1849) + elif alt65 == 4: + # C.g:409:4: selection_statement + self.following.append(self.FOLLOW_selection_statement_in_statement1838) self.selection_statement() self.following.pop() if self.failed: return - elif alt64 == 5: - # C.g:405:4: iteration_statement - self.following.append(self.FOLLOW_iteration_statement_in_statement1854) + elif alt65 == 5: + # C.g:410:4: iteration_statement + self.following.append(self.FOLLOW_iteration_statement_in_statement1843) self.iteration_statement() self.following.pop() if self.failed: return - elif alt64 == 6: - # C.g:406:4: jump_statement - self.following.append(self.FOLLOW_jump_statement_in_statement1859) + elif alt65 == 6: + # C.g:411:4: jump_statement + self.following.append(self.FOLLOW_jump_statement_in_statement1848) self.jump_statement() self.following.pop() if self.failed: return - elif alt64 == 7: - # C.g:407:4: macro_statement - self.following.append(self.FOLLOW_macro_statement_in_statement1864) + elif alt65 == 7: + # C.g:412:4: macro_statement + self.following.append(self.FOLLOW_macro_statement_in_statement1853) self.macro_statement() self.following.pop() if self.failed: @@ -6684,7 +6792,7 @@ class CParser(Parser): # $ANTLR start macro_statement - # C.g:410:1: macro_statement : IDENTIFIER '(' ( IDENTIFIER | ( declaration )* ( statement_list )? ) ')' ; + # C.g:415:1: macro_statement : IDENTIFIER '(' ( IDENTIFIER | ( declaration )* ( statement_list )? ) ')' ; def macro_statement(self, ): macro_statement_StartIndex = self.input.index() @@ -6693,92 +6801,92 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 60): return - # C.g:411:2: ( IDENTIFIER '(' ( IDENTIFIER | ( declaration )* ( statement_list )? ) ')' ) - # C.g:411:4: IDENTIFIER '(' ( IDENTIFIER | ( declaration )* ( statement_list )? ) ')' - self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_macro_statement1875) + # C.g:416:2: ( IDENTIFIER '(' ( IDENTIFIER | ( declaration )* ( statement_list )? ) ')' ) + # C.g:416:4: IDENTIFIER '(' ( IDENTIFIER | ( declaration )* ( statement_list )? ) ')' + self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_macro_statement1864) if self.failed: return - self.match(self.input, 51, self.FOLLOW_51_in_macro_statement1877) + self.match(self.input, 51, self.FOLLOW_51_in_macro_statement1866) if self.failed: return - # C.g:411:19: ( IDENTIFIER | ( declaration )* ( statement_list )? ) - alt67 = 2 - LA67_0 = self.input.LA(1) + # C.g:416:19: ( IDENTIFIER | ( declaration )* ( statement_list )? ) + alt68 = 2 + LA68_0 = self.input.LA(1) - if (LA67_0 == IDENTIFIER) : - LA67_1 = self.input.LA(2) + if (LA68_0 == IDENTIFIER) : + LA68_1 = self.input.LA(2) - if (LA67_1 == IDENTIFIER or (25 <= LA67_1 <= 40) or (43 <= LA67_1 <= 51) or LA67_1 == 53 or LA67_1 == 55 or (57 <= LA67_1 <= 62) or (64 <= LA67_1 <= 66) or (69 <= LA67_1 <= 91)) : - alt67 = 2 - elif (LA67_1 == 52) : - alt67 = 1 + if (LA68_1 == IDENTIFIER or LA68_1 == 24 or (26 <= LA68_1 <= 40) or (43 <= LA68_1 <= 51) or LA68_1 == 53 or LA68_1 == 55 or (57 <= LA68_1 <= 62) or (64 <= LA68_1 <= 66) or (69 <= LA68_1 <= 91)) : + alt68 = 2 + elif (LA68_1 == 52) : + alt68 = 1 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("411:19: ( IDENTIFIER | ( declaration )* ( statement_list )? )", 67, 1, self.input) + nvae = NoViableAltException("416:19: ( IDENTIFIER | ( declaration )* ( statement_list )? )", 68, 1, self.input) raise nvae - elif ((HEX_LITERAL <= LA67_0 <= FLOATING_POINT_LITERAL) or (24 <= LA67_0 <= 25) or (28 <= LA67_0 <= 41) or (43 <= LA67_0 <= 44) or (46 <= LA67_0 <= 52) or LA67_0 == 55 or (57 <= LA67_0 <= 58) or (61 <= LA67_0 <= 63) or (66 <= LA67_0 <= 68) or (92 <= LA67_0 <= 94) or (96 <= LA67_0 <= 103)) : - alt67 = 2 + elif ((HEX_LITERAL <= LA68_0 <= FLOATING_POINT_LITERAL) or (24 <= LA68_0 <= 25) or (28 <= LA68_0 <= 41) or (43 <= LA68_0 <= 44) or (46 <= LA68_0 <= 52) or LA68_0 == 55 or (57 <= LA68_0 <= 58) or (61 <= LA68_0 <= 63) or (66 <= LA68_0 <= 68) or (92 <= LA68_0 <= 94) or (96 <= LA68_0 <= 103)) : + alt68 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("411:19: ( IDENTIFIER | ( declaration )* ( statement_list )? )", 67, 0, self.input) + nvae = NoViableAltException("416:19: ( IDENTIFIER | ( declaration )* ( statement_list )? )", 68, 0, self.input) raise nvae - if alt67 == 1: - # C.g:411:20: IDENTIFIER - self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_macro_statement1880) + if alt68 == 1: + # C.g:416:20: IDENTIFIER + self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_macro_statement1869) if self.failed: return - elif alt67 == 2: - # C.g:411:33: ( declaration )* ( statement_list )? - # C.g:411:33: ( declaration )* - while True: #loop65 - alt65 = 2 - LA65_0 = self.input.LA(1) + elif alt68 == 2: + # C.g:416:33: ( declaration )* ( statement_list )? + # C.g:416:33: ( declaration )* + while True: #loop66 + alt66 = 2 + LA66_0 = self.input.LA(1) - if (LA65_0 == IDENTIFIER) : - LA65 = self.input.LA(2) - if LA65 == 51: - LA65_37 = self.input.LA(3) + if (LA66_0 == IDENTIFIER) : + LA66 = self.input.LA(2) + if LA66 == 51: + LA66_36 = self.input.LA(3) - if (self.synpred143()) : - alt65 = 1 + if (self.synpred144()) : + alt66 = 1 - elif LA65 == 55: - LA65_38 = self.input.LA(3) + elif LA66 == 55: + LA66_40 = self.input.LA(3) - if (self.synpred143()) : - alt65 = 1 + if (self.synpred144()) : + alt66 = 1 - elif LA65 == IDENTIFIER or LA65 == 28 or LA65 == 29 or LA65 == 30 or LA65 == 31 or LA65 == 32 or LA65 == 33 or LA65 == 34 or LA65 == 35 or LA65 == 36 or LA65 == 37 or LA65 == 38 or LA65 == 39 or LA65 == 40 or LA65 == 43 or LA65 == 44 or LA65 == 46 or LA65 == 47 or LA65 == 48 or LA65 == 49 or LA65 == 50: - alt65 = 1 - elif LA65 == 25: - LA65_40 = self.input.LA(3) + elif LA66 == IDENTIFIER or LA66 == 28 or LA66 == 29 or LA66 == 30 or LA66 == 31 or LA66 == 32 or LA66 == 33 or LA66 == 34 or LA66 == 35 or LA66 == 36 or LA66 == 37 or LA66 == 38 or LA66 == 39 or LA66 == 40 or LA66 == 43 or LA66 == 44 or LA66 == 46 or LA66 == 47 or LA66 == 48 or LA66 == 49 or LA66 == 50: + alt66 = 1 + elif LA66 == 24: + LA66_46 = self.input.LA(3) - if (self.synpred143()) : - alt65 = 1 + if (self.synpred144()) : + alt66 = 1 - elif (LA65_0 == 24 or (28 <= LA65_0 <= 40) or (43 <= LA65_0 <= 44) or (46 <= LA65_0 <= 50)) : - alt65 = 1 + elif (LA66_0 == 25 or (28 <= LA66_0 <= 40) or (43 <= LA66_0 <= 44) or (46 <= LA66_0 <= 50)) : + alt66 = 1 - if alt65 == 1: + if alt66 == 1: # C.g:0:0: declaration - self.following.append(self.FOLLOW_declaration_in_macro_statement1884) + self.following.append(self.FOLLOW_declaration_in_macro_statement1873) self.declaration() self.following.pop() if self.failed: @@ -6786,18 +6894,18 @@ class CParser(Parser): else: - break #loop65 + break #loop66 - # C.g:411:47: ( statement_list )? - alt66 = 2 - LA66_0 = self.input.LA(1) + # C.g:416:47: ( statement_list )? + alt67 = 2 + LA67_0 = self.input.LA(1) - if ((IDENTIFIER <= LA66_0 <= FLOATING_POINT_LITERAL) or LA66_0 == 25 or LA66_0 == 41 or LA66_0 == 51 or LA66_0 == 55 or (57 <= LA66_0 <= 58) or (61 <= LA66_0 <= 63) or (66 <= LA66_0 <= 68) or (92 <= LA66_0 <= 94) or (96 <= LA66_0 <= 103)) : - alt66 = 1 - if alt66 == 1: + if ((IDENTIFIER <= LA67_0 <= FLOATING_POINT_LITERAL) or LA67_0 == 24 or LA67_0 == 41 or LA67_0 == 51 or LA67_0 == 55 or (57 <= LA67_0 <= 58) or (61 <= LA67_0 <= 63) or (66 <= LA67_0 <= 68) or (92 <= LA67_0 <= 94) or (96 <= LA67_0 <= 103)) : + alt67 = 1 + if alt67 == 1: # C.g:0:0: statement_list - self.following.append(self.FOLLOW_statement_list_in_macro_statement1888) + self.following.append(self.FOLLOW_statement_list_in_macro_statement1877) self.statement_list() self.following.pop() if self.failed: @@ -6808,7 +6916,7 @@ class CParser(Parser): - self.match(self.input, 52, self.FOLLOW_52_in_macro_statement1892) + self.match(self.input, 52, self.FOLLOW_52_in_macro_statement1881) if self.failed: return @@ -6830,7 +6938,7 @@ class CParser(Parser): # $ANTLR start labeled_statement - # C.g:414:1: labeled_statement : ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement ); + # C.g:419:1: labeled_statement : ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement ); def labeled_statement(self, ): labeled_statement_StartIndex = self.input.index() @@ -6839,68 +6947,68 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 61): return - # C.g:415:2: ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement ) - alt68 = 3 - LA68 = self.input.LA(1) - if LA68 == IDENTIFIER: - alt68 = 1 - elif LA68 == 92: - alt68 = 2 - elif LA68 == 93: - alt68 = 3 + # C.g:420:2: ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement ) + alt69 = 3 + LA69 = self.input.LA(1) + if LA69 == IDENTIFIER: + alt69 = 1 + elif LA69 == 92: + alt69 = 2 + elif LA69 == 93: + alt69 = 3 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("414:1: labeled_statement : ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement );", 68, 0, self.input) + nvae = NoViableAltException("419:1: labeled_statement : ( IDENTIFIER ':' statement | 'case' constant_expression ':' statement | 'default' ':' statement );", 69, 0, self.input) raise nvae - if alt68 == 1: - # C.g:415:4: IDENTIFIER ':' statement - self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_labeled_statement1904) + if alt69 == 1: + # C.g:420:4: IDENTIFIER ':' statement + self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_labeled_statement1893) if self.failed: return - self.match(self.input, 45, self.FOLLOW_45_in_labeled_statement1906) + self.match(self.input, 45, self.FOLLOW_45_in_labeled_statement1895) if self.failed: return - self.following.append(self.FOLLOW_statement_in_labeled_statement1908) + self.following.append(self.FOLLOW_statement_in_labeled_statement1897) self.statement() self.following.pop() if self.failed: return - elif alt68 == 2: - # C.g:416:4: 'case' constant_expression ':' statement - self.match(self.input, 92, self.FOLLOW_92_in_labeled_statement1913) + elif alt69 == 2: + # C.g:421:4: 'case' constant_expression ':' statement + self.match(self.input, 92, self.FOLLOW_92_in_labeled_statement1902) if self.failed: return - self.following.append(self.FOLLOW_constant_expression_in_labeled_statement1915) + self.following.append(self.FOLLOW_constant_expression_in_labeled_statement1904) self.constant_expression() self.following.pop() if self.failed: return - self.match(self.input, 45, self.FOLLOW_45_in_labeled_statement1917) + self.match(self.input, 45, self.FOLLOW_45_in_labeled_statement1906) if self.failed: return - self.following.append(self.FOLLOW_statement_in_labeled_statement1919) + self.following.append(self.FOLLOW_statement_in_labeled_statement1908) self.statement() self.following.pop() if self.failed: return - elif alt68 == 3: - # C.g:417:4: 'default' ':' statement - self.match(self.input, 93, self.FOLLOW_93_in_labeled_statement1924) + elif alt69 == 3: + # C.g:422:4: 'default' ':' statement + self.match(self.input, 93, self.FOLLOW_93_in_labeled_statement1913) if self.failed: return - self.match(self.input, 45, self.FOLLOW_45_in_labeled_statement1926) + self.match(self.input, 45, self.FOLLOW_45_in_labeled_statement1915) if self.failed: return - self.following.append(self.FOLLOW_statement_in_labeled_statement1928) + self.following.append(self.FOLLOW_statement_in_labeled_statement1917) self.statement() self.following.pop() if self.failed: @@ -6923,62 +7031,58 @@ class CParser(Parser): # $ANTLR start compound_statement - # C.g:420:1: compound_statement : '{' ( declaration )* ( statement_list )? '}' ; + # C.g:425:1: compound_statement : '{' ( declaration )* ( statement_list )? '}' ; def compound_statement(self, ): - self.Symbols_stack.append(Symbols_scope()) compound_statement_StartIndex = self.input.index() - - self.Symbols_stack[-1].types = set() - try: try: if self.backtracking > 0 and self.alreadyParsedRule(self.input, 62): return - # C.g:425:2: ( '{' ( declaration )* ( statement_list )? '}' ) - # C.g:425:4: '{' ( declaration )* ( statement_list )? '}' - self.match(self.input, 41, self.FOLLOW_41_in_compound_statement1950) + # C.g:426:2: ( '{' ( declaration )* ( statement_list )? '}' ) + # C.g:426:4: '{' ( declaration )* ( statement_list )? '}' + self.match(self.input, 41, self.FOLLOW_41_in_compound_statement1928) if self.failed: return - # C.g:425:8: ( declaration )* - while True: #loop69 - alt69 = 2 - LA69_0 = self.input.LA(1) + # C.g:426:8: ( declaration )* + while True: #loop70 + alt70 = 2 + LA70_0 = self.input.LA(1) - if (LA69_0 == IDENTIFIER) : - LA69 = self.input.LA(2) - if LA69 == 51: - LA69_36 = self.input.LA(3) + if (LA70_0 == IDENTIFIER) : + LA70 = self.input.LA(2) + if LA70 == 51: + LA70_36 = self.input.LA(3) - if (self.synpred147()) : - alt69 = 1 + if (self.synpred148()) : + alt70 = 1 - elif LA69 == 55: - LA69_38 = self.input.LA(3) + elif LA70 == 55: + LA70_40 = self.input.LA(3) - if (self.synpred147()) : - alt69 = 1 + if (self.synpred148()) : + alt70 = 1 - elif LA69 == IDENTIFIER or LA69 == 28 or LA69 == 29 or LA69 == 30 or LA69 == 31 or LA69 == 32 or LA69 == 33 or LA69 == 34 or LA69 == 35 or LA69 == 36 or LA69 == 37 or LA69 == 38 or LA69 == 39 or LA69 == 40 or LA69 == 43 or LA69 == 44 or LA69 == 46 or LA69 == 47 or LA69 == 48 or LA69 == 49 or LA69 == 50: - alt69 = 1 - elif LA69 == 25: - LA69_40 = self.input.LA(3) + elif LA70 == 24: + LA70_58 = self.input.LA(3) - if (self.synpred147()) : - alt69 = 1 + if (self.synpred148()) : + alt70 = 1 + elif LA70 == IDENTIFIER or LA70 == 28 or LA70 == 29 or LA70 == 30 or LA70 == 31 or LA70 == 32 or LA70 == 33 or LA70 == 34 or LA70 == 35 or LA70 == 36 or LA70 == 37 or LA70 == 38 or LA70 == 39 or LA70 == 40 or LA70 == 43 or LA70 == 44 or LA70 == 46 or LA70 == 47 or LA70 == 48 or LA70 == 49 or LA70 == 50: + alt70 = 1 - elif (LA69_0 == 24 or (28 <= LA69_0 <= 40) or (43 <= LA69_0 <= 44) or (46 <= LA69_0 <= 50)) : - alt69 = 1 + elif (LA70_0 == 25 or (28 <= LA70_0 <= 40) or (43 <= LA70_0 <= 44) or (46 <= LA70_0 <= 50)) : + alt70 = 1 - if alt69 == 1: + if alt70 == 1: # C.g:0:0: declaration - self.following.append(self.FOLLOW_declaration_in_compound_statement1952) + self.following.append(self.FOLLOW_declaration_in_compound_statement1930) self.declaration() self.following.pop() if self.failed: @@ -6986,18 +7090,18 @@ class CParser(Parser): else: - break #loop69 + break #loop70 - # C.g:425:21: ( statement_list )? - alt70 = 2 - LA70_0 = self.input.LA(1) + # C.g:426:21: ( statement_list )? + alt71 = 2 + LA71_0 = self.input.LA(1) - if ((IDENTIFIER <= LA70_0 <= FLOATING_POINT_LITERAL) or LA70_0 == 25 or LA70_0 == 41 or LA70_0 == 51 or LA70_0 == 55 or (57 <= LA70_0 <= 58) or (61 <= LA70_0 <= 63) or (66 <= LA70_0 <= 68) or (92 <= LA70_0 <= 94) or (96 <= LA70_0 <= 103)) : - alt70 = 1 - if alt70 == 1: + if ((IDENTIFIER <= LA71_0 <= FLOATING_POINT_LITERAL) or LA71_0 == 24 or LA71_0 == 41 or LA71_0 == 51 or LA71_0 == 55 or (57 <= LA71_0 <= 58) or (61 <= LA71_0 <= 63) or (66 <= LA71_0 <= 68) or (92 <= LA71_0 <= 94) or (96 <= LA71_0 <= 103)) : + alt71 = 1 + if alt71 == 1: # C.g:0:0: statement_list - self.following.append(self.FOLLOW_statement_list_in_compound_statement1955) + self.following.append(self.FOLLOW_statement_list_in_compound_statement1933) self.statement_list() self.following.pop() if self.failed: @@ -7005,7 +7109,7 @@ class CParser(Parser): - self.match(self.input, 42, self.FOLLOW_42_in_compound_statement1958) + self.match(self.input, 42, self.FOLLOW_42_in_compound_statement1936) if self.failed: return @@ -7019,8 +7123,6 @@ class CParser(Parser): if self.backtracking > 0: self.memoize(self.input, 62, compound_statement_StartIndex) - self.Symbols_stack.pop() - pass return @@ -7029,7 +7131,7 @@ class CParser(Parser): # $ANTLR start statement_list - # C.g:428:1: statement_list : ( statement )+ ; + # C.g:429:1: statement_list : ( statement )+ ; def statement_list(self, ): statement_list_StartIndex = self.input.index() @@ -7038,21 +7140,21 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 63): return - # C.g:429:2: ( ( statement )+ ) - # C.g:429:4: ( statement )+ - # C.g:429:4: ( statement )+ - cnt71 = 0 - while True: #loop71 - alt71 = 2 - LA71_0 = self.input.LA(1) + # C.g:430:2: ( ( statement )+ ) + # C.g:430:4: ( statement )+ + # C.g:430:4: ( statement )+ + cnt72 = 0 + while True: #loop72 + alt72 = 2 + LA72_0 = self.input.LA(1) - if ((IDENTIFIER <= LA71_0 <= FLOATING_POINT_LITERAL) or LA71_0 == 25 or LA71_0 == 41 or LA71_0 == 51 or LA71_0 == 55 or (57 <= LA71_0 <= 58) or (61 <= LA71_0 <= 63) or (66 <= LA71_0 <= 68) or (92 <= LA71_0 <= 94) or (96 <= LA71_0 <= 103)) : - alt71 = 1 + if ((IDENTIFIER <= LA72_0 <= FLOATING_POINT_LITERAL) or LA72_0 == 24 or LA72_0 == 41 or LA72_0 == 51 or LA72_0 == 55 or (57 <= LA72_0 <= 58) or (61 <= LA72_0 <= 63) or (66 <= LA72_0 <= 68) or (92 <= LA72_0 <= 94) or (96 <= LA72_0 <= 103)) : + alt72 = 1 - if alt71 == 1: + if alt72 == 1: # C.g:0:0: statement - self.following.append(self.FOLLOW_statement_in_statement_list1969) + self.following.append(self.FOLLOW_statement_in_statement_list1947) self.statement() self.following.pop() if self.failed: @@ -7060,17 +7162,17 @@ class CParser(Parser): else: - if cnt71 >= 1: - break #loop71 + if cnt72 >= 1: + break #loop72 if self.backtracking > 0: self.failed = True return - eee = EarlyExitException(71, self.input) + eee = EarlyExitException(72, self.input) raise eee - cnt71 += 1 + cnt72 += 1 @@ -7090,52 +7192,62 @@ class CParser(Parser): # $ANTLR end statement_list + class expression_statement_return(object): + def __init__(self): + self.start = None + self.stop = None + + # $ANTLR start expression_statement - # C.g:432:1: expression_statement : ( ';' | expression ';' ); + # C.g:433:1: expression_statement : ( ';' | expression ';' ); def expression_statement(self, ): + retval = self.expression_statement_return() + retval.start = self.input.LT(1) expression_statement_StartIndex = self.input.index() try: try: if self.backtracking > 0 and self.alreadyParsedRule(self.input, 64): - return + return retval - # C.g:433:2: ( ';' | expression ';' ) - alt72 = 2 - LA72_0 = self.input.LA(1) + # C.g:434:2: ( ';' | expression ';' ) + alt73 = 2 + LA73_0 = self.input.LA(1) - if (LA72_0 == 25) : - alt72 = 1 - elif ((IDENTIFIER <= LA72_0 <= FLOATING_POINT_LITERAL) or LA72_0 == 51 or LA72_0 == 55 or (57 <= LA72_0 <= 58) or (61 <= LA72_0 <= 63) or (66 <= LA72_0 <= 68)) : - alt72 = 2 + if (LA73_0 == 24) : + alt73 = 1 + elif ((IDENTIFIER <= LA73_0 <= FLOATING_POINT_LITERAL) or LA73_0 == 51 or LA73_0 == 55 or (57 <= LA73_0 <= 58) or (61 <= LA73_0 <= 63) or (66 <= LA73_0 <= 68)) : + alt73 = 2 else: if self.backtracking > 0: self.failed = True - return + return retval - nvae = NoViableAltException("432:1: expression_statement : ( ';' | expression ';' );", 72, 0, self.input) + nvae = NoViableAltException("433:1: expression_statement : ( ';' | expression ';' );", 73, 0, self.input) raise nvae - if alt72 == 1: - # C.g:433:4: ';' - self.match(self.input, 25, self.FOLLOW_25_in_expression_statement1981) + if alt73 == 1: + # C.g:434:4: ';' + self.match(self.input, 24, self.FOLLOW_24_in_expression_statement1959) if self.failed: - return + return retval - elif alt72 == 2: - # C.g:434:4: expression ';' - self.following.append(self.FOLLOW_expression_in_expression_statement1986) + elif alt73 == 2: + # C.g:435:4: expression ';' + self.following.append(self.FOLLOW_expression_in_expression_statement1964) self.expression() self.following.pop() if self.failed: - return - self.match(self.input, 25, self.FOLLOW_25_in_expression_statement1988) + return retval + self.match(self.input, 24, self.FOLLOW_24_in_expression_statement1966) if self.failed: - return + return retval + + retval.stop = self.input.LT(-1) except RecognitionException, re: @@ -7147,71 +7259,77 @@ class CParser(Parser): pass - return + return retval # $ANTLR end expression_statement # $ANTLR start selection_statement - # C.g:437:1: selection_statement : ( 'if' '(' expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement ); + # C.g:438:1: selection_statement : ( 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement ); def selection_statement(self, ): selection_statement_StartIndex = self.input.index() + e = None + + try: try: if self.backtracking > 0 and self.alreadyParsedRule(self.input, 65): return - # C.g:438:2: ( 'if' '(' expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement ) - alt74 = 2 - LA74_0 = self.input.LA(1) + # C.g:439:2: ( 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement ) + alt75 = 2 + LA75_0 = self.input.LA(1) - if (LA74_0 == 94) : - alt74 = 1 - elif (LA74_0 == 96) : - alt74 = 2 + if (LA75_0 == 94) : + alt75 = 1 + elif (LA75_0 == 96) : + alt75 = 2 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("437:1: selection_statement : ( 'if' '(' expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement );", 74, 0, self.input) + nvae = NoViableAltException("438:1: selection_statement : ( 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? | 'switch' '(' expression ')' statement );", 75, 0, self.input) raise nvae - if alt74 == 1: - # C.g:438:4: 'if' '(' expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? - self.match(self.input, 94, self.FOLLOW_94_in_selection_statement1999) + if alt75 == 1: + # C.g:439:4: 'if' '(' e= expression ')' statement ( options {k=1; backtrack=false; } : 'else' statement )? + self.match(self.input, 94, self.FOLLOW_94_in_selection_statement1977) if self.failed: return - self.match(self.input, 51, self.FOLLOW_51_in_selection_statement2001) + self.match(self.input, 51, self.FOLLOW_51_in_selection_statement1979) if self.failed: return - self.following.append(self.FOLLOW_expression_in_selection_statement2003) - self.expression() + self.following.append(self.FOLLOW_expression_in_selection_statement1983) + e = self.expression() self.following.pop() if self.failed: return - self.match(self.input, 52, self.FOLLOW_52_in_selection_statement2005) + self.match(self.input, 52, self.FOLLOW_52_in_selection_statement1985) if self.failed: return - self.following.append(self.FOLLOW_statement_in_selection_statement2007) + if self.backtracking == 0: + self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop)) + + self.following.append(self.FOLLOW_statement_in_selection_statement1989) self.statement() self.following.pop() if self.failed: return - # C.g:438:38: ( options {k=1; backtrack=false; } : 'else' statement )? - alt73 = 2 - LA73_0 = self.input.LA(1) + # C.g:439:167: ( options {k=1; backtrack=false; } : 'else' statement )? + alt74 = 2 + LA74_0 = self.input.LA(1) - if (LA73_0 == 95) : - alt73 = 1 - if alt73 == 1: - # C.g:438:71: 'else' statement - self.match(self.input, 95, self.FOLLOW_95_in_selection_statement2022) + if (LA74_0 == 95) : + alt74 = 1 + if alt74 == 1: + # C.g:439:200: 'else' statement + self.match(self.input, 95, self.FOLLOW_95_in_selection_statement2004) if self.failed: return - self.following.append(self.FOLLOW_statement_in_selection_statement2024) + self.following.append(self.FOLLOW_statement_in_selection_statement2006) self.statement() self.following.pop() if self.failed: @@ -7221,23 +7339,23 @@ class CParser(Parser): - elif alt74 == 2: - # C.g:439:4: 'switch' '(' expression ')' statement - self.match(self.input, 96, self.FOLLOW_96_in_selection_statement2031) + elif alt75 == 2: + # C.g:440:4: 'switch' '(' expression ')' statement + self.match(self.input, 96, self.FOLLOW_96_in_selection_statement2013) if self.failed: return - self.match(self.input, 51, self.FOLLOW_51_in_selection_statement2033) + self.match(self.input, 51, self.FOLLOW_51_in_selection_statement2015) if self.failed: return - self.following.append(self.FOLLOW_expression_in_selection_statement2035) + self.following.append(self.FOLLOW_expression_in_selection_statement2017) self.expression() self.following.pop() if self.failed: return - self.match(self.input, 52, self.FOLLOW_52_in_selection_statement2037) + self.match(self.input, 52, self.FOLLOW_52_in_selection_statement2019) if self.failed: return - self.following.append(self.FOLLOW_statement_in_selection_statement2039) + self.following.append(self.FOLLOW_statement_in_selection_statement2021) self.statement() self.following.pop() if self.failed: @@ -7260,112 +7378,121 @@ class CParser(Parser): # $ANTLR start iteration_statement - # C.g:442:1: iteration_statement : ( 'while' '(' expression ')' statement | 'do' statement 'while' '(' expression ')' ';' | 'for' '(' expression_statement expression_statement ( expression )? ')' statement ); + # C.g:443:1: iteration_statement : ( 'while' '(' e= expression ')' statement | 'do' statement 'while' '(' e= expression ')' ';' | 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement ); def iteration_statement(self, ): iteration_statement_StartIndex = self.input.index() + e = None + + try: try: if self.backtracking > 0 and self.alreadyParsedRule(self.input, 66): return - # C.g:443:2: ( 'while' '(' expression ')' statement | 'do' statement 'while' '(' expression ')' ';' | 'for' '(' expression_statement expression_statement ( expression )? ')' statement ) - alt76 = 3 - LA76 = self.input.LA(1) - if LA76 == 97: - alt76 = 1 - elif LA76 == 98: - alt76 = 2 - elif LA76 == 99: - alt76 = 3 + # C.g:444:2: ( 'while' '(' e= expression ')' statement | 'do' statement 'while' '(' e= expression ')' ';' | 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement ) + alt77 = 3 + LA77 = self.input.LA(1) + if LA77 == 97: + alt77 = 1 + elif LA77 == 98: + alt77 = 2 + elif LA77 == 99: + alt77 = 3 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("442:1: iteration_statement : ( 'while' '(' expression ')' statement | 'do' statement 'while' '(' expression ')' ';' | 'for' '(' expression_statement expression_statement ( expression )? ')' statement );", 76, 0, self.input) + nvae = NoViableAltException("443:1: iteration_statement : ( 'while' '(' e= expression ')' statement | 'do' statement 'while' '(' e= expression ')' ';' | 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement );", 77, 0, self.input) raise nvae - if alt76 == 1: - # C.g:443:4: 'while' '(' expression ')' statement - self.match(self.input, 97, self.FOLLOW_97_in_iteration_statement2050) + if alt77 == 1: + # C.g:444:4: 'while' '(' e= expression ')' statement + self.match(self.input, 97, self.FOLLOW_97_in_iteration_statement2032) if self.failed: return - self.match(self.input, 51, self.FOLLOW_51_in_iteration_statement2052) + self.match(self.input, 51, self.FOLLOW_51_in_iteration_statement2034) if self.failed: return - self.following.append(self.FOLLOW_expression_in_iteration_statement2054) - self.expression() + self.following.append(self.FOLLOW_expression_in_iteration_statement2038) + e = self.expression() self.following.pop() if self.failed: return - self.match(self.input, 52, self.FOLLOW_52_in_iteration_statement2056) + self.match(self.input, 52, self.FOLLOW_52_in_iteration_statement2040) if self.failed: return - self.following.append(self.FOLLOW_statement_in_iteration_statement2058) + self.following.append(self.FOLLOW_statement_in_iteration_statement2042) self.statement() self.following.pop() if self.failed: return + if self.backtracking == 0: + self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop)) - elif alt76 == 2: - # C.g:444:4: 'do' statement 'while' '(' expression ')' ';' - self.match(self.input, 98, self.FOLLOW_98_in_iteration_statement2063) + + elif alt77 == 2: + # C.g:445:4: 'do' statement 'while' '(' e= expression ')' ';' + self.match(self.input, 98, self.FOLLOW_98_in_iteration_statement2049) if self.failed: return - self.following.append(self.FOLLOW_statement_in_iteration_statement2065) + self.following.append(self.FOLLOW_statement_in_iteration_statement2051) self.statement() self.following.pop() if self.failed: return - self.match(self.input, 97, self.FOLLOW_97_in_iteration_statement2067) + self.match(self.input, 97, self.FOLLOW_97_in_iteration_statement2053) if self.failed: return - self.match(self.input, 51, self.FOLLOW_51_in_iteration_statement2069) + self.match(self.input, 51, self.FOLLOW_51_in_iteration_statement2055) if self.failed: return - self.following.append(self.FOLLOW_expression_in_iteration_statement2071) - self.expression() + self.following.append(self.FOLLOW_expression_in_iteration_statement2059) + e = self.expression() self.following.pop() if self.failed: return - self.match(self.input, 52, self.FOLLOW_52_in_iteration_statement2073) + self.match(self.input, 52, self.FOLLOW_52_in_iteration_statement2061) if self.failed: return - self.match(self.input, 25, self.FOLLOW_25_in_iteration_statement2075) + self.match(self.input, 24, self.FOLLOW_24_in_iteration_statement2063) if self.failed: return + if self.backtracking == 0: + self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop)) + - elif alt76 == 3: - # C.g:445:4: 'for' '(' expression_statement expression_statement ( expression )? ')' statement - self.match(self.input, 99, self.FOLLOW_99_in_iteration_statement2080) + elif alt77 == 3: + # C.g:446:4: 'for' '(' expression_statement e= expression_statement ( expression )? ')' statement + self.match(self.input, 99, self.FOLLOW_99_in_iteration_statement2070) if self.failed: return - self.match(self.input, 51, self.FOLLOW_51_in_iteration_statement2082) + self.match(self.input, 51, self.FOLLOW_51_in_iteration_statement2072) if self.failed: return - self.following.append(self.FOLLOW_expression_statement_in_iteration_statement2084) + self.following.append(self.FOLLOW_expression_statement_in_iteration_statement2074) self.expression_statement() self.following.pop() if self.failed: return - self.following.append(self.FOLLOW_expression_statement_in_iteration_statement2086) - self.expression_statement() + self.following.append(self.FOLLOW_expression_statement_in_iteration_statement2078) + e = self.expression_statement() self.following.pop() if self.failed: return - # C.g:445:56: ( expression )? - alt75 = 2 - LA75_0 = self.input.LA(1) + # C.g:446:58: ( expression )? + alt76 = 2 + LA76_0 = self.input.LA(1) - if ((IDENTIFIER <= LA75_0 <= FLOATING_POINT_LITERAL) or LA75_0 == 51 or LA75_0 == 55 or (57 <= LA75_0 <= 58) or (61 <= LA75_0 <= 63) or (66 <= LA75_0 <= 68)) : - alt75 = 1 - if alt75 == 1: + if ((IDENTIFIER <= LA76_0 <= FLOATING_POINT_LITERAL) or LA76_0 == 51 or LA76_0 == 55 or (57 <= LA76_0 <= 58) or (61 <= LA76_0 <= 63) or (66 <= LA76_0 <= 68)) : + alt76 = 1 + if alt76 == 1: # C.g:0:0: expression - self.following.append(self.FOLLOW_expression_in_iteration_statement2088) + self.following.append(self.FOLLOW_expression_in_iteration_statement2080) self.expression() self.following.pop() if self.failed: @@ -7373,14 +7500,17 @@ class CParser(Parser): - self.match(self.input, 52, self.FOLLOW_52_in_iteration_statement2091) + self.match(self.input, 52, self.FOLLOW_52_in_iteration_statement2083) if self.failed: return - self.following.append(self.FOLLOW_statement_in_iteration_statement2093) + self.following.append(self.FOLLOW_statement_in_iteration_statement2085) self.statement() self.following.pop() if self.failed: return + if self.backtracking == 0: + self.StorePredicateExpression(e.start.line, e.start.charPositionInLine, e.stop.line, e.stop.charPositionInLine, self.input.toString(e.start,e.stop)) + @@ -7399,7 +7529,7 @@ class CParser(Parser): # $ANTLR start jump_statement - # C.g:448:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' ); + # C.g:449:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' ); def jump_statement(self, ): jump_statement_StartIndex = self.input.index() @@ -7408,28 +7538,28 @@ class CParser(Parser): if self.backtracking > 0 and self.alreadyParsedRule(self.input, 67): return - # C.g:449:2: ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' ) - alt77 = 5 - LA77 = self.input.LA(1) - if LA77 == 100: - alt77 = 1 - elif LA77 == 101: - alt77 = 2 - elif LA77 == 102: - alt77 = 3 - elif LA77 == 103: - LA77_4 = self.input.LA(2) - - if (LA77_4 == 25) : - alt77 = 4 - elif ((IDENTIFIER <= LA77_4 <= FLOATING_POINT_LITERAL) or LA77_4 == 51 or LA77_4 == 55 or (57 <= LA77_4 <= 58) or (61 <= LA77_4 <= 63) or (66 <= LA77_4 <= 68)) : - alt77 = 5 + # C.g:450:2: ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' ) + alt78 = 5 + LA78 = self.input.LA(1) + if LA78 == 100: + alt78 = 1 + elif LA78 == 101: + alt78 = 2 + elif LA78 == 102: + alt78 = 3 + elif LA78 == 103: + LA78_4 = self.input.LA(2) + + if (LA78_4 == 24) : + alt78 = 4 + elif ((IDENTIFIER <= LA78_4 <= FLOATING_POINT_LITERAL) or LA78_4 == 51 or LA78_4 == 55 or (57 <= LA78_4 <= 58) or (61 <= LA78_4 <= 63) or (66 <= LA78_4 <= 68)) : + alt78 = 5 else: if self.backtracking > 0: self.failed = True return - nvae = NoViableAltException("448:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );", 77, 4, self.input) + nvae = NoViableAltException("449:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );", 78, 4, self.input) raise nvae @@ -7438,64 +7568,64 @@ class CParser(Parser): self.failed = True return - nvae = NoViableAltException("448:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );", 77, 0, self.input) + nvae = NoViableAltException("449:1: jump_statement : ( 'goto' IDENTIFIER ';' | 'continue' ';' | 'break' ';' | 'return' ';' | 'return' expression ';' );", 78, 0, self.input) raise nvae - if alt77 == 1: - # C.g:449:4: 'goto' IDENTIFIER ';' - self.match(self.input, 100, self.FOLLOW_100_in_jump_statement2104) + if alt78 == 1: + # C.g:450:4: 'goto' IDENTIFIER ';' + self.match(self.input, 100, self.FOLLOW_100_in_jump_statement2098) if self.failed: return - self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_jump_statement2106) + self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_jump_statement2100) if self.failed: return - self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2108) + self.match(self.input, 24, self.FOLLOW_24_in_jump_statement2102) if self.failed: return - elif alt77 == 2: - # C.g:450:4: 'continue' ';' - self.match(self.input, 101, self.FOLLOW_101_in_jump_statement2113) + elif alt78 == 2: + # C.g:451:4: 'continue' ';' + self.match(self.input, 101, self.FOLLOW_101_in_jump_statement2107) if self.failed: return - self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2115) + self.match(self.input, 24, self.FOLLOW_24_in_jump_statement2109) if self.failed: return - elif alt77 == 3: - # C.g:451:4: 'break' ';' - self.match(self.input, 102, self.FOLLOW_102_in_jump_statement2120) + elif alt78 == 3: + # C.g:452:4: 'break' ';' + self.match(self.input, 102, self.FOLLOW_102_in_jump_statement2114) if self.failed: return - self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2122) + self.match(self.input, 24, self.FOLLOW_24_in_jump_statement2116) if self.failed: return - elif alt77 == 4: - # C.g:452:4: 'return' ';' - self.match(self.input, 103, self.FOLLOW_103_in_jump_statement2127) + elif alt78 == 4: + # C.g:453:4: 'return' ';' + self.match(self.input, 103, self.FOLLOW_103_in_jump_statement2121) if self.failed: return - self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2129) + self.match(self.input, 24, self.FOLLOW_24_in_jump_statement2123) if self.failed: return - elif alt77 == 5: - # C.g:453:4: 'return' expression ';' - self.match(self.input, 103, self.FOLLOW_103_in_jump_statement2134) + elif alt78 == 5: + # C.g:454:4: 'return' expression ';' + self.match(self.input, 103, self.FOLLOW_103_in_jump_statement2128) if self.failed: return - self.following.append(self.FOLLOW_expression_in_jump_statement2136) + self.following.append(self.FOLLOW_expression_in_jump_statement2130) self.expression() self.following.pop() if self.failed: return - self.match(self.input, 25, self.FOLLOW_25_in_jump_statement2138) + self.match(self.input, 24, self.FOLLOW_24_in_jump_statement2132) if self.failed: return @@ -7516,9 +7646,9 @@ class CParser(Parser): # $ANTLR start synpred2 def synpred2_fragment(self, ): - # C.g:53:6: ( declaration_specifiers ) - # C.g:53:6: declaration_specifiers - self.following.append(self.FOLLOW_declaration_specifiers_in_synpred2102) + # C.g:63:6: ( declaration_specifiers ) + # C.g:63:6: declaration_specifiers + self.following.append(self.FOLLOW_declaration_specifiers_in_synpred290) self.declaration_specifiers() self.following.pop() if self.failed: @@ -7531,96 +7661,96 @@ class CParser(Parser): # $ANTLR start synpred4 def synpred4_fragment(self, ): - # C.g:53:4: ( ( declaration_specifiers )? declarator ( declaration )* '{' ) - # C.g:53:6: ( declaration_specifiers )? declarator ( declaration )* '{' - # C.g:53:6: ( declaration_specifiers )? - alt78 = 2 - LA78_0 = self.input.LA(1) - - if ((28 <= LA78_0 <= 40) or (43 <= LA78_0 <= 44) or (46 <= LA78_0 <= 50)) : - alt78 = 1 - elif (LA78_0 == IDENTIFIER) : - LA78 = self.input.LA(2) - if LA78 == 55: - alt78 = 1 - elif LA78 == IDENTIFIER: - LA78_18 = self.input.LA(3) + # C.g:63:4: ( ( declaration_specifiers )? declarator ( declaration )* '{' ) + # C.g:63:6: ( declaration_specifiers )? declarator ( declaration )* '{' + # C.g:63:6: ( declaration_specifiers )? + alt79 = 2 + LA79_0 = self.input.LA(1) + + if ((28 <= LA79_0 <= 40) or (43 <= LA79_0 <= 44) or (46 <= LA79_0 <= 50)) : + alt79 = 1 + elif (LA79_0 == IDENTIFIER) : + LA79 = self.input.LA(2) + if LA79 == 51: + LA79_18 = self.input.LA(3) if (self.synpred2()) : - alt78 = 1 - elif LA78 == 51: - LA78_19 = self.input.LA(3) + alt79 = 1 + elif LA79 == 28 or LA79 == 29 or LA79 == 30 or LA79 == 31: + LA79_20 = self.input.LA(3) if (self.synpred2()) : - alt78 = 1 - elif LA78 == 28 or LA78 == 29 or LA78 == 30 or LA78 == 31: - LA78_20 = self.input.LA(3) + alt79 = 1 + elif LA79 == 32: + LA79_21 = self.input.LA(3) if (self.synpred2()) : - alt78 = 1 - elif LA78 == 32: - LA78_21 = self.input.LA(3) + alt79 = 1 + elif LA79 == 33: + LA79_22 = self.input.LA(3) if (self.synpred2()) : - alt78 = 1 - elif LA78 == 33: - LA78_22 = self.input.LA(3) + alt79 = 1 + elif LA79 == 34: + LA79_23 = self.input.LA(3) if (self.synpred2()) : - alt78 = 1 - elif LA78 == 34: - LA78_23 = self.input.LA(3) + alt79 = 1 + elif LA79 == 35: + LA79_24 = self.input.LA(3) if (self.synpred2()) : - alt78 = 1 - elif LA78 == 35: - LA78_24 = self.input.LA(3) + alt79 = 1 + elif LA79 == 36: + LA79_25 = self.input.LA(3) if (self.synpred2()) : - alt78 = 1 - elif LA78 == 36: - LA78_25 = self.input.LA(3) + alt79 = 1 + elif LA79 == 37: + LA79_26 = self.input.LA(3) if (self.synpred2()) : - alt78 = 1 - elif LA78 == 37: - LA78_26 = self.input.LA(3) + alt79 = 1 + elif LA79 == 38: + LA79_27 = self.input.LA(3) if (self.synpred2()) : - alt78 = 1 - elif LA78 == 38: - LA78_27 = self.input.LA(3) + alt79 = 1 + elif LA79 == 39: + LA79_28 = self.input.LA(3) if (self.synpred2()) : - alt78 = 1 - elif LA78 == 39: - LA78_28 = self.input.LA(3) + alt79 = 1 + elif LA79 == 40: + LA79_29 = self.input.LA(3) if (self.synpred2()) : - alt78 = 1 - elif LA78 == 40: - LA78_29 = self.input.LA(3) + alt79 = 1 + elif LA79 == 43 or LA79 == 44: + LA79_30 = self.input.LA(3) if (self.synpred2()) : - alt78 = 1 - elif LA78 == 43 or LA78 == 44: - LA78_30 = self.input.LA(3) + alt79 = 1 + elif LA79 == 46: + LA79_31 = self.input.LA(3) if (self.synpred2()) : - alt78 = 1 - elif LA78 == 46: - LA78_31 = self.input.LA(3) + alt79 = 1 + elif LA79 == IDENTIFIER: + LA79_32 = self.input.LA(3) if (self.synpred2()) : - alt78 = 1 - elif LA78 == 47 or LA78 == 48 or LA78 == 49 or LA78 == 50: - LA78_32 = self.input.LA(3) + alt79 = 1 + elif LA79 == 47 or LA79 == 48 or LA79 == 49 or LA79 == 50: + LA79_33 = self.input.LA(3) if (self.synpred2()) : - alt78 = 1 - if alt78 == 1: + alt79 = 1 + elif LA79 == 55: + alt79 = 1 + if alt79 == 1: # C.g:0:0: declaration_specifiers - self.following.append(self.FOLLOW_declaration_specifiers_in_synpred4102) + self.following.append(self.FOLLOW_declaration_specifiers_in_synpred490) self.declaration_specifiers() self.following.pop() if self.failed: @@ -7628,23 +7758,23 @@ class CParser(Parser): - self.following.append(self.FOLLOW_declarator_in_synpred4105) + self.following.append(self.FOLLOW_declarator_in_synpred493) self.declarator() self.following.pop() if self.failed: return - # C.g:53:41: ( declaration )* - while True: #loop79 - alt79 = 2 - LA79_0 = self.input.LA(1) + # C.g:63:41: ( declaration )* + while True: #loop80 + alt80 = 2 + LA80_0 = self.input.LA(1) - if (LA79_0 == IDENTIFIER or LA79_0 == 24 or (28 <= LA79_0 <= 40) or (43 <= LA79_0 <= 44) or (46 <= LA79_0 <= 50)) : - alt79 = 1 + if (LA80_0 == IDENTIFIER or LA80_0 == 25 or (28 <= LA80_0 <= 40) or (43 <= LA80_0 <= 44) or (46 <= LA80_0 <= 50)) : + alt80 = 1 - if alt79 == 1: + if alt80 == 1: # C.g:0:0: declaration - self.following.append(self.FOLLOW_declaration_in_synpred4107) + self.following.append(self.FOLLOW_declaration_in_synpred495) self.declaration() self.following.pop() if self.failed: @@ -7652,10 +7782,10 @@ class CParser(Parser): else: - break #loop79 + break #loop80 - self.match(self.input, 41, self.FOLLOW_41_in_synpred4110) + self.match(self.input, 41, self.FOLLOW_41_in_synpred498) if self.failed: return @@ -7666,9 +7796,9 @@ class CParser(Parser): # $ANTLR start synpred5 def synpred5_fragment(self, ): - # C.g:54:4: ( declaration ) - # C.g:54:4: declaration - self.following.append(self.FOLLOW_declaration_in_synpred5120) + # C.g:64:4: ( declaration ) + # C.g:64:4: declaration + self.following.append(self.FOLLOW_declaration_in_synpred5108) self.declaration() self.following.pop() if self.failed: @@ -7679,97 +7809,97 @@ class CParser(Parser): - # $ANTLR start synpred6 - def synpred6_fragment(self, ): - # C.g:70:4: ( declaration_specifiers ) - # C.g:70:4: declaration_specifiers - self.following.append(self.FOLLOW_declaration_specifiers_in_synpred6153) + # $ANTLR start synpred7 + def synpred7_fragment(self, ): + # C.g:82:4: ( declaration_specifiers ) + # C.g:82:4: declaration_specifiers + self.following.append(self.FOLLOW_declaration_specifiers_in_synpred7145) self.declaration_specifiers() self.following.pop() if self.failed: return - # $ANTLR end synpred6 + # $ANTLR end synpred7 - # $ANTLR start synpred9 - def synpred9_fragment(self, ): - # C.g:83:16: ( declaration_specifiers ) - # C.g:83:16: declaration_specifiers - self.following.append(self.FOLLOW_declaration_specifiers_in_synpred9206) + # $ANTLR start synpred10 + def synpred10_fragment(self, ): + # C.g:90:18: ( declaration_specifiers ) + # C.g:90:18: declaration_specifiers + self.following.append(self.FOLLOW_declaration_specifiers_in_synpred10191) self.declaration_specifiers() self.following.pop() if self.failed: return - # $ANTLR end synpred9 + # $ANTLR end synpred10 - # $ANTLR start synpred13 - def synpred13_fragment(self, ): - # C.g:91:7: ( type_specifier ) - # C.g:91:7: type_specifier - self.following.append(self.FOLLOW_type_specifier_in_synpred13253) + # $ANTLR start synpred14 + def synpred14_fragment(self, ): + # C.g:104:7: ( type_specifier ) + # C.g:104:7: type_specifier + self.following.append(self.FOLLOW_type_specifier_in_synpred14256) self.type_specifier() self.following.pop() if self.failed: return - # $ANTLR end synpred13 + # $ANTLR end synpred14 - # $ANTLR start synpred31 - def synpred31_fragment(self, ): - # C.g:125:4: ( IDENTIFIER declarator ) - # C.g:125:5: IDENTIFIER declarator - self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred31417) + # $ANTLR start synpred32 + def synpred32_fragment(self, ): + # C.g:136:4: ( IDENTIFIER declarator ) + # C.g:136:5: IDENTIFIER declarator + self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred32419) if self.failed: return - self.following.append(self.FOLLOW_declarator_in_synpred31419) + self.following.append(self.FOLLOW_declarator_in_synpred32421) self.declarator() self.following.pop() if self.failed: return - # $ANTLR end synpred31 + # $ANTLR end synpred32 - # $ANTLR start synpred37 - def synpred37_fragment(self, ): - # C.g:157:23: ( type_specifier ) - # C.g:157:23: type_specifier - self.following.append(self.FOLLOW_type_specifier_in_synpred37554) + # $ANTLR start synpred38 + def synpred38_fragment(self, ): + # C.g:164:23: ( type_specifier ) + # C.g:164:23: type_specifier + self.following.append(self.FOLLOW_type_specifier_in_synpred38545) self.type_specifier() self.following.pop() if self.failed: return - # $ANTLR end synpred37 - + # $ANTLR end synpred38 - # $ANTLR start synpred49 - def synpred49_fragment(self, ): - # C.g:192:4: ( ( pointer )? direct_declarator ) - # C.g:192:4: ( pointer )? direct_declarator - # C.g:192:4: ( pointer )? - alt84 = 2 - LA84_0 = self.input.LA(1) - if (LA84_0 == 55) : - alt84 = 1 - if alt84 == 1: + # $ANTLR start synpred50 + def synpred50_fragment(self, ): + # C.g:199:4: ( ( pointer )? direct_declarator ) + # C.g:199:4: ( pointer )? direct_declarator + # C.g:199:4: ( pointer )? + alt85 = 2 + LA85_0 = self.input.LA(1) + + if (LA85_0 == 55) : + alt85 = 1 + if alt85 == 1: # C.g:0:0: pointer - self.following.append(self.FOLLOW_pointer_in_synpred49717) + self.following.append(self.FOLLOW_pointer_in_synpred50708) self.pointer() self.following.pop() if self.failed: @@ -7777,139 +7907,139 @@ class CParser(Parser): - self.following.append(self.FOLLOW_direct_declarator_in_synpred49720) + self.following.append(self.FOLLOW_direct_declarator_in_synpred50711) self.direct_declarator() self.following.pop() if self.failed: return - # $ANTLR end synpred49 + # $ANTLR end synpred50 - # $ANTLR start synpred50 - def synpred50_fragment(self, ): - # C.g:198:15: ( declarator_suffix ) - # C.g:198:15: declarator_suffix - self.following.append(self.FOLLOW_declarator_suffix_in_synpred50743) + # $ANTLR start synpred51 + def synpred51_fragment(self, ): + # C.g:204:15: ( declarator_suffix ) + # C.g:204:15: declarator_suffix + self.following.append(self.FOLLOW_declarator_suffix_in_synpred51729) self.declarator_suffix() self.following.pop() if self.failed: return - # $ANTLR end synpred50 + # $ANTLR end synpred51 - # $ANTLR start synpred52 - def synpred52_fragment(self, ): - # C.g:200:23: ( declarator_suffix ) - # C.g:200:23: declarator_suffix - self.following.append(self.FOLLOW_declarator_suffix_in_synpred52759) + # $ANTLR start synpred53 + def synpred53_fragment(self, ): + # C.g:205:23: ( declarator_suffix ) + # C.g:205:23: declarator_suffix + self.following.append(self.FOLLOW_declarator_suffix_in_synpred53741) self.declarator_suffix() self.following.pop() if self.failed: return - # $ANTLR end synpred52 + # $ANTLR end synpred53 - # $ANTLR start synpred55 - def synpred55_fragment(self, ): - # C.g:206:9: ( '(' parameter_type_list ')' ) - # C.g:206:9: '(' parameter_type_list ')' - self.match(self.input, 51, self.FOLLOW_51_in_synpred55799) + # $ANTLR start synpred56 + def synpred56_fragment(self, ): + # C.g:211:9: ( '(' parameter_type_list ')' ) + # C.g:211:9: '(' parameter_type_list ')' + self.match(self.input, 51, self.FOLLOW_51_in_synpred56781) if self.failed: return - self.following.append(self.FOLLOW_parameter_type_list_in_synpred55801) + self.following.append(self.FOLLOW_parameter_type_list_in_synpred56783) self.parameter_type_list() self.following.pop() if self.failed: return - self.match(self.input, 52, self.FOLLOW_52_in_synpred55803) + self.match(self.input, 52, self.FOLLOW_52_in_synpred56785) if self.failed: return - # $ANTLR end synpred55 + # $ANTLR end synpred56 - # $ANTLR start synpred56 - def synpred56_fragment(self, ): - # C.g:207:9: ( '(' identifier_list ')' ) - # C.g:207:9: '(' identifier_list ')' - self.match(self.input, 51, self.FOLLOW_51_in_synpred56813) + # $ANTLR start synpred57 + def synpred57_fragment(self, ): + # C.g:212:9: ( '(' identifier_list ')' ) + # C.g:212:9: '(' identifier_list ')' + self.match(self.input, 51, self.FOLLOW_51_in_synpred57795) if self.failed: return - self.following.append(self.FOLLOW_identifier_list_in_synpred56815) + self.following.append(self.FOLLOW_identifier_list_in_synpred57797) self.identifier_list() self.following.pop() if self.failed: return - self.match(self.input, 52, self.FOLLOW_52_in_synpred56817) + self.match(self.input, 52, self.FOLLOW_52_in_synpred57799) if self.failed: return - # $ANTLR end synpred56 + # $ANTLR end synpred57 - # $ANTLR start synpred57 - def synpred57_fragment(self, ): - # C.g:212:8: ( type_qualifier ) - # C.g:212:8: type_qualifier - self.following.append(self.FOLLOW_type_qualifier_in_synpred57842) + # $ANTLR start synpred58 + def synpred58_fragment(self, ): + # C.g:217:8: ( type_qualifier ) + # C.g:217:8: type_qualifier + self.following.append(self.FOLLOW_type_qualifier_in_synpred58824) self.type_qualifier() self.following.pop() if self.failed: return - # $ANTLR end synpred57 + # $ANTLR end synpred58 - # $ANTLR start synpred58 - def synpred58_fragment(self, ): - # C.g:212:24: ( pointer ) - # C.g:212:24: pointer - self.following.append(self.FOLLOW_pointer_in_synpred58845) + # $ANTLR start synpred59 + def synpred59_fragment(self, ): + # C.g:217:24: ( pointer ) + # C.g:217:24: pointer + self.following.append(self.FOLLOW_pointer_in_synpred59827) self.pointer() self.following.pop() if self.failed: return - # $ANTLR end synpred58 + # $ANTLR end synpred59 - # $ANTLR start synpred59 - def synpred59_fragment(self, ): - # C.g:212:4: ( '*' ( type_qualifier )+ ( pointer )? ) - # C.g:212:4: '*' ( type_qualifier )+ ( pointer )? - self.match(self.input, 55, self.FOLLOW_55_in_synpred59840) + # $ANTLR start synpred60 + def synpred60_fragment(self, ): + # C.g:217:4: ( '*' ( type_qualifier )+ ( pointer )? ) + # C.g:217:4: '*' ( type_qualifier )+ ( pointer )? + self.match(self.input, 55, self.FOLLOW_55_in_synpred60822) if self.failed: return - # C.g:212:8: ( type_qualifier )+ - cnt86 = 0 - while True: #loop86 - alt86 = 2 - LA86_0 = self.input.LA(1) + # C.g:217:8: ( type_qualifier )+ + cnt87 = 0 + while True: #loop87 + alt87 = 2 + LA87_0 = self.input.LA(1) - if ((47 <= LA86_0 <= 50)) : - alt86 = 1 + if ((47 <= LA87_0 <= 50)) : + alt87 = 1 - if alt86 == 1: + if alt87 == 1: # C.g:0:0: type_qualifier - self.following.append(self.FOLLOW_type_qualifier_in_synpred59842) + self.following.append(self.FOLLOW_type_qualifier_in_synpred60824) self.type_qualifier() self.following.pop() if self.failed: @@ -7917,28 +8047,28 @@ class CParser(Parser): else: - if cnt86 >= 1: - break #loop86 + if cnt87 >= 1: + break #loop87 if self.backtracking > 0: self.failed = True return - eee = EarlyExitException(86, self.input) + eee = EarlyExitException(87, self.input) raise eee - cnt86 += 1 + cnt87 += 1 - # C.g:212:24: ( pointer )? - alt87 = 2 - LA87_0 = self.input.LA(1) + # C.g:217:24: ( pointer )? + alt88 = 2 + LA88_0 = self.input.LA(1) - if (LA87_0 == 55) : - alt87 = 1 - if alt87 == 1: + if (LA88_0 == 55) : + alt88 = 1 + if alt88 == 1: # C.g:0:0: pointer - self.following.append(self.FOLLOW_pointer_in_synpred59845) + self.following.append(self.FOLLOW_pointer_in_synpred60827) self.pointer() self.following.pop() if self.failed: @@ -7948,76 +8078,76 @@ class CParser(Parser): - # $ANTLR end synpred59 + # $ANTLR end synpred60 - # $ANTLR start synpred60 - def synpred60_fragment(self, ): - # C.g:213:4: ( '*' pointer ) - # C.g:213:4: '*' pointer - self.match(self.input, 55, self.FOLLOW_55_in_synpred60851) + # $ANTLR start synpred61 + def synpred61_fragment(self, ): + # C.g:218:4: ( '*' pointer ) + # C.g:218:4: '*' pointer + self.match(self.input, 55, self.FOLLOW_55_in_synpred61833) if self.failed: return - self.following.append(self.FOLLOW_pointer_in_synpred60853) + self.following.append(self.FOLLOW_pointer_in_synpred61835) self.pointer() self.following.pop() if self.failed: return - # $ANTLR end synpred60 + # $ANTLR end synpred61 - # $ANTLR start synpred63 - def synpred63_fragment(self, ): - # C.g:226:28: ( declarator ) - # C.g:226:28: declarator - self.following.append(self.FOLLOW_declarator_in_synpred63910) + # $ANTLR start synpred64 + def synpred64_fragment(self, ): + # C.g:231:28: ( declarator ) + # C.g:231:28: declarator + self.following.append(self.FOLLOW_declarator_in_synpred64892) self.declarator() self.following.pop() if self.failed: return - # $ANTLR end synpred63 + # $ANTLR end synpred64 - # $ANTLR start synpred64 - def synpred64_fragment(self, ): - # C.g:226:39: ( abstract_declarator ) - # C.g:226:39: abstract_declarator - self.following.append(self.FOLLOW_abstract_declarator_in_synpred64912) + # $ANTLR start synpred65 + def synpred65_fragment(self, ): + # C.g:231:39: ( abstract_declarator ) + # C.g:231:39: abstract_declarator + self.following.append(self.FOLLOW_abstract_declarator_in_synpred65894) self.abstract_declarator() self.following.pop() if self.failed: return - # $ANTLR end synpred64 + # $ANTLR end synpred65 - # $ANTLR start synpred67 - def synpred67_fragment(self, ): - # C.g:235:4: ( specifier_qualifier_list ( abstract_declarator )? ) - # C.g:235:4: specifier_qualifier_list ( abstract_declarator )? - self.following.append(self.FOLLOW_specifier_qualifier_list_in_synpred67951) + # $ANTLR start synpred68 + def synpred68_fragment(self, ): + # C.g:240:4: ( specifier_qualifier_list ( abstract_declarator )? ) + # C.g:240:4: specifier_qualifier_list ( abstract_declarator )? + self.following.append(self.FOLLOW_specifier_qualifier_list_in_synpred68926) self.specifier_qualifier_list() self.following.pop() if self.failed: return - # C.g:235:29: ( abstract_declarator )? - alt88 = 2 - LA88_0 = self.input.LA(1) + # C.g:240:29: ( abstract_declarator )? + alt89 = 2 + LA89_0 = self.input.LA(1) - if (LA88_0 == 51 or LA88_0 == 53 or LA88_0 == 55) : - alt88 = 1 - if alt88 == 1: + if (LA89_0 == 51 or LA89_0 == 53 or LA89_0 == 55) : + alt89 = 1 + if alt89 == 1: # C.g:0:0: abstract_declarator - self.following.append(self.FOLLOW_abstract_declarator_in_synpred67953) + self.following.append(self.FOLLOW_abstract_declarator_in_synpred68928) self.abstract_declarator() self.following.pop() if self.failed: @@ -8027,454 +8157,454 @@ class CParser(Parser): - # $ANTLR end synpred67 + # $ANTLR end synpred68 - # $ANTLR start synpred68 - def synpred68_fragment(self, ): - # C.g:240:12: ( direct_abstract_declarator ) - # C.g:240:12: direct_abstract_declarator - self.following.append(self.FOLLOW_direct_abstract_declarator_in_synpred68972) + # $ANTLR start synpred69 + def synpred69_fragment(self, ): + # C.g:245:12: ( direct_abstract_declarator ) + # C.g:245:12: direct_abstract_declarator + self.following.append(self.FOLLOW_direct_abstract_declarator_in_synpred69947) self.direct_abstract_declarator() self.following.pop() if self.failed: return - # $ANTLR end synpred68 + # $ANTLR end synpred69 - # $ANTLR start synpred71 - def synpred71_fragment(self, ): - # C.g:245:65: ( abstract_declarator_suffix ) - # C.g:245:65: abstract_declarator_suffix - self.following.append(self.FOLLOW_abstract_declarator_suffix_in_synpred711003) + # $ANTLR start synpred72 + def synpred72_fragment(self, ): + # C.g:250:65: ( abstract_declarator_suffix ) + # C.g:250:65: abstract_declarator_suffix + self.following.append(self.FOLLOW_abstract_declarator_suffix_in_synpred72978) self.abstract_declarator_suffix() self.following.pop() if self.failed: return - # $ANTLR end synpred71 + # $ANTLR end synpred72 - # $ANTLR start synpred84 - def synpred84_fragment(self, ): - # C.g:280:4: ( '(' type_name ')' cast_expression ) - # C.g:280:4: '(' type_name ')' cast_expression - self.match(self.input, 51, self.FOLLOW_51_in_synpred841177) + # $ANTLR start synpred85 + def synpred85_fragment(self, ): + # C.g:285:4: ( '(' type_name ')' cast_expression ) + # C.g:285:4: '(' type_name ')' cast_expression + self.match(self.input, 51, self.FOLLOW_51_in_synpred851152) if self.failed: return - self.following.append(self.FOLLOW_type_name_in_synpred841179) + self.following.append(self.FOLLOW_type_name_in_synpred851154) self.type_name() self.following.pop() if self.failed: return - self.match(self.input, 52, self.FOLLOW_52_in_synpred841181) + self.match(self.input, 52, self.FOLLOW_52_in_synpred851156) if self.failed: return - self.following.append(self.FOLLOW_cast_expression_in_synpred841183) + self.following.append(self.FOLLOW_cast_expression_in_synpred851158) self.cast_expression() self.following.pop() if self.failed: return - # $ANTLR end synpred84 + # $ANTLR end synpred85 - # $ANTLR start synpred89 - def synpred89_fragment(self, ): - # C.g:289:4: ( 'sizeof' unary_expression ) - # C.g:289:4: 'sizeof' unary_expression - self.match(self.input, 63, self.FOLLOW_63_in_synpred891225) + # $ANTLR start synpred90 + def synpred90_fragment(self, ): + # C.g:294:4: ( 'sizeof' unary_expression ) + # C.g:294:4: 'sizeof' unary_expression + self.match(self.input, 63, self.FOLLOW_63_in_synpred901200) if self.failed: return - self.following.append(self.FOLLOW_unary_expression_in_synpred891227) + self.following.append(self.FOLLOW_unary_expression_in_synpred901202) self.unary_expression() self.following.pop() if self.failed: return - # $ANTLR end synpred89 + # $ANTLR end synpred90 - # $ANTLR start synpred94 - def synpred94_fragment(self, ): - # C.g:299:13: ( '*' IDENTIFIER ) - # C.g:299:13: '*' IDENTIFIER - self.match(self.input, 55, self.FOLLOW_55_in_synpred941333) + # $ANTLR start synpred95 + def synpred95_fragment(self, ): + # C.g:304:13: ( '*' IDENTIFIER ) + # C.g:304:13: '*' IDENTIFIER + self.match(self.input, 55, self.FOLLOW_55_in_synpred951317) if self.failed: return - self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred941335) + self.match(self.input, IDENTIFIER, self.FOLLOW_IDENTIFIER_in_synpred951319) if self.failed: return - # $ANTLR end synpred94 + # $ANTLR end synpred95 - # $ANTLR start synpred111 - def synpred111_fragment(self, ): - # C.g:341:4: ( lvalue assignment_operator assignment_expression ) - # C.g:341:4: lvalue assignment_operator assignment_expression - self.following.append(self.FOLLOW_lvalue_in_synpred1111558) + # $ANTLR start synpred112 + def synpred112_fragment(self, ): + # C.g:346:4: ( lvalue assignment_operator assignment_expression ) + # C.g:346:4: lvalue assignment_operator assignment_expression + self.following.append(self.FOLLOW_lvalue_in_synpred1121542) self.lvalue() self.following.pop() if self.failed: return - self.following.append(self.FOLLOW_assignment_operator_in_synpred1111560) + self.following.append(self.FOLLOW_assignment_operator_in_synpred1121544) self.assignment_operator() self.following.pop() if self.failed: return - self.following.append(self.FOLLOW_assignment_expression_in_synpred1111562) + self.following.append(self.FOLLOW_assignment_expression_in_synpred1121546) self.assignment_expression() self.following.pop() if self.failed: return - # $ANTLR end synpred111 + # $ANTLR end synpred112 - # $ANTLR start synpred138 - def synpred138_fragment(self, ): - # C.g:403:4: ( expression_statement ) - # C.g:403:4: expression_statement - self.following.append(self.FOLLOW_expression_statement_in_synpred1381844) + # $ANTLR start synpred139 + def synpred139_fragment(self, ): + # C.g:408:4: ( expression_statement ) + # C.g:408:4: expression_statement + self.following.append(self.FOLLOW_expression_statement_in_synpred1391833) self.expression_statement() self.following.pop() if self.failed: return - # $ANTLR end synpred138 + # $ANTLR end synpred139 - # $ANTLR start synpred143 - def synpred143_fragment(self, ): - # C.g:411:33: ( declaration ) - # C.g:411:33: declaration - self.following.append(self.FOLLOW_declaration_in_synpred1431884) + # $ANTLR start synpred144 + def synpred144_fragment(self, ): + # C.g:416:33: ( declaration ) + # C.g:416:33: declaration + self.following.append(self.FOLLOW_declaration_in_synpred1441873) self.declaration() self.following.pop() if self.failed: return - # $ANTLR end synpred143 + # $ANTLR end synpred144 - # $ANTLR start synpred147 - def synpred147_fragment(self, ): - # C.g:425:8: ( declaration ) - # C.g:425:8: declaration - self.following.append(self.FOLLOW_declaration_in_synpred1471952) + # $ANTLR start synpred148 + def synpred148_fragment(self, ): + # C.g:426:8: ( declaration ) + # C.g:426:8: declaration + self.following.append(self.FOLLOW_declaration_in_synpred1481930) self.declaration() self.following.pop() if self.failed: return - # $ANTLR end synpred147 + # $ANTLR end synpred148 - def synpred143(self): + def synpred53(self): self.backtracking += 1 start = self.input.mark() - self.synpred143_fragment() + self.synpred53_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred37(self): + def synpred139(self): self.backtracking += 1 start = self.input.mark() - self.synpred37_fragment() + self.synpred139_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred84(self): + def synpred7(self): self.backtracking += 1 start = self.input.mark() - self.synpred84_fragment() + self.synpred7_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred68(self): + def synpred14(self): self.backtracking += 1 start = self.input.mark() - self.synpred68_fragment() + self.synpred14_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred49(self): + def synpred65(self): self.backtracking += 1 start = self.input.mark() - self.synpred49_fragment() + self.synpred65_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred4(self): + def synpred68(self): self.backtracking += 1 start = self.input.mark() - self.synpred4_fragment() + self.synpred68_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred31(self): + def synpred38(self): self.backtracking += 1 start = self.input.mark() - self.synpred31_fragment() + self.synpred38_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred9(self): + def synpred4(self): self.backtracking += 1 start = self.input.mark() - self.synpred9_fragment() + self.synpred4_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred56(self): + def synpred112(self): self.backtracking += 1 start = self.input.mark() - self.synpred56_fragment() + self.synpred112_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred111(self): + def synpred85(self): self.backtracking += 1 start = self.input.mark() - self.synpred111_fragment() + self.synpred85_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred63(self): + def synpred148(self): self.backtracking += 1 start = self.input.mark() - self.synpred63_fragment() + self.synpred148_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred59(self): + def synpred56(self): self.backtracking += 1 start = self.input.mark() - self.synpred59_fragment() + self.synpred56_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred2(self): + def synpred59(self): self.backtracking += 1 start = self.input.mark() - self.synpred2_fragment() + self.synpred59_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred50(self): + def synpred90(self): self.backtracking += 1 start = self.input.mark() - self.synpred50_fragment() + self.synpred90_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred94(self): + def synpred61(self): self.backtracking += 1 start = self.input.mark() - self.synpred94_fragment() + self.synpred61_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred58(self): + def synpred2(self): self.backtracking += 1 start = self.input.mark() - self.synpred58_fragment() + self.synpred2_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred147(self): + def synpred50(self): self.backtracking += 1 start = self.input.mark() - self.synpred147_fragment() + self.synpred50_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred64(self): + def synpred69(self): self.backtracking += 1 start = self.input.mark() - self.synpred64_fragment() + self.synpred69_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred89(self): + def synpred72(self): self.backtracking += 1 start = self.input.mark() - self.synpred89_fragment() + self.synpred72_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred57(self): + def synpred58(self): self.backtracking += 1 start = self.input.mark() - self.synpred57_fragment() + self.synpred58_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred52(self): + def synpred32(self): self.backtracking += 1 start = self.input.mark() - self.synpred52_fragment() + self.synpred32_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred67(self): + def synpred95(self): self.backtracking += 1 start = self.input.mark() - self.synpred67_fragment() + self.synpred95_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred5(self): + def synpred64(self): self.backtracking += 1 start = self.input.mark() - self.synpred5_fragment() + self.synpred64_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred6(self): + def synpred51(self): self.backtracking += 1 start = self.input.mark() - self.synpred6_fragment() + self.synpred51_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred60(self): + def synpred57(self): self.backtracking += 1 start = self.input.mark() - self.synpred60_fragment() + self.synpred57_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred138(self): + def synpred10(self): self.backtracking += 1 start = self.input.mark() - self.synpred138_fragment() + self.synpred10_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred13(self): + def synpred5(self): self.backtracking += 1 start = self.input.mark() - self.synpred13_fragment() + self.synpred5_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred71(self): + def synpred60(self): self.backtracking += 1 start = self.input.mark() - self.synpred71_fragment() + self.synpred60_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 self.failed = False return success - def synpred55(self): + def synpred144(self): self.backtracking += 1 start = self.input.mark() - self.synpred55_fragment() + self.synpred144_fragment() success = not self.failed self.input.rewind(start) self.backtracking -= 1 @@ -8485,371 +8615,372 @@ class CParser(Parser): - FOLLOW_external_declaration_in_translation_unit76 = frozenset([1, 4, 24, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50, 51, 55]) - FOLLOW_function_definition_in_external_declaration115 = frozenset([1]) - FOLLOW_declaration_in_external_declaration120 = frozenset([1]) - FOLLOW_macro_statement_in_external_declaration125 = frozenset([1]) - FOLLOW_declaration_specifiers_in_function_definition153 = frozenset([4, 51, 55]) - FOLLOW_declarator_in_function_definition156 = frozenset([4, 24, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 46, 47, 48, 49, 50]) - FOLLOW_declaration_in_function_definition162 = frozenset([4, 24, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 46, 47, 48, 49, 50]) - FOLLOW_compound_statement_in_function_definition165 = frozenset([1]) - FOLLOW_compound_statement_in_function_definition172 = frozenset([1]) - FOLLOW_24_in_declaration204 = frozenset([4, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50, 51, 55]) - FOLLOW_declaration_specifiers_in_declaration206 = frozenset([4, 51, 55]) - FOLLOW_init_declarator_list_in_declaration213 = frozenset([25]) - FOLLOW_25_in_declaration215 = frozenset([1]) - FOLLOW_declaration_specifiers_in_declaration221 = frozenset([4, 25, 51, 55]) - FOLLOW_init_declarator_list_in_declaration223 = frozenset([25]) - FOLLOW_25_in_declaration226 = frozenset([1]) - FOLLOW_storage_class_specifier_in_declaration_specifiers245 = frozenset([1, 4, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) - FOLLOW_type_specifier_in_declaration_specifiers253 = frozenset([1, 4, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) - FOLLOW_type_qualifier_in_declaration_specifiers267 = frozenset([1, 4, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) - FOLLOW_init_declarator_in_init_declarator_list289 = frozenset([1, 26]) - FOLLOW_26_in_init_declarator_list292 = frozenset([4, 51, 55]) - FOLLOW_init_declarator_in_init_declarator_list294 = frozenset([1, 26]) - FOLLOW_declarator_in_init_declarator307 = frozenset([1, 27]) - FOLLOW_27_in_init_declarator310 = frozenset([4, 5, 6, 7, 8, 9, 10, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_initializer_in_init_declarator312 = frozenset([1]) + FOLLOW_external_declaration_in_translation_unit64 = frozenset([1, 4, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50, 51, 55]) + FOLLOW_function_definition_in_external_declaration103 = frozenset([1]) + FOLLOW_declaration_in_external_declaration108 = frozenset([1]) + FOLLOW_macro_statement_in_external_declaration113 = frozenset([1, 24]) + FOLLOW_24_in_external_declaration116 = frozenset([1]) + FOLLOW_declaration_specifiers_in_function_definition145 = frozenset([4, 51, 55]) + FOLLOW_declarator_in_function_definition148 = frozenset([4, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 46, 47, 48, 49, 50]) + FOLLOW_declaration_in_function_definition154 = frozenset([4, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 46, 47, 48, 49, 50]) + FOLLOW_compound_statement_in_function_definition157 = frozenset([1]) + FOLLOW_compound_statement_in_function_definition164 = frozenset([1]) + FOLLOW_25_in_declaration187 = frozenset([4, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50, 51, 55]) + FOLLOW_declaration_specifiers_in_declaration191 = frozenset([4, 51, 55]) + FOLLOW_init_declarator_list_in_declaration200 = frozenset([24]) + FOLLOW_24_in_declaration204 = frozenset([1]) + FOLLOW_declaration_specifiers_in_declaration218 = frozenset([4, 24, 51, 55]) + FOLLOW_init_declarator_list_in_declaration222 = frozenset([24]) + FOLLOW_24_in_declaration227 = frozenset([1]) + FOLLOW_storage_class_specifier_in_declaration_specifiers248 = frozenset([1, 4, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) + FOLLOW_type_specifier_in_declaration_specifiers256 = frozenset([1, 4, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) + FOLLOW_type_qualifier_in_declaration_specifiers270 = frozenset([1, 4, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) + FOLLOW_init_declarator_in_init_declarator_list292 = frozenset([1, 26]) + FOLLOW_26_in_init_declarator_list295 = frozenset([4, 51, 55]) + FOLLOW_init_declarator_in_init_declarator_list297 = frozenset([1, 26]) + FOLLOW_declarator_in_init_declarator310 = frozenset([1, 27]) + FOLLOW_27_in_init_declarator313 = frozenset([4, 5, 6, 7, 8, 9, 10, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_initializer_in_init_declarator315 = frozenset([1]) FOLLOW_set_in_storage_class_specifier0 = frozenset([1]) - FOLLOW_32_in_type_specifier361 = frozenset([1]) - FOLLOW_33_in_type_specifier366 = frozenset([1]) - FOLLOW_34_in_type_specifier371 = frozenset([1]) - FOLLOW_35_in_type_specifier376 = frozenset([1]) - FOLLOW_36_in_type_specifier381 = frozenset([1]) - FOLLOW_37_in_type_specifier386 = frozenset([1]) - FOLLOW_38_in_type_specifier391 = frozenset([1]) - FOLLOW_39_in_type_specifier396 = frozenset([1]) - FOLLOW_40_in_type_specifier401 = frozenset([1]) - FOLLOW_struct_or_union_specifier_in_type_specifier406 = frozenset([1]) + FOLLOW_32_in_type_specifier355 = frozenset([1]) + FOLLOW_33_in_type_specifier360 = frozenset([1]) + FOLLOW_34_in_type_specifier365 = frozenset([1]) + FOLLOW_35_in_type_specifier370 = frozenset([1]) + FOLLOW_36_in_type_specifier375 = frozenset([1]) + FOLLOW_37_in_type_specifier380 = frozenset([1]) + FOLLOW_38_in_type_specifier385 = frozenset([1]) + FOLLOW_39_in_type_specifier390 = frozenset([1]) + FOLLOW_40_in_type_specifier395 = frozenset([1]) + FOLLOW_struct_or_union_specifier_in_type_specifier402 = frozenset([1]) FOLLOW_enum_specifier_in_type_specifier411 = frozenset([1]) - FOLLOW_type_id_in_type_specifier423 = frozenset([1]) - FOLLOW_IDENTIFIER_in_type_id439 = frozenset([1]) - FOLLOW_struct_or_union_in_struct_or_union_specifier478 = frozenset([4, 41]) - FOLLOW_IDENTIFIER_in_struct_or_union_specifier480 = frozenset([41]) - FOLLOW_41_in_struct_or_union_specifier483 = frozenset([4, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) - FOLLOW_struct_declaration_list_in_struct_or_union_specifier485 = frozenset([42]) - FOLLOW_42_in_struct_or_union_specifier487 = frozenset([1]) - FOLLOW_struct_or_union_in_struct_or_union_specifier492 = frozenset([4]) - FOLLOW_IDENTIFIER_in_struct_or_union_specifier494 = frozenset([1]) + FOLLOW_type_id_in_type_specifier425 = frozenset([1]) + FOLLOW_IDENTIFIER_in_type_id441 = frozenset([1]) + FOLLOW_struct_or_union_in_struct_or_union_specifier469 = frozenset([4, 41]) + FOLLOW_IDENTIFIER_in_struct_or_union_specifier471 = frozenset([41]) + FOLLOW_41_in_struct_or_union_specifier474 = frozenset([4, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) + FOLLOW_struct_declaration_list_in_struct_or_union_specifier476 = frozenset([42]) + FOLLOW_42_in_struct_or_union_specifier478 = frozenset([1]) + FOLLOW_struct_or_union_in_struct_or_union_specifier483 = frozenset([4]) + FOLLOW_IDENTIFIER_in_struct_or_union_specifier485 = frozenset([1]) FOLLOW_set_in_struct_or_union0 = frozenset([1]) - FOLLOW_struct_declaration_in_struct_declaration_list521 = frozenset([1, 4, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) - FOLLOW_specifier_qualifier_list_in_struct_declaration533 = frozenset([4, 45, 51, 55]) - FOLLOW_struct_declarator_list_in_struct_declaration535 = frozenset([25]) - FOLLOW_25_in_struct_declaration537 = frozenset([1]) - FOLLOW_type_qualifier_in_specifier_qualifier_list550 = frozenset([1, 4, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) - FOLLOW_type_specifier_in_specifier_qualifier_list554 = frozenset([1, 4, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) - FOLLOW_struct_declarator_in_struct_declarator_list568 = frozenset([1, 26]) - FOLLOW_26_in_struct_declarator_list571 = frozenset([4, 45, 51, 55]) - FOLLOW_struct_declarator_in_struct_declarator_list573 = frozenset([1, 26]) - FOLLOW_declarator_in_struct_declarator586 = frozenset([1, 45]) + FOLLOW_struct_declaration_in_struct_declaration_list512 = frozenset([1, 4, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) + FOLLOW_specifier_qualifier_list_in_struct_declaration524 = frozenset([4, 45, 51, 55]) + FOLLOW_struct_declarator_list_in_struct_declaration526 = frozenset([24]) + FOLLOW_24_in_struct_declaration528 = frozenset([1]) + FOLLOW_type_qualifier_in_specifier_qualifier_list541 = frozenset([1, 4, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) + FOLLOW_type_specifier_in_specifier_qualifier_list545 = frozenset([1, 4, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) + FOLLOW_struct_declarator_in_struct_declarator_list559 = frozenset([1, 26]) + FOLLOW_26_in_struct_declarator_list562 = frozenset([4, 45, 51, 55]) + FOLLOW_struct_declarator_in_struct_declarator_list564 = frozenset([1, 26]) + FOLLOW_declarator_in_struct_declarator577 = frozenset([1, 45]) + FOLLOW_45_in_struct_declarator580 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_constant_expression_in_struct_declarator582 = frozenset([1]) FOLLOW_45_in_struct_declarator589 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) FOLLOW_constant_expression_in_struct_declarator591 = frozenset([1]) - FOLLOW_45_in_struct_declarator598 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_constant_expression_in_struct_declarator600 = frozenset([1]) - FOLLOW_46_in_enum_specifier618 = frozenset([41]) - FOLLOW_41_in_enum_specifier620 = frozenset([4]) - FOLLOW_enumerator_list_in_enum_specifier622 = frozenset([42]) - FOLLOW_42_in_enum_specifier624 = frozenset([1]) - FOLLOW_46_in_enum_specifier629 = frozenset([4]) - FOLLOW_IDENTIFIER_in_enum_specifier631 = frozenset([41]) - FOLLOW_41_in_enum_specifier633 = frozenset([4]) - FOLLOW_enumerator_list_in_enum_specifier635 = frozenset([42]) - FOLLOW_42_in_enum_specifier637 = frozenset([1]) - FOLLOW_46_in_enum_specifier642 = frozenset([4]) - FOLLOW_IDENTIFIER_in_enum_specifier644 = frozenset([1]) - FOLLOW_enumerator_in_enumerator_list655 = frozenset([1, 26]) - FOLLOW_26_in_enumerator_list658 = frozenset([4]) - FOLLOW_enumerator_in_enumerator_list660 = frozenset([1, 26]) - FOLLOW_IDENTIFIER_in_enumerator673 = frozenset([1, 27]) - FOLLOW_27_in_enumerator676 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_constant_expression_in_enumerator678 = frozenset([1]) + FOLLOW_46_in_enum_specifier609 = frozenset([41]) + FOLLOW_41_in_enum_specifier611 = frozenset([4]) + FOLLOW_enumerator_list_in_enum_specifier613 = frozenset([42]) + FOLLOW_42_in_enum_specifier615 = frozenset([1]) + FOLLOW_46_in_enum_specifier620 = frozenset([4]) + FOLLOW_IDENTIFIER_in_enum_specifier622 = frozenset([41]) + FOLLOW_41_in_enum_specifier624 = frozenset([4]) + FOLLOW_enumerator_list_in_enum_specifier626 = frozenset([42]) + FOLLOW_42_in_enum_specifier628 = frozenset([1]) + FOLLOW_46_in_enum_specifier633 = frozenset([4]) + FOLLOW_IDENTIFIER_in_enum_specifier635 = frozenset([1]) + FOLLOW_enumerator_in_enumerator_list646 = frozenset([1, 26]) + FOLLOW_26_in_enumerator_list649 = frozenset([4]) + FOLLOW_enumerator_in_enumerator_list651 = frozenset([1, 26]) + FOLLOW_IDENTIFIER_in_enumerator664 = frozenset([1, 27]) + FOLLOW_27_in_enumerator667 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_constant_expression_in_enumerator669 = frozenset([1]) FOLLOW_set_in_type_qualifier0 = frozenset([1]) - FOLLOW_pointer_in_declarator717 = frozenset([4, 51]) - FOLLOW_direct_declarator_in_declarator720 = frozenset([1]) - FOLLOW_pointer_in_declarator725 = frozenset([1]) - FOLLOW_IDENTIFIER_in_direct_declarator741 = frozenset([1, 51, 53]) - FOLLOW_declarator_suffix_in_direct_declarator743 = frozenset([1, 51, 53]) - FOLLOW_51_in_direct_declarator753 = frozenset([4, 51, 55]) - FOLLOW_declarator_in_direct_declarator755 = frozenset([52]) - FOLLOW_52_in_direct_declarator757 = frozenset([51, 53]) - FOLLOW_declarator_suffix_in_direct_declarator759 = frozenset([1, 51, 53]) - FOLLOW_53_in_declarator_suffix773 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_constant_expression_in_declarator_suffix775 = frozenset([54]) - FOLLOW_54_in_declarator_suffix777 = frozenset([1]) - FOLLOW_53_in_declarator_suffix787 = frozenset([54]) - FOLLOW_54_in_declarator_suffix789 = frozenset([1]) - FOLLOW_51_in_declarator_suffix799 = frozenset([4, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) - FOLLOW_parameter_type_list_in_declarator_suffix801 = frozenset([52]) - FOLLOW_52_in_declarator_suffix803 = frozenset([1]) - FOLLOW_51_in_declarator_suffix813 = frozenset([4]) - FOLLOW_identifier_list_in_declarator_suffix815 = frozenset([52]) - FOLLOW_52_in_declarator_suffix817 = frozenset([1]) - FOLLOW_51_in_declarator_suffix827 = frozenset([52]) - FOLLOW_52_in_declarator_suffix829 = frozenset([1]) - FOLLOW_55_in_pointer840 = frozenset([47, 48, 49, 50]) - FOLLOW_type_qualifier_in_pointer842 = frozenset([1, 47, 48, 49, 50, 55]) - FOLLOW_pointer_in_pointer845 = frozenset([1]) - FOLLOW_55_in_pointer851 = frozenset([55]) - FOLLOW_pointer_in_pointer853 = frozenset([1]) - FOLLOW_55_in_pointer860 = frozenset([1]) - FOLLOW_parameter_list_in_parameter_type_list871 = frozenset([1, 26]) - FOLLOW_26_in_parameter_type_list874 = frozenset([56]) - FOLLOW_56_in_parameter_type_list876 = frozenset([1]) - FOLLOW_parameter_declaration_in_parameter_list889 = frozenset([1, 26]) - FOLLOW_26_in_parameter_list892 = frozenset([4, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) - FOLLOW_parameter_declaration_in_parameter_list894 = frozenset([1, 26]) - FOLLOW_declaration_specifiers_in_parameter_declaration907 = frozenset([4, 51, 53, 55]) - FOLLOW_declarator_in_parameter_declaration910 = frozenset([1, 4, 51, 53, 55]) - FOLLOW_abstract_declarator_in_parameter_declaration912 = frozenset([1, 4, 51, 53, 55]) - FOLLOW_IDENTIFIER_in_identifier_list927 = frozenset([1, 26]) - FOLLOW_26_in_identifier_list932 = frozenset([4]) - FOLLOW_IDENTIFIER_in_identifier_list936 = frozenset([1, 26]) - FOLLOW_specifier_qualifier_list_in_type_name951 = frozenset([1, 51, 53, 55]) - FOLLOW_abstract_declarator_in_type_name953 = frozenset([1]) - FOLLOW_type_id_in_type_name959 = frozenset([1]) - FOLLOW_pointer_in_abstract_declarator970 = frozenset([1, 51, 53]) - FOLLOW_direct_abstract_declarator_in_abstract_declarator972 = frozenset([1]) - FOLLOW_direct_abstract_declarator_in_abstract_declarator978 = frozenset([1]) - FOLLOW_51_in_direct_abstract_declarator991 = frozenset([51, 53, 55]) - FOLLOW_abstract_declarator_in_direct_abstract_declarator993 = frozenset([52]) - FOLLOW_52_in_direct_abstract_declarator995 = frozenset([1, 51, 53]) - FOLLOW_abstract_declarator_suffix_in_direct_abstract_declarator999 = frozenset([1, 51, 53]) - FOLLOW_abstract_declarator_suffix_in_direct_abstract_declarator1003 = frozenset([1, 51, 53]) - FOLLOW_53_in_abstract_declarator_suffix1015 = frozenset([54]) - FOLLOW_54_in_abstract_declarator_suffix1017 = frozenset([1]) - FOLLOW_53_in_abstract_declarator_suffix1022 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_constant_expression_in_abstract_declarator_suffix1024 = frozenset([54]) - FOLLOW_54_in_abstract_declarator_suffix1026 = frozenset([1]) - FOLLOW_51_in_abstract_declarator_suffix1031 = frozenset([52]) - FOLLOW_52_in_abstract_declarator_suffix1033 = frozenset([1]) - FOLLOW_51_in_abstract_declarator_suffix1038 = frozenset([4, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) - FOLLOW_parameter_type_list_in_abstract_declarator_suffix1040 = frozenset([52]) - FOLLOW_52_in_abstract_declarator_suffix1042 = frozenset([1]) - FOLLOW_assignment_expression_in_initializer1055 = frozenset([1]) - FOLLOW_41_in_initializer1060 = frozenset([4, 5, 6, 7, 8, 9, 10, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_initializer_list_in_initializer1062 = frozenset([26, 42]) - FOLLOW_26_in_initializer1064 = frozenset([42]) - FOLLOW_42_in_initializer1067 = frozenset([1]) - FOLLOW_initializer_in_initializer_list1078 = frozenset([1, 26]) - FOLLOW_26_in_initializer_list1081 = frozenset([4, 5, 6, 7, 8, 9, 10, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_initializer_in_initializer_list1083 = frozenset([1, 26]) - FOLLOW_assignment_expression_in_argument_expression_list1101 = frozenset([1, 26]) - FOLLOW_26_in_argument_expression_list1104 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_assignment_expression_in_argument_expression_list1106 = frozenset([1, 26]) - FOLLOW_multiplicative_expression_in_additive_expression1120 = frozenset([1, 57, 58]) - FOLLOW_57_in_additive_expression1124 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_multiplicative_expression_in_additive_expression1126 = frozenset([1, 57, 58]) - FOLLOW_58_in_additive_expression1130 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_multiplicative_expression_in_additive_expression1132 = frozenset([1, 57, 58]) - FOLLOW_cast_expression_in_multiplicative_expression1146 = frozenset([1, 55, 59, 60]) - FOLLOW_55_in_multiplicative_expression1150 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_cast_expression_in_multiplicative_expression1152 = frozenset([1, 55, 59, 60]) - FOLLOW_59_in_multiplicative_expression1156 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_cast_expression_in_multiplicative_expression1158 = frozenset([1, 55, 59, 60]) - FOLLOW_60_in_multiplicative_expression1162 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_cast_expression_in_multiplicative_expression1164 = frozenset([1, 55, 59, 60]) - FOLLOW_51_in_cast_expression1177 = frozenset([4, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) - FOLLOW_type_name_in_cast_expression1179 = frozenset([52]) - FOLLOW_52_in_cast_expression1181 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_cast_expression_in_cast_expression1183 = frozenset([1]) - FOLLOW_unary_expression_in_cast_expression1188 = frozenset([1]) - FOLLOW_postfix_expression_in_unary_expression1199 = frozenset([1]) - FOLLOW_61_in_unary_expression1204 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_unary_expression_in_unary_expression1206 = frozenset([1]) - FOLLOW_62_in_unary_expression1211 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_unary_expression_in_unary_expression1213 = frozenset([1]) - FOLLOW_unary_operator_in_unary_expression1218 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_cast_expression_in_unary_expression1220 = frozenset([1]) - FOLLOW_63_in_unary_expression1225 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_unary_expression_in_unary_expression1227 = frozenset([1]) - FOLLOW_63_in_unary_expression1232 = frozenset([51]) - FOLLOW_51_in_unary_expression1234 = frozenset([4, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) - FOLLOW_type_name_in_unary_expression1236 = frozenset([52]) - FOLLOW_52_in_unary_expression1238 = frozenset([1]) - FOLLOW_primary_expression_in_postfix_expression1251 = frozenset([1, 51, 53, 55, 61, 62, 64, 65]) - FOLLOW_53_in_postfix_expression1265 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_expression_in_postfix_expression1267 = frozenset([54]) - FOLLOW_54_in_postfix_expression1269 = frozenset([1, 51, 53, 55, 61, 62, 64, 65]) - FOLLOW_51_in_postfix_expression1283 = frozenset([52]) - FOLLOW_52_in_postfix_expression1285 = frozenset([1, 51, 53, 55, 61, 62, 64, 65]) - FOLLOW_51_in_postfix_expression1299 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_argument_expression_list_in_postfix_expression1301 = frozenset([52]) - FOLLOW_52_in_postfix_expression1303 = frozenset([1, 51, 53, 55, 61, 62, 64, 65]) - FOLLOW_64_in_postfix_expression1317 = frozenset([4]) + FOLLOW_pointer_in_declarator708 = frozenset([4, 51]) + FOLLOW_direct_declarator_in_declarator711 = frozenset([1]) + FOLLOW_pointer_in_declarator716 = frozenset([1]) + FOLLOW_IDENTIFIER_in_direct_declarator727 = frozenset([1, 51, 53]) + FOLLOW_declarator_suffix_in_direct_declarator729 = frozenset([1, 51, 53]) + FOLLOW_51_in_direct_declarator735 = frozenset([4, 51, 55]) + FOLLOW_declarator_in_direct_declarator737 = frozenset([52]) + FOLLOW_52_in_direct_declarator739 = frozenset([51, 53]) + FOLLOW_declarator_suffix_in_direct_declarator741 = frozenset([1, 51, 53]) + FOLLOW_53_in_declarator_suffix755 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_constant_expression_in_declarator_suffix757 = frozenset([54]) + FOLLOW_54_in_declarator_suffix759 = frozenset([1]) + FOLLOW_53_in_declarator_suffix769 = frozenset([54]) + FOLLOW_54_in_declarator_suffix771 = frozenset([1]) + FOLLOW_51_in_declarator_suffix781 = frozenset([4, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) + FOLLOW_parameter_type_list_in_declarator_suffix783 = frozenset([52]) + FOLLOW_52_in_declarator_suffix785 = frozenset([1]) + FOLLOW_51_in_declarator_suffix795 = frozenset([4]) + FOLLOW_identifier_list_in_declarator_suffix797 = frozenset([52]) + FOLLOW_52_in_declarator_suffix799 = frozenset([1]) + FOLLOW_51_in_declarator_suffix809 = frozenset([52]) + FOLLOW_52_in_declarator_suffix811 = frozenset([1]) + FOLLOW_55_in_pointer822 = frozenset([47, 48, 49, 50]) + FOLLOW_type_qualifier_in_pointer824 = frozenset([1, 47, 48, 49, 50, 55]) + FOLLOW_pointer_in_pointer827 = frozenset([1]) + FOLLOW_55_in_pointer833 = frozenset([55]) + FOLLOW_pointer_in_pointer835 = frozenset([1]) + FOLLOW_55_in_pointer842 = frozenset([1]) + FOLLOW_parameter_list_in_parameter_type_list853 = frozenset([1, 26]) + FOLLOW_26_in_parameter_type_list856 = frozenset([56]) + FOLLOW_56_in_parameter_type_list858 = frozenset([1]) + FOLLOW_parameter_declaration_in_parameter_list871 = frozenset([1, 26]) + FOLLOW_26_in_parameter_list874 = frozenset([4, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) + FOLLOW_parameter_declaration_in_parameter_list876 = frozenset([1, 26]) + FOLLOW_declaration_specifiers_in_parameter_declaration889 = frozenset([4, 51, 53, 55]) + FOLLOW_declarator_in_parameter_declaration892 = frozenset([1, 4, 51, 53, 55]) + FOLLOW_abstract_declarator_in_parameter_declaration894 = frozenset([1, 4, 51, 53, 55]) + FOLLOW_IDENTIFIER_in_identifier_list907 = frozenset([1, 26]) + FOLLOW_26_in_identifier_list911 = frozenset([4]) + FOLLOW_IDENTIFIER_in_identifier_list913 = frozenset([1, 26]) + FOLLOW_specifier_qualifier_list_in_type_name926 = frozenset([1, 51, 53, 55]) + FOLLOW_abstract_declarator_in_type_name928 = frozenset([1]) + FOLLOW_type_id_in_type_name934 = frozenset([1]) + FOLLOW_pointer_in_abstract_declarator945 = frozenset([1, 51, 53]) + FOLLOW_direct_abstract_declarator_in_abstract_declarator947 = frozenset([1]) + FOLLOW_direct_abstract_declarator_in_abstract_declarator953 = frozenset([1]) + FOLLOW_51_in_direct_abstract_declarator966 = frozenset([51, 53, 55]) + FOLLOW_abstract_declarator_in_direct_abstract_declarator968 = frozenset([52]) + FOLLOW_52_in_direct_abstract_declarator970 = frozenset([1, 51, 53]) + FOLLOW_abstract_declarator_suffix_in_direct_abstract_declarator974 = frozenset([1, 51, 53]) + FOLLOW_abstract_declarator_suffix_in_direct_abstract_declarator978 = frozenset([1, 51, 53]) + FOLLOW_53_in_abstract_declarator_suffix990 = frozenset([54]) + FOLLOW_54_in_abstract_declarator_suffix992 = frozenset([1]) + FOLLOW_53_in_abstract_declarator_suffix997 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_constant_expression_in_abstract_declarator_suffix999 = frozenset([54]) + FOLLOW_54_in_abstract_declarator_suffix1001 = frozenset([1]) + FOLLOW_51_in_abstract_declarator_suffix1006 = frozenset([52]) + FOLLOW_52_in_abstract_declarator_suffix1008 = frozenset([1]) + FOLLOW_51_in_abstract_declarator_suffix1013 = frozenset([4, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) + FOLLOW_parameter_type_list_in_abstract_declarator_suffix1015 = frozenset([52]) + FOLLOW_52_in_abstract_declarator_suffix1017 = frozenset([1]) + FOLLOW_assignment_expression_in_initializer1030 = frozenset([1]) + FOLLOW_41_in_initializer1035 = frozenset([4, 5, 6, 7, 8, 9, 10, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_initializer_list_in_initializer1037 = frozenset([26, 42]) + FOLLOW_26_in_initializer1039 = frozenset([42]) + FOLLOW_42_in_initializer1042 = frozenset([1]) + FOLLOW_initializer_in_initializer_list1053 = frozenset([1, 26]) + FOLLOW_26_in_initializer_list1056 = frozenset([4, 5, 6, 7, 8, 9, 10, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_initializer_in_initializer_list1058 = frozenset([1, 26]) + FOLLOW_assignment_expression_in_argument_expression_list1076 = frozenset([1, 26]) + FOLLOW_26_in_argument_expression_list1079 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_assignment_expression_in_argument_expression_list1081 = frozenset([1, 26]) + FOLLOW_multiplicative_expression_in_additive_expression1095 = frozenset([1, 57, 58]) + FOLLOW_57_in_additive_expression1099 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_multiplicative_expression_in_additive_expression1101 = frozenset([1, 57, 58]) + FOLLOW_58_in_additive_expression1105 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_multiplicative_expression_in_additive_expression1107 = frozenset([1, 57, 58]) + FOLLOW_cast_expression_in_multiplicative_expression1121 = frozenset([1, 55, 59, 60]) + FOLLOW_55_in_multiplicative_expression1125 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_cast_expression_in_multiplicative_expression1127 = frozenset([1, 55, 59, 60]) + FOLLOW_59_in_multiplicative_expression1131 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_cast_expression_in_multiplicative_expression1133 = frozenset([1, 55, 59, 60]) + FOLLOW_60_in_multiplicative_expression1137 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_cast_expression_in_multiplicative_expression1139 = frozenset([1, 55, 59, 60]) + FOLLOW_51_in_cast_expression1152 = frozenset([4, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) + FOLLOW_type_name_in_cast_expression1154 = frozenset([52]) + FOLLOW_52_in_cast_expression1156 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_cast_expression_in_cast_expression1158 = frozenset([1]) + FOLLOW_unary_expression_in_cast_expression1163 = frozenset([1]) + FOLLOW_postfix_expression_in_unary_expression1174 = frozenset([1]) + FOLLOW_61_in_unary_expression1179 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_unary_expression_in_unary_expression1181 = frozenset([1]) + FOLLOW_62_in_unary_expression1186 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_unary_expression_in_unary_expression1188 = frozenset([1]) + FOLLOW_unary_operator_in_unary_expression1193 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_cast_expression_in_unary_expression1195 = frozenset([1]) + FOLLOW_63_in_unary_expression1200 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_unary_expression_in_unary_expression1202 = frozenset([1]) + FOLLOW_63_in_unary_expression1207 = frozenset([51]) + FOLLOW_51_in_unary_expression1209 = frozenset([4, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) + FOLLOW_type_name_in_unary_expression1211 = frozenset([52]) + FOLLOW_52_in_unary_expression1213 = frozenset([1]) + FOLLOW_primary_expression_in_postfix_expression1228 = frozenset([1, 51, 53, 55, 61, 62, 64, 65]) + FOLLOW_53_in_postfix_expression1242 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_expression_in_postfix_expression1244 = frozenset([54]) + FOLLOW_54_in_postfix_expression1246 = frozenset([1, 51, 53, 55, 61, 62, 64, 65]) + FOLLOW_51_in_postfix_expression1260 = frozenset([52]) + FOLLOW_52_in_postfix_expression1262 = frozenset([1, 51, 53, 55, 61, 62, 64, 65]) + FOLLOW_51_in_postfix_expression1278 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_argument_expression_list_in_postfix_expression1282 = frozenset([52]) + FOLLOW_52_in_postfix_expression1286 = frozenset([1, 51, 53, 55, 61, 62, 64, 65]) + FOLLOW_64_in_postfix_expression1301 = frozenset([4]) + FOLLOW_IDENTIFIER_in_postfix_expression1303 = frozenset([1, 51, 53, 55, 61, 62, 64, 65]) + FOLLOW_55_in_postfix_expression1317 = frozenset([4]) FOLLOW_IDENTIFIER_in_postfix_expression1319 = frozenset([1, 51, 53, 55, 61, 62, 64, 65]) - FOLLOW_55_in_postfix_expression1333 = frozenset([4]) + FOLLOW_65_in_postfix_expression1333 = frozenset([4]) FOLLOW_IDENTIFIER_in_postfix_expression1335 = frozenset([1, 51, 53, 55, 61, 62, 64, 65]) - FOLLOW_65_in_postfix_expression1349 = frozenset([4]) - FOLLOW_IDENTIFIER_in_postfix_expression1351 = frozenset([1, 51, 53, 55, 61, 62, 64, 65]) - FOLLOW_61_in_postfix_expression1365 = frozenset([1, 51, 53, 55, 61, 62, 64, 65]) - FOLLOW_62_in_postfix_expression1379 = frozenset([1, 51, 53, 55, 61, 62, 64, 65]) + FOLLOW_61_in_postfix_expression1349 = frozenset([1, 51, 53, 55, 61, 62, 64, 65]) + FOLLOW_62_in_postfix_expression1363 = frozenset([1, 51, 53, 55, 61, 62, 64, 65]) FOLLOW_set_in_unary_operator0 = frozenset([1]) - FOLLOW_IDENTIFIER_in_primary_expression1437 = frozenset([1]) - FOLLOW_constant_in_primary_expression1442 = frozenset([1]) - FOLLOW_51_in_primary_expression1447 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_expression_in_primary_expression1449 = frozenset([52]) - FOLLOW_52_in_primary_expression1451 = frozenset([1]) + FOLLOW_IDENTIFIER_in_primary_expression1421 = frozenset([1]) + FOLLOW_constant_in_primary_expression1426 = frozenset([1]) + FOLLOW_51_in_primary_expression1431 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_expression_in_primary_expression1433 = frozenset([52]) + FOLLOW_52_in_primary_expression1435 = frozenset([1]) FOLLOW_set_in_constant0 = frozenset([1]) - FOLLOW_assignment_expression_in_expression1529 = frozenset([1, 26]) - FOLLOW_26_in_expression1532 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_assignment_expression_in_expression1534 = frozenset([1, 26]) - FOLLOW_conditional_expression_in_constant_expression1547 = frozenset([1]) - FOLLOW_lvalue_in_assignment_expression1558 = frozenset([27, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78]) - FOLLOW_assignment_operator_in_assignment_expression1560 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_assignment_expression_in_assignment_expression1562 = frozenset([1]) - FOLLOW_conditional_expression_in_assignment_expression1567 = frozenset([1]) - FOLLOW_unary_expression_in_lvalue1579 = frozenset([1]) + FOLLOW_assignment_expression_in_expression1513 = frozenset([1, 26]) + FOLLOW_26_in_expression1516 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_assignment_expression_in_expression1518 = frozenset([1, 26]) + FOLLOW_conditional_expression_in_constant_expression1531 = frozenset([1]) + FOLLOW_lvalue_in_assignment_expression1542 = frozenset([27, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78]) + FOLLOW_assignment_operator_in_assignment_expression1544 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_assignment_expression_in_assignment_expression1546 = frozenset([1]) + FOLLOW_conditional_expression_in_assignment_expression1551 = frozenset([1]) + FOLLOW_unary_expression_in_lvalue1563 = frozenset([1]) FOLLOW_set_in_assignment_operator0 = frozenset([1]) - FOLLOW_logical_or_expression_in_conditional_expression1651 = frozenset([1, 79]) - FOLLOW_79_in_conditional_expression1654 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_expression_in_conditional_expression1656 = frozenset([45]) - FOLLOW_45_in_conditional_expression1658 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_conditional_expression_in_conditional_expression1660 = frozenset([1]) - FOLLOW_logical_and_expression_in_logical_or_expression1673 = frozenset([1, 80]) - FOLLOW_80_in_logical_or_expression1676 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_logical_and_expression_in_logical_or_expression1678 = frozenset([1, 80]) - FOLLOW_inclusive_or_expression_in_logical_and_expression1691 = frozenset([1, 81]) - FOLLOW_81_in_logical_and_expression1694 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_inclusive_or_expression_in_logical_and_expression1696 = frozenset([1, 81]) - FOLLOW_exclusive_or_expression_in_inclusive_or_expression1709 = frozenset([1, 82]) - FOLLOW_82_in_inclusive_or_expression1712 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_exclusive_or_expression_in_inclusive_or_expression1714 = frozenset([1, 82]) - FOLLOW_and_expression_in_exclusive_or_expression1727 = frozenset([1, 83]) - FOLLOW_83_in_exclusive_or_expression1730 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_and_expression_in_exclusive_or_expression1732 = frozenset([1, 83]) - FOLLOW_equality_expression_in_and_expression1745 = frozenset([1, 66]) - FOLLOW_66_in_and_expression1748 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_equality_expression_in_and_expression1750 = frozenset([1, 66]) - FOLLOW_relational_expression_in_equality_expression1762 = frozenset([1, 84, 85]) - FOLLOW_set_in_equality_expression1765 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_relational_expression_in_equality_expression1771 = frozenset([1, 84, 85]) - FOLLOW_shift_expression_in_relational_expression1784 = frozenset([1, 86, 87, 88, 89]) - FOLLOW_set_in_relational_expression1787 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_shift_expression_in_relational_expression1797 = frozenset([1, 86, 87, 88, 89]) - FOLLOW_additive_expression_in_shift_expression1810 = frozenset([1, 90, 91]) - FOLLOW_set_in_shift_expression1813 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_additive_expression_in_shift_expression1819 = frozenset([1, 90, 91]) - FOLLOW_labeled_statement_in_statement1834 = frozenset([1]) - FOLLOW_compound_statement_in_statement1839 = frozenset([1]) - FOLLOW_expression_statement_in_statement1844 = frozenset([1]) - FOLLOW_selection_statement_in_statement1849 = frozenset([1]) - FOLLOW_iteration_statement_in_statement1854 = frozenset([1]) - FOLLOW_jump_statement_in_statement1859 = frozenset([1]) - FOLLOW_macro_statement_in_statement1864 = frozenset([1]) - FOLLOW_IDENTIFIER_in_macro_statement1875 = frozenset([51]) - FOLLOW_51_in_macro_statement1877 = frozenset([4, 5, 6, 7, 8, 9, 10, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 46, 47, 48, 49, 50, 51, 52, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) - FOLLOW_IDENTIFIER_in_macro_statement1880 = frozenset([52]) - FOLLOW_declaration_in_macro_statement1884 = frozenset([4, 5, 6, 7, 8, 9, 10, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 46, 47, 48, 49, 50, 51, 52, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) - FOLLOW_statement_list_in_macro_statement1888 = frozenset([52]) - FOLLOW_52_in_macro_statement1892 = frozenset([1]) - FOLLOW_IDENTIFIER_in_labeled_statement1904 = frozenset([45]) - FOLLOW_45_in_labeled_statement1906 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) + FOLLOW_logical_or_expression_in_conditional_expression1637 = frozenset([1, 79]) + FOLLOW_79_in_conditional_expression1640 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_expression_in_conditional_expression1642 = frozenset([45]) + FOLLOW_45_in_conditional_expression1644 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_conditional_expression_in_conditional_expression1646 = frozenset([1]) + FOLLOW_logical_and_expression_in_logical_or_expression1661 = frozenset([1, 80]) + FOLLOW_80_in_logical_or_expression1664 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_logical_and_expression_in_logical_or_expression1666 = frozenset([1, 80]) + FOLLOW_inclusive_or_expression_in_logical_and_expression1679 = frozenset([1, 81]) + FOLLOW_81_in_logical_and_expression1682 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_inclusive_or_expression_in_logical_and_expression1684 = frozenset([1, 81]) + FOLLOW_exclusive_or_expression_in_inclusive_or_expression1697 = frozenset([1, 82]) + FOLLOW_82_in_inclusive_or_expression1700 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_exclusive_or_expression_in_inclusive_or_expression1702 = frozenset([1, 82]) + FOLLOW_and_expression_in_exclusive_or_expression1715 = frozenset([1, 83]) + FOLLOW_83_in_exclusive_or_expression1718 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_and_expression_in_exclusive_or_expression1720 = frozenset([1, 83]) + FOLLOW_equality_expression_in_and_expression1733 = frozenset([1, 66]) + FOLLOW_66_in_and_expression1736 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_equality_expression_in_and_expression1738 = frozenset([1, 66]) + FOLLOW_relational_expression_in_equality_expression1750 = frozenset([1, 84, 85]) + FOLLOW_set_in_equality_expression1753 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_relational_expression_in_equality_expression1759 = frozenset([1, 84, 85]) + FOLLOW_shift_expression_in_relational_expression1773 = frozenset([1, 86, 87, 88, 89]) + FOLLOW_set_in_relational_expression1776 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_shift_expression_in_relational_expression1786 = frozenset([1, 86, 87, 88, 89]) + FOLLOW_additive_expression_in_shift_expression1799 = frozenset([1, 90, 91]) + FOLLOW_set_in_shift_expression1802 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_additive_expression_in_shift_expression1808 = frozenset([1, 90, 91]) + FOLLOW_labeled_statement_in_statement1823 = frozenset([1]) + FOLLOW_compound_statement_in_statement1828 = frozenset([1]) + FOLLOW_expression_statement_in_statement1833 = frozenset([1]) + FOLLOW_selection_statement_in_statement1838 = frozenset([1]) + FOLLOW_iteration_statement_in_statement1843 = frozenset([1]) + FOLLOW_jump_statement_in_statement1848 = frozenset([1]) + FOLLOW_macro_statement_in_statement1853 = frozenset([1]) + FOLLOW_IDENTIFIER_in_macro_statement1864 = frozenset([51]) + FOLLOW_51_in_macro_statement1866 = frozenset([4, 5, 6, 7, 8, 9, 10, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 46, 47, 48, 49, 50, 51, 52, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) + FOLLOW_IDENTIFIER_in_macro_statement1869 = frozenset([52]) + FOLLOW_declaration_in_macro_statement1873 = frozenset([4, 5, 6, 7, 8, 9, 10, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 46, 47, 48, 49, 50, 51, 52, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) + FOLLOW_statement_list_in_macro_statement1877 = frozenset([52]) + FOLLOW_52_in_macro_statement1881 = frozenset([1]) + FOLLOW_IDENTIFIER_in_labeled_statement1893 = frozenset([45]) + FOLLOW_45_in_labeled_statement1895 = frozenset([4, 5, 6, 7, 8, 9, 10, 24, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) + FOLLOW_statement_in_labeled_statement1897 = frozenset([1]) + FOLLOW_92_in_labeled_statement1902 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_constant_expression_in_labeled_statement1904 = frozenset([45]) + FOLLOW_45_in_labeled_statement1906 = frozenset([4, 5, 6, 7, 8, 9, 10, 24, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) FOLLOW_statement_in_labeled_statement1908 = frozenset([1]) - FOLLOW_92_in_labeled_statement1913 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_constant_expression_in_labeled_statement1915 = frozenset([45]) - FOLLOW_45_in_labeled_statement1917 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) - FOLLOW_statement_in_labeled_statement1919 = frozenset([1]) - FOLLOW_93_in_labeled_statement1924 = frozenset([45]) - FOLLOW_45_in_labeled_statement1926 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) - FOLLOW_statement_in_labeled_statement1928 = frozenset([1]) - FOLLOW_41_in_compound_statement1950 = frozenset([4, 5, 6, 7, 8, 9, 10, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) - FOLLOW_declaration_in_compound_statement1952 = frozenset([4, 5, 6, 7, 8, 9, 10, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) - FOLLOW_statement_list_in_compound_statement1955 = frozenset([42]) - FOLLOW_42_in_compound_statement1958 = frozenset([1]) - FOLLOW_statement_in_statement_list1969 = frozenset([1, 4, 5, 6, 7, 8, 9, 10, 25, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) - FOLLOW_25_in_expression_statement1981 = frozenset([1]) - FOLLOW_expression_in_expression_statement1986 = frozenset([25]) - FOLLOW_25_in_expression_statement1988 = frozenset([1]) - FOLLOW_94_in_selection_statement1999 = frozenset([51]) - FOLLOW_51_in_selection_statement2001 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_expression_in_selection_statement2003 = frozenset([52]) - FOLLOW_52_in_selection_statement2005 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) - FOLLOW_statement_in_selection_statement2007 = frozenset([1, 95]) - FOLLOW_95_in_selection_statement2022 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) - FOLLOW_statement_in_selection_statement2024 = frozenset([1]) - FOLLOW_96_in_selection_statement2031 = frozenset([51]) - FOLLOW_51_in_selection_statement2033 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_expression_in_selection_statement2035 = frozenset([52]) - FOLLOW_52_in_selection_statement2037 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) - FOLLOW_statement_in_selection_statement2039 = frozenset([1]) - FOLLOW_97_in_iteration_statement2050 = frozenset([51]) - FOLLOW_51_in_iteration_statement2052 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_expression_in_iteration_statement2054 = frozenset([52]) - FOLLOW_52_in_iteration_statement2056 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) - FOLLOW_statement_in_iteration_statement2058 = frozenset([1]) - FOLLOW_98_in_iteration_statement2063 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) - FOLLOW_statement_in_iteration_statement2065 = frozenset([97]) - FOLLOW_97_in_iteration_statement2067 = frozenset([51]) - FOLLOW_51_in_iteration_statement2069 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_expression_in_iteration_statement2071 = frozenset([52]) - FOLLOW_52_in_iteration_statement2073 = frozenset([25]) - FOLLOW_25_in_iteration_statement2075 = frozenset([1]) - FOLLOW_99_in_iteration_statement2080 = frozenset([51]) - FOLLOW_51_in_iteration_statement2082 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_expression_statement_in_iteration_statement2084 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_expression_statement_in_iteration_statement2086 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 52, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_expression_in_iteration_statement2088 = frozenset([52]) - FOLLOW_52_in_iteration_statement2091 = frozenset([4, 5, 6, 7, 8, 9, 10, 25, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) - FOLLOW_statement_in_iteration_statement2093 = frozenset([1]) - FOLLOW_100_in_jump_statement2104 = frozenset([4]) - FOLLOW_IDENTIFIER_in_jump_statement2106 = frozenset([25]) - FOLLOW_25_in_jump_statement2108 = frozenset([1]) - FOLLOW_101_in_jump_statement2113 = frozenset([25]) - FOLLOW_25_in_jump_statement2115 = frozenset([1]) - FOLLOW_102_in_jump_statement2120 = frozenset([25]) - FOLLOW_25_in_jump_statement2122 = frozenset([1]) - FOLLOW_103_in_jump_statement2127 = frozenset([25]) - FOLLOW_25_in_jump_statement2129 = frozenset([1]) - FOLLOW_103_in_jump_statement2134 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_expression_in_jump_statement2136 = frozenset([25]) - FOLLOW_25_in_jump_statement2138 = frozenset([1]) - FOLLOW_declaration_specifiers_in_synpred2102 = frozenset([1]) - FOLLOW_declaration_specifiers_in_synpred4102 = frozenset([4, 51, 55]) - FOLLOW_declarator_in_synpred4105 = frozenset([4, 24, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 46, 47, 48, 49, 50]) - FOLLOW_declaration_in_synpred4107 = frozenset([4, 24, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 46, 47, 48, 49, 50]) - FOLLOW_41_in_synpred4110 = frozenset([1]) - FOLLOW_declaration_in_synpred5120 = frozenset([1]) - FOLLOW_declaration_specifiers_in_synpred6153 = frozenset([1]) - FOLLOW_declaration_specifiers_in_synpred9206 = frozenset([1]) - FOLLOW_type_specifier_in_synpred13253 = frozenset([1]) - FOLLOW_IDENTIFIER_in_synpred31417 = frozenset([4, 51, 55]) - FOLLOW_declarator_in_synpred31419 = frozenset([1]) - FOLLOW_type_specifier_in_synpred37554 = frozenset([1]) - FOLLOW_pointer_in_synpred49717 = frozenset([4, 51]) - FOLLOW_direct_declarator_in_synpred49720 = frozenset([1]) - FOLLOW_declarator_suffix_in_synpred50743 = frozenset([1]) - FOLLOW_declarator_suffix_in_synpred52759 = frozenset([1]) - FOLLOW_51_in_synpred55799 = frozenset([4, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) - FOLLOW_parameter_type_list_in_synpred55801 = frozenset([52]) - FOLLOW_52_in_synpred55803 = frozenset([1]) - FOLLOW_51_in_synpred56813 = frozenset([4]) - FOLLOW_identifier_list_in_synpred56815 = frozenset([52]) - FOLLOW_52_in_synpred56817 = frozenset([1]) - FOLLOW_type_qualifier_in_synpred57842 = frozenset([1]) - FOLLOW_pointer_in_synpred58845 = frozenset([1]) - FOLLOW_55_in_synpred59840 = frozenset([47, 48, 49, 50]) - FOLLOW_type_qualifier_in_synpred59842 = frozenset([1, 47, 48, 49, 50, 55]) - FOLLOW_pointer_in_synpred59845 = frozenset([1]) - FOLLOW_55_in_synpred60851 = frozenset([55]) - FOLLOW_pointer_in_synpred60853 = frozenset([1]) - FOLLOW_declarator_in_synpred63910 = frozenset([1]) - FOLLOW_abstract_declarator_in_synpred64912 = frozenset([1]) - FOLLOW_specifier_qualifier_list_in_synpred67951 = frozenset([1, 51, 53, 55]) - FOLLOW_abstract_declarator_in_synpred67953 = frozenset([1]) - FOLLOW_direct_abstract_declarator_in_synpred68972 = frozenset([1]) - FOLLOW_abstract_declarator_suffix_in_synpred711003 = frozenset([1]) - FOLLOW_51_in_synpred841177 = frozenset([4, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) - FOLLOW_type_name_in_synpred841179 = frozenset([52]) - FOLLOW_52_in_synpred841181 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_cast_expression_in_synpred841183 = frozenset([1]) - FOLLOW_63_in_synpred891225 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_unary_expression_in_synpred891227 = frozenset([1]) - FOLLOW_55_in_synpred941333 = frozenset([4]) - FOLLOW_IDENTIFIER_in_synpred941335 = frozenset([1]) - FOLLOW_lvalue_in_synpred1111558 = frozenset([27, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78]) - FOLLOW_assignment_operator_in_synpred1111560 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) - FOLLOW_assignment_expression_in_synpred1111562 = frozenset([1]) - FOLLOW_expression_statement_in_synpred1381844 = frozenset([1]) - FOLLOW_declaration_in_synpred1431884 = frozenset([1]) - FOLLOW_declaration_in_synpred1471952 = frozenset([1]) + FOLLOW_93_in_labeled_statement1913 = frozenset([45]) + FOLLOW_45_in_labeled_statement1915 = frozenset([4, 5, 6, 7, 8, 9, 10, 24, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) + FOLLOW_statement_in_labeled_statement1917 = frozenset([1]) + FOLLOW_41_in_compound_statement1928 = frozenset([4, 5, 6, 7, 8, 9, 10, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) + FOLLOW_declaration_in_compound_statement1930 = frozenset([4, 5, 6, 7, 8, 9, 10, 24, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) + FOLLOW_statement_list_in_compound_statement1933 = frozenset([42]) + FOLLOW_42_in_compound_statement1936 = frozenset([1]) + FOLLOW_statement_in_statement_list1947 = frozenset([1, 4, 5, 6, 7, 8, 9, 10, 24, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) + FOLLOW_24_in_expression_statement1959 = frozenset([1]) + FOLLOW_expression_in_expression_statement1964 = frozenset([24]) + FOLLOW_24_in_expression_statement1966 = frozenset([1]) + FOLLOW_94_in_selection_statement1977 = frozenset([51]) + FOLLOW_51_in_selection_statement1979 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_expression_in_selection_statement1983 = frozenset([52]) + FOLLOW_52_in_selection_statement1985 = frozenset([4, 5, 6, 7, 8, 9, 10, 24, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) + FOLLOW_statement_in_selection_statement1989 = frozenset([1, 95]) + FOLLOW_95_in_selection_statement2004 = frozenset([4, 5, 6, 7, 8, 9, 10, 24, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) + FOLLOW_statement_in_selection_statement2006 = frozenset([1]) + FOLLOW_96_in_selection_statement2013 = frozenset([51]) + FOLLOW_51_in_selection_statement2015 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_expression_in_selection_statement2017 = frozenset([52]) + FOLLOW_52_in_selection_statement2019 = frozenset([4, 5, 6, 7, 8, 9, 10, 24, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) + FOLLOW_statement_in_selection_statement2021 = frozenset([1]) + FOLLOW_97_in_iteration_statement2032 = frozenset([51]) + FOLLOW_51_in_iteration_statement2034 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_expression_in_iteration_statement2038 = frozenset([52]) + FOLLOW_52_in_iteration_statement2040 = frozenset([4, 5, 6, 7, 8, 9, 10, 24, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) + FOLLOW_statement_in_iteration_statement2042 = frozenset([1]) + FOLLOW_98_in_iteration_statement2049 = frozenset([4, 5, 6, 7, 8, 9, 10, 24, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) + FOLLOW_statement_in_iteration_statement2051 = frozenset([97]) + FOLLOW_97_in_iteration_statement2053 = frozenset([51]) + FOLLOW_51_in_iteration_statement2055 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_expression_in_iteration_statement2059 = frozenset([52]) + FOLLOW_52_in_iteration_statement2061 = frozenset([24]) + FOLLOW_24_in_iteration_statement2063 = frozenset([1]) + FOLLOW_99_in_iteration_statement2070 = frozenset([51]) + FOLLOW_51_in_iteration_statement2072 = frozenset([4, 5, 6, 7, 8, 9, 10, 24, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_expression_statement_in_iteration_statement2074 = frozenset([4, 5, 6, 7, 8, 9, 10, 24, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_expression_statement_in_iteration_statement2078 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 52, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_expression_in_iteration_statement2080 = frozenset([52]) + FOLLOW_52_in_iteration_statement2083 = frozenset([4, 5, 6, 7, 8, 9, 10, 24, 41, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103]) + FOLLOW_statement_in_iteration_statement2085 = frozenset([1]) + FOLLOW_100_in_jump_statement2098 = frozenset([4]) + FOLLOW_IDENTIFIER_in_jump_statement2100 = frozenset([24]) + FOLLOW_24_in_jump_statement2102 = frozenset([1]) + FOLLOW_101_in_jump_statement2107 = frozenset([24]) + FOLLOW_24_in_jump_statement2109 = frozenset([1]) + FOLLOW_102_in_jump_statement2114 = frozenset([24]) + FOLLOW_24_in_jump_statement2116 = frozenset([1]) + FOLLOW_103_in_jump_statement2121 = frozenset([24]) + FOLLOW_24_in_jump_statement2123 = frozenset([1]) + FOLLOW_103_in_jump_statement2128 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_expression_in_jump_statement2130 = frozenset([24]) + FOLLOW_24_in_jump_statement2132 = frozenset([1]) + FOLLOW_declaration_specifiers_in_synpred290 = frozenset([1]) + FOLLOW_declaration_specifiers_in_synpred490 = frozenset([4, 51, 55]) + FOLLOW_declarator_in_synpred493 = frozenset([4, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 46, 47, 48, 49, 50]) + FOLLOW_declaration_in_synpred495 = frozenset([4, 25, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 46, 47, 48, 49, 50]) + FOLLOW_41_in_synpred498 = frozenset([1]) + FOLLOW_declaration_in_synpred5108 = frozenset([1]) + FOLLOW_declaration_specifiers_in_synpred7145 = frozenset([1]) + FOLLOW_declaration_specifiers_in_synpred10191 = frozenset([1]) + FOLLOW_type_specifier_in_synpred14256 = frozenset([1]) + FOLLOW_IDENTIFIER_in_synpred32419 = frozenset([4, 51, 55]) + FOLLOW_declarator_in_synpred32421 = frozenset([1]) + FOLLOW_type_specifier_in_synpred38545 = frozenset([1]) + FOLLOW_pointer_in_synpred50708 = frozenset([4, 51]) + FOLLOW_direct_declarator_in_synpred50711 = frozenset([1]) + FOLLOW_declarator_suffix_in_synpred51729 = frozenset([1]) + FOLLOW_declarator_suffix_in_synpred53741 = frozenset([1]) + FOLLOW_51_in_synpred56781 = frozenset([4, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) + FOLLOW_parameter_type_list_in_synpred56783 = frozenset([52]) + FOLLOW_52_in_synpred56785 = frozenset([1]) + FOLLOW_51_in_synpred57795 = frozenset([4]) + FOLLOW_identifier_list_in_synpred57797 = frozenset([52]) + FOLLOW_52_in_synpred57799 = frozenset([1]) + FOLLOW_type_qualifier_in_synpred58824 = frozenset([1]) + FOLLOW_pointer_in_synpred59827 = frozenset([1]) + FOLLOW_55_in_synpred60822 = frozenset([47, 48, 49, 50]) + FOLLOW_type_qualifier_in_synpred60824 = frozenset([1, 47, 48, 49, 50, 55]) + FOLLOW_pointer_in_synpred60827 = frozenset([1]) + FOLLOW_55_in_synpred61833 = frozenset([55]) + FOLLOW_pointer_in_synpred61835 = frozenset([1]) + FOLLOW_declarator_in_synpred64892 = frozenset([1]) + FOLLOW_abstract_declarator_in_synpred65894 = frozenset([1]) + FOLLOW_specifier_qualifier_list_in_synpred68926 = frozenset([1, 51, 53, 55]) + FOLLOW_abstract_declarator_in_synpred68928 = frozenset([1]) + FOLLOW_direct_abstract_declarator_in_synpred69947 = frozenset([1]) + FOLLOW_abstract_declarator_suffix_in_synpred72978 = frozenset([1]) + FOLLOW_51_in_synpred851152 = frozenset([4, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 44, 46, 47, 48, 49, 50]) + FOLLOW_type_name_in_synpred851154 = frozenset([52]) + FOLLOW_52_in_synpred851156 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_cast_expression_in_synpred851158 = frozenset([1]) + FOLLOW_63_in_synpred901200 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_unary_expression_in_synpred901202 = frozenset([1]) + FOLLOW_55_in_synpred951317 = frozenset([4]) + FOLLOW_IDENTIFIER_in_synpred951319 = frozenset([1]) + FOLLOW_lvalue_in_synpred1121542 = frozenset([27, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78]) + FOLLOW_assignment_operator_in_synpred1121544 = frozenset([4, 5, 6, 7, 8, 9, 10, 51, 55, 57, 58, 61, 62, 63, 66, 67, 68]) + FOLLOW_assignment_expression_in_synpred1121546 = frozenset([1]) + FOLLOW_expression_statement_in_synpred1391833 = frozenset([1]) + FOLLOW_declaration_in_synpred1441873 = frozenset([1]) + FOLLOW_declaration_in_synpred1481930 = frozenset([1]) diff --git a/Source/Python/Ecc/CodeFragment.py b/Source/Python/Ecc/CodeFragment.py new file mode 100644 index 0000000..6b99c1c --- /dev/null +++ b/Source/Python/Ecc/CodeFragment.py @@ -0,0 +1,149 @@ +## @file +# fragments of source file +# +# Copyright (c) 2007, Intel Corporation +# +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# + + +## The description of comment contents and start & end position +# +# +class Comment : + ## The constructor + # + # @param self The object pointer + # @param Str The message to record + # @param Begin The start position tuple. + # @param End The end position tuple. + # @param CommentType The type of comment (T_COMMENT_TWO_SLASH or T_COMMENT_SLASH_STAR). + # + def __init__(self, Str, Begin, End, CommentType): + self.Content = Str + self.StartPos = Begin + self.EndPos = End + self.Type = CommentType + +## The description of preprocess directives and start & end position +# +# +class PP_Directive : + ## The constructor + # + # @param self The object pointer + # @param Str The message to record + # @param Begin The start position tuple. + # @param End The end position tuple. + # + def __init__(self, Str, Begin, End): + self.Content = Str + self.StartPos = Begin + self.EndPos = End + +## The description of predicate expression and start & end position +# +# +class PredicateExpression : + ## The constructor + # + # @param self The object pointer + # @param Str The message to record + # @param Begin The start position tuple. + # @param End The end position tuple. + # + def __init__(self, Str, Begin, End): + self.Content = Str + self.StartPos = Begin + self.EndPos = End + +## The description of function definition and start & end position +# +# +class FunctionDefinition : + ## The constructor + # + # @param self The object pointer + # @param Str The message to record + # @param Begin The start position tuple. + # @param End The end position tuple. + # + def __init__(self, ModifierStr, DeclStr, Begin, End): + self.Modifier = ModifierStr + self.Declarator = DeclStr + self.StartPos = Begin + self.EndPos = End + +## The description of variable declaration and start & end position +# +# +class VariableDeclaration : + ## The constructor + # + # @param self The object pointer + # @param Str The message to record + # @param Begin The start position tuple. + # @param End The end position tuple. + # + def __init__(self, ModifierStr, DeclStr, Begin, End): + self.Modifier = ModifierStr + self.Declarator = DeclStr + self.StartPos = Begin + self.EndPos = End + +## The description of enum definition and start & end position +# +# +class EnumerationDefinition : + ## The constructor + # + # @param self The object pointer + # @param Str The message to record + # @param Begin The start position tuple. + # @param End The end position tuple. + # + def __init__(self, Str, Begin, End): + self.Content = Str + self.StartPos = Begin + self.EndPos = End + +## The description of struct/union definition and start & end position +# +# +class StructUnionDefinition : + ## The constructor + # + # @param self The object pointer + # @param Str The message to record + # @param Begin The start position tuple. + # @param End The end position tuple. + # + def __init__(self, Str, Begin, End): + self.Content = Str + self.StartPos = Begin + self.EndPos = End + +## The description of 'Typedef' definition and start & end position +# +# +class TypedefDefinition : + ## The constructor + # + # @param self The object pointer + # @param Str The message to record + # @param Begin The start position tuple. + # @param End The end position tuple. + # + def __init__(self, FromStr, ToStr, Begin, End): + self.FromType = FromStr + self.ToType = ToStr + self.StartPos = Begin + self.EndPos = End + + \ No newline at end of file diff --git a/Source/Python/Ecc/CodeFragmentCollector.py b/Source/Python/Ecc/CodeFragmentCollector.py new file mode 100644 index 0000000..f85375d --- /dev/null +++ b/Source/Python/Ecc/CodeFragmentCollector.py @@ -0,0 +1,335 @@ +## @file +# preprocess source file +# +# Copyright (c) 2007, Intel Corporation +# +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# + +## +# Import Modules +# + +import re +import os +import sys +import FileProfile +from CodeFragment import Comment +from CodeFragment import PP_Directive +from ParserWarning import Warning + + +##define T_CHAR_SPACE ' ' +##define T_CHAR_NULL '\0' +##define T_CHAR_CR '\r' +##define T_CHAR_TAB '\t' +##define T_CHAR_LF '\n' +##define T_CHAR_SLASH '/' +##define T_CHAR_BACKSLASH '\\' +##define T_CHAR_DOUBLE_QUOTE '\"' +##define T_CHAR_SINGLE_QUOTE '\'' +##define T_CHAR_STAR '*' +##define T_CHAR_HASH '#' + +(T_CHAR_SPACE, T_CHAR_NULL, T_CHAR_CR, T_CHAR_TAB, T_CHAR_LF, T_CHAR_SLASH, \ +T_CHAR_BACKSLASH, T_CHAR_DOUBLE_QUOTE, T_CHAR_SINGLE_QUOTE, T_CHAR_STAR, T_CHAR_HASH) = \ +(' ', '\0', '\r', '\t', '\n', '/', '\\', '\"', '\'', '*', '#') + +SEPERATOR_TUPLE = ('=', '|', ',', '{', '}') + +(T_COMMENT_TWO_SLASH, T_COMMENT_SLASH_STAR) = (0, 1) + +(T_PP_INCLUDE, T_PP_DEFINE, T_PP_OTHERS) = (0, 1, 2) + +## The collector for source code fragments. +# +# PreprocessFile method should be called prior to ParseFile +# +# GetNext*** procedures mean these procedures will get next token first, then make judgement. +# Get*** procedures mean these procedures will make judgement on current token only. +# +class CodeFragmentCollector: + ## The constructor + # + # @param self The object pointer + # @param FileName The file that to be parsed + # + def __init__(self, FileName): + self.Profile = FileProfile.FileProfile(FileName) + self.Profile.FileLinesList.append(list(T_CHAR_LF)) + self.FileName = FileName + self.CurrentLineNumber = 1 + self.CurrentOffsetWithinLine = 0 + + self.__Token = "" + self.__SkippedChars = "" + + ## __IsWhiteSpace() method + # + # Whether char at current FileBufferPos is whitespace + # + # @param self The object pointer + # @param Char The char to test + # @retval True The char is a kind of white space + # @retval False The char is NOT a kind of white space + # + def __IsWhiteSpace(self, Char): + if Char in (T_CHAR_NULL, T_CHAR_CR, T_CHAR_SPACE, T_CHAR_TAB, T_CHAR_LF): + return True + else: + return False + + ## __SkipWhiteSpace() method + # + # Skip white spaces from current char, return number of chars skipped + # + # @param self The object pointer + # @retval Count The number of chars skipped + # + def __SkipWhiteSpace(self): + Count = 0 + while not self.__EndOfFile(): + Count += 1 + if self.__CurrentChar() in (T_CHAR_NULL, T_CHAR_CR, T_CHAR_LF, T_CHAR_SPACE, T_CHAR_TAB): + self.__SkippedChars += str(self.__CurrentChar()) + self.__GetOneChar() + + else: + Count = Count - 1 + return Count + + ## __EndOfFile() method + # + # Judge current buffer pos is at file end + # + # @param self The object pointer + # @retval True Current File buffer position is at file end + # @retval False Current File buffer position is NOT at file end + # + def __EndOfFile(self): + NumberOfLines = len(self.Profile.FileLinesList) + SizeOfLastLine = len(self.Profile.FileLinesList[-1]) + if self.CurrentLineNumber == NumberOfLines and self.CurrentOffsetWithinLine >= SizeOfLastLine - 1: + return True + else: + return False + + ## __EndOfLine() method + # + # Judge current buffer pos is at line end + # + # @param self The object pointer + # @retval True Current File buffer position is at line end + # @retval False Current File buffer position is NOT at line end + # + def __EndOfLine(self): + SizeOfCurrentLine = len(self.Profile.FileLinesList[self.CurrentLineNumber - 1]) + if self.CurrentOffsetWithinLine >= SizeOfCurrentLine - 1: + return True + else: + return False + + ## Rewind() method + # + # Reset file data buffer to the initial state + # + # @param self The object pointer + # + def Rewind(self): + self.CurrentLineNumber = 1 + self.CurrentOffsetWithinLine = 0 + + ## __UndoOneChar() method + # + # Go back one char in the file buffer + # + # @param self The object pointer + # @retval True Successfully go back one char + # @retval False Not able to go back one char as file beginning reached + # + def __UndoOneChar(self): + + if self.CurrentLineNumber == 1 and self.CurrentOffsetWithinLine == 0: + return False + elif self.CurrentOffsetWithinLine == 0: + self.CurrentLineNumber -= 1 + self.CurrentOffsetWithinLine = len(self.__CurrentLine()) - 1 + else: + self.CurrentOffsetWithinLine -= 1 + return True + + ## __GetOneChar() method + # + # Move forward one char in the file buffer + # + # @param self The object pointer + # + def __GetOneChar(self): + if self.CurrentOffsetWithinLine == len(self.Profile.FileLinesList[self.CurrentLineNumber - 1]) - 1: + self.CurrentLineNumber += 1 + self.CurrentOffsetWithinLine = 0 + else: + self.CurrentOffsetWithinLine += 1 + + ## __CurrentChar() method + # + # Get the char pointed to by the file buffer pointer + # + # @param self The object pointer + # @retval Char Current char + # + def __CurrentChar(self): + CurrentChar = self.Profile.FileLinesList[self.CurrentLineNumber - 1][self.CurrentOffsetWithinLine] +# if CurrentChar > 255: +# raise Warning("Non-Ascii char found At Line %d, offset %d" % (self.CurrentLineNumber, self.CurrentOffsetWithinLine), self.FileName, self.CurrentLineNumber) + return CurrentChar + + ## __NextChar() method + # + # Get the one char pass the char pointed to by the file buffer pointer + # + # @param self The object pointer + # @retval Char Next char + # + def __NextChar(self): + if self.CurrentOffsetWithinLine == len(self.Profile.FileLinesList[self.CurrentLineNumber - 1]) - 1: + return self.Profile.FileLinesList[self.CurrentLineNumber][0] + else: + return self.Profile.FileLinesList[self.CurrentLineNumber - 1][self.CurrentOffsetWithinLine + 1] + + ## __SetCurrentCharValue() method + # + # Modify the value of current char + # + # @param self The object pointer + # @param Value The new value of current char + # + def __SetCurrentCharValue(self, Value): + self.Profile.FileLinesList[self.CurrentLineNumber - 1][self.CurrentOffsetWithinLine] = Value + + ## __CurrentLine() method + # + # Get the list that contains current line contents + # + # @param self The object pointer + # @retval List current line contents + # + def __CurrentLine(self): + return self.Profile.FileLinesList[self.CurrentLineNumber - 1] + + ## PreprocessFile() method + # + # Preprocess file contents, replace comments with spaces. + # In the end, rewind the file buffer pointer to the beginning + # BUGBUG: No !include statement processing contained in this procedure + # !include statement should be expanded at the same FileLinesList[CurrentLineNumber - 1] + # + # @param self The object pointer + # + def PreprocessFile(self): + + self.Rewind() + InComment = False + DoubleSlashComment = False + HashComment = False + PPExtend = False + CommentObj = None + PPDirectiveObj = None + + while not self.__EndOfFile(): + + # meet new line, then no longer in a comment for // and '#' + if self.__CurrentChar() == T_CHAR_LF: + if HashComment and PPDirectiveObj != None: + if PPDirectiveObj.Content.rstrip(T_CHAR_CR).endswith(T_CHAR_BACKSLASH): + PPDirectiveObj.Content += T_CHAR_LF + PPExtend = True + else: + PPExtend = False + + EndLinePos = (self.CurrentLineNumber, self.CurrentOffsetWithinLine) + self.CurrentLineNumber += 1 + self.CurrentOffsetWithinLine = 0 + if InComment and DoubleSlashComment: + InComment = False + DoubleSlashComment = False + CommentObj.Content += T_CHAR_LF + CommentObj.EndPos = EndLinePos + FileProfile.CommentList.append(CommentObj) + CommentObj = None + if InComment and HashComment and not PPExtend: + InComment = False + HashComment = False + PPDirectiveObj.Content += T_CHAR_LF + PPDirectiveObj.EndPos = EndLinePos + FileProfile.PPDirectiveList.append(PPDirectiveObj) + PPDirectiveObj = None + + # check for */ comment end + elif InComment and not DoubleSlashComment and not HashComment and self.__CurrentChar() == T_CHAR_STAR and self.__NextChar() == T_CHAR_SLASH: + CommentObj.Content += self.__CurrentChar() + self.__SetCurrentCharValue(T_CHAR_SPACE) + self.__GetOneChar() + CommentObj.Content += self.__CurrentChar() + self.__SetCurrentCharValue(T_CHAR_SPACE) + CommentObj.EndPos = (self.CurrentLineNumber, self.CurrentOffsetWithinLine) + FileProfile.CommentList.append(CommentObj) + CommentObj = None + self.__GetOneChar() + InComment = False + # set comments to spaces + elif InComment: + if HashComment: + # // follows hash PP directive + if self.__CurrentChar() == T_CHAR_SLASH and self.__NextChar() == T_CHAR_SLASH: + InComment = False + HashComment = False + PPDirectiveObj.EndPos = (self.CurrentLineNumber, self.CurrentOffsetWithinLine - 1) + FileProfile.PPDirectiveList.append(PPDirectiveObj) + PPDirectiveObj = None + continue + else: + PPDirectiveObj.Content += self.__CurrentChar() + else: + CommentObj.Content += self.__CurrentChar() + self.__SetCurrentCharValue(T_CHAR_SPACE) + self.__GetOneChar() + # check for // comment + elif self.__CurrentChar() == T_CHAR_SLASH and self.__NextChar() == T_CHAR_SLASH: + InComment = True + DoubleSlashComment = True + CommentObj = Comment('', (self.CurrentLineNumber, self.CurrentOffsetWithinLine), None, T_COMMENT_TWO_SLASH) + # check for '#' comment + elif self.__CurrentChar() == T_CHAR_HASH: + InComment = True + HashComment = True + PPDirectiveObj = PP_Directive('', (self.CurrentLineNumber, self.CurrentOffsetWithinLine), None) + # check for /* comment start + elif self.__CurrentChar() == T_CHAR_SLASH and self.__NextChar() == T_CHAR_STAR: + CommentObj = Comment('', (self.CurrentLineNumber, self.CurrentOffsetWithinLine), None, T_COMMENT_SLASH_STAR) + CommentObj.Content += self.__CurrentChar() + self.__SetCurrentCharValue( T_CHAR_SPACE) + self.__GetOneChar() + CommentObj.Content += self.__CurrentChar() + self.__SetCurrentCharValue( T_CHAR_SPACE) + self.__GetOneChar() + InComment = True + else: + self.__GetOneChar() + + # restore from ListOfList to ListOfString + self.Profile.FileLinesList = ["".join(list) for list in self.Profile.FileLinesList] + self.Rewind() + + +if __name__ == "__main__": + + collector = CodeFragmentCollector(sys.argv[1]) + collector.PreprocessFile() + print "For Test." diff --git a/Source/Python/Ecc/FileProfile.py b/Source/Python/Ecc/FileProfile.py new file mode 100644 index 0000000..560a789 --- /dev/null +++ b/Source/Python/Ecc/FileProfile.py @@ -0,0 +1,57 @@ +## @file +# fragments of source file +# +# Copyright (c) 2007, Intel Corporation +# +# All rights reserved. This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# + +## +# Import Modules +# + +import re +import os +from ParserWarning import Warning + +CommentList = [] +PPDirectiveList = [] +PredicateExpressionList = [] +FunctionDefinitionList = [] +VariableDeclarationList = [] +EnumerationDefinitionList = [] +StructUnionDefinitionList = [] +TypedefDefinitionList = [] + + +## record file data when parsing source +# +# May raise Exception when opening file. +# +class FileProfile : + + ## The constructor + # + # @param self The object pointer + # @param FileName The file that to be parsed + # + def __init__(self, FileName): + self.FileLinesList = [] + try: + fsock = open(FileName, "rb", 0) + try: + self.FileLinesList = fsock.readlines() + self.FileLinesList = [list(s) for s in self.FileLinesList] + finally: + fsock.close() + + except IOError: + raise Warning("Error when opening file %s" % FileName) + + \ No newline at end of file diff --git a/Source/Python/Ecc/ParserWarning.py b/Source/Python/Ecc/ParserWarning.py new file mode 100644 index 0000000..547360d --- /dev/null +++ b/Source/Python/Ecc/ParserWarning.py @@ -0,0 +1,17 @@ +## The exception class that used to report error messages when preprocessing +# +# Currently the "ToolName" is set to be "ECC PP". +# +class Warning (Exception): + ## The constructor + # + # @param self The object pointer + # @param Str The message to record + # @param File The FDF name + # @param Line The Line number that error occurs + # + def __init__(self, Str, File = None, Line = None): + self.message = Str + self.FileName = File + self.LineNumber = Line + self.ToolName = 'ECC PP' \ No newline at end of file diff --git a/Source/Python/Ecc/c.py b/Source/Python/Ecc/c.py index c41fb22..49c2d44 100644 --- a/Source/Python/Ecc/c.py +++ b/Source/Python/Ecc/c.py @@ -3,8 +3,20 @@ import antlr3 from CLexer import CLexer from CParser import CParser -cStream = antlr3.StringStream(open(sys.argv[1]).read()) +from CodeFragmentCollector import CodeFragmentCollector +import FileProfile + +collector = CodeFragmentCollector(sys.argv[1]) +collector.PreprocessFile() +FileStringContents = '' +for fileLine in collector.Profile.FileLinesList: + FileStringContents += fileLine +cStream = antlr3.StringStream(FileStringContents) lexer = CLexer(cStream) tStream = antlr3.CommonTokenStream(lexer) parser = CParser(tStream) parser.translation_unit() + +for var in FileProfile.VariableDeclarationList: + print str(var.StartPos) + var.Declarator +print 'Done!' -- 2.17.1