1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 06:32:10 +02:00

Bug 315826 Update LR Parser for the template arguments rules - patch by John Liu

This commit is contained in:
Vivian Kong 2010-08-09 17:50:49 +00:00
parent e50404e83d
commit 67dfed0280
33 changed files with 31632 additions and 25046 deletions

View file

@ -551,6 +551,90 @@ conditional_expression
/. $Build consumeExpressionConditional(); $EndBuild ./
--rules for template arguments, relational_expression needs brackets when it contains >
relational_expression_inTemplate
::= shift_expression
| relational_expression_inTemplate '<' shift_expression
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_lessThan); $EndBuild ./
| '(' relational_expression_inTemplate '>' shift_expression ')'
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_greaterThan); $EndBuild ./
| relational_expression_inTemplate '<=' shift_expression
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_lessEqual); $EndBuild ./
| relational_expression_inTemplate '>=' shift_expression
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_greaterEqual); $EndBuild ./
equality_expression_inTemplate
::= relational_expression_inTemplate
| equality_expression_inTemplate '==' relational_expression_inTemplate
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_equals); $EndBuild ./
| equality_expression_inTemplate '!=' relational_expression_inTemplate
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_notequals); $EndBuild ./
and_expression_inTemplate
::= equality_expression_inTemplate
| and_expression_inTemplate '&' equality_expression_inTemplate
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryAnd); $EndBuild ./
exclusive_or_expression_inTemplate
::= and_expression_inTemplate
| exclusive_or_expression_inTemplate '^' and_expression_inTemplate
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryXor); $EndBuild ./
inclusive_or_expression_inTemplate
::= exclusive_or_expression_inTemplate
| inclusive_or_expression_inTemplate '|' exclusive_or_expression_inTemplate
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryOr); $EndBuild ./
logical_and_expression_inTemplate
::= inclusive_or_expression_inTemplate
| logical_and_expression_inTemplate '&&' inclusive_or_expression_inTemplate
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_logicalAnd); $EndBuild ./
logical_or_expression_inTemplate
::= logical_and_expression_inTemplate
| logical_or_expression_inTemplate '||' logical_and_expression_inTemplate
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_logicalOr); $EndBuild ./
conditional_expression_inTemplate
::= logical_or_expression_inTemplate
| logical_or_expression_inTemplate '?' expression ':' assignment_expression_inTemplate
/. $Build consumeExpressionConditional(); $EndBuild ./
assignment_expression_inTemplate
::= conditional_expression_inTemplate
| throw_expression
| logical_or_expression_inTemplate '=' assignment_expression_inTemplate
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_assign); $EndBuild ./
| logical_or_expression_inTemplate '*=' assignment_expression_inTemplate
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_multiplyAssign); $EndBuild ./
| logical_or_expression_inTemplate '/=' assignment_expression_inTemplate
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_divideAssign); $EndBuild ./
| logical_or_expression_inTemplate '%=' assignment_expression_inTemplate
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_moduloAssign); $EndBuild ./
| logical_or_expression_inTemplate '+=' assignment_expression_inTemplate
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_plusAssign); $EndBuild ./
| logical_or_expression_inTemplate '-=' assignment_expression_inTemplate
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_minusAssign); $EndBuild ./
| logical_or_expression_inTemplate '>>=' assignment_expression_inTemplate
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_shiftRightAssign); $EndBuild ./
| logical_or_expression_inTemplate '<<=' assignment_expression_inTemplate
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_shiftLeftAssign); $EndBuild ./
| logical_or_expression_inTemplate '&=' assignment_expression_inTemplate
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryAndAssign); $EndBuild ./
| logical_or_expression_inTemplate '^=' assignment_expression_inTemplate
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryXorAssign); $EndBuild ./
| logical_or_expression_inTemplate '|=' assignment_expression_inTemplate
/. $Build consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryOrAssign); $EndBuild ./
--end of rules for template arguments
throw_expression
::= 'throw'
/. $Build consumeExpressionThrow(false); $EndBuild ./
@ -1185,7 +1269,6 @@ type_specifier_seq
::= declaration_specifiers
abstract_declarator
::= direct_abstract_declarator
| <openscope-ast> ptr_operator_seq
@ -1583,10 +1666,11 @@ type_parameter
/. $Build consumeTemplatedTypeTemplateParameter(true); $EndBuild ./
template_id_name
::= identifier_name '<' <openscope-ast> template_argument_list_opt '>'
/. $Build consumeTemplateId(); $EndBuild ./
-- | ERROR_TOKEN
-- /. $Build consumeTemplateIDError(); $EndBuild ./
template_argument_list
@ -1598,13 +1682,94 @@ template_argument_list_opt
::= template_argument_list
| $empty
--type_id in template
class_name_inTemplate
::= identifier_name
class_or_namespace_name_inTemplate -- just identifiers
::= class_name_inTemplate
--| namespace_name -- namespace_name name can only be an identifier token, which is already accepted by
nested_name_specifier_inTemplate
::= class_or_namespace_name_inTemplate '::' nested_name_specifier_with_template_inTemplate
/. $Build consumeNestedNameSpecifier(true); $EndBuild ./
| class_or_namespace_name_inTemplate '::'
/. $Build consumeNestedNameSpecifier(false); $EndBuild ./
nested_name_specifier_with_template_inTemplate
::= class_or_namespace_name_with_template_inTemplate '::' nested_name_specifier_with_template_inTemplate
/. $Build consumeNestedNameSpecifier(true); $EndBuild ./
| class_or_namespace_name_with_template_inTemplate '::'
/. $Build consumeNestedNameSpecifier(false); $EndBuild ./
class_or_namespace_name_with_template_inTemplate
::= template_opt class_or_namespace_name_inTemplate
/. $Build consumeNameWithTemplateKeyword(); $EndBuild ./
nested_name_specifier_opt_inTemplate
::= nested_name_specifier_inTemplate
| $empty
/. $Build consumeNestedNameSpecifierEmpty(); $EndBuild ./
type_name_inTemplate -- all identifiers of some kind
::= class_name_inTemplate
-- last two rules moved here from simple_type_specifier
type_name_specifier_inTemplate -- all identifiers of some kind
::= type_name_inTemplate
-- | dcolon_opt nested_name_specifier_opt_inTemplate type_name_inTemplate
-- /. $Build consumeQualifiedId(false); $EndBuild ./
-- | dcolon_opt nested_name_specifier_inTemplate 'template' template_id_name
-- /. $Build consumeQualifiedId(false); $EndBuild ./
| 'typename' dcolon_opt nested_name_specifier identifier_name
/. $Build consumeQualifiedId(false); $EndBuild ./
| 'typename' dcolon_opt nested_name_specifier template_opt template_id_name
/. $Build consumeQualifiedId(true); $EndBuild ./
| 'typename' identifier_name
type_name_declaration_specifiers_inTemplate
::= type_name_specifier_inTemplate
| no_type_declaration_specifiers type_name_specifier_inTemplate
| type_name_declaration_specifiers_inTemplate no_type_declaration_specifier
declaration_specifiers_inTemplate
::= <openscope-ast> simple_declaration_specifiers
/. $Build consumeDeclarationSpecifiersSimple(); $EndBuild ./
| <openscope-ast> class_declaration_specifiers
/. $Build consumeDeclarationSpecifiersComposite(); $EndBuild ./
| <openscope-ast> elaborated_declaration_specifiers
/. $Build consumeDeclarationSpecifiersComposite(); $EndBuild ./
| <openscope-ast> enum_declaration_specifiers
/. $Build consumeDeclarationSpecifiersComposite(); $EndBuild ./
| <openscope-ast> type_name_declaration_specifiers_inTemplate
/. $Build consumeDeclarationSpecifiersTypeName(); $EndBuild ./
type_specifier_seq_inTemplate
::= declaration_specifiers_inTemplate
type_id_inTemplate
::= type_specifier_seq_inTemplate
/. $Build consumeTypeId(false); $EndBuild ./
| type_specifier_seq_inTemplate abstract_declarator
/. $Build consumeTypeId(true); $EndBuild ./
--end type_id in template
template_argument
::= assignment_expression
::= assignment_expression_inTemplate
/. $Build consumeTemplateArgumentExpression(); $EndBuild ./
| type_id
| type_id_inTemplate
/. $Build consumeTemplateArgumentTypeId(); $EndBuild ./
--| qualified_or_unqualified_name -- accessible through assignment_expression
explicit_instantiation
::= 'template' declaration

View file

@ -11,4 +11,4 @@
###############################################################################
lpg_exe=D:/lpg/lpgdistribution/lpgexe/lpg.exe
lpg_template=D:/newWorkspace/cdt_70_ies/org.eclipse.cdt.core.lrparser/grammar/template
lpg_template=D:/newWorkspace/rdp80_dev/org.eclipse.cdt.core.lrparser/grammar/template

View file

@ -10,15 +10,24 @@
*******************************************************************************/
package org.eclipse.cdt.core.dom.lrparser;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import lpg.lpgjavaruntime.IToken;
import lpg.lpgjavaruntime.PrsStream;
import lpg.lpgjavaruntime.Token;
import org.eclipse.cdt.core.dom.ICodeReaderFactory;
import org.eclipse.cdt.core.dom.ast.IASTCompletionNode;
import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
import org.eclipse.cdt.core.dom.ast.gnu.c.GCCLanguage;
import org.eclipse.cdt.core.dom.ast.gnu.cpp.GPPLanguage;
import org.eclipse.cdt.core.dom.lrparser.action.ITokenStream;
import org.eclipse.cdt.core.dom.parser.CLanguageKeywords;
import org.eclipse.cdt.core.dom.parser.IScannerExtensionConfiguration;
import org.eclipse.cdt.core.index.IIndex;
@ -53,8 +62,20 @@ public abstract class BaseExtensibleLanguage extends AbstractLanguage {
private static final boolean DEBUG_PRINT_GCC_AST = false;
private static final boolean DEBUG_PRINT_AST = false;
// default 0.5 min
private long parser_timeout_limit_lowerBoundary = 1 * 30 * 1000;
// default 2 mins
private long parser_timeout_limit_uppperBoundary = 1 * 60 * 1000;
//time limit for each token, 1ms
public static long UNIT_PARSER_TIMEOUT_LIMIT = 10;
private static long LONGEST_CORE_RUNTIME;
private static long LONGEST_LPR_RUNTIME;
public static boolean CATCH_TEMPLATEID_ERROR = false;
private ICLanguageKeywords keywords = null;
/**
* Retrieve the parser (runs after the preprocessor runs).
@ -64,6 +85,13 @@ public abstract class BaseExtensibleLanguage extends AbstractLanguage {
*/
protected abstract IParser<IASTTranslationUnit> getParser(IScanner scanner, IIndex index, Map<String,String> properties);
protected IParser<IASTTranslationUnit> getCompleteParser(IScanner scanner, IIndex index, Map<String,String> properties){
return getParser(scanner, index, properties);
}
protected ISecondaryParser<IASTTranslationUnit> getCompleteParser(ITokenStream stream, IScanner scanner, IIndex index, Map<String,String> properties){
return (ISecondaryParser)getParser(scanner, index, properties);
}
/**
* Returns the ParserLanguage value that is to be used when creating
* an instance of CPreprocessor.
@ -77,6 +105,25 @@ public abstract class BaseExtensibleLanguage extends AbstractLanguage {
*/
protected abstract IScannerExtensionConfiguration getScannerExtensionConfiguration();
private class ParseThread<AST_TYPE> extends Thread{
ParseThread(){
super();
super.setName("ParserThread");
}
AST_TYPE astUnit = null;
AST_TYPE getASTUnit(){
return astUnit;
}
}
private <AST_TYPE> AST_TYPE runThreadByLimitedTime(long limitTime, ParseThread<AST_TYPE> parseThread) throws InterruptedException{
parseThread.start();
parseThread.join(limitTime);
return parseThread.getASTUnit();
}
@Override @Deprecated
public IASTTranslationUnit getASTTranslationUnit(org.eclipse.cdt.core.parser.CodeReader reader,
@ -86,11 +133,28 @@ public abstract class BaseExtensibleLanguage extends AbstractLanguage {
.adapt(codeReaderFactory), index, options, log);
}
@Override
public IASTTranslationUnit getASTTranslationUnit(FileContent reader, IScannerInfo scanInfo,
IncludeFileContentProvider fileCreator, IIndex index, int options, IParserLogService log)
throws CoreException {
public void setParser_timeout_limit_lowerBoundary(
long parser_timeout_limit_lowerBoundary) {
this.parser_timeout_limit_lowerBoundary = parser_timeout_limit_lowerBoundary;
}
public void setParser_timeout_limit_uppperBoundary(
long parser_timeout_limit_uppperBoundary) {
this.parser_timeout_limit_uppperBoundary = parser_timeout_limit_uppperBoundary;
}
@Override
public IASTTranslationUnit getASTTranslationUnit(final FileContent reader, final IScannerInfo scanInfo,
final IncludeFileContentProvider fileCreator, final IIndex index, int options, final IParserLogService log)
throws CoreException {
CATCH_TEMPLATEID_ERROR = false;
long startTime=0;
java.util.Date today=null;
if(log.isTracing()){
today = new java.util.Date();
startTime = today.getTime();
log.traceLog("^^^^^^ Start parsing " + reader.getFileLocation() + " at " + new java.sql.Timestamp(startTime));
}
IASTTranslationUnit gtu = null;
if(DEBUG_PRINT_GCC_AST) {
System.out.println("\n********************************************************\nParsing\nOptions: " + options);
@ -103,31 +167,160 @@ public abstract class BaseExtensibleLanguage extends AbstractLanguage {
System.out.println();
}
IScannerExtensionConfiguration config = getScannerExtensionConfiguration();
final IScannerExtensionConfiguration config = getScannerExtensionConfiguration();
ParserLanguage pl = getParserLanguage();
IScanner preprocessor = new CPreprocessor(reader, scanInfo, pl, log, config, fileCreator);
final ParserLanguage pl = getParserLanguage();
final IScanner preprocessor = new CPreprocessor(reader, scanInfo, pl, log, config, fileCreator);
preprocessor.setComputeImageLocations((options & ILanguage.OPTION_NO_IMAGE_LOCATIONS) == 0);
Map<String,String> parserProperties = new HashMap<String,String>();
final Map<String,String> parserProperties = new HashMap<String,String>();
parserProperties.put(LRParserProperties.TRANSLATION_UNIT_PATH, reader.getFileLocation());
if((options & OPTION_SKIP_FUNCTION_BODIES) != 0)
parserProperties.put(LRParserProperties.SKIP_FUNCTION_BODIES, "true");
if((options & OPTION_SKIP_TRIVIAL_EXPRESSIONS_IN_AGGREGATE_INITIALIZERS) != 0)
parserProperties.put(LRParserProperties.SKIP_TRIVIAL_EXPRESSIONS_IN_AGGREGATE_INITIALIZERS, "true");
IParser<IASTTranslationUnit> parser = getParser(preprocessor, index, parserProperties);
IASTTranslationUnit tu = parser.parse();
final IParser<IASTTranslationUnit> parser = getParser(preprocessor, index, parserProperties);
long parser_timeout_limit = parser_timeout_limit_uppperBoundary;
if(parser instanceof PrsStream){
int token_size = ((PrsStream)parser).getSize();
parser_timeout_limit = token_size * UNIT_PARSER_TIMEOUT_LIMIT;
if(parser_timeout_limit < parser_timeout_limit_lowerBoundary)
parser_timeout_limit = parser_timeout_limit_lowerBoundary;
if(parser_timeout_limit > parser_timeout_limit_uppperBoundary)
parser_timeout_limit = parser_timeout_limit_uppperBoundary;
log.traceLog("^^^^^^ adjusted time out limit with token size: " + token_size + " and the time out limit: " + parser_timeout_limit);
}
IASTTranslationUnit tu = null;
//real token size, substract a dummy token and a eof token
final int orgTokenSize = ((PrsStream)parser).getTokens().size();
//final List orginalTokens = copyList(((PrsStream)parser).getTokens());
ParseThread<IASTTranslationUnit> parseThread = new ParseThread<IASTTranslationUnit>() {
@Override
public void run() {
try{
astUnit = parser.parse();
}
catch (Exception e) {
/*
if(e instanceof TemplateIDErrorException){
//IScanner completePreprocessor = new CPreprocessor(reader, scanInfo, pl, log, config, fileCreator);
//IParser<IASTTranslationUnit> completeParser = getCompleteParser(preprocessor, index, parserProperties);
ISecondaryParser<IASTTranslationUnit> completeParser = getCompleteParser((ITokenStream)parser, preprocessor, index, parserProperties);
//completeParser.setAction(parser.getAction());
//((ISecondaryParser)completeParser).setTokenMap((ITokenStream)parser);
//copyTokensToParser((PrsStream)completeParser, ((PrsStream)parser).getTokens().subList(0, orgTokenSize));
((ISecondaryParser)completeParser).setTokens(((PrsStream)parser).getTokens().subList(1, orgTokenSize-1));
astUnit = completeParser.parse();
}else{
*/
if(log.isTracing()){
StringWriter stringW = new StringWriter();
PrintWriter printW = new PrintWriter(stringW);
e.printStackTrace(printW);
log.traceLog("^^^^^^ PARSER_ERR_STACK" + stringW.toString());
}
//}
}
}
};
try {
tu = runThreadByLimitedTime(parser_timeout_limit, parseThread);
} catch (InterruptedException e) {
StringWriter stringW = new StringWriter();
PrintWriter printW = new PrintWriter(stringW);
e.printStackTrace(printW);
log.traceLog("^^^^^^_ERR_STACK" + stringW.toString());
//e.printStackTrace();
}
parseThread.stop();
long lprFinishTime=0;
long coreFinishTime=0;
if(log.isTracing()){
today = new java.util.Date();
lprFinishTime = today.getTime();
}
if(tu==null){
long lpr_fail_time=0;
if(log.isTracing()){
lpr_fail_time = lprFinishTime;
log.traceLog("^^^^^^ LR parser fails in parsing " + reader.getFileLocation() + " after running " + (lpr_fail_time-startTime)/1000 + " seconds");
}
ILanguage gppLanguage = getParserLanguage() == ParserLanguage.CPP ? GPPLanguage.getDefault() : GCCLanguage.getDefault();
tu = gppLanguage.getASTTranslationUnit(reader, scanInfo, fileCreator, index, options, log);
if(log.isTracing()){
today = new java.util.Date();
coreFinishTime = today.getTime();
log.traceLog("^^^^^^ core parser parses " + reader.getFileLocation() + " in " + (coreFinishTime - lpr_fail_time)/1000 + " seconds");
}
}
if(tu!=null){
tu.setIsHeaderUnit((options & OPTION_IS_SOURCE_UNIT) == 0); // the TU is marked as either a source file or a header file
}
if(DEBUG_PRINT_AST) {
System.out.println("Base Extensible Language AST:");
ASTPrinter.print(tu);
}
long finishTime ;
if(log.isTracing()){
if(coreFinishTime>0){
//parsed by core parser.
finishTime = coreFinishTime;
long core_runtime = finishTime - startTime;
log.traceLog("^^^^^^ Finish parsing with cdt core parser " + reader.getFileLocation() + " at " + new java.sql.Timestamp(finishTime) + " runtime: " + core_runtime);
if(core_runtime > LONGEST_CORE_RUNTIME){
LONGEST_CORE_RUNTIME = core_runtime;
log.traceLog("^^^^^^ CLCLCLCL so far the longest runtime with core parser is: " + core_runtime/1000);
}
}else{
finishTime = lprFinishTime;
long lpr_runtime = finishTime - startTime;
log.traceLog("^^^^^^ Finish parsing " + reader.getFileLocation() + " at " + new java.sql.Timestamp(finishTime) + " runtime: " + lpr_runtime);
if(lpr_runtime > LONGEST_LPR_RUNTIME){
LONGEST_LPR_RUNTIME = lpr_runtime;
log.traceLog("^^^^^^ LLLLLLLL so far the longest runtime by LPR Parser is: " + lpr_runtime/1000);
}
}
}
return tu;
}
public void copyTokensToParser(PrsStream parser, List<IToken> tokens) {
parser.resetTokenStream();
for(IToken token : tokens) {
parser.addToken(token);
}
}
public List copyList(List orgList){
List returnList = new ArrayList(orgList.size());
for(int i=0; i<orgList.size(); i++){
returnList.add(orgList.get(i));
}
return returnList;
}
@Deprecated
public IASTTranslationUnit getASTTranslationUnit(org.eclipse.cdt.core.parser.CodeReader reader,
IScannerInfo scanInfo, ICodeReaderFactory fileCreator, IIndex index, IParserLogService log)
@ -172,10 +365,53 @@ public abstract class BaseExtensibleLanguage extends AbstractLanguage {
parserProperties.put(LRParserProperties.SKIP_FUNCTION_BODIES, "true");
parserProperties.put(LRParserProperties.SKIP_TRIVIAL_EXPRESSIONS_IN_AGGREGATE_INITIALIZERS, "true");
IParser<IASTTranslationUnit> parser = getParser(preprocessor, index, parserProperties);
parser.parse();
final IParser<IASTTranslationUnit> parser = getParser(preprocessor, index, parserProperties);
IASTCompletionNode completionNode = parser.getCompletionNode();
long parser_timeout_limit = parser_timeout_limit_uppperBoundary;
if(parser instanceof PrsStream){
int token_size = ((PrsStream)parser).getSize();
parser_timeout_limit = token_size * UNIT_PARSER_TIMEOUT_LIMIT;
if(parser_timeout_limit < parser_timeout_limit_lowerBoundary)
parser_timeout_limit = parser_timeout_limit_lowerBoundary;
if(parser_timeout_limit > parser_timeout_limit_uppperBoundary)
parser_timeout_limit = parser_timeout_limit_uppperBoundary;
if(log.isTracing()){
log.traceLog("^^^^^^ adjusted time out limit with token size: " + token_size + " and the time out limit: " + parser_timeout_limit);
}
}
ParseThread<IASTCompletionNode> parseThread = new ParseThread<IASTCompletionNode>() {
@Override
public void run() {
parser.parse();
astUnit = parser.getCompletionNode();
}
};
IASTCompletionNode completionNode=null;
try {
completionNode = runThreadByLimitedTime(parser_timeout_limit*100, parseThread);
} catch (InterruptedException e) {
if(log.isTracing()){
StringWriter stringW = new StringWriter();
PrintWriter printW = new PrintWriter(stringW);
e.printStackTrace(printW);
log.traceLog("^^^^^^_ERR_STACK" + stringW.toString());
}
//e.printStackTrace();
}
parseThread.stop();
if(completionNode==null){
log.traceLog("LR parser fails in parsing " + reader.getFileLocation());
if(log.isTracing()){
log.traceLog("LR parser fails in parsing " + reader.getFileLocation());
}
ILanguage gppLanguage = getParserLanguage() == ParserLanguage.CPP ? GPPLanguage.getDefault() : GCCLanguage.getDefault();
completionNode=gppLanguage.getCompletionNode(reader, scanInfo, fileCreator, index, log, offset);
}
if(DEBUG_PRINT_AST) {
System.out.println("Base Extensible Language AST:");

View file

@ -478,7 +478,16 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
IASTExpression expr = (IASTExpression) astStack.peek();
if(expr instanceof IASTIdExpression) {
IASTName name = ((IASTIdExpression)expr).getName().copy();
IASTName orgName =((IASTIdExpression)expr).getName();
IASTName name = null;
try{
name = orgName.copy();
//if there is node throws UnsupportedOperationException in copy, just use the original node
} catch(UnsupportedOperationException ue){
name = orgName;
}
ParserUtil.setOffsetAndLength(name, expr);
IASTNamedTypeSpecifier declSpec = nodeFactory.newTypedefNameSpecifier(name);
ParserUtil.setOffsetAndLength(declSpec, name);

View file

@ -305,11 +305,14 @@ public class FixedBacktrackingParser extends Stacks
current_kind = tokStream.getKind(curtok),
act = tAction(stateStack[stateStackTop], current_kind);
int count = 0;
//
// The main driver loop
//
for (;;)
{
count++;
//
// if the parser needs to stop processing,
// it may do so here.
@ -390,6 +393,8 @@ public class FixedBacktrackingParser extends Stacks
//System.out.println("****Number of actions: " + action.size());
//System.out.println("****Max Stack Size = " + maxStackTop);
//System.out.flush();
System.out.println("The backtrace parser count is: " + count );
return (act == ERROR_ACTION ? error_token : 0);
}

View file

@ -15,127 +15,127 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
public interface CPPExpressionParsersym {
public final static int
TK_asm = 64,
TK_auto = 28,
TK_asm = 65,
TK_auto = 25,
TK_bool = 11,
TK_break = 76,
TK_case = 77,
TK_catch = 102,
TK_catch = 113,
TK_char = 12,
TK_class = 40,
TK_class = 53,
TK_const = 23,
TK_const_cast = 42,
TK_const_cast = 41,
TK_continue = 78,
TK_default = 79,
TK_delete = 65,
TK_delete = 66,
TK_do = 80,
TK_double = 13,
TK_dynamic_cast = 43,
TK_dynamic_cast = 42,
TK_else = 121,
TK_enum = 56,
TK_explicit = 29,
TK_export = 86,
TK_extern = 30,
TK_false = 44,
TK_explicit = 26,
TK_export = 88,
TK_extern = 27,
TK_false = 43,
TK_float = 14,
TK_for = 81,
TK_friend = 31,
TK_friend = 28,
TK_goto = 82,
TK_if = 83,
TK_inline = 32,
TK_inline = 29,
TK_int = 15,
TK_long = 16,
TK_mutable = 33,
TK_namespace = 59,
TK_new = 66,
TK_operator = 7,
TK_private = 103,
TK_protected = 104,
TK_public = 105,
TK_register = 34,
TK_reinterpret_cast = 45,
TK_mutable = 30,
TK_namespace = 61,
TK_new = 67,
TK_operator = 8,
TK_private = 114,
TK_protected = 115,
TK_public = 116,
TK_register = 31,
TK_reinterpret_cast = 44,
TK_return = 84,
TK_short = 17,
TK_signed = 18,
TK_sizeof = 46,
TK_static = 35,
TK_static_cast = 47,
TK_sizeof = 45,
TK_static = 32,
TK_static_cast = 46,
TK_struct = 57,
TK_switch = 85,
TK_template = 48,
TK_this = 49,
TK_throw = 60,
TK_template = 55,
TK_this = 47,
TK_throw = 59,
TK_try = 74,
TK_true = 50,
TK_typedef = 36,
TK_typeid = 51,
TK_true = 48,
TK_typedef = 33,
TK_typeid = 49,
TK_typename = 10,
TK_union = 58,
TK_unsigned = 19,
TK_using = 62,
TK_using = 63,
TK_virtual = 22,
TK_void = 20,
TK_volatile = 24,
TK_wchar_t = 21,
TK_while = 75,
TK_integer = 52,
TK_floating = 53,
TK_charconst = 54,
TK_stringlit = 39,
TK_integer = 50,
TK_floating = 51,
TK_charconst = 52,
TK_stringlit = 38,
TK_identifier = 1,
TK_Completion = 2,
TK_EndOfCompletion = 8,
TK_EndOfCompletion = 9,
TK_Invalid = 122,
TK_LeftBracket = 63,
TK_LeftBracket = 60,
TK_LeftParen = 3,
TK_Dot = 119,
TK_DotStar = 91,
TK_Arrow = 106,
TK_ArrowStar = 89,
TK_PlusPlus = 37,
TK_MinusMinus = 38,
TK_And = 9,
TK_Star = 6,
TK_Plus = 25,
TK_Minus = 26,
TK_Tilde = 5,
TK_Bang = 41,
TK_Slash = 92,
TK_Percent = 93,
TK_RightShift = 87,
TK_LeftShift = 88,
TK_LT = 55,
TK_GT = 68,
TK_LE = 94,
TK_GE = 95,
TK_EQ = 96,
TK_NE = 97,
TK_Caret = 98,
TK_Or = 99,
TK_AndAnd = 100,
TK_DotStar = 98,
TK_Arrow = 117,
TK_ArrowStar = 91,
TK_PlusPlus = 36,
TK_MinusMinus = 37,
TK_And = 7,
TK_Star = 5,
TK_Plus = 34,
TK_Minus = 35,
TK_Tilde = 6,
TK_Bang = 39,
TK_Slash = 99,
TK_Percent = 100,
TK_RightShift = 86,
TK_LeftShift = 87,
TK_LT = 54,
TK_GT = 64,
TK_LE = 89,
TK_GE = 90,
TK_EQ = 92,
TK_NE = 93,
TK_Caret = 94,
TK_Or = 95,
TK_AndAnd = 96,
TK_OrOr = 101,
TK_Question = 107,
TK_Colon = 72,
TK_Question = 102,
TK_Colon = 71,
TK_ColonColon = 4,
TK_DotDotDot = 90,
TK_DotDotDot = 97,
TK_Assign = 70,
TK_StarAssign = 108,
TK_SlashAssign = 109,
TK_PercentAssign = 110,
TK_PlusAssign = 111,
TK_MinusAssign = 112,
TK_RightShiftAssign = 113,
TK_LeftShiftAssign = 114,
TK_AndAssign = 115,
TK_CaretAssign = 116,
TK_OrAssign = 117,
TK_Comma = 69,
TK_StarAssign = 103,
TK_SlashAssign = 104,
TK_PercentAssign = 105,
TK_PlusAssign = 106,
TK_MinusAssign = 107,
TK_RightShiftAssign = 108,
TK_LeftShiftAssign = 109,
TK_AndAssign = 110,
TK_CaretAssign = 111,
TK_OrAssign = 112,
TK_Comma = 68,
TK_RightBracket = 118,
TK_RightParen = 73,
TK_RightBrace = 71,
TK_SemiColon = 27,
TK_LeftBrace = 67,
TK_ERROR_TOKEN = 61,
TK_RightParen = 72,
TK_RightBrace = 73,
TK_SemiColon = 40,
TK_LeftBrace = 69,
TK_ERROR_TOKEN = 62,
TK_EOF_TOKEN = 120;
public final static String orderedTerminalSymbols[] = {
@ -144,11 +144,11 @@ public interface CPPExpressionParsersym {
"Completion",
"LeftParen",
"ColonColon",
"Tilde",
"Star",
"Tilde",
"And",
"operator",
"EndOfCompletion",
"And",
"typename",
"bool",
"char",
@ -164,9 +164,6 @@ public interface CPPExpressionParsersym {
"virtual",
"const",
"volatile",
"Plus",
"Minus",
"SemiColon",
"auto",
"explicit",
"extern",
@ -176,43 +173,46 @@ public interface CPPExpressionParsersym {
"register",
"static",
"typedef",
"Plus",
"Minus",
"PlusPlus",
"MinusMinus",
"stringlit",
"class",
"Bang",
"SemiColon",
"const_cast",
"dynamic_cast",
"false",
"reinterpret_cast",
"sizeof",
"static_cast",
"template",
"this",
"true",
"typeid",
"integer",
"floating",
"charconst",
"class",
"LT",
"template",
"enum",
"struct",
"union",
"namespace",
"throw",
"LeftBracket",
"namespace",
"ERROR_TOKEN",
"using",
"LeftBracket",
"GT",
"asm",
"delete",
"new",
"LeftBrace",
"GT",
"Comma",
"LeftBrace",
"Assign",
"RightBrace",
"Colon",
"RightParen",
"RightBrace",
"try",
"while",
"break",
@ -225,27 +225,22 @@ public interface CPPExpressionParsersym {
"if",
"return",
"switch",
"export",
"RightShift",
"LeftShift",
"ArrowStar",
"DotDotDot",
"DotStar",
"Slash",
"Percent",
"export",
"LE",
"GE",
"ArrowStar",
"EQ",
"NE",
"Caret",
"Or",
"AndAnd",
"DotDotDot",
"DotStar",
"Slash",
"Percent",
"OrOr",
"catch",
"private",
"protected",
"public",
"Arrow",
"Question",
"StarAssign",
"SlashAssign",
@ -257,6 +252,11 @@ public interface CPPExpressionParsersym {
"AndAssign",
"CaretAssign",
"OrAssign",
"catch",
"private",
"protected",
"public",
"Arrow",
"RightBracket",
"Dot",
"EOF_TOKEN",

View file

@ -15,127 +15,127 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
public interface CPPNoCastExpressionParsersym {
public final static int
TK_asm = 64,
TK_auto = 28,
TK_asm = 65,
TK_auto = 25,
TK_bool = 11,
TK_break = 76,
TK_case = 77,
TK_catch = 102,
TK_catch = 113,
TK_char = 12,
TK_class = 40,
TK_class = 53,
TK_const = 23,
TK_const_cast = 42,
TK_const_cast = 41,
TK_continue = 78,
TK_default = 79,
TK_delete = 65,
TK_delete = 66,
TK_do = 80,
TK_double = 13,
TK_dynamic_cast = 43,
TK_dynamic_cast = 42,
TK_else = 121,
TK_enum = 56,
TK_explicit = 29,
TK_export = 86,
TK_extern = 30,
TK_false = 44,
TK_explicit = 26,
TK_export = 88,
TK_extern = 27,
TK_false = 43,
TK_float = 14,
TK_for = 81,
TK_friend = 31,
TK_friend = 28,
TK_goto = 82,
TK_if = 83,
TK_inline = 32,
TK_inline = 29,
TK_int = 15,
TK_long = 16,
TK_mutable = 33,
TK_namespace = 59,
TK_new = 66,
TK_operator = 7,
TK_private = 103,
TK_protected = 104,
TK_public = 105,
TK_register = 34,
TK_reinterpret_cast = 45,
TK_mutable = 30,
TK_namespace = 61,
TK_new = 67,
TK_operator = 8,
TK_private = 114,
TK_protected = 115,
TK_public = 116,
TK_register = 31,
TK_reinterpret_cast = 44,
TK_return = 84,
TK_short = 17,
TK_signed = 18,
TK_sizeof = 46,
TK_static = 35,
TK_static_cast = 47,
TK_sizeof = 45,
TK_static = 32,
TK_static_cast = 46,
TK_struct = 57,
TK_switch = 85,
TK_template = 48,
TK_this = 49,
TK_throw = 60,
TK_template = 55,
TK_this = 47,
TK_throw = 59,
TK_try = 74,
TK_true = 50,
TK_typedef = 36,
TK_typeid = 51,
TK_true = 48,
TK_typedef = 33,
TK_typeid = 49,
TK_typename = 10,
TK_union = 58,
TK_unsigned = 19,
TK_using = 62,
TK_using = 63,
TK_virtual = 22,
TK_void = 20,
TK_volatile = 24,
TK_wchar_t = 21,
TK_while = 75,
TK_integer = 52,
TK_floating = 53,
TK_charconst = 54,
TK_stringlit = 39,
TK_integer = 50,
TK_floating = 51,
TK_charconst = 52,
TK_stringlit = 38,
TK_identifier = 1,
TK_Completion = 2,
TK_EndOfCompletion = 8,
TK_EndOfCompletion = 9,
TK_Invalid = 122,
TK_LeftBracket = 63,
TK_LeftBracket = 60,
TK_LeftParen = 3,
TK_Dot = 119,
TK_DotStar = 91,
TK_Arrow = 106,
TK_ArrowStar = 89,
TK_PlusPlus = 37,
TK_MinusMinus = 38,
TK_And = 9,
TK_Star = 6,
TK_Plus = 25,
TK_Minus = 26,
TK_Tilde = 5,
TK_Bang = 41,
TK_Slash = 92,
TK_Percent = 93,
TK_RightShift = 87,
TK_LeftShift = 88,
TK_LT = 55,
TK_GT = 68,
TK_LE = 94,
TK_GE = 95,
TK_EQ = 96,
TK_NE = 97,
TK_Caret = 98,
TK_Or = 99,
TK_AndAnd = 100,
TK_DotStar = 98,
TK_Arrow = 117,
TK_ArrowStar = 91,
TK_PlusPlus = 36,
TK_MinusMinus = 37,
TK_And = 7,
TK_Star = 5,
TK_Plus = 34,
TK_Minus = 35,
TK_Tilde = 6,
TK_Bang = 39,
TK_Slash = 99,
TK_Percent = 100,
TK_RightShift = 86,
TK_LeftShift = 87,
TK_LT = 54,
TK_GT = 64,
TK_LE = 89,
TK_GE = 90,
TK_EQ = 92,
TK_NE = 93,
TK_Caret = 94,
TK_Or = 95,
TK_AndAnd = 96,
TK_OrOr = 101,
TK_Question = 107,
TK_Colon = 72,
TK_Question = 102,
TK_Colon = 71,
TK_ColonColon = 4,
TK_DotDotDot = 90,
TK_DotDotDot = 97,
TK_Assign = 70,
TK_StarAssign = 108,
TK_SlashAssign = 109,
TK_PercentAssign = 110,
TK_PlusAssign = 111,
TK_MinusAssign = 112,
TK_RightShiftAssign = 113,
TK_LeftShiftAssign = 114,
TK_AndAssign = 115,
TK_CaretAssign = 116,
TK_OrAssign = 117,
TK_Comma = 69,
TK_StarAssign = 103,
TK_SlashAssign = 104,
TK_PercentAssign = 105,
TK_PlusAssign = 106,
TK_MinusAssign = 107,
TK_RightShiftAssign = 108,
TK_LeftShiftAssign = 109,
TK_AndAssign = 110,
TK_CaretAssign = 111,
TK_OrAssign = 112,
TK_Comma = 68,
TK_RightBracket = 118,
TK_RightParen = 73,
TK_RightBrace = 71,
TK_SemiColon = 27,
TK_LeftBrace = 67,
TK_ERROR_TOKEN = 61,
TK_RightParen = 72,
TK_RightBrace = 73,
TK_SemiColon = 40,
TK_LeftBrace = 69,
TK_ERROR_TOKEN = 62,
TK_EOF_TOKEN = 120;
public final static String orderedTerminalSymbols[] = {
@ -144,11 +144,11 @@ public interface CPPNoCastExpressionParsersym {
"Completion",
"LeftParen",
"ColonColon",
"Tilde",
"Star",
"Tilde",
"And",
"operator",
"EndOfCompletion",
"And",
"typename",
"bool",
"char",
@ -164,9 +164,6 @@ public interface CPPNoCastExpressionParsersym {
"virtual",
"const",
"volatile",
"Plus",
"Minus",
"SemiColon",
"auto",
"explicit",
"extern",
@ -176,43 +173,46 @@ public interface CPPNoCastExpressionParsersym {
"register",
"static",
"typedef",
"Plus",
"Minus",
"PlusPlus",
"MinusMinus",
"stringlit",
"class",
"Bang",
"SemiColon",
"const_cast",
"dynamic_cast",
"false",
"reinterpret_cast",
"sizeof",
"static_cast",
"template",
"this",
"true",
"typeid",
"integer",
"floating",
"charconst",
"class",
"LT",
"template",
"enum",
"struct",
"union",
"namespace",
"throw",
"LeftBracket",
"namespace",
"ERROR_TOKEN",
"using",
"LeftBracket",
"GT",
"asm",
"delete",
"new",
"LeftBrace",
"GT",
"Comma",
"LeftBrace",
"Assign",
"RightBrace",
"Colon",
"RightParen",
"RightBrace",
"try",
"while",
"break",
@ -225,27 +225,22 @@ public interface CPPNoCastExpressionParsersym {
"if",
"return",
"switch",
"export",
"RightShift",
"LeftShift",
"ArrowStar",
"DotDotDot",
"DotStar",
"Slash",
"Percent",
"export",
"LE",
"GE",
"ArrowStar",
"EQ",
"NE",
"Caret",
"Or",
"AndAnd",
"DotDotDot",
"DotStar",
"Slash",
"Percent",
"OrOr",
"catch",
"private",
"protected",
"public",
"Arrow",
"Question",
"StarAssign",
"SlashAssign",
@ -257,6 +252,11 @@ public interface CPPNoCastExpressionParsersym {
"AndAssign",
"CaretAssign",
"OrAssign",
"catch",
"private",
"protected",
"public",
"Arrow",
"RightBracket",
"Dot",
"EOF_TOKEN",

View file

@ -15,127 +15,127 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
public interface CPPNoFunctionDeclaratorParsersym {
public final static int
TK_asm = 64,
TK_auto = 26,
TK_asm = 65,
TK_auto = 25,
TK_bool = 11,
TK_break = 76,
TK_case = 77,
TK_catch = 102,
TK_catch = 113,
TK_char = 12,
TK_class = 40,
TK_class = 53,
TK_const = 23,
TK_const_cast = 42,
TK_const_cast = 41,
TK_continue = 78,
TK_default = 79,
TK_delete = 65,
TK_delete = 66,
TK_do = 80,
TK_double = 13,
TK_dynamic_cast = 43,
TK_dynamic_cast = 42,
TK_else = 121,
TK_enum = 56,
TK_explicit = 27,
TK_export = 86,
TK_extern = 28,
TK_false = 44,
TK_enum = 55,
TK_explicit = 26,
TK_export = 88,
TK_extern = 27,
TK_false = 43,
TK_float = 14,
TK_for = 81,
TK_friend = 29,
TK_friend = 28,
TK_goto = 82,
TK_if = 83,
TK_inline = 30,
TK_inline = 29,
TK_int = 15,
TK_long = 16,
TK_mutable = 31,
TK_namespace = 59,
TK_new = 66,
TK_operator = 7,
TK_private = 103,
TK_protected = 104,
TK_public = 105,
TK_register = 32,
TK_reinterpret_cast = 45,
TK_mutable = 30,
TK_namespace = 61,
TK_new = 67,
TK_operator = 8,
TK_private = 114,
TK_protected = 115,
TK_public = 116,
TK_register = 31,
TK_reinterpret_cast = 44,
TK_return = 84,
TK_short = 17,
TK_signed = 18,
TK_sizeof = 46,
TK_static = 33,
TK_static_cast = 47,
TK_struct = 57,
TK_sizeof = 45,
TK_static = 32,
TK_static_cast = 46,
TK_struct = 56,
TK_switch = 85,
TK_template = 48,
TK_this = 49,
TK_throw = 61,
TK_template = 57,
TK_this = 47,
TK_throw = 59,
TK_try = 74,
TK_true = 50,
TK_typedef = 34,
TK_typeid = 51,
TK_true = 48,
TK_typedef = 33,
TK_typeid = 49,
TK_typename = 10,
TK_union = 58,
TK_unsigned = 19,
TK_using = 62,
TK_using = 63,
TK_virtual = 22,
TK_void = 20,
TK_volatile = 24,
TK_wchar_t = 21,
TK_while = 75,
TK_integer = 52,
TK_floating = 53,
TK_charconst = 54,
TK_stringlit = 39,
TK_integer = 50,
TK_floating = 51,
TK_charconst = 52,
TK_stringlit = 38,
TK_identifier = 1,
TK_Completion = 2,
TK_EndOfCompletion = 8,
TK_EndOfCompletion = 9,
TK_Invalid = 122,
TK_LeftBracket = 63,
TK_LeftBracket = 60,
TK_LeftParen = 3,
TK_Dot = 119,
TK_DotStar = 91,
TK_Arrow = 106,
TK_ArrowStar = 89,
TK_PlusPlus = 37,
TK_MinusMinus = 38,
TK_And = 9,
TK_Star = 6,
TK_Plus = 35,
TK_Minus = 36,
TK_Tilde = 5,
TK_Bang = 41,
TK_Slash = 92,
TK_Percent = 93,
TK_RightShift = 87,
TK_LeftShift = 88,
TK_LT = 55,
TK_GT = 68,
TK_LE = 94,
TK_GE = 95,
TK_EQ = 96,
TK_NE = 97,
TK_Caret = 98,
TK_Or = 99,
TK_AndAnd = 100,
TK_DotStar = 98,
TK_Arrow = 117,
TK_ArrowStar = 91,
TK_PlusPlus = 36,
TK_MinusMinus = 37,
TK_And = 7,
TK_Star = 5,
TK_Plus = 34,
TK_Minus = 35,
TK_Tilde = 6,
TK_Bang = 40,
TK_Slash = 99,
TK_Percent = 100,
TK_RightShift = 86,
TK_LeftShift = 87,
TK_LT = 54,
TK_GT = 64,
TK_LE = 89,
TK_GE = 90,
TK_EQ = 92,
TK_NE = 93,
TK_Caret = 94,
TK_Or = 95,
TK_AndAnd = 96,
TK_OrOr = 101,
TK_Question = 107,
TK_Colon = 72,
TK_Question = 102,
TK_Colon = 71,
TK_ColonColon = 4,
TK_DotDotDot = 90,
TK_DotDotDot = 97,
TK_Assign = 70,
TK_StarAssign = 108,
TK_SlashAssign = 109,
TK_PercentAssign = 110,
TK_PlusAssign = 111,
TK_MinusAssign = 112,
TK_RightShiftAssign = 113,
TK_LeftShiftAssign = 114,
TK_AndAssign = 115,
TK_CaretAssign = 116,
TK_OrAssign = 117,
TK_Comma = 69,
TK_StarAssign = 103,
TK_SlashAssign = 104,
TK_PercentAssign = 105,
TK_PlusAssign = 106,
TK_MinusAssign = 107,
TK_RightShiftAssign = 108,
TK_LeftShiftAssign = 109,
TK_AndAssign = 110,
TK_CaretAssign = 111,
TK_OrAssign = 112,
TK_Comma = 68,
TK_RightBracket = 118,
TK_RightParen = 73,
TK_RightBrace = 71,
TK_SemiColon = 25,
TK_LeftBrace = 67,
TK_ERROR_TOKEN = 60,
TK_RightParen = 72,
TK_RightBrace = 73,
TK_SemiColon = 39,
TK_LeftBrace = 69,
TK_ERROR_TOKEN = 62,
TK_EOF_TOKEN = 120;
public final static String orderedTerminalSymbols[] = {
@ -144,11 +144,11 @@ public interface CPPNoFunctionDeclaratorParsersym {
"Completion",
"LeftParen",
"ColonColon",
"Tilde",
"Star",
"Tilde",
"And",
"operator",
"EndOfCompletion",
"And",
"typename",
"bool",
"char",
@ -164,7 +164,6 @@ public interface CPPNoFunctionDeclaratorParsersym {
"virtual",
"const",
"volatile",
"SemiColon",
"auto",
"explicit",
"extern",
@ -179,7 +178,7 @@ public interface CPPNoFunctionDeclaratorParsersym {
"PlusPlus",
"MinusMinus",
"stringlit",
"class",
"SemiColon",
"Bang",
"const_cast",
"dynamic_cast",
@ -187,32 +186,33 @@ public interface CPPNoFunctionDeclaratorParsersym {
"reinterpret_cast",
"sizeof",
"static_cast",
"template",
"this",
"true",
"typeid",
"integer",
"floating",
"charconst",
"class",
"LT",
"enum",
"struct",
"template",
"union",
"throw",
"LeftBracket",
"namespace",
"ERROR_TOKEN",
"throw",
"using",
"LeftBracket",
"GT",
"asm",
"delete",
"new",
"LeftBrace",
"GT",
"Comma",
"LeftBrace",
"Assign",
"RightBrace",
"Colon",
"RightParen",
"RightBrace",
"try",
"while",
"break",
@ -225,27 +225,22 @@ public interface CPPNoFunctionDeclaratorParsersym {
"if",
"return",
"switch",
"export",
"RightShift",
"LeftShift",
"ArrowStar",
"DotDotDot",
"DotStar",
"Slash",
"Percent",
"export",
"LE",
"GE",
"ArrowStar",
"EQ",
"NE",
"Caret",
"Or",
"AndAnd",
"DotDotDot",
"DotStar",
"Slash",
"Percent",
"OrOr",
"catch",
"private",
"protected",
"public",
"Arrow",
"Question",
"StarAssign",
"SlashAssign",
@ -257,6 +252,11 @@ public interface CPPNoFunctionDeclaratorParsersym {
"AndAssign",
"CaretAssign",
"OrAssign",
"catch",
"private",
"protected",
"public",
"Arrow",
"RightBracket",
"Dot",
"EOF_TOKEN",

View file

@ -15,127 +15,127 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
public interface CPPParsersym {
public final static int
TK_asm = 63,
TK_auto = 26,
TK_asm = 64,
TK_auto = 25,
TK_bool = 11,
TK_break = 76,
TK_case = 77,
TK_catch = 102,
TK_catch = 113,
TK_char = 12,
TK_class = 39,
TK_class = 41,
TK_const = 23,
TK_const_cast = 43,
TK_const_cast = 42,
TK_continue = 78,
TK_default = 79,
TK_delete = 65,
TK_delete = 66,
TK_do = 80,
TK_double = 13,
TK_dynamic_cast = 44,
TK_dynamic_cast = 43,
TK_else = 121,
TK_enum = 45,
TK_explicit = 27,
TK_export = 86,
TK_extern = 28,
TK_false = 46,
TK_enum = 55,
TK_explicit = 26,
TK_export = 88,
TK_extern = 27,
TK_false = 44,
TK_float = 14,
TK_for = 81,
TK_friend = 29,
TK_friend = 28,
TK_goto = 82,
TK_if = 83,
TK_inline = 30,
TK_inline = 29,
TK_int = 15,
TK_long = 16,
TK_mutable = 31,
TK_mutable = 30,
TK_namespace = 59,
TK_new = 66,
TK_operator = 7,
TK_private = 103,
TK_protected = 104,
TK_public = 105,
TK_register = 32,
TK_reinterpret_cast = 47,
TK_new = 67,
TK_operator = 8,
TK_private = 114,
TK_protected = 115,
TK_public = 116,
TK_register = 31,
TK_reinterpret_cast = 45,
TK_return = 84,
TK_short = 17,
TK_signed = 18,
TK_sizeof = 48,
TK_static = 33,
TK_static_cast = 49,
TK_struct = 50,
TK_sizeof = 46,
TK_static = 32,
TK_static_cast = 47,
TK_struct = 56,
TK_switch = 85,
TK_template = 41,
TK_this = 51,
TK_throw = 62,
TK_template = 57,
TK_this = 48,
TK_throw = 60,
TK_try = 74,
TK_true = 52,
TK_typedef = 34,
TK_typeid = 53,
TK_true = 49,
TK_typedef = 33,
TK_typeid = 50,
TK_typename = 10,
TK_union = 54,
TK_union = 58,
TK_unsigned = 19,
TK_using = 60,
TK_using = 62,
TK_virtual = 22,
TK_void = 20,
TK_volatile = 24,
TK_wchar_t = 21,
TK_while = 75,
TK_integer = 55,
TK_floating = 56,
TK_charconst = 57,
TK_stringlit = 40,
TK_integer = 51,
TK_floating = 52,
TK_charconst = 53,
TK_stringlit = 38,
TK_identifier = 1,
TK_Completion = 2,
TK_EndOfCompletion = 8,
TK_EndOfCompletion = 9,
TK_Invalid = 122,
TK_LeftBracket = 64,
TK_LeftBracket = 61,
TK_LeftParen = 3,
TK_Dot = 119,
TK_DotStar = 91,
TK_Arrow = 106,
TK_ArrowStar = 89,
TK_PlusPlus = 37,
TK_MinusMinus = 38,
TK_And = 9,
TK_Star = 6,
TK_Plus = 35,
TK_Minus = 36,
TK_Tilde = 5,
TK_Bang = 42,
TK_Slash = 92,
TK_Percent = 93,
TK_RightShift = 87,
TK_LeftShift = 88,
TK_LT = 58,
TK_GT = 68,
TK_LE = 94,
TK_GE = 95,
TK_EQ = 96,
TK_NE = 97,
TK_Caret = 98,
TK_Or = 99,
TK_AndAnd = 100,
TK_DotStar = 98,
TK_Arrow = 117,
TK_ArrowStar = 91,
TK_PlusPlus = 36,
TK_MinusMinus = 37,
TK_And = 7,
TK_Star = 5,
TK_Plus = 34,
TK_Minus = 35,
TK_Tilde = 6,
TK_Bang = 40,
TK_Slash = 99,
TK_Percent = 100,
TK_RightShift = 86,
TK_LeftShift = 87,
TK_LT = 54,
TK_GT = 65,
TK_LE = 89,
TK_GE = 90,
TK_EQ = 92,
TK_NE = 93,
TK_Caret = 94,
TK_Or = 95,
TK_AndAnd = 96,
TK_OrOr = 101,
TK_Question = 107,
TK_Colon = 72,
TK_Question = 102,
TK_Colon = 71,
TK_ColonColon = 4,
TK_DotDotDot = 90,
TK_DotDotDot = 97,
TK_Assign = 70,
TK_StarAssign = 108,
TK_SlashAssign = 109,
TK_PercentAssign = 110,
TK_PlusAssign = 111,
TK_MinusAssign = 112,
TK_RightShiftAssign = 113,
TK_LeftShiftAssign = 114,
TK_AndAssign = 115,
TK_CaretAssign = 116,
TK_OrAssign = 117,
TK_Comma = 69,
TK_StarAssign = 103,
TK_SlashAssign = 104,
TK_PercentAssign = 105,
TK_PlusAssign = 106,
TK_MinusAssign = 107,
TK_RightShiftAssign = 108,
TK_LeftShiftAssign = 109,
TK_AndAssign = 110,
TK_CaretAssign = 111,
TK_OrAssign = 112,
TK_Comma = 68,
TK_RightBracket = 118,
TK_RightParen = 73,
TK_RightBrace = 71,
TK_SemiColon = 25,
TK_LeftBrace = 67,
TK_ERROR_TOKEN = 61,
TK_RightParen = 72,
TK_RightBrace = 73,
TK_SemiColon = 39,
TK_LeftBrace = 69,
TK_ERROR_TOKEN = 63,
TK_EOF_TOKEN = 120;
public final static String orderedTerminalSymbols[] = {
@ -144,11 +144,11 @@ public interface CPPParsersym {
"Completion",
"LeftParen",
"ColonColon",
"Tilde",
"Star",
"Tilde",
"And",
"operator",
"EndOfCompletion",
"And",
"typename",
"bool",
"char",
@ -164,7 +164,6 @@ public interface CPPParsersym {
"virtual",
"const",
"volatile",
"SemiColon",
"auto",
"explicit",
"extern",
@ -178,41 +177,42 @@ public interface CPPParsersym {
"Minus",
"PlusPlus",
"MinusMinus",
"class",
"stringlit",
"template",
"SemiColon",
"Bang",
"class",
"const_cast",
"dynamic_cast",
"enum",
"false",
"reinterpret_cast",
"sizeof",
"static_cast",
"struct",
"this",
"true",
"typeid",
"union",
"integer",
"floating",
"charconst",
"LT",
"enum",
"struct",
"template",
"union",
"namespace",
"throw",
"LeftBracket",
"using",
"ERROR_TOKEN",
"throw",
"asm",
"LeftBracket",
"GT",
"delete",
"new",
"LeftBrace",
"GT",
"Comma",
"LeftBrace",
"Assign",
"RightBrace",
"Colon",
"RightParen",
"RightBrace",
"try",
"while",
"break",
@ -225,27 +225,22 @@ public interface CPPParsersym {
"if",
"return",
"switch",
"export",
"RightShift",
"LeftShift",
"ArrowStar",
"DotDotDot",
"DotStar",
"Slash",
"Percent",
"export",
"LE",
"GE",
"ArrowStar",
"EQ",
"NE",
"Caret",
"Or",
"AndAnd",
"DotDotDot",
"DotStar",
"Slash",
"Percent",
"OrOr",
"catch",
"private",
"protected",
"public",
"Arrow",
"Question",
"StarAssign",
"SlashAssign",
@ -257,6 +252,11 @@ public interface CPPParsersym {
"AndAssign",
"CaretAssign",
"OrAssign",
"catch",
"private",
"protected",
"public",
"Arrow",
"RightBracket",
"Dot",
"EOF_TOKEN",

View file

@ -15,127 +15,127 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
public interface CPPSizeofExpressionParsersym {
public final static int
TK_asm = 64,
TK_auto = 28,
TK_asm = 65,
TK_auto = 25,
TK_bool = 11,
TK_break = 76,
TK_case = 77,
TK_catch = 102,
TK_catch = 113,
TK_char = 12,
TK_class = 40,
TK_class = 53,
TK_const = 23,
TK_const_cast = 42,
TK_const_cast = 41,
TK_continue = 78,
TK_default = 79,
TK_delete = 65,
TK_delete = 66,
TK_do = 80,
TK_double = 13,
TK_dynamic_cast = 43,
TK_dynamic_cast = 42,
TK_else = 121,
TK_enum = 56,
TK_explicit = 29,
TK_export = 86,
TK_extern = 30,
TK_false = 44,
TK_explicit = 26,
TK_export = 88,
TK_extern = 27,
TK_false = 43,
TK_float = 14,
TK_for = 81,
TK_friend = 31,
TK_friend = 28,
TK_goto = 82,
TK_if = 83,
TK_inline = 32,
TK_inline = 29,
TK_int = 15,
TK_long = 16,
TK_mutable = 33,
TK_namespace = 59,
TK_new = 66,
TK_operator = 7,
TK_private = 103,
TK_protected = 104,
TK_public = 105,
TK_register = 34,
TK_reinterpret_cast = 45,
TK_mutable = 30,
TK_namespace = 61,
TK_new = 67,
TK_operator = 8,
TK_private = 114,
TK_protected = 115,
TK_public = 116,
TK_register = 31,
TK_reinterpret_cast = 44,
TK_return = 84,
TK_short = 17,
TK_signed = 18,
TK_sizeof = 46,
TK_static = 35,
TK_static_cast = 47,
TK_sizeof = 45,
TK_static = 32,
TK_static_cast = 46,
TK_struct = 57,
TK_switch = 85,
TK_template = 48,
TK_this = 49,
TK_throw = 60,
TK_template = 55,
TK_this = 47,
TK_throw = 59,
TK_try = 74,
TK_true = 50,
TK_typedef = 36,
TK_typeid = 51,
TK_true = 48,
TK_typedef = 33,
TK_typeid = 49,
TK_typename = 10,
TK_union = 58,
TK_unsigned = 19,
TK_using = 62,
TK_using = 63,
TK_virtual = 22,
TK_void = 20,
TK_volatile = 24,
TK_wchar_t = 21,
TK_while = 75,
TK_integer = 52,
TK_floating = 53,
TK_charconst = 54,
TK_stringlit = 39,
TK_integer = 50,
TK_floating = 51,
TK_charconst = 52,
TK_stringlit = 38,
TK_identifier = 1,
TK_Completion = 2,
TK_EndOfCompletion = 8,
TK_EndOfCompletion = 9,
TK_Invalid = 122,
TK_LeftBracket = 63,
TK_LeftBracket = 60,
TK_LeftParen = 3,
TK_Dot = 119,
TK_DotStar = 91,
TK_Arrow = 106,
TK_ArrowStar = 89,
TK_PlusPlus = 37,
TK_MinusMinus = 38,
TK_And = 9,
TK_Star = 6,
TK_Plus = 25,
TK_Minus = 26,
TK_Tilde = 5,
TK_Bang = 41,
TK_Slash = 92,
TK_Percent = 93,
TK_RightShift = 87,
TK_LeftShift = 88,
TK_LT = 55,
TK_GT = 68,
TK_LE = 94,
TK_GE = 95,
TK_EQ = 96,
TK_NE = 97,
TK_Caret = 98,
TK_Or = 99,
TK_AndAnd = 100,
TK_DotStar = 98,
TK_Arrow = 117,
TK_ArrowStar = 91,
TK_PlusPlus = 36,
TK_MinusMinus = 37,
TK_And = 7,
TK_Star = 5,
TK_Plus = 34,
TK_Minus = 35,
TK_Tilde = 6,
TK_Bang = 39,
TK_Slash = 99,
TK_Percent = 100,
TK_RightShift = 86,
TK_LeftShift = 87,
TK_LT = 54,
TK_GT = 64,
TK_LE = 89,
TK_GE = 90,
TK_EQ = 92,
TK_NE = 93,
TK_Caret = 94,
TK_Or = 95,
TK_AndAnd = 96,
TK_OrOr = 101,
TK_Question = 107,
TK_Colon = 72,
TK_Question = 102,
TK_Colon = 71,
TK_ColonColon = 4,
TK_DotDotDot = 90,
TK_DotDotDot = 97,
TK_Assign = 70,
TK_StarAssign = 108,
TK_SlashAssign = 109,
TK_PercentAssign = 110,
TK_PlusAssign = 111,
TK_MinusAssign = 112,
TK_RightShiftAssign = 113,
TK_LeftShiftAssign = 114,
TK_AndAssign = 115,
TK_CaretAssign = 116,
TK_OrAssign = 117,
TK_Comma = 69,
TK_StarAssign = 103,
TK_SlashAssign = 104,
TK_PercentAssign = 105,
TK_PlusAssign = 106,
TK_MinusAssign = 107,
TK_RightShiftAssign = 108,
TK_LeftShiftAssign = 109,
TK_AndAssign = 110,
TK_CaretAssign = 111,
TK_OrAssign = 112,
TK_Comma = 68,
TK_RightBracket = 118,
TK_RightParen = 73,
TK_RightBrace = 71,
TK_SemiColon = 27,
TK_LeftBrace = 67,
TK_ERROR_TOKEN = 61,
TK_RightParen = 72,
TK_RightBrace = 73,
TK_SemiColon = 40,
TK_LeftBrace = 69,
TK_ERROR_TOKEN = 62,
TK_EOF_TOKEN = 120;
public final static String orderedTerminalSymbols[] = {
@ -144,11 +144,11 @@ public interface CPPSizeofExpressionParsersym {
"Completion",
"LeftParen",
"ColonColon",
"Tilde",
"Star",
"Tilde",
"And",
"operator",
"EndOfCompletion",
"And",
"typename",
"bool",
"char",
@ -164,9 +164,6 @@ public interface CPPSizeofExpressionParsersym {
"virtual",
"const",
"volatile",
"Plus",
"Minus",
"SemiColon",
"auto",
"explicit",
"extern",
@ -176,43 +173,46 @@ public interface CPPSizeofExpressionParsersym {
"register",
"static",
"typedef",
"Plus",
"Minus",
"PlusPlus",
"MinusMinus",
"stringlit",
"class",
"Bang",
"SemiColon",
"const_cast",
"dynamic_cast",
"false",
"reinterpret_cast",
"sizeof",
"static_cast",
"template",
"this",
"true",
"typeid",
"integer",
"floating",
"charconst",
"class",
"LT",
"template",
"enum",
"struct",
"union",
"namespace",
"throw",
"LeftBracket",
"namespace",
"ERROR_TOKEN",
"using",
"LeftBracket",
"GT",
"asm",
"delete",
"new",
"LeftBrace",
"GT",
"Comma",
"LeftBrace",
"Assign",
"RightBrace",
"Colon",
"RightParen",
"RightBrace",
"try",
"while",
"break",
@ -225,27 +225,22 @@ public interface CPPSizeofExpressionParsersym {
"if",
"return",
"switch",
"export",
"RightShift",
"LeftShift",
"ArrowStar",
"DotDotDot",
"DotStar",
"Slash",
"Percent",
"export",
"LE",
"GE",
"ArrowStar",
"EQ",
"NE",
"Caret",
"Or",
"AndAnd",
"DotDotDot",
"DotStar",
"Slash",
"Percent",
"OrOr",
"catch",
"private",
"protected",
"public",
"Arrow",
"Question",
"StarAssign",
"SlashAssign",
@ -257,6 +252,11 @@ public interface CPPSizeofExpressionParsersym {
"AndAssign",
"CaretAssign",
"OrAssign",
"catch",
"private",
"protected",
"public",
"Arrow",
"RightBracket",
"Dot",
"EOF_TOKEN",

View file

@ -15,127 +15,127 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
public interface CPPTemplateTypeParameterParsersym {
public final static int
TK_asm = 64,
TK_auto = 26,
TK_asm = 65,
TK_auto = 25,
TK_bool = 11,
TK_break = 76,
TK_case = 77,
TK_catch = 102,
TK_catch = 113,
TK_char = 12,
TK_class = 39,
TK_class = 41,
TK_const = 23,
TK_const_cast = 43,
TK_const_cast = 42,
TK_continue = 78,
TK_default = 79,
TK_delete = 65,
TK_delete = 66,
TK_do = 80,
TK_double = 13,
TK_dynamic_cast = 44,
TK_dynamic_cast = 43,
TK_else = 121,
TK_enum = 56,
TK_explicit = 27,
TK_export = 86,
TK_extern = 28,
TK_false = 45,
TK_explicit = 26,
TK_export = 88,
TK_extern = 27,
TK_false = 44,
TK_float = 14,
TK_for = 81,
TK_friend = 29,
TK_friend = 28,
TK_goto = 82,
TK_if = 83,
TK_inline = 30,
TK_inline = 29,
TK_int = 15,
TK_long = 16,
TK_mutable = 31,
TK_namespace = 59,
TK_new = 66,
TK_operator = 7,
TK_private = 103,
TK_protected = 104,
TK_public = 105,
TK_register = 32,
TK_reinterpret_cast = 46,
TK_mutable = 30,
TK_namespace = 61,
TK_new = 67,
TK_operator = 8,
TK_private = 114,
TK_protected = 115,
TK_public = 116,
TK_register = 31,
TK_reinterpret_cast = 45,
TK_return = 84,
TK_short = 17,
TK_signed = 18,
TK_sizeof = 47,
TK_static = 33,
TK_static_cast = 48,
TK_sizeof = 46,
TK_static = 32,
TK_static_cast = 47,
TK_struct = 57,
TK_switch = 85,
TK_template = 41,
TK_this = 49,
TK_throw = 61,
TK_template = 55,
TK_this = 48,
TK_throw = 59,
TK_try = 74,
TK_true = 50,
TK_typedef = 34,
TK_typeid = 51,
TK_true = 49,
TK_typedef = 33,
TK_typeid = 50,
TK_typename = 10,
TK_union = 58,
TK_unsigned = 19,
TK_using = 62,
TK_using = 63,
TK_virtual = 22,
TK_void = 20,
TK_volatile = 24,
TK_wchar_t = 21,
TK_while = 75,
TK_integer = 52,
TK_floating = 53,
TK_charconst = 54,
TK_stringlit = 40,
TK_integer = 51,
TK_floating = 52,
TK_charconst = 53,
TK_stringlit = 38,
TK_identifier = 1,
TK_Completion = 2,
TK_EndOfCompletion = 8,
TK_EndOfCompletion = 9,
TK_Invalid = 122,
TK_LeftBracket = 63,
TK_LeftBracket = 60,
TK_LeftParen = 3,
TK_Dot = 119,
TK_DotStar = 91,
TK_Arrow = 106,
TK_ArrowStar = 89,
TK_PlusPlus = 37,
TK_MinusMinus = 38,
TK_And = 9,
TK_Star = 6,
TK_Plus = 35,
TK_Minus = 36,
TK_Tilde = 5,
TK_Bang = 42,
TK_Slash = 92,
TK_Percent = 93,
TK_RightShift = 87,
TK_LeftShift = 88,
TK_LT = 55,
TK_GT = 68,
TK_LE = 94,
TK_GE = 95,
TK_EQ = 96,
TK_NE = 97,
TK_Caret = 98,
TK_Or = 99,
TK_AndAnd = 100,
TK_DotStar = 98,
TK_Arrow = 117,
TK_ArrowStar = 91,
TK_PlusPlus = 36,
TK_MinusMinus = 37,
TK_And = 7,
TK_Star = 5,
TK_Plus = 34,
TK_Minus = 35,
TK_Tilde = 6,
TK_Bang = 40,
TK_Slash = 99,
TK_Percent = 100,
TK_RightShift = 86,
TK_LeftShift = 87,
TK_LT = 54,
TK_GT = 64,
TK_LE = 89,
TK_GE = 90,
TK_EQ = 92,
TK_NE = 93,
TK_Caret = 94,
TK_Or = 95,
TK_AndAnd = 96,
TK_OrOr = 101,
TK_Question = 107,
TK_Colon = 72,
TK_Question = 102,
TK_Colon = 71,
TK_ColonColon = 4,
TK_DotDotDot = 90,
TK_DotDotDot = 97,
TK_Assign = 70,
TK_StarAssign = 108,
TK_SlashAssign = 109,
TK_PercentAssign = 110,
TK_PlusAssign = 111,
TK_MinusAssign = 112,
TK_RightShiftAssign = 113,
TK_LeftShiftAssign = 114,
TK_AndAssign = 115,
TK_CaretAssign = 116,
TK_OrAssign = 117,
TK_Comma = 69,
TK_StarAssign = 103,
TK_SlashAssign = 104,
TK_PercentAssign = 105,
TK_PlusAssign = 106,
TK_MinusAssign = 107,
TK_RightShiftAssign = 108,
TK_LeftShiftAssign = 109,
TK_AndAssign = 110,
TK_CaretAssign = 111,
TK_OrAssign = 112,
TK_Comma = 68,
TK_RightBracket = 118,
TK_RightParen = 73,
TK_RightBrace = 71,
TK_SemiColon = 25,
TK_LeftBrace = 67,
TK_ERROR_TOKEN = 60,
TK_RightParen = 72,
TK_RightBrace = 73,
TK_SemiColon = 39,
TK_LeftBrace = 69,
TK_ERROR_TOKEN = 62,
TK_EOF_TOKEN = 120;
public final static String orderedTerminalSymbols[] = {
@ -144,11 +144,11 @@ public interface CPPTemplateTypeParameterParsersym {
"Completion",
"LeftParen",
"ColonColon",
"Tilde",
"Star",
"Tilde",
"And",
"operator",
"EndOfCompletion",
"And",
"typename",
"bool",
"char",
@ -164,7 +164,6 @@ public interface CPPTemplateTypeParameterParsersym {
"virtual",
"const",
"volatile",
"SemiColon",
"auto",
"explicit",
"extern",
@ -178,10 +177,10 @@ public interface CPPTemplateTypeParameterParsersym {
"Minus",
"PlusPlus",
"MinusMinus",
"class",
"stringlit",
"template",
"SemiColon",
"Bang",
"class",
"const_cast",
"dynamic_cast",
"false",
@ -195,24 +194,25 @@ public interface CPPTemplateTypeParameterParsersym {
"floating",
"charconst",
"LT",
"template",
"enum",
"struct",
"union",
"throw",
"LeftBracket",
"namespace",
"ERROR_TOKEN",
"throw",
"using",
"LeftBracket",
"GT",
"asm",
"delete",
"new",
"LeftBrace",
"GT",
"Comma",
"LeftBrace",
"Assign",
"RightBrace",
"Colon",
"RightParen",
"RightBrace",
"try",
"while",
"break",
@ -225,27 +225,22 @@ public interface CPPTemplateTypeParameterParsersym {
"if",
"return",
"switch",
"export",
"RightShift",
"LeftShift",
"ArrowStar",
"DotDotDot",
"DotStar",
"Slash",
"Percent",
"export",
"LE",
"GE",
"ArrowStar",
"EQ",
"NE",
"Caret",
"Or",
"AndAnd",
"DotDotDot",
"DotStar",
"Slash",
"Percent",
"OrOr",
"catch",
"private",
"protected",
"public",
"Arrow",
"Question",
"StarAssign",
"SlashAssign",
@ -257,6 +252,11 @@ public interface CPPTemplateTypeParameterParsersym {
"AndAssign",
"CaretAssign",
"OrAssign",
"catch",
"private",
"protected",
"public",
"Arrow",
"RightBracket",
"Dot",
"EOF_TOKEN",

View file

@ -21,130 +21,130 @@ public interface GPPParsersym {
TK_asm = 5,
TK_auto = 32,
TK_bool = 16,
TK_break = 83,
TK_case = 84,
TK_catch = 111,
TK_break = 85,
TK_case = 86,
TK_catch = 122,
TK_char = 17,
TK_class = 49,
TK_const = 28,
TK_const_cast = 50,
TK_continue = 85,
TK_default = 86,
TK_delete = 76,
TK_do = 87,
TK_class = 62,
TK_const = 27,
TK_const_cast = 48,
TK_continue = 87,
TK_default = 88,
TK_delete = 77,
TK_do = 89,
TK_double = 18,
TK_dynamic_cast = 51,
TK_dynamic_cast = 49,
TK_else = 130,
TK_enum = 63,
TK_explicit = 33,
TK_export = 88,
TK_export = 90,
TK_extern = 34,
TK_false = 52,
TK_false = 50,
TK_float = 19,
TK_for = 89,
TK_for = 91,
TK_friend = 35,
TK_goto = 90,
TK_if = 91,
TK_goto = 92,
TK_if = 93,
TK_inline = 36,
TK_int = 20,
TK_long = 21,
TK_mutable = 37,
TK_namespace = 66,
TK_new = 77,
TK_namespace = 68,
TK_new = 78,
TK_operator = 9,
TK_private = 112,
TK_protected = 113,
TK_public = 114,
TK_private = 123,
TK_protected = 124,
TK_public = 125,
TK_register = 38,
TK_reinterpret_cast = 53,
TK_return = 92,
TK_reinterpret_cast = 51,
TK_return = 94,
TK_short = 22,
TK_signed = 23,
TK_sizeof = 54,
TK_sizeof = 52,
TK_static = 39,
TK_static_cast = 55,
TK_static_cast = 53,
TK_struct = 64,
TK_switch = 93,
TK_template = 45,
TK_this = 56,
TK_throw = 71,
TK_switch = 95,
TK_template = 54,
TK_this = 55,
TK_throw = 72,
TK_try = 79,
TK_true = 57,
TK_true = 56,
TK_typedef = 40,
TK_typeid = 58,
TK_typeid = 57,
TK_typename = 13,
TK_union = 65,
TK_unsigned = 24,
TK_using = 68,
TK_using = 69,
TK_virtual = 31,
TK_void = 25,
TK_volatile = 29,
TK_volatile = 28,
TK_wchar_t = 26,
TK_while = 82,
TK_integer = 59,
TK_floating = 60,
TK_charconst = 61,
TK_stringlit = 42,
TK_integer = 58,
TK_floating = 59,
TK_charconst = 60,
TK_stringlit = 41,
TK_identifier = 1,
TK_Completion = 2,
TK_EndOfCompletion = 10,
TK_EndOfCompletion = 11,
TK_Invalid = 131,
TK_LeftBracket = 72,
TK_LeftBracket = 70,
TK_LeftParen = 3,
TK_Dot = 128,
TK_DotStar = 98,
TK_Arrow = 115,
TK_ArrowStar = 97,
TK_PlusPlus = 46,
TK_MinusMinus = 47,
TK_DotStar = 105,
TK_Arrow = 126,
TK_ArrowStar = 99,
TK_PlusPlus = 44,
TK_MinusMinus = 45,
TK_And = 12,
TK_Star = 11,
TK_Plus = 43,
TK_Minus = 44,
TK_Star = 10,
TK_Plus = 42,
TK_Minus = 43,
TK_Tilde = 8,
TK_Bang = 48,
TK_Slash = 99,
TK_Percent = 100,
TK_RightShift = 94,
TK_LeftShift = 95,
TK_LT = 70,
TK_GT = 78,
TK_LE = 101,
TK_GE = 102,
TK_EQ = 103,
TK_NE = 104,
TK_Caret = 105,
TK_Or = 106,
TK_AndAnd = 107,
TK_Bang = 47,
TK_Slash = 106,
TK_Percent = 107,
TK_RightShift = 83,
TK_LeftShift = 84,
TK_LT = 66,
TK_GT = 75,
TK_LE = 96,
TK_GE = 97,
TK_EQ = 100,
TK_NE = 101,
TK_Caret = 102,
TK_Or = 103,
TK_AndAnd = 104,
TK_OrOr = 108,
TK_Question = 116,
TK_Colon = 74,
TK_Question = 109,
TK_Colon = 76,
TK_ColonColon = 4,
TK_DotDotDot = 96,
TK_DotDotDot = 98,
TK_Assign = 80,
TK_StarAssign = 117,
TK_SlashAssign = 118,
TK_PercentAssign = 119,
TK_PlusAssign = 120,
TK_MinusAssign = 121,
TK_RightShiftAssign = 122,
TK_LeftShiftAssign = 123,
TK_AndAssign = 124,
TK_CaretAssign = 125,
TK_OrAssign = 126,
TK_Comma = 75,
TK_StarAssign = 110,
TK_SlashAssign = 111,
TK_PercentAssign = 112,
TK_PlusAssign = 113,
TK_MinusAssign = 114,
TK_RightShiftAssign = 115,
TK_LeftShiftAssign = 116,
TK_AndAssign = 117,
TK_CaretAssign = 118,
TK_OrAssign = 119,
TK_Comma = 73,
TK_RightBracket = 127,
TK_RightParen = 73,
TK_RightParen = 74,
TK_RightBrace = 81,
TK_SemiColon = 41,
TK_SemiColon = 46,
TK_LeftBrace = 67,
TK_typeof = 27,
TK___alignof__ = 62,
TK_typeof = 29,
TK___alignof__ = 61,
TK___attribute__ = 6,
TK___declspec = 7,
TK_MAX = 109,
TK_MIN = 110,
TK_ERROR_TOKEN = 69,
TK_MAX = 120,
TK_MIN = 121,
TK_ERROR_TOKEN = 71,
TK_EOF_TOKEN = 129;
public final static String orderedTerminalSymbols[] = {
@ -158,8 +158,8 @@ public interface GPPParsersym {
"__declspec",
"Tilde",
"operator",
"EndOfCompletion",
"Star",
"EndOfCompletion",
"And",
"typename",
"_Complex",
@ -175,9 +175,9 @@ public interface GPPParsersym {
"unsigned",
"void",
"wchar_t",
"typeof",
"const",
"volatile",
"typeof",
"restrict",
"virtual",
"auto",
@ -189,21 +189,20 @@ public interface GPPParsersym {
"register",
"static",
"typedef",
"SemiColon",
"stringlit",
"Plus",
"Minus",
"template",
"PlusPlus",
"MinusMinus",
"SemiColon",
"Bang",
"class",
"const_cast",
"dynamic_cast",
"false",
"reinterpret_cast",
"sizeof",
"static_cast",
"template",
"this",
"true",
"typeid",
@ -211,26 +210,29 @@ public interface GPPParsersym {
"floating",
"charconst",
"__alignof__",
"class",
"enum",
"struct",
"union",
"namespace",
"LeftBrace",
"using",
"ERROR_TOKEN",
"LT",
"throw",
"LeftBrace",
"namespace",
"using",
"LeftBracket",
"RightParen",
"Colon",
"ERROR_TOKEN",
"throw",
"Comma",
"RightParen",
"GT",
"Colon",
"delete",
"new",
"GT",
"try",
"Assign",
"RightBrace",
"while",
"RightShift",
"LeftShift",
"break",
"case",
"continue",
@ -242,28 +244,19 @@ public interface GPPParsersym {
"if",
"return",
"switch",
"RightShift",
"LeftShift",
"DotDotDot",
"ArrowStar",
"DotStar",
"Slash",
"Percent",
"LE",
"GE",
"DotDotDot",
"ArrowStar",
"EQ",
"NE",
"Caret",
"Or",
"AndAnd",
"DotStar",
"Slash",
"Percent",
"OrOr",
"MAX",
"MIN",
"catch",
"private",
"protected",
"public",
"Arrow",
"Question",
"StarAssign",
"SlashAssign",
@ -275,6 +268,13 @@ public interface GPPParsersym {
"AndAssign",
"CaretAssign",
"OrAssign",
"MAX",
"MIN",
"catch",
"private",
"protected",
"public",
"Arrow",
"RightBracket",
"Dot",
"EOF_TOKEN",

View file

@ -21,53 +21,53 @@ public interface GPPSizeofExpressionParsersym {
TK_asm = 5,
TK_auto = 32,
TK_bool = 16,
TK_break = 83,
TK_case = 84,
TK_catch = 111,
TK_break = 85,
TK_case = 86,
TK_catch = 122,
TK_char = 17,
TK_class = 62,
TK_const = 28,
TK_const_cast = 49,
TK_continue = 85,
TK_default = 86,
TK_delete = 73,
TK_do = 87,
TK_const_cast = 48,
TK_continue = 87,
TK_default = 88,
TK_delete = 74,
TK_do = 89,
TK_double = 18,
TK_dynamic_cast = 50,
TK_dynamic_cast = 49,
TK_else = 130,
TK_enum = 63,
TK_explicit = 33,
TK_export = 93,
TK_export = 95,
TK_extern = 34,
TK_false = 51,
TK_false = 50,
TK_float = 19,
TK_for = 88,
TK_for = 90,
TK_friend = 35,
TK_goto = 89,
TK_if = 90,
TK_goto = 91,
TK_if = 92,
TK_inline = 36,
TK_int = 20,
TK_long = 21,
TK_mutable = 37,
TK_namespace = 66,
TK_new = 74,
TK_namespace = 67,
TK_new = 75,
TK_operator = 9,
TK_private = 112,
TK_protected = 113,
TK_public = 114,
TK_private = 123,
TK_protected = 124,
TK_public = 125,
TK_register = 38,
TK_reinterpret_cast = 52,
TK_return = 91,
TK_reinterpret_cast = 51,
TK_return = 93,
TK_short = 22,
TK_signed = 23,
TK_sizeof = 53,
TK_sizeof = 52,
TK_static = 39,
TK_static_cast = 54,
TK_static_cast = 53,
TK_struct = 64,
TK_switch = 92,
TK_template = 45,
TK_switch = 94,
TK_template = 54,
TK_this = 55,
TK_throw = 70,
TK_throw = 68,
TK_try = 79,
TK_true = 56,
TK_typedef = 40,
@ -75,7 +75,7 @@ public interface GPPSizeofExpressionParsersym {
TK_typename = 13,
TK_union = 65,
TK_unsigned = 24,
TK_using = 68,
TK_using = 70,
TK_virtual = 31,
TK_void = 25,
TK_volatile = 29,
@ -87,64 +87,64 @@ public interface GPPSizeofExpressionParsersym {
TK_stringlit = 41,
TK_identifier = 1,
TK_Completion = 2,
TK_EndOfCompletion = 10,
TK_EndOfCompletion = 12,
TK_Invalid = 131,
TK_LeftBracket = 72,
TK_LeftBracket = 71,
TK_LeftParen = 3,
TK_Dot = 128,
TK_DotStar = 98,
TK_Arrow = 115,
TK_ArrowStar = 97,
TK_PlusPlus = 46,
TK_MinusMinus = 47,
TK_And = 12,
TK_Star = 11,
TK_DotStar = 105,
TK_Arrow = 126,
TK_ArrowStar = 99,
TK_PlusPlus = 44,
TK_MinusMinus = 45,
TK_And = 11,
TK_Star = 10,
TK_Plus = 42,
TK_Minus = 43,
TK_Tilde = 8,
TK_Bang = 48,
TK_Slash = 99,
TK_Percent = 100,
TK_RightShift = 94,
TK_LeftShift = 95,
TK_LT = 69,
TK_GT = 78,
TK_LE = 101,
TK_GE = 102,
TK_EQ = 103,
TK_NE = 104,
TK_Caret = 105,
TK_Or = 106,
TK_AndAnd = 107,
TK_Bang = 46,
TK_Slash = 106,
TK_Percent = 107,
TK_RightShift = 83,
TK_LeftShift = 84,
TK_LT = 66,
TK_GT = 77,
TK_LE = 96,
TK_GE = 97,
TK_EQ = 100,
TK_NE = 101,
TK_Caret = 102,
TK_Or = 103,
TK_AndAnd = 104,
TK_OrOr = 108,
TK_Question = 116,
TK_Colon = 76,
TK_Question = 109,
TK_Colon = 78,
TK_ColonColon = 4,
TK_DotDotDot = 96,
TK_DotDotDot = 98,
TK_Assign = 80,
TK_StarAssign = 117,
TK_SlashAssign = 118,
TK_PercentAssign = 119,
TK_PlusAssign = 120,
TK_MinusAssign = 121,
TK_RightShiftAssign = 122,
TK_LeftShiftAssign = 123,
TK_AndAssign = 124,
TK_CaretAssign = 125,
TK_OrAssign = 126,
TK_Comma = 77,
TK_StarAssign = 110,
TK_SlashAssign = 111,
TK_PercentAssign = 112,
TK_PlusAssign = 113,
TK_MinusAssign = 114,
TK_RightShiftAssign = 115,
TK_LeftShiftAssign = 116,
TK_AndAssign = 117,
TK_CaretAssign = 118,
TK_OrAssign = 119,
TK_Comma = 73,
TK_RightBracket = 127,
TK_RightParen = 75,
TK_RightParen = 76,
TK_RightBrace = 81,
TK_SemiColon = 44,
TK_LeftBrace = 71,
TK_SemiColon = 47,
TK_LeftBrace = 72,
TK_typeof = 27,
TK___alignof__ = 61,
TK___attribute__ = 6,
TK___declspec = 7,
TK_MAX = 109,
TK_MIN = 110,
TK_ERROR_TOKEN = 67,
TK_MAX = 120,
TK_MIN = 121,
TK_ERROR_TOKEN = 69,
TK_EOF_TOKEN = 129;
public final static String orderedTerminalSymbols[] = {
@ -158,9 +158,9 @@ public interface GPPSizeofExpressionParsersym {
"__declspec",
"Tilde",
"operator",
"EndOfCompletion",
"Star",
"And",
"EndOfCompletion",
"typename",
"_Complex",
"_Imaginary",
@ -192,17 +192,17 @@ public interface GPPSizeofExpressionParsersym {
"stringlit",
"Plus",
"Minus",
"SemiColon",
"template",
"PlusPlus",
"MinusMinus",
"Bang",
"SemiColon",
"const_cast",
"dynamic_cast",
"false",
"reinterpret_cast",
"sizeof",
"static_cast",
"template",
"this",
"true",
"typeid",
@ -214,23 +214,25 @@ public interface GPPSizeofExpressionParsersym {
"enum",
"struct",
"union",
"LT",
"namespace",
"throw",
"ERROR_TOKEN",
"using",
"LT",
"throw",
"LeftBrace",
"LeftBracket",
"LeftBrace",
"Comma",
"delete",
"new",
"RightParen",
"Colon",
"Comma",
"GT",
"Colon",
"try",
"Assign",
"RightBrace",
"while",
"RightShift",
"LeftShift",
"break",
"case",
"continue",
@ -242,28 +244,19 @@ public interface GPPSizeofExpressionParsersym {
"return",
"switch",
"export",
"RightShift",
"LeftShift",
"DotDotDot",
"ArrowStar",
"DotStar",
"Slash",
"Percent",
"LE",
"GE",
"DotDotDot",
"ArrowStar",
"EQ",
"NE",
"Caret",
"Or",
"AndAnd",
"DotStar",
"Slash",
"Percent",
"OrOr",
"MAX",
"MIN",
"catch",
"private",
"protected",
"public",
"Arrow",
"Question",
"StarAssign",
"SlashAssign",
@ -275,6 +268,13 @@ public interface GPPSizeofExpressionParsersym {
"AndAssign",
"CaretAssign",
"OrAssign",
"MAX",
"MIN",
"catch",
"private",
"protected",
"public",
"Arrow",
"RightBracket",
"Dot",
"EOF_TOKEN",

View file

@ -10,5 +10,5 @@
###############################################################################
lpg_exe=D:/lpg/lpgdistribution/lpgexe/lpg.exe
lpg_template=D:/newWorkspace/cdt_70_ies/org.eclipse.cdt.core.lrparser/grammar/template
lpg_include_loc=D:/newWorkspace/cdt_70_ies/org.eclipse.cdt.core.lrparser/grammar
lpg_template=D:/newWorkspace/rdp80_dev/org.eclipse.cdt.core.lrparser/grammar/template
lpg_include_loc=D:/newWorkspace/rdp80_dev/org.eclipse.cdt.core.lrparser/grammar

View file

@ -17,140 +17,140 @@ public interface XlcCPPParsersym {
public final static int
TK__Complex = 24,
TK__Imaginary = 25,
TK_restrict = 35,
TK_restrict = 34,
TK_asm = 7,
TK_auto = 38,
TK_bool = 15,
TK_break = 89,
TK_case = 90,
TK_break = 91,
TK_case = 92,
TK_catch = 130,
TK_char = 16,
TK_class = 66,
TK_const = 33,
TK_const_cast = 59,
TK_continue = 91,
TK_default = 92,
TK_delete = 81,
TK_do = 93,
TK_const = 32,
TK_const_cast = 58,
TK_continue = 93,
TK_default = 94,
TK_delete = 82,
TK_do = 95,
TK_double = 26,
TK_dynamic_cast = 60,
TK_dynamic_cast = 59,
TK_else = 136,
TK_enum = 68,
TK_explicit = 39,
TK_export = 94,
TK_export = 96,
TK_extern = 40,
TK_false = 52,
TK_false = 51,
TK_float = 17,
TK_for = 95,
TK_for = 97,
TK_friend = 41,
TK_goto = 96,
TK_if = 97,
TK_goto = 98,
TK_if = 99,
TK_inline = 42,
TK_int = 18,
TK_long = 19,
TK_mutable = 43,
TK_namespace = 73,
TK_new = 82,
TK_namespace = 76,
TK_new = 83,
TK_operator = 11,
TK_private = 131,
TK_protected = 132,
TK_public = 133,
TK_register = 44,
TK_reinterpret_cast = 61,
TK_return = 98,
TK_reinterpret_cast = 60,
TK_return = 100,
TK_short = 20,
TK_signed = 21,
TK_sizeof = 62,
TK_static = 36,
TK_static_cast = 63,
TK_sizeof = 61,
TK_static = 35,
TK_static_cast = 62,
TK_struct = 69,
TK_switch = 99,
TK_switch = 101,
TK_template = 67,
TK_this = 53,
TK_this = 52,
TK_throw = 74,
TK_try = 85,
TK_true = 54,
TK_true = 53,
TK_typedef = 45,
TK_typeid = 64,
TK_typename = 22,
TK_typeid = 63,
TK_typename = 23,
TK_union = 70,
TK_unsigned = 23,
TK_using = 75,
TK_virtual = 37,
TK_unsigned = 22,
TK_using = 77,
TK_virtual = 36,
TK_void = 27,
TK_volatile = 34,
TK_volatile = 33,
TK_wchar_t = 28,
TK_while = 88,
TK_integer = 55,
TK_floating = 56,
TK_charconst = 57,
TK_while = 90,
TK_integer = 54,
TK_floating = 55,
TK_charconst = 56,
TK_stringlit = 46,
TK_identifier = 1,
TK_Completion = 4,
TK_EndOfCompletion = 12,
TK_EndOfCompletion = 14,
TK_Invalid = 137,
TK_LeftBracket = 78,
TK_LeftBracket = 72,
TK_LeftParen = 5,
TK_Dot = 134,
TK_DotStar = 105,
TK_Arrow = 118,
TK_ArrowStar = 103,
TK_DotStar = 112,
TK_Arrow = 129,
TK_ArrowStar = 105,
TK_PlusPlus = 49,
TK_MinusMinus = 50,
TK_And = 14,
TK_Star = 13,
TK_And = 13,
TK_Star = 12,
TK_Plus = 47,
TK_Minus = 48,
TK_Tilde = 10,
TK_Bang = 58,
TK_Slash = 106,
TK_Percent = 107,
TK_RightShift = 100,
TK_LeftShift = 101,
TK_Bang = 57,
TK_Slash = 113,
TK_Percent = 114,
TK_RightShift = 88,
TK_LeftShift = 89,
TK_LT = 71,
TK_GT = 84,
TK_LE = 108,
TK_GE = 109,
TK_EQ = 110,
TK_NE = 111,
TK_Caret = 112,
TK_Or = 113,
TK_AndAnd = 114,
TK_GT = 78,
TK_LE = 102,
TK_GE = 103,
TK_EQ = 106,
TK_NE = 107,
TK_Caret = 108,
TK_Or = 109,
TK_AndAnd = 110,
TK_OrOr = 115,
TK_Question = 119,
TK_Colon = 83,
TK_Question = 116,
TK_Colon = 84,
TK_ColonColon = 6,
TK_DotDotDot = 102,
TK_DotDotDot = 104,
TK_Assign = 86,
TK_StarAssign = 120,
TK_SlashAssign = 121,
TK_PercentAssign = 122,
TK_PlusAssign = 123,
TK_MinusAssign = 124,
TK_RightShiftAssign = 125,
TK_LeftShiftAssign = 126,
TK_AndAssign = 127,
TK_CaretAssign = 128,
TK_OrAssign = 129,
TK_Comma = 79,
TK_RightBracket = 104,
TK_RightParen = 80,
TK_StarAssign = 117,
TK_SlashAssign = 118,
TK_PercentAssign = 119,
TK_PlusAssign = 120,
TK_MinusAssign = 121,
TK_RightShiftAssign = 122,
TK_LeftShiftAssign = 123,
TK_AndAssign = 124,
TK_CaretAssign = 125,
TK_OrAssign = 126,
TK_Comma = 73,
TK_RightBracket = 111,
TK_RightParen = 79,
TK_RightBrace = 87,
TK_SemiColon = 51,
TK_LeftBrace = 72,
TK_typeof = 32,
TK___alignof__ = 65,
TK_SemiColon = 65,
TK_LeftBrace = 75,
TK_typeof = 37,
TK___alignof__ = 64,
TK___attribute__ = 8,
TK___declspec = 9,
TK_MAX = 116,
TK_MIN = 117,
TK_MAX = 127,
TK_MIN = 128,
TK_vector = 3,
TK_pixel = 2,
TK__Decimal32 = 29,
TK__Decimal64 = 30,
TK__Decimal128 = 31,
TK___static_assert = 76,
TK_ERROR_TOKEN = 77,
TK___static_assert = 80,
TK_ERROR_TOKEN = 81,
TK_EOF_TOKEN = 135;
public final static String orderedTerminalSymbols[] = {
@ -166,9 +166,9 @@ public interface XlcCPPParsersym {
"__declspec",
"Tilde",
"operator",
"EndOfCompletion",
"Star",
"And",
"EndOfCompletion",
"bool",
"char",
"float",
@ -176,8 +176,8 @@ public interface XlcCPPParsersym {
"long",
"short",
"signed",
"typename",
"unsigned",
"typename",
"_Complex",
"_Imaginary",
"double",
@ -186,12 +186,12 @@ public interface XlcCPPParsersym {
"_Decimal32",
"_Decimal64",
"_Decimal128",
"typeof",
"const",
"volatile",
"restrict",
"static",
"virtual",
"typeof",
"auto",
"explicit",
"extern",
@ -205,7 +205,6 @@ public interface XlcCPPParsersym {
"Minus",
"PlusPlus",
"MinusMinus",
"SemiColon",
"false",
"this",
"true",
@ -220,28 +219,31 @@ public interface XlcCPPParsersym {
"static_cast",
"typeid",
"__alignof__",
"SemiColon",
"class",
"template",
"enum",
"struct",
"union",
"LT",
"LeftBrace",
"namespace",
"throw",
"using",
"__static_assert",
"ERROR_TOKEN",
"LeftBracket",
"Comma",
"throw",
"LeftBrace",
"namespace",
"using",
"GT",
"RightParen",
"__static_assert",
"ERROR_TOKEN",
"delete",
"new",
"Colon",
"GT",
"try",
"Assign",
"RightBrace",
"RightShift",
"LeftShift",
"while",
"break",
"case",
@ -254,25 +256,20 @@ public interface XlcCPPParsersym {
"if",
"return",
"switch",
"RightShift",
"LeftShift",
"DotDotDot",
"ArrowStar",
"RightBracket",
"DotStar",
"Slash",
"Percent",
"LE",
"GE",
"DotDotDot",
"ArrowStar",
"EQ",
"NE",
"Caret",
"Or",
"AndAnd",
"RightBracket",
"DotStar",
"Slash",
"Percent",
"OrOr",
"MAX",
"MIN",
"Arrow",
"Question",
"StarAssign",
"SlashAssign",
@ -284,6 +281,9 @@ public interface XlcCPPParsersym {
"AndAssign",
"CaretAssign",
"OrAssign",
"MAX",
"MIN",
"Arrow",
"catch",
"private",
"protected",