1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 17:35:35 +02:00

support for implicit int, fixed problem with pointer return type

This commit is contained in:
Mike Kucera 2008-02-20 15:22:00 +00:00
parent b6d7d0cd9c
commit c474c73e50
10 changed files with 6988 additions and 6768 deletions

View file

@ -996,6 +996,7 @@ simple_declaration_specifiers
| no_type_declaration_specifiers simple_type_specifier
| simple_declaration_specifiers simple_type_specifier
| simple_declaration_specifiers no_type_declaration_specifier
| $empty
-- struct, union or class!
@ -1253,6 +1254,11 @@ declarator
| <openscope-ast> ptr_operator_seq direct_declarator
/. $Build consumeDeclaratorWithPointer(true); $EndBuild ./
function_declarator
::= function_direct_declarator
| <openscope-ast> ptr_operator_seq direct_declarator
/. $Build consumeDeclaratorWithPointer(true); $EndBuild ./
direct_declarator
::= basic_direct_declarator
@ -1430,9 +1436,9 @@ parameter_initializer
function_definition
::= declaration_specifiers_opt function_direct_declarator <openscope-ast> ctor_initializer_list_opt function_body
::= declaration_specifiers_opt function_declarator <openscope-ast> ctor_initializer_list_opt function_body
/. $Build consumeFunctionDefinition(false); $EndBuild ./
| declaration_specifiers_opt function_direct_declarator 'try' <openscope-ast> ctor_initializer_list_opt function_body <openscope-ast> handler_seq
| declaration_specifiers_opt function_declarator 'try' <openscope-ast> ctor_initializer_list_opt function_body <openscope-ast> handler_seq
/. $Build consumeFunctionDefinition(true); $EndBuild ./

View file

@ -15,38 +15,38 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
public interface CPPExpressionStatementParsersym {
public final static int
TK_asm = 67,
TK_asm = 68,
TK_auto = 48,
TK_bool = 13,
TK_break = 76,
TK_case = 77,
TK_break = 78,
TK_case = 79,
TK_catch = 115,
TK_char = 14,
TK_class = 57,
TK_class = 58,
TK_const = 46,
TK_const_cast = 26,
TK_continue = 78,
TK_default = 79,
TK_continue = 80,
TK_default = 81,
TK_delete = 40,
TK_do = 80,
TK_do = 82,
TK_double = 15,
TK_dynamic_cast = 27,
TK_else = 120,
TK_enum = 58,
TK_enum = 60,
TK_explicit = 49,
TK_export = 73,
TK_export = 74,
TK_extern = 42,
TK_false = 28,
TK_float = 16,
TK_for = 81,
TK_for = 83,
TK_friend = 50,
TK_goto = 82,
TK_if = 83,
TK_goto = 84,
TK_if = 85,
TK_inline = 51,
TK_int = 17,
TK_long = 18,
TK_mutable = 52,
TK_namespace = 65,
TK_namespace = 66,
TK_new = 41,
TK_operator = 6,
TK_private = 116,
@ -54,25 +54,25 @@ public interface CPPExpressionStatementParsersym {
TK_public = 118,
TK_register = 53,
TK_reinterpret_cast = 29,
TK_return = 84,
TK_return = 86,
TK_short = 19,
TK_signed = 20,
TK_sizeof = 30,
TK_static = 54,
TK_static_cast = 31,
TK_struct = 59,
TK_switch = 85,
TK_struct = 61,
TK_switch = 87,
TK_template = 55,
TK_this = 32,
TK_throw = 39,
TK_try = 74,
TK_try = 73,
TK_true = 33,
TK_typedef = 56,
TK_typeid = 34,
TK_typename = 8,
TK_union = 60,
TK_typename = 10,
TK_union = 62,
TK_unsigned = 21,
TK_using = 63,
TK_using = 64,
TK_virtual = 45,
TK_void = 22,
TK_volatile = 47,
@ -86,9 +86,9 @@ public interface CPPExpressionStatementParsersym {
TK_Completion = 121,
TK_EndOfCompletion = 122,
TK_Invalid = 123,
TK_LeftBracket = 61,
TK_LeftBracket = 57,
TK_LeftParen = 2,
TK_LeftBrace = 62,
TK_LeftBrace = 59,
TK_Dot = 114,
TK_DotStar = 94,
TK_Arrow = 101,
@ -97,16 +97,16 @@ public interface CPPExpressionStatementParsersym {
TK_MinusMinus = 12,
TK_And = 7,
TK_Star = 5,
TK_Plus = 9,
TK_Minus = 10,
TK_Plus = 8,
TK_Minus = 9,
TK_Tilde = 4,
TK_Bang = 25,
TK_Slash = 89,
TK_Percent = 90,
TK_RightShift = 86,
TK_LeftShift = 87,
TK_LT = 64,
TK_GT = 66,
TK_RightShift = 76,
TK_LeftShift = 77,
TK_LT = 63,
TK_GT = 65,
TK_LE = 91,
TK_GE = 92,
TK_EQ = 95,
@ -130,11 +130,11 @@ public interface CPPExpressionStatementParsersym {
TK_AndAssign = 109,
TK_CaretAssign = 110,
TK_OrAssign = 111,
TK_Comma = 68,
TK_Comma = 67,
TK_zero = 38,
TK_RightBracket = 113,
TK_RightParen = 72,
TK_RightBrace = 71,
TK_RightParen = 71,
TK_RightBrace = 72,
TK_SemiColon = 43,
TK_ERROR_TOKEN = 44,
TK_EOF_TOKEN = 119;
@ -148,9 +148,9 @@ public interface CPPExpressionStatementParsersym {
"Star",
"operator",
"And",
"typename",
"Plus",
"Minus",
"typename",
"PlusPlus",
"MinusMinus",
"bool",
@ -197,25 +197,27 @@ public interface CPPExpressionStatementParsersym {
"static",
"template",
"typedef",
"LeftBracket",
"class",
"LeftBrace",
"enum",
"struct",
"union",
"LeftBracket",
"LeftBrace",
"using",
"LT",
"namespace",
"using",
"GT",
"asm",
"namespace",
"Comma",
"asm",
"Assign",
"Colon",
"RightBrace",
"RightParen",
"export",
"RightBrace",
"try",
"export",
"while",
"RightShift",
"LeftShift",
"break",
"case",
"continue",
@ -226,8 +228,6 @@ public interface CPPExpressionStatementParsersym {
"if",
"return",
"switch",
"RightShift",
"LeftShift",
"ArrowStar",
"Slash",
"Percent",

View file

@ -15,38 +15,38 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
public interface CPPNoCastExpressionParsersym {
public final static int
TK_asm = 67,
TK_asm = 68,
TK_auto = 49,
TK_bool = 13,
TK_break = 76,
TK_case = 77,
TK_break = 78,
TK_case = 79,
TK_catch = 116,
TK_char = 14,
TK_class = 57,
TK_class = 58,
TK_const = 46,
TK_const_cast = 26,
TK_continue = 78,
TK_default = 79,
TK_continue = 80,
TK_default = 81,
TK_delete = 40,
TK_do = 80,
TK_do = 82,
TK_double = 15,
TK_dynamic_cast = 27,
TK_else = 120,
TK_enum = 60,
TK_enum = 61,
TK_explicit = 50,
TK_export = 73,
TK_export = 74,
TK_extern = 42,
TK_false = 28,
TK_float = 16,
TK_for = 81,
TK_for = 83,
TK_friend = 51,
TK_goto = 82,
TK_if = 83,
TK_goto = 84,
TK_if = 85,
TK_inline = 52,
TK_int = 17,
TK_long = 18,
TK_mutable = 53,
TK_namespace = 65,
TK_namespace = 66,
TK_new = 41,
TK_operator = 6,
TK_private = 117,
@ -54,25 +54,25 @@ public interface CPPNoCastExpressionParsersym {
TK_public = 119,
TK_register = 54,
TK_reinterpret_cast = 29,
TK_return = 84,
TK_return = 86,
TK_short = 19,
TK_signed = 20,
TK_sizeof = 30,
TK_static = 55,
TK_static_cast = 31,
TK_struct = 61,
TK_switch = 85,
TK_struct = 62,
TK_switch = 87,
TK_template = 47,
TK_this = 32,
TK_throw = 39,
TK_try = 74,
TK_try = 73,
TK_true = 33,
TK_typedef = 56,
TK_typeid = 34,
TK_typename = 8,
TK_union = 62,
TK_typename = 10,
TK_union = 63,
TK_unsigned = 21,
TK_using = 63,
TK_using = 64,
TK_virtual = 45,
TK_void = 22,
TK_volatile = 48,
@ -86,7 +86,7 @@ public interface CPPNoCastExpressionParsersym {
TK_Completion = 121,
TK_EndOfCompletion = 122,
TK_Invalid = 123,
TK_LeftBracket = 58,
TK_LeftBracket = 57,
TK_LeftParen = 2,
TK_LeftBrace = 59,
TK_Dot = 115,
@ -97,16 +97,16 @@ public interface CPPNoCastExpressionParsersym {
TK_MinusMinus = 12,
TK_And = 7,
TK_Star = 5,
TK_Plus = 9,
TK_Minus = 10,
TK_Plus = 8,
TK_Minus = 9,
TK_Tilde = 4,
TK_Bang = 25,
TK_Slash = 89,
TK_Percent = 90,
TK_RightShift = 86,
TK_LeftShift = 87,
TK_LT = 64,
TK_GT = 66,
TK_RightShift = 76,
TK_LeftShift = 77,
TK_LT = 60,
TK_GT = 65,
TK_LE = 91,
TK_GE = 92,
TK_EQ = 95,
@ -130,7 +130,7 @@ public interface CPPNoCastExpressionParsersym {
TK_AndAssign = 109,
TK_CaretAssign = 110,
TK_OrAssign = 111,
TK_Comma = 68,
TK_Comma = 67,
TK_zero = 38,
TK_RightBracket = 113,
TK_RightParen = 72,
@ -148,9 +148,9 @@ public interface CPPNoCastExpressionParsersym {
"Star",
"operator",
"And",
"typename",
"Plus",
"Minus",
"typename",
"PlusPlus",
"MinusMinus",
"bool",
@ -197,25 +197,27 @@ public interface CPPNoCastExpressionParsersym {
"register",
"static",
"typedef",
"class",
"LeftBracket",
"class",
"LeftBrace",
"LT",
"enum",
"struct",
"union",
"using",
"LT",
"namespace",
"GT",
"asm",
"namespace",
"Comma",
"asm",
"Assign",
"Colon",
"RightBrace",
"RightParen",
"export",
"try",
"export",
"while",
"RightShift",
"LeftShift",
"break",
"case",
"continue",
@ -226,8 +228,6 @@ public interface CPPNoCastExpressionParsersym {
"if",
"return",
"switch",
"RightShift",
"LeftShift",
"ArrowStar",
"Slash",
"Percent",

View file

@ -15,38 +15,38 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
public interface CPPParsersym {
public final static int
TK_asm = 65,
TK_asm = 66,
TK_auto = 48,
TK_bool = 11,
TK_break = 76,
TK_case = 77,
TK_break = 78,
TK_case = 79,
TK_catch = 115,
TK_char = 12,
TK_class = 57,
TK_const = 46,
TK_const_cast = 26,
TK_continue = 78,
TK_default = 79,
TK_continue = 80,
TK_default = 81,
TK_delete = 41,
TK_do = 80,
TK_do = 82,
TK_double = 13,
TK_dynamic_cast = 27,
TK_else = 120,
TK_enum = 58,
TK_enum = 59,
TK_explicit = 49,
TK_export = 72,
TK_export = 73,
TK_extern = 40,
TK_false = 28,
TK_float = 14,
TK_for = 81,
TK_for = 83,
TK_friend = 50,
TK_goto = 82,
TK_if = 83,
TK_goto = 84,
TK_if = 85,
TK_inline = 51,
TK_int = 15,
TK_long = 16,
TK_mutable = 52,
TK_namespace = 62,
TK_namespace = 64,
TK_new = 42,
TK_operator = 6,
TK_private = 116,
@ -54,14 +54,14 @@ public interface CPPParsersym {
TK_public = 118,
TK_register = 53,
TK_reinterpret_cast = 29,
TK_return = 84,
TK_return = 86,
TK_short = 17,
TK_signed = 18,
TK_sizeof = 30,
TK_static = 54,
TK_static_cast = 31,
TK_struct = 59,
TK_switch = 85,
TK_struct = 60,
TK_switch = 87,
TK_template = 55,
TK_this = 32,
TK_throw = 39,
@ -70,9 +70,9 @@ public interface CPPParsersym {
TK_typedef = 56,
TK_typeid = 34,
TK_typename = 8,
TK_union = 60,
TK_union = 61,
TK_unsigned = 19,
TK_using = 61,
TK_using = 62,
TK_virtual = 45,
TK_void = 20,
TK_volatile = 47,
@ -86,9 +86,9 @@ public interface CPPParsersym {
TK_Completion = 121,
TK_EndOfCompletion = 122,
TK_Invalid = 123,
TK_LeftBracket = 63,
TK_LeftBracket = 58,
TK_LeftParen = 2,
TK_LeftBrace = 64,
TK_LeftBrace = 63,
TK_Dot = 114,
TK_DotStar = 94,
TK_Arrow = 101,
@ -103,9 +103,9 @@ public interface CPPParsersym {
TK_Bang = 25,
TK_Slash = 89,
TK_Percent = 90,
TK_RightShift = 86,
TK_LeftShift = 87,
TK_LT = 66,
TK_RightShift = 76,
TK_LeftShift = 77,
TK_LT = 65,
TK_GT = 67,
TK_LE = 91,
TK_GE = 92,
@ -133,8 +133,8 @@ public interface CPPParsersym {
TK_Comma = 68,
TK_zero = 38,
TK_RightBracket = 113,
TK_RightParen = 73,
TK_RightBrace = 71,
TK_RightParen = 71,
TK_RightBrace = 72,
TK_SemiColon = 43,
TK_ERROR_TOKEN = 44,
TK_EOF_TOKEN = 119;
@ -198,24 +198,26 @@ public interface CPPParsersym {
"template",
"typedef",
"class",
"LeftBracket",
"enum",
"struct",
"union",
"using",
"namespace",
"LeftBracket",
"LeftBrace",
"asm",
"namespace",
"LT",
"asm",
"GT",
"Comma",
"Assign",
"Colon",
"RightParen",
"RightBrace",
"export",
"RightParen",
"try",
"while",
"RightShift",
"LeftShift",
"break",
"case",
"continue",
@ -226,8 +228,6 @@ public interface CPPParsersym {
"if",
"return",
"switch",
"RightShift",
"LeftShift",
"ArrowStar",
"Slash",
"Percent",