mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-05 07:15:39 +02:00
fix for bug 105334 for the LR parser
This commit is contained in:
parent
e098f7ccf6
commit
35ae8a7431
33 changed files with 12300 additions and 11947 deletions
|
@ -104,7 +104,7 @@ $End
|
||||||
|
|
||||||
$Globals
|
$Globals
|
||||||
/.
|
/.
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.c99.C99ASTNodeFactory;
|
import org.eclipse.cdt.internal.core.dom.parser.c.CNodeFactory;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.c99.C99BuildASTParserAction;
|
import org.eclipse.cdt.core.dom.lrparser.action.c99.C99BuildASTParserAction;
|
||||||
./
|
./
|
||||||
$End
|
$End
|
||||||
|
@ -113,7 +113,7 @@ $End
|
||||||
|
|
||||||
$Define
|
$Define
|
||||||
$build_action_class /. C99BuildASTParserAction ./
|
$build_action_class /. C99BuildASTParserAction ./
|
||||||
$node_factory_create_expression /. C99ASTNodeFactory.DEFAULT_INSTANCE ./
|
$node_factory_create_expression /. CNodeFactory.getDefault() ./
|
||||||
$End
|
$End
|
||||||
|
|
||||||
|
|
||||||
|
@ -397,9 +397,9 @@ statement
|
||||||
labeled_statement
|
labeled_statement
|
||||||
::= identifier_or_typedefname ':' statement
|
::= identifier_or_typedefname ':' statement
|
||||||
/. $Build consumeStatementLabeled(); $EndBuild ./
|
/. $Build consumeStatementLabeled(); $EndBuild ./
|
||||||
| 'case' constant_expression ':'
|
| 'case' constant_expression ':' statement
|
||||||
/. $Build consumeStatementCase(); $EndBuild ./
|
/. $Build consumeStatementCase(); $EndBuild ./
|
||||||
| 'default' ':'
|
| 'default' ':' statement
|
||||||
/. $Build consumeStatementDefault(); $EndBuild ./
|
/. $Build consumeStatementDefault(); $EndBuild ./
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ $Globals
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.ast.*;
|
import org.eclipse.cdt.core.dom.ast.*;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.*;
|
import org.eclipse.cdt.core.dom.ast.cpp.*;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.cpp.CPPASTNodeFactory;
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPNodeFactory;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.cpp.CPPBuildASTParserAction;
|
import org.eclipse.cdt.core.dom.lrparser.action.cpp.CPPBuildASTParserAction;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.IParser;
|
import org.eclipse.cdt.core.dom.lrparser.IParser;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
|
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
|
||||||
|
@ -139,7 +139,7 @@ $Define
|
||||||
|
|
||||||
$build_action_class /. CPPBuildASTParserAction ./
|
$build_action_class /. CPPBuildASTParserAction ./
|
||||||
$resolve_action_class /. C99TypedefTrackerParserAction ./
|
$resolve_action_class /. C99TypedefTrackerParserAction ./
|
||||||
$node_factory_create_expression /. CPPASTNodeFactory.DEFAULT_INSTANCE ./
|
$node_factory_create_expression /. CPPNodeFactory.getDefault() ./
|
||||||
|
|
||||||
$action_class /. CPPParserAction ./
|
$action_class /. CPPParserAction ./
|
||||||
$data_class /. Object ./ -- allow anything to be passed between actions
|
$data_class /. Object ./ -- allow anything to be passed between actions
|
||||||
|
@ -811,9 +811,9 @@ statement
|
||||||
labeled_statement
|
labeled_statement
|
||||||
::= identifier ':' statement
|
::= identifier ':' statement
|
||||||
/. $Build consumeStatementLabeled(); $EndBuild ./
|
/. $Build consumeStatementLabeled(); $EndBuild ./
|
||||||
| case constant_expression ':'
|
| 'case' constant_expression ':' statement
|
||||||
/. $Build consumeStatementCase(); $EndBuild ./
|
/. $Build consumeStatementCase(); $EndBuild ./
|
||||||
| default ':'
|
| 'default' ':' statement
|
||||||
/. $Build consumeStatementDefault(); $EndBuild ./
|
/. $Build consumeStatementDefault(); $EndBuild ./
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,8 @@ import org.eclipse.core.runtime.CoreException;
|
||||||
public abstract class BaseExtensibleLanguage extends AbstractLanguage {
|
public abstract class BaseExtensibleLanguage extends AbstractLanguage {
|
||||||
|
|
||||||
|
|
||||||
private static final boolean DEBUG_PRINT_GCC_AST = true;
|
private static final boolean DEBUG_PRINT_GCC_AST = false;
|
||||||
private static final boolean DEBUG_PRINT_AST = true;
|
private static final boolean DEBUG_PRINT_AST = false;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -48,7 +48,6 @@ import org.eclipse.cdt.core.dom.ast.IASTLabelStatement;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTLiteralExpression;
|
import org.eclipse.cdt.core.dom.ast.IASTLiteralExpression;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTNode;
|
import org.eclipse.cdt.core.dom.ast.IASTNode;
|
||||||
import org.eclipse.cdt.core.dom.ast.INodeFactory;
|
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTNullStatement;
|
import org.eclipse.cdt.core.dom.ast.IASTNullStatement;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
|
import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTPointerOperator;
|
import org.eclipse.cdt.core.dom.ast.IASTPointerOperator;
|
||||||
|
@ -63,6 +62,7 @@ import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTTypeId;
|
import org.eclipse.cdt.core.dom.ast.IASTTypeId;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTTypeIdExpression;
|
import org.eclipse.cdt.core.dom.ast.IASTTypeIdExpression;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
|
import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
|
||||||
|
import org.eclipse.cdt.core.dom.ast.INodeFactory;
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier.IASTEnumerator;
|
import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier.IASTEnumerator;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCastExpression;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCastExpression;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTLiteralExpression;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTLiteralExpression;
|
||||||
|
@ -806,12 +806,12 @@ public abstract class BuildASTParserAction {
|
||||||
* labeled_statement ::= label_identifier ':' statement
|
* labeled_statement ::= label_identifier ':' statement
|
||||||
* label_identifier ::= identifier
|
* label_identifier ::= identifier
|
||||||
*/
|
*/
|
||||||
public void consumeStatementLabeled(/*IBinding binding*/) {
|
public void consumeStatementLabeled() {
|
||||||
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
|
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
|
||||||
|
|
||||||
IASTStatement body = (IASTStatement) astStack.pop();
|
IASTStatement body = (IASTStatement) astStack.pop();
|
||||||
IASTName label = createName(parser.getLeftIToken());
|
IASTName label = createName(parser.getLeftIToken());
|
||||||
//label.setBinding(binding);
|
|
||||||
IASTLabelStatement stat = nodeFactory.newLabelStatement(label, body);
|
IASTLabelStatement stat = nodeFactory.newLabelStatement(label, body);
|
||||||
setOffsetAndLength(stat);
|
setOffsetAndLength(stat);
|
||||||
astStack.push(stat);
|
astStack.push(stat);
|
||||||
|
@ -821,29 +821,48 @@ public abstract class BuildASTParserAction {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* labeled_statement ::= case constant_expression ':'
|
* labeled_statement ::= 'case' constant_expression ':' statement
|
||||||
*/
|
*/
|
||||||
public void consumeStatementCase() {
|
public void consumeStatementCase() {
|
||||||
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
|
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
|
||||||
|
|
||||||
|
IASTStatement body = (IASTStatement) astStack.pop();
|
||||||
IASTExpression expr = (IASTExpression) astStack.pop();
|
IASTExpression expr = (IASTExpression) astStack.pop();
|
||||||
|
|
||||||
IASTCaseStatement caseStatement = nodeFactory.newCaseStatement(expr);
|
IASTCaseStatement caseStatement = nodeFactory.newCaseStatement(expr);
|
||||||
setOffsetAndLength(caseStatement);
|
setOffsetAndLength(caseStatement); // TODO this is wrong, need to adjust length to end of colon
|
||||||
astStack.push(caseStatement);
|
|
||||||
|
IASTCompoundStatement compound = nodeFactory.newCompoundStatement();
|
||||||
|
setOffsetAndLength(compound);
|
||||||
|
compound.addStatement(caseStatement);
|
||||||
|
compound.addStatement(body);
|
||||||
|
|
||||||
|
astStack.push(compound);
|
||||||
|
|
||||||
if(TRACE_AST_STACK) System.out.println(astStack);
|
if(TRACE_AST_STACK) System.out.println(astStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* labeled_statement ::= default ':'
|
* labeled_statement ::= 'default' ':' <openscope-ast> statement
|
||||||
*/
|
*/
|
||||||
public void consumeStatementDefault() {
|
public void consumeStatementDefault() {
|
||||||
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
|
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
|
||||||
|
|
||||||
|
IASTStatement body = (IASTStatement) astStack.pop();
|
||||||
|
|
||||||
IASTDefaultStatement stat = nodeFactory.newDefaultStatement();
|
IASTDefaultStatement stat = nodeFactory.newDefaultStatement();
|
||||||
setOffsetAndLength(stat);
|
List<IToken> tokens = parser.getRuleTokens();
|
||||||
astStack.push(stat);
|
IToken defaultToken = tokens.get(0);
|
||||||
|
IToken colonToken = tokens.get(1);
|
||||||
|
setOffsetAndLength(stat, offset(defaultToken), offset(colonToken) - offset(defaultToken) + 1);
|
||||||
|
|
||||||
|
IASTCompoundStatement compound = nodeFactory.newCompoundStatement();
|
||||||
|
setOffsetAndLength(compound);
|
||||||
|
compound.addStatement(stat);
|
||||||
|
compound.addStatement(body);
|
||||||
|
|
||||||
|
astStack.push(compound);
|
||||||
|
|
||||||
if(TRACE_AST_STACK) System.out.println(astStack);
|
if(TRACE_AST_STACK) System.out.println(astStack);
|
||||||
}
|
}
|
||||||
|
|
|
@ -711,7 +711,7 @@ public class C99BuildASTParserAction extends BuildASTParserAction {
|
||||||
public void consumeStatementSwitch() {
|
public void consumeStatementSwitch() {
|
||||||
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
|
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
|
||||||
|
|
||||||
IASTStatement body = (IASTStatement) astStack.pop();
|
IASTStatement body = (IASTStatement) astStack.pop();
|
||||||
IASTExpression expr = (IASTExpression) astStack.pop();
|
IASTExpression expr = (IASTExpression) astStack.pop();
|
||||||
IASTSwitchStatement stat = nodeFactory.newSwitchStatement(expr, body);
|
IASTSwitchStatement stat = nodeFactory.newSwitchStatement(expr, body);
|
||||||
setOffsetAndLength(stat);
|
setOffsetAndLength(stat);
|
||||||
|
|
|
@ -621,7 +621,7 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
|
||||||
public void consumeStatementSwitch() {
|
public void consumeStatementSwitch() {
|
||||||
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
|
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
|
||||||
|
|
||||||
IASTStatement body = (IASTStatement) astStack.pop();
|
IASTStatement body = (IASTStatement) astStack.pop();
|
||||||
|
|
||||||
Object condition = astStack.pop();
|
Object condition = astStack.pop();
|
||||||
|
|
||||||
|
@ -631,7 +631,6 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
|
||||||
else
|
else
|
||||||
stat = nodeFactory.newSwitchStatement((IASTDeclaration)condition, body);
|
stat = nodeFactory.newSwitchStatement((IASTDeclaration)condition, body);
|
||||||
|
|
||||||
|
|
||||||
setOffsetAndLength(stat);
|
setOffsetAndLength(stat);
|
||||||
astStack.push(stat);
|
astStack.push(stat);
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@ import org.eclipse.cdt.core.dom.lrparser.lpgextensions.FixedBacktrackingParser;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
|
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.c99.C99BuildASTParserAction;
|
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.c.CNodeFactory;
|
import org.eclipse.cdt.internal.core.dom.parser.c.CNodeFactory;
|
||||||
|
import org.eclipse.cdt.core.dom.lrparser.action.c99.C99BuildASTParserAction;
|
||||||
|
|
||||||
public class C99ExpressionParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
|
public class C99ExpressionParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
|
||||||
{
|
{
|
||||||
|
@ -595,13 +595,13 @@ public C99ExpressionParser(String[] mapFrom) { // constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rule 102: labeled_statement ::= case constant_expression :
|
// Rule 102: labeled_statement ::= case constant_expression : statement
|
||||||
//
|
//
|
||||||
case 102: { action. consumeStatementCase(); break;
|
case 102: { action. consumeStatementCase(); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rule 103: labeled_statement ::= default :
|
// Rule 103: labeled_statement ::= default : statement
|
||||||
//
|
//
|
||||||
case 103: { action. consumeStatementDefault(); break;
|
case 103: { action. consumeStatementDefault(); break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class C99ExpressionParserprs implements lpg.lpgjavaruntime.ParseTable, C9
|
||||||
3,1,5,1,3,3,3,3,3,3,
|
3,1,5,1,3,3,3,3,3,3,
|
||||||
3,3,3,3,3,1,1,2,1,0,
|
3,3,3,3,3,1,1,2,1,0,
|
||||||
1,3,1,1,1,1,1,1,1,1,
|
1,3,1,1,1,1,1,1,1,1,
|
||||||
3,3,2,2,4,1,2,1,1,1,
|
3,4,3,2,4,1,2,1,1,1,
|
||||||
2,5,7,5,1,0,7,5,9,8,
|
2,5,7,5,1,0,7,5,9,8,
|
||||||
3,2,2,2,3,2,4,2,2,2,
|
3,2,2,2,3,2,4,2,2,2,
|
||||||
2,2,1,1,1,1,2,1,2,2,
|
2,2,1,1,1,1,2,1,2,2,
|
||||||
|
|
|
@ -24,8 +24,8 @@ import org.eclipse.cdt.core.dom.lrparser.lpgextensions.FixedBacktrackingParser;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
|
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.c99.C99BuildASTParserAction;
|
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.c.CNodeFactory;
|
import org.eclipse.cdt.internal.core.dom.parser.c.CNodeFactory;
|
||||||
|
import org.eclipse.cdt.core.dom.lrparser.action.c99.C99BuildASTParserAction;
|
||||||
|
|
||||||
public class C99NoCastExpressionParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
|
public class C99NoCastExpressionParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
|
||||||
{
|
{
|
||||||
|
@ -589,13 +589,13 @@ public C99NoCastExpressionParser(String[] mapFrom) { // constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rule 101: labeled_statement ::= case constant_expression :
|
// Rule 101: labeled_statement ::= case constant_expression : statement
|
||||||
//
|
//
|
||||||
case 101: { action. consumeStatementCase(); break;
|
case 101: { action. consumeStatementCase(); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rule 102: labeled_statement ::= default :
|
// Rule 102: labeled_statement ::= default : statement
|
||||||
//
|
//
|
||||||
case 102: { action. consumeStatementDefault(); break;
|
case 102: { action. consumeStatementDefault(); break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class C99NoCastExpressionParserprs implements lpg.lpgjavaruntime.ParseTab
|
||||||
1,5,1,3,3,3,3,3,3,3,
|
1,5,1,3,3,3,3,3,3,3,
|
||||||
3,3,3,3,1,1,2,1,0,1,
|
3,3,3,3,1,1,2,1,0,1,
|
||||||
3,1,1,1,1,1,1,1,1,3,
|
3,1,1,1,1,1,1,1,1,3,
|
||||||
3,2,2,4,1,2,1,1,1,2,
|
4,3,2,4,1,2,1,1,1,2,
|
||||||
5,7,5,1,0,7,5,9,8,3,
|
5,7,5,1,0,7,5,9,8,3,
|
||||||
2,2,2,3,2,4,2,2,2,2,
|
2,2,2,3,2,4,2,2,2,2,
|
||||||
2,1,1,1,1,2,1,2,2,2,
|
2,1,1,1,1,2,1,2,2,2,
|
||||||
|
|
|
@ -24,8 +24,8 @@ import org.eclipse.cdt.core.dom.lrparser.lpgextensions.FixedBacktrackingParser;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
|
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.c99.C99BuildASTParserAction;
|
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.c.CNodeFactory;
|
import org.eclipse.cdt.internal.core.dom.parser.c.CNodeFactory;
|
||||||
|
import org.eclipse.cdt.core.dom.lrparser.action.c99.C99BuildASTParserAction;
|
||||||
|
|
||||||
public class C99Parser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
|
public class C99Parser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
|
||||||
{
|
{
|
||||||
|
@ -595,13 +595,13 @@ public C99Parser(String[] mapFrom) { // constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rule 102: labeled_statement ::= case constant_expression :
|
// Rule 102: labeled_statement ::= case constant_expression : statement
|
||||||
//
|
//
|
||||||
case 102: { action. consumeStatementCase(); break;
|
case 102: { action. consumeStatementCase(); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rule 103: labeled_statement ::= default :
|
// Rule 103: labeled_statement ::= default : statement
|
||||||
//
|
//
|
||||||
case 103: { action. consumeStatementDefault(); break;
|
case 103: { action. consumeStatementDefault(); break;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -16,42 +16,42 @@ package org.eclipse.cdt.internal.core.dom.lrparser.c99;
|
||||||
public interface C99Parsersym {
|
public interface C99Parsersym {
|
||||||
public final static int
|
public final static int
|
||||||
TK_auto = 24,
|
TK_auto = 24,
|
||||||
TK_break = 47,
|
TK_break = 43,
|
||||||
TK_case = 48,
|
TK_case = 44,
|
||||||
TK_char = 30,
|
TK_char = 30,
|
||||||
TK_const = 7,
|
TK_const = 10,
|
||||||
TK_continue = 49,
|
TK_continue = 45,
|
||||||
TK_default = 50,
|
TK_default = 46,
|
||||||
TK_do = 51,
|
TK_do = 47,
|
||||||
TK_double = 31,
|
TK_double = 31,
|
||||||
TK_else = 79,
|
TK_else = 79,
|
||||||
TK_enum = 42,
|
TK_enum = 48,
|
||||||
TK_extern = 25,
|
TK_extern = 25,
|
||||||
TK_float = 32,
|
TK_float = 32,
|
||||||
TK_for = 52,
|
TK_for = 49,
|
||||||
TK_goto = 53,
|
TK_goto = 50,
|
||||||
TK_if = 54,
|
TK_if = 51,
|
||||||
TK_inline = 26,
|
TK_inline = 26,
|
||||||
TK_int = 33,
|
TK_int = 33,
|
||||||
TK_long = 34,
|
TK_long = 34,
|
||||||
TK_register = 27,
|
TK_register = 27,
|
||||||
TK_restrict = 8,
|
TK_restrict = 11,
|
||||||
TK_return = 55,
|
TK_return = 52,
|
||||||
TK_short = 35,
|
TK_short = 35,
|
||||||
TK_signed = 36,
|
TK_signed = 36,
|
||||||
TK_sizeof = 15,
|
TK_sizeof = 15,
|
||||||
TK_static = 22,
|
TK_static = 23,
|
||||||
TK_struct = 43,
|
TK_struct = 53,
|
||||||
TK_switch = 56,
|
TK_switch = 54,
|
||||||
TK_typedef = 28,
|
TK_typedef = 28,
|
||||||
TK_union = 44,
|
TK_union = 55,
|
||||||
TK_unsigned = 37,
|
TK_unsigned = 37,
|
||||||
TK_void = 38,
|
TK_void = 38,
|
||||||
TK_volatile = 9,
|
TK_volatile = 12,
|
||||||
TK_while = 46,
|
TK_while = 39,
|
||||||
TK__Bool = 39,
|
TK__Bool = 40,
|
||||||
TK__Complex = 40,
|
TK__Complex = 41,
|
||||||
TK__Imaginary = 41,
|
TK__Imaginary = 42,
|
||||||
TK_integer = 16,
|
TK_integer = 16,
|
||||||
TK_floating = 17,
|
TK_floating = 17,
|
||||||
TK_charconst = 18,
|
TK_charconst = 18,
|
||||||
|
@ -60,17 +60,17 @@ public interface C99Parsersym {
|
||||||
TK_Completion = 4,
|
TK_Completion = 4,
|
||||||
TK_EndOfCompletion = 3,
|
TK_EndOfCompletion = 3,
|
||||||
TK_Invalid = 93,
|
TK_Invalid = 93,
|
||||||
TK_LeftBracket = 45,
|
TK_LeftBracket = 56,
|
||||||
TK_LeftParen = 2,
|
TK_LeftParen = 2,
|
||||||
TK_LeftBrace = 6,
|
TK_LeftBrace = 6,
|
||||||
TK_Dot = 66,
|
TK_Dot = 66,
|
||||||
TK_Arrow = 80,
|
TK_Arrow = 80,
|
||||||
TK_PlusPlus = 13,
|
TK_PlusPlus = 13,
|
||||||
TK_MinusMinus = 14,
|
TK_MinusMinus = 14,
|
||||||
TK_And = 12,
|
TK_And = 9,
|
||||||
TK_Star = 5,
|
TK_Star = 5,
|
||||||
TK_Plus = 10,
|
TK_Plus = 7,
|
||||||
TK_Minus = 11,
|
TK_Minus = 8,
|
||||||
TK_Tilde = 20,
|
TK_Tilde = 20,
|
||||||
TK_Bang = 21,
|
TK_Bang = 21,
|
||||||
TK_Slash = 67,
|
TK_Slash = 67,
|
||||||
|
@ -105,7 +105,7 @@ public interface C99Parsersym {
|
||||||
TK_RightBracket = 65,
|
TK_RightBracket = 65,
|
||||||
TK_RightParen = 59,
|
TK_RightParen = 59,
|
||||||
TK_RightBrace = 57,
|
TK_RightBrace = 57,
|
||||||
TK_SemiColon = 23,
|
TK_SemiColon = 22,
|
||||||
TK_ERROR_TOKEN = 29,
|
TK_ERROR_TOKEN = 29,
|
||||||
TK_EOF_TOKEN = 73;
|
TK_EOF_TOKEN = 73;
|
||||||
|
|
||||||
|
@ -117,12 +117,12 @@ public interface C99Parsersym {
|
||||||
"Completion",
|
"Completion",
|
||||||
"Star",
|
"Star",
|
||||||
"LeftBrace",
|
"LeftBrace",
|
||||||
"const",
|
|
||||||
"restrict",
|
|
||||||
"volatile",
|
|
||||||
"Plus",
|
"Plus",
|
||||||
"Minus",
|
"Minus",
|
||||||
"And",
|
"And",
|
||||||
|
"const",
|
||||||
|
"restrict",
|
||||||
|
"volatile",
|
||||||
"PlusPlus",
|
"PlusPlus",
|
||||||
"MinusMinus",
|
"MinusMinus",
|
||||||
"sizeof",
|
"sizeof",
|
||||||
|
@ -132,8 +132,8 @@ public interface C99Parsersym {
|
||||||
"stringlit",
|
"stringlit",
|
||||||
"Tilde",
|
"Tilde",
|
||||||
"Bang",
|
"Bang",
|
||||||
"static",
|
|
||||||
"SemiColon",
|
"SemiColon",
|
||||||
|
"static",
|
||||||
"auto",
|
"auto",
|
||||||
"extern",
|
"extern",
|
||||||
"inline",
|
"inline",
|
||||||
|
@ -149,24 +149,24 @@ public interface C99Parsersym {
|
||||||
"signed",
|
"signed",
|
||||||
"unsigned",
|
"unsigned",
|
||||||
"void",
|
"void",
|
||||||
|
"while",
|
||||||
"_Bool",
|
"_Bool",
|
||||||
"_Complex",
|
"_Complex",
|
||||||
"_Imaginary",
|
"_Imaginary",
|
||||||
"enum",
|
|
||||||
"struct",
|
|
||||||
"union",
|
|
||||||
"LeftBracket",
|
|
||||||
"while",
|
|
||||||
"break",
|
"break",
|
||||||
"case",
|
"case",
|
||||||
"continue",
|
"continue",
|
||||||
"default",
|
"default",
|
||||||
"do",
|
"do",
|
||||||
|
"enum",
|
||||||
"for",
|
"for",
|
||||||
"goto",
|
"goto",
|
||||||
"if",
|
"if",
|
||||||
"return",
|
"return",
|
||||||
|
"struct",
|
||||||
"switch",
|
"switch",
|
||||||
|
"union",
|
||||||
|
"LeftBracket",
|
||||||
"RightBrace",
|
"RightBrace",
|
||||||
"Comma",
|
"Comma",
|
||||||
"RightParen",
|
"RightParen",
|
||||||
|
|
|
@ -24,8 +24,8 @@ import org.eclipse.cdt.core.dom.lrparser.lpgextensions.FixedBacktrackingParser;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
|
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.c99.C99BuildASTParserAction;
|
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.c.CNodeFactory;
|
import org.eclipse.cdt.internal.core.dom.parser.c.CNodeFactory;
|
||||||
|
import org.eclipse.cdt.core.dom.lrparser.action.c99.C99BuildASTParserAction;
|
||||||
|
|
||||||
public class C99SizeofExpressionParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
|
public class C99SizeofExpressionParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
|
||||||
{
|
{
|
||||||
|
@ -589,13 +589,13 @@ public C99SizeofExpressionParser(String[] mapFrom) { // constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rule 101: labeled_statement ::= case constant_expression :
|
// Rule 101: labeled_statement ::= case constant_expression : statement
|
||||||
//
|
//
|
||||||
case 101: { action. consumeStatementCase(); break;
|
case 101: { action. consumeStatementCase(); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rule 102: labeled_statement ::= default :
|
// Rule 102: labeled_statement ::= default : statement
|
||||||
//
|
//
|
||||||
case 102: { action. consumeStatementDefault(); break;
|
case 102: { action. consumeStatementDefault(); break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class C99SizeofExpressionParserprs implements lpg.lpgjavaruntime.ParseTab
|
||||||
1,5,1,3,3,3,3,3,3,3,
|
1,5,1,3,3,3,3,3,3,3,
|
||||||
3,3,3,3,1,1,2,1,0,1,
|
3,3,3,3,1,1,2,1,0,1,
|
||||||
3,1,1,1,1,1,1,1,1,3,
|
3,1,1,1,1,1,1,1,1,3,
|
||||||
3,2,2,4,1,2,1,1,1,2,
|
4,3,2,4,1,2,1,1,1,2,
|
||||||
5,7,5,1,0,7,5,9,8,3,
|
5,7,5,1,0,7,5,9,8,3,
|
||||||
2,2,2,3,2,4,2,2,2,2,
|
2,2,2,3,2,4,2,2,2,2,
|
||||||
2,1,1,1,1,2,1,2,2,2,
|
2,1,1,1,1,2,1,2,2,2,
|
||||||
|
|
|
@ -19,6 +19,7 @@ import java.util.*;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.ast.*;
|
import org.eclipse.cdt.core.dom.ast.*;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.*;
|
import org.eclipse.cdt.core.dom.ast.cpp.*;
|
||||||
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPNodeFactory;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.cpp.CPPBuildASTParserAction;
|
import org.eclipse.cdt.core.dom.lrparser.action.cpp.CPPBuildASTParserAction;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.IParser;
|
import org.eclipse.cdt.core.dom.lrparser.IParser;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
|
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
|
||||||
|
@ -26,7 +27,6 @@ import org.eclipse.cdt.core.dom.lrparser.lpgextensions.FixedBacktrackingParser;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
|
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPNodeFactory;
|
|
||||||
|
|
||||||
public class CPPExpressionParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
|
public class CPPExpressionParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
|
||||||
{
|
{
|
||||||
|
@ -1065,14 +1065,14 @@ public CPPExpressionParser(String[] mapFrom) { // constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rule 185: labeled_statement ::= case constant_expression :
|
// Rule 185: labeled_statement ::= case constant_expression : statement
|
||||||
//
|
//
|
||||||
case 185: { action.builder.
|
case 185: { action.builder.
|
||||||
consumeStatementCase(); break;
|
consumeStatementCase(); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rule 186: labeled_statement ::= default :
|
// Rule 186: labeled_statement ::= default : statement
|
||||||
//
|
//
|
||||||
case 186: { action.builder.
|
case 186: { action.builder.
|
||||||
consumeStatementDefault(); break;
|
consumeStatementDefault(); break;
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -16,14 +16,14 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
|
||||||
public interface CPPExpressionParsersym {
|
public interface CPPExpressionParsersym {
|
||||||
public final static int
|
public final static int
|
||||||
TK_asm = 60,
|
TK_asm = 60,
|
||||||
TK_auto = 48,
|
TK_auto = 47,
|
||||||
TK_bool = 14,
|
TK_bool = 14,
|
||||||
TK_break = 77,
|
TK_break = 77,
|
||||||
TK_case = 78,
|
TK_case = 78,
|
||||||
TK_catch = 119,
|
TK_catch = 119,
|
||||||
TK_char = 15,
|
TK_char = 15,
|
||||||
TK_class = 61,
|
TK_class = 61,
|
||||||
TK_const = 46,
|
TK_const = 45,
|
||||||
TK_const_cast = 31,
|
TK_const_cast = 31,
|
||||||
TK_continue = 79,
|
TK_continue = 79,
|
||||||
TK_default = 80,
|
TK_default = 80,
|
||||||
|
@ -32,50 +32,50 @@ public interface CPPExpressionParsersym {
|
||||||
TK_double = 16,
|
TK_double = 16,
|
||||||
TK_dynamic_cast = 32,
|
TK_dynamic_cast = 32,
|
||||||
TK_else = 122,
|
TK_else = 122,
|
||||||
TK_enum = 69,
|
TK_enum = 66,
|
||||||
TK_explicit = 49,
|
TK_explicit = 48,
|
||||||
TK_export = 87,
|
TK_export = 87,
|
||||||
TK_extern = 17,
|
TK_extern = 17,
|
||||||
TK_false = 33,
|
TK_false = 33,
|
||||||
TK_float = 18,
|
TK_float = 18,
|
||||||
TK_for = 82,
|
TK_for = 82,
|
||||||
TK_friend = 50,
|
TK_friend = 49,
|
||||||
TK_goto = 83,
|
TK_goto = 83,
|
||||||
TK_if = 84,
|
TK_if = 84,
|
||||||
TK_inline = 51,
|
TK_inline = 50,
|
||||||
TK_int = 19,
|
TK_int = 19,
|
||||||
TK_long = 20,
|
TK_long = 20,
|
||||||
TK_mutable = 52,
|
TK_mutable = 51,
|
||||||
TK_namespace = 57,
|
TK_namespace = 56,
|
||||||
TK_new = 63,
|
TK_new = 63,
|
||||||
TK_operator = 7,
|
TK_operator = 7,
|
||||||
TK_private = 114,
|
TK_private = 114,
|
||||||
TK_protected = 115,
|
TK_protected = 115,
|
||||||
TK_public = 116,
|
TK_public = 116,
|
||||||
TK_register = 53,
|
TK_register = 52,
|
||||||
TK_reinterpret_cast = 34,
|
TK_reinterpret_cast = 34,
|
||||||
TK_return = 85,
|
TK_return = 85,
|
||||||
TK_short = 21,
|
TK_short = 21,
|
||||||
TK_signed = 22,
|
TK_signed = 22,
|
||||||
TK_sizeof = 35,
|
TK_sizeof = 35,
|
||||||
TK_static = 54,
|
TK_static = 53,
|
||||||
TK_static_cast = 36,
|
TK_static_cast = 36,
|
||||||
TK_struct = 70,
|
TK_struct = 67,
|
||||||
TK_switch = 86,
|
TK_switch = 86,
|
||||||
TK_template = 44,
|
TK_template = 54,
|
||||||
TK_this = 37,
|
TK_this = 37,
|
||||||
TK_throw = 58,
|
TK_throw = 57,
|
||||||
TK_try = 75,
|
TK_try = 75,
|
||||||
TK_true = 38,
|
TK_true = 38,
|
||||||
TK_typedef = 55,
|
TK_typedef = 55,
|
||||||
TK_typeid = 39,
|
TK_typeid = 39,
|
||||||
TK_typename = 10,
|
TK_typename = 10,
|
||||||
TK_union = 71,
|
TK_union = 68,
|
||||||
TK_unsigned = 23,
|
TK_unsigned = 23,
|
||||||
TK_using = 59,
|
TK_using = 58,
|
||||||
TK_virtual = 45,
|
TK_virtual = 44,
|
||||||
TK_void = 24,
|
TK_void = 24,
|
||||||
TK_volatile = 47,
|
TK_volatile = 46,
|
||||||
TK_wchar_t = 25,
|
TK_wchar_t = 25,
|
||||||
TK_while = 76,
|
TK_while = 76,
|
||||||
TK_integer = 40,
|
TK_integer = 40,
|
||||||
|
@ -86,7 +86,7 @@ public interface CPPExpressionParsersym {
|
||||||
TK_Completion = 2,
|
TK_Completion = 2,
|
||||||
TK_EndOfCompletion = 8,
|
TK_EndOfCompletion = 8,
|
||||||
TK_Invalid = 123,
|
TK_Invalid = 123,
|
||||||
TK_LeftBracket = 56,
|
TK_LeftBracket = 59,
|
||||||
TK_LeftParen = 3,
|
TK_LeftParen = 3,
|
||||||
TK_Dot = 120,
|
TK_Dot = 120,
|
||||||
TK_DotStar = 96,
|
TK_DotStar = 96,
|
||||||
|
@ -99,13 +99,13 @@ public interface CPPExpressionParsersym {
|
||||||
TK_Plus = 11,
|
TK_Plus = 11,
|
||||||
TK_Minus = 12,
|
TK_Minus = 12,
|
||||||
TK_Tilde = 5,
|
TK_Tilde = 5,
|
||||||
TK_Bang = 30,
|
TK_Bang = 29,
|
||||||
TK_Slash = 91,
|
TK_Slash = 91,
|
||||||
TK_Percent = 92,
|
TK_Percent = 92,
|
||||||
TK_RightShift = 88,
|
TK_RightShift = 88,
|
||||||
TK_LeftShift = 89,
|
TK_LeftShift = 89,
|
||||||
TK_LT = 29,
|
TK_LT = 30,
|
||||||
TK_GT = 64,
|
TK_GT = 65,
|
||||||
TK_LE = 93,
|
TK_LE = 93,
|
||||||
TK_GE = 94,
|
TK_GE = 94,
|
||||||
TK_EQ = 97,
|
TK_EQ = 97,
|
||||||
|
@ -115,10 +115,10 @@ public interface CPPExpressionParsersym {
|
||||||
TK_AndAnd = 101,
|
TK_AndAnd = 101,
|
||||||
TK_OrOr = 102,
|
TK_OrOr = 102,
|
||||||
TK_Question = 117,
|
TK_Question = 117,
|
||||||
TK_Colon = 72,
|
TK_Colon = 73,
|
||||||
TK_ColonColon = 4,
|
TK_ColonColon = 4,
|
||||||
TK_DotDotDot = 95,
|
TK_DotDotDot = 95,
|
||||||
TK_Assign = 67,
|
TK_Assign = 70,
|
||||||
TK_StarAssign = 104,
|
TK_StarAssign = 104,
|
||||||
TK_SlashAssign = 105,
|
TK_SlashAssign = 105,
|
||||||
TK_PercentAssign = 106,
|
TK_PercentAssign = 106,
|
||||||
|
@ -129,13 +129,13 @@ public interface CPPExpressionParsersym {
|
||||||
TK_AndAssign = 111,
|
TK_AndAssign = 111,
|
||||||
TK_CaretAssign = 112,
|
TK_CaretAssign = 112,
|
||||||
TK_OrAssign = 113,
|
TK_OrAssign = 113,
|
||||||
TK_Comma = 65,
|
TK_Comma = 69,
|
||||||
TK_RightBracket = 118,
|
TK_RightBracket = 118,
|
||||||
TK_RightParen = 73,
|
TK_RightParen = 74,
|
||||||
TK_RightBrace = 68,
|
TK_RightBrace = 71,
|
||||||
TK_SemiColon = 13,
|
TK_SemiColon = 13,
|
||||||
TK_LeftBrace = 66,
|
TK_LeftBrace = 64,
|
||||||
TK_ERROR_TOKEN = 74,
|
TK_ERROR_TOKEN = 72,
|
||||||
TK_0 = 43,
|
TK_0 = 43,
|
||||||
TK_EOF_TOKEN = 121;
|
TK_EOF_TOKEN = 121;
|
||||||
|
|
||||||
|
@ -169,8 +169,8 @@ public interface CPPExpressionParsersym {
|
||||||
"PlusPlus",
|
"PlusPlus",
|
||||||
"MinusMinus",
|
"MinusMinus",
|
||||||
"stringlit",
|
"stringlit",
|
||||||
"LT",
|
|
||||||
"Bang",
|
"Bang",
|
||||||
|
"LT",
|
||||||
"const_cast",
|
"const_cast",
|
||||||
"dynamic_cast",
|
"dynamic_cast",
|
||||||
"false",
|
"false",
|
||||||
|
@ -184,7 +184,6 @@ public interface CPPExpressionParsersym {
|
||||||
"floating",
|
"floating",
|
||||||
"charconst",
|
"charconst",
|
||||||
"0",
|
"0",
|
||||||
"template",
|
|
||||||
"virtual",
|
"virtual",
|
||||||
"const",
|
"const",
|
||||||
"volatile",
|
"volatile",
|
||||||
|
@ -195,26 +194,27 @@ public interface CPPExpressionParsersym {
|
||||||
"mutable",
|
"mutable",
|
||||||
"register",
|
"register",
|
||||||
"static",
|
"static",
|
||||||
|
"template",
|
||||||
"typedef",
|
"typedef",
|
||||||
"LeftBracket",
|
|
||||||
"namespace",
|
"namespace",
|
||||||
"throw",
|
"throw",
|
||||||
"using",
|
"using",
|
||||||
|
"LeftBracket",
|
||||||
"asm",
|
"asm",
|
||||||
"class",
|
"class",
|
||||||
"delete",
|
"delete",
|
||||||
"new",
|
"new",
|
||||||
"GT",
|
|
||||||
"Comma",
|
|
||||||
"LeftBrace",
|
"LeftBrace",
|
||||||
"Assign",
|
"GT",
|
||||||
"RightBrace",
|
|
||||||
"enum",
|
"enum",
|
||||||
"struct",
|
"struct",
|
||||||
"union",
|
"union",
|
||||||
|
"Comma",
|
||||||
|
"Assign",
|
||||||
|
"RightBrace",
|
||||||
|
"ERROR_TOKEN",
|
||||||
"Colon",
|
"Colon",
|
||||||
"RightParen",
|
"RightParen",
|
||||||
"ERROR_TOKEN",
|
|
||||||
"try",
|
"try",
|
||||||
"while",
|
"while",
|
||||||
"break",
|
"break",
|
||||||
|
|
|
@ -19,6 +19,7 @@ import java.util.*;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.ast.*;
|
import org.eclipse.cdt.core.dom.ast.*;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.*;
|
import org.eclipse.cdt.core.dom.ast.cpp.*;
|
||||||
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPNodeFactory;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.cpp.CPPBuildASTParserAction;
|
import org.eclipse.cdt.core.dom.lrparser.action.cpp.CPPBuildASTParserAction;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.IParser;
|
import org.eclipse.cdt.core.dom.lrparser.IParser;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
|
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
|
||||||
|
@ -26,7 +27,6 @@ import org.eclipse.cdt.core.dom.lrparser.lpgextensions.FixedBacktrackingParser;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
|
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPNodeFactory;
|
|
||||||
|
|
||||||
public class CPPNoCastExpressionParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
|
public class CPPNoCastExpressionParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
|
||||||
{
|
{
|
||||||
|
@ -1058,14 +1058,14 @@ public CPPNoCastExpressionParser(String[] mapFrom) { // constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rule 184: labeled_statement ::= case constant_expression :
|
// Rule 184: labeled_statement ::= case constant_expression : statement
|
||||||
//
|
//
|
||||||
case 184: { action.builder.
|
case 184: { action.builder.
|
||||||
consumeStatementCase(); break;
|
consumeStatementCase(); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rule 185: labeled_statement ::= default :
|
// Rule 185: labeled_statement ::= default : statement
|
||||||
//
|
//
|
||||||
case 185: { action.builder.
|
case 185: { action.builder.
|
||||||
consumeStatementDefault(); break;
|
consumeStatementDefault(); break;
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -16,14 +16,14 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
|
||||||
public interface CPPNoCastExpressionParsersym {
|
public interface CPPNoCastExpressionParsersym {
|
||||||
public final static int
|
public final static int
|
||||||
TK_asm = 60,
|
TK_asm = 60,
|
||||||
TK_auto = 48,
|
TK_auto = 47,
|
||||||
TK_bool = 14,
|
TK_bool = 14,
|
||||||
TK_break = 77,
|
TK_break = 77,
|
||||||
TK_case = 78,
|
TK_case = 78,
|
||||||
TK_catch = 119,
|
TK_catch = 119,
|
||||||
TK_char = 15,
|
TK_char = 15,
|
||||||
TK_class = 61,
|
TK_class = 61,
|
||||||
TK_const = 46,
|
TK_const = 45,
|
||||||
TK_const_cast = 31,
|
TK_const_cast = 31,
|
||||||
TK_continue = 79,
|
TK_continue = 79,
|
||||||
TK_default = 80,
|
TK_default = 80,
|
||||||
|
@ -32,50 +32,50 @@ public interface CPPNoCastExpressionParsersym {
|
||||||
TK_double = 16,
|
TK_double = 16,
|
||||||
TK_dynamic_cast = 32,
|
TK_dynamic_cast = 32,
|
||||||
TK_else = 122,
|
TK_else = 122,
|
||||||
TK_enum = 69,
|
TK_enum = 66,
|
||||||
TK_explicit = 49,
|
TK_explicit = 48,
|
||||||
TK_export = 87,
|
TK_export = 87,
|
||||||
TK_extern = 17,
|
TK_extern = 17,
|
||||||
TK_false = 33,
|
TK_false = 33,
|
||||||
TK_float = 18,
|
TK_float = 18,
|
||||||
TK_for = 82,
|
TK_for = 82,
|
||||||
TK_friend = 50,
|
TK_friend = 49,
|
||||||
TK_goto = 83,
|
TK_goto = 83,
|
||||||
TK_if = 84,
|
TK_if = 84,
|
||||||
TK_inline = 51,
|
TK_inline = 50,
|
||||||
TK_int = 19,
|
TK_int = 19,
|
||||||
TK_long = 20,
|
TK_long = 20,
|
||||||
TK_mutable = 52,
|
TK_mutable = 51,
|
||||||
TK_namespace = 57,
|
TK_namespace = 56,
|
||||||
TK_new = 63,
|
TK_new = 63,
|
||||||
TK_operator = 7,
|
TK_operator = 7,
|
||||||
TK_private = 114,
|
TK_private = 114,
|
||||||
TK_protected = 115,
|
TK_protected = 115,
|
||||||
TK_public = 116,
|
TK_public = 116,
|
||||||
TK_register = 53,
|
TK_register = 52,
|
||||||
TK_reinterpret_cast = 34,
|
TK_reinterpret_cast = 34,
|
||||||
TK_return = 85,
|
TK_return = 85,
|
||||||
TK_short = 21,
|
TK_short = 21,
|
||||||
TK_signed = 22,
|
TK_signed = 22,
|
||||||
TK_sizeof = 35,
|
TK_sizeof = 35,
|
||||||
TK_static = 54,
|
TK_static = 53,
|
||||||
TK_static_cast = 36,
|
TK_static_cast = 36,
|
||||||
TK_struct = 70,
|
TK_struct = 67,
|
||||||
TK_switch = 86,
|
TK_switch = 86,
|
||||||
TK_template = 44,
|
TK_template = 54,
|
||||||
TK_this = 37,
|
TK_this = 37,
|
||||||
TK_throw = 58,
|
TK_throw = 57,
|
||||||
TK_try = 75,
|
TK_try = 75,
|
||||||
TK_true = 38,
|
TK_true = 38,
|
||||||
TK_typedef = 55,
|
TK_typedef = 55,
|
||||||
TK_typeid = 39,
|
TK_typeid = 39,
|
||||||
TK_typename = 10,
|
TK_typename = 10,
|
||||||
TK_union = 71,
|
TK_union = 68,
|
||||||
TK_unsigned = 23,
|
TK_unsigned = 23,
|
||||||
TK_using = 59,
|
TK_using = 58,
|
||||||
TK_virtual = 45,
|
TK_virtual = 44,
|
||||||
TK_void = 24,
|
TK_void = 24,
|
||||||
TK_volatile = 47,
|
TK_volatile = 46,
|
||||||
TK_wchar_t = 25,
|
TK_wchar_t = 25,
|
||||||
TK_while = 76,
|
TK_while = 76,
|
||||||
TK_integer = 40,
|
TK_integer = 40,
|
||||||
|
@ -86,7 +86,7 @@ public interface CPPNoCastExpressionParsersym {
|
||||||
TK_Completion = 2,
|
TK_Completion = 2,
|
||||||
TK_EndOfCompletion = 8,
|
TK_EndOfCompletion = 8,
|
||||||
TK_Invalid = 123,
|
TK_Invalid = 123,
|
||||||
TK_LeftBracket = 56,
|
TK_LeftBracket = 59,
|
||||||
TK_LeftParen = 3,
|
TK_LeftParen = 3,
|
||||||
TK_Dot = 120,
|
TK_Dot = 120,
|
||||||
TK_DotStar = 96,
|
TK_DotStar = 96,
|
||||||
|
@ -99,13 +99,13 @@ public interface CPPNoCastExpressionParsersym {
|
||||||
TK_Plus = 11,
|
TK_Plus = 11,
|
||||||
TK_Minus = 12,
|
TK_Minus = 12,
|
||||||
TK_Tilde = 5,
|
TK_Tilde = 5,
|
||||||
TK_Bang = 30,
|
TK_Bang = 29,
|
||||||
TK_Slash = 91,
|
TK_Slash = 91,
|
||||||
TK_Percent = 92,
|
TK_Percent = 92,
|
||||||
TK_RightShift = 88,
|
TK_RightShift = 88,
|
||||||
TK_LeftShift = 89,
|
TK_LeftShift = 89,
|
||||||
TK_LT = 29,
|
TK_LT = 30,
|
||||||
TK_GT = 64,
|
TK_GT = 65,
|
||||||
TK_LE = 93,
|
TK_LE = 93,
|
||||||
TK_GE = 94,
|
TK_GE = 94,
|
||||||
TK_EQ = 97,
|
TK_EQ = 97,
|
||||||
|
@ -115,10 +115,10 @@ public interface CPPNoCastExpressionParsersym {
|
||||||
TK_AndAnd = 101,
|
TK_AndAnd = 101,
|
||||||
TK_OrOr = 102,
|
TK_OrOr = 102,
|
||||||
TK_Question = 117,
|
TK_Question = 117,
|
||||||
TK_Colon = 72,
|
TK_Colon = 73,
|
||||||
TK_ColonColon = 4,
|
TK_ColonColon = 4,
|
||||||
TK_DotDotDot = 95,
|
TK_DotDotDot = 95,
|
||||||
TK_Assign = 67,
|
TK_Assign = 70,
|
||||||
TK_StarAssign = 104,
|
TK_StarAssign = 104,
|
||||||
TK_SlashAssign = 105,
|
TK_SlashAssign = 105,
|
||||||
TK_PercentAssign = 106,
|
TK_PercentAssign = 106,
|
||||||
|
@ -129,13 +129,13 @@ public interface CPPNoCastExpressionParsersym {
|
||||||
TK_AndAssign = 111,
|
TK_AndAssign = 111,
|
||||||
TK_CaretAssign = 112,
|
TK_CaretAssign = 112,
|
||||||
TK_OrAssign = 113,
|
TK_OrAssign = 113,
|
||||||
TK_Comma = 65,
|
TK_Comma = 69,
|
||||||
TK_RightBracket = 118,
|
TK_RightBracket = 118,
|
||||||
TK_RightParen = 73,
|
TK_RightParen = 74,
|
||||||
TK_RightBrace = 68,
|
TK_RightBrace = 71,
|
||||||
TK_SemiColon = 13,
|
TK_SemiColon = 13,
|
||||||
TK_LeftBrace = 66,
|
TK_LeftBrace = 64,
|
||||||
TK_ERROR_TOKEN = 74,
|
TK_ERROR_TOKEN = 72,
|
||||||
TK_0 = 43,
|
TK_0 = 43,
|
||||||
TK_EOF_TOKEN = 121;
|
TK_EOF_TOKEN = 121;
|
||||||
|
|
||||||
|
@ -169,8 +169,8 @@ public interface CPPNoCastExpressionParsersym {
|
||||||
"PlusPlus",
|
"PlusPlus",
|
||||||
"MinusMinus",
|
"MinusMinus",
|
||||||
"stringlit",
|
"stringlit",
|
||||||
"LT",
|
|
||||||
"Bang",
|
"Bang",
|
||||||
|
"LT",
|
||||||
"const_cast",
|
"const_cast",
|
||||||
"dynamic_cast",
|
"dynamic_cast",
|
||||||
"false",
|
"false",
|
||||||
|
@ -184,7 +184,6 @@ public interface CPPNoCastExpressionParsersym {
|
||||||
"floating",
|
"floating",
|
||||||
"charconst",
|
"charconst",
|
||||||
"0",
|
"0",
|
||||||
"template",
|
|
||||||
"virtual",
|
"virtual",
|
||||||
"const",
|
"const",
|
||||||
"volatile",
|
"volatile",
|
||||||
|
@ -195,26 +194,27 @@ public interface CPPNoCastExpressionParsersym {
|
||||||
"mutable",
|
"mutable",
|
||||||
"register",
|
"register",
|
||||||
"static",
|
"static",
|
||||||
|
"template",
|
||||||
"typedef",
|
"typedef",
|
||||||
"LeftBracket",
|
|
||||||
"namespace",
|
"namespace",
|
||||||
"throw",
|
"throw",
|
||||||
"using",
|
"using",
|
||||||
|
"LeftBracket",
|
||||||
"asm",
|
"asm",
|
||||||
"class",
|
"class",
|
||||||
"delete",
|
"delete",
|
||||||
"new",
|
"new",
|
||||||
"GT",
|
|
||||||
"Comma",
|
|
||||||
"LeftBrace",
|
"LeftBrace",
|
||||||
"Assign",
|
"GT",
|
||||||
"RightBrace",
|
|
||||||
"enum",
|
"enum",
|
||||||
"struct",
|
"struct",
|
||||||
"union",
|
"union",
|
||||||
|
"Comma",
|
||||||
|
"Assign",
|
||||||
|
"RightBrace",
|
||||||
|
"ERROR_TOKEN",
|
||||||
"Colon",
|
"Colon",
|
||||||
"RightParen",
|
"RightParen",
|
||||||
"ERROR_TOKEN",
|
|
||||||
"try",
|
"try",
|
||||||
"while",
|
"while",
|
||||||
"break",
|
"break",
|
||||||
|
|
|
@ -19,6 +19,7 @@ import java.util.*;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.ast.*;
|
import org.eclipse.cdt.core.dom.ast.*;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.*;
|
import org.eclipse.cdt.core.dom.ast.cpp.*;
|
||||||
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPNodeFactory;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.cpp.CPPBuildASTParserAction;
|
import org.eclipse.cdt.core.dom.lrparser.action.cpp.CPPBuildASTParserAction;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.IParser;
|
import org.eclipse.cdt.core.dom.lrparser.IParser;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
|
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
|
||||||
|
@ -26,7 +27,6 @@ import org.eclipse.cdt.core.dom.lrparser.lpgextensions.FixedBacktrackingParser;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
|
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPNodeFactory;
|
|
||||||
|
|
||||||
public class CPPNoFunctionDeclaratorParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
|
public class CPPNoFunctionDeclaratorParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
|
||||||
{
|
{
|
||||||
|
@ -1065,14 +1065,14 @@ public CPPNoFunctionDeclaratorParser(String[] mapFrom) { // constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rule 185: labeled_statement ::= case constant_expression :
|
// Rule 185: labeled_statement ::= case constant_expression : statement
|
||||||
//
|
//
|
||||||
case 185: { action.builder.
|
case 185: { action.builder.
|
||||||
consumeStatementCase(); break;
|
consumeStatementCase(); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rule 186: labeled_statement ::= default :
|
// Rule 186: labeled_statement ::= default : statement
|
||||||
//
|
//
|
||||||
case 186: { action.builder.
|
case 186: { action.builder.
|
||||||
consumeStatementDefault(); break;
|
consumeStatementDefault(); break;
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -16,77 +16,77 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
|
||||||
public interface CPPNoFunctionDeclaratorParsersym {
|
public interface CPPNoFunctionDeclaratorParsersym {
|
||||||
public final static int
|
public final static int
|
||||||
TK_asm = 60,
|
TK_asm = 60,
|
||||||
TK_auto = 48,
|
TK_auto = 47,
|
||||||
TK_bool = 15,
|
TK_bool = 15,
|
||||||
TK_break = 77,
|
TK_break = 77,
|
||||||
TK_case = 78,
|
TK_case = 78,
|
||||||
TK_catch = 120,
|
TK_catch = 120,
|
||||||
TK_char = 16,
|
TK_char = 16,
|
||||||
TK_class = 61,
|
TK_class = 61,
|
||||||
TK_const = 46,
|
TK_const = 45,
|
||||||
TK_const_cast = 31,
|
TK_const_cast = 31,
|
||||||
TK_continue = 79,
|
TK_continue = 79,
|
||||||
TK_default = 80,
|
TK_default = 80,
|
||||||
TK_delete = 63,
|
TK_delete = 62,
|
||||||
TK_do = 81,
|
TK_do = 81,
|
||||||
TK_double = 17,
|
TK_double = 17,
|
||||||
TK_dynamic_cast = 32,
|
TK_dynamic_cast = 32,
|
||||||
TK_else = 122,
|
TK_else = 122,
|
||||||
TK_enum = 69,
|
TK_enum = 66,
|
||||||
TK_explicit = 49,
|
TK_explicit = 48,
|
||||||
TK_export = 87,
|
TK_export = 87,
|
||||||
TK_extern = 14,
|
TK_extern = 14,
|
||||||
TK_false = 33,
|
TK_false = 33,
|
||||||
TK_float = 18,
|
TK_float = 18,
|
||||||
TK_for = 82,
|
TK_for = 82,
|
||||||
TK_friend = 50,
|
TK_friend = 49,
|
||||||
TK_goto = 83,
|
TK_goto = 83,
|
||||||
TK_if = 84,
|
TK_if = 84,
|
||||||
TK_inline = 51,
|
TK_inline = 50,
|
||||||
TK_int = 19,
|
TK_int = 19,
|
||||||
TK_long = 20,
|
TK_long = 20,
|
||||||
TK_mutable = 52,
|
TK_mutable = 51,
|
||||||
TK_namespace = 57,
|
TK_namespace = 56,
|
||||||
TK_new = 64,
|
TK_new = 63,
|
||||||
TK_operator = 7,
|
TK_operator = 7,
|
||||||
TK_private = 114,
|
TK_private = 114,
|
||||||
TK_protected = 115,
|
TK_protected = 115,
|
||||||
TK_public = 116,
|
TK_public = 116,
|
||||||
TK_register = 53,
|
TK_register = 52,
|
||||||
TK_reinterpret_cast = 34,
|
TK_reinterpret_cast = 34,
|
||||||
TK_return = 85,
|
TK_return = 85,
|
||||||
TK_short = 21,
|
TK_short = 21,
|
||||||
TK_signed = 22,
|
TK_signed = 22,
|
||||||
TK_sizeof = 35,
|
TK_sizeof = 35,
|
||||||
TK_static = 54,
|
TK_static = 53,
|
||||||
TK_static_cast = 36,
|
TK_static_cast = 36,
|
||||||
TK_struct = 70,
|
TK_struct = 67,
|
||||||
TK_switch = 86,
|
TK_switch = 86,
|
||||||
TK_template = 37,
|
TK_template = 54,
|
||||||
TK_this = 38,
|
TK_this = 37,
|
||||||
TK_throw = 58,
|
TK_throw = 57,
|
||||||
TK_try = 75,
|
TK_try = 75,
|
||||||
TK_true = 39,
|
TK_true = 38,
|
||||||
TK_typedef = 55,
|
TK_typedef = 55,
|
||||||
TK_typeid = 40,
|
TK_typeid = 39,
|
||||||
TK_typename = 10,
|
TK_typename = 10,
|
||||||
TK_union = 71,
|
TK_union = 68,
|
||||||
TK_unsigned = 23,
|
TK_unsigned = 23,
|
||||||
TK_using = 59,
|
TK_using = 58,
|
||||||
TK_virtual = 41,
|
TK_virtual = 40,
|
||||||
TK_void = 24,
|
TK_void = 24,
|
||||||
TK_volatile = 47,
|
TK_volatile = 46,
|
||||||
TK_wchar_t = 25,
|
TK_wchar_t = 25,
|
||||||
TK_while = 76,
|
TK_while = 76,
|
||||||
TK_integer = 42,
|
TK_integer = 41,
|
||||||
TK_floating = 43,
|
TK_floating = 42,
|
||||||
TK_charconst = 44,
|
TK_charconst = 43,
|
||||||
TK_stringlit = 29,
|
TK_stringlit = 28,
|
||||||
TK_identifier = 1,
|
TK_identifier = 1,
|
||||||
TK_Completion = 2,
|
TK_Completion = 2,
|
||||||
TK_EndOfCompletion = 8,
|
TK_EndOfCompletion = 8,
|
||||||
TK_Invalid = 123,
|
TK_Invalid = 123,
|
||||||
TK_LeftBracket = 56,
|
TK_LeftBracket = 59,
|
||||||
TK_LeftParen = 3,
|
TK_LeftParen = 3,
|
||||||
TK_Dot = 121,
|
TK_Dot = 121,
|
||||||
TK_DotStar = 96,
|
TK_DotStar = 96,
|
||||||
|
@ -99,13 +99,13 @@ public interface CPPNoFunctionDeclaratorParsersym {
|
||||||
TK_Plus = 12,
|
TK_Plus = 12,
|
||||||
TK_Minus = 13,
|
TK_Minus = 13,
|
||||||
TK_Tilde = 5,
|
TK_Tilde = 5,
|
||||||
TK_Bang = 30,
|
TK_Bang = 29,
|
||||||
TK_Slash = 91,
|
TK_Slash = 91,
|
||||||
TK_Percent = 92,
|
TK_Percent = 92,
|
||||||
TK_RightShift = 88,
|
TK_RightShift = 88,
|
||||||
TK_LeftShift = 89,
|
TK_LeftShift = 89,
|
||||||
TK_LT = 28,
|
TK_LT = 30,
|
||||||
TK_GT = 62,
|
TK_GT = 65,
|
||||||
TK_LE = 93,
|
TK_LE = 93,
|
||||||
TK_GE = 94,
|
TK_GE = 94,
|
||||||
TK_EQ = 97,
|
TK_EQ = 97,
|
||||||
|
@ -115,10 +115,10 @@ public interface CPPNoFunctionDeclaratorParsersym {
|
||||||
TK_AndAnd = 101,
|
TK_AndAnd = 101,
|
||||||
TK_OrOr = 102,
|
TK_OrOr = 102,
|
||||||
TK_Question = 117,
|
TK_Question = 117,
|
||||||
TK_Colon = 72,
|
TK_Colon = 73,
|
||||||
TK_ColonColon = 4,
|
TK_ColonColon = 4,
|
||||||
TK_DotDotDot = 95,
|
TK_DotDotDot = 95,
|
||||||
TK_Assign = 67,
|
TK_Assign = 70,
|
||||||
TK_StarAssign = 104,
|
TK_StarAssign = 104,
|
||||||
TK_SlashAssign = 105,
|
TK_SlashAssign = 105,
|
||||||
TK_PercentAssign = 106,
|
TK_PercentAssign = 106,
|
||||||
|
@ -129,14 +129,14 @@ public interface CPPNoFunctionDeclaratorParsersym {
|
||||||
TK_AndAssign = 111,
|
TK_AndAssign = 111,
|
||||||
TK_CaretAssign = 112,
|
TK_CaretAssign = 112,
|
||||||
TK_OrAssign = 113,
|
TK_OrAssign = 113,
|
||||||
TK_Comma = 65,
|
TK_Comma = 69,
|
||||||
TK_RightBracket = 118,
|
TK_RightBracket = 118,
|
||||||
TK_RightParen = 73,
|
TK_RightParen = 74,
|
||||||
TK_RightBrace = 68,
|
TK_RightBrace = 71,
|
||||||
TK_SemiColon = 11,
|
TK_SemiColon = 11,
|
||||||
TK_LeftBrace = 66,
|
TK_LeftBrace = 64,
|
||||||
TK_ERROR_TOKEN = 74,
|
TK_ERROR_TOKEN = 72,
|
||||||
TK_0 = 45,
|
TK_0 = 44,
|
||||||
TK_EOF_TOKEN = 119;
|
TK_EOF_TOKEN = 119;
|
||||||
|
|
||||||
public final static String orderedTerminalSymbols[] = {
|
public final static String orderedTerminalSymbols[] = {
|
||||||
|
@ -168,16 +168,15 @@ public interface CPPNoFunctionDeclaratorParsersym {
|
||||||
"wchar_t",
|
"wchar_t",
|
||||||
"PlusPlus",
|
"PlusPlus",
|
||||||
"MinusMinus",
|
"MinusMinus",
|
||||||
"LT",
|
|
||||||
"stringlit",
|
"stringlit",
|
||||||
"Bang",
|
"Bang",
|
||||||
|
"LT",
|
||||||
"const_cast",
|
"const_cast",
|
||||||
"dynamic_cast",
|
"dynamic_cast",
|
||||||
"false",
|
"false",
|
||||||
"reinterpret_cast",
|
"reinterpret_cast",
|
||||||
"sizeof",
|
"sizeof",
|
||||||
"static_cast",
|
"static_cast",
|
||||||
"template",
|
|
||||||
"this",
|
"this",
|
||||||
"true",
|
"true",
|
||||||
"typeid",
|
"typeid",
|
||||||
|
@ -195,26 +194,27 @@ public interface CPPNoFunctionDeclaratorParsersym {
|
||||||
"mutable",
|
"mutable",
|
||||||
"register",
|
"register",
|
||||||
"static",
|
"static",
|
||||||
|
"template",
|
||||||
"typedef",
|
"typedef",
|
||||||
"LeftBracket",
|
|
||||||
"namespace",
|
"namespace",
|
||||||
"throw",
|
"throw",
|
||||||
"using",
|
"using",
|
||||||
|
"LeftBracket",
|
||||||
"asm",
|
"asm",
|
||||||
"class",
|
"class",
|
||||||
"GT",
|
|
||||||
"delete",
|
"delete",
|
||||||
"new",
|
"new",
|
||||||
"Comma",
|
|
||||||
"LeftBrace",
|
"LeftBrace",
|
||||||
"Assign",
|
"GT",
|
||||||
"RightBrace",
|
|
||||||
"enum",
|
"enum",
|
||||||
"struct",
|
"struct",
|
||||||
"union",
|
"union",
|
||||||
|
"Comma",
|
||||||
|
"Assign",
|
||||||
|
"RightBrace",
|
||||||
|
"ERROR_TOKEN",
|
||||||
"Colon",
|
"Colon",
|
||||||
"RightParen",
|
"RightParen",
|
||||||
"ERROR_TOKEN",
|
|
||||||
"try",
|
"try",
|
||||||
"while",
|
"while",
|
||||||
"break",
|
"break",
|
||||||
|
|
|
@ -19,6 +19,7 @@ import java.util.*;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.ast.*;
|
import org.eclipse.cdt.core.dom.ast.*;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.*;
|
import org.eclipse.cdt.core.dom.ast.cpp.*;
|
||||||
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPNodeFactory;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.cpp.CPPBuildASTParserAction;
|
import org.eclipse.cdt.core.dom.lrparser.action.cpp.CPPBuildASTParserAction;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.IParser;
|
import org.eclipse.cdt.core.dom.lrparser.IParser;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
|
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
|
||||||
|
@ -26,7 +27,6 @@ import org.eclipse.cdt.core.dom.lrparser.lpgextensions.FixedBacktrackingParser;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
|
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPNodeFactory;
|
|
||||||
|
|
||||||
public class CPPParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
|
public class CPPParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
|
||||||
{
|
{
|
||||||
|
@ -1065,14 +1065,14 @@ public CPPParser(String[] mapFrom) { // constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rule 185: labeled_statement ::= case constant_expression :
|
// Rule 185: labeled_statement ::= case constant_expression : statement
|
||||||
//
|
//
|
||||||
case 185: { action.builder.
|
case 185: { action.builder.
|
||||||
consumeStatementCase(); break;
|
consumeStatementCase(); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rule 186: labeled_statement ::= default :
|
// Rule 186: labeled_statement ::= default : statement
|
||||||
//
|
//
|
||||||
case 186: { action.builder.
|
case 186: { action.builder.
|
||||||
consumeStatementDefault(); break;
|
consumeStatementDefault(); break;
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -15,78 +15,78 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
|
||||||
|
|
||||||
public interface CPPParsersym {
|
public interface CPPParsersym {
|
||||||
public final static int
|
public final static int
|
||||||
TK_asm = 59,
|
TK_asm = 58,
|
||||||
TK_auto = 35,
|
TK_auto = 34,
|
||||||
TK_bool = 13,
|
TK_bool = 13,
|
||||||
TK_break = 78,
|
TK_break = 77,
|
||||||
TK_case = 79,
|
TK_case = 78,
|
||||||
TK_catch = 119,
|
TK_catch = 119,
|
||||||
TK_char = 14,
|
TK_char = 14,
|
||||||
TK_class = 60,
|
TK_class = 59,
|
||||||
TK_const = 33,
|
TK_const = 32,
|
||||||
TK_const_cast = 36,
|
TK_const_cast = 35,
|
||||||
TK_continue = 80,
|
TK_continue = 79,
|
||||||
TK_default = 81,
|
TK_default = 80,
|
||||||
TK_delete = 63,
|
TK_delete = 62,
|
||||||
TK_do = 82,
|
TK_do = 81,
|
||||||
TK_double = 15,
|
TK_double = 15,
|
||||||
TK_dynamic_cast = 37,
|
TK_dynamic_cast = 36,
|
||||||
TK_else = 122,
|
TK_else = 122,
|
||||||
TK_enum = 64,
|
TK_enum = 63,
|
||||||
TK_explicit = 38,
|
TK_explicit = 37,
|
||||||
TK_export = 75,
|
TK_export = 87,
|
||||||
TK_extern = 12,
|
TK_extern = 12,
|
||||||
TK_false = 39,
|
TK_false = 38,
|
||||||
TK_float = 16,
|
TK_float = 16,
|
||||||
TK_for = 83,
|
TK_for = 82,
|
||||||
TK_friend = 40,
|
TK_friend = 39,
|
||||||
TK_goto = 84,
|
TK_goto = 83,
|
||||||
TK_if = 85,
|
TK_if = 84,
|
||||||
TK_inline = 41,
|
TK_inline = 40,
|
||||||
TK_int = 17,
|
TK_int = 17,
|
||||||
TK_long = 18,
|
TK_long = 18,
|
||||||
TK_mutable = 42,
|
TK_mutable = 41,
|
||||||
TK_namespace = 56,
|
TK_namespace = 56,
|
||||||
TK_new = 65,
|
TK_new = 64,
|
||||||
TK_operator = 7,
|
TK_operator = 7,
|
||||||
TK_private = 114,
|
TK_private = 114,
|
||||||
TK_protected = 115,
|
TK_protected = 115,
|
||||||
TK_public = 116,
|
TK_public = 116,
|
||||||
TK_register = 43,
|
TK_register = 42,
|
||||||
TK_reinterpret_cast = 44,
|
TK_reinterpret_cast = 43,
|
||||||
TK_return = 86,
|
TK_return = 85,
|
||||||
TK_short = 19,
|
TK_short = 19,
|
||||||
TK_signed = 20,
|
TK_signed = 20,
|
||||||
TK_sizeof = 45,
|
TK_sizeof = 44,
|
||||||
TK_static = 46,
|
TK_static = 45,
|
||||||
TK_static_cast = 47,
|
TK_static_cast = 46,
|
||||||
TK_struct = 66,
|
TK_struct = 65,
|
||||||
TK_switch = 87,
|
TK_switch = 86,
|
||||||
TK_template = 30,
|
TK_template = 47,
|
||||||
TK_this = 48,
|
TK_this = 48,
|
||||||
TK_throw = 61,
|
TK_throw = 60,
|
||||||
TK_try = 76,
|
TK_try = 75,
|
||||||
TK_true = 49,
|
TK_true = 49,
|
||||||
TK_typedef = 50,
|
TK_typedef = 50,
|
||||||
TK_typeid = 51,
|
TK_typeid = 51,
|
||||||
TK_typename = 10,
|
TK_typename = 10,
|
||||||
TK_union = 67,
|
TK_union = 66,
|
||||||
TK_unsigned = 21,
|
TK_unsigned = 21,
|
||||||
TK_using = 57,
|
TK_using = 57,
|
||||||
TK_virtual = 31,
|
TK_virtual = 29,
|
||||||
TK_void = 22,
|
TK_void = 22,
|
||||||
TK_volatile = 34,
|
TK_volatile = 33,
|
||||||
TK_wchar_t = 23,
|
TK_wchar_t = 23,
|
||||||
TK_while = 77,
|
TK_while = 76,
|
||||||
TK_integer = 52,
|
TK_integer = 52,
|
||||||
TK_floating = 53,
|
TK_floating = 53,
|
||||||
TK_charconst = 54,
|
TK_charconst = 54,
|
||||||
TK_stringlit = 29,
|
TK_stringlit = 28,
|
||||||
TK_identifier = 1,
|
TK_identifier = 1,
|
||||||
TK_Completion = 2,
|
TK_Completion = 2,
|
||||||
TK_EndOfCompletion = 8,
|
TK_EndOfCompletion = 8,
|
||||||
TK_Invalid = 123,
|
TK_Invalid = 123,
|
||||||
TK_LeftBracket = 58,
|
TK_LeftBracket = 61,
|
||||||
TK_LeftParen = 3,
|
TK_LeftParen = 3,
|
||||||
TK_Dot = 120,
|
TK_Dot = 120,
|
||||||
TK_DotStar = 96,
|
TK_DotStar = 96,
|
||||||
|
@ -99,13 +99,13 @@ public interface CPPParsersym {
|
||||||
TK_Plus = 24,
|
TK_Plus = 24,
|
||||||
TK_Minus = 25,
|
TK_Minus = 25,
|
||||||
TK_Tilde = 5,
|
TK_Tilde = 5,
|
||||||
TK_Bang = 32,
|
TK_Bang = 30,
|
||||||
TK_Slash = 91,
|
TK_Slash = 91,
|
||||||
TK_Percent = 92,
|
TK_Percent = 92,
|
||||||
TK_RightShift = 88,
|
TK_RightShift = 88,
|
||||||
TK_LeftShift = 89,
|
TK_LeftShift = 89,
|
||||||
TK_LT = 28,
|
TK_LT = 31,
|
||||||
TK_GT = 62,
|
TK_GT = 68,
|
||||||
TK_LE = 93,
|
TK_LE = 93,
|
||||||
TK_GE = 94,
|
TK_GE = 94,
|
||||||
TK_EQ = 97,
|
TK_EQ = 97,
|
||||||
|
@ -115,7 +115,7 @@ public interface CPPParsersym {
|
||||||
TK_AndAnd = 101,
|
TK_AndAnd = 101,
|
||||||
TK_OrOr = 102,
|
TK_OrOr = 102,
|
||||||
TK_Question = 117,
|
TK_Question = 117,
|
||||||
TK_Colon = 72,
|
TK_Colon = 73,
|
||||||
TK_ColonColon = 4,
|
TK_ColonColon = 4,
|
||||||
TK_DotDotDot = 95,
|
TK_DotDotDot = 95,
|
||||||
TK_Assign = 70,
|
TK_Assign = 70,
|
||||||
|
@ -129,13 +129,13 @@ public interface CPPParsersym {
|
||||||
TK_AndAssign = 111,
|
TK_AndAssign = 111,
|
||||||
TK_CaretAssign = 112,
|
TK_CaretAssign = 112,
|
||||||
TK_OrAssign = 113,
|
TK_OrAssign = 113,
|
||||||
TK_Comma = 68,
|
TK_Comma = 69,
|
||||||
TK_RightBracket = 118,
|
TK_RightBracket = 118,
|
||||||
TK_RightParen = 73,
|
TK_RightParen = 74,
|
||||||
TK_RightBrace = 71,
|
TK_RightBrace = 71,
|
||||||
TK_SemiColon = 11,
|
TK_SemiColon = 11,
|
||||||
TK_LeftBrace = 69,
|
TK_LeftBrace = 67,
|
||||||
TK_ERROR_TOKEN = 74,
|
TK_ERROR_TOKEN = 72,
|
||||||
TK_0 = 55,
|
TK_0 = 55,
|
||||||
TK_EOF_TOKEN = 121;
|
TK_EOF_TOKEN = 121;
|
||||||
|
|
||||||
|
@ -168,11 +168,10 @@ public interface CPPParsersym {
|
||||||
"Minus",
|
"Minus",
|
||||||
"PlusPlus",
|
"PlusPlus",
|
||||||
"MinusMinus",
|
"MinusMinus",
|
||||||
"LT",
|
|
||||||
"stringlit",
|
"stringlit",
|
||||||
"template",
|
|
||||||
"virtual",
|
"virtual",
|
||||||
"Bang",
|
"Bang",
|
||||||
|
"LT",
|
||||||
"const",
|
"const",
|
||||||
"volatile",
|
"volatile",
|
||||||
"auto",
|
"auto",
|
||||||
|
@ -188,6 +187,7 @@ public interface CPPParsersym {
|
||||||
"sizeof",
|
"sizeof",
|
||||||
"static",
|
"static",
|
||||||
"static_cast",
|
"static_cast",
|
||||||
|
"template",
|
||||||
"this",
|
"this",
|
||||||
"true",
|
"true",
|
||||||
"typedef",
|
"typedef",
|
||||||
|
@ -198,24 +198,23 @@ public interface CPPParsersym {
|
||||||
"0",
|
"0",
|
||||||
"namespace",
|
"namespace",
|
||||||
"using",
|
"using",
|
||||||
"LeftBracket",
|
|
||||||
"asm",
|
"asm",
|
||||||
"class",
|
"class",
|
||||||
"throw",
|
"throw",
|
||||||
"GT",
|
"LeftBracket",
|
||||||
"delete",
|
"delete",
|
||||||
"enum",
|
"enum",
|
||||||
"new",
|
"new",
|
||||||
"struct",
|
"struct",
|
||||||
"union",
|
"union",
|
||||||
"Comma",
|
|
||||||
"LeftBrace",
|
"LeftBrace",
|
||||||
|
"GT",
|
||||||
|
"Comma",
|
||||||
"Assign",
|
"Assign",
|
||||||
"RightBrace",
|
"RightBrace",
|
||||||
|
"ERROR_TOKEN",
|
||||||
"Colon",
|
"Colon",
|
||||||
"RightParen",
|
"RightParen",
|
||||||
"ERROR_TOKEN",
|
|
||||||
"export",
|
|
||||||
"try",
|
"try",
|
||||||
"while",
|
"while",
|
||||||
"break",
|
"break",
|
||||||
|
@ -228,6 +227,7 @@ public interface CPPParsersym {
|
||||||
"if",
|
"if",
|
||||||
"return",
|
"return",
|
||||||
"switch",
|
"switch",
|
||||||
|
"export",
|
||||||
"RightShift",
|
"RightShift",
|
||||||
"LeftShift",
|
"LeftShift",
|
||||||
"ArrowStar",
|
"ArrowStar",
|
||||||
|
|
|
@ -19,6 +19,7 @@ import java.util.*;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.ast.*;
|
import org.eclipse.cdt.core.dom.ast.*;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.*;
|
import org.eclipse.cdt.core.dom.ast.cpp.*;
|
||||||
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPNodeFactory;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.cpp.CPPBuildASTParserAction;
|
import org.eclipse.cdt.core.dom.lrparser.action.cpp.CPPBuildASTParserAction;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.IParser;
|
import org.eclipse.cdt.core.dom.lrparser.IParser;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
|
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
|
||||||
|
@ -26,7 +27,6 @@ import org.eclipse.cdt.core.dom.lrparser.lpgextensions.FixedBacktrackingParser;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
|
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPNodeFactory;
|
|
||||||
|
|
||||||
public class CPPSizeofExpressionParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
|
public class CPPSizeofExpressionParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
|
||||||
{
|
{
|
||||||
|
@ -1051,14 +1051,14 @@ public CPPSizeofExpressionParser(String[] mapFrom) { // constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rule 183: labeled_statement ::= case constant_expression :
|
// Rule 183: labeled_statement ::= case constant_expression : statement
|
||||||
//
|
//
|
||||||
case 183: { action.builder.
|
case 183: { action.builder.
|
||||||
consumeStatementCase(); break;
|
consumeStatementCase(); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rule 184: labeled_statement ::= default :
|
// Rule 184: labeled_statement ::= default : statement
|
||||||
//
|
//
|
||||||
case 184: { action.builder.
|
case 184: { action.builder.
|
||||||
consumeStatementDefault(); break;
|
consumeStatementDefault(); break;
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -16,14 +16,14 @@ package org.eclipse.cdt.internal.core.dom.lrparser.cpp;
|
||||||
public interface CPPSizeofExpressionParsersym {
|
public interface CPPSizeofExpressionParsersym {
|
||||||
public final static int
|
public final static int
|
||||||
TK_asm = 60,
|
TK_asm = 60,
|
||||||
TK_auto = 48,
|
TK_auto = 47,
|
||||||
TK_bool = 14,
|
TK_bool = 14,
|
||||||
TK_break = 77,
|
TK_break = 77,
|
||||||
TK_case = 78,
|
TK_case = 78,
|
||||||
TK_catch = 119,
|
TK_catch = 119,
|
||||||
TK_char = 15,
|
TK_char = 15,
|
||||||
TK_class = 61,
|
TK_class = 61,
|
||||||
TK_const = 46,
|
TK_const = 45,
|
||||||
TK_const_cast = 31,
|
TK_const_cast = 31,
|
||||||
TK_continue = 79,
|
TK_continue = 79,
|
||||||
TK_default = 80,
|
TK_default = 80,
|
||||||
|
@ -32,50 +32,50 @@ public interface CPPSizeofExpressionParsersym {
|
||||||
TK_double = 16,
|
TK_double = 16,
|
||||||
TK_dynamic_cast = 32,
|
TK_dynamic_cast = 32,
|
||||||
TK_else = 122,
|
TK_else = 122,
|
||||||
TK_enum = 69,
|
TK_enum = 66,
|
||||||
TK_explicit = 49,
|
TK_explicit = 48,
|
||||||
TK_export = 87,
|
TK_export = 87,
|
||||||
TK_extern = 17,
|
TK_extern = 17,
|
||||||
TK_false = 33,
|
TK_false = 33,
|
||||||
TK_float = 18,
|
TK_float = 18,
|
||||||
TK_for = 82,
|
TK_for = 82,
|
||||||
TK_friend = 50,
|
TK_friend = 49,
|
||||||
TK_goto = 83,
|
TK_goto = 83,
|
||||||
TK_if = 84,
|
TK_if = 84,
|
||||||
TK_inline = 51,
|
TK_inline = 50,
|
||||||
TK_int = 19,
|
TK_int = 19,
|
||||||
TK_long = 20,
|
TK_long = 20,
|
||||||
TK_mutable = 52,
|
TK_mutable = 51,
|
||||||
TK_namespace = 57,
|
TK_namespace = 56,
|
||||||
TK_new = 63,
|
TK_new = 63,
|
||||||
TK_operator = 7,
|
TK_operator = 7,
|
||||||
TK_private = 114,
|
TK_private = 114,
|
||||||
TK_protected = 115,
|
TK_protected = 115,
|
||||||
TK_public = 116,
|
TK_public = 116,
|
||||||
TK_register = 53,
|
TK_register = 52,
|
||||||
TK_reinterpret_cast = 34,
|
TK_reinterpret_cast = 34,
|
||||||
TK_return = 85,
|
TK_return = 85,
|
||||||
TK_short = 21,
|
TK_short = 21,
|
||||||
TK_signed = 22,
|
TK_signed = 22,
|
||||||
TK_sizeof = 35,
|
TK_sizeof = 35,
|
||||||
TK_static = 54,
|
TK_static = 53,
|
||||||
TK_static_cast = 36,
|
TK_static_cast = 36,
|
||||||
TK_struct = 70,
|
TK_struct = 67,
|
||||||
TK_switch = 86,
|
TK_switch = 86,
|
||||||
TK_template = 44,
|
TK_template = 54,
|
||||||
TK_this = 37,
|
TK_this = 37,
|
||||||
TK_throw = 58,
|
TK_throw = 57,
|
||||||
TK_try = 75,
|
TK_try = 75,
|
||||||
TK_true = 38,
|
TK_true = 38,
|
||||||
TK_typedef = 55,
|
TK_typedef = 55,
|
||||||
TK_typeid = 39,
|
TK_typeid = 39,
|
||||||
TK_typename = 10,
|
TK_typename = 10,
|
||||||
TK_union = 71,
|
TK_union = 68,
|
||||||
TK_unsigned = 23,
|
TK_unsigned = 23,
|
||||||
TK_using = 59,
|
TK_using = 58,
|
||||||
TK_virtual = 45,
|
TK_virtual = 44,
|
||||||
TK_void = 24,
|
TK_void = 24,
|
||||||
TK_volatile = 47,
|
TK_volatile = 46,
|
||||||
TK_wchar_t = 25,
|
TK_wchar_t = 25,
|
||||||
TK_while = 76,
|
TK_while = 76,
|
||||||
TK_integer = 40,
|
TK_integer = 40,
|
||||||
|
@ -86,7 +86,7 @@ public interface CPPSizeofExpressionParsersym {
|
||||||
TK_Completion = 2,
|
TK_Completion = 2,
|
||||||
TK_EndOfCompletion = 8,
|
TK_EndOfCompletion = 8,
|
||||||
TK_Invalid = 123,
|
TK_Invalid = 123,
|
||||||
TK_LeftBracket = 56,
|
TK_LeftBracket = 59,
|
||||||
TK_LeftParen = 3,
|
TK_LeftParen = 3,
|
||||||
TK_Dot = 120,
|
TK_Dot = 120,
|
||||||
TK_DotStar = 96,
|
TK_DotStar = 96,
|
||||||
|
@ -99,13 +99,13 @@ public interface CPPSizeofExpressionParsersym {
|
||||||
TK_Plus = 11,
|
TK_Plus = 11,
|
||||||
TK_Minus = 12,
|
TK_Minus = 12,
|
||||||
TK_Tilde = 5,
|
TK_Tilde = 5,
|
||||||
TK_Bang = 30,
|
TK_Bang = 29,
|
||||||
TK_Slash = 91,
|
TK_Slash = 91,
|
||||||
TK_Percent = 92,
|
TK_Percent = 92,
|
||||||
TK_RightShift = 88,
|
TK_RightShift = 88,
|
||||||
TK_LeftShift = 89,
|
TK_LeftShift = 89,
|
||||||
TK_LT = 29,
|
TK_LT = 30,
|
||||||
TK_GT = 64,
|
TK_GT = 65,
|
||||||
TK_LE = 93,
|
TK_LE = 93,
|
||||||
TK_GE = 94,
|
TK_GE = 94,
|
||||||
TK_EQ = 97,
|
TK_EQ = 97,
|
||||||
|
@ -115,10 +115,10 @@ public interface CPPSizeofExpressionParsersym {
|
||||||
TK_AndAnd = 101,
|
TK_AndAnd = 101,
|
||||||
TK_OrOr = 102,
|
TK_OrOr = 102,
|
||||||
TK_Question = 117,
|
TK_Question = 117,
|
||||||
TK_Colon = 72,
|
TK_Colon = 73,
|
||||||
TK_ColonColon = 4,
|
TK_ColonColon = 4,
|
||||||
TK_DotDotDot = 95,
|
TK_DotDotDot = 95,
|
||||||
TK_Assign = 67,
|
TK_Assign = 70,
|
||||||
TK_StarAssign = 104,
|
TK_StarAssign = 104,
|
||||||
TK_SlashAssign = 105,
|
TK_SlashAssign = 105,
|
||||||
TK_PercentAssign = 106,
|
TK_PercentAssign = 106,
|
||||||
|
@ -129,13 +129,13 @@ public interface CPPSizeofExpressionParsersym {
|
||||||
TK_AndAssign = 111,
|
TK_AndAssign = 111,
|
||||||
TK_CaretAssign = 112,
|
TK_CaretAssign = 112,
|
||||||
TK_OrAssign = 113,
|
TK_OrAssign = 113,
|
||||||
TK_Comma = 65,
|
TK_Comma = 69,
|
||||||
TK_RightBracket = 118,
|
TK_RightBracket = 118,
|
||||||
TK_RightParen = 73,
|
TK_RightParen = 74,
|
||||||
TK_RightBrace = 68,
|
TK_RightBrace = 71,
|
||||||
TK_SemiColon = 13,
|
TK_SemiColon = 13,
|
||||||
TK_LeftBrace = 66,
|
TK_LeftBrace = 64,
|
||||||
TK_ERROR_TOKEN = 74,
|
TK_ERROR_TOKEN = 72,
|
||||||
TK_0 = 43,
|
TK_0 = 43,
|
||||||
TK_EOF_TOKEN = 121;
|
TK_EOF_TOKEN = 121;
|
||||||
|
|
||||||
|
@ -169,8 +169,8 @@ public interface CPPSizeofExpressionParsersym {
|
||||||
"PlusPlus",
|
"PlusPlus",
|
||||||
"MinusMinus",
|
"MinusMinus",
|
||||||
"stringlit",
|
"stringlit",
|
||||||
"LT",
|
|
||||||
"Bang",
|
"Bang",
|
||||||
|
"LT",
|
||||||
"const_cast",
|
"const_cast",
|
||||||
"dynamic_cast",
|
"dynamic_cast",
|
||||||
"false",
|
"false",
|
||||||
|
@ -184,7 +184,6 @@ public interface CPPSizeofExpressionParsersym {
|
||||||
"floating",
|
"floating",
|
||||||
"charconst",
|
"charconst",
|
||||||
"0",
|
"0",
|
||||||
"template",
|
|
||||||
"virtual",
|
"virtual",
|
||||||
"const",
|
"const",
|
||||||
"volatile",
|
"volatile",
|
||||||
|
@ -195,26 +194,27 @@ public interface CPPSizeofExpressionParsersym {
|
||||||
"mutable",
|
"mutable",
|
||||||
"register",
|
"register",
|
||||||
"static",
|
"static",
|
||||||
|
"template",
|
||||||
"typedef",
|
"typedef",
|
||||||
"LeftBracket",
|
|
||||||
"namespace",
|
"namespace",
|
||||||
"throw",
|
"throw",
|
||||||
"using",
|
"using",
|
||||||
|
"LeftBracket",
|
||||||
"asm",
|
"asm",
|
||||||
"class",
|
"class",
|
||||||
"delete",
|
"delete",
|
||||||
"new",
|
"new",
|
||||||
"GT",
|
|
||||||
"Comma",
|
|
||||||
"LeftBrace",
|
"LeftBrace",
|
||||||
"Assign",
|
"GT",
|
||||||
"RightBrace",
|
|
||||||
"enum",
|
"enum",
|
||||||
"struct",
|
"struct",
|
||||||
"union",
|
"union",
|
||||||
|
"Comma",
|
||||||
|
"Assign",
|
||||||
|
"RightBrace",
|
||||||
|
"ERROR_TOKEN",
|
||||||
"Colon",
|
"Colon",
|
||||||
"RightParen",
|
"RightParen",
|
||||||
"ERROR_TOKEN",
|
|
||||||
"try",
|
"try",
|
||||||
"while",
|
"while",
|
||||||
"break",
|
"break",
|
||||||
|
|
|
@ -19,6 +19,7 @@ import java.util.*;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.ast.*;
|
import org.eclipse.cdt.core.dom.ast.*;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.*;
|
import org.eclipse.cdt.core.dom.ast.cpp.*;
|
||||||
|
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPNodeFactory;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.cpp.CPPBuildASTParserAction;
|
import org.eclipse.cdt.core.dom.lrparser.action.cpp.CPPBuildASTParserAction;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.IParser;
|
import org.eclipse.cdt.core.dom.lrparser.IParser;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
|
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
|
||||||
|
@ -26,7 +27,6 @@ import org.eclipse.cdt.core.dom.lrparser.lpgextensions.FixedBacktrackingParser;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
||||||
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
|
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPNodeFactory;
|
|
||||||
|
|
||||||
public class CPPTemplateTypeParameterParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
|
public class CPPTemplateTypeParameterParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser
|
||||||
{
|
{
|
||||||
|
@ -1065,14 +1065,14 @@ public CPPTemplateTypeParameterParser(String[] mapFrom) { // constructor
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rule 185: labeled_statement ::= case constant_expression :
|
// Rule 185: labeled_statement ::= case constant_expression : statement
|
||||||
//
|
//
|
||||||
case 185: { action.builder.
|
case 185: { action.builder.
|
||||||
consumeStatementCase(); break;
|
consumeStatementCase(); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Rule 186: labeled_statement ::= default :
|
// Rule 186: labeled_statement ::= default : statement
|
||||||
//
|
//
|
||||||
case 186: { action.builder.
|
case 186: { action.builder.
|
||||||
consumeStatementDefault(); break;
|
consumeStatementDefault(); break;
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -23,20 +23,20 @@ public interface CPPTemplateTypeParameterParsersym {
|
||||||
TK_catch = 119,
|
TK_catch = 119,
|
||||||
TK_char = 16,
|
TK_char = 16,
|
||||||
TK_class = 60,
|
TK_class = 60,
|
||||||
TK_const = 46,
|
TK_const = 45,
|
||||||
TK_const_cast = 32,
|
TK_const_cast = 31,
|
||||||
TK_continue = 79,
|
TK_continue = 79,
|
||||||
TK_default = 80,
|
TK_default = 80,
|
||||||
TK_delete = 63,
|
TK_delete = 62,
|
||||||
TK_do = 81,
|
TK_do = 81,
|
||||||
TK_double = 17,
|
TK_double = 17,
|
||||||
TK_dynamic_cast = 33,
|
TK_dynamic_cast = 32,
|
||||||
TK_else = 122,
|
TK_else = 122,
|
||||||
TK_enum = 69,
|
TK_enum = 66,
|
||||||
TK_explicit = 49,
|
TK_explicit = 49,
|
||||||
TK_export = 87,
|
TK_export = 87,
|
||||||
TK_extern = 14,
|
TK_extern = 14,
|
||||||
TK_false = 34,
|
TK_false = 33,
|
||||||
TK_float = 18,
|
TK_float = 18,
|
||||||
TK_for = 82,
|
TK_for = 82,
|
||||||
TK_friend = 50,
|
TK_friend = 50,
|
||||||
|
@ -46,47 +46,47 @@ public interface CPPTemplateTypeParameterParsersym {
|
||||||
TK_int = 19,
|
TK_int = 19,
|
||||||
TK_long = 20,
|
TK_long = 20,
|
||||||
TK_mutable = 52,
|
TK_mutable = 52,
|
||||||
TK_namespace = 57,
|
TK_namespace = 56,
|
||||||
TK_new = 64,
|
TK_new = 63,
|
||||||
TK_operator = 8,
|
TK_operator = 8,
|
||||||
TK_private = 114,
|
TK_private = 114,
|
||||||
TK_protected = 115,
|
TK_protected = 115,
|
||||||
TK_public = 116,
|
TK_public = 116,
|
||||||
TK_register = 53,
|
TK_register = 53,
|
||||||
TK_reinterpret_cast = 35,
|
TK_reinterpret_cast = 34,
|
||||||
TK_return = 85,
|
TK_return = 85,
|
||||||
TK_short = 21,
|
TK_short = 21,
|
||||||
TK_signed = 22,
|
TK_signed = 22,
|
||||||
TK_sizeof = 36,
|
TK_sizeof = 35,
|
||||||
TK_static = 54,
|
TK_static = 54,
|
||||||
TK_static_cast = 37,
|
TK_static_cast = 36,
|
||||||
TK_struct = 70,
|
TK_struct = 67,
|
||||||
TK_switch = 86,
|
TK_switch = 86,
|
||||||
TK_template = 31,
|
TK_template = 46,
|
||||||
TK_this = 38,
|
TK_this = 37,
|
||||||
TK_throw = 58,
|
TK_throw = 57,
|
||||||
TK_try = 75,
|
TK_try = 75,
|
||||||
TK_true = 39,
|
TK_true = 38,
|
||||||
TK_typedef = 55,
|
TK_typedef = 55,
|
||||||
TK_typeid = 40,
|
TK_typeid = 39,
|
||||||
TK_typename = 10,
|
TK_typename = 10,
|
||||||
TK_union = 71,
|
TK_union = 68,
|
||||||
TK_unsigned = 23,
|
TK_unsigned = 23,
|
||||||
TK_using = 59,
|
TK_using = 58,
|
||||||
TK_virtual = 41,
|
TK_virtual = 40,
|
||||||
TK_void = 24,
|
TK_void = 24,
|
||||||
TK_volatile = 47,
|
TK_volatile = 47,
|
||||||
TK_wchar_t = 25,
|
TK_wchar_t = 25,
|
||||||
TK_while = 76,
|
TK_while = 76,
|
||||||
TK_integer = 42,
|
TK_integer = 41,
|
||||||
TK_floating = 43,
|
TK_floating = 42,
|
||||||
TK_charconst = 44,
|
TK_charconst = 43,
|
||||||
TK_stringlit = 29,
|
TK_stringlit = 28,
|
||||||
TK_identifier = 1,
|
TK_identifier = 1,
|
||||||
TK_Completion = 2,
|
TK_Completion = 2,
|
||||||
TK_EndOfCompletion = 7,
|
TK_EndOfCompletion = 7,
|
||||||
TK_Invalid = 123,
|
TK_Invalid = 123,
|
||||||
TK_LeftBracket = 56,
|
TK_LeftBracket = 59,
|
||||||
TK_LeftParen = 3,
|
TK_LeftParen = 3,
|
||||||
TK_Dot = 120,
|
TK_Dot = 120,
|
||||||
TK_DotStar = 96,
|
TK_DotStar = 96,
|
||||||
|
@ -99,13 +99,13 @@ public interface CPPTemplateTypeParameterParsersym {
|
||||||
TK_Plus = 12,
|
TK_Plus = 12,
|
||||||
TK_Minus = 13,
|
TK_Minus = 13,
|
||||||
TK_Tilde = 5,
|
TK_Tilde = 5,
|
||||||
TK_Bang = 30,
|
TK_Bang = 29,
|
||||||
TK_Slash = 91,
|
TK_Slash = 91,
|
||||||
TK_Percent = 92,
|
TK_Percent = 92,
|
||||||
TK_RightShift = 88,
|
TK_RightShift = 88,
|
||||||
TK_LeftShift = 89,
|
TK_LeftShift = 89,
|
||||||
TK_LT = 28,
|
TK_LT = 30,
|
||||||
TK_GT = 62,
|
TK_GT = 65,
|
||||||
TK_LE = 93,
|
TK_LE = 93,
|
||||||
TK_GE = 94,
|
TK_GE = 94,
|
||||||
TK_EQ = 97,
|
TK_EQ = 97,
|
||||||
|
@ -115,10 +115,10 @@ public interface CPPTemplateTypeParameterParsersym {
|
||||||
TK_AndAnd = 101,
|
TK_AndAnd = 101,
|
||||||
TK_OrOr = 102,
|
TK_OrOr = 102,
|
||||||
TK_Question = 117,
|
TK_Question = 117,
|
||||||
TK_Colon = 72,
|
TK_Colon = 73,
|
||||||
TK_ColonColon = 4,
|
TK_ColonColon = 4,
|
||||||
TK_DotDotDot = 95,
|
TK_DotDotDot = 95,
|
||||||
TK_Assign = 67,
|
TK_Assign = 70,
|
||||||
TK_StarAssign = 104,
|
TK_StarAssign = 104,
|
||||||
TK_SlashAssign = 105,
|
TK_SlashAssign = 105,
|
||||||
TK_PercentAssign = 106,
|
TK_PercentAssign = 106,
|
||||||
|
@ -129,14 +129,14 @@ public interface CPPTemplateTypeParameterParsersym {
|
||||||
TK_AndAssign = 111,
|
TK_AndAssign = 111,
|
||||||
TK_CaretAssign = 112,
|
TK_CaretAssign = 112,
|
||||||
TK_OrAssign = 113,
|
TK_OrAssign = 113,
|
||||||
TK_Comma = 65,
|
TK_Comma = 69,
|
||||||
TK_RightBracket = 118,
|
TK_RightBracket = 118,
|
||||||
TK_RightParen = 73,
|
TK_RightParen = 74,
|
||||||
TK_RightBrace = 68,
|
TK_RightBrace = 71,
|
||||||
TK_SemiColon = 11,
|
TK_SemiColon = 11,
|
||||||
TK_LeftBrace = 66,
|
TK_LeftBrace = 64,
|
||||||
TK_ERROR_TOKEN = 74,
|
TK_ERROR_TOKEN = 72,
|
||||||
TK_0 = 45,
|
TK_0 = 44,
|
||||||
TK_EOF_TOKEN = 121;
|
TK_EOF_TOKEN = 121;
|
||||||
|
|
||||||
public final static String orderedTerminalSymbols[] = {
|
public final static String orderedTerminalSymbols[] = {
|
||||||
|
@ -168,10 +168,9 @@ public interface CPPTemplateTypeParameterParsersym {
|
||||||
"wchar_t",
|
"wchar_t",
|
||||||
"PlusPlus",
|
"PlusPlus",
|
||||||
"MinusMinus",
|
"MinusMinus",
|
||||||
"LT",
|
|
||||||
"stringlit",
|
"stringlit",
|
||||||
"Bang",
|
"Bang",
|
||||||
"template",
|
"LT",
|
||||||
"const_cast",
|
"const_cast",
|
||||||
"dynamic_cast",
|
"dynamic_cast",
|
||||||
"false",
|
"false",
|
||||||
|
@ -187,6 +186,7 @@ public interface CPPTemplateTypeParameterParsersym {
|
||||||
"charconst",
|
"charconst",
|
||||||
"0",
|
"0",
|
||||||
"const",
|
"const",
|
||||||
|
"template",
|
||||||
"volatile",
|
"volatile",
|
||||||
"auto",
|
"auto",
|
||||||
"explicit",
|
"explicit",
|
||||||
|
@ -196,25 +196,25 @@ public interface CPPTemplateTypeParameterParsersym {
|
||||||
"register",
|
"register",
|
||||||
"static",
|
"static",
|
||||||
"typedef",
|
"typedef",
|
||||||
"LeftBracket",
|
|
||||||
"namespace",
|
"namespace",
|
||||||
"throw",
|
"throw",
|
||||||
"using",
|
"using",
|
||||||
|
"LeftBracket",
|
||||||
"class",
|
"class",
|
||||||
"asm",
|
"asm",
|
||||||
"GT",
|
|
||||||
"delete",
|
"delete",
|
||||||
"new",
|
"new",
|
||||||
"Comma",
|
|
||||||
"LeftBrace",
|
"LeftBrace",
|
||||||
"Assign",
|
"GT",
|
||||||
"RightBrace",
|
|
||||||
"enum",
|
"enum",
|
||||||
"struct",
|
"struct",
|
||||||
"union",
|
"union",
|
||||||
|
"Comma",
|
||||||
|
"Assign",
|
||||||
|
"RightBrace",
|
||||||
|
"ERROR_TOKEN",
|
||||||
"Colon",
|
"Colon",
|
||||||
"RightParen",
|
"RightParen",
|
||||||
"ERROR_TOKEN",
|
|
||||||
"try",
|
"try",
|
||||||
"while",
|
"while",
|
||||||
"break",
|
"break",
|
||||||
|
|
Loading…
Add table
Reference in a new issue