/*******************************************************************************
* Copyright (c) 2006, 2008 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
*********************************************************************************/

// This file was generated by LPG

package org.eclipse.cdt.internal.core.dom.lrparser.cpp;

import lpg.lpgjavaruntime.*;

import java.util.*;

import org.eclipse.cdt.core.dom.ast.*;
import org.eclipse.cdt.core.dom.ast.cpp.*;
import org.eclipse.cdt.core.dom.lrparser.action.cpp.CPPASTNodeFactory;
import org.eclipse.cdt.core.dom.lrparser.action.cpp.CPPBuildASTParserAction;
import org.eclipse.cdt.core.dom.lrparser.IParser;
import org.eclipse.cdt.core.dom.lrparser.IParserActionTokenProvider;
import org.eclipse.cdt.core.dom.lrparser.util.DebugUtil;

import org.eclipse.cdt.core.dom.lrparser.action.ITokenMap;
import org.eclipse.cdt.core.dom.lrparser.action.TokenMap;

public class CPPParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser 
{
    private static ParseTable prs = new CPPParserprs();
    private BacktrackingParser btParser;

    public BacktrackingParser getParser() { return btParser; }
    private void setResult(Object object) { btParser.setSym1(object); }
    public Object getRhsSym(int i) { return btParser.getSym(i); }

    public int getRhsTokenIndex(int i) { return btParser.getToken(i); }
    public IToken getRhsIToken(int i) { return super.getIToken(getRhsTokenIndex(i)); }
    
    public int getRhsFirstTokenIndex(int i) { return btParser.getFirstToken(i); }
    public IToken getRhsFirstIToken(int i) { return super.getIToken(getRhsFirstTokenIndex(i)); }

    public int getRhsLastTokenIndex(int i) { return btParser.getLastToken(i); }
    public IToken getRhsLastIToken(int i) { return super.getIToken(getRhsLastTokenIndex(i)); }

    public int getLeftSpan() { return btParser.getFirstToken(); }
    public IToken getLeftIToken()  { return super.getIToken(getLeftSpan()); }

    public int getRightSpan() { return btParser.getLastToken(); }
    public IToken getRightIToken() { return super.getIToken(getRightSpan()); }

    public int getRhsErrorTokenIndex(int i)
    {
        int index = btParser.getToken(i);
        IToken err = super.getIToken(index);
        return (err instanceof ErrorToken ? index : 0);
    }
    public ErrorToken getRhsErrorIToken(int i)
    {
        int index = btParser.getToken(i);
        IToken err = super.getIToken(index);
        return (ErrorToken) (err instanceof ErrorToken ? err : null);
    }

    public CPPParser(LexStream lexStream)
    {
        super(lexStream);

        try
        {
            super.remapTerminalSymbols(orderedTerminalSymbols(), CPPParserprs.EOFT_SYMBOL);
        }
        catch(NullExportedSymbolsException e) {
        }
        catch(NullTerminalSymbolsException e) {
        }
        catch(UnimplementedTerminalsException e)
        {
            java.util.ArrayList unimplemented_symbols = e.getSymbols();
            System.out.println("The Lexer will not scan the following token(s):");
            for (int i = 0; i < unimplemented_symbols.size(); i++)
            {
                Integer id = (Integer) unimplemented_symbols.get(i);
                System.out.println("    " + CPPParsersym.orderedTerminalSymbols[id.intValue()]);               
            }
            System.out.println();                        
        }
        catch(UndefinedEofSymbolException e)
        {
            throw new Error(new UndefinedEofSymbolException
                                ("The Lexer does not implement the Eof symbol " +
                                 CPPParsersym.orderedTerminalSymbols[CPPParserprs.EOFT_SYMBOL]));
        } 
    }

    public String[] orderedTerminalSymbols() { return CPPParsersym.orderedTerminalSymbols; }
    public String getTokenKindName(int kind) { return CPPParsersym.orderedTerminalSymbols[kind]; }
    public int getEOFTokenKind() { return CPPParserprs.EOFT_SYMBOL; }
    public PrsStream getParseStream() { return (PrsStream) this; }
    
    //
    // Report error message for given error_token.
    //
    public final void reportErrorTokenMessage(int error_token, String msg)
    {
        int firsttok = super.getFirstErrorToken(error_token),
            lasttok = super.getLastErrorToken(error_token);
        String location = super.getFileName() + ':' +
                          (firsttok > lasttok
                                    ? (super.getEndLine(lasttok) + ":" + super.getEndColumn(lasttok))
                                    : (super.getLine(error_token) + ":" +
                                       super.getColumn(error_token) + ":" +
                                       super.getEndLine(error_token) + ":" +
                                       super.getEndColumn(error_token)))
                          + ": ";
        super.reportError((firsttok > lasttok ? ParseErrorCodes.INSERTION_CODE : ParseErrorCodes.SUBSTITUTION_CODE), location, msg);
    }

    public Object parser()
    {
        return parser(null, 0);
    }
    
    public Object parser(Monitor monitor)
    {
        return parser(monitor, 0);
    }
    
    public Object parser(int error_repair_count)
    {
        return parser(null, error_repair_count);
    }

    public Object parser(Monitor monitor, int error_repair_count)
    {
        try
        {
            btParser = new BacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
        }
        catch (NotBacktrackParseTableException e)
        {
            throw new Error(new NotBacktrackParseTableException
                                ("Regenerate CPPParserprs.java with -BACKTRACK option"));
        }
        catch (BadParseSymFileException e)
        {
            throw new Error(new BadParseSymFileException("Bad Parser Symbol File -- CPPParsersym.java"));
        }

        try
        {
            return (Object) btParser.parse(error_repair_count);
        }
        catch (BadParseException e)
        {
            reset(e.error_token); // point to error token
            DiagnoseParser diagnoseParser = new DiagnoseParser(this, prs);
            diagnoseParser.diagnose(e.error_token);
        }

        return null;
    }


private  CPPParserAction  action;	

// uncomment to use with backtracking parser
public CPPParser() {  // constructor
}

private void initActions(IASTTranslationUnit tu) {
    // binding resolution actions need access to IASTName nodes, temporary
    action = new  CPPParserAction ();
	//action.resolver = new  C99TypedefTrackerParserAction (this);
	action.builder  = new  CPPBuildASTParserAction ( CPPASTNodeFactory.DEFAULT_INSTANCE , this, tu);
	//action.builder.setTokenMap(CPPParsersym.orderedTerminalSymbols);
	
	// comment this line to use with backtracking parser
	//setParserAction(action);
}


public void addToken(IToken token) {
	token.setKind(mapKind(token.getKind()));
	//System.out.println("Token: " + token);
	super.addToken(token);
}


public IASTCompletionNode parse(IASTTranslationUnit tu) {
	// this has to be done, or... kaboom!
	setStreamLength(getSize());
	initActions(tu);
	
	final int errorRepairCount = -1;  // _1 means full error handling
	parser(null, errorRepairCount); // do the actual parse
	super.resetTokenStream(); // allow tokens to be garbage collected

	// the completion node may be null
	IASTCompletionNode compNode = action.builder.getASTCompletionNode();

	//action = null; // causes getSecondaryParseResult() to fail
	
	// Comment this line to use with backtracking parser
	//parserAction = null;
	
	return compNode;
}


public int getKind(int i) {
	int kind = super.getKind(i);
	
	// There used to be a special token kind for zero used to parser pure virtual function declarations.
	// But it turned out to be easier to just parse them as an init_declarator and programaticaly check
	// for pure virtual, see consumeMemberDeclaratorWithInitializer().
	
	//if(kind == CPPParsersym.TK_integer && "0".equals(getTokenText(i))) { //$NON-NLS-1$
	//	kind = CPPParsersym.TK_zero;
	//}
	
	// lexer feedback hack!
	//else if(kind == C99Parsersym.TK_identifier && action.resolver.isTypedef(getTokenText(i))) {
	//	kind = C99Parsersym.TK_TypedefName;
	//}
	
	return kind;
}


// uncomment this method to use with backtracking parser
public List getRuleTokens() {
    return Collections.unmodifiableList(getTokens().subList(getLeftSpan(), getRightSpan() + 1));
}


public IASTNode getSecondaryParseResult() {
	return  action.builder.getSecondaryParseResult();
}


private ITokenMap tokenMap = null;

public void setTokens(List<IToken> tokens) {
	resetTokenStream();
	addToken(new Token(null, 0, 0, 0)); // dummy token
	for(IToken token : tokens) {
		token.setKind(tokenMap.mapKind(token.getKind()));
		addToken(token);
	}
	addToken(new Token(null, 0, 0, CPPParsersym.TK_EOF_TOKEN));
}

public CPPParser(String[] mapFrom) {  // constructor
	tokenMap = new TokenMap(CPPParsersym.orderedTerminalSymbols, mapFrom);
}	



    public void ruleAction(int ruleNumber)
    {
        switch (ruleNumber)
        {
  
            //
            // Rule 1:  <openscope-ast> ::= $Empty
            //
            case 1: {       action.builder.
  openASTScope();                break;
            }
  
            //
            // Rule 2:  <empty> ::= $Empty
            //
            case 2: {       action.builder.
  consumeEmpty();                break;
            }
   
            //
            // Rule 11:  translation_unit ::= external_declaration_list
            //
            case 11: {       action.builder.
   consumeTranslationUnit();                break;
            }  
   
            //
            // Rule 12:  translation_unit ::= $Empty
            //
            case 12: {       action.builder.
   consumeTranslationUnit();                break;
            }  
   
            //
            // Rule 16:  external_declaration ::= ERROR_TOKEN
            //
            case 16: {       action.builder.
   consumeDeclarationProblem();                 break;
            }  
   
            //
            // Rule 19:  literal ::= integer
            //
            case 19: {       action.builder.
   consumeExpressionLiteral(ICPPASTLiteralExpression.lk_integer_constant);                break;
            }  
   
            //
            // Rule 20:  literal ::= 0
            //
            case 20: {       action.builder.
   consumeExpressionLiteral(ICPPASTLiteralExpression.lk_integer_constant);                break;
            }  
   
            //
            // Rule 21:  literal ::= floating
            //
            case 21: {       action.builder.
   consumeExpressionLiteral(ICPPASTLiteralExpression.lk_float_constant);                break;
            }  
   
            //
            // Rule 22:  literal ::= charconst
            //
            case 22: {       action.builder.
   consumeExpressionLiteral(ICPPASTLiteralExpression.lk_char_constant);                break;
            }  
   
            //
            // Rule 23:  literal ::= stringlit
            //
            case 23: {       action.builder.
   consumeExpressionLiteral(ICPPASTLiteralExpression.lk_string_literal);                break;
            }  
   
            //
            // Rule 24:  literal ::= true
            //
            case 24: {       action.builder.
   consumeExpressionLiteral(ICPPASTLiteralExpression.lk_true);                break;
            }  
   
            //
            // Rule 25:  literal ::= false
            //
            case 25: {       action.builder.
   consumeExpressionLiteral(ICPPASTLiteralExpression.lk_false);                break;
            }  
   
            //
            // Rule 26:  literal ::= this
            //
            case 26: {       action.builder.
   consumeExpressionLiteral(ICPPASTLiteralExpression.lk_this);                break;
            }  
   
            //
            // Rule 28:  primary_expression ::= ( expression )
            //
            case 28: {       action.builder.
   consumeExpressionBracketed();                 break;
            }  
   
            //
            // Rule 30:  id_expression ::= qualified_or_unqualified_name
            //
            case 30: {       action.builder.
   consumeExpressionName();                 break;
            }  
   
            //
            // Rule 37:  unqualified_id_name ::= ~ class_name
            //
            case 37: {       action.builder.
   consumeDestructorName();                 break;
            }  
   
            //
            // Rule 38:  identifier_name ::= identifier_token
            //
            case 38: {       action.builder.
   consumeIdentifierName();                 break;
            }  
   
            //
            // Rule 39:  template_opt ::= template
            //
            case 39: {       action.builder.
   consumePlaceHolder();                 break;
            }  
   
            //
            // Rule 40:  template_opt ::= $Empty
            //
            case 40: {       action.builder.
   consumeEmpty();                 break;
            }  
   
            //
            // Rule 41:  dcolon_opt ::= ::
            //
            case 41: {       action.builder.
   consumePlaceHolder();                 break;
            }  
   
            //
            // Rule 42:  dcolon_opt ::= $Empty
            //
            case 42: {       action.builder.
   consumeEmpty();                 break;
            }  
   
            //
            // Rule 43:  qualified_id_name ::= dcolon_opt nested_name_specifier template_opt unqualified_id_name
            //
            case 43: {       action.builder.
   consumeQualifiedId(true);                 break;
            }  
   
            //
            // Rule 44:  qualified_id_name ::= :: identifier_name
            //
            case 44: {       action.builder.
   consumeGlobalQualifiedId();                 break;
            }  
   
            //
            // Rule 45:  qualified_id_name ::= :: operator_function_id_name
            //
            case 45: {       action.builder.
   consumeGlobalQualifiedId();                 break;
            }  
   
            //
            // Rule 46:  qualified_id_name ::= :: template_id_name
            //
            case 46: {       action.builder.
   consumeGlobalQualifiedId();                 break;
            }  
   
            //
            // Rule 47:  nested_name_specifier ::= class_or_namespace_name :: nested_name_specifier_with_template
            //
            case 47: {       action.builder.
   consumeNestedNameSpecifier(true);                 break;
            }  
   
            //
            // Rule 48:  nested_name_specifier ::= class_or_namespace_name ::
            //
            case 48: {       action.builder.
   consumeNestedNameSpecifier(false);                 break;
            }  
   
            //
            // Rule 49:  nested_name_specifier_with_template ::= class_or_namespace_name_with_template :: nested_name_specifier_with_template
            //
            case 49: {       action.builder.
   consumeNestedNameSpecifier(true);                 break;
            }  
   
            //
            // Rule 50:  nested_name_specifier_with_template ::= class_or_namespace_name_with_template ::
            //
            case 50: {       action.builder.
   consumeNestedNameSpecifier(false);                 break;
            }  
   
            //
            // Rule 51:  class_or_namespace_name_with_template ::= template_opt class_or_namespace_name
            //
            case 51: {       action.builder.
   consumeNameWithTemplateKeyword();                 break;
            }  
   
            //
            // Rule 53:  nested_name_specifier_opt ::= $Empty
            //
            case 53: {       action.builder.
   consumeNestedNameSpecifierEmpty();                 break;
            }  
   
            //
            // Rule 57:  postfix_expression ::= postfix_expression [ expression ]
            //
            case 57: {       action.builder.
   consumeExpressionArraySubscript();                 break;
            }  
   
            //
            // Rule 58:  postfix_expression ::= postfix_expression ( expression_list_opt )
            //
            case 58: {       action.builder.
   consumeExpressionFunctionCall();                 break;
            }  
   
            //
            // Rule 59:  postfix_expression ::= simple_type_specifier ( expression_list_opt )
            //
            case 59: {       action.builder.
   consumeExpressionSimpleTypeConstructor();                break;
            }  
   
            //
            // Rule 60:  postfix_expression ::= typename dcolon_opt nested_name_specifier <empty> identifier_name ( expression_list_opt )
            //
            case 60: {       action.builder.
   consumeExpressionTypeName();                break;
            }  
   
            //
            // Rule 61:  postfix_expression ::= typename dcolon_opt nested_name_specifier template_opt template_id_name ( expression_list_opt )
            //
            case 61: {       action.builder.
   consumeExpressionTypeName();                break;
            }  
   
            //
            // Rule 62:  postfix_expression ::= postfix_expression . qualified_or_unqualified_name
            //
            case 62: {       action.builder.
   consumeExpressionFieldReference(false, false);                 break;
            }  
   
            //
            // Rule 63:  postfix_expression ::= postfix_expression -> qualified_or_unqualified_name
            //
            case 63: {       action.builder.
   consumeExpressionFieldReference(true, false);                 break;
            }  
   
            //
            // Rule 64:  postfix_expression ::= postfix_expression . template qualified_or_unqualified_name
            //
            case 64: {       action.builder.
   consumeExpressionFieldReference(false, true);                 break;
            }  
   
            //
            // Rule 65:  postfix_expression ::= postfix_expression -> template qualified_or_unqualified_name
            //
            case 65: {       action.builder.
   consumeExpressionFieldReference(true, true);                 break;
            }  
   
            //
            // Rule 66:  postfix_expression ::= postfix_expression . pseudo_destructor_name
            //
            case 66: {       action.builder.
   consumeExpressionFieldReference(false, false);                 break;
            }  
   
            //
            // Rule 67:  postfix_expression ::= postfix_expression -> pseudo_destructor_name
            //
            case 67: {       action.builder.
   consumeExpressionFieldReference(true, false);                 break;
            }  
   
            //
            // Rule 68:  postfix_expression ::= postfix_expression ++
            //
            case 68: {       action.builder.
   consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr);                 break;
            }  
   
            //
            // Rule 69:  postfix_expression ::= postfix_expression --
            //
            case 69: {       action.builder.
   consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr);                 break;
            }  
   
            //
            // Rule 70:  postfix_expression ::= dynamic_cast < type_id > ( expression )
            //
            case 70: {       action.builder.
   consumeExpressionCast(ICPPASTCastExpression.op_dynamic_cast);                 break;
            }  
   
            //
            // Rule 71:  postfix_expression ::= static_cast < type_id > ( expression )
            //
            case 71: {       action.builder.
   consumeExpressionCast(ICPPASTCastExpression.op_static_cast);                 break;
            }  
   
            //
            // Rule 72:  postfix_expression ::= reinterpret_cast < type_id > ( expression )
            //
            case 72: {       action.builder.
   consumeExpressionCast(ICPPASTCastExpression.op_reinterpret_cast);                 break;
            }  
   
            //
            // Rule 73:  postfix_expression ::= const_cast < type_id > ( expression )
            //
            case 73: {       action.builder.
   consumeExpressionCast(ICPPASTCastExpression.op_const_cast);                 break;
            }  
   
            //
            // Rule 74:  postfix_expression ::= typeid ( expression )
            //
            case 74: {       action.builder.
   consumeExpressionUnaryOperator(ICPPASTUnaryExpression.op_typeid);                 break;
            }  
   
            //
            // Rule 75:  postfix_expression ::= typeid ( type_id )
            //
            case 75: {       action.builder.
   consumeExpressionTypeId(ICPPASTTypeIdExpression.op_typeid);                break;
            }  
   
            //
            // Rule 76:  pseudo_destructor_name ::= dcolon_opt nested_name_specifier_opt type_name :: ~ type_name
            //
            case 76: {       action.builder.
   consumePsudoDestructorName(true);                 break;
            }  
   
            //
            // Rule 77:  pseudo_destructor_name ::= dcolon_opt nested_name_specifier template template_id_name :: ~ type_name
            //
            case 77: {       action.builder.
   consumePsudoDestructorName(true);                 break;
            }  
   
            //
            // Rule 78:  pseudo_destructor_name ::= dcolon_opt nested_name_specifier_opt ~ type_name
            //
            case 78: {       action.builder.
   consumePsudoDestructorName(false);                 break;
            }  
   
            //
            // Rule 82:  unary_expression ::= ++ cast_expression
            //
            case 82: {       action.builder.
   consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixIncr);                 break;
            }  
   
            //
            // Rule 83:  unary_expression ::= -- cast_expression
            //
            case 83: {       action.builder.
   consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixDecr);                 break;
            }  
   
            //
            // Rule 84:  unary_expression ::= & cast_expression
            //
            case 84: {       action.builder.
   consumeExpressionUnaryOperator(IASTUnaryExpression.op_amper);                 break;
            }  
   
            //
            // Rule 85:  unary_expression ::= * cast_expression
            //
            case 85: {       action.builder.
   consumeExpressionUnaryOperator(IASTUnaryExpression.op_star);                 break;
            }  
   
            //
            // Rule 86:  unary_expression ::= + cast_expression
            //
            case 86: {       action.builder.
   consumeExpressionUnaryOperator(IASTUnaryExpression.op_plus);                 break;
            }  
   
            //
            // Rule 87:  unary_expression ::= - cast_expression
            //
            case 87: {       action.builder.
   consumeExpressionUnaryOperator(IASTUnaryExpression.op_minus);                 break;
            }  
   
            //
            // Rule 88:  unary_expression ::= ~ cast_expression
            //
            case 88: {       action.builder.
   consumeExpressionUnaryOperator(IASTUnaryExpression.op_tilde);                 break;
            }  
   
            //
            // Rule 89:  unary_expression ::= ! cast_expression
            //
            case 89: {       action.builder.
   consumeExpressionUnaryOperator(IASTUnaryExpression.op_not);                 break;
            }  
   
            //
            // Rule 90:  unary_expression ::= sizeof unary_expression
            //
            case 90: {       action.builder.
   consumeExpressionUnaryOperator(IASTUnaryExpression.op_sizeof);                 break;
            }  
   
            //
            // Rule 91:  unary_expression ::= sizeof ( type_id )
            //
            case 91: {       action.builder.
   consumeExpressionTypeId(ICPPASTTypeIdExpression.op_sizeof);                break;
            }  
   
            //
            // Rule 92:  new_expression ::= dcolon_opt new new_placement_opt new_type_id <openscope-ast> new_array_expressions_opt new_initializer_opt
            //
            case 92: {       action.builder.
   consumeExpressionNew(true);                 break;
            }  
   
            //
            // Rule 93:  new_expression ::= dcolon_opt new new_placement_opt ( type_id ) new_initializer_opt
            //
            case 93: {       action.builder.
   consumeExpressionNew(false);                 break;
            }  
   
            //
            // Rule 96:  new_placement_opt ::= $Empty
            //
            case 96: {       action.builder.
   consumeEmpty();                 break;
            }  
   
            //
            // Rule 97:  new_type_id ::= type_specifier_seq
            //
            case 97: {       action.builder.
   consumeTypeId(false);                 break;
            }  
   
            //
            // Rule 98:  new_type_id ::= type_specifier_seq new_declarator
            //
            case 98: {       action.builder.
   consumeTypeId(true);                 break;
            }  
   
            //
            // Rule 99:  new_declarator ::= <openscope-ast> new_pointer_operators
            //
            case 99: {       action.builder.
   consumeNewDeclarator();                break;
            }  
   
            //
            // Rule 108:  new_initializer_opt ::= $Empty
            //
            case 108: {       action.builder.
   consumeEmpty();                 break;
            }  
   
            //
            // Rule 109:  delete_expression ::= dcolon_opt delete cast_expression
            //
            case 109: {       action.builder.
   consumeExpressionDelete(false);                 break;
            }  
   
            //
            // Rule 110:  delete_expression ::= dcolon_opt delete [ ] cast_expression
            //
            case 110: {       action.builder.
   consumeExpressionDelete(true);                 break;
            }  
   
            //
            // Rule 112:  cast_expression ::= ( type_id ) cast_expression
            //
            case 112: {       action.builder.
   consumeExpressionCast(ICPPASTCastExpression.op_cast);                 break;
            }  
   
            //
            // Rule 114:  pm_expression ::= pm_expression .* cast_expression
            //
            case 114: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_pmdot);                 break;
            }  
   
            //
            // Rule 115:  pm_expression ::= pm_expression ->* cast_expression
            //
            case 115: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_pmarrow);                 break;
            }  
   
            //
            // Rule 117:  multiplicative_expression ::= multiplicative_expression * pm_expression
            //
            case 117: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_multiply);                 break;
            }  
   
            //
            // Rule 118:  multiplicative_expression ::= multiplicative_expression / pm_expression
            //
            case 118: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_divide);                 break;
            }  
   
            //
            // Rule 119:  multiplicative_expression ::= multiplicative_expression % pm_expression
            //
            case 119: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_modulo);                 break;
            }  
   
            //
            // Rule 121:  additive_expression ::= additive_expression + multiplicative_expression
            //
            case 121: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_plus);                 break;
            }  
   
            //
            // Rule 122:  additive_expression ::= additive_expression - multiplicative_expression
            //
            case 122: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_minus);                 break;
            }  
   
            //
            // Rule 124:  shift_expression ::= shift_expression << additive_expression
            //
            case 124: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_shiftLeft);                 break;
            }  
   
            //
            // Rule 125:  shift_expression ::= shift_expression >> additive_expression
            //
            case 125: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_shiftRight);                 break;
            }  
   
            //
            // Rule 127:  relational_expression ::= relational_expression < shift_expression
            //
            case 127: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_lessThan);                 break;
            }  
   
            //
            // Rule 128:  relational_expression ::= relational_expression > shift_expression
            //
            case 128: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_greaterThan);                 break;
            }  
   
            //
            // Rule 129:  relational_expression ::= relational_expression <= shift_expression
            //
            case 129: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_lessEqual);                 break;
            }  
   
            //
            // Rule 130:  relational_expression ::= relational_expression >= shift_expression
            //
            case 130: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_greaterEqual);                 break;
            }  
   
            //
            // Rule 132:  equality_expression ::= equality_expression == relational_expression
            //
            case 132: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_equals);                 break;
            }  
   
            //
            // Rule 133:  equality_expression ::= equality_expression != relational_expression
            //
            case 133: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_notequals);                 break;
            }  
   
            //
            // Rule 135:  and_expression ::= and_expression & equality_expression
            //
            case 135: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryAnd);                 break;
            }  
   
            //
            // Rule 137:  exclusive_or_expression ::= exclusive_or_expression ^ and_expression
            //
            case 137: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryXor);                 break;
            }  
   
            //
            // Rule 139:  inclusive_or_expression ::= inclusive_or_expression | exclusive_or_expression
            //
            case 139: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryOr);                 break;
            }  
   
            //
            // Rule 141:  logical_and_expression ::= logical_and_expression && inclusive_or_expression
            //
            case 141: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_logicalAnd);                 break;
            }  
   
            //
            // Rule 143:  logical_or_expression ::= logical_or_expression || logical_and_expression
            //
            case 143: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_logicalOr);                 break;
            }  
   
            //
            // Rule 145:  conditional_expression ::= logical_or_expression ? expression : assignment_expression
            //
            case 145: {       action.builder.
   consumeExpressionConditional();                 break;
            }  
   
            //
            // Rule 146:  throw_expression ::= throw
            //
            case 146: {       action.builder.
   consumeExpressionThrow(false);                 break;
            }  
   
            //
            // Rule 147:  throw_expression ::= throw assignment_expression
            //
            case 147: {       action.builder.
   consumeExpressionThrow(true);                 break;
            }  
   
            //
            // Rule 150:  assignment_expression ::= logical_or_expression = assignment_expression
            //
            case 150: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_assign);                 break;
            }  
   
            //
            // Rule 151:  assignment_expression ::= logical_or_expression *= assignment_expression
            //
            case 151: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_multiplyAssign);                 break;
            }  
   
            //
            // Rule 152:  assignment_expression ::= logical_or_expression /= assignment_expression
            //
            case 152: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_divideAssign);                 break;
            }  
   
            //
            // Rule 153:  assignment_expression ::= logical_or_expression %= assignment_expression
            //
            case 153: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_moduloAssign);                 break;
            }  
   
            //
            // Rule 154:  assignment_expression ::= logical_or_expression += assignment_expression
            //
            case 154: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_plusAssign);                 break;
            }  
   
            //
            // Rule 155:  assignment_expression ::= logical_or_expression -= assignment_expression
            //
            case 155: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_minusAssign);                 break;
            }  
   
            //
            // Rule 156:  assignment_expression ::= logical_or_expression >>= assignment_expression
            //
            case 156: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_shiftRightAssign);                 break;
            }  
   
            //
            // Rule 157:  assignment_expression ::= logical_or_expression <<= assignment_expression
            //
            case 157: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_shiftLeftAssign);                 break;
            }  
   
            //
            // Rule 158:  assignment_expression ::= logical_or_expression &= assignment_expression
            //
            case 158: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryAndAssign);                 break;
            }  
   
            //
            // Rule 159:  assignment_expression ::= logical_or_expression ^= assignment_expression
            //
            case 159: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryXorAssign);                 break;
            }  
   
            //
            // Rule 160:  assignment_expression ::= logical_or_expression |= assignment_expression
            //
            case 160: {       action.builder.
   consumeExpressionBinaryOperator(ICPPASTBinaryExpression.op_binaryOrAssign);                 break;
            }  
   
            //
            // Rule 162:  expression ::= ERROR_TOKEN
            //
            case 162: {       action.builder.
   consumeExpressionProblem();                break;
            }  
   
            //
            // Rule 163:  expression_list ::= <openscope-ast> expression_list_actual
            //
            case 163: {       action.builder.
   consumeExpressionList();                 break;
            }  
   
            //
            // Rule 167:  expression_list_opt ::= $Empty
            //
            case 167: {       action.builder.
   consumeEmpty();                 break;
            }  
   
            //
            // Rule 169:  expression_opt ::= $Empty
            //
            case 169: {       action.builder.
   consumeEmpty();                 break;
            }  
   
            //
            // Rule 172:  constant_expression_opt ::= $Empty
            //
            case 172: {       action.builder.
   consumeEmpty();                 break;
            }  
   
            //
            // Rule 181:  statement ::= ERROR_TOKEN
            //
            case 181: {       action.builder.
   consumeStatementProblem();                 break;
            }  
   
            //
            // Rule 182:  labeled_statement ::= identifier : statement
            //
            case 182: {       action.builder.
   consumeStatementLabeled();                 break;
            }  
   
            //
            // Rule 183:  labeled_statement ::= case constant_expression :
            //
            case 183: {       action.builder.
   consumeStatementCase();                 break;
            }  
   
            //
            // Rule 184:  labeled_statement ::= default :
            //
            case 184: {       action.builder.
   consumeStatementDefault();                 break;
            }  
   
            //
            // Rule 185:  expression_statement ::= expression ;
            //
            case 185: {       action.builder.
   consumeStatementExpression();                 break;
            }  
   
            //
            // Rule 186:  expression_statement ::= ;
            //
            case 186: {       action.builder.
   consumeStatementNull();                 break;
            }  
   
            //
            // Rule 187:  compound_statement ::= { <openscope-ast> statement_seq }
            //
            case 187: {       action.builder.
   consumeStatementCompoundStatement(true);                 break;
            }  
   
            //
            // Rule 188:  compound_statement ::= { }
            //
            case 188: {       action.builder.
   consumeStatementCompoundStatement(false);                 break;
            }  
   
            //
            // Rule 191:  selection_statement ::= if ( condition ) statement
            //
            case 191: {       action.builder.
   consumeStatementIf(false);                 break;
            }  
   
            //
            // Rule 192:  selection_statement ::= if ( condition ) statement else statement
            //
            case 192: {       action.builder.
   consumeStatementIf(true);                 break;
            }  
   
            //
            // Rule 193:  selection_statement ::= switch ( condition ) statement
            //
            case 193: {       action.builder.
   consumeStatementSwitch();                 break;
            }  
   
            //
            // Rule 195:  condition ::= type_specifier_seq declarator = assignment_expression
            //
            case 195: {       action.builder.
   consumeConditionDeclaration();                 break;
            }  
   
            //
            // Rule 196:  iteration_statement ::= while ( condition ) statement
            //
            case 196: {       action.builder.
   consumeStatementWhileLoop();                 break;
            }  
   
            //
            // Rule 197:  iteration_statement ::= do statement while ( expression ) ;
            //
            case 197: {       action.builder.
   consumeStatementDoLoop();                 break;
            }  
   
            //
            // Rule 198:  iteration_statement ::= for ( expression_opt ; expression_opt ; expression_opt ) statement
            //
            case 198: {       action.builder.
  consumeStatementForLoop();                break;
            }  
   
            //
            // Rule 199:  iteration_statement ::= for ( simple_declaration expression_opt ; expression_opt ) statement
            //
            case 199: {       action.builder.
  consumeStatementForLoop();                break;
            }  
   
            //
            // Rule 200:  jump_statement ::= break ;
            //
            case 200: {       action.builder.
   consumeStatementBreak();                 break;
            }  
   
            //
            // Rule 201:  jump_statement ::= continue ;
            //
            case 201: {       action.builder.
   consumeStatementContinue();                 break;
            }  
   
            //
            // Rule 202:  jump_statement ::= return expression ;
            //
            case 202: {       action.builder.
   consumeStatementReturn(true);                 break;
            }  
   
            //
            // Rule 203:  jump_statement ::= return ;
            //
            case 203: {       action.builder.
   consumeStatementReturn(false);                 break;
            }  
   
            //
            // Rule 204:  jump_statement ::= goto identifier_token ;
            //
            case 204: {       action.builder.
   consumeStatementGoto();                 break;
            }  
   
            //
            // Rule 205:  declaration_statement ::= block_declaration
            //
            case 205: {       action.builder.
   consumeStatementDeclaration();                 break;
            }  
   
            //
            // Rule 222:  simple_declaration ::= declaration_specifiers_opt <openscope-ast> init_declarator_list_opt ;
            //
            case 222: {       action.builder.
   consumeDeclarationSimple(true);                 break;
            }  
   
            //
            // Rule 223:  declaration_specifiers ::= <openscope-ast> simple_declaration_specifiers
            //
            case 223: {       action.builder.
   consumeDeclarationSpecifiersSimple();                 break;
            }  
   
            //
            // Rule 224:  declaration_specifiers ::= <openscope-ast> class_declaration_specifiers
            //
            case 224: {       action.builder.
   consumeDeclarationSpecifiersComposite();                 break;
            }  
   
            //
            // Rule 225:  declaration_specifiers ::= <openscope-ast> elaborated_declaration_specifiers
            //
            case 225: {       action.builder.
   consumeDeclarationSpecifiersComposite();                 break;
            }  
   
            //
            // Rule 226:  declaration_specifiers ::= <openscope-ast> enum_declaration_specifiers
            //
            case 226: {       action.builder.
   consumeDeclarationSpecifiersComposite();                 break;
            }  
   
            //
            // Rule 227:  declaration_specifiers ::= <openscope-ast> type_name_declaration_specifiers
            //
            case 227: {       action.builder.
   consumeDeclarationSpecifiersTypeName();                 break;
            }  
   
            //
            // Rule 229:  declaration_specifiers_opt ::= $Empty
            //
            case 229: {       action.builder.
   consumeEmpty();                 break;
            }  
   
            //
            // Rule 233:  no_type_declaration_specifier ::= friend
            //
            case 233: {       action.builder.
   consumeDeclSpecToken();                break;
            }  
   
            //
            // Rule 234:  no_type_declaration_specifier ::= typedef
            //
            case 234: {       action.builder.
   consumeDeclSpecToken();                break;
            }  
   
            //
            // Rule 263:  simple_type_specifier ::= simple_type_specifier_token
            //
            case 263: {       action.builder.
   consumeDeclSpecToken();                break;
            }  
   
            //
            // Rule 279:  type_name_specifier ::= dcolon_opt nested_name_specifier_opt type_name
            //
            case 279: {       action.builder.
   consumeQualifiedId(false);                 break;
            }  
   
            //
            // Rule 280:  type_name_specifier ::= dcolon_opt nested_name_specifier template template_id_name
            //
            case 280: {       action.builder.
   consumeQualifiedId(false);                 break;
            }  
   
            //
            // Rule 281:  type_name_specifier ::= typename dcolon_opt nested_name_specifier identifier_name
            //
            case 281: {       action.builder.
   consumeQualifiedId(false);                 break;
            }  
   
            //
            // Rule 282:  type_name_specifier ::= typename dcolon_opt nested_name_specifier template_opt template_id_name
            //
            case 282: {       action.builder.
   consumeQualifiedId(true);                 break;
            }  
   
            //
            // Rule 283:  elaborated_type_specifier ::= class_keyword dcolon_opt nested_name_specifier_opt identifier_name
            //
            case 283: {       action.builder.
   consumeTypeSpecifierElaborated(false);                 break;
            }  
   
            //
            // Rule 284:  elaborated_type_specifier ::= class_keyword dcolon_opt nested_name_specifier_opt template_opt template_id_name
            //
            case 284: {       action.builder.
   consumeTypeSpecifierElaborated(true);                  break;
            }  
   
            //
            // Rule 285:  elaborated_type_specifier ::= enum dcolon_opt nested_name_specifier_opt identifier_name
            //
            case 285: {       action.builder.
   consumeTypeSpecifierElaborated(false);                 break;
            }  
   
            //
            // Rule 287:  enum_specifier ::= enum { <openscope-ast> enumerator_list_opt }
            //
            case 287: {       action.builder.
   consumeTypeSpecifierEnumeration(false);                break;
            }  
   
            //
            // Rule 288:  enum_specifier ::= enum identifier_token { <openscope-ast> enumerator_list_opt }
            //
            case 288: {       action.builder.
   consumeTypeSpecifierEnumeration(true);                break;
            }  
   
            //
            // Rule 293:  enumerator_definition ::= enumerator
            //
            case 293: {       action.builder.
   consumeEnumerator(false);                break;
            }  
   
            //
            // Rule 294:  enumerator_definition ::= enumerator = constant_expression
            //
            case 294: {       action.builder.
   consumeEnumerator(true);                break;
            }  
   
            //
            // Rule 303:  original_namespace_definition ::= namespace identifier_name { <openscope-ast> declaration_seq_opt }
            //
            case 303: {       action.builder.
   consumeNamespaceDefinition(true);                 break;
            }  
   
            //
            // Rule 304:  extension_namespace_definition ::= namespace original_namespace_name { <openscope-ast> declaration_seq_opt }
            //
            case 304: {       action.builder.
   consumeNamespaceDefinition(true);                 break;
            }  
   
            //
            // Rule 305:  unnamed_namespace_definition ::= namespace { <openscope-ast> declaration_seq_opt }
            //
            case 305: {       action.builder.
   consumeNamespaceDefinition(false);                 break;
            }  
   
            //
            // Rule 307:  namespace_alias_definition ::= namespace identifier_token = dcolon_opt nested_name_specifier_opt namespace_name ;
            //
            case 307: {       action.builder.
   consumeNamespaceAliasDefinition();                break;
            }  
   
            //
            // Rule 308:  using_declaration ::= using typename_opt dcolon_opt nested_name_specifier_opt unqualified_id_name ;
            //
            case 308: {       action.builder.
   consumeUsingDeclaration();                 break;
            }  
   
            //
            // Rule 309:  typename_opt ::= typename
            //
            case 309: {       action.builder.
   consumePlaceHolder();                 break;
            }  
   
            //
            // Rule 310:  typename_opt ::= $Empty
            //
            case 310: {       action.builder.
   consumeEmpty();                 break;
            }  
   
            //
            // Rule 311:  using_directive ::= using namespace dcolon_opt nested_name_specifier_opt namespace_name ;
            //
            case 311: {       action.builder.
   consumeUsingDirective();                 break;
            }  
   
            //
            // Rule 312:  asm_definition ::= asm ( stringlit ) ;
            //
            case 312: {       action.builder.
   consumeDeclarationASM();                break;
            }  
   
            //
            // Rule 313:  linkage_specification ::= extern stringlit { <openscope-ast> declaration_seq_opt }
            //
            case 313: {       action.builder.
   consumeLinkageSpecification();                 break;
            }  
   
            //
            // Rule 314:  linkage_specification ::= extern stringlit <openscope-ast> declaration
            //
            case 314: {       action.builder.
   consumeLinkageSpecification();                 break;
            }  
   
            //
            // Rule 320:  init_declarator ::= declarator initializer
            //
            case 320: {       action.builder.
   consumeDeclaratorWithInitializer(true);                 break;
            }  
   
            //
            // Rule 322:  declarator ::= <openscope-ast> ptr_operator_seq direct_declarator
            //
            case 322: {       action.builder.
   consumeDeclaratorWithPointer(true);                 break;
            }  
   
            //
            // Rule 324:  function_declarator ::= <openscope-ast> ptr_operator_seq direct_declarator
            //
            case 324: {       action.builder.
   consumeDeclaratorWithPointer(true);                 break;
            }  
   
            //
            // Rule 328:  basic_direct_declarator ::= declarator_id_name
            //
            case 328: {       action.builder.
   consumeDirectDeclaratorIdentifier();                 break;
            }  
   
            //
            // Rule 329:  basic_direct_declarator ::= ( declarator )
            //
            case 329: {       action.builder.
   consumeDirectDeclaratorBracketed();                 break;
            }  
   
            //
            // Rule 330:  function_direct_declarator ::= basic_direct_declarator ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
            //
            case 330: {       action.builder.
   consumeDirectDeclaratorFunctionDeclarator(true);                 break;
            }  
   
            //
            // Rule 331:  array_direct_declarator ::= array_direct_declarator array_modifier
            //
            case 331: {       action.builder.
   consumeDirectDeclaratorArrayDeclarator(true);                 break;
            }  
   
            //
            // Rule 332:  array_direct_declarator ::= basic_direct_declarator array_modifier
            //
            case 332: {       action.builder.
   consumeDirectDeclaratorArrayDeclarator(true);                 break;
            }  
   
            //
            // Rule 333:  array_modifier ::= [ constant_expression ]
            //
            case 333: {       action.builder.
   consumeDirectDeclaratorArrayModifier(true);                 break;
            }  
   
            //
            // Rule 334:  array_modifier ::= [ ]
            //
            case 334: {       action.builder.
   consumeDirectDeclaratorArrayModifier(false);                 break;
            }  
   
            //
            // Rule 335:  ptr_operator ::= * <openscope-ast> cv_qualifier_seq_opt
            //
            case 335: {       action.builder.
   consumePointer();                 break;
            }  
   
            //
            // Rule 336:  ptr_operator ::= &
            //
            case 336: {       action.builder.
   consumeReferenceOperator();                 break;
            }  
   
            //
            // Rule 337:  ptr_operator ::= dcolon_opt nested_name_specifier * <openscope-ast> cv_qualifier_seq_opt
            //
            case 337: {       action.builder.
   consumePointerToMember();                 break;
            }  
   
            //
            // Rule 343:  cv_qualifier ::= const
            //
            case 343: {       action.builder.
   consumeDeclSpecToken();                break;
            }  
   
            //
            // Rule 344:  cv_qualifier ::= volatile
            //
            case 344: {       action.builder.
   consumeDeclSpecToken();                break;
            }  
   
            //
            // Rule 346:  declarator_id_name ::= dcolon_opt nested_name_specifier_opt type_name
            //
            case 346: {       action.builder.
   consumeQualifiedId(false);                 break;
            }  
   
            //
            // Rule 347:  type_id ::= type_specifier_seq
            //
            case 347: {       action.builder.
   consumeTypeId(false);                 break;
            }  
   
            //
            // Rule 348:  type_id ::= type_specifier_seq abstract_declarator
            //
            case 348: {       action.builder.
   consumeTypeId(true);                 break;
            }  
   
            //
            // Rule 351:  abstract_declarator ::= <openscope-ast> ptr_operator_seq
            //
            case 351: {       action.builder.
   consumeDeclaratorWithPointer(false);                 break;
            }  
   
            //
            // Rule 352:  abstract_declarator ::= <openscope-ast> ptr_operator_seq direct_abstract_declarator
            //
            case 352: {       action.builder.
   consumeDeclaratorWithPointer(true);                 break;
            }  
   
            //
            // Rule 356:  basic_direct_abstract_declarator ::= ( abstract_declarator )
            //
            case 356: {       action.builder.
   consumeDirectDeclaratorBracketed();                 break;
            }  
   
            //
            // Rule 357:  array_direct_abstract_declarator ::= array_modifier
            //
            case 357: {       action.builder.
   consumeDirectDeclaratorArrayDeclarator(false);                 break;
            }  
   
            //
            // Rule 358:  array_direct_abstract_declarator ::= array_direct_abstract_declarator array_modifier
            //
            case 358: {       action.builder.
   consumeDirectDeclaratorArrayDeclarator(true);                 break;
            }  
   
            //
            // Rule 359:  array_direct_abstract_declarator ::= basic_direct_abstract_declarator array_modifier
            //
            case 359: {       action.builder.
   consumeDirectDeclaratorArrayDeclarator(true);                 break;
            }  
   
            //
            // Rule 360:  function_direct_abstract_declarator ::= basic_direct_abstract_declarator ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
            //
            case 360: {       action.builder.
   consumeDirectDeclaratorFunctionDeclarator(true);                 break;
            }  
   
            //
            // Rule 361:  function_direct_abstract_declarator ::= ( <openscope-ast> parameter_declaration_clause ) <openscope-ast> cv_qualifier_seq_opt <openscope-ast> exception_specification_opt
            //
            case 361: {       action.builder.
   consumeDirectDeclaratorFunctionDeclarator(false);                 break;
            }  
   
            //
            // Rule 362:  parameter_declaration_clause ::= parameter_declaration_list_opt ...
            //
            case 362: {       action.builder.
   consumePlaceHolder();                 break;
            }  
   
            //
            // Rule 363:  parameter_declaration_clause ::= parameter_declaration_list_opt
            //
            case 363: {       action.builder.
   consumeEmpty();                 break;
            }  
   
            //
            // Rule 364:  parameter_declaration_clause ::= parameter_declaration_list , ...
            //
            case 364: {       action.builder.
   consumePlaceHolder();                 break;
            }  
   
            //
            // Rule 370:  abstract_declarator_opt ::= $Empty
            //
            case 370: {       action.builder.
   consumeEmpty();                 break;
            }  
   
            //
            // Rule 371:  parameter_declaration ::= declaration_specifiers parameter_init_declarator
            //
            case 371: {       action.builder.
   consumeParameterDeclaration();                 break;
            }  
   
            //
            // Rule 372:  parameter_declaration ::= declaration_specifiers
            //
            case 372: {       action.builder.
   consumeParameterDeclarationWithoutDeclarator();                 break;
            }  
   
            //
            // Rule 374:  parameter_init_declarator ::= declarator = parameter_initializer
            //
            case 374: {       action.builder.
   consumeDeclaratorWithInitializer(true);                 break;
            }  
   
            //
            // Rule 376:  parameter_init_declarator ::= abstract_declarator = parameter_initializer
            //
            case 376: {       action.builder.
   consumeDeclaratorWithInitializer(true);                 break;
            }  
   
            //
            // Rule 377:  parameter_init_declarator ::= = parameter_initializer
            //
            case 377: {       action.builder.
   consumeDeclaratorWithInitializer(false);                 break;
            }  
   
            //
            // Rule 378:  parameter_initializer ::= assignment_expression
            //
            case 378: {       action.builder.
   consumeInitializer();                 break;
            }  
   
            //
            // Rule 379:  function_definition ::= declaration_specifiers_opt function_declarator <openscope-ast> ctor_initializer_list_opt function_body
            //
            case 379: {       action.builder.
   consumeFunctionDefinition(false);                 break;
            }  
   
            //
            // Rule 380:  function_definition ::= declaration_specifiers_opt function_declarator try <openscope-ast> ctor_initializer_list_opt function_body <openscope-ast> handler_seq
            //
            case 380: {       action.builder.
   consumeFunctionDefinition(true);                 break;
            }  
   
            //
            // Rule 383:  initializer ::= ( expression_list )
            //
            case 383: {       action.builder.
   consumeInitializerConstructor();                 break;
            }  
   
            //
            // Rule 384:  initializer_clause ::= assignment_expression
            //
            case 384: {       action.builder.
   consumeInitializer();                 break;
            }  
   
            //
            // Rule 385:  initializer_clause ::= { <openscope-ast> initializer_list , }
            //
            case 385: {       action.builder.
   consumeInitializerList();                 break;
            }  
   
            //
            // Rule 386:  initializer_clause ::= { <openscope-ast> initializer_list }
            //
            case 386: {       action.builder.
   consumeInitializerList();                 break;
            }  
   
            //
            // Rule 387:  initializer_clause ::= { <openscope-ast> }
            //
            case 387: {       action.builder.
   consumeInitializerList();                 break;
            }  
   
            //
            // Rule 392:  class_specifier ::= class_head { <openscope-ast> member_declaration_list_opt }
            //
            case 392: {       action.builder.
   consumeClassSpecifier();                 break;
            }  
   
            //
            // Rule 393:  class_head ::= class_keyword identifier_name_opt <openscope-ast> base_clause_opt
            //
            case 393: {       action.builder.
   consumeClassHead(false);                 break;
            }  
   
            //
            // Rule 394:  class_head ::= class_keyword template_id_name <openscope-ast> base_clause_opt
            //
            case 394: {       action.builder.
   consumeClassHead(false);                 break;
            }  
   
            //
            // Rule 395:  class_head ::= class_keyword nested_name_specifier identifier_name <openscope-ast> base_clause_opt
            //
            case 395: {       action.builder.
   consumeClassHead(true);                 break;
            }  
   
            //
            // Rule 396:  class_head ::= class_keyword nested_name_specifier template_id_name <openscope-ast> base_clause_opt
            //
            case 396: {       action.builder.
   consumeClassHead(true);                 break;
            }  
   
            //
            // Rule 398:  identifier_name_opt ::= $Empty
            //
            case 398: {       action.builder.
   consumeEmpty();                 break;
            } 
   
            //
            // Rule 402:  visibility_label ::= access_specifier_keyword :
            //
            case 402: {       action.builder.
   consumeVisibilityLabel();                 break;
            }  
   
            //
            // Rule 403:  member_declaration ::= declaration_specifiers_opt <openscope-ast> member_declarator_list ;
            //
            case 403: {       action.builder.
   consumeDeclarationSimple(true);                 break;
            }  
   
            //
            // Rule 404:  member_declaration ::= declaration_specifiers_opt ;
            //
            case 404: {       action.builder.
   consumeDeclarationSimple(false);                 break;
            }  
   
            //
            // Rule 407:  member_declaration ::= dcolon_opt nested_name_specifier template_opt unqualified_id_name ;
            //
            case 407: {       action.builder.
   consumeMemberDeclarationQualifiedId();                 break;
            }  
   
            //
            // Rule 411:  member_declaration ::= ERROR_TOKEN
            //
            case 411: {       action.builder.
   consumeDeclarationProblem();                 break;
            }  
   
            //
            // Rule 419:  member_declarator ::= declarator constant_initializer
            //
            case 419: {       action.builder.
   consumeMemberDeclaratorWithInitializer();                 break;
            }  
   
            //
            // Rule 420:  member_declarator ::= bit_field_declarator : constant_expression
            //
            case 420: {       action.builder.
   consumeBitField(true);                 break;
            }  
   
            //
            // Rule 421:  member_declarator ::= : constant_expression
            //
            case 421: {       action.builder.
   consumeBitField(false);                 break;
            }  
   
            //
            // Rule 422:  bit_field_declarator ::= identifier_name
            //
            case 422: {       action.builder.
   consumeDirectDeclaratorIdentifier();                 break;
            }  
   
            //
            // Rule 429:  base_specifier ::= dcolon_opt nested_name_specifier_opt class_name
            //
            case 429: {       action.builder.
   consumeBaseSpecifier(false);                 break;
            }  
   
            //
            // Rule 430:  base_specifier ::= virtual_opt access_specifier_keyword virtual_opt dcolon_opt nested_name_specifier_opt class_name
            //
            case 430: {       action.builder.
   consumeBaseSpecifier(true);                 break;
            }  
   
            //
            // Rule 431:  virtual_opt ::= virtual
            //
            case 431: {       action.builder.
   consumePlaceHolder();                 break;
            }  
   
            //
            // Rule 432:  virtual_opt ::= $Empty
            //
            case 432: {       action.builder.
   consumeEmpty();                 break;
            }  
   
            //
            // Rule 438:  conversion_function_id_name ::= operator conversion_type_id
            //
            case 438: {       action.builder.
   consumeConversionName();                break;
            }  
   
            //
            // Rule 439:  conversion_type_id ::= type_specifier_seq conversion_declarator
            //
            case 439: {       action.builder.
   consumeTypeId(true);                 break;
            }  
   
            //
            // Rule 440:  conversion_type_id ::= type_specifier_seq
            //
            case 440: {       action.builder.
   consumeTypeId(false);                 break;
            }  
   
            //
            // Rule 441:  conversion_declarator ::= <openscope-ast> ptr_operator_seq
            //
            case 441: {       action.builder.
   consumeDeclaratorWithPointer(false);                 break;
            }  
   
            //
            // Rule 447:  mem_initializer ::= mem_initializer_name ( expression_list_opt )
            //
            case 447: {       action.builder.
   consumeConstructorChainInitializer();                 break;
            }  
   
            //
            // Rule 448:  mem_initializer_name ::= dcolon_opt nested_name_specifier_opt class_name
            //
            case 448: {       action.builder.
   consumeQualifiedId(false);                 break;
            }  
   
            //
            // Rule 451:  operator_function_id_name ::= operator_id_name < <openscope-ast> template_argument_list_opt >
            //
            case 451: {       action.builder.
   consumeTemplateId();                 break;
            }  
   
            //
            // Rule 452:  operator_id_name ::= operator overloadable_operator
            //
            case 452: {       action.builder.
   consumeOperatorName();                 break;
            }  
   
            //
            // Rule 495:  template_declaration ::= export_opt template < <openscope-ast> template_parameter_list > declaration
            //
            case 495: {       action.builder.
   consumeTemplateDeclaration();                 break;
            }  
   
            //
            // Rule 496:  export_opt ::= export
            //
            case 496: {       action.builder.
   consumePlaceHolder();                 break;
            }  
   
            //
            // Rule 497:  export_opt ::= $Empty
            //
            case 497: {       action.builder.
   consumeEmpty();                 break;
            }  
   
            //
            // Rule 502:  type_parameter ::= class identifier_name_opt
            //
            case 502: {       action.builder.
   consumeSimpleTypeTemplateParameter(false);                 break;
            }  
   
            //
            // Rule 503:  type_parameter ::= class identifier_name_opt = type_id
            //
            case 503: {       action.builder.
   consumeSimpleTypeTemplateParameter(true);                 break;
            }  
   
            //
            // Rule 504:  type_parameter ::= typename identifier_name_opt
            //
            case 504: {       action.builder.
   consumeSimpleTypeTemplateParameter(false);                 break;
            }  
   
            //
            // Rule 505:  type_parameter ::= typename identifier_name_opt = type_id
            //
            case 505: {       action.builder.
   consumeSimpleTypeTemplateParameter(true);                 break;
            }  
   
            //
            // Rule 506:  type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt
            //
            case 506: {       action.builder.
   consumeTemplatedTypeTemplateParameter(false);                 break;
            }  
   
            //
            // Rule 507:  type_parameter ::= template < <openscope-ast> template_parameter_list > class identifier_name_opt = id_expression
            //
            case 507: {       action.builder.
   consumeTemplatedTypeTemplateParameter(true);                 break;
            }  
   
            //
            // Rule 508:  template_id_name ::= template_identifier < <openscope-ast> template_argument_list_opt >
            //
            case 508: {       action.builder.
   consumeTemplateId();                 break;
            }  
   
            //
            // Rule 517:  explicit_instantiation ::= template declaration
            //
            case 517: {       action.builder.
   consumeTemplateExplicitInstantiation();                 break;
            }  
   
            //
            // Rule 518:  explicit_specialization ::= template < > declaration
            //
            case 518: {       action.builder.
   consumeTemplateExplicitSpecialization();                 break;
            }  
   
            //
            // Rule 519:  try_block ::= try compound_statement <openscope-ast> handler_seq
            //
            case 519: {       action.builder.
   consumeStatementTryBlock();                 break;
            }  
   
            //
            // Rule 522:  handler ::= catch ( exception_declaration ) compound_statement
            //
            case 522: {       action.builder.
   consumeStatementCatchHandler(false);                 break;
            }  
   
            //
            // Rule 523:  handler ::= catch ( ... ) compound_statement
            //
            case 523: {       action.builder.
   consumeStatementCatchHandler(true);                 break;
            }  
   
            //
            // Rule 524:  exception_declaration ::= type_specifier_seq <openscope-ast> declarator
            //
            case 524: {       action.builder.
   consumeDeclarationSimple(true);                 break;
            }  
   
            //
            // Rule 525:  exception_declaration ::= type_specifier_seq <openscope-ast> abstract_declarator
            //
            case 525: {       action.builder.
   consumeDeclarationSimple(true);                 break;
            }  
   
            //
            // Rule 526:  exception_declaration ::= type_specifier_seq
            //
            case 526: {       action.builder.
   consumeDeclarationSimple(false);                 break;
            }  

    
            default:
                break;
        }
        return;
    }
}

