Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Kucera2008-04-03 19:03:02 +0000
committerMike Kucera2008-04-03 19:03:02 +0000
commit28fc06fe7b2c27def870e8849e5cbb641b9ef47c (patch)
treefa03116824929d2fb00a60729292da28c507dbf7 /lrparser
parenta8a0150712c6df4f332b1d60dc9524433709e0fe (diff)
downloadorg.eclipse.cdt-28fc06fe7b2c27def870e8849e5cbb641b9ef47c.tar.gz
org.eclipse.cdt-28fc06fe7b2c27def870e8849e5cbb641b9ef47c.tar.xz
org.eclipse.cdt-28fc06fe7b2c27def870e8849e5cbb641b9ef47c.zip
implicit int now works a lot better (static var;) ,fixed but with globally qualified ids not resolving properly
Diffstat (limited to 'lrparser')
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/c99/C99SpecTests.java28
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/grammar/cpp/CPPGrammar.g14
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/BuildASTParserAction.java6
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/CPPBuildASTParserAction.java67
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPExpressionStatementParser.java14
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoCastExpressionParser.java14
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoFunctionDeclaratorParser.java14
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPParser.java14
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPSizeofExpressionParser.java14
9 files changed, 100 insertions, 85 deletions
diff --git a/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/c99/C99SpecTests.java b/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/c99/C99SpecTests.java
index e45cbb8cbac..c782f91f485 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/c99/C99SpecTests.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/c99/C99SpecTests.java
@@ -183,20 +183,30 @@ public class C99SpecTests extends AST2CSpecTest {
}
+// @Override
+// public void test6_7_8s24() throws Exception { // complex isn't declared as a typedef
+// try {
+// super.test6_7_8s24();
+// fail();
+// } catch(AssertionFailedError _) { }
+// }
+//
+//
+// @Override
+// public void test6_7_8s34() throws Exception { // div_t isn't declared as a typedef
+// try {
+// super.test6_7_8s34();
+// fail();
+// } catch(AssertionFailedError _) { }
+// }
+
@Override
- public void test6_7_8s24() throws Exception { // complex isn't declared as a typedef
+ public void test6_7_2_1s17() throws Exception { // what the heck is offsetof
try {
- super.test6_7_8s24();
+ super.test6_7_2_1s17();
fail();
} catch(AssertionFailedError _) { }
}
- @Override
- public void test6_7_8s34() throws Exception { // div_t isn't declared as a typedef
- try {
- super.test6_7_8s34();
- fail();
- } catch(AssertionFailedError _) { }
- }
}
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/grammar/cpp/CPPGrammar.g b/lrparser/org.eclipse.cdt.core.lrparser/grammar/cpp/CPPGrammar.g
index 92566041278..97464decc44 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/grammar/cpp/CPPGrammar.g
+++ b/lrparser/org.eclipse.cdt.core.lrparser/grammar/cpp/CPPGrammar.g
@@ -964,12 +964,12 @@ declaration_seq_opt
simple_declaration
::= declaration_specifiers_opt <openscope-ast> init_declarator_list_opt ';'
- /. $Build consumeDeclarationSimple(true, true); $EndBuild ./
+ /. $Build consumeDeclarationSimple(true); $EndBuild ./
simple_declaration_with_declspec
::= declaration_specifiers <openscope-ast> init_declarator_list_opt ';'
- /. $Build consumeDeclarationSimple(true, false); $EndBuild ./
+ /. $Build consumeDeclarationSimple(true); $EndBuild ./
-- declaration specifier nodes not created here, they are created by sub-rules
@@ -1567,9 +1567,9 @@ visibility_label
member_declaration
::= declaration_specifiers_opt <openscope-ast> member_declarator_list ';'
- /. $Build consumeDeclarationSimple(true, true); $EndBuild ./
+ /. $Build consumeDeclarationSimple(true); $EndBuild ./
| declaration_specifiers_opt ';'
- /. $Build consumeDeclarationSimple(false, false); $EndBuild ./
+ /. $Build consumeDeclarationSimple(false); $EndBuild ./
| function_definition ';'
| function_definition
| dcolon_opt nested_name_specifier template_opt unqualified_id_name ';'
@@ -1828,11 +1828,11 @@ handler
-- open a scope just so that we can reuse consumeDeclarationSimple()
exception_declaration
::= type_specifier_seq <openscope-ast> declarator
- /. $Build consumeDeclarationSimple(true, false); $EndBuild ./
+ /. $Build consumeDeclarationSimple(true); $EndBuild ./
| type_specifier_seq <openscope-ast> abstract_declarator -- TODO might need to be abstract_declarator_without_function, might be too lenient, what exactly can you catch?
- /. $Build consumeDeclarationSimple(true, false); $EndBuild ./
+ /. $Build consumeDeclarationSimple(true); $EndBuild ./
| type_specifier_seq
- /. $Build consumeDeclarationSimple(false, false); $EndBuild ./
+ /. $Build consumeDeclarationSimple(false); $EndBuild ./
-- puts type ids on the stack
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/BuildASTParserAction.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/BuildASTParserAction.java
index a3c8ee900ca..48fc7563829 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/BuildASTParserAction.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/BuildASTParserAction.java
@@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.cdt.core.dom.lrparser.action;
-import java.util.Collections;
import java.util.List;
import lpg.lpgjavaruntime.IToken;
@@ -38,7 +37,6 @@ import org.eclipse.cdt.core.dom.ast.IASTExpression;
import org.eclipse.cdt.core.dom.ast.IASTExpressionList;
import org.eclipse.cdt.core.dom.ast.IASTExpressionStatement;
import org.eclipse.cdt.core.dom.ast.IASTFieldDeclarator;
-import org.eclipse.cdt.core.dom.ast.IASTForStatement;
import org.eclipse.cdt.core.dom.ast.IASTFunctionCallExpression;
import org.eclipse.cdt.core.dom.ast.IASTFunctionDeclarator;
import org.eclipse.cdt.core.dom.ast.IASTGotoStatement;
@@ -70,8 +68,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTLiteralExpression;
import org.eclipse.cdt.core.dom.lrparser.IParser;
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
import org.eclipse.cdt.core.parser.util.DebugUtil;
-import org.eclipse.cdt.internal.core.dom.lrparser.c99.C99Parsersym;
-import org.eclipse.cdt.internal.core.dom.lrparser.cpp.CPPParsersym;
import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
@@ -617,6 +613,8 @@ public abstract class BuildASTParserAction {
public void consumeExpressionName() {
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
+ System.out.println("Exression name: " + parser.getRuleTokens());
+
IASTName name = (IASTName) astStack.pop();
IASTIdExpression expr = nodeFactory.newIdExpression(name);
setOffsetAndLength(expr);
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/CPPBuildASTParserAction.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/CPPBuildASTParserAction.java
index 3380267b31a..f729e69bb38 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/CPPBuildASTParserAction.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/action/cpp/CPPBuildASTParserAction.java
@@ -490,17 +490,19 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
* | '::' operator_function_id
* | '::' template_id
*/
- public void consumeGlobalQualifiedId() {
+ @SuppressWarnings("restriction")
+ public void consumeGlobalQualifiedId() {
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
-
+
IASTName name = (IASTName) astStack.pop();
ICPPASTQualifiedName qualifiedName = nodeFactory.newCPPQualifiedName();
qualifiedName.addName(name);
qualifiedName.setFullyQualified(true);
+ ((CPPASTQualifiedName)qualifiedName).setSignature("::" + name.toString()); //$NON-NLS-1$
setOffsetAndLength(qualifiedName);
- astStack.push(name);
+ astStack.push(qualifiedName);
if(TRACE_AST_STACK) System.out.println(astStack);
}
@@ -741,7 +743,7 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
private IASTName createQualifiedName(LinkedList<IASTName> names, int startOffset, int endOffset, boolean startsWithColonColon, boolean endsWithColonColon) {
if(!endsWithColonColon && !startsWithColonColon && names.size() == 1)
return names.getFirst(); // its actually an unqualified name
-
+
ICPPASTQualifiedName qualifiedName = nodeFactory.newCPPQualifiedName();
qualifiedName.setFullyQualified(startsWithColonColon);
setOffsetAndLength(qualifiedName, startOffset, endOffset - startOffset);
@@ -1182,21 +1184,46 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
*
* TODO: remove attemptAmbiguityResolution parameter
*/
- public void consumeDeclarationSimple(boolean hasDeclaratorList, boolean attemptAmbiguityResolution) {
+ public void consumeDeclarationSimple(boolean hasDeclaratorList) {
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
- List<Object> declarators = (hasDeclaratorList) ? astStack.closeScope() : Collections.emptyList();
+ List<Object> declarators = hasDeclaratorList ? astStack.closeScope() : Collections.emptyList();
IASTDeclSpecifier declSpecifier = (IASTDeclSpecifier) astStack.pop(); // may be null
+ List<IToken> ruleTokens = parser.getRuleTokens();
// do not generate nodes for extra EOC tokens
- if(matchTokens(parser.getRuleTokens(), CPPParsersym.TK_EndOfCompletion))
+ if(matchTokens(ruleTokens, CPPParsersym.TK_EndOfCompletion)) {
return;
-
+ }
if(declSpecifier == null) { // can happen if implicit int is used
declSpecifier = nodeFactory.newSimpleDeclSpecifier();
setOffsetAndLength(declSpecifier, parser.getLeftIToken().getStartOffset(), 0);
}
+
+ // bug 80171, check for situation similar to: static var;
+ // this will get parsed wrong, the following is a hack to rebuild the AST as it should have been parsed
+ IToken nameToken = null;
+ if(declarators.isEmpty() &&
+ declSpecifier instanceof ICPPASTNamedTypeSpecifier &&
+ ruleTokens.size() >= 2 &&
+ (nameToken = ruleTokens.get(ruleTokens.size() - 2)).getKind() == TK_identifier) {
+
+ declSpecifier = nodeFactory.newSimpleDeclSpecifier();
+ for(IToken t : ruleTokens.subList(0, ruleTokens.size()-1))
+ setSpecifier((ICPPASTDeclSpecifier)declSpecifier, t);
+
+ int offset = offset(parser.getLeftIToken());
+ int length = endOffset(ruleTokens.get(ruleTokens.size()-2)) - offset;
+ setOffsetAndLength(declSpecifier, offset, length);
+
+ IASTName name = createName(nameToken);
+ IASTDeclarator declarator = nodeFactory.newDeclarator(name);
+ setOffsetAndLength(declarator, nameToken);
+ declarators.add(declarator);
+ }
+
+
IASTSimpleDeclaration declaration = nodeFactory.newSimpleDeclaration(declSpecifier);
setOffsetAndLength(declaration);
for(Object declarator : declarators)
@@ -1204,32 +1231,12 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
astStack.push(declaration);
-// IASTNode alternateDeclaration = null;
-// if(attemptAmbiguityResolution) {// && hasConstructorInitializer(declaration)) { // try to resolve the constructor initializer ambiguity
-// // TODO should this ambiguity be resolved here, or at the level of individual declarators?
-// IParser alternateParser = new CPPNoConstructorInitializerParser(parser.getOrderedTerminalSymbols());
-// alternateDeclaration = runSecondaryParser(alternateParser);
-// }
-//
-// if(alternateDeclaration == null || alternateDeclaration instanceof IASTProblemDeclaration)
-// astStack.push(declaration);
-// else {
-// System.out.println("Ambiguous Declaration in my parser!");
-//// ASTPrinter.print(declaration);
-//// System.out.println();
-//// ASTPrinter.print(alternateDeclaration);
-//// System.out.println();
-//
-// IASTNode ambiguityNode = nodeFactory.newAmbiguousDeclaration((IASTDeclaration)alternateDeclaration, declaration);
-// setOffsetAndLength(ambiguityNode);
-// astStack.push(ambiguityNode);
-// }
-//
-
if(TRACE_AST_STACK) System.out.println(astStack);
}
+
+
public void consumeInitDeclaratorComplete() {
if(TRACE_ACTIONS) DebugUtil.printMethodTrace();
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPExpressionStatementParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPExpressionStatementParser.java
index 967aeadb713..e88690461d3 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPExpressionStatementParser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPExpressionStatementParser.java
@@ -1242,14 +1242,14 @@ public CPPExpressionStatementParser(String[] mapFrom) { // constructor
// Rule 226: simple_declaration ::= declaration_specifiers_opt <openscope-ast> init_declarator_list_opt ;
//
case 226: { action.builder.
- consumeDeclarationSimple(true, true); break;
+ consumeDeclarationSimple(true); break;
}
//
// Rule 227: simple_declaration_with_declspec ::= declaration_specifiers <openscope-ast> init_declarator_list_opt ;
//
case 227: { action.builder.
- consumeDeclarationSimple(true, false); break;
+ consumeDeclarationSimple(true); break;
}
//
@@ -1956,14 +1956,14 @@ public CPPExpressionStatementParser(String[] mapFrom) { // constructor
// Rule 400: member_declaration ::= declaration_specifiers_opt <openscope-ast> member_declarator_list ;
//
case 400: { action.builder.
- consumeDeclarationSimple(true, true); break;
+ consumeDeclarationSimple(true); break;
}
//
// Rule 401: member_declaration ::= declaration_specifiers_opt ;
//
case 401: { action.builder.
- consumeDeclarationSimple(false, false); break;
+ consumeDeclarationSimple(false); break;
}
//
@@ -2243,21 +2243,21 @@ public CPPExpressionStatementParser(String[] mapFrom) { // constructor
// Rule 520: exception_declaration ::= type_specifier_seq <openscope-ast> declarator
//
case 520: { action.builder.
- consumeDeclarationSimple(true, false); break;
+ consumeDeclarationSimple(true); break;
}
//
// Rule 521: exception_declaration ::= type_specifier_seq <openscope-ast> abstract_declarator
//
case 521: { action.builder.
- consumeDeclarationSimple(true, false); break;
+ consumeDeclarationSimple(true); break;
}
//
// Rule 522: exception_declaration ::= type_specifier_seq
//
case 522: { action.builder.
- consumeDeclarationSimple(false, false); break;
+ consumeDeclarationSimple(false); break;
}
//
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoCastExpressionParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoCastExpressionParser.java
index eec73693722..d62b7a6504c 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoCastExpressionParser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoCastExpressionParser.java
@@ -1235,14 +1235,14 @@ public CPPNoCastExpressionParser(String[] mapFrom) { // constructor
// Rule 225: simple_declaration ::= declaration_specifiers_opt <openscope-ast> init_declarator_list_opt ;
//
case 225: { action.builder.
- consumeDeclarationSimple(true, true); break;
+ consumeDeclarationSimple(true); break;
}
//
// Rule 226: simple_declaration_with_declspec ::= declaration_specifiers <openscope-ast> init_declarator_list_opt ;
//
case 226: { action.builder.
- consumeDeclarationSimple(true, false); break;
+ consumeDeclarationSimple(true); break;
}
//
@@ -1949,14 +1949,14 @@ public CPPNoCastExpressionParser(String[] mapFrom) { // constructor
// Rule 399: member_declaration ::= declaration_specifiers_opt <openscope-ast> member_declarator_list ;
//
case 399: { action.builder.
- consumeDeclarationSimple(true, true); break;
+ consumeDeclarationSimple(true); break;
}
//
// Rule 400: member_declaration ::= declaration_specifiers_opt ;
//
case 400: { action.builder.
- consumeDeclarationSimple(false, false); break;
+ consumeDeclarationSimple(false); break;
}
//
@@ -2236,21 +2236,21 @@ public CPPNoCastExpressionParser(String[] mapFrom) { // constructor
// Rule 519: exception_declaration ::= type_specifier_seq <openscope-ast> declarator
//
case 519: { action.builder.
- consumeDeclarationSimple(true, false); break;
+ consumeDeclarationSimple(true); break;
}
//
// Rule 520: exception_declaration ::= type_specifier_seq <openscope-ast> abstract_declarator
//
case 520: { action.builder.
- consumeDeclarationSimple(true, false); break;
+ consumeDeclarationSimple(true); break;
}
//
// Rule 521: exception_declaration ::= type_specifier_seq
//
case 521: { action.builder.
- consumeDeclarationSimple(false, false); break;
+ consumeDeclarationSimple(false); break;
}
//
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoFunctionDeclaratorParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoFunctionDeclaratorParser.java
index b23f1676cfa..33ccb783f6a 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoFunctionDeclaratorParser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoFunctionDeclaratorParser.java
@@ -1242,14 +1242,14 @@ public CPPNoFunctionDeclaratorParser(String[] mapFrom) { // constructor
// Rule 226: simple_declaration ::= declaration_specifiers_opt <openscope-ast> init_declarator_list_opt ;
//
case 226: { action.builder.
- consumeDeclarationSimple(true, true); break;
+ consumeDeclarationSimple(true); break;
}
//
// Rule 227: simple_declaration_with_declspec ::= declaration_specifiers <openscope-ast> init_declarator_list_opt ;
//
case 227: { action.builder.
- consumeDeclarationSimple(true, false); break;
+ consumeDeclarationSimple(true); break;
}
//
@@ -1949,14 +1949,14 @@ public CPPNoFunctionDeclaratorParser(String[] mapFrom) { // constructor
// Rule 398: member_declaration ::= declaration_specifiers_opt <openscope-ast> member_declarator_list ;
//
case 398: { action.builder.
- consumeDeclarationSimple(true, true); break;
+ consumeDeclarationSimple(true); break;
}
//
// Rule 399: member_declaration ::= declaration_specifiers_opt ;
//
case 399: { action.builder.
- consumeDeclarationSimple(false, false); break;
+ consumeDeclarationSimple(false); break;
}
//
@@ -2236,21 +2236,21 @@ public CPPNoFunctionDeclaratorParser(String[] mapFrom) { // constructor
// Rule 518: exception_declaration ::= type_specifier_seq <openscope-ast> declarator
//
case 518: { action.builder.
- consumeDeclarationSimple(true, false); break;
+ consumeDeclarationSimple(true); break;
}
//
// Rule 519: exception_declaration ::= type_specifier_seq <openscope-ast> abstract_declarator
//
case 519: { action.builder.
- consumeDeclarationSimple(true, false); break;
+ consumeDeclarationSimple(true); break;
}
//
// Rule 520: exception_declaration ::= type_specifier_seq
//
case 520: { action.builder.
- consumeDeclarationSimple(false, false); break;
+ consumeDeclarationSimple(false); break;
}
//
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPParser.java
index fc4ee486373..a5ff5ddd619 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPParser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPParser.java
@@ -1242,14 +1242,14 @@ public CPPParser(String[] mapFrom) { // constructor
// Rule 226: simple_declaration ::= declaration_specifiers_opt <openscope-ast> init_declarator_list_opt ;
//
case 226: { action.builder.
- consumeDeclarationSimple(true, true); break;
+ consumeDeclarationSimple(true); break;
}
//
// Rule 227: simple_declaration_with_declspec ::= declaration_specifiers <openscope-ast> init_declarator_list_opt ;
//
case 227: { action.builder.
- consumeDeclarationSimple(true, false); break;
+ consumeDeclarationSimple(true); break;
}
//
@@ -1956,14 +1956,14 @@ public CPPParser(String[] mapFrom) { // constructor
// Rule 400: member_declaration ::= declaration_specifiers_opt <openscope-ast> member_declarator_list ;
//
case 400: { action.builder.
- consumeDeclarationSimple(true, true); break;
+ consumeDeclarationSimple(true); break;
}
//
// Rule 401: member_declaration ::= declaration_specifiers_opt ;
//
case 401: { action.builder.
- consumeDeclarationSimple(false, false); break;
+ consumeDeclarationSimple(false); break;
}
//
@@ -2243,21 +2243,21 @@ public CPPParser(String[] mapFrom) { // constructor
// Rule 520: exception_declaration ::= type_specifier_seq <openscope-ast> declarator
//
case 520: { action.builder.
- consumeDeclarationSimple(true, false); break;
+ consumeDeclarationSimple(true); break;
}
//
// Rule 521: exception_declaration ::= type_specifier_seq <openscope-ast> abstract_declarator
//
case 521: { action.builder.
- consumeDeclarationSimple(true, false); break;
+ consumeDeclarationSimple(true); break;
}
//
// Rule 522: exception_declaration ::= type_specifier_seq
//
case 522: { action.builder.
- consumeDeclarationSimple(false, false); break;
+ consumeDeclarationSimple(false); break;
}
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPSizeofExpressionParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPSizeofExpressionParser.java
index f9eb03dc26e..89499dcbb96 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPSizeofExpressionParser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPSizeofExpressionParser.java
@@ -1228,14 +1228,14 @@ public CPPSizeofExpressionParser(String[] mapFrom) { // constructor
// Rule 224: simple_declaration ::= declaration_specifiers_opt <openscope-ast> init_declarator_list_opt ;
//
case 224: { action.builder.
- consumeDeclarationSimple(true, true); break;
+ consumeDeclarationSimple(true); break;
}
//
// Rule 225: simple_declaration_with_declspec ::= declaration_specifiers <openscope-ast> init_declarator_list_opt ;
//
case 225: { action.builder.
- consumeDeclarationSimple(true, false); break;
+ consumeDeclarationSimple(true); break;
}
//
@@ -1942,14 +1942,14 @@ public CPPSizeofExpressionParser(String[] mapFrom) { // constructor
// Rule 398: member_declaration ::= declaration_specifiers_opt <openscope-ast> member_declarator_list ;
//
case 398: { action.builder.
- consumeDeclarationSimple(true, true); break;
+ consumeDeclarationSimple(true); break;
}
//
// Rule 399: member_declaration ::= declaration_specifiers_opt ;
//
case 399: { action.builder.
- consumeDeclarationSimple(false, false); break;
+ consumeDeclarationSimple(false); break;
}
//
@@ -2229,21 +2229,21 @@ public CPPSizeofExpressionParser(String[] mapFrom) { // constructor
// Rule 518: exception_declaration ::= type_specifier_seq <openscope-ast> declarator
//
case 518: { action.builder.
- consumeDeclarationSimple(true, false); break;
+ consumeDeclarationSimple(true); break;
}
//
// Rule 519: exception_declaration ::= type_specifier_seq <openscope-ast> abstract_declarator
//
case 519: { action.builder.
- consumeDeclarationSimple(true, false); break;
+ consumeDeclarationSimple(true); break;
}
//
// Rule 520: exception_declaration ::= type_specifier_seq
//
case 520: { action.builder.
- consumeDeclarationSimple(false, false); break;
+ consumeDeclarationSimple(false); break;
}
//

Back to the top