mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
support for GNU declaration specifiers (typeof) for LR parsers
This commit is contained in:
parent
fb5c539efc
commit
62e51214ac
51 changed files with 17223 additions and 16712 deletions
|
@ -24,10 +24,8 @@ $Terminals
|
|||
integer floating charconst stringlit
|
||||
|
||||
-- identifiers
|
||||
-- Special token that represents identifiers that have been declared as typedefs (lexer feedback hack)
|
||||
|
||||
identifier
|
||||
--TypedefName
|
||||
|
||||
-- Special tokens used in content assist
|
||||
|
||||
|
@ -149,6 +147,10 @@ $Rules
|
|||
-- Expressions
|
||||
-------------------------------------------------------------------------------------------
|
||||
|
||||
identifier_token
|
||||
::= 'identifier'
|
||||
| 'Completion'
|
||||
|
||||
|
||||
literal
|
||||
::= 'integer'
|
||||
|
@ -169,9 +171,8 @@ primary_expression
|
|||
/. $Build consumeExpressionBracketed(); $EndBuild ./
|
||||
|
||||
|
||||
primary_expression_id -- Typedefname not allowed as a variable name.
|
||||
::= 'identifier'
|
||||
| 'Completion'
|
||||
primary_expression_id
|
||||
::= identifier_token
|
||||
|
||||
|
||||
postfix_expression
|
||||
|
@ -197,9 +198,7 @@ comma_opt
|
|||
|
||||
|
||||
member_name
|
||||
::= 'identifier'
|
||||
-- | 'TypedefName'
|
||||
| 'Completion'
|
||||
::= identifier_token
|
||||
|
||||
|
||||
unary_expression
|
||||
|
@ -523,8 +522,8 @@ enum_declaration_specifiers
|
|||
|
||||
|
||||
typdef_name_declaration_specifiers
|
||||
::= typedef_name_in_declspec
|
||||
| no_type_declaration_specifiers typedef_name_in_declspec
|
||||
::= type_name_specifier
|
||||
| no_type_declaration_specifiers type_name_specifier
|
||||
| typdef_name_declaration_specifiers no_type_declaration_specifier
|
||||
|
||||
|
||||
|
@ -575,19 +574,11 @@ simple_type_specifier_token
|
|||
| '_Imaginary'
|
||||
|
||||
|
||||
typedef_name_in_declspec
|
||||
::= 'Completion'
|
||||
type_name_specifier
|
||||
::= identifier_token
|
||||
/. $Build consumeToken(); $EndBuild ./
|
||||
| 'identifier'
|
||||
/. $Build consumeToken(); $EndBuild ./
|
||||
-- | 'TypedefName' -- remove identifier if this is uncommented
|
||||
|
||||
|
||||
|
||||
identifier_token
|
||||
::= 'identifier'
|
||||
| 'Completion'
|
||||
|
||||
|
||||
struct_or_union_specifier
|
||||
::= struct_or_union struct_or_union_specifier_hook '{' <openscope-ast> struct_declaration_list_opt '}'
|
||||
|
|
|
@ -42,7 +42,7 @@ $Define
|
|||
|
||||
gnuAction = new $gnu_action_class (this, tu, astStack, $node_factory_create_expression);
|
||||
gnuAction.setParserOptions(options);
|
||||
|
||||
gnuAction.setBaseAction(action);
|
||||
./
|
||||
|
||||
$End
|
||||
|
@ -146,7 +146,22 @@ unary_expression
|
|||
| 'typeof' '(' type_id ')'
|
||||
/. $Build consumeExpressionTypeId(IASTTypeIdExpression.op_typeof); $EndBuild ./
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
typeof_type_specifier
|
||||
::= 'typeof' unary_expression
|
||||
|
||||
|
||||
typeof_declaration_specifiers
|
||||
::= typeof_type_specifier
|
||||
| no_type_declaration_specifiers typeof_type_specifier
|
||||
| typeof_declaration_specifiers no_type_declaration_specifier
|
||||
|
||||
|
||||
declaration_specifiers
|
||||
::= <openscope-ast> typeof_declaration_specifiers
|
||||
/. $BeginAction gnuAction.consumeDeclarationSpecifiersTypeof(); $EndAction ./
|
||||
|
||||
$End
|
||||
|
||||
|
|
|
@ -14,6 +14,15 @@
|
|||
%options template=FixedBtParserTemplateD.g
|
||||
|
||||
|
||||
$Terminals
|
||||
|
||||
-- GCC allows these C99 keywords to be used in C++
|
||||
|
||||
_Complex _Imaginary
|
||||
|
||||
$End
|
||||
|
||||
|
||||
-- For this to work the environment variable LPG_INCLUDE must be set up
|
||||
-- to point at the directory where the CPPParser.g file is located.
|
||||
$Import
|
||||
|
@ -25,6 +34,10 @@ $DropRules
|
|||
asm_definition
|
||||
::= 'asm' '(' 'stringlit' ')' ';'
|
||||
|
||||
-- need to replace the action associated with this rule with one that supports _Complex and _Imaginary
|
||||
declaration_specifiers
|
||||
::= <openscope-ast> simple_declaration_specifiers
|
||||
|
||||
|
||||
$End
|
||||
|
||||
|
@ -35,14 +48,14 @@ $End
|
|||
|
||||
$Globals
|
||||
/.
|
||||
import org.eclipse.cdt.core.dom.lrparser.action.gnu.GNUBuildASTParserAction;
|
||||
import org.eclipse.cdt.core.dom.lrparser.action.gnu.GPPBuildASTParserAction;
|
||||
import org.eclipse.cdt.core.dom.lrparser.action.gnu.GPPSecondaryParserFactory;
|
||||
./
|
||||
$End
|
||||
|
||||
$Define
|
||||
|
||||
$gnu_action_class /. GNUBuildASTParserAction ./
|
||||
$gnu_action_class /. GPPBuildASTParserAction ./
|
||||
$parser_factory_create_expression /. GPPSecondaryParserFactory.getDefault() ./
|
||||
|
||||
$End
|
||||
|
@ -85,5 +98,16 @@ declarator
|
|||
|
||||
elaborated_specifier_hook
|
||||
::= attribute_or_decl_specifier_seq
|
||||
|
||||
|
||||
simple_type_specifier
|
||||
::= '_Complex'
|
||||
/. $Build consumeToken(); $EndBuild ./
|
||||
| '_Imaginary'
|
||||
/. $Build consumeToken(); $EndBuild ./
|
||||
|
||||
declaration_specifiers
|
||||
::= <openscope-ast> simple_declaration_specifiers
|
||||
/. $BeginAction gnuAction.consumeDeclarationSpecifiersSimple(); $EndAction ./
|
||||
|
||||
$End
|
|
@ -191,7 +191,7 @@ public class C99BuildASTParserAction extends BuildASTParserAction {
|
|||
* Object as the type of the specifier, so that it may be overridden in subclasses
|
||||
* and used with arbitrary objects as the specifier.
|
||||
*/
|
||||
protected void setSpecifier(ICASTDeclSpecifier node, Object specifier) {
|
||||
public void setSpecifier(ICASTDeclSpecifier node, Object specifier) {
|
||||
if(!(specifier instanceof IToken))
|
||||
return;
|
||||
IToken token = (IToken)specifier;
|
||||
|
@ -454,7 +454,6 @@ public class C99BuildASTParserAction extends BuildASTParserAction {
|
|||
int kind = baseKind(token);
|
||||
if(kind == TK_identifier || kind == TK_Completion) {
|
||||
IASTName name = createName(token);
|
||||
//name.setBinding(binding);
|
||||
declSpec.setName(name);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -1081,7 +1081,11 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
|
|||
* @param token Allows subclasses to override this method and use any
|
||||
* object to determine how to set a specifier.
|
||||
*/
|
||||
protected void setSpecifier(ICPPASTDeclSpecifier node, IToken token) {
|
||||
public void setSpecifier(ICPPASTDeclSpecifier node, Object specifier) {
|
||||
if(!(specifier instanceof IToken))
|
||||
return;
|
||||
|
||||
IToken token = (IToken)specifier;
|
||||
int kind = baseKind(token);
|
||||
switch(kind){
|
||||
case TK_typedef: node.setStorageClass(IASTDeclSpecifier.sc_typedef); return;
|
||||
|
@ -1123,7 +1127,7 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
|
|||
ICPPASTDeclSpecifier declSpec = nodeFactory.newSimpleDeclSpecifier();
|
||||
|
||||
for(Object token : astStack.closeScope())
|
||||
setSpecifier(declSpec, (IToken)token);
|
||||
setSpecifier(declSpec, token);
|
||||
|
||||
setOffsetAndLength(declSpec);
|
||||
astStack.push(declSpec);
|
||||
|
@ -1141,7 +1145,7 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
|
|||
|
||||
// now apply the rest of the specifiers
|
||||
for(Object token : topScope)
|
||||
setSpecifier(declSpec, (IToken)token);
|
||||
setSpecifier(declSpec, token);
|
||||
|
||||
setOffsetAndLength(declSpec);
|
||||
astStack.push(declSpec);
|
||||
|
@ -1163,7 +1167,7 @@ public class CPPBuildASTParserAction extends BuildASTParserAction {
|
|||
|
||||
// now apply the rest of the specifiers
|
||||
for(Object token : topScope) {
|
||||
setSpecifier(declSpec, (IToken)token);
|
||||
setSpecifier(declSpec, token);
|
||||
}
|
||||
|
||||
// the only way there could be a typename token
|
||||
|
|
|
@ -10,18 +10,26 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.lrparser.action.gnu;
|
||||
|
||||
import static org.eclipse.cdt.core.parser.util.CollectionUtils.findFirstAndRemove;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTExpression;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.ast.c.ICASTFieldDesignator;
|
||||
import org.eclipse.cdt.core.dom.ast.c.ICASTSimpleDeclSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.c.ICNodeFactory;
|
||||
import org.eclipse.cdt.core.dom.ast.gnu.c.IGCCASTArrayRangeDesignator;
|
||||
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
|
||||
import org.eclipse.cdt.core.dom.lrparser.action.ScopedStack;
|
||||
import org.eclipse.cdt.core.dom.lrparser.action.c99.C99BuildASTParserAction;
|
||||
|
||||
public class GCCBuildASTParserAction extends GNUBuildASTParserAction {
|
||||
|
||||
private final ICNodeFactory nodeFactory;
|
||||
|
||||
private C99BuildASTParserAction baseAction;
|
||||
|
||||
public GCCBuildASTParserAction(IParserActionTokenProvider parser, IASTTranslationUnit tu, ScopedStack<Object> astStack, ICNodeFactory nodeFactory) {
|
||||
super(parser, tu, astStack, nodeFactory);
|
||||
|
@ -29,6 +37,10 @@ public class GCCBuildASTParserAction extends GNUBuildASTParserAction {
|
|||
}
|
||||
|
||||
|
||||
public void setBaseAction(C99BuildASTParserAction baseAction) {
|
||||
this.baseAction = baseAction;
|
||||
}
|
||||
|
||||
/**
|
||||
* designator_base
|
||||
* ::= identifier_token ':'
|
||||
|
@ -50,4 +62,32 @@ public class GCCBuildASTParserAction extends GNUBuildASTParserAction {
|
|||
setOffsetAndLength(designator);
|
||||
astStack.push(designator);
|
||||
}
|
||||
|
||||
/**
|
||||
* typeof_type_specifier
|
||||
* ::= 'typeof' unary_expression
|
||||
*
|
||||
* typeof_declaration_specifiers
|
||||
* ::= typeof_type_specifier
|
||||
* | no_type_declaration_specifiers typeof_type_specifier
|
||||
* | typeof_declaration_specifiers no_type_declaration_specifier
|
||||
*
|
||||
* declaration_specifiers
|
||||
* ::= <openscope-ast> typeof_declaration_specifiers
|
||||
*/
|
||||
public void consumeDeclarationSpecifiersTypeof() {
|
||||
List<Object> topScope = astStack.closeScope();
|
||||
|
||||
// There's an expression somewhere on the stack, find it
|
||||
IASTExpression expr = findFirstAndRemove(topScope, IASTExpression.class);
|
||||
ICASTSimpleDeclSpecifier declSpec = nodeFactory.newSimpleDeclSpecifierGCC(expr);
|
||||
|
||||
// now apply the rest of the specifiers
|
||||
for(Object token : topScope) {
|
||||
baseAction.setSpecifier(declSpec, token);
|
||||
}
|
||||
|
||||
setOffsetAndLength(declSpec);
|
||||
astStack.push(declSpec);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,118 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 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
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.lrparser.action.gnu;
|
||||
|
||||
import static org.eclipse.cdt.core.parser.util.CollectionUtils.findFirstAndRemove;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lpg.lpgjavaruntime.IToken;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTExpression;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTSimpleDeclSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNodeFactory;
|
||||
import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTSimpleDeclSpecifier;
|
||||
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
|
||||
import org.eclipse.cdt.core.dom.lrparser.action.ScopedStack;
|
||||
import org.eclipse.cdt.core.dom.lrparser.action.cpp.CPPBuildASTParserAction;
|
||||
import org.eclipse.cdt.internal.core.dom.lrparser.gpp.GPPParsersym;
|
||||
|
||||
public class GPPBuildASTParserAction extends GNUBuildASTParserAction {
|
||||
|
||||
private final ICPPNodeFactory nodeFactory;
|
||||
|
||||
private CPPBuildASTParserAction baseAction;
|
||||
|
||||
|
||||
public GPPBuildASTParserAction(IParserActionTokenProvider parser, IASTTranslationUnit tu, ScopedStack<Object> astStack, ICPPNodeFactory nodeFactory) {
|
||||
super(parser, tu, astStack, nodeFactory);
|
||||
this.nodeFactory = nodeFactory;
|
||||
}
|
||||
|
||||
public void setBaseAction(CPPBuildASTParserAction baseAction) {
|
||||
this.baseAction = baseAction;
|
||||
}
|
||||
|
||||
/**
|
||||
* typeof_type_specifier
|
||||
* ::= 'typeof' unary_expression
|
||||
*
|
||||
* typeof_declaration_specifiers
|
||||
* ::= typeof_type_specifier
|
||||
* | no_type_declaration_specifiers typeof_type_specifier
|
||||
* | typeof_declaration_specifiers no_type_declaration_specifier
|
||||
*
|
||||
* declaration_specifiers
|
||||
* ::= <openscope-ast> typeof_declaration_specifiers
|
||||
*/
|
||||
public void consumeDeclarationSpecifiersTypeof() {
|
||||
List<Object> topScope = astStack.closeScope();
|
||||
|
||||
// There's an expression somewhere on the stack, find it
|
||||
IASTExpression expr = findFirstAndRemove(topScope, IASTExpression.class);
|
||||
IGPPASTSimpleDeclSpecifier declSpec = nodeFactory.newSimpleDeclSpecifierGPP();
|
||||
declSpec.setTypeofExpression(expr);
|
||||
|
||||
// now apply the rest of the specifiers
|
||||
for(Object token : topScope) {
|
||||
baseAction.setSpecifier(declSpec, token);
|
||||
}
|
||||
|
||||
setOffsetAndLength(declSpec);
|
||||
astStack.push(declSpec);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Replacement for the method same method in CPPBuildASTParserAction
|
||||
*/
|
||||
public void consumeDeclarationSpecifiersSimple() {
|
||||
boolean isComplex = false;
|
||||
boolean isImaginary = false;
|
||||
int numLong = 0;
|
||||
|
||||
List<Object> tokens = astStack.closeScope();
|
||||
|
||||
for(Object o : tokens) {
|
||||
if(o instanceof IToken) {
|
||||
IToken token = (IToken)o;
|
||||
switch(token.getKind()) {
|
||||
case GPPParsersym.TK__Complex: isComplex = true; break;
|
||||
case GPPParsersym.TK__Imaginary: isImaginary = true; break;
|
||||
case GPPParsersym.TK_long : numLong++; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ICPPASTSimpleDeclSpecifier declSpec;
|
||||
if(isComplex || isImaginary || numLong > 1) {
|
||||
IGPPASTSimpleDeclSpecifier gppDeclSpec = nodeFactory.newSimpleDeclSpecifierGPP();
|
||||
gppDeclSpec.setComplex(isComplex);
|
||||
gppDeclSpec.setImaginary(isImaginary);
|
||||
gppDeclSpec.setLongLong(numLong > 1);
|
||||
gppDeclSpec.setLong(numLong == 1);
|
||||
declSpec = gppDeclSpec;
|
||||
}
|
||||
else {
|
||||
declSpec = nodeFactory.newSimpleDeclSpecifier();
|
||||
}
|
||||
|
||||
for(Object token : tokens) {
|
||||
baseAction.setSpecifier(declSpec, token);
|
||||
}
|
||||
|
||||
setOffsetAndLength(declSpec);
|
||||
astStack.push(declSpec);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -176,6 +176,10 @@ public class DOMToGPPTokenMap implements IDOMTokenMap {
|
|||
case IGCCToken.t__attribute__ : return TK___attribute__;
|
||||
case IGCCToken.t__declspec : return TK___declspec;
|
||||
|
||||
// GNU supports these but they are not in the C++ spec
|
||||
case t__Complex : return TK__Complex;
|
||||
case t__Imaginary : return TK__Imaginary;
|
||||
|
||||
default:
|
||||
assert false : "token not recognized by the GPP parser: " + token.getType(); //$NON-NLS-1$
|
||||
return TK_Invalid;
|
||||
|
|
|
@ -16,7 +16,7 @@ import org.eclipse.cdt.core.dom.lrparser.BaseExtensibleLanguage;
|
|||
import org.eclipse.cdt.core.dom.lrparser.IDOMTokenMap;
|
||||
import org.eclipse.cdt.core.dom.lrparser.IParser;
|
||||
import org.eclipse.cdt.core.dom.parser.IScannerExtensionConfiguration;
|
||||
import org.eclipse.cdt.core.dom.parser.c.GCCScannerExtensionConfiguration;
|
||||
import org.eclipse.cdt.core.dom.parser.cpp.GPPScannerExtensionConfiguration;
|
||||
import org.eclipse.cdt.core.model.IContributedModelBuilder;
|
||||
import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||
import org.eclipse.cdt.core.parser.ParserLanguage;
|
||||
|
@ -51,7 +51,7 @@ public class GPPLanguage extends BaseExtensibleLanguage {
|
|||
|
||||
@Override
|
||||
protected IScannerExtensionConfiguration getScannerExtensionConfiguration() {
|
||||
return GCCScannerExtensionConfiguration.getInstance();
|
||||
return GPPScannerExtensionConfiguration.getInstance();
|
||||
}
|
||||
|
||||
public IContributedModelBuilder createModelBuilder(@SuppressWarnings("unused") ITranslationUnit tu) {
|
||||
|
|
|
@ -253,81 +253,81 @@ public C99ExpressionParser(IParserActionTokenProvider parser) { // constructor
|
|||
}
|
||||
|
||||
//
|
||||
// Rule 10: literal ::= integer
|
||||
// Rule 12: literal ::= integer
|
||||
//
|
||||
case 10: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_integer_constant); break;
|
||||
case 12: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_integer_constant); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 11: literal ::= floating
|
||||
// Rule 13: literal ::= floating
|
||||
//
|
||||
case 11: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_float_constant); break;
|
||||
case 13: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_float_constant); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 12: literal ::= charconst
|
||||
// Rule 14: literal ::= charconst
|
||||
//
|
||||
case 12: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_char_constant); break;
|
||||
case 14: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_char_constant); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 13: literal ::= stringlit
|
||||
// Rule 15: literal ::= stringlit
|
||||
//
|
||||
case 13: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_string_literal); break;
|
||||
case 15: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_string_literal); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 15: primary_expression ::= primary_expression_id
|
||||
// Rule 17: primary_expression ::= primary_expression_id
|
||||
//
|
||||
case 15: { action. consumeExpressionID(); break;
|
||||
case 17: { action. consumeExpressionID(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 16: primary_expression ::= ( expression )
|
||||
// Rule 18: primary_expression ::= ( expression )
|
||||
//
|
||||
case 16: { action. consumeExpressionBracketed(); break;
|
||||
case 18: { action. consumeExpressionBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 20: postfix_expression ::= postfix_expression [ expression ]
|
||||
// Rule 21: postfix_expression ::= postfix_expression [ expression ]
|
||||
//
|
||||
case 20: { action. consumeExpressionArraySubscript(); break;
|
||||
case 21: { action. consumeExpressionArraySubscript(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 21: postfix_expression ::= postfix_expression ( expression_list_opt )
|
||||
// Rule 22: postfix_expression ::= postfix_expression ( expression_list_opt )
|
||||
//
|
||||
case 21: { action. consumeExpressionFunctionCall(); break;
|
||||
case 22: { action. consumeExpressionFunctionCall(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 22: postfix_expression ::= postfix_expression . member_name
|
||||
// Rule 23: postfix_expression ::= postfix_expression . member_name
|
||||
//
|
||||
case 22: { action. consumeExpressionFieldReference(false); break;
|
||||
case 23: { action. consumeExpressionFieldReference(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 23: postfix_expression ::= postfix_expression -> member_name
|
||||
// Rule 24: postfix_expression ::= postfix_expression -> member_name
|
||||
//
|
||||
case 23: { action. consumeExpressionFieldReference(true); break;
|
||||
case 24: { action. consumeExpressionFieldReference(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 24: postfix_expression ::= postfix_expression ++
|
||||
// Rule 25: postfix_expression ::= postfix_expression ++
|
||||
//
|
||||
case 24: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); break;
|
||||
case 25: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 25: postfix_expression ::= postfix_expression --
|
||||
// Rule 26: postfix_expression ::= postfix_expression --
|
||||
//
|
||||
case 25: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); break;
|
||||
case 26: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 26: postfix_expression ::= ( type_id ) { <openscope-ast> initializer_list comma_opt }
|
||||
// Rule 27: postfix_expression ::= ( type_id ) { <openscope-ast> initializer_list comma_opt }
|
||||
//
|
||||
case 26: { action. consumeExpressionTypeIdInitializer(); break;
|
||||
case 27: { action. consumeExpressionTypeIdInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -781,489 +781,483 @@ public C99ExpressionParser(IParserActionTokenProvider parser) { // constructor
|
|||
}
|
||||
|
||||
//
|
||||
// Rule 178: typedef_name_in_declspec ::= Completion
|
||||
// Rule 178: type_name_specifier ::= identifier_token
|
||||
//
|
||||
case 178: { action. consumeToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 179: typedef_name_in_declspec ::= identifier
|
||||
// Rule 179: struct_or_union_specifier ::= struct_or_union struct_or_union_specifier_hook { <openscope-ast> struct_declaration_list_opt }
|
||||
//
|
||||
case 179: { action. consumeToken(); break;
|
||||
case 179: { action. consumeTypeSpecifierComposite(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 182: struct_or_union_specifier ::= struct_or_union struct_or_union_specifier_hook { <openscope-ast> struct_declaration_list_opt }
|
||||
// Rule 180: struct_or_union_specifier ::= struct_or_union struct_or_union_specifier_hook identifier_token struct_or_union_specifier_suffix_hook { <openscope-ast> struct_declaration_list_opt }
|
||||
//
|
||||
case 182: { action. consumeTypeSpecifierComposite(false); break;
|
||||
case 180: { action. consumeTypeSpecifierComposite(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 183: struct_or_union_specifier ::= struct_or_union struct_or_union_specifier_hook identifier_token struct_or_union_specifier_suffix_hook { <openscope-ast> struct_declaration_list_opt }
|
||||
// Rule 185: elaborated_specifier ::= struct elaborated_specifier_hook identifier_token
|
||||
//
|
||||
case 183: { action. consumeTypeSpecifierComposite(true); break;
|
||||
case 185: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_struct); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 188: elaborated_specifier ::= struct elaborated_specifier_hook identifier_token
|
||||
// Rule 186: elaborated_specifier ::= union elaborated_specifier_hook identifier_token
|
||||
//
|
||||
case 188: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_struct); break;
|
||||
case 186: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_union); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 189: elaborated_specifier ::= union elaborated_specifier_hook identifier_token
|
||||
// Rule 187: elaborated_specifier ::= enum elaborated_specifier_hook identifier_token
|
||||
//
|
||||
case 189: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_union); break;
|
||||
case 187: { action. consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_enum); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 190: elaborated_specifier ::= enum elaborated_specifier_hook identifier_token
|
||||
// Rule 193: struct_declaration ::= specifier_qualifier_list <openscope-ast> struct_declarator_list ;
|
||||
//
|
||||
case 190: { action. consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_enum); break;
|
||||
case 193: { action. consumeStructDeclaration(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 196: struct_declaration ::= specifier_qualifier_list <openscope-ast> struct_declarator_list ;
|
||||
// Rule 194: struct_declaration ::= specifier_qualifier_list ;
|
||||
//
|
||||
case 196: { action. consumeStructDeclaration(true); break;
|
||||
case 194: { action. consumeStructDeclaration(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 197: struct_declaration ::= specifier_qualifier_list ;
|
||||
// Rule 195: struct_declaration ::= ERROR_TOKEN
|
||||
//
|
||||
case 197: { action. consumeStructDeclaration(false); break;
|
||||
case 195: { action. consumeDeclarationProblem(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 198: struct_declaration ::= ERROR_TOKEN
|
||||
// Rule 201: struct_declarator ::= : constant_expression
|
||||
//
|
||||
case 198: { action. consumeDeclarationProblem(); break;
|
||||
case 201: { action. consumeBitField(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 204: struct_declarator ::= : constant_expression
|
||||
// Rule 202: struct_declarator ::= declarator : constant_expression
|
||||
//
|
||||
case 204: { action. consumeBitField(false); break;
|
||||
case 202: { action. consumeBitField(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 205: struct_declarator ::= declarator : constant_expression
|
||||
// Rule 203: enum_specifier ::= enum enum_specifier_hook { <openscope-ast> enumerator_list_opt comma_opt }
|
||||
//
|
||||
case 205: { action. consumeBitField(true); break;
|
||||
case 203: { action. consumeTypeSpecifierEnumeration(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 206: enum_specifier ::= enum enum_specifier_hook { <openscope-ast> enumerator_list_opt comma_opt }
|
||||
// Rule 204: enum_specifier ::= enum enum_specifier_hook identifier_token { <openscope-ast> enumerator_list_opt comma_opt }
|
||||
//
|
||||
case 206: { action. consumeTypeSpecifierEnumeration(false); break;
|
||||
case 204: { action. consumeTypeSpecifierEnumeration(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 207: enum_specifier ::= enum enum_specifier_hook identifier_token { <openscope-ast> enumerator_list_opt comma_opt }
|
||||
// Rule 210: enumerator ::= identifier_token
|
||||
//
|
||||
case 207: { action. consumeTypeSpecifierEnumeration(true); break;
|
||||
case 210: { action. consumeEnumerator(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 213: enumerator ::= identifier_token
|
||||
// Rule 211: enumerator ::= identifier_token = constant_expression
|
||||
//
|
||||
case 213: { action. consumeEnumerator(false); break;
|
||||
case 211: { action. consumeEnumerator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 214: enumerator ::= identifier_token = constant_expression
|
||||
// Rule 212: type_qualifier ::= type_qualifier_token
|
||||
//
|
||||
case 214: { action. consumeEnumerator(true); break;
|
||||
case 212: { action. consumeToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 215: type_qualifier ::= type_qualifier_token
|
||||
// Rule 216: function_specifier ::= inline
|
||||
//
|
||||
case 215: { action. consumeToken(); break;
|
||||
case 216: { action. consumeToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 219: function_specifier ::= inline
|
||||
// Rule 218: declarator ::= <openscope-ast> pointer_seq direct_declarator
|
||||
//
|
||||
case 219: { action. consumeToken(); break;
|
||||
case 218: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 221: declarator ::= <openscope-ast> pointer_seq direct_declarator
|
||||
// Rule 223: basic_direct_declarator ::= declarator_id_name
|
||||
//
|
||||
case 221: { action. consumeDeclaratorWithPointer(true); break;
|
||||
case 223: { action. consumeDirectDeclaratorIdentifier(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 226: basic_direct_declarator ::= declarator_id_name
|
||||
// Rule 224: basic_direct_declarator ::= ( declarator )
|
||||
//
|
||||
case 226: { action. consumeDirectDeclaratorIdentifier(); break;
|
||||
case 224: { action. consumeDirectDeclaratorBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 227: basic_direct_declarator ::= ( declarator )
|
||||
// Rule 225: declarator_id_name ::= identifier
|
||||
//
|
||||
case 227: { action. consumeDirectDeclaratorBracketed(); break;
|
||||
case 225: { action. consumeIdentifierName(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 228: declarator_id_name ::= identifier
|
||||
// Rule 226: array_direct_declarator ::= basic_direct_declarator array_modifier
|
||||
//
|
||||
case 228: { action. consumeIdentifierName(); break;
|
||||
case 226: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 229: array_direct_declarator ::= basic_direct_declarator array_modifier
|
||||
// Rule 227: array_direct_declarator ::= array_direct_declarator array_modifier
|
||||
//
|
||||
case 229: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
case 227: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 230: array_direct_declarator ::= array_direct_declarator array_modifier
|
||||
// Rule 229: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list )
|
||||
//
|
||||
case 230: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
case 229: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 232: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list )
|
||||
// Rule 230: function_direct_declarator ::= basic_direct_declarator ( )
|
||||
//
|
||||
case 232: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
|
||||
case 230: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 233: function_direct_declarator ::= basic_direct_declarator ( )
|
||||
// Rule 232: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator
|
||||
//
|
||||
case 233: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
|
||||
case 232: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 235: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator
|
||||
// Rule 233: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list )
|
||||
//
|
||||
case 233: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 235: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator
|
||||
//
|
||||
case 235: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 236: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list )
|
||||
// Rule 236: identifier_list ::= identifier
|
||||
//
|
||||
case 236: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break;
|
||||
case 236: { action. consumeIdentifierKnR(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 238: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator
|
||||
// Rule 237: identifier_list ::= identifier_list , identifier
|
||||
//
|
||||
case 238: { action. consumeDeclaratorWithPointer(true); break;
|
||||
case 237: { action. consumeIdentifierKnR(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 239: identifier_list ::= identifier
|
||||
// Rule 238: array_modifier ::= [ ]
|
||||
//
|
||||
case 239: { action. consumeIdentifierKnR(); break;
|
||||
case 238: { action. consumeDirectDeclaratorArrayModifier(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 240: identifier_list ::= identifier_list , identifier
|
||||
// Rule 239: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
|
||||
//
|
||||
case 240: { action. consumeIdentifierKnR(); break;
|
||||
case 239: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 241: array_modifier ::= [ ]
|
||||
// Rule 240: array_modifier ::= [ assignment_expression ]
|
||||
//
|
||||
case 241: { action. consumeDirectDeclaratorArrayModifier(false); break;
|
||||
case 240: { action. consumeDirectDeclaratorArrayModifier(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 242: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
|
||||
// Rule 241: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
//
|
||||
case 242: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
|
||||
case 241: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 243: array_modifier ::= [ assignment_expression ]
|
||||
// Rule 242: array_modifier ::= [ static assignment_expression ]
|
||||
//
|
||||
case 243: { action. consumeDirectDeclaratorArrayModifier(true); break;
|
||||
case 242: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 244: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
// Rule 243: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
//
|
||||
case 244: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
|
||||
case 243: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 245: array_modifier ::= [ static assignment_expression ]
|
||||
// Rule 244: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
|
||||
//
|
||||
case 245: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
|
||||
case 244: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 246: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
// Rule 245: array_modifier ::= [ * ]
|
||||
//
|
||||
case 246: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
case 245: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 247: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
|
||||
// Rule 246: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
|
||||
//
|
||||
case 247: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
case 246: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 248: array_modifier ::= [ * ]
|
||||
// Rule 248: pointer_seq ::= pointer_hook *
|
||||
//
|
||||
case 248: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
|
||||
case 248: { action. consumePointer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 249: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
|
||||
// Rule 249: pointer_seq ::= pointer_seq pointer_hook *
|
||||
//
|
||||
case 249: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
|
||||
case 249: { action. consumePointer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 251: pointer_seq ::= pointer_hook *
|
||||
// Rule 250: pointer_seq ::= pointer_hook * <openscope-ast> type_qualifier_list
|
||||
//
|
||||
case 251: { action. consumePointer(); break;
|
||||
case 250: { action. consumePointerTypeQualifierList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 252: pointer_seq ::= pointer_seq pointer_hook *
|
||||
// Rule 251: pointer_seq ::= pointer_seq pointer_hook * <openscope-ast> type_qualifier_list
|
||||
//
|
||||
case 252: { action. consumePointer(); break;
|
||||
case 251: { action. consumePointerTypeQualifierList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 253: pointer_seq ::= pointer_hook * <openscope-ast> type_qualifier_list
|
||||
// Rule 255: parameter_type_list ::= parameter_list
|
||||
//
|
||||
case 253: { action. consumePointerTypeQualifierList(); break;
|
||||
case 255: { action. consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 254: pointer_seq ::= pointer_seq pointer_hook * <openscope-ast> type_qualifier_list
|
||||
// Rule 256: parameter_type_list ::= parameter_list , ...
|
||||
//
|
||||
case 254: { action. consumePointerTypeQualifierList(); break;
|
||||
case 256: { action. consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 258: parameter_type_list ::= parameter_list
|
||||
// Rule 257: parameter_type_list ::= ...
|
||||
//
|
||||
case 258: { action. consumeEmpty(); break;
|
||||
case 257: { action. consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 259: parameter_type_list ::= parameter_list , ...
|
||||
// Rule 260: parameter_declaration ::= declaration_specifiers complete_parameter_declarator
|
||||
//
|
||||
case 259: { action. consumePlaceHolder(); break;
|
||||
case 260: { action. consumeParameterDeclaration(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 260: parameter_type_list ::= ...
|
||||
// Rule 261: parameter_declaration ::= declaration_specifiers
|
||||
//
|
||||
case 260: { action. consumePlaceHolder(); break;
|
||||
case 261: { action. consumeParameterDeclarationWithoutDeclarator(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 263: parameter_declaration ::= declaration_specifiers complete_parameter_declarator
|
||||
// Rule 264: type_id ::= specifier_qualifier_list
|
||||
//
|
||||
case 263: { action. consumeParameterDeclaration(); break;
|
||||
case 264: { action. consumeTypeId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 264: parameter_declaration ::= declaration_specifiers
|
||||
// Rule 265: type_id ::= specifier_qualifier_list abstract_declarator
|
||||
//
|
||||
case 264: { action. consumeParameterDeclarationWithoutDeclarator(); break;
|
||||
case 265: { action. consumeTypeId(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 267: type_id ::= specifier_qualifier_list
|
||||
// Rule 267: abstract_declarator ::= <openscope-ast> pointer_seq
|
||||
//
|
||||
case 267: { action. consumeTypeId(false); break;
|
||||
case 267: { action. consumeDeclaratorWithPointer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 268: type_id ::= specifier_qualifier_list abstract_declarator
|
||||
// Rule 268: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
//
|
||||
case 268: { action. consumeTypeId(true); break;
|
||||
case 268: { action. consumeDeclaratorWithPointer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 270: abstract_declarator ::= <openscope-ast> pointer_seq
|
||||
// Rule 272: basic_direct_abstract_declarator ::= ( abstract_declarator )
|
||||
//
|
||||
case 270: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 272: { action. consumeDirectDeclaratorBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 271: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
// Rule 273: array_direct_abstract_declarator ::= array_modifier
|
||||
//
|
||||
case 271: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 273: { action. consumeDirectDeclaratorArrayDeclarator(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 275: basic_direct_abstract_declarator ::= ( abstract_declarator )
|
||||
// Rule 274: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 275: { action. consumeDirectDeclaratorBracketed(); break;
|
||||
case 274: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 276: array_direct_abstract_declarator ::= array_modifier
|
||||
// Rule 275: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 276: { action. consumeDirectDeclaratorArrayDeclarator(false); break;
|
||||
case 275: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 277: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
|
||||
// Rule 276: function_direct_abstract_declarator ::= ( )
|
||||
//
|
||||
case 277: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 278: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 278: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 279: function_direct_abstract_declarator ::= ( )
|
||||
//
|
||||
case 279: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break;
|
||||
case 276: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 280: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( )
|
||||
// Rule 277: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( )
|
||||
//
|
||||
case 280: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
|
||||
case 277: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 281: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list )
|
||||
// Rule 278: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list )
|
||||
//
|
||||
case 281: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break;
|
||||
case 278: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 282: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list )
|
||||
// Rule 279: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list )
|
||||
//
|
||||
case 282: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
|
||||
case 279: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 283: initializer ::= assignment_expression
|
||||
// Rule 280: initializer ::= assignment_expression
|
||||
//
|
||||
case 283: { action. consumeInitializer(); break;
|
||||
case 280: { action. consumeInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 284: initializer ::= start_initializer_list { <openscope-ast> initializer_list comma_opt } end_initializer_list
|
||||
// Rule 281: initializer ::= start_initializer_list { <openscope-ast> initializer_list comma_opt } end_initializer_list
|
||||
//
|
||||
case 284: { action. consumeInitializerList(); break;
|
||||
case 281: { action. consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 285: initializer ::= { <openscope-ast> }
|
||||
// Rule 282: initializer ::= { <openscope-ast> }
|
||||
//
|
||||
case 285: { action. consumeInitializerList(); break;
|
||||
case 282: { action. consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 286: start_initializer_list ::= $Empty
|
||||
// Rule 283: start_initializer_list ::= $Empty
|
||||
//
|
||||
case 286: { action. initializerListStart(); break;
|
||||
case 283: { action. initializerListStart(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 287: end_initializer_list ::= $Empty
|
||||
// Rule 284: end_initializer_list ::= $Empty
|
||||
//
|
||||
case 287: { action. initializerListEnd(); break;
|
||||
case 284: { action. initializerListEnd(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 292: designated_initializer ::= <openscope-ast> designation = initializer
|
||||
// Rule 289: designated_initializer ::= <openscope-ast> designation = initializer
|
||||
//
|
||||
case 292: { action. consumeInitializerDesignated(); break;
|
||||
case 289: { action. consumeInitializerDesignated(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 296: designator_base ::= [ constant_expression ]
|
||||
// Rule 293: designator_base ::= [ constant_expression ]
|
||||
//
|
||||
case 296: { action. consumeDesignatorArray(); break;
|
||||
case 293: { action. consumeDesignatorArray(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 297: designator_base ::= . identifier_token
|
||||
// Rule 294: designator_base ::= . identifier_token
|
||||
//
|
||||
case 297: { action. consumeDesignatorField(); break;
|
||||
case 294: { action. consumeDesignatorField(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 298: designator ::= [ constant_expression ]
|
||||
// Rule 295: designator ::= [ constant_expression ]
|
||||
//
|
||||
case 298: { action. consumeDesignatorArray(); break;
|
||||
case 295: { action. consumeDesignatorArray(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 299: designator ::= . identifier_token
|
||||
// Rule 296: designator ::= . identifier_token
|
||||
//
|
||||
case 299: { action. consumeDesignatorField(); break;
|
||||
case 296: { action. consumeDesignatorField(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 300: translation_unit ::= external_declaration_list
|
||||
// Rule 297: translation_unit ::= external_declaration_list
|
||||
//
|
||||
case 300: { action. consumeTranslationUnit(); break;
|
||||
case 297: { action. consumeTranslationUnit(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 301: translation_unit ::= $Empty
|
||||
// Rule 298: translation_unit ::= $Empty
|
||||
//
|
||||
case 301: { action. consumeTranslationUnit(); break;
|
||||
case 298: { action. consumeTranslationUnit(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 306: external_declaration ::= ;
|
||||
// Rule 303: external_declaration ::= ;
|
||||
//
|
||||
case 306: { action. consumeDeclarationEmpty(); break;
|
||||
case 303: { action. consumeDeclarationEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 307: external_declaration ::= ERROR_TOKEN
|
||||
// Rule 304: external_declaration ::= ERROR_TOKEN
|
||||
//
|
||||
case 307: { action. consumeDeclarationProblem(); break;
|
||||
case 304: { action. consumeDeclarationProblem(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 310: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
|
||||
// Rule 307: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
|
||||
//
|
||||
case 310: { action. consumeFunctionDefinition(true); break;
|
||||
case 307: { action. consumeFunctionDefinition(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 311: function_definition ::= <openscope-ast> function_declarator function_body
|
||||
// Rule 308: function_definition ::= <openscope-ast> function_declarator function_body
|
||||
//
|
||||
case 311: { action. consumeFunctionDefinition(false); break;
|
||||
case 308: { action. consumeFunctionDefinition(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 312: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
|
||||
// Rule 309: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
|
||||
//
|
||||
case 312: { action. consumeFunctionDefinitionKnR(); break;
|
||||
case 309: { action. consumeFunctionDefinitionKnR(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 313: function_body ::= { }
|
||||
// Rule 310: function_body ::= { }
|
||||
//
|
||||
case 313: { action. consumeStatementCompoundStatement(false); break;
|
||||
case 310: { action. consumeStatementCompoundStatement(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 314: function_body ::= { <openscope-ast> block_item_list }
|
||||
// Rule 311: function_body ::= { <openscope-ast> block_item_list }
|
||||
//
|
||||
case 314: { action. consumeStatementCompoundStatement(true); break;
|
||||
case 311: { action. consumeStatementCompoundStatement(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 316: expression_parser_start ::= ERROR_TOKEN
|
||||
// Rule 313: expression_parser_start ::= ERROR_TOKEN
|
||||
//
|
||||
case 316: { action. consumeExpressionProblem(); break;
|
||||
case 313: { action. consumeExpressionProblem(); break;
|
||||
}
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -39,8 +39,8 @@ public interface C99ExpressionParsersym {
|
|||
TK_return = 90,
|
||||
TK_short = 36,
|
||||
TK_signed = 37,
|
||||
TK_sizeof = 16,
|
||||
TK_static = 17,
|
||||
TK_sizeof = 15,
|
||||
TK_static = 23,
|
||||
TK_struct = 45,
|
||||
TK_switch = 91,
|
||||
TK_typedef = 28,
|
||||
|
@ -52,27 +52,27 @@ public interface C99ExpressionParsersym {
|
|||
TK__Bool = 40,
|
||||
TK__Complex = 41,
|
||||
TK__Imaginary = 42,
|
||||
TK_integer = 18,
|
||||
TK_floating = 19,
|
||||
TK_charconst = 20,
|
||||
TK_stringlit = 21,
|
||||
TK_integer = 16,
|
||||
TK_floating = 17,
|
||||
TK_charconst = 18,
|
||||
TK_stringlit = 19,
|
||||
TK_identifier = 1,
|
||||
TK_Completion = 3,
|
||||
TK_EndOfCompletion = 5,
|
||||
TK_Invalid = 93,
|
||||
TK_LeftBracket = 12,
|
||||
TK_LeftBracket = 20,
|
||||
TK_LeftParen = 2,
|
||||
TK_LeftBrace = 13,
|
||||
TK_LeftBrace = 12,
|
||||
TK_Dot = 52,
|
||||
TK_Arrow = 67,
|
||||
TK_PlusPlus = 14,
|
||||
TK_MinusMinus = 15,
|
||||
TK_PlusPlus = 13,
|
||||
TK_MinusMinus = 14,
|
||||
TK_And = 11,
|
||||
TK_Star = 4,
|
||||
TK_Plus = 9,
|
||||
TK_Minus = 10,
|
||||
TK_Tilde = 22,
|
||||
TK_Bang = 23,
|
||||
TK_Tilde = 21,
|
||||
TK_Bang = 22,
|
||||
TK_Slash = 53,
|
||||
TK_Percent = 54,
|
||||
TK_RightShift = 47,
|
||||
|
@ -101,9 +101,9 @@ public interface C99ExpressionParsersym {
|
|||
TK_AndAssign = 77,
|
||||
TK_CaretAssign = 78,
|
||||
TK_OrAssign = 79,
|
||||
TK_Comma = 30,
|
||||
TK_Comma = 29,
|
||||
TK_RightBracket = 50,
|
||||
TK_RightParen = 29,
|
||||
TK_RightParen = 30,
|
||||
TK_RightBrace = 43,
|
||||
TK_SemiColon = 66,
|
||||
TK_ERROR_TOKEN = 51,
|
||||
|
@ -122,25 +122,25 @@ public interface C99ExpressionParsersym {
|
|||
"Plus",
|
||||
"Minus",
|
||||
"And",
|
||||
"LeftBracket",
|
||||
"LeftBrace",
|
||||
"PlusPlus",
|
||||
"MinusMinus",
|
||||
"sizeof",
|
||||
"static",
|
||||
"integer",
|
||||
"floating",
|
||||
"charconst",
|
||||
"stringlit",
|
||||
"LeftBracket",
|
||||
"Tilde",
|
||||
"Bang",
|
||||
"static",
|
||||
"auto",
|
||||
"extern",
|
||||
"inline",
|
||||
"register",
|
||||
"typedef",
|
||||
"RightParen",
|
||||
"Comma",
|
||||
"RightParen",
|
||||
"char",
|
||||
"double",
|
||||
"float",
|
||||
|
|
|
@ -253,81 +253,81 @@ public C99NoCastExpressionParser(IParserActionTokenProvider parser) { // constr
|
|||
}
|
||||
|
||||
//
|
||||
// Rule 10: literal ::= integer
|
||||
// Rule 12: literal ::= integer
|
||||
//
|
||||
case 10: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_integer_constant); break;
|
||||
case 12: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_integer_constant); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 11: literal ::= floating
|
||||
// Rule 13: literal ::= floating
|
||||
//
|
||||
case 11: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_float_constant); break;
|
||||
case 13: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_float_constant); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 12: literal ::= charconst
|
||||
// Rule 14: literal ::= charconst
|
||||
//
|
||||
case 12: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_char_constant); break;
|
||||
case 14: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_char_constant); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 13: literal ::= stringlit
|
||||
// Rule 15: literal ::= stringlit
|
||||
//
|
||||
case 13: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_string_literal); break;
|
||||
case 15: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_string_literal); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 15: primary_expression ::= primary_expression_id
|
||||
// Rule 17: primary_expression ::= primary_expression_id
|
||||
//
|
||||
case 15: { action. consumeExpressionID(); break;
|
||||
case 17: { action. consumeExpressionID(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 16: primary_expression ::= ( expression )
|
||||
// Rule 18: primary_expression ::= ( expression )
|
||||
//
|
||||
case 16: { action. consumeExpressionBracketed(); break;
|
||||
case 18: { action. consumeExpressionBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 20: postfix_expression ::= postfix_expression [ expression ]
|
||||
// Rule 21: postfix_expression ::= postfix_expression [ expression ]
|
||||
//
|
||||
case 20: { action. consumeExpressionArraySubscript(); break;
|
||||
case 21: { action. consumeExpressionArraySubscript(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 21: postfix_expression ::= postfix_expression ( expression_list_opt )
|
||||
// Rule 22: postfix_expression ::= postfix_expression ( expression_list_opt )
|
||||
//
|
||||
case 21: { action. consumeExpressionFunctionCall(); break;
|
||||
case 22: { action. consumeExpressionFunctionCall(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 22: postfix_expression ::= postfix_expression . member_name
|
||||
// Rule 23: postfix_expression ::= postfix_expression . member_name
|
||||
//
|
||||
case 22: { action. consumeExpressionFieldReference(false); break;
|
||||
case 23: { action. consumeExpressionFieldReference(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 23: postfix_expression ::= postfix_expression -> member_name
|
||||
// Rule 24: postfix_expression ::= postfix_expression -> member_name
|
||||
//
|
||||
case 23: { action. consumeExpressionFieldReference(true); break;
|
||||
case 24: { action. consumeExpressionFieldReference(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 24: postfix_expression ::= postfix_expression ++
|
||||
// Rule 25: postfix_expression ::= postfix_expression ++
|
||||
//
|
||||
case 24: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); break;
|
||||
case 25: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 25: postfix_expression ::= postfix_expression --
|
||||
// Rule 26: postfix_expression ::= postfix_expression --
|
||||
//
|
||||
case 25: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); break;
|
||||
case 26: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 26: postfix_expression ::= ( type_id ) { <openscope-ast> initializer_list comma_opt }
|
||||
// Rule 27: postfix_expression ::= ( type_id ) { <openscope-ast> initializer_list comma_opt }
|
||||
//
|
||||
case 26: { action. consumeExpressionTypeIdInitializer(); break;
|
||||
case 27: { action. consumeExpressionTypeIdInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -775,489 +775,483 @@ public C99NoCastExpressionParser(IParserActionTokenProvider parser) { // constr
|
|||
}
|
||||
|
||||
//
|
||||
// Rule 177: typedef_name_in_declspec ::= Completion
|
||||
// Rule 177: type_name_specifier ::= identifier_token
|
||||
//
|
||||
case 177: { action. consumeToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 178: typedef_name_in_declspec ::= identifier
|
||||
// Rule 178: struct_or_union_specifier ::= struct_or_union struct_or_union_specifier_hook { <openscope-ast> struct_declaration_list_opt }
|
||||
//
|
||||
case 178: { action. consumeToken(); break;
|
||||
case 178: { action. consumeTypeSpecifierComposite(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 181: struct_or_union_specifier ::= struct_or_union struct_or_union_specifier_hook { <openscope-ast> struct_declaration_list_opt }
|
||||
// Rule 179: struct_or_union_specifier ::= struct_or_union struct_or_union_specifier_hook identifier_token struct_or_union_specifier_suffix_hook { <openscope-ast> struct_declaration_list_opt }
|
||||
//
|
||||
case 181: { action. consumeTypeSpecifierComposite(false); break;
|
||||
case 179: { action. consumeTypeSpecifierComposite(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 182: struct_or_union_specifier ::= struct_or_union struct_or_union_specifier_hook identifier_token struct_or_union_specifier_suffix_hook { <openscope-ast> struct_declaration_list_opt }
|
||||
// Rule 184: elaborated_specifier ::= struct elaborated_specifier_hook identifier_token
|
||||
//
|
||||
case 182: { action. consumeTypeSpecifierComposite(true); break;
|
||||
case 184: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_struct); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 187: elaborated_specifier ::= struct elaborated_specifier_hook identifier_token
|
||||
// Rule 185: elaborated_specifier ::= union elaborated_specifier_hook identifier_token
|
||||
//
|
||||
case 187: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_struct); break;
|
||||
case 185: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_union); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 188: elaborated_specifier ::= union elaborated_specifier_hook identifier_token
|
||||
// Rule 186: elaborated_specifier ::= enum elaborated_specifier_hook identifier_token
|
||||
//
|
||||
case 188: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_union); break;
|
||||
case 186: { action. consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_enum); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 189: elaborated_specifier ::= enum elaborated_specifier_hook identifier_token
|
||||
// Rule 192: struct_declaration ::= specifier_qualifier_list <openscope-ast> struct_declarator_list ;
|
||||
//
|
||||
case 189: { action. consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_enum); break;
|
||||
case 192: { action. consumeStructDeclaration(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 195: struct_declaration ::= specifier_qualifier_list <openscope-ast> struct_declarator_list ;
|
||||
// Rule 193: struct_declaration ::= specifier_qualifier_list ;
|
||||
//
|
||||
case 195: { action. consumeStructDeclaration(true); break;
|
||||
case 193: { action. consumeStructDeclaration(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 196: struct_declaration ::= specifier_qualifier_list ;
|
||||
// Rule 194: struct_declaration ::= ERROR_TOKEN
|
||||
//
|
||||
case 196: { action. consumeStructDeclaration(false); break;
|
||||
case 194: { action. consumeDeclarationProblem(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 197: struct_declaration ::= ERROR_TOKEN
|
||||
// Rule 200: struct_declarator ::= : constant_expression
|
||||
//
|
||||
case 197: { action. consumeDeclarationProblem(); break;
|
||||
case 200: { action. consumeBitField(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 203: struct_declarator ::= : constant_expression
|
||||
// Rule 201: struct_declarator ::= declarator : constant_expression
|
||||
//
|
||||
case 203: { action. consumeBitField(false); break;
|
||||
case 201: { action. consumeBitField(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 204: struct_declarator ::= declarator : constant_expression
|
||||
// Rule 202: enum_specifier ::= enum enum_specifier_hook { <openscope-ast> enumerator_list_opt comma_opt }
|
||||
//
|
||||
case 204: { action. consumeBitField(true); break;
|
||||
case 202: { action. consumeTypeSpecifierEnumeration(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 205: enum_specifier ::= enum enum_specifier_hook { <openscope-ast> enumerator_list_opt comma_opt }
|
||||
// Rule 203: enum_specifier ::= enum enum_specifier_hook identifier_token { <openscope-ast> enumerator_list_opt comma_opt }
|
||||
//
|
||||
case 205: { action. consumeTypeSpecifierEnumeration(false); break;
|
||||
case 203: { action. consumeTypeSpecifierEnumeration(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 206: enum_specifier ::= enum enum_specifier_hook identifier_token { <openscope-ast> enumerator_list_opt comma_opt }
|
||||
// Rule 209: enumerator ::= identifier_token
|
||||
//
|
||||
case 206: { action. consumeTypeSpecifierEnumeration(true); break;
|
||||
case 209: { action. consumeEnumerator(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 212: enumerator ::= identifier_token
|
||||
// Rule 210: enumerator ::= identifier_token = constant_expression
|
||||
//
|
||||
case 212: { action. consumeEnumerator(false); break;
|
||||
case 210: { action. consumeEnumerator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 213: enumerator ::= identifier_token = constant_expression
|
||||
// Rule 211: type_qualifier ::= type_qualifier_token
|
||||
//
|
||||
case 213: { action. consumeEnumerator(true); break;
|
||||
case 211: { action. consumeToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 214: type_qualifier ::= type_qualifier_token
|
||||
// Rule 215: function_specifier ::= inline
|
||||
//
|
||||
case 214: { action. consumeToken(); break;
|
||||
case 215: { action. consumeToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 218: function_specifier ::= inline
|
||||
// Rule 217: declarator ::= <openscope-ast> pointer_seq direct_declarator
|
||||
//
|
||||
case 218: { action. consumeToken(); break;
|
||||
case 217: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 220: declarator ::= <openscope-ast> pointer_seq direct_declarator
|
||||
// Rule 222: basic_direct_declarator ::= declarator_id_name
|
||||
//
|
||||
case 220: { action. consumeDeclaratorWithPointer(true); break;
|
||||
case 222: { action. consumeDirectDeclaratorIdentifier(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 225: basic_direct_declarator ::= declarator_id_name
|
||||
// Rule 223: basic_direct_declarator ::= ( declarator )
|
||||
//
|
||||
case 225: { action. consumeDirectDeclaratorIdentifier(); break;
|
||||
case 223: { action. consumeDirectDeclaratorBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 226: basic_direct_declarator ::= ( declarator )
|
||||
// Rule 224: declarator_id_name ::= identifier
|
||||
//
|
||||
case 226: { action. consumeDirectDeclaratorBracketed(); break;
|
||||
case 224: { action. consumeIdentifierName(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 227: declarator_id_name ::= identifier
|
||||
// Rule 225: array_direct_declarator ::= basic_direct_declarator array_modifier
|
||||
//
|
||||
case 227: { action. consumeIdentifierName(); break;
|
||||
case 225: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 228: array_direct_declarator ::= basic_direct_declarator array_modifier
|
||||
// Rule 226: array_direct_declarator ::= array_direct_declarator array_modifier
|
||||
//
|
||||
case 228: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
case 226: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 229: array_direct_declarator ::= array_direct_declarator array_modifier
|
||||
// Rule 228: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list )
|
||||
//
|
||||
case 229: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
case 228: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 231: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list )
|
||||
// Rule 229: function_direct_declarator ::= basic_direct_declarator ( )
|
||||
//
|
||||
case 231: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
|
||||
case 229: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 232: function_direct_declarator ::= basic_direct_declarator ( )
|
||||
// Rule 231: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator
|
||||
//
|
||||
case 232: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
|
||||
case 231: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 234: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator
|
||||
// Rule 232: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list )
|
||||
//
|
||||
case 232: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 234: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator
|
||||
//
|
||||
case 234: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 235: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list )
|
||||
// Rule 235: identifier_list ::= identifier
|
||||
//
|
||||
case 235: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break;
|
||||
case 235: { action. consumeIdentifierKnR(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 237: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator
|
||||
// Rule 236: identifier_list ::= identifier_list , identifier
|
||||
//
|
||||
case 237: { action. consumeDeclaratorWithPointer(true); break;
|
||||
case 236: { action. consumeIdentifierKnR(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 238: identifier_list ::= identifier
|
||||
// Rule 237: array_modifier ::= [ ]
|
||||
//
|
||||
case 238: { action. consumeIdentifierKnR(); break;
|
||||
case 237: { action. consumeDirectDeclaratorArrayModifier(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 239: identifier_list ::= identifier_list , identifier
|
||||
// Rule 238: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
|
||||
//
|
||||
case 239: { action. consumeIdentifierKnR(); break;
|
||||
case 238: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 240: array_modifier ::= [ ]
|
||||
// Rule 239: array_modifier ::= [ assignment_expression ]
|
||||
//
|
||||
case 240: { action. consumeDirectDeclaratorArrayModifier(false); break;
|
||||
case 239: { action. consumeDirectDeclaratorArrayModifier(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 241: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
|
||||
// Rule 240: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
//
|
||||
case 241: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
|
||||
case 240: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 242: array_modifier ::= [ assignment_expression ]
|
||||
// Rule 241: array_modifier ::= [ static assignment_expression ]
|
||||
//
|
||||
case 242: { action. consumeDirectDeclaratorArrayModifier(true); break;
|
||||
case 241: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 243: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
// Rule 242: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
//
|
||||
case 243: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
|
||||
case 242: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 244: array_modifier ::= [ static assignment_expression ]
|
||||
// Rule 243: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
|
||||
//
|
||||
case 244: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
|
||||
case 243: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 245: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
// Rule 244: array_modifier ::= [ * ]
|
||||
//
|
||||
case 245: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
case 244: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 246: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
|
||||
// Rule 245: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
|
||||
//
|
||||
case 246: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
case 245: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 247: array_modifier ::= [ * ]
|
||||
// Rule 247: pointer_seq ::= pointer_hook *
|
||||
//
|
||||
case 247: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
|
||||
case 247: { action. consumePointer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 248: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
|
||||
// Rule 248: pointer_seq ::= pointer_seq pointer_hook *
|
||||
//
|
||||
case 248: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
|
||||
case 248: { action. consumePointer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 250: pointer_seq ::= pointer_hook *
|
||||
// Rule 249: pointer_seq ::= pointer_hook * <openscope-ast> type_qualifier_list
|
||||
//
|
||||
case 250: { action. consumePointer(); break;
|
||||
case 249: { action. consumePointerTypeQualifierList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 251: pointer_seq ::= pointer_seq pointer_hook *
|
||||
// Rule 250: pointer_seq ::= pointer_seq pointer_hook * <openscope-ast> type_qualifier_list
|
||||
//
|
||||
case 251: { action. consumePointer(); break;
|
||||
case 250: { action. consumePointerTypeQualifierList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 252: pointer_seq ::= pointer_hook * <openscope-ast> type_qualifier_list
|
||||
// Rule 254: parameter_type_list ::= parameter_list
|
||||
//
|
||||
case 252: { action. consumePointerTypeQualifierList(); break;
|
||||
case 254: { action. consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 253: pointer_seq ::= pointer_seq pointer_hook * <openscope-ast> type_qualifier_list
|
||||
// Rule 255: parameter_type_list ::= parameter_list , ...
|
||||
//
|
||||
case 253: { action. consumePointerTypeQualifierList(); break;
|
||||
case 255: { action. consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 257: parameter_type_list ::= parameter_list
|
||||
// Rule 256: parameter_type_list ::= ...
|
||||
//
|
||||
case 257: { action. consumeEmpty(); break;
|
||||
case 256: { action. consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 258: parameter_type_list ::= parameter_list , ...
|
||||
// Rule 259: parameter_declaration ::= declaration_specifiers complete_parameter_declarator
|
||||
//
|
||||
case 258: { action. consumePlaceHolder(); break;
|
||||
case 259: { action. consumeParameterDeclaration(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 259: parameter_type_list ::= ...
|
||||
// Rule 260: parameter_declaration ::= declaration_specifiers
|
||||
//
|
||||
case 259: { action. consumePlaceHolder(); break;
|
||||
case 260: { action. consumeParameterDeclarationWithoutDeclarator(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 262: parameter_declaration ::= declaration_specifiers complete_parameter_declarator
|
||||
// Rule 263: type_id ::= specifier_qualifier_list
|
||||
//
|
||||
case 262: { action. consumeParameterDeclaration(); break;
|
||||
case 263: { action. consumeTypeId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 263: parameter_declaration ::= declaration_specifiers
|
||||
// Rule 264: type_id ::= specifier_qualifier_list abstract_declarator
|
||||
//
|
||||
case 263: { action. consumeParameterDeclarationWithoutDeclarator(); break;
|
||||
case 264: { action. consumeTypeId(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 266: type_id ::= specifier_qualifier_list
|
||||
// Rule 266: abstract_declarator ::= <openscope-ast> pointer_seq
|
||||
//
|
||||
case 266: { action. consumeTypeId(false); break;
|
||||
case 266: { action. consumeDeclaratorWithPointer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 267: type_id ::= specifier_qualifier_list abstract_declarator
|
||||
// Rule 267: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
//
|
||||
case 267: { action. consumeTypeId(true); break;
|
||||
case 267: { action. consumeDeclaratorWithPointer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 269: abstract_declarator ::= <openscope-ast> pointer_seq
|
||||
// Rule 271: basic_direct_abstract_declarator ::= ( abstract_declarator )
|
||||
//
|
||||
case 269: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 271: { action. consumeDirectDeclaratorBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 270: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
// Rule 272: array_direct_abstract_declarator ::= array_modifier
|
||||
//
|
||||
case 270: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 272: { action. consumeDirectDeclaratorArrayDeclarator(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 274: basic_direct_abstract_declarator ::= ( abstract_declarator )
|
||||
// Rule 273: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 274: { action. consumeDirectDeclaratorBracketed(); break;
|
||||
case 273: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 275: array_direct_abstract_declarator ::= array_modifier
|
||||
// Rule 274: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 275: { action. consumeDirectDeclaratorArrayDeclarator(false); break;
|
||||
case 274: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 276: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
|
||||
// Rule 275: function_direct_abstract_declarator ::= ( )
|
||||
//
|
||||
case 276: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 277: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 277: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 278: function_direct_abstract_declarator ::= ( )
|
||||
//
|
||||
case 278: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break;
|
||||
case 275: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 279: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( )
|
||||
// Rule 276: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( )
|
||||
//
|
||||
case 279: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
|
||||
case 276: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 280: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list )
|
||||
// Rule 277: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list )
|
||||
//
|
||||
case 280: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break;
|
||||
case 277: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 281: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list )
|
||||
// Rule 278: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list )
|
||||
//
|
||||
case 281: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
|
||||
case 278: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 282: initializer ::= assignment_expression
|
||||
// Rule 279: initializer ::= assignment_expression
|
||||
//
|
||||
case 282: { action. consumeInitializer(); break;
|
||||
case 279: { action. consumeInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 283: initializer ::= start_initializer_list { <openscope-ast> initializer_list comma_opt } end_initializer_list
|
||||
// Rule 280: initializer ::= start_initializer_list { <openscope-ast> initializer_list comma_opt } end_initializer_list
|
||||
//
|
||||
case 283: { action. consumeInitializerList(); break;
|
||||
case 280: { action. consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 284: initializer ::= { <openscope-ast> }
|
||||
// Rule 281: initializer ::= { <openscope-ast> }
|
||||
//
|
||||
case 284: { action. consumeInitializerList(); break;
|
||||
case 281: { action. consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 285: start_initializer_list ::= $Empty
|
||||
// Rule 282: start_initializer_list ::= $Empty
|
||||
//
|
||||
case 285: { action. initializerListStart(); break;
|
||||
case 282: { action. initializerListStart(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 286: end_initializer_list ::= $Empty
|
||||
// Rule 283: end_initializer_list ::= $Empty
|
||||
//
|
||||
case 286: { action. initializerListEnd(); break;
|
||||
case 283: { action. initializerListEnd(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 291: designated_initializer ::= <openscope-ast> designation = initializer
|
||||
// Rule 288: designated_initializer ::= <openscope-ast> designation = initializer
|
||||
//
|
||||
case 291: { action. consumeInitializerDesignated(); break;
|
||||
case 288: { action. consumeInitializerDesignated(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 295: designator_base ::= [ constant_expression ]
|
||||
// Rule 292: designator_base ::= [ constant_expression ]
|
||||
//
|
||||
case 295: { action. consumeDesignatorArray(); break;
|
||||
case 292: { action. consumeDesignatorArray(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 296: designator_base ::= . identifier_token
|
||||
// Rule 293: designator_base ::= . identifier_token
|
||||
//
|
||||
case 296: { action. consumeDesignatorField(); break;
|
||||
case 293: { action. consumeDesignatorField(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 297: designator ::= [ constant_expression ]
|
||||
// Rule 294: designator ::= [ constant_expression ]
|
||||
//
|
||||
case 297: { action. consumeDesignatorArray(); break;
|
||||
case 294: { action. consumeDesignatorArray(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 298: designator ::= . identifier_token
|
||||
// Rule 295: designator ::= . identifier_token
|
||||
//
|
||||
case 298: { action. consumeDesignatorField(); break;
|
||||
case 295: { action. consumeDesignatorField(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 299: translation_unit ::= external_declaration_list
|
||||
// Rule 296: translation_unit ::= external_declaration_list
|
||||
//
|
||||
case 299: { action. consumeTranslationUnit(); break;
|
||||
case 296: { action. consumeTranslationUnit(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 300: translation_unit ::= $Empty
|
||||
// Rule 297: translation_unit ::= $Empty
|
||||
//
|
||||
case 300: { action. consumeTranslationUnit(); break;
|
||||
case 297: { action. consumeTranslationUnit(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 305: external_declaration ::= ;
|
||||
// Rule 302: external_declaration ::= ;
|
||||
//
|
||||
case 305: { action. consumeDeclarationEmpty(); break;
|
||||
case 302: { action. consumeDeclarationEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 306: external_declaration ::= ERROR_TOKEN
|
||||
// Rule 303: external_declaration ::= ERROR_TOKEN
|
||||
//
|
||||
case 306: { action. consumeDeclarationProblem(); break;
|
||||
case 303: { action. consumeDeclarationProblem(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 309: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
|
||||
// Rule 306: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
|
||||
//
|
||||
case 309: { action. consumeFunctionDefinition(true); break;
|
||||
case 306: { action. consumeFunctionDefinition(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 310: function_definition ::= <openscope-ast> function_declarator function_body
|
||||
// Rule 307: function_definition ::= <openscope-ast> function_declarator function_body
|
||||
//
|
||||
case 310: { action. consumeFunctionDefinition(false); break;
|
||||
case 307: { action. consumeFunctionDefinition(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 311: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
|
||||
// Rule 308: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
|
||||
//
|
||||
case 311: { action. consumeFunctionDefinitionKnR(); break;
|
||||
case 308: { action. consumeFunctionDefinitionKnR(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 312: function_body ::= { }
|
||||
// Rule 309: function_body ::= { }
|
||||
//
|
||||
case 312: { action. consumeStatementCompoundStatement(false); break;
|
||||
case 309: { action. consumeStatementCompoundStatement(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 313: function_body ::= { <openscope-ast> block_item_list }
|
||||
// Rule 310: function_body ::= { <openscope-ast> block_item_list }
|
||||
//
|
||||
case 313: { action. consumeStatementCompoundStatement(true); break;
|
||||
case 310: { action. consumeStatementCompoundStatement(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 315: no_cast_start ::= ERROR_TOKEN
|
||||
// Rule 312: no_cast_start ::= ERROR_TOKEN
|
||||
//
|
||||
case 315: { action. consumeExpressionProblem(); break;
|
||||
case 312: { action. consumeExpressionProblem(); break;
|
||||
}
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -15,7 +15,7 @@ package org.eclipse.cdt.internal.core.dom.lrparser.c99;
|
|||
|
||||
public interface C99NoCastExpressionParsersym {
|
||||
public final static int
|
||||
TK_auto = 17,
|
||||
TK_auto = 24,
|
||||
TK_break = 81,
|
||||
TK_case = 82,
|
||||
TK_char = 31,
|
||||
|
@ -26,24 +26,24 @@ public interface C99NoCastExpressionParsersym {
|
|||
TK_double = 32,
|
||||
TK_else = 86,
|
||||
TK_enum = 44,
|
||||
TK_extern = 18,
|
||||
TK_extern = 25,
|
||||
TK_float = 33,
|
||||
TK_for = 87,
|
||||
TK_goto = 88,
|
||||
TK_if = 89,
|
||||
TK_inline = 19,
|
||||
TK_inline = 26,
|
||||
TK_int = 34,
|
||||
TK_long = 35,
|
||||
TK_register = 20,
|
||||
TK_register = 27,
|
||||
TK_restrict = 7,
|
||||
TK_return = 90,
|
||||
TK_short = 36,
|
||||
TK_signed = 37,
|
||||
TK_sizeof = 21,
|
||||
TK_static = 12,
|
||||
TK_sizeof = 17,
|
||||
TK_static = 14,
|
||||
TK_struct = 45,
|
||||
TK_switch = 91,
|
||||
TK_typedef = 22,
|
||||
TK_typedef = 28,
|
||||
TK_union = 46,
|
||||
TK_unsigned = 38,
|
||||
TK_void = 39,
|
||||
|
@ -52,27 +52,27 @@ public interface C99NoCastExpressionParsersym {
|
|||
TK__Bool = 40,
|
||||
TK__Complex = 41,
|
||||
TK__Imaginary = 42,
|
||||
TK_integer = 23,
|
||||
TK_floating = 24,
|
||||
TK_charconst = 25,
|
||||
TK_stringlit = 26,
|
||||
TK_integer = 18,
|
||||
TK_floating = 19,
|
||||
TK_charconst = 20,
|
||||
TK_stringlit = 21,
|
||||
TK_identifier = 1,
|
||||
TK_Completion = 3,
|
||||
TK_EndOfCompletion = 5,
|
||||
TK_Invalid = 93,
|
||||
TK_LeftBracket = 9,
|
||||
TK_LeftBracket = 11,
|
||||
TK_LeftParen = 2,
|
||||
TK_LeftBrace = 13,
|
||||
TK_LeftBrace = 12,
|
||||
TK_Dot = 52,
|
||||
TK_Arrow = 67,
|
||||
TK_PlusPlus = 15,
|
||||
TK_MinusMinus = 16,
|
||||
TK_And = 14,
|
||||
TK_And = 13,
|
||||
TK_Star = 4,
|
||||
TK_Plus = 10,
|
||||
TK_Minus = 11,
|
||||
TK_Tilde = 27,
|
||||
TK_Bang = 28,
|
||||
TK_Plus = 9,
|
||||
TK_Minus = 10,
|
||||
TK_Tilde = 22,
|
||||
TK_Bang = 23,
|
||||
TK_Slash = 53,
|
||||
TK_Percent = 54,
|
||||
TK_RightShift = 47,
|
||||
|
@ -101,9 +101,9 @@ public interface C99NoCastExpressionParsersym {
|
|||
TK_AndAssign = 77,
|
||||
TK_CaretAssign = 78,
|
||||
TK_OrAssign = 79,
|
||||
TK_Comma = 30,
|
||||
TK_Comma = 29,
|
||||
TK_RightBracket = 50,
|
||||
TK_RightParen = 29,
|
||||
TK_RightParen = 30,
|
||||
TK_RightBrace = 43,
|
||||
TK_SemiColon = 66,
|
||||
TK_ERROR_TOKEN = 51,
|
||||
|
@ -119,28 +119,28 @@ public interface C99NoCastExpressionParsersym {
|
|||
"const",
|
||||
"restrict",
|
||||
"volatile",
|
||||
"LeftBracket",
|
||||
"Plus",
|
||||
"Minus",
|
||||
"static",
|
||||
"LeftBracket",
|
||||
"LeftBrace",
|
||||
"And",
|
||||
"static",
|
||||
"PlusPlus",
|
||||
"MinusMinus",
|
||||
"auto",
|
||||
"extern",
|
||||
"inline",
|
||||
"register",
|
||||
"sizeof",
|
||||
"typedef",
|
||||
"integer",
|
||||
"floating",
|
||||
"charconst",
|
||||
"stringlit",
|
||||
"Tilde",
|
||||
"Bang",
|
||||
"RightParen",
|
||||
"auto",
|
||||
"extern",
|
||||
"inline",
|
||||
"register",
|
||||
"typedef",
|
||||
"Comma",
|
||||
"RightParen",
|
||||
"char",
|
||||
"double",
|
||||
"float",
|
||||
|
|
|
@ -253,81 +253,81 @@ public C99Parser(IParserActionTokenProvider parser) { // constructor
|
|||
}
|
||||
|
||||
//
|
||||
// Rule 10: literal ::= integer
|
||||
// Rule 12: literal ::= integer
|
||||
//
|
||||
case 10: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_integer_constant); break;
|
||||
case 12: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_integer_constant); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 11: literal ::= floating
|
||||
// Rule 13: literal ::= floating
|
||||
//
|
||||
case 11: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_float_constant); break;
|
||||
case 13: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_float_constant); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 12: literal ::= charconst
|
||||
// Rule 14: literal ::= charconst
|
||||
//
|
||||
case 12: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_char_constant); break;
|
||||
case 14: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_char_constant); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 13: literal ::= stringlit
|
||||
// Rule 15: literal ::= stringlit
|
||||
//
|
||||
case 13: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_string_literal); break;
|
||||
case 15: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_string_literal); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 15: primary_expression ::= primary_expression_id
|
||||
// Rule 17: primary_expression ::= primary_expression_id
|
||||
//
|
||||
case 15: { action. consumeExpressionID(); break;
|
||||
case 17: { action. consumeExpressionID(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 16: primary_expression ::= ( expression )
|
||||
// Rule 18: primary_expression ::= ( expression )
|
||||
//
|
||||
case 16: { action. consumeExpressionBracketed(); break;
|
||||
case 18: { action. consumeExpressionBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 20: postfix_expression ::= postfix_expression [ expression ]
|
||||
// Rule 21: postfix_expression ::= postfix_expression [ expression ]
|
||||
//
|
||||
case 20: { action. consumeExpressionArraySubscript(); break;
|
||||
case 21: { action. consumeExpressionArraySubscript(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 21: postfix_expression ::= postfix_expression ( expression_list_opt )
|
||||
// Rule 22: postfix_expression ::= postfix_expression ( expression_list_opt )
|
||||
//
|
||||
case 21: { action. consumeExpressionFunctionCall(); break;
|
||||
case 22: { action. consumeExpressionFunctionCall(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 22: postfix_expression ::= postfix_expression . member_name
|
||||
// Rule 23: postfix_expression ::= postfix_expression . member_name
|
||||
//
|
||||
case 22: { action. consumeExpressionFieldReference(false); break;
|
||||
case 23: { action. consumeExpressionFieldReference(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 23: postfix_expression ::= postfix_expression -> member_name
|
||||
// Rule 24: postfix_expression ::= postfix_expression -> member_name
|
||||
//
|
||||
case 23: { action. consumeExpressionFieldReference(true); break;
|
||||
case 24: { action. consumeExpressionFieldReference(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 24: postfix_expression ::= postfix_expression ++
|
||||
// Rule 25: postfix_expression ::= postfix_expression ++
|
||||
//
|
||||
case 24: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); break;
|
||||
case 25: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 25: postfix_expression ::= postfix_expression --
|
||||
// Rule 26: postfix_expression ::= postfix_expression --
|
||||
//
|
||||
case 25: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); break;
|
||||
case 26: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 26: postfix_expression ::= ( type_id ) { <openscope-ast> initializer_list comma_opt }
|
||||
// Rule 27: postfix_expression ::= ( type_id ) { <openscope-ast> initializer_list comma_opt }
|
||||
//
|
||||
case 26: { action. consumeExpressionTypeIdInitializer(); break;
|
||||
case 27: { action. consumeExpressionTypeIdInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -781,483 +781,477 @@ public C99Parser(IParserActionTokenProvider parser) { // constructor
|
|||
}
|
||||
|
||||
//
|
||||
// Rule 178: typedef_name_in_declspec ::= Completion
|
||||
// Rule 178: type_name_specifier ::= identifier_token
|
||||
//
|
||||
case 178: { action. consumeToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 179: typedef_name_in_declspec ::= identifier
|
||||
// Rule 179: struct_or_union_specifier ::= struct_or_union struct_or_union_specifier_hook { <openscope-ast> struct_declaration_list_opt }
|
||||
//
|
||||
case 179: { action. consumeToken(); break;
|
||||
case 179: { action. consumeTypeSpecifierComposite(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 182: struct_or_union_specifier ::= struct_or_union struct_or_union_specifier_hook { <openscope-ast> struct_declaration_list_opt }
|
||||
// Rule 180: struct_or_union_specifier ::= struct_or_union struct_or_union_specifier_hook identifier_token struct_or_union_specifier_suffix_hook { <openscope-ast> struct_declaration_list_opt }
|
||||
//
|
||||
case 182: { action. consumeTypeSpecifierComposite(false); break;
|
||||
case 180: { action. consumeTypeSpecifierComposite(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 183: struct_or_union_specifier ::= struct_or_union struct_or_union_specifier_hook identifier_token struct_or_union_specifier_suffix_hook { <openscope-ast> struct_declaration_list_opt }
|
||||
// Rule 185: elaborated_specifier ::= struct elaborated_specifier_hook identifier_token
|
||||
//
|
||||
case 183: { action. consumeTypeSpecifierComposite(true); break;
|
||||
case 185: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_struct); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 188: elaborated_specifier ::= struct elaborated_specifier_hook identifier_token
|
||||
// Rule 186: elaborated_specifier ::= union elaborated_specifier_hook identifier_token
|
||||
//
|
||||
case 188: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_struct); break;
|
||||
case 186: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_union); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 189: elaborated_specifier ::= union elaborated_specifier_hook identifier_token
|
||||
// Rule 187: elaborated_specifier ::= enum elaborated_specifier_hook identifier_token
|
||||
//
|
||||
case 189: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_union); break;
|
||||
case 187: { action. consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_enum); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 190: elaborated_specifier ::= enum elaborated_specifier_hook identifier_token
|
||||
// Rule 193: struct_declaration ::= specifier_qualifier_list <openscope-ast> struct_declarator_list ;
|
||||
//
|
||||
case 190: { action. consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_enum); break;
|
||||
case 193: { action. consumeStructDeclaration(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 196: struct_declaration ::= specifier_qualifier_list <openscope-ast> struct_declarator_list ;
|
||||
// Rule 194: struct_declaration ::= specifier_qualifier_list ;
|
||||
//
|
||||
case 196: { action. consumeStructDeclaration(true); break;
|
||||
case 194: { action. consumeStructDeclaration(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 197: struct_declaration ::= specifier_qualifier_list ;
|
||||
// Rule 195: struct_declaration ::= ERROR_TOKEN
|
||||
//
|
||||
case 197: { action. consumeStructDeclaration(false); break;
|
||||
case 195: { action. consumeDeclarationProblem(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 198: struct_declaration ::= ERROR_TOKEN
|
||||
// Rule 201: struct_declarator ::= : constant_expression
|
||||
//
|
||||
case 198: { action. consumeDeclarationProblem(); break;
|
||||
case 201: { action. consumeBitField(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 204: struct_declarator ::= : constant_expression
|
||||
// Rule 202: struct_declarator ::= declarator : constant_expression
|
||||
//
|
||||
case 204: { action. consumeBitField(false); break;
|
||||
case 202: { action. consumeBitField(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 205: struct_declarator ::= declarator : constant_expression
|
||||
// Rule 203: enum_specifier ::= enum enum_specifier_hook { <openscope-ast> enumerator_list_opt comma_opt }
|
||||
//
|
||||
case 205: { action. consumeBitField(true); break;
|
||||
case 203: { action. consumeTypeSpecifierEnumeration(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 206: enum_specifier ::= enum enum_specifier_hook { <openscope-ast> enumerator_list_opt comma_opt }
|
||||
// Rule 204: enum_specifier ::= enum enum_specifier_hook identifier_token { <openscope-ast> enumerator_list_opt comma_opt }
|
||||
//
|
||||
case 206: { action. consumeTypeSpecifierEnumeration(false); break;
|
||||
case 204: { action. consumeTypeSpecifierEnumeration(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 207: enum_specifier ::= enum enum_specifier_hook identifier_token { <openscope-ast> enumerator_list_opt comma_opt }
|
||||
// Rule 210: enumerator ::= identifier_token
|
||||
//
|
||||
case 207: { action. consumeTypeSpecifierEnumeration(true); break;
|
||||
case 210: { action. consumeEnumerator(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 213: enumerator ::= identifier_token
|
||||
// Rule 211: enumerator ::= identifier_token = constant_expression
|
||||
//
|
||||
case 213: { action. consumeEnumerator(false); break;
|
||||
case 211: { action. consumeEnumerator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 214: enumerator ::= identifier_token = constant_expression
|
||||
// Rule 212: type_qualifier ::= type_qualifier_token
|
||||
//
|
||||
case 214: { action. consumeEnumerator(true); break;
|
||||
case 212: { action. consumeToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 215: type_qualifier ::= type_qualifier_token
|
||||
// Rule 216: function_specifier ::= inline
|
||||
//
|
||||
case 215: { action. consumeToken(); break;
|
||||
case 216: { action. consumeToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 219: function_specifier ::= inline
|
||||
// Rule 218: declarator ::= <openscope-ast> pointer_seq direct_declarator
|
||||
//
|
||||
case 219: { action. consumeToken(); break;
|
||||
case 218: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 221: declarator ::= <openscope-ast> pointer_seq direct_declarator
|
||||
// Rule 223: basic_direct_declarator ::= declarator_id_name
|
||||
//
|
||||
case 221: { action. consumeDeclaratorWithPointer(true); break;
|
||||
case 223: { action. consumeDirectDeclaratorIdentifier(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 226: basic_direct_declarator ::= declarator_id_name
|
||||
// Rule 224: basic_direct_declarator ::= ( declarator )
|
||||
//
|
||||
case 226: { action. consumeDirectDeclaratorIdentifier(); break;
|
||||
case 224: { action. consumeDirectDeclaratorBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 227: basic_direct_declarator ::= ( declarator )
|
||||
// Rule 225: declarator_id_name ::= identifier
|
||||
//
|
||||
case 227: { action. consumeDirectDeclaratorBracketed(); break;
|
||||
case 225: { action. consumeIdentifierName(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 228: declarator_id_name ::= identifier
|
||||
// Rule 226: array_direct_declarator ::= basic_direct_declarator array_modifier
|
||||
//
|
||||
case 228: { action. consumeIdentifierName(); break;
|
||||
case 226: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 229: array_direct_declarator ::= basic_direct_declarator array_modifier
|
||||
// Rule 227: array_direct_declarator ::= array_direct_declarator array_modifier
|
||||
//
|
||||
case 229: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
case 227: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 230: array_direct_declarator ::= array_direct_declarator array_modifier
|
||||
// Rule 229: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list )
|
||||
//
|
||||
case 230: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
case 229: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 232: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list )
|
||||
// Rule 230: function_direct_declarator ::= basic_direct_declarator ( )
|
||||
//
|
||||
case 232: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
|
||||
case 230: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 233: function_direct_declarator ::= basic_direct_declarator ( )
|
||||
// Rule 232: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator
|
||||
//
|
||||
case 233: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
|
||||
case 232: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 235: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator
|
||||
// Rule 233: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list )
|
||||
//
|
||||
case 233: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 235: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator
|
||||
//
|
||||
case 235: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 236: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list )
|
||||
// Rule 236: identifier_list ::= identifier
|
||||
//
|
||||
case 236: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break;
|
||||
case 236: { action. consumeIdentifierKnR(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 238: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator
|
||||
// Rule 237: identifier_list ::= identifier_list , identifier
|
||||
//
|
||||
case 238: { action. consumeDeclaratorWithPointer(true); break;
|
||||
case 237: { action. consumeIdentifierKnR(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 239: identifier_list ::= identifier
|
||||
// Rule 238: array_modifier ::= [ ]
|
||||
//
|
||||
case 239: { action. consumeIdentifierKnR(); break;
|
||||
case 238: { action. consumeDirectDeclaratorArrayModifier(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 240: identifier_list ::= identifier_list , identifier
|
||||
// Rule 239: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
|
||||
//
|
||||
case 240: { action. consumeIdentifierKnR(); break;
|
||||
case 239: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 241: array_modifier ::= [ ]
|
||||
// Rule 240: array_modifier ::= [ assignment_expression ]
|
||||
//
|
||||
case 241: { action. consumeDirectDeclaratorArrayModifier(false); break;
|
||||
case 240: { action. consumeDirectDeclaratorArrayModifier(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 242: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
|
||||
// Rule 241: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
//
|
||||
case 242: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
|
||||
case 241: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 243: array_modifier ::= [ assignment_expression ]
|
||||
// Rule 242: array_modifier ::= [ static assignment_expression ]
|
||||
//
|
||||
case 243: { action. consumeDirectDeclaratorArrayModifier(true); break;
|
||||
case 242: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 244: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
// Rule 243: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
//
|
||||
case 244: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
|
||||
case 243: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 245: array_modifier ::= [ static assignment_expression ]
|
||||
// Rule 244: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
|
||||
//
|
||||
case 245: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
|
||||
case 244: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 246: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
// Rule 245: array_modifier ::= [ * ]
|
||||
//
|
||||
case 246: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
case 245: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 247: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
|
||||
// Rule 246: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
|
||||
//
|
||||
case 247: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
case 246: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 248: array_modifier ::= [ * ]
|
||||
// Rule 248: pointer_seq ::= pointer_hook *
|
||||
//
|
||||
case 248: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
|
||||
case 248: { action. consumePointer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 249: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
|
||||
// Rule 249: pointer_seq ::= pointer_seq pointer_hook *
|
||||
//
|
||||
case 249: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
|
||||
case 249: { action. consumePointer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 251: pointer_seq ::= pointer_hook *
|
||||
// Rule 250: pointer_seq ::= pointer_hook * <openscope-ast> type_qualifier_list
|
||||
//
|
||||
case 251: { action. consumePointer(); break;
|
||||
case 250: { action. consumePointerTypeQualifierList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 252: pointer_seq ::= pointer_seq pointer_hook *
|
||||
// Rule 251: pointer_seq ::= pointer_seq pointer_hook * <openscope-ast> type_qualifier_list
|
||||
//
|
||||
case 252: { action. consumePointer(); break;
|
||||
case 251: { action. consumePointerTypeQualifierList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 253: pointer_seq ::= pointer_hook * <openscope-ast> type_qualifier_list
|
||||
// Rule 255: parameter_type_list ::= parameter_list
|
||||
//
|
||||
case 253: { action. consumePointerTypeQualifierList(); break;
|
||||
case 255: { action. consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 254: pointer_seq ::= pointer_seq pointer_hook * <openscope-ast> type_qualifier_list
|
||||
// Rule 256: parameter_type_list ::= parameter_list , ...
|
||||
//
|
||||
case 254: { action. consumePointerTypeQualifierList(); break;
|
||||
case 256: { action. consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 258: parameter_type_list ::= parameter_list
|
||||
// Rule 257: parameter_type_list ::= ...
|
||||
//
|
||||
case 258: { action. consumeEmpty(); break;
|
||||
case 257: { action. consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 259: parameter_type_list ::= parameter_list , ...
|
||||
// Rule 260: parameter_declaration ::= declaration_specifiers complete_parameter_declarator
|
||||
//
|
||||
case 259: { action. consumePlaceHolder(); break;
|
||||
case 260: { action. consumeParameterDeclaration(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 260: parameter_type_list ::= ...
|
||||
// Rule 261: parameter_declaration ::= declaration_specifiers
|
||||
//
|
||||
case 260: { action. consumePlaceHolder(); break;
|
||||
case 261: { action. consumeParameterDeclarationWithoutDeclarator(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 263: parameter_declaration ::= declaration_specifiers complete_parameter_declarator
|
||||
// Rule 264: type_id ::= specifier_qualifier_list
|
||||
//
|
||||
case 263: { action. consumeParameterDeclaration(); break;
|
||||
case 264: { action. consumeTypeId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 264: parameter_declaration ::= declaration_specifiers
|
||||
// Rule 265: type_id ::= specifier_qualifier_list abstract_declarator
|
||||
//
|
||||
case 264: { action. consumeParameterDeclarationWithoutDeclarator(); break;
|
||||
case 265: { action. consumeTypeId(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 267: type_id ::= specifier_qualifier_list
|
||||
// Rule 267: abstract_declarator ::= <openscope-ast> pointer_seq
|
||||
//
|
||||
case 267: { action. consumeTypeId(false); break;
|
||||
case 267: { action. consumeDeclaratorWithPointer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 268: type_id ::= specifier_qualifier_list abstract_declarator
|
||||
// Rule 268: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
//
|
||||
case 268: { action. consumeTypeId(true); break;
|
||||
case 268: { action. consumeDeclaratorWithPointer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 270: abstract_declarator ::= <openscope-ast> pointer_seq
|
||||
// Rule 272: basic_direct_abstract_declarator ::= ( abstract_declarator )
|
||||
//
|
||||
case 270: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 272: { action. consumeDirectDeclaratorBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 271: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
// Rule 273: array_direct_abstract_declarator ::= array_modifier
|
||||
//
|
||||
case 271: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 273: { action. consumeDirectDeclaratorArrayDeclarator(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 275: basic_direct_abstract_declarator ::= ( abstract_declarator )
|
||||
// Rule 274: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 275: { action. consumeDirectDeclaratorBracketed(); break;
|
||||
case 274: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 276: array_direct_abstract_declarator ::= array_modifier
|
||||
// Rule 275: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 276: { action. consumeDirectDeclaratorArrayDeclarator(false); break;
|
||||
case 275: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 277: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
|
||||
// Rule 276: function_direct_abstract_declarator ::= ( )
|
||||
//
|
||||
case 277: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 278: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 278: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 279: function_direct_abstract_declarator ::= ( )
|
||||
//
|
||||
case 279: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break;
|
||||
case 276: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 280: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( )
|
||||
// Rule 277: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( )
|
||||
//
|
||||
case 280: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
|
||||
case 277: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 281: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list )
|
||||
// Rule 278: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list )
|
||||
//
|
||||
case 281: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break;
|
||||
case 278: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 282: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list )
|
||||
// Rule 279: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list )
|
||||
//
|
||||
case 282: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
|
||||
case 279: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 283: initializer ::= assignment_expression
|
||||
// Rule 280: initializer ::= assignment_expression
|
||||
//
|
||||
case 283: { action. consumeInitializer(); break;
|
||||
case 280: { action. consumeInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 284: initializer ::= start_initializer_list { <openscope-ast> initializer_list comma_opt } end_initializer_list
|
||||
// Rule 281: initializer ::= start_initializer_list { <openscope-ast> initializer_list comma_opt } end_initializer_list
|
||||
//
|
||||
case 284: { action. consumeInitializerList(); break;
|
||||
case 281: { action. consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 285: initializer ::= { <openscope-ast> }
|
||||
// Rule 282: initializer ::= { <openscope-ast> }
|
||||
//
|
||||
case 285: { action. consumeInitializerList(); break;
|
||||
case 282: { action. consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 286: start_initializer_list ::= $Empty
|
||||
// Rule 283: start_initializer_list ::= $Empty
|
||||
//
|
||||
case 286: { action. initializerListStart(); break;
|
||||
case 283: { action. initializerListStart(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 287: end_initializer_list ::= $Empty
|
||||
// Rule 284: end_initializer_list ::= $Empty
|
||||
//
|
||||
case 287: { action. initializerListEnd(); break;
|
||||
case 284: { action. initializerListEnd(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 292: designated_initializer ::= <openscope-ast> designation = initializer
|
||||
// Rule 289: designated_initializer ::= <openscope-ast> designation = initializer
|
||||
//
|
||||
case 292: { action. consumeInitializerDesignated(); break;
|
||||
case 289: { action. consumeInitializerDesignated(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 296: designator_base ::= [ constant_expression ]
|
||||
// Rule 293: designator_base ::= [ constant_expression ]
|
||||
//
|
||||
case 296: { action. consumeDesignatorArray(); break;
|
||||
case 293: { action. consumeDesignatorArray(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 297: designator_base ::= . identifier_token
|
||||
// Rule 294: designator_base ::= . identifier_token
|
||||
//
|
||||
case 297: { action. consumeDesignatorField(); break;
|
||||
case 294: { action. consumeDesignatorField(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 298: designator ::= [ constant_expression ]
|
||||
// Rule 295: designator ::= [ constant_expression ]
|
||||
//
|
||||
case 298: { action. consumeDesignatorArray(); break;
|
||||
case 295: { action. consumeDesignatorArray(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 299: designator ::= . identifier_token
|
||||
// Rule 296: designator ::= . identifier_token
|
||||
//
|
||||
case 299: { action. consumeDesignatorField(); break;
|
||||
case 296: { action. consumeDesignatorField(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 300: translation_unit ::= external_declaration_list
|
||||
// Rule 297: translation_unit ::= external_declaration_list
|
||||
//
|
||||
case 300: { action. consumeTranslationUnit(); break;
|
||||
case 297: { action. consumeTranslationUnit(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 301: translation_unit ::= $Empty
|
||||
// Rule 298: translation_unit ::= $Empty
|
||||
//
|
||||
case 301: { action. consumeTranslationUnit(); break;
|
||||
case 298: { action. consumeTranslationUnit(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 306: external_declaration ::= ;
|
||||
// Rule 303: external_declaration ::= ;
|
||||
//
|
||||
case 306: { action. consumeDeclarationEmpty(); break;
|
||||
case 303: { action. consumeDeclarationEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 307: external_declaration ::= ERROR_TOKEN
|
||||
// Rule 304: external_declaration ::= ERROR_TOKEN
|
||||
//
|
||||
case 307: { action. consumeDeclarationProblem(); break;
|
||||
case 304: { action. consumeDeclarationProblem(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 310: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
|
||||
// Rule 307: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
|
||||
//
|
||||
case 310: { action. consumeFunctionDefinition(true); break;
|
||||
case 307: { action. consumeFunctionDefinition(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 311: function_definition ::= <openscope-ast> function_declarator function_body
|
||||
// Rule 308: function_definition ::= <openscope-ast> function_declarator function_body
|
||||
//
|
||||
case 311: { action. consumeFunctionDefinition(false); break;
|
||||
case 308: { action. consumeFunctionDefinition(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 312: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
|
||||
// Rule 309: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
|
||||
//
|
||||
case 312: { action. consumeFunctionDefinitionKnR(); break;
|
||||
case 309: { action. consumeFunctionDefinitionKnR(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 313: function_body ::= { }
|
||||
// Rule 310: function_body ::= { }
|
||||
//
|
||||
case 313: { action. consumeStatementCompoundStatement(false); break;
|
||||
case 310: { action. consumeStatementCompoundStatement(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 314: function_body ::= { <openscope-ast> block_item_list }
|
||||
// Rule 311: function_body ::= { <openscope-ast> block_item_list }
|
||||
//
|
||||
case 314: { action. consumeStatementCompoundStatement(true); break;
|
||||
case 311: { action. consumeStatementCompoundStatement(true); break;
|
||||
}
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -15,43 +15,43 @@ package org.eclipse.cdt.internal.core.dom.lrparser.c99;
|
|||
|
||||
public interface C99Parsersym {
|
||||
public final static int
|
||||
TK_auto = 24,
|
||||
TK_auto = 25,
|
||||
TK_break = 31,
|
||||
TK_case = 32,
|
||||
TK_char = 42,
|
||||
TK_char = 41,
|
||||
TK_const = 19,
|
||||
TK_continue = 33,
|
||||
TK_default = 34,
|
||||
TK_do = 35,
|
||||
TK_double = 43,
|
||||
TK_double = 42,
|
||||
TK_else = 79,
|
||||
TK_enum = 54,
|
||||
TK_extern = 25,
|
||||
TK_float = 44,
|
||||
TK_extern = 26,
|
||||
TK_float = 43,
|
||||
TK_for = 36,
|
||||
TK_goto = 37,
|
||||
TK_if = 38,
|
||||
TK_inline = 26,
|
||||
TK_int = 45,
|
||||
TK_long = 46,
|
||||
TK_register = 27,
|
||||
TK_inline = 27,
|
||||
TK_int = 44,
|
||||
TK_long = 45,
|
||||
TK_register = 28,
|
||||
TK_restrict = 20,
|
||||
TK_return = 39,
|
||||
TK_short = 47,
|
||||
TK_signed = 48,
|
||||
TK_short = 46,
|
||||
TK_signed = 47,
|
||||
TK_sizeof = 12,
|
||||
TK_static = 23,
|
||||
TK_struct = 55,
|
||||
TK_switch = 40,
|
||||
TK_typedef = 28,
|
||||
TK_typedef = 29,
|
||||
TK_union = 56,
|
||||
TK_unsigned = 49,
|
||||
TK_void = 50,
|
||||
TK_unsigned = 48,
|
||||
TK_void = 49,
|
||||
TK_volatile = 21,
|
||||
TK_while = 30,
|
||||
TK__Bool = 51,
|
||||
TK__Complex = 52,
|
||||
TK__Imaginary = 53,
|
||||
TK__Bool = 50,
|
||||
TK__Complex = 51,
|
||||
TK__Imaginary = 52,
|
||||
TK_integer = 13,
|
||||
TK_floating = 14,
|
||||
TK_charconst = 15,
|
||||
|
@ -60,7 +60,7 @@ public interface C99Parsersym {
|
|||
TK_Completion = 3,
|
||||
TK_EndOfCompletion = 4,
|
||||
TK_Invalid = 93,
|
||||
TK_LeftBracket = 41,
|
||||
TK_LeftBracket = 53,
|
||||
TK_LeftParen = 2,
|
||||
TK_LeftBrace = 6,
|
||||
TK_Dot = 66,
|
||||
|
@ -88,7 +88,7 @@ public interface C99Parsersym {
|
|||
TK_AndAnd = 78,
|
||||
TK_OrOr = 81,
|
||||
TK_Question = 82,
|
||||
TK_Colon = 60,
|
||||
TK_Colon = 59,
|
||||
TK_DotDotDot = 64,
|
||||
TK_Assign = 61,
|
||||
TK_StarAssign = 83,
|
||||
|
@ -103,10 +103,10 @@ public interface C99Parsersym {
|
|||
TK_OrAssign = 92,
|
||||
TK_Comma = 57,
|
||||
TK_RightBracket = 65,
|
||||
TK_RightParen = 59,
|
||||
TK_RightParen = 60,
|
||||
TK_RightBrace = 58,
|
||||
TK_SemiColon = 22,
|
||||
TK_ERROR_TOKEN = 29,
|
||||
TK_ERROR_TOKEN = 24,
|
||||
TK_EOF_TOKEN = 73;
|
||||
|
||||
public final static String orderedTerminalSymbols[] = {
|
||||
|
@ -134,12 +134,12 @@ public interface C99Parsersym {
|
|||
"volatile",
|
||||
"SemiColon",
|
||||
"static",
|
||||
"ERROR_TOKEN",
|
||||
"auto",
|
||||
"extern",
|
||||
"inline",
|
||||
"register",
|
||||
"typedef",
|
||||
"ERROR_TOKEN",
|
||||
"while",
|
||||
"break",
|
||||
"case",
|
||||
|
@ -151,7 +151,6 @@ public interface C99Parsersym {
|
|||
"if",
|
||||
"return",
|
||||
"switch",
|
||||
"LeftBracket",
|
||||
"char",
|
||||
"double",
|
||||
"float",
|
||||
|
@ -164,13 +163,14 @@ public interface C99Parsersym {
|
|||
"_Bool",
|
||||
"_Complex",
|
||||
"_Imaginary",
|
||||
"LeftBracket",
|
||||
"enum",
|
||||
"struct",
|
||||
"union",
|
||||
"Comma",
|
||||
"RightBrace",
|
||||
"RightParen",
|
||||
"Colon",
|
||||
"RightParen",
|
||||
"Assign",
|
||||
"RightShift",
|
||||
"LeftShift",
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -101,9 +101,9 @@ public interface C99SizeofExpressionParsersym {
|
|||
TK_AndAssign = 77,
|
||||
TK_CaretAssign = 78,
|
||||
TK_OrAssign = 79,
|
||||
TK_Comma = 30,
|
||||
TK_Comma = 29,
|
||||
TK_RightBracket = 50,
|
||||
TK_RightParen = 29,
|
||||
TK_RightParen = 30,
|
||||
TK_RightBrace = 43,
|
||||
TK_SemiColon = 66,
|
||||
TK_ERROR_TOKEN = 51,
|
||||
|
@ -139,8 +139,8 @@ public interface C99SizeofExpressionParsersym {
|
|||
"inline",
|
||||
"register",
|
||||
"typedef",
|
||||
"RightParen",
|
||||
"Comma",
|
||||
"RightParen",
|
||||
"char",
|
||||
"double",
|
||||
"float",
|
||||
|
|
|
@ -1958,7 +1958,7 @@ public CPPSizeofExpressionParser(IParserActionTokenProvider parser) { // constr
|
|||
}
|
||||
|
||||
//
|
||||
// Rule 534: no_sizeof_type_name_start ::= ERROR_TOKEN
|
||||
// Rule 534: no_sizeof_type_id_start ::= ERROR_TOKEN
|
||||
//
|
||||
case 534: { action. consumeExpressionProblem(); break;
|
||||
}
|
||||
|
|
|
@ -2515,7 +2515,7 @@ public class CPPSizeofExpressionParserprs implements lpg.lpgjavaruntime.ParseTab
|
|||
"LeftBrace",
|
||||
"ERROR_TOKEN",
|
||||
"EOF_TOKEN",
|
||||
"no_sizeof_type_name_start",
|
||||
"no_sizeof_type_id_start",
|
||||
"]",
|
||||
")",
|
||||
"}",
|
||||
|
|
|
@ -183,7 +183,7 @@ private void initActions(IASTTranslationUnit tu, Set<IParser.Options> options) {
|
|||
|
||||
gnuAction = new GCCBuildASTParserAction (this, tu, astStack, CNodeFactory.getDefault() );
|
||||
gnuAction.setParserOptions(options);
|
||||
|
||||
gnuAction.setBaseAction(action);
|
||||
|
||||
}
|
||||
|
||||
|
@ -263,81 +263,81 @@ private GCCBuildASTParserAction gnuAction;
|
|||
}
|
||||
|
||||
//
|
||||
// Rule 10: literal ::= integer
|
||||
// Rule 12: literal ::= integer
|
||||
//
|
||||
case 10: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_integer_constant); break;
|
||||
case 12: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_integer_constant); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 11: literal ::= floating
|
||||
// Rule 13: literal ::= floating
|
||||
//
|
||||
case 11: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_float_constant); break;
|
||||
case 13: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_float_constant); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 12: literal ::= charconst
|
||||
// Rule 14: literal ::= charconst
|
||||
//
|
||||
case 12: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_char_constant); break;
|
||||
case 14: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_char_constant); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 13: literal ::= stringlit
|
||||
// Rule 15: literal ::= stringlit
|
||||
//
|
||||
case 13: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_string_literal); break;
|
||||
case 15: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_string_literal); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 15: primary_expression ::= primary_expression_id
|
||||
// Rule 17: primary_expression ::= primary_expression_id
|
||||
//
|
||||
case 15: { action. consumeExpressionID(); break;
|
||||
case 17: { action. consumeExpressionID(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 16: primary_expression ::= ( expression )
|
||||
// Rule 18: primary_expression ::= ( expression )
|
||||
//
|
||||
case 16: { action. consumeExpressionBracketed(); break;
|
||||
case 18: { action. consumeExpressionBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 20: postfix_expression ::= postfix_expression [ expression ]
|
||||
// Rule 21: postfix_expression ::= postfix_expression [ expression ]
|
||||
//
|
||||
case 20: { action. consumeExpressionArraySubscript(); break;
|
||||
case 21: { action. consumeExpressionArraySubscript(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 21: postfix_expression ::= postfix_expression ( expression_list_opt )
|
||||
// Rule 22: postfix_expression ::= postfix_expression ( expression_list_opt )
|
||||
//
|
||||
case 21: { action. consumeExpressionFunctionCall(); break;
|
||||
case 22: { action. consumeExpressionFunctionCall(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 22: postfix_expression ::= postfix_expression . member_name
|
||||
// Rule 23: postfix_expression ::= postfix_expression . member_name
|
||||
//
|
||||
case 22: { action. consumeExpressionFieldReference(false); break;
|
||||
case 23: { action. consumeExpressionFieldReference(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 23: postfix_expression ::= postfix_expression -> member_name
|
||||
// Rule 24: postfix_expression ::= postfix_expression -> member_name
|
||||
//
|
||||
case 23: { action. consumeExpressionFieldReference(true); break;
|
||||
case 24: { action. consumeExpressionFieldReference(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 24: postfix_expression ::= postfix_expression ++
|
||||
// Rule 25: postfix_expression ::= postfix_expression ++
|
||||
//
|
||||
case 24: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); break;
|
||||
case 25: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 25: postfix_expression ::= postfix_expression --
|
||||
// Rule 26: postfix_expression ::= postfix_expression --
|
||||
//
|
||||
case 25: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); break;
|
||||
case 26: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 26: postfix_expression ::= ( type_id ) { <openscope-ast> initializer_list comma_opt }
|
||||
// Rule 27: postfix_expression ::= ( type_id ) { <openscope-ast> initializer_list comma_opt }
|
||||
//
|
||||
case 26: { action. consumeExpressionTypeIdInitializer(); break;
|
||||
case 27: { action. consumeExpressionTypeIdInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -791,537 +791,537 @@ private GCCBuildASTParserAction gnuAction;
|
|||
}
|
||||
|
||||
//
|
||||
// Rule 178: typedef_name_in_declspec ::= Completion
|
||||
// Rule 178: type_name_specifier ::= identifier_token
|
||||
//
|
||||
case 178: { action. consumeToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 179: typedef_name_in_declspec ::= identifier
|
||||
// Rule 179: struct_or_union_specifier ::= struct_or_union struct_or_union_specifier_hook { <openscope-ast> struct_declaration_list_opt }
|
||||
//
|
||||
case 179: { action. consumeToken(); break;
|
||||
case 179: { action. consumeTypeSpecifierComposite(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 182: struct_or_union_specifier ::= struct_or_union struct_or_union_specifier_hook { <openscope-ast> struct_declaration_list_opt }
|
||||
// Rule 180: struct_or_union_specifier ::= struct_or_union struct_or_union_specifier_hook identifier_token struct_or_union_specifier_suffix_hook { <openscope-ast> struct_declaration_list_opt }
|
||||
//
|
||||
case 182: { action. consumeTypeSpecifierComposite(false); break;
|
||||
case 180: { action. consumeTypeSpecifierComposite(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 183: struct_or_union_specifier ::= struct_or_union struct_or_union_specifier_hook identifier_token struct_or_union_specifier_suffix_hook { <openscope-ast> struct_declaration_list_opt }
|
||||
// Rule 185: elaborated_specifier ::= struct elaborated_specifier_hook identifier_token
|
||||
//
|
||||
case 183: { action. consumeTypeSpecifierComposite(true); break;
|
||||
case 185: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_struct); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 188: elaborated_specifier ::= struct elaborated_specifier_hook identifier_token
|
||||
// Rule 186: elaborated_specifier ::= union elaborated_specifier_hook identifier_token
|
||||
//
|
||||
case 188: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_struct); break;
|
||||
case 186: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_union); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 189: elaborated_specifier ::= union elaborated_specifier_hook identifier_token
|
||||
// Rule 187: elaborated_specifier ::= enum elaborated_specifier_hook identifier_token
|
||||
//
|
||||
case 189: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_union); break;
|
||||
case 187: { action. consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_enum); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 190: elaborated_specifier ::= enum elaborated_specifier_hook identifier_token
|
||||
// Rule 193: struct_declaration ::= specifier_qualifier_list <openscope-ast> struct_declarator_list ;
|
||||
//
|
||||
case 190: { action. consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_enum); break;
|
||||
case 193: { action. consumeStructDeclaration(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 196: struct_declaration ::= specifier_qualifier_list <openscope-ast> struct_declarator_list ;
|
||||
// Rule 194: struct_declaration ::= specifier_qualifier_list ;
|
||||
//
|
||||
case 196: { action. consumeStructDeclaration(true); break;
|
||||
case 194: { action. consumeStructDeclaration(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 197: struct_declaration ::= specifier_qualifier_list ;
|
||||
// Rule 195: struct_declaration ::= ERROR_TOKEN
|
||||
//
|
||||
case 197: { action. consumeStructDeclaration(false); break;
|
||||
case 195: { action. consumeDeclarationProblem(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 198: struct_declaration ::= ERROR_TOKEN
|
||||
// Rule 201: struct_declarator ::= : constant_expression
|
||||
//
|
||||
case 198: { action. consumeDeclarationProblem(); break;
|
||||
case 201: { action. consumeBitField(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 204: struct_declarator ::= : constant_expression
|
||||
// Rule 202: struct_declarator ::= declarator : constant_expression
|
||||
//
|
||||
case 204: { action. consumeBitField(false); break;
|
||||
case 202: { action. consumeBitField(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 205: struct_declarator ::= declarator : constant_expression
|
||||
// Rule 203: enum_specifier ::= enum enum_specifier_hook { <openscope-ast> enumerator_list_opt comma_opt }
|
||||
//
|
||||
case 205: { action. consumeBitField(true); break;
|
||||
case 203: { action. consumeTypeSpecifierEnumeration(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 206: enum_specifier ::= enum enum_specifier_hook { <openscope-ast> enumerator_list_opt comma_opt }
|
||||
// Rule 204: enum_specifier ::= enum enum_specifier_hook identifier_token { <openscope-ast> enumerator_list_opt comma_opt }
|
||||
//
|
||||
case 206: { action. consumeTypeSpecifierEnumeration(false); break;
|
||||
case 204: { action. consumeTypeSpecifierEnumeration(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 207: enum_specifier ::= enum enum_specifier_hook identifier_token { <openscope-ast> enumerator_list_opt comma_opt }
|
||||
// Rule 210: enumerator ::= identifier_token
|
||||
//
|
||||
case 207: { action. consumeTypeSpecifierEnumeration(true); break;
|
||||
case 210: { action. consumeEnumerator(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 213: enumerator ::= identifier_token
|
||||
// Rule 211: enumerator ::= identifier_token = constant_expression
|
||||
//
|
||||
case 213: { action. consumeEnumerator(false); break;
|
||||
case 211: { action. consumeEnumerator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 214: enumerator ::= identifier_token = constant_expression
|
||||
// Rule 212: type_qualifier ::= type_qualifier_token
|
||||
//
|
||||
case 214: { action. consumeEnumerator(true); break;
|
||||
case 212: { action. consumeToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 215: type_qualifier ::= type_qualifier_token
|
||||
// Rule 216: function_specifier ::= inline
|
||||
//
|
||||
case 215: { action. consumeToken(); break;
|
||||
case 216: { action. consumeToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 219: function_specifier ::= inline
|
||||
// Rule 218: declarator ::= <openscope-ast> pointer_seq direct_declarator
|
||||
//
|
||||
case 219: { action. consumeToken(); break;
|
||||
case 218: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 221: declarator ::= <openscope-ast> pointer_seq direct_declarator
|
||||
// Rule 223: basic_direct_declarator ::= declarator_id_name
|
||||
//
|
||||
case 221: { action. consumeDeclaratorWithPointer(true); break;
|
||||
case 223: { action. consumeDirectDeclaratorIdentifier(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 226: basic_direct_declarator ::= declarator_id_name
|
||||
// Rule 224: basic_direct_declarator ::= ( declarator )
|
||||
//
|
||||
case 226: { action. consumeDirectDeclaratorIdentifier(); break;
|
||||
case 224: { action. consumeDirectDeclaratorBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 227: basic_direct_declarator ::= ( declarator )
|
||||
// Rule 225: declarator_id_name ::= identifier
|
||||
//
|
||||
case 227: { action. consumeDirectDeclaratorBracketed(); break;
|
||||
case 225: { action. consumeIdentifierName(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 228: declarator_id_name ::= identifier
|
||||
// Rule 226: array_direct_declarator ::= basic_direct_declarator array_modifier
|
||||
//
|
||||
case 228: { action. consumeIdentifierName(); break;
|
||||
case 226: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 229: array_direct_declarator ::= basic_direct_declarator array_modifier
|
||||
// Rule 227: array_direct_declarator ::= array_direct_declarator array_modifier
|
||||
//
|
||||
case 229: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
case 227: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 230: array_direct_declarator ::= array_direct_declarator array_modifier
|
||||
// Rule 229: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list )
|
||||
//
|
||||
case 230: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
case 229: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 232: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list )
|
||||
// Rule 230: function_direct_declarator ::= basic_direct_declarator ( )
|
||||
//
|
||||
case 232: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
|
||||
case 230: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 233: function_direct_declarator ::= basic_direct_declarator ( )
|
||||
// Rule 232: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator
|
||||
//
|
||||
case 233: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
|
||||
case 232: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 235: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator
|
||||
// Rule 233: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list )
|
||||
//
|
||||
case 233: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 235: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator
|
||||
//
|
||||
case 235: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 236: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list )
|
||||
// Rule 236: identifier_list ::= identifier
|
||||
//
|
||||
case 236: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break;
|
||||
case 236: { action. consumeIdentifierKnR(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 238: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator
|
||||
// Rule 237: identifier_list ::= identifier_list , identifier
|
||||
//
|
||||
case 238: { action. consumeDeclaratorWithPointer(true); break;
|
||||
case 237: { action. consumeIdentifierKnR(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 239: identifier_list ::= identifier
|
||||
// Rule 238: array_modifier ::= [ ]
|
||||
//
|
||||
case 239: { action. consumeIdentifierKnR(); break;
|
||||
case 238: { action. consumeDirectDeclaratorArrayModifier(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 240: identifier_list ::= identifier_list , identifier
|
||||
// Rule 239: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
|
||||
//
|
||||
case 240: { action. consumeIdentifierKnR(); break;
|
||||
case 239: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 241: array_modifier ::= [ ]
|
||||
// Rule 240: array_modifier ::= [ assignment_expression ]
|
||||
//
|
||||
case 241: { action. consumeDirectDeclaratorArrayModifier(false); break;
|
||||
case 240: { action. consumeDirectDeclaratorArrayModifier(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 242: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
|
||||
// Rule 241: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
//
|
||||
case 242: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
|
||||
case 241: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 243: array_modifier ::= [ assignment_expression ]
|
||||
// Rule 242: array_modifier ::= [ static assignment_expression ]
|
||||
//
|
||||
case 243: { action. consumeDirectDeclaratorArrayModifier(true); break;
|
||||
case 242: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 244: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
// Rule 243: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
//
|
||||
case 244: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
|
||||
case 243: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 245: array_modifier ::= [ static assignment_expression ]
|
||||
// Rule 244: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
|
||||
//
|
||||
case 245: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
|
||||
case 244: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 246: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
// Rule 245: array_modifier ::= [ * ]
|
||||
//
|
||||
case 246: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
case 245: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 247: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
|
||||
// Rule 246: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
|
||||
//
|
||||
case 247: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
case 246: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 248: array_modifier ::= [ * ]
|
||||
// Rule 248: pointer_seq ::= pointer_hook *
|
||||
//
|
||||
case 248: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
|
||||
case 248: { action. consumePointer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 249: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
|
||||
// Rule 249: pointer_seq ::= pointer_seq pointer_hook *
|
||||
//
|
||||
case 249: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
|
||||
case 249: { action. consumePointer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 251: pointer_seq ::= pointer_hook *
|
||||
// Rule 250: pointer_seq ::= pointer_hook * <openscope-ast> type_qualifier_list
|
||||
//
|
||||
case 251: { action. consumePointer(); break;
|
||||
case 250: { action. consumePointerTypeQualifierList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 252: pointer_seq ::= pointer_seq pointer_hook *
|
||||
// Rule 251: pointer_seq ::= pointer_seq pointer_hook * <openscope-ast> type_qualifier_list
|
||||
//
|
||||
case 252: { action. consumePointer(); break;
|
||||
case 251: { action. consumePointerTypeQualifierList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 253: pointer_seq ::= pointer_hook * <openscope-ast> type_qualifier_list
|
||||
// Rule 255: parameter_type_list ::= parameter_list
|
||||
//
|
||||
case 253: { action. consumePointerTypeQualifierList(); break;
|
||||
case 255: { action. consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 254: pointer_seq ::= pointer_seq pointer_hook * <openscope-ast> type_qualifier_list
|
||||
// Rule 256: parameter_type_list ::= parameter_list , ...
|
||||
//
|
||||
case 254: { action. consumePointerTypeQualifierList(); break;
|
||||
case 256: { action. consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 258: parameter_type_list ::= parameter_list
|
||||
// Rule 257: parameter_type_list ::= ...
|
||||
//
|
||||
case 258: { action. consumeEmpty(); break;
|
||||
case 257: { action. consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 259: parameter_type_list ::= parameter_list , ...
|
||||
// Rule 260: parameter_declaration ::= declaration_specifiers complete_parameter_declarator
|
||||
//
|
||||
case 259: { action. consumePlaceHolder(); break;
|
||||
case 260: { action. consumeParameterDeclaration(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 260: parameter_type_list ::= ...
|
||||
// Rule 261: parameter_declaration ::= declaration_specifiers
|
||||
//
|
||||
case 260: { action. consumePlaceHolder(); break;
|
||||
case 261: { action. consumeParameterDeclarationWithoutDeclarator(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 263: parameter_declaration ::= declaration_specifiers complete_parameter_declarator
|
||||
// Rule 264: type_id ::= specifier_qualifier_list
|
||||
//
|
||||
case 263: { action. consumeParameterDeclaration(); break;
|
||||
case 264: { action. consumeTypeId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 264: parameter_declaration ::= declaration_specifiers
|
||||
// Rule 265: type_id ::= specifier_qualifier_list abstract_declarator
|
||||
//
|
||||
case 264: { action. consumeParameterDeclarationWithoutDeclarator(); break;
|
||||
case 265: { action. consumeTypeId(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 267: type_id ::= specifier_qualifier_list
|
||||
// Rule 267: abstract_declarator ::= <openscope-ast> pointer_seq
|
||||
//
|
||||
case 267: { action. consumeTypeId(false); break;
|
||||
case 267: { action. consumeDeclaratorWithPointer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 268: type_id ::= specifier_qualifier_list abstract_declarator
|
||||
// Rule 268: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
//
|
||||
case 268: { action. consumeTypeId(true); break;
|
||||
case 268: { action. consumeDeclaratorWithPointer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 270: abstract_declarator ::= <openscope-ast> pointer_seq
|
||||
// Rule 272: basic_direct_abstract_declarator ::= ( abstract_declarator )
|
||||
//
|
||||
case 270: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 272: { action. consumeDirectDeclaratorBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 271: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
// Rule 273: array_direct_abstract_declarator ::= array_modifier
|
||||
//
|
||||
case 271: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 273: { action. consumeDirectDeclaratorArrayDeclarator(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 275: basic_direct_abstract_declarator ::= ( abstract_declarator )
|
||||
// Rule 274: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 275: { action. consumeDirectDeclaratorBracketed(); break;
|
||||
case 274: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 276: array_direct_abstract_declarator ::= array_modifier
|
||||
// Rule 275: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 276: { action. consumeDirectDeclaratorArrayDeclarator(false); break;
|
||||
case 275: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 277: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
|
||||
// Rule 276: function_direct_abstract_declarator ::= ( )
|
||||
//
|
||||
case 277: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 278: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 278: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 279: function_direct_abstract_declarator ::= ( )
|
||||
//
|
||||
case 279: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break;
|
||||
case 276: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 280: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( )
|
||||
// Rule 277: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( )
|
||||
//
|
||||
case 280: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
|
||||
case 277: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 281: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list )
|
||||
// Rule 278: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list )
|
||||
//
|
||||
case 281: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break;
|
||||
case 278: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 282: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list )
|
||||
// Rule 279: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list )
|
||||
//
|
||||
case 282: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
|
||||
case 279: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 283: initializer ::= assignment_expression
|
||||
// Rule 280: initializer ::= assignment_expression
|
||||
//
|
||||
case 283: { action. consumeInitializer(); break;
|
||||
case 280: { action. consumeInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 284: initializer ::= start_initializer_list { <openscope-ast> initializer_list comma_opt } end_initializer_list
|
||||
// Rule 281: initializer ::= start_initializer_list { <openscope-ast> initializer_list comma_opt } end_initializer_list
|
||||
//
|
||||
case 284: { action. consumeInitializerList(); break;
|
||||
case 281: { action. consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 285: initializer ::= { <openscope-ast> }
|
||||
// Rule 282: initializer ::= { <openscope-ast> }
|
||||
//
|
||||
case 285: { action. consumeInitializerList(); break;
|
||||
case 282: { action. consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 286: start_initializer_list ::= $Empty
|
||||
// Rule 283: start_initializer_list ::= $Empty
|
||||
//
|
||||
case 286: { action. initializerListStart(); break;
|
||||
case 283: { action. initializerListStart(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 287: end_initializer_list ::= $Empty
|
||||
// Rule 284: end_initializer_list ::= $Empty
|
||||
//
|
||||
case 287: { action. initializerListEnd(); break;
|
||||
case 284: { action. initializerListEnd(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 292: designated_initializer ::= <openscope-ast> designation = initializer
|
||||
// Rule 289: designated_initializer ::= <openscope-ast> designation = initializer
|
||||
//
|
||||
case 292: { action. consumeInitializerDesignated(); break;
|
||||
case 289: { action. consumeInitializerDesignated(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 296: designator_base ::= [ constant_expression ]
|
||||
// Rule 293: designator_base ::= [ constant_expression ]
|
||||
//
|
||||
case 296: { action. consumeDesignatorArray(); break;
|
||||
case 293: { action. consumeDesignatorArray(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 297: designator_base ::= . identifier_token
|
||||
// Rule 294: designator_base ::= . identifier_token
|
||||
//
|
||||
case 297: { action. consumeDesignatorField(); break;
|
||||
case 294: { action. consumeDesignatorField(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 298: designator ::= [ constant_expression ]
|
||||
// Rule 295: designator ::= [ constant_expression ]
|
||||
//
|
||||
case 298: { action. consumeDesignatorArray(); break;
|
||||
case 295: { action. consumeDesignatorArray(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 299: designator ::= . identifier_token
|
||||
// Rule 296: designator ::= . identifier_token
|
||||
//
|
||||
case 299: { action. consumeDesignatorField(); break;
|
||||
case 296: { action. consumeDesignatorField(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 300: translation_unit ::= external_declaration_list
|
||||
// Rule 297: translation_unit ::= external_declaration_list
|
||||
//
|
||||
case 300: { action. consumeTranslationUnit(); break;
|
||||
case 297: { action. consumeTranslationUnit(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 301: translation_unit ::= $Empty
|
||||
// Rule 298: translation_unit ::= $Empty
|
||||
//
|
||||
case 301: { action. consumeTranslationUnit(); break;
|
||||
case 298: { action. consumeTranslationUnit(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 306: external_declaration ::= ;
|
||||
// Rule 303: external_declaration ::= ;
|
||||
//
|
||||
case 306: { action. consumeDeclarationEmpty(); break;
|
||||
case 303: { action. consumeDeclarationEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 307: external_declaration ::= ERROR_TOKEN
|
||||
// Rule 304: external_declaration ::= ERROR_TOKEN
|
||||
//
|
||||
case 307: { action. consumeDeclarationProblem(); break;
|
||||
case 304: { action. consumeDeclarationProblem(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 310: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
|
||||
// Rule 307: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
|
||||
//
|
||||
case 310: { action. consumeFunctionDefinition(true); break;
|
||||
case 307: { action. consumeFunctionDefinition(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 311: function_definition ::= <openscope-ast> function_declarator function_body
|
||||
// Rule 308: function_definition ::= <openscope-ast> function_declarator function_body
|
||||
//
|
||||
case 311: { action. consumeFunctionDefinition(false); break;
|
||||
case 308: { action. consumeFunctionDefinition(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 312: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
|
||||
// Rule 309: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
|
||||
//
|
||||
case 312: { action. consumeFunctionDefinitionKnR(); break;
|
||||
case 309: { action. consumeFunctionDefinitionKnR(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 313: function_body ::= { }
|
||||
// Rule 310: function_body ::= { }
|
||||
//
|
||||
case 313: { action. consumeStatementCompoundStatement(false); break;
|
||||
case 310: { action. consumeStatementCompoundStatement(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 314: function_body ::= { <openscope-ast> block_item_list }
|
||||
// Rule 311: function_body ::= { <openscope-ast> block_item_list }
|
||||
//
|
||||
case 314: { action. consumeStatementCompoundStatement(true); break;
|
||||
case 311: { action. consumeStatementCompoundStatement(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 331: attribute_parameter ::= assignment_expression
|
||||
// Rule 328: attribute_parameter ::= assignment_expression
|
||||
//
|
||||
case 331: { action. consumeIgnore(); break;
|
||||
case 328: { action. consumeIgnore(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 341: extended_asm_declaration ::= asm volatile_opt ( extended_asm_param_seq ) ;
|
||||
// Rule 338: extended_asm_declaration ::= asm volatile_opt ( extended_asm_param_seq ) ;
|
||||
//
|
||||
case 341: { gnuAction.consumeDeclarationASM(); break;
|
||||
case 338: { gnuAction.consumeDeclarationASM(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 352: unary_expression ::= __alignof__ unary_expression
|
||||
// Rule 349: unary_expression ::= __alignof__ unary_expression
|
||||
//
|
||||
case 352: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_alignOf); break;
|
||||
case 349: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_alignOf); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 353: unary_expression ::= __alignof__ ( type_id )
|
||||
// Rule 350: unary_expression ::= __alignof__ ( type_id )
|
||||
//
|
||||
case 353: { action. consumeExpressionTypeId(IASTTypeIdExpression.op_alignof); break;
|
||||
case 350: { action. consumeExpressionTypeId(IASTTypeIdExpression.op_alignof); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 354: unary_expression ::= typeof unary_expression
|
||||
// Rule 351: unary_expression ::= typeof unary_expression
|
||||
//
|
||||
case 354: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_typeof); break;
|
||||
case 351: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_typeof); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 355: unary_expression ::= typeof ( type_id )
|
||||
// Rule 352: unary_expression ::= typeof ( type_id )
|
||||
//
|
||||
case 355: { action. consumeExpressionTypeId(IASTTypeIdExpression.op_typeof); break;
|
||||
case 352: { action. consumeExpressionTypeId(IASTTypeIdExpression.op_typeof); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 371: field_name_designator ::= identifier_token :
|
||||
// Rule 357: declaration_specifiers ::= <openscope-ast> typeof_declaration_specifiers
|
||||
//
|
||||
case 371: { gnuAction.consumeDesignatorField(); break;
|
||||
case 357: { gnuAction.consumeDeclarationSpecifiersTypeof(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 372: array_range_designator ::= [ constant_expression ... constant_expression ]
|
||||
// Rule 373: field_name_designator ::= identifier_token :
|
||||
//
|
||||
case 372: { gnuAction.consumeDesignatorArray(); break;
|
||||
case 373: { gnuAction.consumeDesignatorField(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 374: array_range_designator ::= [ constant_expression ... constant_expression ]
|
||||
//
|
||||
case 374: { gnuAction.consumeDesignatorArray(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 373: designated_initializer ::= <openscope-ast> field_name_designator initializer
|
||||
// Rule 375: designated_initializer ::= <openscope-ast> field_name_designator initializer
|
||||
//
|
||||
case 373: { action. consumeInitializerDesignated(); break;
|
||||
case 375: { action. consumeInitializerDesignated(); break;
|
||||
}
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -35,11 +35,11 @@ public interface GCCParsersym {
|
|||
TK_int = 52,
|
||||
TK_long = 53,
|
||||
TK_register = 32,
|
||||
TK_restrict = 27,
|
||||
TK_restrict = 26,
|
||||
TK_return = 47,
|
||||
TK_short = 54,
|
||||
TK_signed = 55,
|
||||
TK_sizeof = 16,
|
||||
TK_sizeof = 17,
|
||||
TK_static = 28,
|
||||
TK_struct = 62,
|
||||
TK_switch = 48,
|
||||
|
@ -52,27 +52,27 @@ public interface GCCParsersym {
|
|||
TK__Bool = 58,
|
||||
TK__Complex = 59,
|
||||
TK__Imaginary = 60,
|
||||
TK_integer = 17,
|
||||
TK_floating = 18,
|
||||
TK_charconst = 19,
|
||||
TK_stringlit = 13,
|
||||
TK_integer = 18,
|
||||
TK_floating = 19,
|
||||
TK_charconst = 20,
|
||||
TK_stringlit = 14,
|
||||
TK_identifier = 2,
|
||||
TK_Completion = 5,
|
||||
TK_EndOfCompletion = 3,
|
||||
TK_Invalid = 98,
|
||||
TK_LeftBracket = 35,
|
||||
TK_LeftParen = 1,
|
||||
TK_LeftBrace = 11,
|
||||
TK_LeftBrace = 12,
|
||||
TK_Dot = 70,
|
||||
TK_Arrow = 83,
|
||||
TK_PlusPlus = 14,
|
||||
TK_MinusMinus = 15,
|
||||
TK_And = 12,
|
||||
TK_Star = 6,
|
||||
TK_Plus = 9,
|
||||
TK_Minus = 10,
|
||||
TK_Tilde = 20,
|
||||
TK_Bang = 21,
|
||||
TK_PlusPlus = 15,
|
||||
TK_MinusMinus = 16,
|
||||
TK_And = 13,
|
||||
TK_Star = 8,
|
||||
TK_Plus = 10,
|
||||
TK_Minus = 11,
|
||||
TK_Tilde = 21,
|
||||
TK_Bang = 22,
|
||||
TK_Slash = 71,
|
||||
TK_Percent = 72,
|
||||
TK_RightShift = 67,
|
||||
|
@ -105,13 +105,13 @@ public interface GCCParsersym {
|
|||
TK_RightBracket = 77,
|
||||
TK_RightParen = 36,
|
||||
TK_RightBrace = 64,
|
||||
TK_SemiColon = 26,
|
||||
TK_typeof = 22,
|
||||
TK_SemiColon = 27,
|
||||
TK_typeof = 9,
|
||||
TK___alignof__ = 23,
|
||||
TK_MAX = 99,
|
||||
TK_MIN = 100,
|
||||
TK___attribute__ = 7,
|
||||
TK___declspec = 8,
|
||||
TK___attribute__ = 6,
|
||||
TK___declspec = 7,
|
||||
TK_asm = 4,
|
||||
TK_ERROR_TOKEN = 34,
|
||||
TK_EOF_TOKEN = 96;
|
||||
|
@ -123,9 +123,10 @@ public interface GCCParsersym {
|
|||
"EndOfCompletion",
|
||||
"asm",
|
||||
"Completion",
|
||||
"Star",
|
||||
"__attribute__",
|
||||
"__declspec",
|
||||
"Star",
|
||||
"typeof",
|
||||
"Plus",
|
||||
"Minus",
|
||||
"LeftBrace",
|
||||
|
@ -139,12 +140,11 @@ public interface GCCParsersym {
|
|||
"charconst",
|
||||
"Tilde",
|
||||
"Bang",
|
||||
"typeof",
|
||||
"__alignof__",
|
||||
"const",
|
||||
"volatile",
|
||||
"SemiColon",
|
||||
"restrict",
|
||||
"SemiColon",
|
||||
"static",
|
||||
"auto",
|
||||
"extern",
|
||||
|
|
|
@ -183,7 +183,7 @@ private void initActions(IASTTranslationUnit tu, Set<IParser.Options> options) {
|
|||
|
||||
gnuAction = new GCCBuildASTParserAction (this, tu, astStack, CNodeFactory.getDefault() );
|
||||
gnuAction.setParserOptions(options);
|
||||
|
||||
gnuAction.setBaseAction(action);
|
||||
|
||||
}
|
||||
|
||||
|
@ -263,81 +263,81 @@ private GCCBuildASTParserAction gnuAction;
|
|||
}
|
||||
|
||||
//
|
||||
// Rule 10: literal ::= integer
|
||||
// Rule 12: literal ::= integer
|
||||
//
|
||||
case 10: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_integer_constant); break;
|
||||
case 12: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_integer_constant); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 11: literal ::= floating
|
||||
// Rule 13: literal ::= floating
|
||||
//
|
||||
case 11: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_float_constant); break;
|
||||
case 13: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_float_constant); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 12: literal ::= charconst
|
||||
// Rule 14: literal ::= charconst
|
||||
//
|
||||
case 12: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_char_constant); break;
|
||||
case 14: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_char_constant); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 13: literal ::= stringlit
|
||||
// Rule 15: literal ::= stringlit
|
||||
//
|
||||
case 13: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_string_literal); break;
|
||||
case 15: { action. consumeExpressionLiteral(IASTLiteralExpression.lk_string_literal); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 15: primary_expression ::= primary_expression_id
|
||||
// Rule 17: primary_expression ::= primary_expression_id
|
||||
//
|
||||
case 15: { action. consumeExpressionID(); break;
|
||||
case 17: { action. consumeExpressionID(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 16: primary_expression ::= ( expression )
|
||||
// Rule 18: primary_expression ::= ( expression )
|
||||
//
|
||||
case 16: { action. consumeExpressionBracketed(); break;
|
||||
case 18: { action. consumeExpressionBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 20: postfix_expression ::= postfix_expression [ expression ]
|
||||
// Rule 21: postfix_expression ::= postfix_expression [ expression ]
|
||||
//
|
||||
case 20: { action. consumeExpressionArraySubscript(); break;
|
||||
case 21: { action. consumeExpressionArraySubscript(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 21: postfix_expression ::= postfix_expression ( expression_list_opt )
|
||||
// Rule 22: postfix_expression ::= postfix_expression ( expression_list_opt )
|
||||
//
|
||||
case 21: { action. consumeExpressionFunctionCall(); break;
|
||||
case 22: { action. consumeExpressionFunctionCall(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 22: postfix_expression ::= postfix_expression . member_name
|
||||
// Rule 23: postfix_expression ::= postfix_expression . member_name
|
||||
//
|
||||
case 22: { action. consumeExpressionFieldReference(false); break;
|
||||
case 23: { action. consumeExpressionFieldReference(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 23: postfix_expression ::= postfix_expression -> member_name
|
||||
// Rule 24: postfix_expression ::= postfix_expression -> member_name
|
||||
//
|
||||
case 23: { action. consumeExpressionFieldReference(true); break;
|
||||
case 24: { action. consumeExpressionFieldReference(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 24: postfix_expression ::= postfix_expression ++
|
||||
// Rule 25: postfix_expression ::= postfix_expression ++
|
||||
//
|
||||
case 24: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); break;
|
||||
case 25: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 25: postfix_expression ::= postfix_expression --
|
||||
// Rule 26: postfix_expression ::= postfix_expression --
|
||||
//
|
||||
case 25: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); break;
|
||||
case 26: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 26: postfix_expression ::= ( type_id ) { <openscope-ast> initializer_list comma_opt }
|
||||
// Rule 27: postfix_expression ::= ( type_id ) { <openscope-ast> initializer_list comma_opt }
|
||||
//
|
||||
case 26: { action. consumeExpressionTypeIdInitializer(); break;
|
||||
case 27: { action. consumeExpressionTypeIdInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -785,531 +785,531 @@ private GCCBuildASTParserAction gnuAction;
|
|||
}
|
||||
|
||||
//
|
||||
// Rule 177: typedef_name_in_declspec ::= Completion
|
||||
// Rule 177: type_name_specifier ::= identifier_token
|
||||
//
|
||||
case 177: { action. consumeToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 178: typedef_name_in_declspec ::= identifier
|
||||
// Rule 178: struct_or_union_specifier ::= struct_or_union struct_or_union_specifier_hook { <openscope-ast> struct_declaration_list_opt }
|
||||
//
|
||||
case 178: { action. consumeToken(); break;
|
||||
case 178: { action. consumeTypeSpecifierComposite(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 181: struct_or_union_specifier ::= struct_or_union struct_or_union_specifier_hook { <openscope-ast> struct_declaration_list_opt }
|
||||
// Rule 179: struct_or_union_specifier ::= struct_or_union struct_or_union_specifier_hook identifier_token struct_or_union_specifier_suffix_hook { <openscope-ast> struct_declaration_list_opt }
|
||||
//
|
||||
case 181: { action. consumeTypeSpecifierComposite(false); break;
|
||||
case 179: { action. consumeTypeSpecifierComposite(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 182: struct_or_union_specifier ::= struct_or_union struct_or_union_specifier_hook identifier_token struct_or_union_specifier_suffix_hook { <openscope-ast> struct_declaration_list_opt }
|
||||
// Rule 184: elaborated_specifier ::= struct elaborated_specifier_hook identifier_token
|
||||
//
|
||||
case 182: { action. consumeTypeSpecifierComposite(true); break;
|
||||
case 184: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_struct); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 187: elaborated_specifier ::= struct elaborated_specifier_hook identifier_token
|
||||
// Rule 185: elaborated_specifier ::= union elaborated_specifier_hook identifier_token
|
||||
//
|
||||
case 187: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_struct); break;
|
||||
case 185: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_union); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 188: elaborated_specifier ::= union elaborated_specifier_hook identifier_token
|
||||
// Rule 186: elaborated_specifier ::= enum elaborated_specifier_hook identifier_token
|
||||
//
|
||||
case 188: { action. consumeTypeSpecifierElaborated(IASTCompositeTypeSpecifier.k_union); break;
|
||||
case 186: { action. consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_enum); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 189: elaborated_specifier ::= enum elaborated_specifier_hook identifier_token
|
||||
// Rule 192: struct_declaration ::= specifier_qualifier_list <openscope-ast> struct_declarator_list ;
|
||||
//
|
||||
case 189: { action. consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_enum); break;
|
||||
case 192: { action. consumeStructDeclaration(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 195: struct_declaration ::= specifier_qualifier_list <openscope-ast> struct_declarator_list ;
|
||||
// Rule 193: struct_declaration ::= specifier_qualifier_list ;
|
||||
//
|
||||
case 195: { action. consumeStructDeclaration(true); break;
|
||||
case 193: { action. consumeStructDeclaration(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 196: struct_declaration ::= specifier_qualifier_list ;
|
||||
// Rule 194: struct_declaration ::= ERROR_TOKEN
|
||||
//
|
||||
case 196: { action. consumeStructDeclaration(false); break;
|
||||
case 194: { action. consumeDeclarationProblem(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 197: struct_declaration ::= ERROR_TOKEN
|
||||
// Rule 200: struct_declarator ::= : constant_expression
|
||||
//
|
||||
case 197: { action. consumeDeclarationProblem(); break;
|
||||
case 200: { action. consumeBitField(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 203: struct_declarator ::= : constant_expression
|
||||
// Rule 201: struct_declarator ::= declarator : constant_expression
|
||||
//
|
||||
case 203: { action. consumeBitField(false); break;
|
||||
case 201: { action. consumeBitField(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 204: struct_declarator ::= declarator : constant_expression
|
||||
// Rule 202: enum_specifier ::= enum enum_specifier_hook { <openscope-ast> enumerator_list_opt comma_opt }
|
||||
//
|
||||
case 204: { action. consumeBitField(true); break;
|
||||
case 202: { action. consumeTypeSpecifierEnumeration(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 205: enum_specifier ::= enum enum_specifier_hook { <openscope-ast> enumerator_list_opt comma_opt }
|
||||
// Rule 203: enum_specifier ::= enum enum_specifier_hook identifier_token { <openscope-ast> enumerator_list_opt comma_opt }
|
||||
//
|
||||
case 205: { action. consumeTypeSpecifierEnumeration(false); break;
|
||||
case 203: { action. consumeTypeSpecifierEnumeration(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 206: enum_specifier ::= enum enum_specifier_hook identifier_token { <openscope-ast> enumerator_list_opt comma_opt }
|
||||
// Rule 209: enumerator ::= identifier_token
|
||||
//
|
||||
case 206: { action. consumeTypeSpecifierEnumeration(true); break;
|
||||
case 209: { action. consumeEnumerator(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 212: enumerator ::= identifier_token
|
||||
// Rule 210: enumerator ::= identifier_token = constant_expression
|
||||
//
|
||||
case 212: { action. consumeEnumerator(false); break;
|
||||
case 210: { action. consumeEnumerator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 213: enumerator ::= identifier_token = constant_expression
|
||||
// Rule 211: type_qualifier ::= type_qualifier_token
|
||||
//
|
||||
case 213: { action. consumeEnumerator(true); break;
|
||||
case 211: { action. consumeToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 214: type_qualifier ::= type_qualifier_token
|
||||
// Rule 215: function_specifier ::= inline
|
||||
//
|
||||
case 214: { action. consumeToken(); break;
|
||||
case 215: { action. consumeToken(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 218: function_specifier ::= inline
|
||||
// Rule 217: declarator ::= <openscope-ast> pointer_seq direct_declarator
|
||||
//
|
||||
case 218: { action. consumeToken(); break;
|
||||
case 217: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 220: declarator ::= <openscope-ast> pointer_seq direct_declarator
|
||||
// Rule 222: basic_direct_declarator ::= declarator_id_name
|
||||
//
|
||||
case 220: { action. consumeDeclaratorWithPointer(true); break;
|
||||
case 222: { action. consumeDirectDeclaratorIdentifier(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 225: basic_direct_declarator ::= declarator_id_name
|
||||
// Rule 223: basic_direct_declarator ::= ( declarator )
|
||||
//
|
||||
case 225: { action. consumeDirectDeclaratorIdentifier(); break;
|
||||
case 223: { action. consumeDirectDeclaratorBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 226: basic_direct_declarator ::= ( declarator )
|
||||
// Rule 224: declarator_id_name ::= identifier
|
||||
//
|
||||
case 226: { action. consumeDirectDeclaratorBracketed(); break;
|
||||
case 224: { action. consumeIdentifierName(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 227: declarator_id_name ::= identifier
|
||||
// Rule 225: array_direct_declarator ::= basic_direct_declarator array_modifier
|
||||
//
|
||||
case 227: { action. consumeIdentifierName(); break;
|
||||
case 225: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 228: array_direct_declarator ::= basic_direct_declarator array_modifier
|
||||
// Rule 226: array_direct_declarator ::= array_direct_declarator array_modifier
|
||||
//
|
||||
case 228: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
case 226: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 229: array_direct_declarator ::= array_direct_declarator array_modifier
|
||||
// Rule 228: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list )
|
||||
//
|
||||
case 229: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
case 228: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 231: function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_type_list )
|
||||
// Rule 229: function_direct_declarator ::= basic_direct_declarator ( )
|
||||
//
|
||||
case 231: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
|
||||
case 229: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 232: function_direct_declarator ::= basic_direct_declarator ( )
|
||||
// Rule 231: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator
|
||||
//
|
||||
case 232: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
|
||||
case 231: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 234: function_declarator ::= <openscope-ast> pointer_seq function_direct_declarator
|
||||
// Rule 232: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list )
|
||||
//
|
||||
case 232: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 234: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator
|
||||
//
|
||||
case 234: { action. consumeDeclaratorWithPointer(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 235: knr_direct_declarator ::= basic_direct_declarator ( <openscope-ast> identifier_list )
|
||||
// Rule 235: identifier_list ::= identifier
|
||||
//
|
||||
case 235: { action. consumeDirectDeclaratorFunctionDeclaratorKnR(); break;
|
||||
case 235: { action. consumeIdentifierKnR(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 237: knr_function_declarator ::= <openscope-ast> pointer_seq knr_direct_declarator
|
||||
// Rule 236: identifier_list ::= identifier_list , identifier
|
||||
//
|
||||
case 237: { action. consumeDeclaratorWithPointer(true); break;
|
||||
case 236: { action. consumeIdentifierKnR(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 238: identifier_list ::= identifier
|
||||
// Rule 237: array_modifier ::= [ ]
|
||||
//
|
||||
case 238: { action. consumeIdentifierKnR(); break;
|
||||
case 237: { action. consumeDirectDeclaratorArrayModifier(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 239: identifier_list ::= identifier_list , identifier
|
||||
// Rule 238: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
|
||||
//
|
||||
case 239: { action. consumeIdentifierKnR(); break;
|
||||
case 238: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 240: array_modifier ::= [ ]
|
||||
// Rule 239: array_modifier ::= [ assignment_expression ]
|
||||
//
|
||||
case 240: { action. consumeDirectDeclaratorArrayModifier(false); break;
|
||||
case 239: { action. consumeDirectDeclaratorArrayModifier(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 241: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers ]
|
||||
// Rule 240: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
//
|
||||
case 241: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, false); break;
|
||||
case 240: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 242: array_modifier ::= [ assignment_expression ]
|
||||
// Rule 241: array_modifier ::= [ static assignment_expression ]
|
||||
//
|
||||
case 242: { action. consumeDirectDeclaratorArrayModifier(true); break;
|
||||
case 241: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 243: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
// Rule 242: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
//
|
||||
case 243: { action. consumeDirectDeclaratorModifiedArrayModifier(false, false, true, true); break;
|
||||
case 242: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 244: array_modifier ::= [ static assignment_expression ]
|
||||
// Rule 243: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
|
||||
//
|
||||
case 244: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, false, true); break;
|
||||
case 243: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 245: array_modifier ::= [ static <openscope-ast> array_modifier_type_qualifiers assignment_expression ]
|
||||
// Rule 244: array_modifier ::= [ * ]
|
||||
//
|
||||
case 245: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
case 244: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 246: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers static assignment_expression ]
|
||||
// Rule 245: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
|
||||
//
|
||||
case 246: { action. consumeDirectDeclaratorModifiedArrayModifier(true, false, true, true); break;
|
||||
case 245: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 247: array_modifier ::= [ * ]
|
||||
// Rule 247: pointer_seq ::= pointer_hook *
|
||||
//
|
||||
case 247: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, false, false); break;
|
||||
case 247: { action. consumePointer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 248: array_modifier ::= [ <openscope-ast> array_modifier_type_qualifiers * ]
|
||||
// Rule 248: pointer_seq ::= pointer_seq pointer_hook *
|
||||
//
|
||||
case 248: { action. consumeDirectDeclaratorModifiedArrayModifier(false, true, true, false); break;
|
||||
case 248: { action. consumePointer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 250: pointer_seq ::= pointer_hook *
|
||||
// Rule 249: pointer_seq ::= pointer_hook * <openscope-ast> type_qualifier_list
|
||||
//
|
||||
case 250: { action. consumePointer(); break;
|
||||
case 249: { action. consumePointerTypeQualifierList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 251: pointer_seq ::= pointer_seq pointer_hook *
|
||||
// Rule 250: pointer_seq ::= pointer_seq pointer_hook * <openscope-ast> type_qualifier_list
|
||||
//
|
||||
case 251: { action. consumePointer(); break;
|
||||
case 250: { action. consumePointerTypeQualifierList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 252: pointer_seq ::= pointer_hook * <openscope-ast> type_qualifier_list
|
||||
// Rule 254: parameter_type_list ::= parameter_list
|
||||
//
|
||||
case 252: { action. consumePointerTypeQualifierList(); break;
|
||||
case 254: { action. consumeEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 253: pointer_seq ::= pointer_seq pointer_hook * <openscope-ast> type_qualifier_list
|
||||
// Rule 255: parameter_type_list ::= parameter_list , ...
|
||||
//
|
||||
case 253: { action. consumePointerTypeQualifierList(); break;
|
||||
case 255: { action. consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 257: parameter_type_list ::= parameter_list
|
||||
// Rule 256: parameter_type_list ::= ...
|
||||
//
|
||||
case 257: { action. consumeEmpty(); break;
|
||||
case 256: { action. consumePlaceHolder(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 258: parameter_type_list ::= parameter_list , ...
|
||||
// Rule 259: parameter_declaration ::= declaration_specifiers complete_parameter_declarator
|
||||
//
|
||||
case 258: { action. consumePlaceHolder(); break;
|
||||
case 259: { action. consumeParameterDeclaration(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 259: parameter_type_list ::= ...
|
||||
// Rule 260: parameter_declaration ::= declaration_specifiers
|
||||
//
|
||||
case 259: { action. consumePlaceHolder(); break;
|
||||
case 260: { action. consumeParameterDeclarationWithoutDeclarator(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 262: parameter_declaration ::= declaration_specifiers complete_parameter_declarator
|
||||
// Rule 263: type_id ::= specifier_qualifier_list
|
||||
//
|
||||
case 262: { action. consumeParameterDeclaration(); break;
|
||||
case 263: { action. consumeTypeId(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 263: parameter_declaration ::= declaration_specifiers
|
||||
// Rule 264: type_id ::= specifier_qualifier_list abstract_declarator
|
||||
//
|
||||
case 263: { action. consumeParameterDeclarationWithoutDeclarator(); break;
|
||||
case 264: { action. consumeTypeId(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 266: type_id ::= specifier_qualifier_list
|
||||
// Rule 266: abstract_declarator ::= <openscope-ast> pointer_seq
|
||||
//
|
||||
case 266: { action. consumeTypeId(false); break;
|
||||
case 266: { action. consumeDeclaratorWithPointer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 267: type_id ::= specifier_qualifier_list abstract_declarator
|
||||
// Rule 267: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
//
|
||||
case 267: { action. consumeTypeId(true); break;
|
||||
case 267: { action. consumeDeclaratorWithPointer(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 269: abstract_declarator ::= <openscope-ast> pointer_seq
|
||||
// Rule 271: basic_direct_abstract_declarator ::= ( abstract_declarator )
|
||||
//
|
||||
case 269: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 271: { action. consumeDirectDeclaratorBracketed(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 270: abstract_declarator ::= <openscope-ast> pointer_seq direct_abstract_declarator
|
||||
// Rule 272: array_direct_abstract_declarator ::= array_modifier
|
||||
//
|
||||
case 270: { action. consumeDeclaratorWithPointer(false); break;
|
||||
case 272: { action. consumeDirectDeclaratorArrayDeclarator(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 274: basic_direct_abstract_declarator ::= ( abstract_declarator )
|
||||
// Rule 273: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 274: { action. consumeDirectDeclaratorBracketed(); break;
|
||||
case 273: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 275: array_direct_abstract_declarator ::= array_modifier
|
||||
// Rule 274: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 275: { action. consumeDirectDeclaratorArrayDeclarator(false); break;
|
||||
case 274: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 276: array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
|
||||
// Rule 275: function_direct_abstract_declarator ::= ( )
|
||||
//
|
||||
case 276: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 277: array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
|
||||
//
|
||||
case 277: { action. consumeDirectDeclaratorArrayDeclarator(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 278: function_direct_abstract_declarator ::= ( )
|
||||
//
|
||||
case 278: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break;
|
||||
case 275: { action. consumeDirectDeclaratorFunctionDeclarator(false, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 279: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( )
|
||||
// Rule 276: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( )
|
||||
//
|
||||
case 279: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
|
||||
case 276: { action. consumeDirectDeclaratorFunctionDeclarator(true, false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 280: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list )
|
||||
// Rule 277: function_direct_abstract_declarator ::= ( <openscope-ast> parameter_type_list )
|
||||
//
|
||||
case 280: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break;
|
||||
case 277: { action. consumeDirectDeclaratorFunctionDeclarator(false, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 281: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list )
|
||||
// Rule 278: function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_type_list )
|
||||
//
|
||||
case 281: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
|
||||
case 278: { action. consumeDirectDeclaratorFunctionDeclarator(true, true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 282: initializer ::= assignment_expression
|
||||
// Rule 279: initializer ::= assignment_expression
|
||||
//
|
||||
case 282: { action. consumeInitializer(); break;
|
||||
case 279: { action. consumeInitializer(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 283: initializer ::= start_initializer_list { <openscope-ast> initializer_list comma_opt } end_initializer_list
|
||||
// Rule 280: initializer ::= start_initializer_list { <openscope-ast> initializer_list comma_opt } end_initializer_list
|
||||
//
|
||||
case 283: { action. consumeInitializerList(); break;
|
||||
case 280: { action. consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 284: initializer ::= { <openscope-ast> }
|
||||
// Rule 281: initializer ::= { <openscope-ast> }
|
||||
//
|
||||
case 284: { action. consumeInitializerList(); break;
|
||||
case 281: { action. consumeInitializerList(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 285: start_initializer_list ::= $Empty
|
||||
// Rule 282: start_initializer_list ::= $Empty
|
||||
//
|
||||
case 285: { action. initializerListStart(); break;
|
||||
case 282: { action. initializerListStart(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 286: end_initializer_list ::= $Empty
|
||||
// Rule 283: end_initializer_list ::= $Empty
|
||||
//
|
||||
case 286: { action. initializerListEnd(); break;
|
||||
case 283: { action. initializerListEnd(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 291: designated_initializer ::= <openscope-ast> designation = initializer
|
||||
// Rule 288: designated_initializer ::= <openscope-ast> designation = initializer
|
||||
//
|
||||
case 291: { action. consumeInitializerDesignated(); break;
|
||||
case 288: { action. consumeInitializerDesignated(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 295: designator_base ::= [ constant_expression ]
|
||||
// Rule 292: designator_base ::= [ constant_expression ]
|
||||
//
|
||||
case 295: { action. consumeDesignatorArray(); break;
|
||||
case 292: { action. consumeDesignatorArray(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 296: designator_base ::= . identifier_token
|
||||
// Rule 293: designator_base ::= . identifier_token
|
||||
//
|
||||
case 296: { action. consumeDesignatorField(); break;
|
||||
case 293: { action. consumeDesignatorField(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 297: designator ::= [ constant_expression ]
|
||||
// Rule 294: designator ::= [ constant_expression ]
|
||||
//
|
||||
case 297: { action. consumeDesignatorArray(); break;
|
||||
case 294: { action. consumeDesignatorArray(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 298: designator ::= . identifier_token
|
||||
// Rule 295: designator ::= . identifier_token
|
||||
//
|
||||
case 298: { action. consumeDesignatorField(); break;
|
||||
case 295: { action. consumeDesignatorField(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 299: translation_unit ::= external_declaration_list
|
||||
// Rule 296: translation_unit ::= external_declaration_list
|
||||
//
|
||||
case 299: { action. consumeTranslationUnit(); break;
|
||||
case 296: { action. consumeTranslationUnit(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 300: translation_unit ::= $Empty
|
||||
// Rule 297: translation_unit ::= $Empty
|
||||
//
|
||||
case 300: { action. consumeTranslationUnit(); break;
|
||||
case 297: { action. consumeTranslationUnit(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 305: external_declaration ::= ;
|
||||
// Rule 302: external_declaration ::= ;
|
||||
//
|
||||
case 305: { action. consumeDeclarationEmpty(); break;
|
||||
case 302: { action. consumeDeclarationEmpty(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 306: external_declaration ::= ERROR_TOKEN
|
||||
// Rule 303: external_declaration ::= ERROR_TOKEN
|
||||
//
|
||||
case 306: { action. consumeDeclarationProblem(); break;
|
||||
case 303: { action. consumeDeclarationProblem(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 309: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
|
||||
// Rule 306: function_definition ::= declaration_specifiers <openscope-ast> function_declarator function_body
|
||||
//
|
||||
case 309: { action. consumeFunctionDefinition(true); break;
|
||||
case 306: { action. consumeFunctionDefinition(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 310: function_definition ::= <openscope-ast> function_declarator function_body
|
||||
// Rule 307: function_definition ::= <openscope-ast> function_declarator function_body
|
||||
//
|
||||
case 310: { action. consumeFunctionDefinition(false); break;
|
||||
case 307: { action. consumeFunctionDefinition(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 311: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
|
||||
// Rule 308: function_definition ::= declaration_specifiers <openscope-ast> knr_function_declarator <openscope-ast> declaration_list compound_statement
|
||||
//
|
||||
case 311: { action. consumeFunctionDefinitionKnR(); break;
|
||||
case 308: { action. consumeFunctionDefinitionKnR(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 312: function_body ::= { }
|
||||
// Rule 309: function_body ::= { }
|
||||
//
|
||||
case 312: { action. consumeStatementCompoundStatement(false); break;
|
||||
case 309: { action. consumeStatementCompoundStatement(false); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 313: function_body ::= { <openscope-ast> block_item_list }
|
||||
// Rule 310: function_body ::= { <openscope-ast> block_item_list }
|
||||
//
|
||||
case 313: { action. consumeStatementCompoundStatement(true); break;
|
||||
case 310: { action. consumeStatementCompoundStatement(true); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 330: attribute_parameter ::= assignment_expression
|
||||
// Rule 327: attribute_parameter ::= assignment_expression
|
||||
//
|
||||
case 330: { action. consumeIgnore(); break;
|
||||
case 327: { action. consumeIgnore(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 340: extended_asm_declaration ::= asm volatile_opt ( extended_asm_param_seq ) ;
|
||||
// Rule 337: extended_asm_declaration ::= asm volatile_opt ( extended_asm_param_seq ) ;
|
||||
//
|
||||
case 340: { gnuAction.consumeDeclarationASM(); break;
|
||||
case 337: { gnuAction.consumeDeclarationASM(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 351: unary_expression ::= __alignof__ unary_expression
|
||||
// Rule 348: unary_expression ::= __alignof__ unary_expression
|
||||
//
|
||||
case 351: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_alignOf); break;
|
||||
case 348: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_alignOf); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 352: unary_expression ::= typeof unary_expression
|
||||
// Rule 349: unary_expression ::= typeof unary_expression
|
||||
//
|
||||
case 352: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_typeof); break;
|
||||
case 349: { action. consumeExpressionUnaryOperator(IASTUnaryExpression.op_typeof); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 368: field_name_designator ::= identifier_token :
|
||||
// Rule 354: declaration_specifiers ::= <openscope-ast> typeof_declaration_specifiers
|
||||
//
|
||||
case 368: { gnuAction.consumeDesignatorField(); break;
|
||||
case 354: { gnuAction.consumeDeclarationSpecifiersTypeof(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 369: array_range_designator ::= [ constant_expression ... constant_expression ]
|
||||
// Rule 370: field_name_designator ::= identifier_token :
|
||||
//
|
||||
case 369: { gnuAction.consumeDesignatorArray(); break;
|
||||
case 370: { gnuAction.consumeDesignatorField(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 371: array_range_designator ::= [ constant_expression ... constant_expression ]
|
||||
//
|
||||
case 371: { gnuAction.consumeDesignatorArray(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 370: designated_initializer ::= <openscope-ast> field_name_designator initializer
|
||||
// Rule 372: designated_initializer ::= <openscope-ast> field_name_designator initializer
|
||||
//
|
||||
case 370: { action. consumeInitializerDesignated(); break;
|
||||
case 372: { action. consumeInitializerDesignated(); break;
|
||||
}
|
||||
|
||||
//
|
||||
// Rule 372: no_sizeof_type_name_start ::= ERROR_TOKEN
|
||||
// Rule 374: no_sizeof_type_name_start ::= ERROR_TOKEN
|
||||
//
|
||||
case 372: { action. consumeExpressionProblem(); break;
|
||||
case 374: { action. consumeExpressionProblem(); break;
|
||||
}
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -19,7 +19,7 @@ public interface GCCSizeofExpressionParsersym {
|
|||
TK_break = 86,
|
||||
TK_case = 87,
|
||||
TK_char = 39,
|
||||
TK_const = 11,
|
||||
TK_const = 9,
|
||||
TK_continue = 88,
|
||||
TK_default = 89,
|
||||
TK_do = 90,
|
||||
|
@ -35,44 +35,44 @@ public interface GCCSizeofExpressionParsersym {
|
|||
TK_int = 42,
|
||||
TK_long = 43,
|
||||
TK_register = 33,
|
||||
TK_restrict = 13,
|
||||
TK_restrict = 12,
|
||||
TK_return = 95,
|
||||
TK_short = 44,
|
||||
TK_signed = 45,
|
||||
TK_sizeof = 19,
|
||||
TK_static = 28,
|
||||
TK_sizeof = 20,
|
||||
TK_static = 21,
|
||||
TK_struct = 53,
|
||||
TK_switch = 96,
|
||||
TK_typedef = 34,
|
||||
TK_union = 54,
|
||||
TK_unsigned = 46,
|
||||
TK_void = 47,
|
||||
TK_volatile = 14,
|
||||
TK_volatile = 13,
|
||||
TK_while = 97,
|
||||
TK__Bool = 48,
|
||||
TK__Complex = 49,
|
||||
TK__Imaginary = 50,
|
||||
TK_integer = 20,
|
||||
TK_floating = 21,
|
||||
TK_charconst = 22,
|
||||
TK_stringlit = 18,
|
||||
TK_integer = 22,
|
||||
TK_floating = 23,
|
||||
TK_charconst = 24,
|
||||
TK_stringlit = 19,
|
||||
TK_identifier = 1,
|
||||
TK_Completion = 6,
|
||||
TK_EndOfCompletion = 7,
|
||||
TK_Completion = 7,
|
||||
TK_EndOfCompletion = 6,
|
||||
TK_Invalid = 98,
|
||||
TK_LeftBracket = 17,
|
||||
TK_LeftBracket = 18,
|
||||
TK_LeftParen = 2,
|
||||
TK_LeftBrace = 29,
|
||||
TK_Dot = 55,
|
||||
TK_Arrow = 71,
|
||||
TK_PlusPlus = 15,
|
||||
TK_MinusMinus = 16,
|
||||
TK_And = 12,
|
||||
TK_PlusPlus = 16,
|
||||
TK_MinusMinus = 17,
|
||||
TK_And = 14,
|
||||
TK_Star = 8,
|
||||
TK_Plus = 9,
|
||||
TK_Minus = 10,
|
||||
TK_Tilde = 23,
|
||||
TK_Bang = 24,
|
||||
TK_Plus = 10,
|
||||
TK_Minus = 11,
|
||||
TK_Tilde = 25,
|
||||
TK_Bang = 26,
|
||||
TK_Slash = 56,
|
||||
TK_Percent = 57,
|
||||
TK_RightShift = 37,
|
||||
|
@ -103,11 +103,11 @@ public interface GCCSizeofExpressionParsersym {
|
|||
TK_OrAssign = 83,
|
||||
TK_Comma = 35,
|
||||
TK_RightBracket = 64,
|
||||
TK_RightParen = 25,
|
||||
TK_RightParen = 27,
|
||||
TK_RightBrace = 36,
|
||||
TK_SemiColon = 84,
|
||||
TK_typeof = 26,
|
||||
TK___alignof__ = 27,
|
||||
TK_typeof = 15,
|
||||
TK___alignof__ = 28,
|
||||
TK_MAX = 99,
|
||||
TK_MIN = 100,
|
||||
TK___attribute__ = 3,
|
||||
|
@ -123,29 +123,29 @@ public interface GCCSizeofExpressionParsersym {
|
|||
"__attribute__",
|
||||
"__declspec",
|
||||
"asm",
|
||||
"Completion",
|
||||
"EndOfCompletion",
|
||||
"Completion",
|
||||
"Star",
|
||||
"const",
|
||||
"Plus",
|
||||
"Minus",
|
||||
"const",
|
||||
"And",
|
||||
"restrict",
|
||||
"volatile",
|
||||
"And",
|
||||
"typeof",
|
||||
"PlusPlus",
|
||||
"MinusMinus",
|
||||
"LeftBracket",
|
||||
"stringlit",
|
||||
"sizeof",
|
||||
"static",
|
||||
"integer",
|
||||
"floating",
|
||||
"charconst",
|
||||
"Tilde",
|
||||
"Bang",
|
||||
"RightParen",
|
||||
"typeof",
|
||||
"__alignof__",
|
||||
"static",
|
||||
"LeftBrace",
|
||||
"auto",
|
||||
"extern",
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -15,134 +15,136 @@ package org.eclipse.cdt.internal.core.dom.lrparser.gpp;
|
|||
|
||||
public interface GPPParsersym {
|
||||
public final static int
|
||||
TK__Complex = 14,
|
||||
TK__Imaginary = 15,
|
||||
TK_asm = 5,
|
||||
TK_auto = 32,
|
||||
TK_bool = 14,
|
||||
TK_break = 80,
|
||||
TK_case = 81,
|
||||
TK_catch = 122,
|
||||
TK_char = 15,
|
||||
TK_class = 44,
|
||||
TK_const = 25,
|
||||
TK_const_cast = 45,
|
||||
TK_continue = 82,
|
||||
TK_default = 83,
|
||||
TK_delete = 71,
|
||||
TK_do = 84,
|
||||
TK_double = 16,
|
||||
TK_dynamic_cast = 46,
|
||||
TK_else = 125,
|
||||
TK_enum = 60,
|
||||
TK_explicit = 33,
|
||||
TK_export = 90,
|
||||
TK_extern = 34,
|
||||
TK_false = 47,
|
||||
TK_float = 17,
|
||||
TK_for = 85,
|
||||
TK_friend = 35,
|
||||
TK_goto = 86,
|
||||
TK_if = 87,
|
||||
TK_inline = 36,
|
||||
TK_int = 18,
|
||||
TK_long = 19,
|
||||
TK_mutable = 37,
|
||||
TK_namespace = 64,
|
||||
TK_new = 72,
|
||||
TK_auto = 31,
|
||||
TK_bool = 16,
|
||||
TK_break = 82,
|
||||
TK_case = 83,
|
||||
TK_catch = 124,
|
||||
TK_char = 17,
|
||||
TK_class = 60,
|
||||
TK_const = 28,
|
||||
TK_const_cast = 47,
|
||||
TK_continue = 84,
|
||||
TK_default = 85,
|
||||
TK_delete = 74,
|
||||
TK_do = 86,
|
||||
TK_double = 18,
|
||||
TK_dynamic_cast = 48,
|
||||
TK_else = 127,
|
||||
TK_enum = 62,
|
||||
TK_explicit = 32,
|
||||
TK_export = 92,
|
||||
TK_extern = 33,
|
||||
TK_false = 49,
|
||||
TK_float = 19,
|
||||
TK_for = 87,
|
||||
TK_friend = 34,
|
||||
TK_goto = 88,
|
||||
TK_if = 89,
|
||||
TK_inline = 35,
|
||||
TK_int = 20,
|
||||
TK_long = 21,
|
||||
TK_mutable = 36,
|
||||
TK_namespace = 66,
|
||||
TK_new = 75,
|
||||
TK_operator = 9,
|
||||
TK_private = 106,
|
||||
TK_protected = 107,
|
||||
TK_public = 108,
|
||||
TK_register = 38,
|
||||
TK_reinterpret_cast = 48,
|
||||
TK_return = 88,
|
||||
TK_short = 20,
|
||||
TK_signed = 21,
|
||||
TK_sizeof = 49,
|
||||
TK_static = 39,
|
||||
TK_static_cast = 50,
|
||||
TK_struct = 61,
|
||||
TK_switch = 89,
|
||||
TK_template = 59,
|
||||
TK_this = 51,
|
||||
TK_throw = 65,
|
||||
TK_private = 108,
|
||||
TK_protected = 109,
|
||||
TK_public = 110,
|
||||
TK_register = 37,
|
||||
TK_reinterpret_cast = 50,
|
||||
TK_return = 90,
|
||||
TK_short = 22,
|
||||
TK_signed = 23,
|
||||
TK_sizeof = 51,
|
||||
TK_static = 38,
|
||||
TK_static_cast = 52,
|
||||
TK_struct = 63,
|
||||
TK_switch = 91,
|
||||
TK_template = 61,
|
||||
TK_this = 53,
|
||||
TK_throw = 67,
|
||||
TK_try = 78,
|
||||
TK_true = 52,
|
||||
TK_typedef = 40,
|
||||
TK_typeid = 53,
|
||||
TK_true = 54,
|
||||
TK_typedef = 39,
|
||||
TK_typeid = 55,
|
||||
TK_typename = 13,
|
||||
TK_union = 62,
|
||||
TK_unsigned = 22,
|
||||
TK_using = 66,
|
||||
TK_virtual = 26,
|
||||
TK_void = 23,
|
||||
TK_volatile = 27,
|
||||
TK_wchar_t = 24,
|
||||
TK_while = 79,
|
||||
TK_integer = 54,
|
||||
TK_floating = 55,
|
||||
TK_charconst = 56,
|
||||
TK_stringlit = 31,
|
||||
TK_union = 64,
|
||||
TK_unsigned = 24,
|
||||
TK_using = 68,
|
||||
TK_virtual = 30,
|
||||
TK_void = 25,
|
||||
TK_volatile = 29,
|
||||
TK_wchar_t = 26,
|
||||
TK_while = 81,
|
||||
TK_integer = 56,
|
||||
TK_floating = 57,
|
||||
TK_charconst = 58,
|
||||
TK_stringlit = 42,
|
||||
TK_identifier = 1,
|
||||
TK_Completion = 2,
|
||||
TK_EndOfCompletion = 10,
|
||||
TK_Invalid = 126,
|
||||
TK_LeftBracket = 68,
|
||||
TK_EndOfCompletion = 11,
|
||||
TK_Invalid = 128,
|
||||
TK_LeftBracket = 69,
|
||||
TK_LeftParen = 3,
|
||||
TK_Dot = 123,
|
||||
TK_DotStar = 95,
|
||||
TK_Arrow = 109,
|
||||
TK_ArrowStar = 94,
|
||||
TK_PlusPlus = 41,
|
||||
TK_MinusMinus = 42,
|
||||
TK_Dot = 125,
|
||||
TK_DotStar = 97,
|
||||
TK_Arrow = 111,
|
||||
TK_ArrowStar = 96,
|
||||
TK_PlusPlus = 44,
|
||||
TK_MinusMinus = 45,
|
||||
TK_And = 12,
|
||||
TK_Star = 11,
|
||||
TK_Plus = 28,
|
||||
TK_Minus = 29,
|
||||
TK_Tilde = 8,
|
||||
TK_Bang = 43,
|
||||
TK_Slash = 96,
|
||||
TK_Percent = 97,
|
||||
TK_RightShift = 91,
|
||||
TK_LeftShift = 92,
|
||||
TK_LT = 63,
|
||||
TK_GT = 73,
|
||||
TK_LE = 98,
|
||||
TK_GE = 99,
|
||||
TK_EQ = 100,
|
||||
TK_NE = 101,
|
||||
TK_Caret = 102,
|
||||
TK_Or = 103,
|
||||
TK_AndAnd = 104,
|
||||
TK_OrOr = 105,
|
||||
TK_Question = 110,
|
||||
TK_Colon = 74,
|
||||
TK_Star = 10,
|
||||
TK_Plus = 40,
|
||||
TK_Minus = 41,
|
||||
TK_Tilde = 6,
|
||||
TK_Bang = 46,
|
||||
TK_Slash = 98,
|
||||
TK_Percent = 99,
|
||||
TK_RightShift = 93,
|
||||
TK_LeftShift = 94,
|
||||
TK_LT = 65,
|
||||
TK_GT = 76,
|
||||
TK_LE = 100,
|
||||
TK_GE = 101,
|
||||
TK_EQ = 102,
|
||||
TK_NE = 103,
|
||||
TK_Caret = 104,
|
||||
TK_Or = 105,
|
||||
TK_AndAnd = 106,
|
||||
TK_OrOr = 107,
|
||||
TK_Question = 112,
|
||||
TK_Colon = 77,
|
||||
TK_ColonColon = 4,
|
||||
TK_DotDotDot = 93,
|
||||
TK_Assign = 76,
|
||||
TK_StarAssign = 111,
|
||||
TK_SlashAssign = 112,
|
||||
TK_PercentAssign = 113,
|
||||
TK_PlusAssign = 114,
|
||||
TK_MinusAssign = 115,
|
||||
TK_RightShiftAssign = 116,
|
||||
TK_LeftShiftAssign = 117,
|
||||
TK_AndAssign = 118,
|
||||
TK_CaretAssign = 119,
|
||||
TK_OrAssign = 120,
|
||||
TK_Comma = 70,
|
||||
TK_RightBracket = 121,
|
||||
TK_RightParen = 69,
|
||||
TK_RightBrace = 77,
|
||||
TK_SemiColon = 30,
|
||||
TK_LeftBrace = 75,
|
||||
TK_typeof = 57,
|
||||
TK___alignof__ = 58,
|
||||
TK_MAX = 127,
|
||||
TK_MIN = 128,
|
||||
TK___attribute__ = 6,
|
||||
TK___declspec = 7,
|
||||
TK_ERROR_TOKEN = 67,
|
||||
TK_EOF_TOKEN = 124;
|
||||
TK_DotDotDot = 95,
|
||||
TK_Assign = 79,
|
||||
TK_StarAssign = 113,
|
||||
TK_SlashAssign = 114,
|
||||
TK_PercentAssign = 115,
|
||||
TK_PlusAssign = 116,
|
||||
TK_MinusAssign = 117,
|
||||
TK_RightShiftAssign = 118,
|
||||
TK_LeftShiftAssign = 119,
|
||||
TK_AndAssign = 120,
|
||||
TK_CaretAssign = 121,
|
||||
TK_OrAssign = 122,
|
||||
TK_Comma = 72,
|
||||
TK_RightBracket = 123,
|
||||
TK_RightParen = 71,
|
||||
TK_RightBrace = 80,
|
||||
TK_SemiColon = 43,
|
||||
TK_LeftBrace = 73,
|
||||
TK_typeof = 27,
|
||||
TK___alignof__ = 59,
|
||||
TK_MAX = 129,
|
||||
TK_MIN = 130,
|
||||
TK___attribute__ = 7,
|
||||
TK___declspec = 8,
|
||||
TK_ERROR_TOKEN = 70,
|
||||
TK_EOF_TOKEN = 126;
|
||||
|
||||
public final static String orderedTerminalSymbols[] = {
|
||||
"",
|
||||
|
@ -151,14 +153,16 @@ public interface GPPParsersym {
|
|||
"LeftParen",
|
||||
"ColonColon",
|
||||
"asm",
|
||||
"Tilde",
|
||||
"__attribute__",
|
||||
"__declspec",
|
||||
"Tilde",
|
||||
"operator",
|
||||
"EndOfCompletion",
|
||||
"Star",
|
||||
"EndOfCompletion",
|
||||
"And",
|
||||
"typename",
|
||||
"_Complex",
|
||||
"_Imaginary",
|
||||
"bool",
|
||||
"char",
|
||||
"double",
|
||||
|
@ -170,13 +174,10 @@ public interface GPPParsersym {
|
|||
"unsigned",
|
||||
"void",
|
||||
"wchar_t",
|
||||
"typeof",
|
||||
"const",
|
||||
"virtual",
|
||||
"volatile",
|
||||
"Plus",
|
||||
"Minus",
|
||||
"SemiColon",
|
||||
"stringlit",
|
||||
"virtual",
|
||||
"auto",
|
||||
"explicit",
|
||||
"extern",
|
||||
|
@ -186,10 +187,13 @@ public interface GPPParsersym {
|
|||
"register",
|
||||
"static",
|
||||
"typedef",
|
||||
"Plus",
|
||||
"Minus",
|
||||
"stringlit",
|
||||
"SemiColon",
|
||||
"PlusPlus",
|
||||
"MinusMinus",
|
||||
"Bang",
|
||||
"class",
|
||||
"const_cast",
|
||||
"dynamic_cast",
|
||||
"false",
|
||||
|
@ -202,8 +206,8 @@ public interface GPPParsersym {
|
|||
"integer",
|
||||
"floating",
|
||||
"charconst",
|
||||
"typeof",
|
||||
"__alignof__",
|
||||
"class",
|
||||
"template",
|
||||
"enum",
|
||||
"struct",
|
||||
|
@ -212,18 +216,18 @@ public interface GPPParsersym {
|
|||
"namespace",
|
||||
"throw",
|
||||
"using",
|
||||
"ERROR_TOKEN",
|
||||
"LeftBracket",
|
||||
"ERROR_TOKEN",
|
||||
"RightParen",
|
||||
"Comma",
|
||||
"LeftBrace",
|
||||
"delete",
|
||||
"new",
|
||||
"GT",
|
||||
"Colon",
|
||||
"LeftBrace",
|
||||
"try",
|
||||
"Assign",
|
||||
"RightBrace",
|
||||
"try",
|
||||
"while",
|
||||
"break",
|
||||
"case",
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -15,134 +15,136 @@ package org.eclipse.cdt.internal.core.dom.lrparser.gpp;
|
|||
|
||||
public interface GPPSizeofExpressionParsersym {
|
||||
public final static int
|
||||
TK__Complex = 14,
|
||||
TK__Imaginary = 15,
|
||||
TK_asm = 5,
|
||||
TK_auto = 34,
|
||||
TK_bool = 14,
|
||||
TK_break = 80,
|
||||
TK_case = 81,
|
||||
TK_catch = 122,
|
||||
TK_char = 15,
|
||||
TK_class = 58,
|
||||
TK_const = 27,
|
||||
TK_const_cast = 44,
|
||||
TK_continue = 82,
|
||||
TK_default = 83,
|
||||
TK_delete = 70,
|
||||
TK_do = 84,
|
||||
TK_double = 16,
|
||||
TK_dynamic_cast = 45,
|
||||
TK_else = 125,
|
||||
TK_enum = 61,
|
||||
TK_explicit = 35,
|
||||
TK_export = 90,
|
||||
TK_extern = 36,
|
||||
TK_false = 46,
|
||||
TK_float = 17,
|
||||
TK_for = 85,
|
||||
TK_friend = 37,
|
||||
TK_goto = 86,
|
||||
TK_if = 87,
|
||||
TK_inline = 38,
|
||||
TK_int = 18,
|
||||
TK_long = 19,
|
||||
TK_mutable = 39,
|
||||
TK_namespace = 65,
|
||||
TK_new = 71,
|
||||
TK_auto = 31,
|
||||
TK_bool = 16,
|
||||
TK_break = 82,
|
||||
TK_case = 83,
|
||||
TK_catch = 124,
|
||||
TK_char = 17,
|
||||
TK_class = 60,
|
||||
TK_const = 28,
|
||||
TK_const_cast = 47,
|
||||
TK_continue = 84,
|
||||
TK_default = 85,
|
||||
TK_delete = 72,
|
||||
TK_do = 86,
|
||||
TK_double = 18,
|
||||
TK_dynamic_cast = 48,
|
||||
TK_else = 127,
|
||||
TK_enum = 63,
|
||||
TK_explicit = 32,
|
||||
TK_export = 92,
|
||||
TK_extern = 33,
|
||||
TK_false = 49,
|
||||
TK_float = 19,
|
||||
TK_for = 87,
|
||||
TK_friend = 34,
|
||||
TK_goto = 88,
|
||||
TK_if = 89,
|
||||
TK_inline = 35,
|
||||
TK_int = 20,
|
||||
TK_long = 21,
|
||||
TK_mutable = 36,
|
||||
TK_namespace = 67,
|
||||
TK_new = 73,
|
||||
TK_operator = 9,
|
||||
TK_private = 106,
|
||||
TK_protected = 107,
|
||||
TK_public = 108,
|
||||
TK_register = 40,
|
||||
TK_reinterpret_cast = 47,
|
||||
TK_return = 88,
|
||||
TK_short = 20,
|
||||
TK_signed = 21,
|
||||
TK_sizeof = 48,
|
||||
TK_static = 41,
|
||||
TK_static_cast = 49,
|
||||
TK_struct = 62,
|
||||
TK_switch = 89,
|
||||
TK_template = 59,
|
||||
TK_this = 50,
|
||||
TK_throw = 64,
|
||||
TK_private = 108,
|
||||
TK_protected = 109,
|
||||
TK_public = 110,
|
||||
TK_register = 37,
|
||||
TK_reinterpret_cast = 50,
|
||||
TK_return = 90,
|
||||
TK_short = 22,
|
||||
TK_signed = 23,
|
||||
TK_sizeof = 51,
|
||||
TK_static = 38,
|
||||
TK_static_cast = 52,
|
||||
TK_struct = 64,
|
||||
TK_switch = 91,
|
||||
TK_template = 61,
|
||||
TK_this = 53,
|
||||
TK_throw = 66,
|
||||
TK_try = 78,
|
||||
TK_true = 51,
|
||||
TK_typedef = 42,
|
||||
TK_typeid = 52,
|
||||
TK_true = 54,
|
||||
TK_typedef = 39,
|
||||
TK_typeid = 55,
|
||||
TK_typename = 13,
|
||||
TK_union = 63,
|
||||
TK_unsigned = 22,
|
||||
TK_using = 67,
|
||||
TK_virtual = 28,
|
||||
TK_void = 23,
|
||||
TK_union = 65,
|
||||
TK_unsigned = 24,
|
||||
TK_using = 70,
|
||||
TK_virtual = 30,
|
||||
TK_void = 25,
|
||||
TK_volatile = 29,
|
||||
TK_wchar_t = 24,
|
||||
TK_while = 79,
|
||||
TK_integer = 53,
|
||||
TK_floating = 54,
|
||||
TK_charconst = 55,
|
||||
TK_stringlit = 30,
|
||||
TK_wchar_t = 26,
|
||||
TK_while = 81,
|
||||
TK_integer = 56,
|
||||
TK_floating = 57,
|
||||
TK_charconst = 58,
|
||||
TK_stringlit = 43,
|
||||
TK_identifier = 1,
|
||||
TK_Completion = 2,
|
||||
TK_EndOfCompletion = 10,
|
||||
TK_Invalid = 126,
|
||||
TK_Invalid = 128,
|
||||
TK_LeftBracket = 68,
|
||||
TK_LeftParen = 3,
|
||||
TK_Dot = 123,
|
||||
TK_DotStar = 95,
|
||||
TK_Arrow = 109,
|
||||
TK_ArrowStar = 94,
|
||||
TK_PlusPlus = 32,
|
||||
TK_MinusMinus = 33,
|
||||
TK_Dot = 125,
|
||||
TK_DotStar = 97,
|
||||
TK_Arrow = 111,
|
||||
TK_ArrowStar = 96,
|
||||
TK_PlusPlus = 44,
|
||||
TK_MinusMinus = 45,
|
||||
TK_And = 12,
|
||||
TK_Star = 11,
|
||||
TK_Plus = 25,
|
||||
TK_Minus = 26,
|
||||
TK_Plus = 40,
|
||||
TK_Minus = 41,
|
||||
TK_Tilde = 8,
|
||||
TK_Bang = 43,
|
||||
TK_Slash = 96,
|
||||
TK_Percent = 97,
|
||||
TK_RightShift = 91,
|
||||
TK_LeftShift = 92,
|
||||
TK_LT = 60,
|
||||
TK_GT = 73,
|
||||
TK_LE = 98,
|
||||
TK_GE = 99,
|
||||
TK_EQ = 100,
|
||||
TK_NE = 101,
|
||||
TK_Caret = 102,
|
||||
TK_Or = 103,
|
||||
TK_AndAnd = 104,
|
||||
TK_OrOr = 105,
|
||||
TK_Question = 110,
|
||||
TK_Colon = 74,
|
||||
TK_Bang = 46,
|
||||
TK_Slash = 98,
|
||||
TK_Percent = 99,
|
||||
TK_RightShift = 93,
|
||||
TK_LeftShift = 94,
|
||||
TK_LT = 62,
|
||||
TK_GT = 76,
|
||||
TK_LE = 100,
|
||||
TK_GE = 101,
|
||||
TK_EQ = 102,
|
||||
TK_NE = 103,
|
||||
TK_Caret = 104,
|
||||
TK_Or = 105,
|
||||
TK_AndAnd = 106,
|
||||
TK_OrOr = 107,
|
||||
TK_Question = 112,
|
||||
TK_Colon = 77,
|
||||
TK_ColonColon = 4,
|
||||
TK_DotDotDot = 93,
|
||||
TK_Assign = 76,
|
||||
TK_StarAssign = 111,
|
||||
TK_SlashAssign = 112,
|
||||
TK_PercentAssign = 113,
|
||||
TK_PlusAssign = 114,
|
||||
TK_MinusAssign = 115,
|
||||
TK_RightShiftAssign = 116,
|
||||
TK_LeftShiftAssign = 117,
|
||||
TK_AndAssign = 118,
|
||||
TK_CaretAssign = 119,
|
||||
TK_OrAssign = 120,
|
||||
TK_Comma = 72,
|
||||
TK_RightBracket = 121,
|
||||
TK_RightParen = 69,
|
||||
TK_RightBrace = 77,
|
||||
TK_SemiColon = 31,
|
||||
TK_DotDotDot = 95,
|
||||
TK_Assign = 79,
|
||||
TK_StarAssign = 113,
|
||||
TK_SlashAssign = 114,
|
||||
TK_PercentAssign = 115,
|
||||
TK_PlusAssign = 116,
|
||||
TK_MinusAssign = 117,
|
||||
TK_RightShiftAssign = 118,
|
||||
TK_LeftShiftAssign = 119,
|
||||
TK_AndAssign = 120,
|
||||
TK_CaretAssign = 121,
|
||||
TK_OrAssign = 122,
|
||||
TK_Comma = 74,
|
||||
TK_RightBracket = 123,
|
||||
TK_RightParen = 71,
|
||||
TK_RightBrace = 80,
|
||||
TK_SemiColon = 42,
|
||||
TK_LeftBrace = 75,
|
||||
TK_typeof = 56,
|
||||
TK___alignof__ = 57,
|
||||
TK_MAX = 127,
|
||||
TK_MIN = 128,
|
||||
TK_typeof = 27,
|
||||
TK___alignof__ = 59,
|
||||
TK_MAX = 129,
|
||||
TK_MIN = 130,
|
||||
TK___attribute__ = 6,
|
||||
TK___declspec = 7,
|
||||
TK_ERROR_TOKEN = 66,
|
||||
TK_EOF_TOKEN = 124;
|
||||
TK_ERROR_TOKEN = 69,
|
||||
TK_EOF_TOKEN = 126;
|
||||
|
||||
public final static String orderedTerminalSymbols[] = {
|
||||
"",
|
||||
|
@ -159,6 +161,8 @@ public interface GPPSizeofExpressionParsersym {
|
|||
"Star",
|
||||
"And",
|
||||
"typename",
|
||||
"_Complex",
|
||||
"_Imaginary",
|
||||
"bool",
|
||||
"char",
|
||||
"double",
|
||||
|
@ -170,15 +174,10 @@ public interface GPPSizeofExpressionParsersym {
|
|||
"unsigned",
|
||||
"void",
|
||||
"wchar_t",
|
||||
"Plus",
|
||||
"Minus",
|
||||
"typeof",
|
||||
"const",
|
||||
"virtual",
|
||||
"volatile",
|
||||
"stringlit",
|
||||
"SemiColon",
|
||||
"PlusPlus",
|
||||
"MinusMinus",
|
||||
"virtual",
|
||||
"auto",
|
||||
"explicit",
|
||||
"extern",
|
||||
|
@ -188,6 +187,12 @@ public interface GPPSizeofExpressionParsersym {
|
|||
"register",
|
||||
"static",
|
||||
"typedef",
|
||||
"Plus",
|
||||
"Minus",
|
||||
"SemiColon",
|
||||
"stringlit",
|
||||
"PlusPlus",
|
||||
"MinusMinus",
|
||||
"Bang",
|
||||
"const_cast",
|
||||
"dynamic_cast",
|
||||
|
@ -201,7 +206,6 @@ public interface GPPSizeofExpressionParsersym {
|
|||
"integer",
|
||||
"floating",
|
||||
"charconst",
|
||||
"typeof",
|
||||
"__alignof__",
|
||||
"class",
|
||||
"template",
|
||||
|
@ -211,19 +215,19 @@ public interface GPPSizeofExpressionParsersym {
|
|||
"union",
|
||||
"throw",
|
||||
"namespace",
|
||||
"LeftBracket",
|
||||
"ERROR_TOKEN",
|
||||
"using",
|
||||
"LeftBracket",
|
||||
"RightParen",
|
||||
"delete",
|
||||
"new",
|
||||
"Comma",
|
||||
"LeftBrace",
|
||||
"GT",
|
||||
"Colon",
|
||||
"LeftBrace",
|
||||
"try",
|
||||
"Assign",
|
||||
"RightBrace",
|
||||
"try",
|
||||
"while",
|
||||
"break",
|
||||
"case",
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
$Define
|
||||
$build_action_class /. UPCParserAction ./
|
||||
$node_factory_create_expression /. UPCASTNodeFactory.DEFAULT_INSTANCE ./
|
||||
$node_factory_create_expression /. new UPCASTNodeFactory() ./
|
||||
$parser_factory_create_expression /. UPCSecondaryParserFactory.getDefault() ./
|
||||
$End
|
||||
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 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
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.parser.upc;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IASTExpression;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTStatement;
|
||||
import org.eclipse.cdt.core.dom.ast.c.ICNodeFactory;
|
||||
import org.eclipse.cdt.core.dom.upc.ast.IUPCASTCompositeTypeSpecifier;
|
||||
import org.eclipse.cdt.core.dom.upc.ast.IUPCASTElaboratedTypeSpecifier;
|
||||
import org.eclipse.cdt.core.dom.upc.ast.IUPCASTEnumerationSpecifier;
|
||||
import org.eclipse.cdt.core.dom.upc.ast.IUPCASTForallStatement;
|
||||
import org.eclipse.cdt.core.dom.upc.ast.IUPCASTKeywordExpression;
|
||||
import org.eclipse.cdt.core.dom.upc.ast.IUPCASTSimpleDeclSpecifier;
|
||||
import org.eclipse.cdt.core.dom.upc.ast.IUPCASTSynchronizationStatement;
|
||||
import org.eclipse.cdt.core.dom.upc.ast.IUPCASTTypedefNameSpecifier;
|
||||
|
||||
public interface IUPCNodeFactory extends ICNodeFactory {
|
||||
|
||||
public void setUseUPCSizeofExpressions(int op);
|
||||
|
||||
public void setUseC99SizeofExpressions();
|
||||
|
||||
public IUPCASTKeywordExpression newKeywordExpression(int keywordKind);
|
||||
|
||||
public IUPCASTSynchronizationStatement newSyncronizationStatment(
|
||||
IASTExpression barrierExpression, int statmentKind);
|
||||
|
||||
public IUPCASTForallStatement newForallStatement(IASTStatement init,
|
||||
IASTExpression condition, IASTExpression iterationExpression,
|
||||
IASTStatement body, IASTExpression affinity);
|
||||
|
||||
public IUPCASTSimpleDeclSpecifier newSimpleDeclSpecifier();
|
||||
|
||||
public IUPCASTCompositeTypeSpecifier newCompositeTypeSpecifier(int key,
|
||||
IASTName name);
|
||||
|
||||
public IUPCASTElaboratedTypeSpecifier newElaboratedTypeSpecifier(int kind,
|
||||
IASTName name);
|
||||
|
||||
public IUPCASTEnumerationSpecifier newEnumerationSpecifier(IASTName name);
|
||||
|
||||
public IUPCASTTypedefNameSpecifier newTypedefNameSpecifier(IASTName name);
|
||||
|
||||
}
|
|
@ -16,11 +16,6 @@ import org.eclipse.cdt.core.dom.ast.IASTStatement;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTTypeId;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTTypeIdExpression;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression;
|
||||
import org.eclipse.cdt.core.dom.ast.c.ICASTCompositeTypeSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.c.ICASTElaboratedTypeSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.c.ICASTEnumerationSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.c.ICASTSimpleDeclSpecifier;
|
||||
import org.eclipse.cdt.core.dom.ast.c.ICASTTypedefNameSpecifier;
|
||||
import org.eclipse.cdt.core.dom.upc.ast.IUPCASTCompositeTypeSpecifier;
|
||||
import org.eclipse.cdt.core.dom.upc.ast.IUPCASTElaboratedTypeSpecifier;
|
||||
import org.eclipse.cdt.core.dom.upc.ast.IUPCASTEnumerationSpecifier;
|
||||
|
@ -51,9 +46,8 @@ import org.eclipse.cdt.internal.core.dom.parser.upc.ast.UPCASTUnarySizeofExpress
|
|||
* for 'strict', 'relaxed' and 'shared'.
|
||||
*/
|
||||
@SuppressWarnings("restriction")
|
||||
public class UPCASTNodeFactory extends CNodeFactory {
|
||||
public class UPCASTNodeFactory extends CNodeFactory implements IUPCNodeFactory {
|
||||
|
||||
public static final UPCASTNodeFactory DEFAULT_INSTANCE = new UPCASTNodeFactory();
|
||||
|
||||
private boolean useUPCSizeofExpressions = false;
|
||||
private int currentUPCSizofExpressionOperator = 0;
|
||||
|
@ -80,6 +74,7 @@ public class UPCASTNodeFactory extends CNodeFactory {
|
|||
return super.newTypeIdExpression(operator, typeId);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IASTUnaryExpression newUnaryExpression(int operator, IASTExpression operand) {
|
||||
if(useUPCSizeofExpressions) {
|
||||
|
@ -90,42 +85,47 @@ public class UPCASTNodeFactory extends CNodeFactory {
|
|||
return super.newUnaryExpression(operator, operand);
|
||||
}
|
||||
|
||||
|
||||
public IUPCASTKeywordExpression newKeywordExpression(int keywordKind) {
|
||||
return new UPCASTKeywordExpression(keywordKind);
|
||||
}
|
||||
|
||||
|
||||
public IUPCASTSynchronizationStatement newSyncronizationStatment(IASTExpression barrierExpression, int statmentKind) {
|
||||
return new UPCASTSynchronizationStatement(barrierExpression, statmentKind);
|
||||
}
|
||||
|
||||
|
||||
public IUPCASTForallStatement newForallStatement(IASTStatement init, IASTExpression condition,
|
||||
IASTExpression iterationExpression, IASTStatement body, IASTExpression affinity) {
|
||||
return new UPCASTForallStatement(init, condition, iterationExpression, body, affinity);
|
||||
}
|
||||
|
||||
/**
|
||||
* Override to return UPC version of decl specifier.
|
||||
*/
|
||||
|
||||
@Override
|
||||
public IUPCASTSimpleDeclSpecifier newSimpleDeclSpecifier() {
|
||||
return new UPCASTSimpleDeclSpecifier();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IUPCASTCompositeTypeSpecifier newCompositeTypeSpecifier(int key, IASTName name) {
|
||||
return new UPCASTCompositeTypeSpecifier(key, name);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IUPCASTElaboratedTypeSpecifier newElaboratedTypeSpecifier(int kind, IASTName name) {
|
||||
return new UPCASTElaboratedTypeSpecifier(kind, name);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IUPCASTEnumerationSpecifier newEnumerationSpecifier(IASTName name) {
|
||||
return new UPCASTEnumerationSpecifier(name);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IUPCASTTypedefNameSpecifier newTypedefNameSpecifier(IASTName name) {
|
||||
return new UPCASTTypedefNameSpecifier(name);
|
||||
|
|
|
@ -37,7 +37,7 @@ import org.eclipse.cdt.core.dom.upc.ast.IUPCASTSynchronizationStatement;
|
|||
*/
|
||||
public class UPCParserAction extends C99BuildASTParserAction {
|
||||
|
||||
private UPCASTNodeFactory nodeFactory;
|
||||
private IUPCNodeFactory nodeFactory;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -46,7 +46,7 @@ public class UPCParserAction extends C99BuildASTParserAction {
|
|||
* @param parser
|
||||
* @param tu
|
||||
*/
|
||||
public UPCParserAction(IParserActionTokenProvider parser, IASTTranslationUnit tu, ScopedStack<Object> astStack, UPCASTNodeFactory nodeFactory, ISecondaryParserFactory parserFactory) {
|
||||
public UPCParserAction(IParserActionTokenProvider parser, IASTTranslationUnit tu, ScopedStack<Object> astStack, IUPCNodeFactory nodeFactory, ISecondaryParserFactory parserFactory) {
|
||||
super(parser, tu, astStack, nodeFactory, parserFactory);
|
||||
this.nodeFactory = nodeFactory;
|
||||
nodeFactory.setUseC99SizeofExpressions();
|
||||
|
@ -178,7 +178,7 @@ public class UPCParserAction extends C99BuildASTParserAction {
|
|||
* Overrides setSpecifier to add support for temporary layout qualifier nodes.
|
||||
*/
|
||||
@Override
|
||||
protected void setSpecifier(ICASTDeclSpecifier declSpec, Object specifier) {
|
||||
public void setSpecifier(ICASTDeclSpecifier declSpec, Object specifier) {
|
||||
if(specifier instanceof IToken)
|
||||
setTokenSpecifier((IUPCASTDeclSpecifier)declSpec, (IToken)specifier);
|
||||
else
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -19,7 +19,7 @@ public interface UPCExpressionParsersym {
|
|||
TK_break = 90,
|
||||
TK_case = 91,
|
||||
TK_char = 40,
|
||||
TK_const = 11,
|
||||
TK_const = 25,
|
||||
TK_continue = 92,
|
||||
TK_default = 93,
|
||||
TK_do = 94,
|
||||
|
@ -35,11 +35,11 @@ public interface UPCExpressionParsersym {
|
|||
TK_int = 43,
|
||||
TK_long = 44,
|
||||
TK_register = 36,
|
||||
TK_restrict = 12,
|
||||
TK_restrict = 26,
|
||||
TK_return = 99,
|
||||
TK_short = 45,
|
||||
TK_signed = 46,
|
||||
TK_sizeof = 13,
|
||||
TK_sizeof = 11,
|
||||
TK_static = 32,
|
||||
TK_struct = 54,
|
||||
TK_switch = 100,
|
||||
|
@ -47,32 +47,32 @@ public interface UPCExpressionParsersym {
|
|||
TK_union = 55,
|
||||
TK_unsigned = 47,
|
||||
TK_void = 48,
|
||||
TK_volatile = 14,
|
||||
TK_volatile = 27,
|
||||
TK_while = 101,
|
||||
TK__Bool = 49,
|
||||
TK__Complex = 50,
|
||||
TK__Imaginary = 51,
|
||||
TK_integer = 15,
|
||||
TK_floating = 16,
|
||||
TK_charconst = 17,
|
||||
TK_stringlit = 18,
|
||||
TK_integer = 12,
|
||||
TK_floating = 13,
|
||||
TK_charconst = 14,
|
||||
TK_stringlit = 15,
|
||||
TK_identifier = 1,
|
||||
TK_Completion = 3,
|
||||
TK_EndOfCompletion = 5,
|
||||
TK_EndOfCompletion = 7,
|
||||
TK_Invalid = 102,
|
||||
TK_LeftBracket = 31,
|
||||
TK_LeftParen = 2,
|
||||
TK_LeftBrace = 19,
|
||||
TK_LeftBrace = 16,
|
||||
TK_Dot = 61,
|
||||
TK_Arrow = 76,
|
||||
TK_PlusPlus = 9,
|
||||
TK_MinusMinus = 10,
|
||||
TK_And = 8,
|
||||
TK_Star = 4,
|
||||
TK_Plus = 6,
|
||||
TK_Minus = 7,
|
||||
TK_Tilde = 20,
|
||||
TK_Bang = 21,
|
||||
TK_Plus = 5,
|
||||
TK_Minus = 6,
|
||||
TK_Tilde = 17,
|
||||
TK_Bang = 18,
|
||||
TK_Slash = 62,
|
||||
TK_Percent = 63,
|
||||
TK_RightShift = 56,
|
||||
|
@ -101,21 +101,21 @@ public interface UPCExpressionParsersym {
|
|||
TK_AndAssign = 86,
|
||||
TK_CaretAssign = 87,
|
||||
TK_OrAssign = 88,
|
||||
TK_Comma = 39,
|
||||
TK_Comma = 38,
|
||||
TK_RightBracket = 58,
|
||||
TK_RightParen = 38,
|
||||
TK_RightParen = 39,
|
||||
TK_RightBrace = 52,
|
||||
TK_SemiColon = 75,
|
||||
TK_MYTHREAD = 22,
|
||||
TK_THREADS = 23,
|
||||
TK_UPC_MAX_BLOCKSIZE = 24,
|
||||
TK_relaxed = 25,
|
||||
TK_shared = 26,
|
||||
TK_strict = 27,
|
||||
TK_MYTHREAD = 19,
|
||||
TK_THREADS = 20,
|
||||
TK_UPC_MAX_BLOCKSIZE = 21,
|
||||
TK_relaxed = 28,
|
||||
TK_shared = 29,
|
||||
TK_strict = 30,
|
||||
TK_upc_barrier = 103,
|
||||
TK_upc_localsizeof = 28,
|
||||
TK_upc_blocksizeof = 29,
|
||||
TK_upc_elemsizeof = 30,
|
||||
TK_upc_localsizeof = 22,
|
||||
TK_upc_blocksizeof = 23,
|
||||
TK_upc_elemsizeof = 24,
|
||||
TK_upc_notify = 104,
|
||||
TK_upc_fence = 105,
|
||||
TK_upc_wait = 106,
|
||||
|
@ -129,16 +129,13 @@ public interface UPCExpressionParsersym {
|
|||
"LeftParen",
|
||||
"Completion",
|
||||
"Star",
|
||||
"EndOfCompletion",
|
||||
"Plus",
|
||||
"Minus",
|
||||
"EndOfCompletion",
|
||||
"And",
|
||||
"PlusPlus",
|
||||
"MinusMinus",
|
||||
"const",
|
||||
"restrict",
|
||||
"sizeof",
|
||||
"volatile",
|
||||
"integer",
|
||||
"floating",
|
||||
"charconst",
|
||||
|
@ -149,12 +146,15 @@ public interface UPCExpressionParsersym {
|
|||
"MYTHREAD",
|
||||
"THREADS",
|
||||
"UPC_MAX_BLOCKSIZE",
|
||||
"relaxed",
|
||||
"shared",
|
||||
"strict",
|
||||
"upc_localsizeof",
|
||||
"upc_blocksizeof",
|
||||
"upc_elemsizeof",
|
||||
"const",
|
||||
"restrict",
|
||||
"volatile",
|
||||
"relaxed",
|
||||
"shared",
|
||||
"strict",
|
||||
"LeftBracket",
|
||||
"static",
|
||||
"auto",
|
||||
|
@ -162,8 +162,8 @@ public interface UPCExpressionParsersym {
|
|||
"inline",
|
||||
"register",
|
||||
"typedef",
|
||||
"RightParen",
|
||||
"Comma",
|
||||
"RightParen",
|
||||
"char",
|
||||
"double",
|
||||
"float",
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -19,7 +19,7 @@ public interface UPCNoCastExpressionParsersym {
|
|||
TK_break = 90,
|
||||
TK_case = 91,
|
||||
TK_char = 40,
|
||||
TK_const = 8,
|
||||
TK_const = 9,
|
||||
TK_continue = 92,
|
||||
TK_default = 93,
|
||||
TK_do = 94,
|
||||
|
@ -35,7 +35,7 @@ public interface UPCNoCastExpressionParsersym {
|
|||
TK_int = 43,
|
||||
TK_long = 44,
|
||||
TK_register = 36,
|
||||
TK_restrict = 9,
|
||||
TK_restrict = 10,
|
||||
TK_return = 99,
|
||||
TK_short = 45,
|
||||
TK_signed = 46,
|
||||
|
@ -47,7 +47,7 @@ public interface UPCNoCastExpressionParsersym {
|
|||
TK_union = 55,
|
||||
TK_unsigned = 47,
|
||||
TK_void = 48,
|
||||
TK_volatile = 10,
|
||||
TK_volatile = 11,
|
||||
TK_while = 101,
|
||||
TK__Bool = 49,
|
||||
TK__Complex = 50,
|
||||
|
@ -60,19 +60,19 @@ public interface UPCNoCastExpressionParsersym {
|
|||
TK_Completion = 3,
|
||||
TK_EndOfCompletion = 5,
|
||||
TK_Invalid = 102,
|
||||
TK_LeftBracket = 23,
|
||||
TK_LeftBracket = 31,
|
||||
TK_LeftParen = 2,
|
||||
TK_LeftBrace = 15,
|
||||
TK_LeftBrace = 12,
|
||||
TK_Dot = 61,
|
||||
TK_Arrow = 76,
|
||||
TK_PlusPlus = 16,
|
||||
TK_MinusMinus = 17,
|
||||
TK_And = 11,
|
||||
TK_PlusPlus = 13,
|
||||
TK_MinusMinus = 14,
|
||||
TK_And = 8,
|
||||
TK_Star = 4,
|
||||
TK_Plus = 6,
|
||||
TK_Minus = 7,
|
||||
TK_Tilde = 24,
|
||||
TK_Bang = 25,
|
||||
TK_Tilde = 23,
|
||||
TK_Bang = 24,
|
||||
TK_Slash = 62,
|
||||
TK_Percent = 63,
|
||||
TK_RightShift = 56,
|
||||
|
@ -101,21 +101,21 @@ public interface UPCNoCastExpressionParsersym {
|
|||
TK_AndAssign = 86,
|
||||
TK_CaretAssign = 87,
|
||||
TK_OrAssign = 88,
|
||||
TK_Comma = 39,
|
||||
TK_Comma = 38,
|
||||
TK_RightBracket = 58,
|
||||
TK_RightParen = 38,
|
||||
TK_RightParen = 39,
|
||||
TK_RightBrace = 52,
|
||||
TK_SemiColon = 75,
|
||||
TK_MYTHREAD = 26,
|
||||
TK_THREADS = 27,
|
||||
TK_UPC_MAX_BLOCKSIZE = 28,
|
||||
TK_relaxed = 12,
|
||||
TK_shared = 13,
|
||||
TK_strict = 14,
|
||||
TK_MYTHREAD = 25,
|
||||
TK_THREADS = 26,
|
||||
TK_UPC_MAX_BLOCKSIZE = 27,
|
||||
TK_relaxed = 15,
|
||||
TK_shared = 16,
|
||||
TK_strict = 17,
|
||||
TK_upc_barrier = 103,
|
||||
TK_upc_localsizeof = 29,
|
||||
TK_upc_blocksizeof = 30,
|
||||
TK_upc_elemsizeof = 31,
|
||||
TK_upc_localsizeof = 28,
|
||||
TK_upc_blocksizeof = 29,
|
||||
TK_upc_elemsizeof = 30,
|
||||
TK_upc_notify = 104,
|
||||
TK_upc_fence = 105,
|
||||
TK_upc_wait = 106,
|
||||
|
@ -132,22 +132,21 @@ public interface UPCNoCastExpressionParsersym {
|
|||
"EndOfCompletion",
|
||||
"Plus",
|
||||
"Minus",
|
||||
"And",
|
||||
"const",
|
||||
"restrict",
|
||||
"volatile",
|
||||
"And",
|
||||
"relaxed",
|
||||
"shared",
|
||||
"strict",
|
||||
"LeftBrace",
|
||||
"PlusPlus",
|
||||
"MinusMinus",
|
||||
"relaxed",
|
||||
"shared",
|
||||
"strict",
|
||||
"sizeof",
|
||||
"integer",
|
||||
"floating",
|
||||
"charconst",
|
||||
"stringlit",
|
||||
"LeftBracket",
|
||||
"Tilde",
|
||||
"Bang",
|
||||
"MYTHREAD",
|
||||
|
@ -156,14 +155,15 @@ public interface UPCNoCastExpressionParsersym {
|
|||
"upc_localsizeof",
|
||||
"upc_blocksizeof",
|
||||
"upc_elemsizeof",
|
||||
"LeftBracket",
|
||||
"static",
|
||||
"auto",
|
||||
"extern",
|
||||
"inline",
|
||||
"register",
|
||||
"typedef",
|
||||
"RightParen",
|
||||
"Comma",
|
||||
"RightParen",
|
||||
"char",
|
||||
"double",
|
||||
"float",
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -103,8 +103,8 @@ public interface UPCParsersym {
|
|||
TK_OrAssign = 106,
|
||||
TK_Comma = 71,
|
||||
TK_RightBracket = 78,
|
||||
TK_RightParen = 72,
|
||||
TK_RightBrace = 73,
|
||||
TK_RightParen = 73,
|
||||
TK_RightBrace = 72,
|
||||
TK_SemiColon = 25,
|
||||
TK_MYTHREAD = 19,
|
||||
TK_THREADS = 20,
|
||||
|
@ -196,8 +196,8 @@ public interface UPCParsersym {
|
|||
"struct",
|
||||
"union",
|
||||
"Comma",
|
||||
"RightParen",
|
||||
"RightBrace",
|
||||
"RightParen",
|
||||
"Colon",
|
||||
"Assign",
|
||||
"RightShift",
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -40,7 +40,7 @@ public interface UPCSizeofExpressionParsersym {
|
|||
TK_short = 45,
|
||||
TK_signed = 46,
|
||||
TK_sizeof = 18,
|
||||
TK_static = 19,
|
||||
TK_static = 32,
|
||||
TK_struct = 54,
|
||||
TK_switch = 100,
|
||||
TK_typedef = 37,
|
||||
|
@ -52,27 +52,27 @@ public interface UPCSizeofExpressionParsersym {
|
|||
TK__Bool = 49,
|
||||
TK__Complex = 50,
|
||||
TK__Imaginary = 51,
|
||||
TK_integer = 20,
|
||||
TK_floating = 21,
|
||||
TK_charconst = 22,
|
||||
TK_stringlit = 23,
|
||||
TK_integer = 19,
|
||||
TK_floating = 20,
|
||||
TK_charconst = 21,
|
||||
TK_stringlit = 22,
|
||||
TK_identifier = 1,
|
||||
TK_Completion = 3,
|
||||
TK_EndOfCompletion = 5,
|
||||
TK_Invalid = 102,
|
||||
TK_LeftBracket = 14,
|
||||
TK_LeftBracket = 15,
|
||||
TK_LeftParen = 2,
|
||||
TK_LeftBrace = 24,
|
||||
TK_LeftBrace = 23,
|
||||
TK_Dot = 61,
|
||||
TK_Arrow = 76,
|
||||
TK_PlusPlus = 16,
|
||||
TK_MinusMinus = 17,
|
||||
TK_And = 15,
|
||||
TK_And = 14,
|
||||
TK_Star = 4,
|
||||
TK_Plus = 12,
|
||||
TK_Minus = 13,
|
||||
TK_Tilde = 25,
|
||||
TK_Bang = 26,
|
||||
TK_Plus = 9,
|
||||
TK_Minus = 10,
|
||||
TK_Tilde = 24,
|
||||
TK_Bang = 25,
|
||||
TK_Slash = 62,
|
||||
TK_Percent = 63,
|
||||
TK_RightShift = 56,
|
||||
|
@ -101,21 +101,21 @@ public interface UPCSizeofExpressionParsersym {
|
|||
TK_AndAssign = 86,
|
||||
TK_CaretAssign = 87,
|
||||
TK_OrAssign = 88,
|
||||
TK_Comma = 39,
|
||||
TK_Comma = 38,
|
||||
TK_RightBracket = 58,
|
||||
TK_RightParen = 38,
|
||||
TK_RightParen = 39,
|
||||
TK_RightBrace = 52,
|
||||
TK_SemiColon = 75,
|
||||
TK_MYTHREAD = 27,
|
||||
TK_THREADS = 28,
|
||||
TK_UPC_MAX_BLOCKSIZE = 29,
|
||||
TK_relaxed = 9,
|
||||
TK_shared = 10,
|
||||
TK_strict = 11,
|
||||
TK_MYTHREAD = 26,
|
||||
TK_THREADS = 27,
|
||||
TK_UPC_MAX_BLOCKSIZE = 28,
|
||||
TK_relaxed = 11,
|
||||
TK_shared = 12,
|
||||
TK_strict = 13,
|
||||
TK_upc_barrier = 103,
|
||||
TK_upc_localsizeof = 30,
|
||||
TK_upc_blocksizeof = 31,
|
||||
TK_upc_elemsizeof = 32,
|
||||
TK_upc_localsizeof = 29,
|
||||
TK_upc_blocksizeof = 30,
|
||||
TK_upc_elemsizeof = 31,
|
||||
TK_upc_notify = 104,
|
||||
TK_upc_fence = 105,
|
||||
TK_upc_wait = 106,
|
||||
|
@ -133,17 +133,16 @@ public interface UPCSizeofExpressionParsersym {
|
|||
"const",
|
||||
"restrict",
|
||||
"volatile",
|
||||
"Plus",
|
||||
"Minus",
|
||||
"relaxed",
|
||||
"shared",
|
||||
"strict",
|
||||
"Plus",
|
||||
"Minus",
|
||||
"LeftBracket",
|
||||
"And",
|
||||
"LeftBracket",
|
||||
"PlusPlus",
|
||||
"MinusMinus",
|
||||
"sizeof",
|
||||
"static",
|
||||
"integer",
|
||||
"floating",
|
||||
"charconst",
|
||||
|
@ -157,13 +156,14 @@ public interface UPCSizeofExpressionParsersym {
|
|||
"upc_localsizeof",
|
||||
"upc_blocksizeof",
|
||||
"upc_elemsizeof",
|
||||
"static",
|
||||
"auto",
|
||||
"extern",
|
||||
"inline",
|
||||
"register",
|
||||
"typedef",
|
||||
"RightParen",
|
||||
"Comma",
|
||||
"RightParen",
|
||||
"char",
|
||||
"double",
|
||||
"float",
|
||||
|
|
Loading…
Add table
Reference in a new issue