mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-03 22:35:43 +02:00
Bug 303065 - support new constructs by the upcoming v11.1 XL C/C++ compiler
This commit is contained in:
parent
6fd9d65358
commit
d3386e3dd2
16 changed files with 3290 additions and 3113 deletions
|
@ -1,5 +1,5 @@
|
|||
<!--
|
||||
Copyright (c) 2009 IBM Corporation and others.
|
||||
Copyright (c) 2009, 2010 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
|
||||
|
@ -21,7 +21,8 @@
|
|||
|
||||
Additionally if the $Import or $Include directives are being used in a grammar
|
||||
file then the LPG_INCLUDE environment variable must be set to the directory
|
||||
of the files being included.
|
||||
of the files being included.
|
||||
lpg_include - is an optional property to set, if it is set, LPG_INCLUDE will be set by its value before execute lpg_exe.
|
||||
-->
|
||||
|
||||
<fail unless="lpg_exe">
|
||||
|
@ -41,24 +42,52 @@
|
|||
${grammar_name} - the name of the main grammar file to run LPG on (not including the .g extension)
|
||||
${output_dir} - name of directory where generated files should go
|
||||
-->
|
||||
<target name="generate">
|
||||
<target name="generate" depends="moveFile">
|
||||
|
||||
|
||||
<echo message="Code generation is done."/>
|
||||
|
||||
|
||||
</target>
|
||||
|
||||
<target name="init">
|
||||
|
||||
<property name="grammar_file" value="${grammar_dir}/${grammar_name}.g"/>
|
||||
<echo message="lpg_exe=${lpg_exe}"/>
|
||||
<echo message="lpg_template=${lpg_template}"/>
|
||||
<echo message="lpg_include=${lpg_include}"/>
|
||||
<echo message="grammar_file=${grammar_file}.g"/>
|
||||
<echo message="output_dir=${output_dir}"/>
|
||||
|
||||
|
||||
|
||||
</target>
|
||||
|
||||
<target name="generateWithIncludeSet" if="lpg_include" depends="init">
|
||||
|
||||
<exec executable="${lpg_exe}">
|
||||
<arg value="${grammar_file}"/>
|
||||
<env key="LPG_TEMPLATE" path="${lpg_template}"/>
|
||||
<env key="LPG_INCLUDE" path="${lpg_include}"/>
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="generateWithoutIncludeSet" unless="lpg_include" depends="generateWithIncludeSet">
|
||||
|
||||
|
||||
<exec executable="${lpg_exe}">
|
||||
<arg value="${grammar_file}"/>
|
||||
<env key="LPG_TEMPLATE" path="${lpg_template}"/>
|
||||
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
<target name="moveFile" depends="generateWithoutIncludeSet">
|
||||
<move overwrite="true" toDir="${output_dir}">
|
||||
<fileset dir=".">
|
||||
<include name="${grammar_name}*.*"/>
|
||||
</fileset>
|
||||
</fileset>
|
||||
</move>
|
||||
</target>
|
||||
</target>
|
||||
|
||||
|
||||
</project>
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
###############################################################################
|
||||
# Copyright (c) 2010 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
|
||||
# http://www.eclipse.org/legal/epl-v10.html
|
||||
#
|
||||
# Contributors:
|
||||
# IBM Corporation - initial API and implementation
|
||||
###############################################################################
|
||||
|
||||
lpg_exe=D:/lpg/lpgdistribution/lpgexe/lpg.exe
|
||||
lpg_template=D:/newWorkspace/CDT_LOCAL/org.eclipse.cdt.core.lrparser/grammar/template
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2009, 2010 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
|
||||
|
@ -275,4 +275,48 @@ public class XlcExtensionsTest extends XlcTestBase {
|
|||
parse(code, getCPPLanguage(), true); // xlc supports this in C++
|
||||
}
|
||||
|
||||
public void testStaticAssertions() {
|
||||
String code =
|
||||
" const unsigned int EIGHT= 8; \n"+
|
||||
" __static_assert(sizeof(long) >= EIGHT, \"no 64-bit support\"); \n" +
|
||||
|
||||
" namespace ns { \n"+
|
||||
" __static_assert(sizeof(long) >= 4, \"no 32-bit support\"); \n" +
|
||||
" } \n" +
|
||||
|
||||
" template <typename T> class basic_string { \n" +
|
||||
" __static_assert(T::value, \"bla\"); \n" +
|
||||
" }; \n" +
|
||||
|
||||
" void do_something() { \n" +
|
||||
" struct VMPage { \n" +
|
||||
" }; \n" +
|
||||
" __static_assert(sizeof(VMPage) == 1, \"bla\"); \n" +
|
||||
" }";
|
||||
|
||||
parse(code, getCPPLanguage(), true); // xlc supports this in C++
|
||||
}
|
||||
|
||||
public void testV11Attributes() {
|
||||
String code =
|
||||
"#define __inline__ __inline__ __attribute__((gnu_inline)) \n" +
|
||||
|
||||
"static int w() __attribute__ ((weakref (\"y\")));\n" +
|
||||
/* is equivalent to... */
|
||||
"static int x() __attribute__ ((weak, weakref, alias (\"y\")));\n" +
|
||||
/* and to... */
|
||||
"static int y() __attribute__ ((weakref));\n" +
|
||||
"static int z() __attribute__ ((alias (\"y\"))); \n" +
|
||||
|
||||
"int foo() __attribute__((gnu_inline)); \n" +
|
||||
"static inline __attribute__((gnu_inline)) int ins (int *a){ \n" +
|
||||
" (*a)++; \n" +
|
||||
"} \n" +
|
||||
"inline __attribute__((gnu_inline)) int inc (int *a){ \n" +
|
||||
" (*a)++; \n" +
|
||||
"} ";
|
||||
|
||||
parse(code, getCLanguage(), true);
|
||||
parse(code, getCPPLanguage(), true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
###############################################################################
|
||||
# Copyright (c) 2010 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
|
||||
# http://www.eclipse.org/legal/epl-v10.html
|
||||
#
|
||||
# Contributors:
|
||||
# IBM Corporation - initial API and implementation
|
||||
###############################################################################
|
||||
|
||||
|
||||
lpg_exe=D:/lpg/lpgdistribution/lpgexe/lpg.exe
|
||||
lpg_template=D:/newWorkspace/CDT_LOCAL/org.eclipse.cdt.core.lrparser/grammar/template
|
||||
lpg_include=D:/newWorkspace/CDT_LOCAL/org.eclipse.cdt.core.lrparser/grammar/gpp
|
|
@ -1,5 +1,5 @@
|
|||
-----------------------------------------------------------------------------------
|
||||
-- Copyright (c) 2009 IBM Corporation and others.
|
||||
-- Copyright (c) 2009, 2010 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
|
||||
|
@ -60,6 +60,7 @@ cv_qualifier
|
|||
|
||||
block_declaration
|
||||
::= vector_declaration
|
||||
| static_assert_declaration
|
||||
|
||||
|
||||
identifier_token
|
||||
|
@ -95,5 +96,7 @@ array_modifier_type_qualifiers
|
|||
type_qualifier_list
|
||||
::= cv_qualifier
|
||||
| type_qualifier_list cv_qualifier
|
||||
member_declaration
|
||||
::= static_assert_declaration
|
||||
|
||||
$End
|
|
@ -1,5 +1,5 @@
|
|||
-----------------------------------------------------------------------------------
|
||||
-- Copyright (c) 2009 IBM Corporation and others.
|
||||
-- Copyright (c) 2009, 2010 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
|
||||
|
@ -23,6 +23,7 @@ $Terminals
|
|||
_Decimal32
|
||||
_Decimal64
|
||||
_Decimal128
|
||||
__static_assert
|
||||
|
||||
$End
|
||||
|
||||
|
@ -89,6 +90,9 @@ no_type_declaration_specifiers_opt
|
|||
::= no_type_declaration_specifiers
|
||||
| $empty
|
||||
|
||||
|
||||
static_assert_declaration
|
||||
::= '__static_assert' '(' expression ',' literal ')' ';'
|
||||
/. $Build consumeCPPASTStaticAssertDeclaration(); $EndBuild ./
|
||||
|
||||
$End
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2009, 2010 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
|
||||
|
@ -69,7 +69,8 @@ public class XlcCPPLanguage extends GPPLanguage {
|
|||
boolean supportDecimals = getPref(XlcPref.SUPPORT_DECIMAL_FLOATING_POINT_TYPES, project);
|
||||
boolean supportComplex = getPref(XlcPref.SUPPORT_COMPLEX_IN_CPP, project);
|
||||
boolean supportRestrict = getPref(XlcPref.SUPPORT_RESTRICT_IN_CPP, project);
|
||||
IDOMTokenMap tokenMap = new XlcCPPTokenMap(supportVectors, supportDecimals, supportComplex, supportRestrict);
|
||||
boolean supportStaticAssert = getPref(XlcPref.SUPPORT_STATIC_ASSERT, project);
|
||||
IDOMTokenMap tokenMap = new XlcCPPTokenMap(supportVectors, supportDecimals, supportComplex, supportRestrict, supportStaticAssert);
|
||||
|
||||
XlcCPPParser parser = new XlcCPPParser(scanner, tokenMap, getBuiltinBindingsProvider(), index, properties);
|
||||
return parser;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2009, 2010 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
|
||||
|
@ -27,8 +27,8 @@ public class XlcCPPTokenMap implements IDOMTokenMap {
|
|||
|
||||
private final XlcKeywords keywordMap;
|
||||
|
||||
public XlcCPPTokenMap(boolean supportVectors, boolean supportDecimalFloatingPoint, boolean supportComplex, boolean supportRestrict) {
|
||||
keywordMap = XlcKeywords.createCPP(supportVectors, supportDecimalFloatingPoint, supportComplex, supportRestrict);
|
||||
public XlcCPPTokenMap(boolean supportVectors, boolean supportDecimalFloatingPoint, boolean supportComplex, boolean supportRestrict, boolean supportStaticAssert) {
|
||||
keywordMap = XlcKeywords.createCPP(supportVectors, supportDecimalFloatingPoint, supportComplex, supportRestrict, supportStaticAssert);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2009, 2010 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
|
||||
|
@ -25,7 +25,7 @@ import org.eclipse.cdt.internal.core.lrparser.xlc.cpp.XlcCPPParsersym;
|
|||
public class XlcKeywords extends CLanguageKeywords {
|
||||
|
||||
public static final XlcKeywords ALL_C_KEYWORDS = createC(true, true);
|
||||
public static final XlcKeywords ALL_CPP_KEYWORDS = createCPP(true, true, true, true);
|
||||
public static final XlcKeywords ALL_CPP_KEYWORDS = createCPP(true, true, true, true, true);
|
||||
|
||||
|
||||
private final CharArrayMap<Integer> map = new CharArrayMap<Integer>();
|
||||
|
@ -51,7 +51,7 @@ public class XlcKeywords extends CLanguageKeywords {
|
|||
return keywords;
|
||||
}
|
||||
|
||||
public static XlcKeywords createCPP(boolean supportVectors, boolean supportDecimalFloatingPoint, boolean supportComplex, boolean supportRestrict) {
|
||||
public static XlcKeywords createCPP(boolean supportVectors, boolean supportDecimalFloatingPoint, boolean supportComplex, boolean supportRestrict, boolean supportStaticAssert) {
|
||||
XlcKeywords keywords = new XlcKeywords(ParserLanguage.CPP);
|
||||
CharArrayMap<Integer> map = keywords.map;
|
||||
if(supportVectors) {
|
||||
|
@ -74,6 +74,10 @@ public class XlcKeywords extends CLanguageKeywords {
|
|||
map.put("__restrict__".toCharArray(), XlcCPPParsersym.TK_restrict);
|
||||
}
|
||||
|
||||
if(supportStaticAssert) {
|
||||
map.put("__static_assert".toCharArray(), XlcCPPParsersym.TK___static_assert);
|
||||
}
|
||||
|
||||
return keywords;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2009, 2010 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
|
||||
|
@ -13,6 +13,8 @@ package org.eclipse.cdt.core.lrparser.xlc.action;
|
|||
import lpg.lpgjavaruntime.IToken;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTExpression;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTLiteralExpression;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTStaticAssertDeclaration;
|
||||
import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
|
||||
import org.eclipse.cdt.core.dom.lrparser.action.ITokenStream;
|
||||
import org.eclipse.cdt.core.dom.lrparser.action.ScopedStack;
|
||||
|
@ -93,4 +95,16 @@ public class XlcCPPBuildASTParserAction extends GPPBuildASTParserAction {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* staticAssertDeclaration ::= '__static_assert' '(' expression ',' literal ')' ';'
|
||||
*/
|
||||
public void consumeCPPASTStaticAssertDeclaration() {
|
||||
ICPPASTLiteralExpression message = (ICPPASTLiteralExpression) astStack.pop();
|
||||
IASTExpression condition = (IASTExpression) astStack.pop();
|
||||
|
||||
ICPPASTStaticAssertDeclaration assertDeclaration = nodeFactory.newStaticAssertion(condition, message);
|
||||
setOffsetAndLength(assertDeclaration);
|
||||
astStack.push(assertDeclaration);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2009, 2010 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
|
||||
|
@ -17,7 +17,8 @@ public enum XlcPref {
|
|||
SUPPORT_VECTOR_TYPES("true"),
|
||||
SUPPORT_DECIMAL_FLOATING_POINT_TYPES("true"),
|
||||
SUPPORT_COMPLEX_IN_CPP("true"),
|
||||
SUPPORT_RESTRICT_IN_CPP("true");
|
||||
SUPPORT_RESTRICT_IN_CPP("true"),
|
||||
SUPPORT_STATIC_ASSERT("true");
|
||||
|
||||
|
||||
private final String defaultVal;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2010 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
|
||||
|
@ -2074,51 +2074,57 @@ private GNUBuildASTParserAction gnuAction;
|
|||
}
|
||||
|
||||
//
|
||||
// Rule 642: specifier_qualifier ::= typedef
|
||||
// Rule 638: static_assert_declaration ::= __static_assert ( expression , literal ) ;
|
||||
//
|
||||
case 642: { action. consumeToken(); break;
|
||||
case 638: { action. consumeCPPASTStaticAssertDeclaration(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 643: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
|
||||
// Rule 644: specifier_qualifier ::= typedef
|
||||
//
|
||||
case 643: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
|
||||
case 644: { action. consumeToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 644: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
// Rule 645: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
|
||||
//
|
||||
case 644: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
|
||||
case 645: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 645: array_modifier ::= [ static assignment_expression ]
|
||||
// Rule 646: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
//
|
||||
case 645: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
|
||||
case 646: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 646: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
// Rule 647: array_modifier ::= [ static assignment_expression ]
|
||||
//
|
||||
case 646: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
case 647: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 647: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
|
||||
// Rule 648: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
//
|
||||
case 647: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
case 648: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 648: array_modifier ::= [ * ]
|
||||
// Rule 649: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
|
||||
//
|
||||
case 648: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
|
||||
case 649: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 649: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
|
||||
// Rule 650: array_modifier ::= [ * ]
|
||||
//
|
||||
case 649: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
|
||||
case 650: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 651: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
|
||||
//
|
||||
case 651: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
|
||||
}
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2010 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
|
||||
|
@ -21,57 +21,57 @@ public interface XlcCPPParsersym {
|
|||
TK_asm = 7,
|
||||
TK_auto = 38,
|
||||
TK_bool = 15,
|
||||
TK_break = 88,
|
||||
TK_case = 89,
|
||||
TK_catch = 133,
|
||||
TK_break = 89,
|
||||
TK_case = 90,
|
||||
TK_catch = 134,
|
||||
TK_char = 16,
|
||||
TK_class = 66,
|
||||
TK_const = 33,
|
||||
TK_const_cast = 53,
|
||||
TK_continue = 90,
|
||||
TK_default = 91,
|
||||
TK_delete = 80,
|
||||
TK_do = 92,
|
||||
TK_const_cast = 59,
|
||||
TK_continue = 91,
|
||||
TK_default = 92,
|
||||
TK_delete = 81,
|
||||
TK_do = 93,
|
||||
TK_double = 26,
|
||||
TK_dynamic_cast = 54,
|
||||
TK_else = 135,
|
||||
TK_dynamic_cast = 60,
|
||||
TK_else = 136,
|
||||
TK_enum = 68,
|
||||
TK_explicit = 39,
|
||||
TK_export = 93,
|
||||
TK_export = 94,
|
||||
TK_extern = 40,
|
||||
TK_false = 55,
|
||||
TK_false = 52,
|
||||
TK_float = 17,
|
||||
TK_for = 94,
|
||||
TK_for = 95,
|
||||
TK_friend = 41,
|
||||
TK_goto = 95,
|
||||
TK_if = 96,
|
||||
TK_goto = 96,
|
||||
TK_if = 97,
|
||||
TK_inline = 42,
|
||||
TK_int = 18,
|
||||
TK_long = 19,
|
||||
TK_mutable = 43,
|
||||
TK_namespace = 73,
|
||||
TK_new = 81,
|
||||
TK_new = 82,
|
||||
TK_operator = 11,
|
||||
TK_private = 129,
|
||||
TK_protected = 130,
|
||||
TK_public = 131,
|
||||
TK_private = 130,
|
||||
TK_protected = 131,
|
||||
TK_public = 132,
|
||||
TK_register = 44,
|
||||
TK_reinterpret_cast = 56,
|
||||
TK_return = 97,
|
||||
TK_reinterpret_cast = 61,
|
||||
TK_return = 98,
|
||||
TK_short = 20,
|
||||
TK_signed = 21,
|
||||
TK_sizeof = 57,
|
||||
TK_sizeof = 62,
|
||||
TK_static = 36,
|
||||
TK_static_cast = 58,
|
||||
TK_static_cast = 63,
|
||||
TK_struct = 69,
|
||||
TK_switch = 98,
|
||||
TK_switch = 99,
|
||||
TK_template = 67,
|
||||
TK_this = 59,
|
||||
TK_this = 53,
|
||||
TK_throw = 74,
|
||||
TK_try = 84,
|
||||
TK_true = 60,
|
||||
TK_try = 85,
|
||||
TK_true = 54,
|
||||
TK_typedef = 45,
|
||||
TK_typeid = 61,
|
||||
TK_typeid = 64,
|
||||
TK_typename = 22,
|
||||
TK_union = 70,
|
||||
TK_unsigned = 23,
|
||||
|
@ -80,21 +80,21 @@ public interface XlcCPPParsersym {
|
|||
TK_void = 27,
|
||||
TK_volatile = 34,
|
||||
TK_wchar_t = 28,
|
||||
TK_while = 87,
|
||||
TK_integer = 62,
|
||||
TK_floating = 63,
|
||||
TK_charconst = 64,
|
||||
TK_while = 88,
|
||||
TK_integer = 55,
|
||||
TK_floating = 56,
|
||||
TK_charconst = 57,
|
||||
TK_stringlit = 46,
|
||||
TK_identifier = 1,
|
||||
TK_Completion = 4,
|
||||
TK_EndOfCompletion = 12,
|
||||
TK_Invalid = 136,
|
||||
TK_LeftBracket = 77,
|
||||
TK_Invalid = 137,
|
||||
TK_LeftBracket = 78,
|
||||
TK_LeftParen = 5,
|
||||
TK_Dot = 132,
|
||||
TK_DotStar = 104,
|
||||
TK_Arrow = 117,
|
||||
TK_ArrowStar = 102,
|
||||
TK_Dot = 133,
|
||||
TK_DotStar = 105,
|
||||
TK_Arrow = 118,
|
||||
TK_ArrowStar = 103,
|
||||
TK_PlusPlus = 49,
|
||||
TK_MinusMinus = 50,
|
||||
TK_And = 14,
|
||||
|
@ -102,55 +102,56 @@ public interface XlcCPPParsersym {
|
|||
TK_Plus = 47,
|
||||
TK_Minus = 48,
|
||||
TK_Tilde = 10,
|
||||
TK_Bang = 52,
|
||||
TK_Slash = 105,
|
||||
TK_Percent = 106,
|
||||
TK_RightShift = 99,
|
||||
TK_LeftShift = 100,
|
||||
TK_Bang = 58,
|
||||
TK_Slash = 106,
|
||||
TK_Percent = 107,
|
||||
TK_RightShift = 100,
|
||||
TK_LeftShift = 101,
|
||||
TK_LT = 71,
|
||||
TK_GT = 83,
|
||||
TK_LE = 107,
|
||||
TK_GE = 108,
|
||||
TK_EQ = 109,
|
||||
TK_NE = 110,
|
||||
TK_Caret = 111,
|
||||
TK_Or = 112,
|
||||
TK_AndAnd = 113,
|
||||
TK_OrOr = 114,
|
||||
TK_Question = 118,
|
||||
TK_Colon = 82,
|
||||
TK_GT = 84,
|
||||
TK_LE = 108,
|
||||
TK_GE = 109,
|
||||
TK_EQ = 110,
|
||||
TK_NE = 111,
|
||||
TK_Caret = 112,
|
||||
TK_Or = 113,
|
||||
TK_AndAnd = 114,
|
||||
TK_OrOr = 115,
|
||||
TK_Question = 119,
|
||||
TK_Colon = 83,
|
||||
TK_ColonColon = 6,
|
||||
TK_DotDotDot = 101,
|
||||
TK_Assign = 85,
|
||||
TK_StarAssign = 119,
|
||||
TK_SlashAssign = 120,
|
||||
TK_PercentAssign = 121,
|
||||
TK_PlusAssign = 122,
|
||||
TK_MinusAssign = 123,
|
||||
TK_RightShiftAssign = 124,
|
||||
TK_LeftShiftAssign = 125,
|
||||
TK_AndAssign = 126,
|
||||
TK_CaretAssign = 127,
|
||||
TK_OrAssign = 128,
|
||||
TK_DotDotDot = 102,
|
||||
TK_Assign = 86,
|
||||
TK_StarAssign = 120,
|
||||
TK_SlashAssign = 121,
|
||||
TK_PercentAssign = 122,
|
||||
TK_PlusAssign = 123,
|
||||
TK_MinusAssign = 124,
|
||||
TK_RightShiftAssign = 125,
|
||||
TK_LeftShiftAssign = 126,
|
||||
TK_AndAssign = 127,
|
||||
TK_CaretAssign = 128,
|
||||
TK_OrAssign = 129,
|
||||
TK_Comma = 79,
|
||||
TK_RightBracket = 103,
|
||||
TK_RightParen = 78,
|
||||
TK_RightBrace = 86,
|
||||
TK_RightBracket = 104,
|
||||
TK_RightParen = 80,
|
||||
TK_RightBrace = 87,
|
||||
TK_SemiColon = 51,
|
||||
TK_LeftBrace = 72,
|
||||
TK_typeof = 32,
|
||||
TK___alignof__ = 65,
|
||||
TK___attribute__ = 8,
|
||||
TK___declspec = 9,
|
||||
TK_MAX = 115,
|
||||
TK_MIN = 116,
|
||||
TK_MAX = 116,
|
||||
TK_MIN = 117,
|
||||
TK_vector = 3,
|
||||
TK_pixel = 2,
|
||||
TK__Decimal32 = 29,
|
||||
TK__Decimal64 = 30,
|
||||
TK__Decimal128 = 31,
|
||||
TK_ERROR_TOKEN = 76,
|
||||
TK_EOF_TOKEN = 134;
|
||||
TK___static_assert = 76,
|
||||
TK_ERROR_TOKEN = 77,
|
||||
TK_EOF_TOKEN = 135;
|
||||
|
||||
public final static String orderedTerminalSymbols[] = {
|
||||
"",
|
||||
|
@ -205,19 +206,19 @@ public interface XlcCPPParsersym {
|
|||
"PlusPlus",
|
||||
"MinusMinus",
|
||||
"SemiColon",
|
||||
"Bang",
|
||||
"const_cast",
|
||||
"dynamic_cast",
|
||||
"false",
|
||||
"reinterpret_cast",
|
||||
"sizeof",
|
||||
"static_cast",
|
||||
"this",
|
||||
"true",
|
||||
"typeid",
|
||||
"integer",
|
||||
"floating",
|
||||
"charconst",
|
||||
"Bang",
|
||||
"const_cast",
|
||||
"dynamic_cast",
|
||||
"reinterpret_cast",
|
||||
"sizeof",
|
||||
"static_cast",
|
||||
"typeid",
|
||||
"__alignof__",
|
||||
"class",
|
||||
"template",
|
||||
|
@ -229,10 +230,11 @@ public interface XlcCPPParsersym {
|
|||
"namespace",
|
||||
"throw",
|
||||
"using",
|
||||
"__static_assert",
|
||||
"ERROR_TOKEN",
|
||||
"LeftBracket",
|
||||
"RightParen",
|
||||
"Comma",
|
||||
"RightParen",
|
||||
"delete",
|
||||
"new",
|
||||
"Colon",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2009, 2010 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
|
||||
|
@ -47,7 +47,7 @@ public class PreferenceMessages extends NLS {
|
|||
XlcLanguageOptionsPreferencePage_SUPPORT_VECTOR_TYPES,
|
||||
XlcLanguageOptionsPreferencePage_SUPPORT_DECIMAL_FLOATING_POINT_TYPES,
|
||||
XlcLanguageOptionsPreferencePage_SUPPORT_COMPLEX_IN_CPP,
|
||||
XlcLanguageOptionsPreferencePage_SUPPORT_RESTRICT_IN_CPP;
|
||||
|
||||
XlcLanguageOptionsPreferencePage_SUPPORT_RESTRICT_IN_CPP,
|
||||
XlcLanguageOptionsPreferencePage_SUPPORT_STATIC_ASSERT;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
###############################################################################
|
||||
# Copyright (c) 2009 IBM Corporation and others.
|
||||
# Copyright (c) 2009, 2010 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
|
||||
|
@ -16,4 +16,4 @@ XlcLanguageOptionsPreferencePage_SUPPORT_VECTOR_TYPES=Allow vector type declarat
|
|||
XlcLanguageOptionsPreferencePage_SUPPORT_DECIMAL_FLOATING_POINT_TYPES=Allow decimal floating-point types (_Decimal32, _Decimal64, _Decimal128)
|
||||
XlcLanguageOptionsPreferencePage_SUPPORT_COMPLEX_IN_CPP=Allow complex type in C++ (_Complex)
|
||||
XlcLanguageOptionsPreferencePage_SUPPORT_RESTRICT_IN_CPP=Allow 'restrict' keyword in C++ (restrict, __restrict, __restrict__)
|
||||
|
||||
XlcLanguageOptionsPreferencePage_SUPPORT_STATIC_ASSERT=Allow static assert declarations (__static_assert)
|
||||
|
|
Loading…
Add table
Reference in a new issue