mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
[276360] [LR Parser] CCE when parsing abstract declarator
This commit is contained in:
parent
b9a07ce680
commit
f1841fc08a
34 changed files with 51 additions and 42 deletions
|
@ -92,4 +92,11 @@ public class LRCSpecTests extends AST2CSpecTest {
|
|||
// }
|
||||
|
||||
|
||||
public void testBug276360() throws Exception {
|
||||
String code =
|
||||
"int foo(int*[]) {} ";
|
||||
|
||||
parseCandCPP(code, false, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -854,7 +854,7 @@ abstract_declarator -- a declarator that does not include an identifier
|
|||
| <openscope-ast> pointer_seq
|
||||
/. $Build consumeDeclaratorWithPointer(false); $EndBuild ./
|
||||
| <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
/. $Build consumeDeclaratorWithPointer(false); $EndBuild ./
|
||||
/. $Build consumeDeclaratorWithPointer(true); $EndBuild ./
|
||||
|
||||
|
||||
direct_abstract_declarator
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -1104,7 +1104,7 @@ public C99ExpressionParser(ITokenStream stream, Map<String,String> properties) {
|
|||
//
|
||||
// Rule 269: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
//
|
||||
case 269: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 269: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -1098,7 +1098,7 @@ public C99NoCastExpressionParser(ITokenStream stream, Map<String,String> propert
|
|||
//
|
||||
// Rule 268: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
//
|
||||
case 268: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 268: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -1081,7 +1081,7 @@ public String getName() {
|
|||
//
|
||||
// Rule 269: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
//
|
||||
case 269: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 269: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -1098,7 +1098,7 @@ public C99SizeofExpressionParser(ITokenStream stream, Map<String,String> propert
|
|||
//
|
||||
// Rule 268: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
//
|
||||
case 268: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 268: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -1092,7 +1092,7 @@ private GNUBuildASTParserAction gnuAction;
|
|||
//
|
||||
// Rule 269: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
//
|
||||
case 269: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 269: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -1109,7 +1109,7 @@ private GNUBuildASTParserAction gnuAction;
|
|||
//
|
||||
// Rule 268: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
//
|
||||
case 268: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 268: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -38,6 +38,8 @@ public class UPCLanguage extends BaseExtensibleLanguage {
|
|||
|
||||
public static final String ID = "org.eclipse.cdt.core.parser.upc.upc"; //$NON-NLS-1$
|
||||
|
||||
public static final String UPC_CONTENT_TYPE_ID = "org.eclipse.cdt.core.parser.upc.upcSource"; //$NON-NLS-1$
|
||||
|
||||
private static final UPCLanguage myDefault = new UPCLanguage();
|
||||
|
||||
public static UPCLanguage getDefault() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -1112,7 +1112,7 @@ public UPCExpressionParser(ITokenStream stream, Map<String,String> properties) {
|
|||
//
|
||||
// Rule 269: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
//
|
||||
case 269: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 269: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -1106,7 +1106,7 @@ public UPCNoCastExpressionParser(ITokenStream stream, Map<String,String> propert
|
|||
//
|
||||
// Rule 268: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
//
|
||||
case 268: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 268: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -1089,7 +1089,7 @@ public String getName() {
|
|||
//
|
||||
// Rule 269: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
//
|
||||
case 269: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 269: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -1106,7 +1106,7 @@ public UPCSizeofExpressionParser(ITokenStream stream, Map<String,String> propert
|
|||
//
|
||||
// Rule 268: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
//
|
||||
case 268: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 268: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1096,7 +1096,7 @@ private GNUBuildASTParserAction gnuAction;
|
|||
//
|
||||
// Rule 269: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
//
|
||||
case 269: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 269: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Add table
Reference in a new issue