mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 09:55:29 +02:00
content assist kinda works for C++
This commit is contained in:
parent
d96259e1bc
commit
d6e82db1f9
15 changed files with 8789 additions and 8468 deletions
|
@ -320,16 +320,16 @@ $Rules
|
|||
|
||||
|
||||
']' ::=? 'RightBracket'
|
||||
--| 'EndOfCompletion'
|
||||
| 'EndOfCompletion'
|
||||
|
||||
')' ::=? 'RightParen'
|
||||
--| 'EndOfCompletion'
|
||||
| 'EndOfCompletion'
|
||||
|
||||
'}' ::=? 'RightBrace'
|
||||
--| 'EndOfCompletion'
|
||||
| 'EndOfCompletion'
|
||||
|
||||
';' ::=? 'SemiColon'
|
||||
--| 'EndOfCompletion'
|
||||
| 'EndOfCompletion'
|
||||
|
||||
|
||||
|
||||
|
@ -363,6 +363,11 @@ external_declaration
|
|||
-- Expressions
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
identifier_token
|
||||
::= 'identifier'
|
||||
| 'Completion'
|
||||
|
||||
|
||||
literal
|
||||
::= 'integer'
|
||||
/. $Build consumeExpressionLiteral(ICPPASTLiteralExpression.lk_integer_constant); $EndBuild ./
|
||||
|
@ -411,7 +416,7 @@ unqualified_id_name
|
|||
|
||||
-- wrap an identifier in a name node
|
||||
identifier_name
|
||||
::= 'identifier'
|
||||
::= identifier_token
|
||||
/. $Build consumeIdentifierName(); $EndBuild ./
|
||||
|
||||
|
||||
|
@ -885,7 +890,7 @@ jump_statement
|
|||
/. $Build consumeStatementReturn(true); $EndBuild ./
|
||||
| 'return' ';'
|
||||
/. $Build consumeStatementReturn(false); $EndBuild ./
|
||||
| 'goto' 'identifier' ';'
|
||||
| 'goto' identifier_token ';'
|
||||
/. $Build consumeStatementGoto(); $EndBuild ./
|
||||
|
||||
|
||||
|
@ -1034,7 +1039,7 @@ function_specifier
|
|||
|
||||
|
||||
typedef_name
|
||||
::= 'identifier'
|
||||
::= identifier_token
|
||||
|
||||
|
||||
--type_specifier
|
||||
|
@ -1103,13 +1108,13 @@ elaborated_type_specifier
|
|||
|
||||
|
||||
enum_name
|
||||
::= 'identifier'
|
||||
::= identifier_token
|
||||
|
||||
|
||||
enum_specifier
|
||||
::= 'enum' '{' <openscope-ast> enumerator_list_opt '}'
|
||||
/. $Build consumeTypeSpecifierEnumeration(false); $EndBuild ./
|
||||
| 'enum' 'identifier' '{' <openscope-ast> enumerator_list_opt '}'
|
||||
| 'enum' identifier_token '{' <openscope-ast> enumerator_list_opt '}'
|
||||
/. $Build consumeTypeSpecifierEnumeration(true); $EndBuild ./
|
||||
|
||||
|
||||
|
@ -1131,7 +1136,7 @@ enumerator_definition
|
|||
|
||||
|
||||
enumerator
|
||||
::= 'identifier'
|
||||
::= identifier_token
|
||||
|
||||
|
||||
namespace_name
|
||||
|
@ -1169,11 +1174,11 @@ unnamed_namespace_definition
|
|||
|
||||
|
||||
namespace_alias
|
||||
::= 'identifier'
|
||||
::= identifier_token
|
||||
|
||||
|
||||
namespace_alias_definition
|
||||
::= 'namespace' 'identifier' '=' dcolon_opt nested_name_specifier_opt namespace_name ';'
|
||||
::= 'namespace' identifier_token '=' dcolon_opt nested_name_specifier_opt namespace_name ';'
|
||||
/. $Build consumeNamespaceAliasDefinition(); $EndBuild ./
|
||||
|
||||
|
||||
|
@ -1478,11 +1483,6 @@ class_head -- done
|
|||
/. $Build consumeClassHead(true); $EndBuild ./
|
||||
|
||||
|
||||
identifier_opt
|
||||
::= 'identifier'
|
||||
| $empty
|
||||
|
||||
|
||||
identifier_name_opt
|
||||
::= identifier_name
|
||||
| $empty
|
||||
|
|
|
@ -45,8 +45,8 @@ import org.eclipse.core.runtime.CoreException;
|
|||
public abstract class BaseExtensibleLanguage extends AbstractLanguage implements ILanguage, ICLanguageKeywords {
|
||||
|
||||
|
||||
private static final boolean DEBUG_PRINT_GCC_AST = false;
|
||||
private static final boolean DEBUG_PRINT_AST = false;
|
||||
private static final boolean DEBUG_PRINT_GCC_AST = true;
|
||||
private static final boolean DEBUG_PRINT_AST = true;
|
||||
|
||||
/**
|
||||
* Retrieve the parser (runs after the preprocessor runs).
|
||||
|
@ -148,7 +148,19 @@ public abstract class BaseExtensibleLanguage extends AbstractLanguage implements
|
|||
|
||||
public IASTCompletionNode getCompletionNode(CodeReader reader,
|
||||
IScannerInfo scanInfo, ICodeReaderFactory fileCreator,
|
||||
IIndex index, IParserLogService log, int offset) {
|
||||
IIndex index, IParserLogService log, int offset) throws CoreException {
|
||||
|
||||
|
||||
if(DEBUG_PRINT_GCC_AST) {
|
||||
ILanguage gppLanguage = GPPLanguage.getDefault();
|
||||
IASTCompletionNode cn = gppLanguage.getCompletionNode(reader, scanInfo, fileCreator, index, log, offset);
|
||||
|
||||
System.out.println();
|
||||
System.out.println("********************************************************");
|
||||
System.out.println("GPP AST:");
|
||||
DebugUtil.printAST(cn.getTranslationUnit());
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
// TODO temporary
|
||||
IScannerExtensionConfiguration config = new GCCScannerExtensionConfiguration();
|
||||
|
@ -164,6 +176,14 @@ public abstract class BaseExtensibleLanguage extends AbstractLanguage implements
|
|||
|
||||
// the parser will fill in the rest of the AST
|
||||
IASTCompletionNode completionNode = parser.parse(tu);
|
||||
|
||||
if(DEBUG_PRINT_AST) {
|
||||
System.out.println("Base Extensible Language AST:");
|
||||
DebugUtil.printAST(tu);
|
||||
System.out.println();
|
||||
System.out.println("Completion Node: " + completionNode);
|
||||
}
|
||||
|
||||
return completionNode;
|
||||
}
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ public class LPGTokenAdapter implements lpg.lpgjavaruntime.IToken {
|
|||
this.tokenIndex = tokenIndex;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public String toString() {
|
||||
return token.toString();
|
||||
}
|
||||
|
|
|
@ -68,7 +68,9 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCastExpression;
|
|||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTLiteralExpression;
|
||||
import org.eclipse.cdt.core.dom.lrparser.IParser;
|
||||
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
|
||||
import static org.eclipse.cdt.core.dom.lrparser.util.CollectionUtils.matchTokens;
|
||||
import org.eclipse.cdt.core.dom.lrparser.util.DebugUtil;
|
||||
import org.eclipse.cdt.internal.core.dom.lrparser.cpp.CPPParsersym;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
|
||||
|
||||
|
||||
|
@ -992,6 +994,10 @@ public abstract class BuildASTParserAction {
|
|||
List<Object> declarators = (hasDeclaratorList) ? astStack.closeScope() : Collections.emptyList();
|
||||
IASTDeclSpecifier declSpecifier = (IASTDeclSpecifier) astStack.pop(); // may be null
|
||||
|
||||
// do not generate nodes for extra EOC tokens
|
||||
if(matchTokens(parser.getRuleTokens(), CPPParsersym.TK_EndOfCompletion))
|
||||
return;
|
||||
|
||||
if(declSpecifier == null) { // can happen if implicit int is used
|
||||
declSpecifier = nodeFactory.newSimpleDeclSpecifier();
|
||||
setOffsetAndLength(declSpecifier, parser.getLeftIToken().getStartOffset(), 0);
|
||||
|
|
|
@ -122,8 +122,7 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
|
|||
|
||||
@Override
|
||||
protected boolean isCompletionToken(IToken token) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
return token.getKind() == CPPParsersym.TK_Completion;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -56,6 +56,8 @@ import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer;
|
|||
class ASTPrinter {
|
||||
|
||||
|
||||
private static boolean PRINT_PARENT_PROPERTIES = false;
|
||||
private static boolean RESOLVE_BINDINGS = false;
|
||||
|
||||
/**
|
||||
* Prints the AST to the given PrintStream.
|
||||
|
@ -144,7 +146,8 @@ class ASTPrinter {
|
|||
if(node.getParent() == null && !(node instanceof IASTTranslationUnit)) {
|
||||
out.print("PARENT IS NULL ");
|
||||
}
|
||||
out.print(node.getPropertyInParent());
|
||||
if(PRINT_PARENT_PROPERTIES)
|
||||
out.print(node.getPropertyInParent());
|
||||
}
|
||||
|
||||
if(n instanceof ICArrayType) {
|
||||
|
@ -379,13 +382,14 @@ class ASTPrinter {
|
|||
@Override
|
||||
public int visit(IASTName name) {
|
||||
print(name);
|
||||
try {
|
||||
IBinding binding = name.resolveBinding();
|
||||
print(binding);
|
||||
} catch(Exception e) {
|
||||
System.out.println("Exception while resolving binding: " + name);
|
||||
if(RESOLVE_BINDINGS) {
|
||||
try {
|
||||
IBinding binding = name.resolveBinding();
|
||||
print(binding);
|
||||
} catch(Exception e) {
|
||||
System.out.println("Exception while resolving binding: " + name);
|
||||
}
|
||||
}
|
||||
|
||||
indentLevel++;
|
||||
return super.visit(name);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -15,133 +15,134 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
|
|||
|
||||
public interface CPPExpressionStatementParsersym {
|
||||
public final static int
|
||||
TK_asm = 67,
|
||||
TK_auto = 48,
|
||||
TK_bool = 13,
|
||||
TK_break = 76,
|
||||
TK_case = 77,
|
||||
TK_catch = 115,
|
||||
TK_char = 14,
|
||||
TK_class = 57,
|
||||
TK_const = 46,
|
||||
TK_const_cast = 26,
|
||||
TK_continue = 78,
|
||||
TK_default = 79,
|
||||
TK_delete = 40,
|
||||
TK_do = 80,
|
||||
TK_double = 15,
|
||||
TK_dynamic_cast = 27,
|
||||
TK_else = 120,
|
||||
TK_enum = 59,
|
||||
TK_explicit = 49,
|
||||
TK_export = 74,
|
||||
TK_extern = 42,
|
||||
TK_false = 28,
|
||||
TK_float = 16,
|
||||
TK_for = 81,
|
||||
TK_friend = 50,
|
||||
TK_goto = 82,
|
||||
TK_if = 83,
|
||||
TK_inline = 51,
|
||||
TK_int = 17,
|
||||
TK_long = 18,
|
||||
TK_mutable = 52,
|
||||
TK_namespace = 65,
|
||||
TK_new = 41,
|
||||
TK_operator = 6,
|
||||
TK_private = 116,
|
||||
TK_protected = 117,
|
||||
TK_public = 118,
|
||||
TK_register = 53,
|
||||
TK_reinterpret_cast = 29,
|
||||
TK_return = 84,
|
||||
TK_short = 19,
|
||||
TK_signed = 20,
|
||||
TK_sizeof = 30,
|
||||
TK_static = 54,
|
||||
TK_static_cast = 31,
|
||||
TK_struct = 60,
|
||||
TK_switch = 85,
|
||||
TK_template = 55,
|
||||
TK_this = 32,
|
||||
TK_throw = 39,
|
||||
TK_try = 73,
|
||||
TK_true = 33,
|
||||
TK_typedef = 56,
|
||||
TK_typeid = 34,
|
||||
TK_typename = 8,
|
||||
TK_union = 61,
|
||||
TK_unsigned = 21,
|
||||
TK_using = 64,
|
||||
TK_virtual = 45,
|
||||
TK_void = 22,
|
||||
TK_volatile = 47,
|
||||
TK_wchar_t = 23,
|
||||
TK_while = 75,
|
||||
TK_integer = 35,
|
||||
TK_floating = 36,
|
||||
TK_charconst = 37,
|
||||
TK_stringlit = 24,
|
||||
TK_asm = 68,
|
||||
TK_auto = 50,
|
||||
TK_bool = 15,
|
||||
TK_break = 77,
|
||||
TK_case = 78,
|
||||
TK_catch = 117,
|
||||
TK_char = 16,
|
||||
TK_class = 59,
|
||||
TK_const = 48,
|
||||
TK_const_cast = 28,
|
||||
TK_continue = 79,
|
||||
TK_default = 80,
|
||||
TK_delete = 42,
|
||||
TK_do = 81,
|
||||
TK_double = 17,
|
||||
TK_dynamic_cast = 29,
|
||||
TK_else = 122,
|
||||
TK_enum = 61,
|
||||
TK_explicit = 51,
|
||||
TK_export = 82,
|
||||
TK_extern = 44,
|
||||
TK_false = 30,
|
||||
TK_float = 18,
|
||||
TK_for = 83,
|
||||
TK_friend = 52,
|
||||
TK_goto = 84,
|
||||
TK_if = 85,
|
||||
TK_inline = 53,
|
||||
TK_int = 19,
|
||||
TK_long = 20,
|
||||
TK_mutable = 54,
|
||||
TK_namespace = 67,
|
||||
TK_new = 43,
|
||||
TK_operator = 7,
|
||||
TK_private = 118,
|
||||
TK_protected = 119,
|
||||
TK_public = 120,
|
||||
TK_register = 55,
|
||||
TK_reinterpret_cast = 31,
|
||||
TK_return = 86,
|
||||
TK_short = 21,
|
||||
TK_signed = 22,
|
||||
TK_sizeof = 32,
|
||||
TK_static = 56,
|
||||
TK_static_cast = 33,
|
||||
TK_struct = 62,
|
||||
TK_switch = 87,
|
||||
TK_template = 58,
|
||||
TK_this = 34,
|
||||
TK_throw = 41,
|
||||
TK_try = 74,
|
||||
TK_true = 35,
|
||||
TK_typedef = 57,
|
||||
TK_typeid = 36,
|
||||
TK_typename = 9,
|
||||
TK_union = 63,
|
||||
TK_unsigned = 23,
|
||||
TK_using = 65,
|
||||
TK_virtual = 47,
|
||||
TK_void = 24,
|
||||
TK_volatile = 49,
|
||||
TK_wchar_t = 25,
|
||||
TK_while = 76,
|
||||
TK_integer = 37,
|
||||
TK_floating = 38,
|
||||
TK_charconst = 39,
|
||||
TK_stringlit = 26,
|
||||
TK_identifier = 1,
|
||||
TK_Completion = 121,
|
||||
TK_EndOfCompletion = 122,
|
||||
TK_Completion = 2,
|
||||
TK_EndOfCompletion = 12,
|
||||
TK_Invalid = 123,
|
||||
TK_LeftBracket = 62,
|
||||
TK_LeftParen = 2,
|
||||
TK_LeftBrace = 63,
|
||||
TK_Dot = 114,
|
||||
TK_DotStar = 94,
|
||||
TK_Arrow = 101,
|
||||
TK_ArrowStar = 88,
|
||||
TK_PlusPlus = 11,
|
||||
TK_MinusMinus = 12,
|
||||
TK_And = 7,
|
||||
TK_Star = 5,
|
||||
TK_Plus = 9,
|
||||
TK_Minus = 10,
|
||||
TK_Tilde = 4,
|
||||
TK_Bang = 25,
|
||||
TK_Slash = 89,
|
||||
TK_Percent = 90,
|
||||
TK_RightShift = 86,
|
||||
TK_LeftShift = 87,
|
||||
TK_LT = 58,
|
||||
TK_GT = 66,
|
||||
TK_LE = 91,
|
||||
TK_GE = 92,
|
||||
TK_EQ = 95,
|
||||
TK_NE = 96,
|
||||
TK_Caret = 97,
|
||||
TK_Or = 98,
|
||||
TK_AndAnd = 99,
|
||||
TK_OrOr = 100,
|
||||
TK_Question = 112,
|
||||
TK_Colon = 70,
|
||||
TK_ColonColon = 3,
|
||||
TK_DotDotDot = 93,
|
||||
TK_Assign = 69,
|
||||
TK_StarAssign = 102,
|
||||
TK_SlashAssign = 103,
|
||||
TK_PercentAssign = 104,
|
||||
TK_PlusAssign = 105,
|
||||
TK_MinusAssign = 106,
|
||||
TK_RightShiftAssign = 107,
|
||||
TK_LeftShiftAssign = 108,
|
||||
TK_AndAssign = 109,
|
||||
TK_CaretAssign = 110,
|
||||
TK_OrAssign = 111,
|
||||
TK_Comma = 68,
|
||||
TK_zero = 38,
|
||||
TK_RightBracket = 113,
|
||||
TK_RightParen = 72,
|
||||
TK_RightBrace = 71,
|
||||
TK_SemiColon = 43,
|
||||
TK_ERROR_TOKEN = 44,
|
||||
TK_EOF_TOKEN = 119;
|
||||
TK_LeftBracket = 66,
|
||||
TK_LeftParen = 3,
|
||||
TK_LeftBrace = 64,
|
||||
TK_Dot = 116,
|
||||
TK_DotStar = 96,
|
||||
TK_Arrow = 103,
|
||||
TK_ArrowStar = 90,
|
||||
TK_PlusPlus = 13,
|
||||
TK_MinusMinus = 14,
|
||||
TK_And = 8,
|
||||
TK_Star = 6,
|
||||
TK_Plus = 10,
|
||||
TK_Minus = 11,
|
||||
TK_Tilde = 5,
|
||||
TK_Bang = 27,
|
||||
TK_Slash = 91,
|
||||
TK_Percent = 92,
|
||||
TK_RightShift = 88,
|
||||
TK_LeftShift = 89,
|
||||
TK_LT = 60,
|
||||
TK_GT = 69,
|
||||
TK_LE = 93,
|
||||
TK_GE = 94,
|
||||
TK_EQ = 97,
|
||||
TK_NE = 98,
|
||||
TK_Caret = 99,
|
||||
TK_Or = 100,
|
||||
TK_AndAnd = 101,
|
||||
TK_OrOr = 102,
|
||||
TK_Question = 114,
|
||||
TK_Colon = 73,
|
||||
TK_ColonColon = 4,
|
||||
TK_DotDotDot = 95,
|
||||
TK_Assign = 71,
|
||||
TK_StarAssign = 104,
|
||||
TK_SlashAssign = 105,
|
||||
TK_PercentAssign = 106,
|
||||
TK_PlusAssign = 107,
|
||||
TK_MinusAssign = 108,
|
||||
TK_RightShiftAssign = 109,
|
||||
TK_LeftShiftAssign = 110,
|
||||
TK_AndAssign = 111,
|
||||
TK_CaretAssign = 112,
|
||||
TK_OrAssign = 113,
|
||||
TK_Comma = 70,
|
||||
TK_zero = 40,
|
||||
TK_RightBracket = 115,
|
||||
TK_RightParen = 75,
|
||||
TK_RightBrace = 72,
|
||||
TK_SemiColon = 45,
|
||||
TK_ERROR_TOKEN = 46,
|
||||
TK_EOF_TOKEN = 121;
|
||||
|
||||
public final static String orderedTerminalSymbols[] = {
|
||||
"",
|
||||
"identifier",
|
||||
"Completion",
|
||||
"LeftParen",
|
||||
"ColonColon",
|
||||
"Tilde",
|
||||
|
@ -151,6 +152,7 @@ public interface CPPExpressionStatementParsersym {
|
|||
"typename",
|
||||
"Plus",
|
||||
"Minus",
|
||||
"EndOfCompletion",
|
||||
"PlusPlus",
|
||||
"MinusMinus",
|
||||
"bool",
|
||||
|
@ -195,32 +197,32 @@ public interface CPPExpressionStatementParsersym {
|
|||
"mutable",
|
||||
"register",
|
||||
"static",
|
||||
"template",
|
||||
"typedef",
|
||||
"template",
|
||||
"class",
|
||||
"LT",
|
||||
"enum",
|
||||
"struct",
|
||||
"union",
|
||||
"LeftBracket",
|
||||
"LeftBrace",
|
||||
"using",
|
||||
"LeftBracket",
|
||||
"namespace",
|
||||
"GT",
|
||||
"asm",
|
||||
"GT",
|
||||
"Comma",
|
||||
"Assign",
|
||||
"Colon",
|
||||
"RightBrace",
|
||||
"RightParen",
|
||||
"Colon",
|
||||
"try",
|
||||
"export",
|
||||
"RightParen",
|
||||
"while",
|
||||
"break",
|
||||
"case",
|
||||
"continue",
|
||||
"default",
|
||||
"do",
|
||||
"export",
|
||||
"for",
|
||||
"goto",
|
||||
"if",
|
||||
|
@ -261,8 +263,6 @@ public interface CPPExpressionStatementParsersym {
|
|||
"public",
|
||||
"EOF_TOKEN",
|
||||
"else",
|
||||
"Completion",
|
||||
"EndOfCompletion",
|
||||
"Invalid"
|
||||
};
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -15,133 +15,134 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
|
|||
|
||||
public interface CPPNoCastExpressionParsersym {
|
||||
public final static int
|
||||
TK_asm = 67,
|
||||
TK_auto = 49,
|
||||
TK_bool = 13,
|
||||
TK_break = 76,
|
||||
TK_case = 77,
|
||||
TK_catch = 116,
|
||||
TK_char = 14,
|
||||
TK_class = 58,
|
||||
TK_const = 46,
|
||||
TK_const_cast = 26,
|
||||
TK_continue = 78,
|
||||
TK_default = 79,
|
||||
TK_delete = 40,
|
||||
TK_do = 80,
|
||||
TK_double = 15,
|
||||
TK_dynamic_cast = 27,
|
||||
TK_else = 120,
|
||||
TK_enum = 61,
|
||||
TK_explicit = 50,
|
||||
TK_export = 74,
|
||||
TK_extern = 42,
|
||||
TK_false = 28,
|
||||
TK_float = 16,
|
||||
TK_for = 81,
|
||||
TK_friend = 51,
|
||||
TK_goto = 82,
|
||||
TK_if = 83,
|
||||
TK_inline = 52,
|
||||
TK_int = 17,
|
||||
TK_long = 18,
|
||||
TK_mutable = 53,
|
||||
TK_namespace = 65,
|
||||
TK_new = 41,
|
||||
TK_operator = 6,
|
||||
TK_private = 117,
|
||||
TK_protected = 118,
|
||||
TK_public = 119,
|
||||
TK_register = 54,
|
||||
TK_reinterpret_cast = 29,
|
||||
TK_return = 84,
|
||||
TK_short = 19,
|
||||
TK_signed = 20,
|
||||
TK_sizeof = 30,
|
||||
TK_static = 55,
|
||||
TK_static_cast = 31,
|
||||
TK_struct = 62,
|
||||
TK_switch = 85,
|
||||
TK_template = 47,
|
||||
TK_this = 32,
|
||||
TK_throw = 39,
|
||||
TK_try = 73,
|
||||
TK_true = 33,
|
||||
TK_typedef = 56,
|
||||
TK_typeid = 34,
|
||||
TK_typename = 8,
|
||||
TK_union = 63,
|
||||
TK_unsigned = 21,
|
||||
TK_using = 64,
|
||||
TK_virtual = 45,
|
||||
TK_void = 22,
|
||||
TK_volatile = 48,
|
||||
TK_wchar_t = 23,
|
||||
TK_while = 75,
|
||||
TK_integer = 35,
|
||||
TK_floating = 36,
|
||||
TK_charconst = 37,
|
||||
TK_stringlit = 24,
|
||||
TK_asm = 68,
|
||||
TK_auto = 50,
|
||||
TK_bool = 15,
|
||||
TK_break = 77,
|
||||
TK_case = 78,
|
||||
TK_catch = 118,
|
||||
TK_char = 16,
|
||||
TK_class = 60,
|
||||
TK_const = 48,
|
||||
TK_const_cast = 28,
|
||||
TK_continue = 79,
|
||||
TK_default = 80,
|
||||
TK_delete = 42,
|
||||
TK_do = 81,
|
||||
TK_double = 17,
|
||||
TK_dynamic_cast = 29,
|
||||
TK_else = 122,
|
||||
TK_enum = 62,
|
||||
TK_explicit = 51,
|
||||
TK_export = 82,
|
||||
TK_extern = 44,
|
||||
TK_false = 30,
|
||||
TK_float = 18,
|
||||
TK_for = 83,
|
||||
TK_friend = 52,
|
||||
TK_goto = 84,
|
||||
TK_if = 85,
|
||||
TK_inline = 53,
|
||||
TK_int = 19,
|
||||
TK_long = 20,
|
||||
TK_mutable = 54,
|
||||
TK_namespace = 67,
|
||||
TK_new = 43,
|
||||
TK_operator = 7,
|
||||
TK_private = 119,
|
||||
TK_protected = 120,
|
||||
TK_public = 121,
|
||||
TK_register = 55,
|
||||
TK_reinterpret_cast = 31,
|
||||
TK_return = 86,
|
||||
TK_short = 21,
|
||||
TK_signed = 22,
|
||||
TK_sizeof = 32,
|
||||
TK_static = 56,
|
||||
TK_static_cast = 33,
|
||||
TK_struct = 63,
|
||||
TK_switch = 87,
|
||||
TK_template = 57,
|
||||
TK_this = 34,
|
||||
TK_throw = 41,
|
||||
TK_try = 74,
|
||||
TK_true = 35,
|
||||
TK_typedef = 58,
|
||||
TK_typeid = 36,
|
||||
TK_typename = 9,
|
||||
TK_union = 64,
|
||||
TK_unsigned = 23,
|
||||
TK_using = 65,
|
||||
TK_virtual = 47,
|
||||
TK_void = 24,
|
||||
TK_volatile = 49,
|
||||
TK_wchar_t = 25,
|
||||
TK_while = 76,
|
||||
TK_integer = 37,
|
||||
TK_floating = 38,
|
||||
TK_charconst = 39,
|
||||
TK_stringlit = 26,
|
||||
TK_identifier = 1,
|
||||
TK_Completion = 121,
|
||||
TK_EndOfCompletion = 122,
|
||||
TK_Completion = 2,
|
||||
TK_EndOfCompletion = 12,
|
||||
TK_Invalid = 123,
|
||||
TK_LeftBracket = 59,
|
||||
TK_LeftParen = 2,
|
||||
TK_LeftBrace = 60,
|
||||
TK_Dot = 115,
|
||||
TK_DotStar = 94,
|
||||
TK_Arrow = 101,
|
||||
TK_ArrowStar = 88,
|
||||
TK_PlusPlus = 11,
|
||||
TK_MinusMinus = 12,
|
||||
TK_And = 7,
|
||||
TK_Star = 5,
|
||||
TK_Plus = 9,
|
||||
TK_Minus = 10,
|
||||
TK_Tilde = 4,
|
||||
TK_Bang = 25,
|
||||
TK_Slash = 89,
|
||||
TK_Percent = 90,
|
||||
TK_RightShift = 86,
|
||||
TK_LeftShift = 87,
|
||||
TK_LT = 57,
|
||||
TK_GT = 66,
|
||||
TK_LE = 91,
|
||||
TK_GE = 92,
|
||||
TK_EQ = 95,
|
||||
TK_NE = 96,
|
||||
TK_Caret = 97,
|
||||
TK_Or = 98,
|
||||
TK_AndAnd = 99,
|
||||
TK_OrOr = 100,
|
||||
TK_Question = 112,
|
||||
TK_Colon = 70,
|
||||
TK_ColonColon = 3,
|
||||
TK_DotDotDot = 93,
|
||||
TK_Assign = 69,
|
||||
TK_StarAssign = 102,
|
||||
TK_SlashAssign = 103,
|
||||
TK_PercentAssign = 104,
|
||||
TK_PlusAssign = 105,
|
||||
TK_MinusAssign = 106,
|
||||
TK_RightShiftAssign = 107,
|
||||
TK_LeftShiftAssign = 108,
|
||||
TK_AndAssign = 109,
|
||||
TK_CaretAssign = 110,
|
||||
TK_OrAssign = 111,
|
||||
TK_Comma = 68,
|
||||
TK_zero = 38,
|
||||
TK_RightBracket = 113,
|
||||
TK_RightParen = 72,
|
||||
TK_RightBrace = 71,
|
||||
TK_SemiColon = 43,
|
||||
TK_ERROR_TOKEN = 44,
|
||||
TK_EOF_TOKEN = 114;
|
||||
TK_LeftBracket = 66,
|
||||
TK_LeftParen = 3,
|
||||
TK_LeftBrace = 61,
|
||||
TK_Dot = 117,
|
||||
TK_DotStar = 96,
|
||||
TK_Arrow = 103,
|
||||
TK_ArrowStar = 90,
|
||||
TK_PlusPlus = 13,
|
||||
TK_MinusMinus = 14,
|
||||
TK_And = 8,
|
||||
TK_Star = 6,
|
||||
TK_Plus = 10,
|
||||
TK_Minus = 11,
|
||||
TK_Tilde = 5,
|
||||
TK_Bang = 27,
|
||||
TK_Slash = 91,
|
||||
TK_Percent = 92,
|
||||
TK_RightShift = 88,
|
||||
TK_LeftShift = 89,
|
||||
TK_LT = 59,
|
||||
TK_GT = 69,
|
||||
TK_LE = 93,
|
||||
TK_GE = 94,
|
||||
TK_EQ = 97,
|
||||
TK_NE = 98,
|
||||
TK_Caret = 99,
|
||||
TK_Or = 100,
|
||||
TK_AndAnd = 101,
|
||||
TK_OrOr = 102,
|
||||
TK_Question = 114,
|
||||
TK_Colon = 73,
|
||||
TK_ColonColon = 4,
|
||||
TK_DotDotDot = 95,
|
||||
TK_Assign = 71,
|
||||
TK_StarAssign = 104,
|
||||
TK_SlashAssign = 105,
|
||||
TK_PercentAssign = 106,
|
||||
TK_PlusAssign = 107,
|
||||
TK_MinusAssign = 108,
|
||||
TK_RightShiftAssign = 109,
|
||||
TK_LeftShiftAssign = 110,
|
||||
TK_AndAssign = 111,
|
||||
TK_CaretAssign = 112,
|
||||
TK_OrAssign = 113,
|
||||
TK_Comma = 70,
|
||||
TK_zero = 40,
|
||||
TK_RightBracket = 115,
|
||||
TK_RightParen = 75,
|
||||
TK_RightBrace = 72,
|
||||
TK_SemiColon = 45,
|
||||
TK_ERROR_TOKEN = 46,
|
||||
TK_EOF_TOKEN = 116;
|
||||
|
||||
public final static String orderedTerminalSymbols[] = {
|
||||
"",
|
||||
"identifier",
|
||||
"Completion",
|
||||
"LeftParen",
|
||||
"ColonColon",
|
||||
"Tilde",
|
||||
|
@ -151,6 +152,7 @@ public interface CPPNoCastExpressionParsersym {
|
|||
"typename",
|
||||
"Plus",
|
||||
"Minus",
|
||||
"EndOfCompletion",
|
||||
"PlusPlus",
|
||||
"MinusMinus",
|
||||
"bool",
|
||||
|
@ -187,7 +189,6 @@ public interface CPPNoCastExpressionParsersym {
|
|||
"ERROR_TOKEN",
|
||||
"virtual",
|
||||
"const",
|
||||
"template",
|
||||
"volatile",
|
||||
"auto",
|
||||
"explicit",
|
||||
|
@ -196,31 +197,32 @@ public interface CPPNoCastExpressionParsersym {
|
|||
"mutable",
|
||||
"register",
|
||||
"static",
|
||||
"template",
|
||||
"typedef",
|
||||
"LT",
|
||||
"class",
|
||||
"LeftBracket",
|
||||
"LeftBrace",
|
||||
"enum",
|
||||
"struct",
|
||||
"union",
|
||||
"using",
|
||||
"LeftBracket",
|
||||
"namespace",
|
||||
"GT",
|
||||
"asm",
|
||||
"GT",
|
||||
"Comma",
|
||||
"Assign",
|
||||
"Colon",
|
||||
"RightBrace",
|
||||
"RightParen",
|
||||
"Colon",
|
||||
"try",
|
||||
"export",
|
||||
"RightParen",
|
||||
"while",
|
||||
"break",
|
||||
"case",
|
||||
"continue",
|
||||
"default",
|
||||
"do",
|
||||
"export",
|
||||
"for",
|
||||
"goto",
|
||||
"if",
|
||||
|
@ -261,8 +263,6 @@ public interface CPPNoCastExpressionParsersym {
|
|||
"protected",
|
||||
"public",
|
||||
"else",
|
||||
"Completion",
|
||||
"EndOfCompletion",
|
||||
"Invalid"
|
||||
};
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -15,133 +15,134 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
|
|||
|
||||
public interface CPPParsersym {
|
||||
public final static int
|
||||
TK_asm = 66,
|
||||
TK_auto = 48,
|
||||
TK_bool = 11,
|
||||
TK_break = 76,
|
||||
TK_case = 77,
|
||||
TK_catch = 115,
|
||||
TK_char = 12,
|
||||
TK_class = 57,
|
||||
TK_const = 46,
|
||||
TK_const_cast = 26,
|
||||
TK_continue = 78,
|
||||
TK_default = 79,
|
||||
TK_delete = 41,
|
||||
TK_do = 80,
|
||||
TK_double = 13,
|
||||
TK_dynamic_cast = 27,
|
||||
TK_else = 120,
|
||||
TK_enum = 59,
|
||||
TK_explicit = 49,
|
||||
TK_export = 72,
|
||||
TK_extern = 40,
|
||||
TK_false = 28,
|
||||
TK_float = 14,
|
||||
TK_for = 81,
|
||||
TK_friend = 50,
|
||||
TK_goto = 82,
|
||||
TK_if = 83,
|
||||
TK_inline = 51,
|
||||
TK_int = 15,
|
||||
TK_long = 16,
|
||||
TK_mutable = 52,
|
||||
TK_namespace = 63,
|
||||
TK_new = 42,
|
||||
TK_operator = 6,
|
||||
TK_private = 116,
|
||||
TK_protected = 117,
|
||||
TK_public = 118,
|
||||
TK_register = 53,
|
||||
TK_reinterpret_cast = 29,
|
||||
TK_return = 84,
|
||||
TK_short = 17,
|
||||
TK_signed = 18,
|
||||
TK_sizeof = 30,
|
||||
TK_static = 54,
|
||||
TK_static_cast = 31,
|
||||
TK_struct = 60,
|
||||
TK_switch = 85,
|
||||
TK_template = 55,
|
||||
TK_this = 32,
|
||||
TK_throw = 39,
|
||||
TK_try = 74,
|
||||
TK_true = 33,
|
||||
TK_typedef = 56,
|
||||
TK_typeid = 34,
|
||||
TK_typename = 8,
|
||||
TK_union = 61,
|
||||
TK_unsigned = 19,
|
||||
TK_using = 62,
|
||||
TK_virtual = 45,
|
||||
TK_void = 20,
|
||||
TK_volatile = 47,
|
||||
TK_wchar_t = 21,
|
||||
TK_while = 75,
|
||||
TK_integer = 35,
|
||||
TK_floating = 36,
|
||||
TK_charconst = 37,
|
||||
TK_stringlit = 24,
|
||||
TK_asm = 67,
|
||||
TK_auto = 50,
|
||||
TK_bool = 13,
|
||||
TK_break = 78,
|
||||
TK_case = 79,
|
||||
TK_catch = 117,
|
||||
TK_char = 14,
|
||||
TK_class = 59,
|
||||
TK_const = 48,
|
||||
TK_const_cast = 28,
|
||||
TK_continue = 80,
|
||||
TK_default = 81,
|
||||
TK_delete = 43,
|
||||
TK_do = 82,
|
||||
TK_double = 15,
|
||||
TK_dynamic_cast = 29,
|
||||
TK_else = 122,
|
||||
TK_enum = 61,
|
||||
TK_explicit = 51,
|
||||
TK_export = 74,
|
||||
TK_extern = 42,
|
||||
TK_false = 30,
|
||||
TK_float = 16,
|
||||
TK_for = 83,
|
||||
TK_friend = 52,
|
||||
TK_goto = 84,
|
||||
TK_if = 85,
|
||||
TK_inline = 53,
|
||||
TK_int = 17,
|
||||
TK_long = 18,
|
||||
TK_mutable = 54,
|
||||
TK_namespace = 65,
|
||||
TK_new = 44,
|
||||
TK_operator = 7,
|
||||
TK_private = 118,
|
||||
TK_protected = 119,
|
||||
TK_public = 120,
|
||||
TK_register = 55,
|
||||
TK_reinterpret_cast = 31,
|
||||
TK_return = 86,
|
||||
TK_short = 19,
|
||||
TK_signed = 20,
|
||||
TK_sizeof = 32,
|
||||
TK_static = 56,
|
||||
TK_static_cast = 33,
|
||||
TK_struct = 62,
|
||||
TK_switch = 87,
|
||||
TK_template = 58,
|
||||
TK_this = 34,
|
||||
TK_throw = 41,
|
||||
TK_try = 75,
|
||||
TK_true = 35,
|
||||
TK_typedef = 57,
|
||||
TK_typeid = 36,
|
||||
TK_typename = 9,
|
||||
TK_union = 63,
|
||||
TK_unsigned = 21,
|
||||
TK_using = 64,
|
||||
TK_virtual = 47,
|
||||
TK_void = 22,
|
||||
TK_volatile = 49,
|
||||
TK_wchar_t = 23,
|
||||
TK_while = 77,
|
||||
TK_integer = 37,
|
||||
TK_floating = 38,
|
||||
TK_charconst = 39,
|
||||
TK_stringlit = 26,
|
||||
TK_identifier = 1,
|
||||
TK_Completion = 121,
|
||||
TK_EndOfCompletion = 122,
|
||||
TK_Completion = 2,
|
||||
TK_EndOfCompletion = 10,
|
||||
TK_Invalid = 123,
|
||||
TK_LeftBracket = 64,
|
||||
TK_LeftParen = 2,
|
||||
TK_LeftBrace = 65,
|
||||
TK_Dot = 114,
|
||||
TK_DotStar = 94,
|
||||
TK_Arrow = 101,
|
||||
TK_ArrowStar = 88,
|
||||
TK_PlusPlus = 22,
|
||||
TK_MinusMinus = 23,
|
||||
TK_And = 7,
|
||||
TK_Star = 5,
|
||||
TK_Plus = 9,
|
||||
TK_Minus = 10,
|
||||
TK_Tilde = 4,
|
||||
TK_Bang = 25,
|
||||
TK_Slash = 89,
|
||||
TK_Percent = 90,
|
||||
TK_RightShift = 86,
|
||||
TK_LeftShift = 87,
|
||||
TK_LT = 58,
|
||||
TK_GT = 67,
|
||||
TK_LE = 91,
|
||||
TK_GE = 92,
|
||||
TK_EQ = 95,
|
||||
TK_NE = 96,
|
||||
TK_Caret = 97,
|
||||
TK_Or = 98,
|
||||
TK_AndAnd = 99,
|
||||
TK_OrOr = 100,
|
||||
TK_Question = 112,
|
||||
TK_Colon = 70,
|
||||
TK_ColonColon = 3,
|
||||
TK_DotDotDot = 93,
|
||||
TK_Assign = 69,
|
||||
TK_StarAssign = 102,
|
||||
TK_SlashAssign = 103,
|
||||
TK_PercentAssign = 104,
|
||||
TK_PlusAssign = 105,
|
||||
TK_MinusAssign = 106,
|
||||
TK_RightShiftAssign = 107,
|
||||
TK_LeftShiftAssign = 108,
|
||||
TK_AndAssign = 109,
|
||||
TK_CaretAssign = 110,
|
||||
TK_OrAssign = 111,
|
||||
TK_Comma = 68,
|
||||
TK_zero = 38,
|
||||
TK_RightBracket = 113,
|
||||
TK_RightParen = 73,
|
||||
TK_RightBrace = 71,
|
||||
TK_SemiColon = 43,
|
||||
TK_ERROR_TOKEN = 44,
|
||||
TK_EOF_TOKEN = 119;
|
||||
TK_LeftBracket = 68,
|
||||
TK_LeftParen = 3,
|
||||
TK_LeftBrace = 66,
|
||||
TK_Dot = 116,
|
||||
TK_DotStar = 96,
|
||||
TK_Arrow = 103,
|
||||
TK_ArrowStar = 90,
|
||||
TK_PlusPlus = 24,
|
||||
TK_MinusMinus = 25,
|
||||
TK_And = 8,
|
||||
TK_Star = 6,
|
||||
TK_Plus = 11,
|
||||
TK_Minus = 12,
|
||||
TK_Tilde = 5,
|
||||
TK_Bang = 27,
|
||||
TK_Slash = 91,
|
||||
TK_Percent = 92,
|
||||
TK_RightShift = 88,
|
||||
TK_LeftShift = 89,
|
||||
TK_LT = 60,
|
||||
TK_GT = 69,
|
||||
TK_LE = 93,
|
||||
TK_GE = 94,
|
||||
TK_EQ = 97,
|
||||
TK_NE = 98,
|
||||
TK_Caret = 99,
|
||||
TK_Or = 100,
|
||||
TK_AndAnd = 101,
|
||||
TK_OrOr = 102,
|
||||
TK_Question = 114,
|
||||
TK_Colon = 73,
|
||||
TK_ColonColon = 4,
|
||||
TK_DotDotDot = 95,
|
||||
TK_Assign = 71,
|
||||
TK_StarAssign = 104,
|
||||
TK_SlashAssign = 105,
|
||||
TK_PercentAssign = 106,
|
||||
TK_PlusAssign = 107,
|
||||
TK_MinusAssign = 108,
|
||||
TK_RightShiftAssign = 109,
|
||||
TK_LeftShiftAssign = 110,
|
||||
TK_AndAssign = 111,
|
||||
TK_CaretAssign = 112,
|
||||
TK_OrAssign = 113,
|
||||
TK_Comma = 70,
|
||||
TK_zero = 40,
|
||||
TK_RightBracket = 115,
|
||||
TK_RightParen = 76,
|
||||
TK_RightBrace = 72,
|
||||
TK_SemiColon = 45,
|
||||
TK_ERROR_TOKEN = 46,
|
||||
TK_EOF_TOKEN = 121;
|
||||
|
||||
public final static String orderedTerminalSymbols[] = {
|
||||
"",
|
||||
"identifier",
|
||||
"Completion",
|
||||
"LeftParen",
|
||||
"ColonColon",
|
||||
"Tilde",
|
||||
|
@ -149,6 +150,7 @@ public interface CPPParsersym {
|
|||
"operator",
|
||||
"And",
|
||||
"typename",
|
||||
"EndOfCompletion",
|
||||
"Plus",
|
||||
"Minus",
|
||||
"bool",
|
||||
|
@ -195,8 +197,8 @@ public interface CPPParsersym {
|
|||
"mutable",
|
||||
"register",
|
||||
"static",
|
||||
"template",
|
||||
"typedef",
|
||||
"template",
|
||||
"class",
|
||||
"LT",
|
||||
"enum",
|
||||
|
@ -204,17 +206,17 @@ public interface CPPParsersym {
|
|||
"union",
|
||||
"using",
|
||||
"namespace",
|
||||
"LeftBracket",
|
||||
"LeftBrace",
|
||||
"asm",
|
||||
"LeftBracket",
|
||||
"GT",
|
||||
"Comma",
|
||||
"Assign",
|
||||
"Colon",
|
||||
"RightBrace",
|
||||
"Colon",
|
||||
"export",
|
||||
"RightParen",
|
||||
"try",
|
||||
"RightParen",
|
||||
"while",
|
||||
"break",
|
||||
"case",
|
||||
|
@ -261,8 +263,6 @@ public interface CPPParsersym {
|
|||
"public",
|
||||
"EOF_TOKEN",
|
||||
"else",
|
||||
"Completion",
|
||||
"EndOfCompletion",
|
||||
"Invalid"
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue