/*******************************************************************************
* Copyright (c) 2006, 2007 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.parser.upc;

import lpg.lpgjavaruntime.*;

import java.util.*;

import org.eclipse.cdt.core.dom.ast.*;
import org.eclipse.cdt.core.dom.c99.IParserActionTokenProvider;
import org.eclipse.cdt.core.dom.c99.IParser;
import org.eclipse.cdt.core.dom.c99.IParseResult;
import org.eclipse.cdt.core.dom.c99.IPreprocessorTokenCollector;
import org.eclipse.cdt.core.dom.parser.c99.C99ParseResult;
import org.eclipse.cdt.core.dom.parser.c99.C99ParserAction;
import org.eclipse.cdt.core.dom.ast.IASTCompletionNode;
import org.eclipse.cdt.core.dom.c99.IKeywordMap;
import org.eclipse.cdt.core.dom.parser.c99.C99KeywordMap;

import org.eclipse.cdt.core.dom.upc.ast.IUPCASTKeywordExpression;
import org.eclipse.cdt.core.dom.upc.ast.IUPCASTSizeofExpression;
import org.eclipse.cdt.core.dom.upc.ast.IUPCASTSynchronizationStatement;
import org.eclipse.cdt.internal.core.dom.parser.c99.C99Lexer;
import org.eclipse.cdt.internal.core.dom.parser.c99.C99Parsersym;
import org.eclipse.cdt.core.dom.parser.upc.UPCKeywordMap;
import org.eclipse.cdt.core.dom.parser.upc.UPCParserAction;

public class UPCParser extends PrsStream implements RuleAction , IParserActionTokenProvider, IParser, IPreprocessorTokenCollector<IToken> 
{
    private static ParseTable prs = new UPCParserprs();
    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 UPCParser(LexStream lexStream)
    {
        super(lexStream);

        try
        {
            super.remapTerminalSymbols(orderedTerminalSymbols(), UPCParserprs.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):");//$NON-NLS-1$
            for (int i = 0; i < unimplemented_symbols.size(); i++)
            {
                Integer id = (Integer) unimplemented_symbols.get(i);
                System.out.println("    " + UPCParsersym.orderedTerminalSymbols[id.intValue()]);//$NON-NLS-1$               
            }
            System.out.println();                        
        }
        catch(UndefinedEofSymbolException e)
        {
            throw new Error(new UndefinedEofSymbolException
                                ("The Lexer does not implement the Eof symbol " +//$NON-NLS-1$
                                 UPCParsersym.orderedTerminalSymbols[UPCParserprs.EOFT_SYMBOL]));
        } 
    }

    public String[] orderedTerminalSymbols() { return UPCParsersym.orderedTerminalSymbols; }
    public String getTokenKindName(int kind) { return UPCParsersym.orderedTerminalSymbols[kind]; }
    public int getEOFTokenKind() { return UPCParserprs.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))//$NON-NLS-1$
                                    : (super.getLine(error_token) + ":" +//$NON-NLS-1$
                                       super.getColumn(error_token) + ":" +//$NON-NLS-1$
                                       super.getEndLine(error_token) + ":" +//$NON-NLS-1$
                                       super.getEndColumn(error_token)))
                          + ": ";//$NON-NLS-1$
        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 UPCParserprs.java with -BACKTRACK option"));//$NON-NLS-1$
        }
        catch (BadParseSymFileException e)
        {
            throw new Error(new BadParseSymFileException("Bad Parser Symbol File -- UPCParsersym.java"));//$NON-NLS-1$
        }

        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  UPCParserAction  action = new  UPCParserAction (this);
private List commentTokens = new ArrayList();
private IKeywordMap keywordMap = new  UPCKeywordMap ();

public UPCParser() {  // constructor
	this(new  UPCLexer ());
}

public void addToken(IToken token) {
	int newKind = mapKind(token.getKind());
	if(newKind == UPCParserprs.TK_identifier) {
		Integer keywordKind = keywordMap.getKeywordKind(token.toString());
		if(keywordKind != null) {
			newKind = keywordKind.intValue();
		}
	}
	token.setKind(newKind);
	super.addToken(token);
}

public void addCommentToken(IToken token) {
	commentTokens.add(token);
}

public List getCommentTokens() {
	return commentTokens;
}

public void resetTokenStream() {
	super.resetTokenStream();
	action = new  UPCParserAction (this);
	commentTokens = new ArrayList();
}


public IParseResult parse() {
	// this has to be done, or... kaboom!
	setStreamLength(getSize());
	
	final int errorRepairCount = -1;  // -1 means full error handling
	
	if(btParser == null) {
		parser(null, errorRepairCount);
	}
	else {
		try
        {
        	// reuse the same btParser object for speed 
        	// (creating an new instance for every translation unit is dirt slow)
            btParser.parse(errorRepairCount);
        }
        catch (BadParseException e)
        {
            reset(e.error_token); // point to error token
            DiagnoseParser diagnoseParser = new DiagnoseParser(this, prs);
            diagnoseParser.diagnose(e.error_token);
        }
	}

	IASTTranslationUnit tu      = action.getAST();
	boolean encounteredError    = action.encounteredError();
	IASTCompletionNode compNode = action.getASTCompletionNode();

	resetTokenStream(); // important, allows memory to be reclaimed
	return new C99ParseResult(tu, compNode, encounteredError);
}


// implements IParserActionTokenProvider.getEOFToken()
public IToken getEOFToken() {
	List tokens = getTokens();
	IToken eof = (IToken) tokens.get(tokens.size() - 1);
	return eof;
}


// implements IParserActionTokenProvider.getRuleTokenCount()
public int getRuleTokenCount() {
	return (getRightSpan() - getLeftSpan()) + 1; 
}

public List getRuleTokens() {
	return Collections.unmodifiableList(getTokens().subList(getLeftSpan(), getRightSpan() + 1));
}


    public void ruleAction(int ruleNumber)
    {
        switch (ruleNumber)
        {
 
            //
            // Rule 1:  <openscope> ::= $Empty
            //
            case 1: { action.beforeConsume(); action.   openASTScope();            break;
            }
 
            //
            // Rule 12:  constant ::= integer
            //
            case 12: { action.beforeConsume(); action.   consumeExpressionConstant(IASTLiteralExpression.lk_integer_constant);            break;
            }
 
            //
            // Rule 13:  constant ::= floating
            //
            case 13: { action.beforeConsume(); action.   consumeExpressionConstant(IASTLiteralExpression.lk_float_constant);              break;
            }
 
            //
            // Rule 14:  constant ::= charconst
            //
            case 14: { action.beforeConsume(); action.   consumeExpressionConstant(IASTLiteralExpression.lk_char_constant);               break;
            }
 
            //
            // Rule 15:  constant ::= stringlit
            //
            case 15: { action.beforeConsume(); action.   consumeExpressionConstant(IASTLiteralExpression.lk_string_literal);              break;
            }
 
            //
            // Rule 17:  primary_expression ::= identifier_or_completion
            //
            case 17: { action.beforeConsume(); action.   consumeExpressionID();            break;
            }
 
            //
            // Rule 18:  primary_expression ::= ( expression )
            //
            case 18: { action.beforeConsume(); action.   consumeExpressionBracketed();            break;
            }
 
            //
            // Rule 20:  postfix_expression ::= postfix_expression [ expression ]
            //
            case 20: { action.beforeConsume(); action.   consumeExpressionArraySubscript();            break;
            }
 
            //
            // Rule 21:  postfix_expression ::= postfix_expression ( )
            //
            case 21: { action.beforeConsume(); action.   consumeExpressionFunctionCall(false);            break;
            }
 
            //
            // Rule 22:  postfix_expression ::= postfix_expression ( argument_expression_list )
            //
            case 22: { action.beforeConsume(); action.   consumeExpressionFunctionCall(true);            break;
            }
 
            //
            // Rule 23:  postfix_expression ::= postfix_expression . member_name
            //
            case 23: { action.beforeConsume(); action.   consumeExpressionFieldReference(false);            break;
            }
 
            //
            // Rule 24:  postfix_expression ::= postfix_expression -> member_name
            //
            case 24: { action.beforeConsume(); action.   consumeExpressionFieldReference(true);            break;
            }
 
            //
            // Rule 25:  postfix_expression ::= postfix_expression ++
            //
            case 25: { action.beforeConsume(); action.   consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixIncr);            break;
            }
 
            //
            // Rule 26:  postfix_expression ::= postfix_expression --
            //
            case 26: { action.beforeConsume(); action.   consumeExpressionUnaryOperator(IASTUnaryExpression.op_postFixDecr);            break;
            }
 
            //
            // Rule 27:  postfix_expression ::= ( type_name ) { <openscope> initializer_list }
            //
            case 27: { action.beforeConsume(); action.   consumeExpressionTypeIdInitializer();            break;
            }
 
            //
            // Rule 28:  postfix_expression ::= ( type_name ) { <openscope> initializer_list , }
            //
            case 28: { action.beforeConsume(); action.   consumeExpressionTypeIdInitializer();            break;
            }
 
            //
            // Rule 30:  argument_expression_list ::= assignment_expression
            //
            case 30: { action.beforeConsume(); action.   consumeExpressionList(true);            break;
            }
 
            //
            // Rule 31:  argument_expression_list ::= argument_expression_list , assignment_expression
            //
            case 31: { action.beforeConsume(); action.   consumeExpressionList(false);           break;
            }
 
            //
            // Rule 33:  unary_expression ::= ++ unary_expression
            //
            case 33: { action.beforeConsume(); action.   consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixIncr);            break;
            }
 
            //
            // Rule 34:  unary_expression ::= -- unary_expression
            //
            case 34: { action.beforeConsume(); action.   consumeExpressionUnaryOperator(IASTUnaryExpression.op_prefixDecr);            break;
            }
 
            //
            // Rule 35:  unary_expression ::= & cast_expression
            //
            case 35: { action.beforeConsume(); action.   consumeExpressionUnaryOperator(IASTUnaryExpression.op_amper);            break;
            }
 
            //
            // Rule 36:  unary_expression ::= * cast_expression
            //
            case 36: { action.beforeConsume(); action.   consumeExpressionUnaryOperator(IASTUnaryExpression.op_star);             break;
            }
 
            //
            // Rule 37:  unary_expression ::= + cast_expression
            //
            case 37: { action.beforeConsume(); action.   consumeExpressionUnaryOperator(IASTUnaryExpression.op_plus);             break;
            }
 
            //
            // Rule 38:  unary_expression ::= - cast_expression
            //
            case 38: { action.beforeConsume(); action.   consumeExpressionUnaryOperator(IASTUnaryExpression.op_minus);            break;
            }
 
            //
            // Rule 39:  unary_expression ::= ~ cast_expression
            //
            case 39: { action.beforeConsume(); action.   consumeExpressionUnaryOperator(IASTUnaryExpression.op_tilde);            break;
            }
 
            //
            // Rule 40:  unary_expression ::= ! cast_expression
            //
            case 40: { action.beforeConsume(); action.   consumeExpressionUnaryOperator(IASTUnaryExpression.op_not);              break;
            }
 
            //
            // Rule 41:  unary_expression ::= sizeof unary_expression
            //
            case 41: { action.beforeConsume(); action.   consumeExpressionUnaryOperator(IASTUnaryExpression.op_sizeof);           break;
            }
 
            //
            // Rule 42:  unary_expression ::= sizeof ( type_name )
            //
            case 42: { action.beforeConsume(); action.   consumeExpressionUnarySizeofTypeName();            break;
            }
 
            //
            // Rule 44:  cast_expression ::= ( type_name ) cast_expression
            //
            case 44: { action.beforeConsume(); action.   consumeExpressionCast();            break;
            }
 
            //
            // Rule 46:  multiplicative_expression ::= multiplicative_expression * cast_expression
            //
            case 46: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_multiply);           break;
            }
 
            //
            // Rule 47:  multiplicative_expression ::= multiplicative_expression / cast_expression
            //
            case 47: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_divide);             break;
            }
 
            //
            // Rule 48:  multiplicative_expression ::= multiplicative_expression % cast_expression
            //
            case 48: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_modulo);             break;
            }
 
            //
            // Rule 50:  additive_expression ::= additive_expression + multiplicative_expression
            //
            case 50: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_plus);            break;
            }
 
            //
            // Rule 51:  additive_expression ::= additive_expression - multiplicative_expression
            //
            case 51: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_minus);           break;
            }
 
            //
            // Rule 53:  shift_expression ::= shift_expression << additive_expression
            //
            case 53: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftLeft);             break;
            }
 
            //
            // Rule 54:  shift_expression ::= shift_expression >> additive_expression
            //
            case 54: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftRight);            break;
            }
 
            //
            // Rule 56:  relational_expression ::= relational_expression < shift_expression
            //
            case 56: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_lessThan);               break;
            }
 
            //
            // Rule 57:  relational_expression ::= relational_expression > shift_expression
            //
            case 57: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_greaterThan);            break;
            }
 
            //
            // Rule 58:  relational_expression ::= relational_expression <= shift_expression
            //
            case 58: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_lessEqual);              break;
            }
 
            //
            // Rule 59:  relational_expression ::= relational_expression >= shift_expression
            //
            case 59: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_greaterEqual);           break;
            }
 
            //
            // Rule 61:  equality_expression ::= equality_expression == relational_expression
            //
            case 61: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_equals);            break;
            }
 
            //
            // Rule 62:  equality_expression ::= equality_expression != relational_expression
            //
            case 62: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_notequals);            break;
            }
 
            //
            // Rule 64:  AND_expression ::= AND_expression & equality_expression
            //
            case 64: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryAnd);            break;
            }
 
            //
            // Rule 66:  exclusive_OR_expression ::= exclusive_OR_expression ^ AND_expression
            //
            case 66: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryXor);            break;
            }
 
            //
            // Rule 68:  inclusive_OR_expression ::= inclusive_OR_expression | exclusive_OR_expression
            //
            case 68: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryOr);            break;
            }
 
            //
            // Rule 70:  logical_AND_expression ::= logical_AND_expression && inclusive_OR_expression
            //
            case 70: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_logicalAnd);            break;
            }
 
            //
            // Rule 72:  logical_OR_expression ::= logical_OR_expression || logical_AND_expression
            //
            case 72: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_logicalOr);            break;
            }
 
            //
            // Rule 74:  conditional_expression ::= logical_OR_expression ? expression : conditional_expression
            //
            case 74: { action.beforeConsume(); action.   consumeExpressionConditional();            break;
            }
 
            //
            // Rule 76:  assignment_expression ::= unary_expression = assignment_expression
            //
            case 76: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_assign);            break;
            }
 
            //
            // Rule 77:  assignment_expression ::= unary_expression *= assignment_expression
            //
            case 77: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_multiplyAssign);            break;
            }
 
            //
            // Rule 78:  assignment_expression ::= unary_expression /= assignment_expression
            //
            case 78: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_divideAssign);            break;
            }
 
            //
            // Rule 79:  assignment_expression ::= unary_expression %= assignment_expression
            //
            case 79: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_moduloAssign);            break;
            }
 
            //
            // Rule 80:  assignment_expression ::= unary_expression += assignment_expression
            //
            case 80: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_plusAssign);            break;
            }
 
            //
            // Rule 81:  assignment_expression ::= unary_expression -= assignment_expression
            //
            case 81: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_minusAssign);            break;
            }
 
            //
            // Rule 82:  assignment_expression ::= unary_expression <<= assignment_expression
            //
            case 82: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftLeftAssign);            break;
            }
 
            //
            // Rule 83:  assignment_expression ::= unary_expression >>= assignment_expression
            //
            case 83: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_shiftRightAssign);            break;
            }
 
            //
            // Rule 84:  assignment_expression ::= unary_expression &= assignment_expression
            //
            case 84: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryAndAssign);            break;
            }
 
            //
            // Rule 85:  assignment_expression ::= unary_expression ^= assignment_expression
            //
            case 85: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryXorAssign);            break;
            }
 
            //
            // Rule 86:  assignment_expression ::= unary_expression |= assignment_expression
            //
            case 86: { action.beforeConsume(); action.   consumeExpressionBinaryOperator(IASTBinaryExpression.op_binaryOrAssign);            break;
            }
 
            //
            // Rule 87:  expression_in_statement ::= expression_list
            //
            case 87: { action.beforeConsume(); action.   consumeExpression();            break;
            }
 
            //
            // Rule 88:  expression ::= expression_list
            //
            case 88: { action.beforeConsume(); action.   consumeExpression();            break;
            }
 
            //
            // Rule 89:  expression_list ::= assignment_expression
            //
            case 89: { action.beforeConsume(); action.   consumeExpressionList(true);            break;
            }
 
            //
            // Rule 90:  expression_list ::= expression_list , assignment_expression
            //
            case 90: { action.beforeConsume(); action.   consumeExpressionList(false);            break;
            }
 
            //
            // Rule 98:  statement ::= ERROR_TOKEN
            //
            case 98: { action.beforeConsume(); action.   consumeStatementProblem();            break;
            }
 
            //
            // Rule 99:  labeled_statement ::= label_identifier : statement
            //
            case 99: { action.beforeConsume(); action.   consumeStatementLabeled();            break;
            }
 
            //
            // Rule 100:  labeled_statement ::= case constant_expression :
            //
            case 100: { action.beforeConsume(); action.   consumeStatementCase();            break;
            }
 
            //
            // Rule 101:  labeled_statement ::= default :
            //
            case 101: { action.beforeConsume(); action.   consumeStatementDefault();            break;
            }
 
            //
            // Rule 102:  label_identifier ::= identifier
            //
            case 102: { action.beforeConsume(); action.   consumeName();            break;
            }
 
            //
            // Rule 103:  compound_statement ::= { }
            //
            case 103: { action.beforeConsume(); action.   consumeStatementEmptyCompoundStatement();            break;
            }
 
            //
            // Rule 104:  compound_statement ::= { <openscope> block_item_list }
            //
            case 104: { action.beforeConsume(); action.   consumeStatementCompoundStatement();            break;
            }
 
            //
            // Rule 108:  block_item ::= declaration
            //
            case 108: { action.beforeConsume(); action.   consumeStatementDeclaration();            break;
            }
 
            //
            // Rule 109:  expression_statement ::= ;
            //
            case 109: { action.beforeConsume(); action.   consumeStatementNull();            break;
            }
 
            //
            // Rule 110:  expression_statement ::= expression_in_statement ;
            //
            case 110: { action.beforeConsume(); action.   consumeStatementExpression();            break;
            }
 
            //
            // Rule 111:  selection_statement ::= if ( expression ) statement
            //
            case 111: { action.beforeConsume(); action.   consumeStatementIfThen();            break;
            }
 
            //
            // Rule 112:  selection_statement ::= if ( expression ) statement else statement
            //
            case 112: { action.beforeConsume(); action.   consumeStatementIfThenElse();            break;
            }
 
            //
            // Rule 113:  selection_statement ::= switch ( expression ) statement
            //
            case 113: { action.beforeConsume(); action.   consumeStatementSwitch();            break;
            }
 
            //
            // Rule 114:  iteration_statement ::= do statement while ( expression ) ;
            //
            case 114: { action.beforeConsume(); action.   consumeStatementDoLoop();            break;
            }
 
            //
            // Rule 115:  iteration_statement ::= while ( expression ) statement
            //
            case 115: { action.beforeConsume(); action.   consumeStatementWhileLoop();            break;
            }
 
            //
            // Rule 116:  iteration_statement ::= for ( expression ; expression ; expression ) statement
            //
            case 116: { action.beforeConsume(); action.   consumeStatementForLoop(true, true, true);            break;
            }
 
            //
            // Rule 117:  iteration_statement ::= for ( expression ; expression ; ) statement
            //
            case 117: { action.beforeConsume(); action.   consumeStatementForLoop(true, true, false);            break;
            }
 
            //
            // Rule 118:  iteration_statement ::= for ( expression ; ; expression ) statement
            //
            case 118: { action.beforeConsume(); action.   consumeStatementForLoop(true, false, true);            break;
            }
 
            //
            // Rule 119:  iteration_statement ::= for ( expression ; ; ) statement
            //
            case 119: { action.beforeConsume(); action.   consumeStatementForLoop(true, false, false);            break;
            }
 
            //
            // Rule 120:  iteration_statement ::= for ( ; expression ; expression ) statement
            //
            case 120: { action.beforeConsume(); action.   consumeStatementForLoop(false, true, true);            break;
            }
 
            //
            // Rule 121:  iteration_statement ::= for ( ; expression ; ) statement
            //
            case 121: { action.beforeConsume(); action.   consumeStatementForLoop(false, true, false);            break;
            }
 
            //
            // Rule 122:  iteration_statement ::= for ( ; ; expression ) statement
            //
            case 122: { action.beforeConsume(); action.   consumeStatementForLoop(false, false, true);            break;
            }
 
            //
            // Rule 123:  iteration_statement ::= for ( ; ; ) statement
            //
            case 123: { action.beforeConsume(); action.   consumeStatementForLoop(false, false, false);            break;
            }
 
            //
            // Rule 124:  iteration_statement ::= for ( declaration expression ; expression ) statement
            //
            case 124: { action.beforeConsume(); action.   consumeStatementForLoop(true, true, true);            break;
            }
 
            //
            // Rule 125:  iteration_statement ::= for ( declaration expression ; ) statement
            //
            case 125: { action.beforeConsume(); action.   consumeStatementForLoop(true, true, false);            break;
            }
 
            //
            // Rule 126:  iteration_statement ::= for ( declaration ; expression ) statement
            //
            case 126: { action.beforeConsume(); action.   consumeStatementForLoop(true, false, true);            break;
            }
 
            //
            // Rule 127:  iteration_statement ::= for ( declaration ; ) statement
            //
            case 127: { action.beforeConsume(); action.   consumeStatementForLoop(true, false, false);            break;
            }
 
            //
            // Rule 128:  jump_statement ::= goto goto_identifier ;
            //
            case 128: { action.beforeConsume(); action.   consumeStatementGoto();            break;
            }
 
            //
            // Rule 129:  jump_statement ::= continue ;
            //
            case 129: { action.beforeConsume(); action.   consumeStatementContinue();            break;
            }
 
            //
            // Rule 130:  jump_statement ::= break ;
            //
            case 130: { action.beforeConsume(); action.   consumeStatementBreak();            break;
            }
 
            //
            // Rule 131:  jump_statement ::= return ;
            //
            case 131: { action.beforeConsume(); action.   consumeStatementReturn(false);            break;
            }
 
            //
            // Rule 132:  jump_statement ::= return expression ;
            //
            case 132: { action.beforeConsume(); action.   consumeStatementReturn(true);            break;
            }
 
            //
            // Rule 133:  goto_identifier ::= identifier
            //
            case 133: { action.beforeConsume(); action.   consumeName();            break;
            }
 
            //
            // Rule 134:  declaration ::= declaration_specifiers ;
            //
            case 134: { action.beforeConsume(); action.   consumeDeclaration(false);            break;
            }
 
            //
            // Rule 135:  declaration ::= declaration_specifiers <openscope> init_declarator_list ;
            //
            case 135: { action.beforeConsume(); action.   consumeDeclaration(true);            break;
            }
 
            //
            // Rule 136:  declaration_specifiers ::= <openscope> simple_declaration_specifiers
            //
            case 136: { action.beforeConsume(); action.   consumeDeclarationSpecifiersSimple();           break;
            }
 
            //
            // Rule 137:  declaration_specifiers ::= <openscope> struct_or_union_declaration_specifiers
            //
            case 137: { action.beforeConsume(); action.   consumeDeclarationSpecifiersStructUnionEnum();           break;
            }
 
            //
            // Rule 138:  declaration_specifiers ::= <openscope> enum_declaration_specifiers
            //
            case 138: { action.beforeConsume(); action.   consumeDeclarationSpecifiersStructUnionEnum();           break;
            }
 
            //
            // Rule 139:  declaration_specifiers ::= <openscope> typdef_name_declaration_specifiers
            //
            case 139: { action.beforeConsume(); action.   consumeDeclarationSpecifiersTypedefName();           break;
            }
 
            //
            // Rule 161:  init_declarator ::= declarator = initializer
            //
            case 161: { action.beforeConsume(); action.   consumeDeclaratorWithInitializer();            break;
            }
 
            //
            // Rule 162:  storage_class_specifier ::= typedef
            //
            case 162: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 163:  storage_class_specifier ::= extern
            //
            case 163: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 164:  storage_class_specifier ::= static
            //
            case 164: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 165:  storage_class_specifier ::= auto
            //
            case 165: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 166:  storage_class_specifier ::= register
            //
            case 166: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 167:  type_specifier ::= void
            //
            case 167: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 168:  type_specifier ::= char
            //
            case 168: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 169:  type_specifier ::= short
            //
            case 169: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 170:  type_specifier ::= int
            //
            case 170: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 171:  type_specifier ::= long
            //
            case 171: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 172:  type_specifier ::= float
            //
            case 172: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 173:  type_specifier ::= double
            //
            case 173: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 174:  type_specifier ::= signed
            //
            case 174: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 175:  type_specifier ::= unsigned
            //
            case 175: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 176:  type_specifier ::= _Bool
            //
            case 176: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 177:  type_specifier ::= _Complex
            //
            case 177: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 178:  type_specifier ::= _Imaginary
            //
            case 178: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 179:  typedef_name ::= identifier_or_completion
            //
            case 179: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 180:  struct_or_union_specifier ::= struct { <openscope> struct_declaration_list_opt }
            //
            case 180: { action.beforeConsume(); action.   consumeTypeSpecifierComposite(false, IASTCompositeTypeSpecifier.k_struct);            break;
            }
 
            //
            // Rule 181:  struct_or_union_specifier ::= union { <openscope> struct_declaration_list_opt }
            //
            case 181: { action.beforeConsume(); action.   consumeTypeSpecifierComposite(false, IASTCompositeTypeSpecifier.k_union);            break;
            }
 
            //
            // Rule 182:  struct_or_union_specifier ::= struct struct_or_union_identifier { <openscope> struct_declaration_list_opt }
            //
            case 182: { action.beforeConsume(); action.   consumeTypeSpecifierComposite(true, IASTCompositeTypeSpecifier.k_struct);            break;
            }
 
            //
            // Rule 183:  struct_or_union_specifier ::= union struct_or_union_identifier { <openscope> struct_declaration_list_opt }
            //
            case 183: { action.beforeConsume(); action.   consumeTypeSpecifierComposite(true, IASTCompositeTypeSpecifier.k_union);            break;
            }
 
            //
            // Rule 184:  struct_or_union_specifier ::= struct struct_or_union_identifier
            //
            case 184: { action.beforeConsume(); action.   consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_struct);            break;
            }
 
            //
            // Rule 185:  struct_or_union_specifier ::= union struct_or_union_identifier
            //
            case 185: { action.beforeConsume(); action.   consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_union);            break;
            }
 
            //
            // Rule 186:  struct_or_union_identifier ::= identifier
            //
            case 186: { action.beforeConsume(); action.   consumeName();            break;
            }
 
            //
            // Rule 191:  struct_declaration ::= specifier_qualifier_list <openscope> struct_declarator_list ;
            //
            case 191: { action.beforeConsume(); action.   consumeStructDeclaration(true);            break;
            }
 
            //
            // Rule 192:  struct_declaration ::= specifier_qualifier_list ;
            //
            case 192: { action.beforeConsume(); action.   consumeStructDeclaration(false);            break;
            }
 
            //
            // Rule 197:  struct_declarator ::= : constant_expression
            //
            case 197: { action.beforeConsume(); action.   consumeStructBitField(false);            break;
            }
 
            //
            // Rule 198:  struct_declarator ::= declarator : constant_expression
            //
            case 198: { action.beforeConsume(); action.   consumeStructBitField(true);             break;
            }
 
            //
            // Rule 199:  enum_identifier ::= identifier
            //
            case 199: { action.beforeConsume(); action.   consumeName();            break;
            }
 
            //
            // Rule 200:  enum_specifier ::= enum { <openscope> enumerator_list_opt }
            //
            case 200: { action.beforeConsume(); action.   consumeTypeSpecifierEnumeration(false);            break;
            }
 
            //
            // Rule 201:  enum_specifier ::= enum enum_identifier { <openscope> enumerator_list_opt }
            //
            case 201: { action.beforeConsume(); action.   consumeTypeSpecifierEnumeration(true);            break;
            }
 
            //
            // Rule 202:  enum_specifier ::= enum { <openscope> enumerator_list_opt , }
            //
            case 202: { action.beforeConsume(); action.   consumeTypeSpecifierEnumeration(false);            break;
            }
 
            //
            // Rule 203:  enum_specifier ::= enum enum_identifier { <openscope> enumerator_list_opt , }
            //
            case 203: { action.beforeConsume(); action.   consumeTypeSpecifierEnumeration(true);            break;
            }
 
            //
            // Rule 204:  enum_specifier ::= enum enum_identifier
            //
            case 204: { action.beforeConsume(); action.   consumeTypeSpecifierElaborated(IASTElaboratedTypeSpecifier.k_enum);            break;
            }
 
            //
            // Rule 209:  enumerator ::= enum_identifier
            //
            case 209: { action.beforeConsume(); action.   consumeEnumerator(false);            break;
            }
 
            //
            // Rule 210:  enumerator ::= enum_identifier = constant_expression
            //
            case 210: { action.beforeConsume(); action.   consumeEnumerator(true);            break;
            }
 
            //
            // Rule 211:  type_qualifier ::= const
            //
            case 211: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 212:  type_qualifier ::= restrict
            //
            case 212: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 213:  type_qualifier ::= volatile
            //
            case 213: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 214:  function_specifier ::= inline
            //
            case 214: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 216:  declarator ::= <openscope> pointer direct_declarator
            //
            case 216: { action.beforeConsume(); action.   consumeDeclaratorWithPointer(true);            break;
            }
 
            //
            // Rule 217:  direct_declarator ::= identifier
            //
            case 217: { action.beforeConsume(); action.   consumeDirectDeclaratorIdentifier();            break;
            }
 
            //
            // Rule 218:  direct_declarator ::= ( declarator )
            //
            case 218: { action.beforeConsume(); action.   consumeDirectDeclaratorBracketed();            break;
            }
 
            //
            // Rule 221:  array_direct_declarator ::= direct_declarator array_modifier
            //
            case 221: { action.beforeConsume(); action.   consumeDirectDeclaratorArrayDeclarator();            break;
            }
 
            //
            // Rule 222:  function_direct_declarator ::= direct_declarator ( <openscope> parameter_type_list )
            //
            case 222: { action.beforeConsume(); action.   consumeDirectDeclaratorFunctionDeclarator(true);            break;
            }
 
            //
            // Rule 223:  function_direct_declarator ::= direct_declarator ( )
            //
            case 223: { action.beforeConsume(); action.   consumeDirectDeclaratorFunctionDeclarator(false);            break;
            }
 
            //
            // Rule 225:  function_declarator ::= <openscope> pointer function_direct_declarator
            //
            case 225: { action.beforeConsume(); action.   consumeDeclaratorWithPointer(true);            break;
            }
 
            //
            // Rule 226:  knr_direct_declarator ::= direct_declarator ( <openscope> identifier_list )
            //
            case 226: { action.beforeConsume(); action.   consumeDirectDeclaratorFunctionDeclaratorKnR();            break;
            }
 
            //
            // Rule 228:  knr_function_declarator ::= <openscope> pointer knr_direct_declarator
            //
            case 228: { action.beforeConsume(); action.   consumeDeclaratorWithPointer(true);            break;
            }
 
            //
            // Rule 229:  array_modifier ::= [ ]
            //
            case 229: { action.beforeConsume(); action.   consumeDirectDeclaratorArrayModifier(false);            break;
            }
 
            //
            // Rule 230:  array_modifier ::= [ <openscope> type_qualifier_list ]
            //
            case 230: { action.beforeConsume(); action.   consumeDirectDeclaratorModifiedArrayModifier(false, false, true,  false);            break;
            }
 
            //
            // Rule 231:  array_modifier ::= [ assignment_expression ]
            //
            case 231: { action.beforeConsume(); action.   consumeDirectDeclaratorArrayModifier(true );            break;
            }
 
            //
            // Rule 232:  array_modifier ::= [ <openscope> type_qualifier_list assignment_expression ]
            //
            case 232: { action.beforeConsume(); action.   consumeDirectDeclaratorModifiedArrayModifier(false, false, true,  true );            break;
            }
 
            //
            // Rule 233:  array_modifier ::= [ static assignment_expression ]
            //
            case 233: { action.beforeConsume(); action.   consumeDirectDeclaratorModifiedArrayModifier(true,  false, false, true );            break;
            }
 
            //
            // Rule 234:  array_modifier ::= [ static <openscope> type_qualifier_list assignment_expression ]
            //
            case 234: { action.beforeConsume(); action.   consumeDirectDeclaratorModifiedArrayModifier(true,  false, true,  true );            break;
            }
 
            //
            // Rule 235:  array_modifier ::= [ <openscope> type_qualifier_list static assignment_expression ]
            //
            case 235: { action.beforeConsume(); action.   consumeDirectDeclaratorModifiedArrayModifier(true,  false, true,  true );            break;
            }
 
            //
            // Rule 236:  array_modifier ::= [ * ]
            //
            case 236: { action.beforeConsume(); action.   consumeDirectDeclaratorModifiedArrayModifier(false, true,  false, false);            break;
            }
 
            //
            // Rule 237:  array_modifier ::= [ <openscope> type_qualifier_list * ]
            //
            case 237: { action.beforeConsume(); action.   consumeDirectDeclaratorModifiedArrayModifier(false, true,  true,  false);            break;
            }
 
            //
            // Rule 238:  pointer ::= *
            //
            case 238: { action.beforeConsume(); action.   consumePointer();            break;
            }
 
            //
            // Rule 239:  pointer ::= pointer *
            //
            case 239: { action.beforeConsume(); action.   consumePointer();            break;
            }
 
            //
            // Rule 240:  pointer ::= * <openscope> type_qualifier_list
            //
            case 240: { action.beforeConsume(); action.   consumePointerTypeQualifierList();            break;
            }
 
            //
            // Rule 241:  pointer ::= pointer * <openscope> type_qualifier_list
            //
            case 241: { action.beforeConsume(); action.   consumePointerTypeQualifierList();            break;
            }
 
            //
            // Rule 249:  parameter_declaration ::= declaration_specifiers init_declarator
            //
            case 249: { action.beforeConsume(); action.   consumeParameterDeclaration(true);            break;
            }
 
            //
            // Rule 250:  parameter_declaration ::= declaration_specifiers
            //
            case 250: { action.beforeConsume(); action.   consumeParameterDeclaration(false);           break;
            }
 
            //
            // Rule 251:  parameter_declaration ::= declaration_specifiers abstract_declarator
            //
            case 251: { action.beforeConsume(); action.   consumeParameterDeclaration(true);            break;
            }
 
            //
            // Rule 252:  identifier_list ::= identifier
            //
            case 252: { action.beforeConsume(); action.   consumeName();            break;
            }
 
            //
            // Rule 253:  identifier_list ::= identifier_list , identifier
            //
            case 253: { action.beforeConsume(); action.   consumeName();            break;
            }
 
            //
            // Rule 254:  type_name ::= specifier_qualifier_list
            //
            case 254: { action.beforeConsume(); action.   consumeTypeId(false);            break;
            }
 
            //
            // Rule 255:  type_name ::= specifier_qualifier_list abstract_declarator
            //
            case 255: { action.beforeConsume(); action.   consumeTypeId(true);            break;
            }
 
            //
            // Rule 256:  abstract_declarator ::= <openscope> pointer
            //
            case 256: { action.beforeConsume(); action.   consumeDeclaratorWithPointer(false);            break;
            }
 
            //
            // Rule 258:  abstract_declarator ::= <openscope> pointer direct_abstract_declarator
            //
            case 258: { action.beforeConsume(); action.   consumeDeclaratorWithPointer(true);             break;
            }
 
            //
            // Rule 259:  direct_abstract_declarator ::= ( abstract_declarator )
            //
            case 259: { action.beforeConsume(); action.   consumeDirectDeclaratorBracketed();            break;
            }
 
            //
            // Rule 260:  direct_abstract_declarator ::= array_modifier
            //
            case 260: { action.beforeConsume(); action.   consumeAbstractDeclaratorArrayModifier(false);            break;
            }
 
            //
            // Rule 261:  direct_abstract_declarator ::= direct_abstract_declarator array_modifier
            //
            case 261: { action.beforeConsume(); action.   consumeAbstractDeclaratorArrayModifier(true);             break;
            }
 
            //
            // Rule 262:  direct_abstract_declarator ::= ( )
            //
            case 262: { action.beforeConsume(); action.   consumeAbstractDeclaratorFunctionDeclarator(false, false);           break;
            }
 
            //
            // Rule 263:  direct_abstract_declarator ::= direct_abstract_declarator ( )
            //
            case 263: { action.beforeConsume(); action.   consumeAbstractDeclaratorFunctionDeclarator(true, false);            break;
            }
 
            //
            // Rule 264:  direct_abstract_declarator ::= ( <openscope> parameter_type_list )
            //
            case 264: { action.beforeConsume(); action.   consumeAbstractDeclaratorFunctionDeclarator(false, true);            break;
            }
 
            //
            // Rule 265:  direct_abstract_declarator ::= direct_abstract_declarator ( <openscope> parameter_type_list )
            //
            case 265: { action.beforeConsume(); action.   consumeAbstractDeclaratorFunctionDeclarator(true, true);             break;
            }
 
            //
            // Rule 266:  initializer ::= assignment_expression
            //
            case 266: { action.beforeConsume(); action.   consumeInitializer();            break;
            }
 
            //
            // Rule 267:  initializer ::= { <openscope> initializer_list }
            //
            case 267: { action.beforeConsume(); action.   consumeInitializerList();            break;
            }
 
            //
            // Rule 268:  initializer ::= { <openscope> initializer_list , }
            //
            case 268: { action.beforeConsume(); action.   consumeInitializerList();            break;
            }
 
            //
            // Rule 273:  designated_initializer ::= <openscope> designation initializer
            //
            case 273: { action.beforeConsume(); action.   consumeInitializerDesignated();            break;
            }
 
            //
            // Rule 277:  designator ::= [ constant_expression ]
            //
            case 277: { action.beforeConsume(); action.   consumeDesignatorArrayDesignator();            break;
            }
 
            //
            // Rule 278:  designator ::= . identifier
            //
            case 278: { action.beforeConsume(); action.   consumeDesignatorFieldDesignator();            break;
            }
 
            //
            // Rule 279:  translation_unit ::= external_declaration_list
            //
            case 279: { action.beforeConsume(); action.   consumeTranslationUnit();            break;
            }
 
            //
            // Rule 280:  translation_unit ::= $Empty
            //
            case 280: { action.beforeConsume(); action.   consumeTranslationUnit();            break;
            }
 
            //
            // Rule 285:  external_declaration ::= ;
            //
            case 285: { action.beforeConsume(); action.   consumeDeclarationEmpty();           break;
            }
 
            //
            // Rule 286:  external_declaration ::= ERROR_TOKEN
            //
            case 286: { action.beforeConsume(); action.   consumeDeclarationProblem();            break;
            }
 
            //
            // Rule 287:  function_definition ::= declaration_specifiers <openscope> function_declarator compound_statement
            //
            case 287: { action.beforeConsume(); action.   consumeFunctionDefinition(true);            break;
            }
 
            //
            // Rule 288:  function_definition ::= declaration_specifiers <openscope> knr_function_declarator <openscope> declaration_list compound_statement
            //
            case 288: { action.beforeConsume(); action.   consumeFunctionDefinitionKnR();            break;
            }
 
            //
            // Rule 289:  function_definition ::= function_declarator compound_statement
            //
            case 289: { action.beforeConsume(); action.   consumeFunctionDefinition(false);            break;
            }
 
            //
            // Rule 292:  constant ::= MYTHREAD
            //
            case 292: { action.beforeConsume(); action.   consumeKeywordExpression(IUPCASTKeywordExpression.kw_mythread);           break;
            }
 
            //
            // Rule 293:  constant ::= THREADS
            //
            case 293: { action.beforeConsume(); action.   consumeKeywordExpression(IUPCASTKeywordExpression.kw_threads);           break;
            }
 
            //
            // Rule 294:  constant ::= UPC_MAX_BLOCKSIZE
            //
            case 294: { action.beforeConsume(); action.   consumeKeywordExpression(IUPCASTKeywordExpression.kw_upc_max_block_size);           break;
            }
 
            //
            // Rule 295:  unary_expression ::= upc_localsizeof unary_expression
            //
            case 295: { action.beforeConsume(); action.   consumeExpressionUpcSizeofOperator(IUPCASTSizeofExpression.op_upc_localsizeof);           break;
            }
 
            //
            // Rule 296:  unary_expression ::= upc_localsizeof ( type_name )
            //
            case 296: { action.beforeConsume(); action.   consumeExpressionUpcSizeofTypeName(IUPCASTSizeofExpression.op_upc_localsizeof);           break;
            }
 
            //
            // Rule 297:  unary_expression ::= upc_blocksizeof unary_expression
            //
            case 297: { action.beforeConsume(); action.   consumeExpressionUpcSizeofOperator(IUPCASTSizeofExpression.op_upc_blocksizeof);           break;
            }
 
            //
            // Rule 298:  unary_expression ::= upc_blocksizeof ( type_name )
            //
            case 298: { action.beforeConsume(); action.   consumeExpressionUpcSizeofTypeName(IUPCASTSizeofExpression.op_upc_blocksizeof);           break;
            }
 
            //
            // Rule 299:  unary_expression ::= upc_elemsizeof unary_expression
            //
            case 299: { action.beforeConsume(); action.   consumeExpressionUpcSizeofOperator(IUPCASTSizeofExpression.op_upc_elemsizeof);           break;
            }
 
            //
            // Rule 300:  unary_expression ::= upc_elemsizeof ( type_name )
            //
            case 300: { action.beforeConsume(); action.   consumeExpressionUpcSizeofTypeName(IUPCASTSizeofExpression.op_upc_elemsizeof);           break;
            }
 
            //
            // Rule 304:  shared_type_qualifier ::= shared
            //
            case 304: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 305:  reference_type_qualifier ::= relaxed
            //
            case 305: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 306:  reference_type_qualifier ::= strict
            //
            case 306: { action.beforeConsume(); action.   consumeToken();            break;
            }
 
            //
            // Rule 307:  layout_qualifier ::= [ constant_expression ]
            //
            case 307: { action.beforeConsume(); action.   consumeLayoutQualifier(true, false);            break;
            }
 
            //
            // Rule 308:  layout_qualifier ::= [ * ]
            //
            case 308: { action.beforeConsume(); action.   consumeLayoutQualifier(false, true);            break;
            }
 
            //
            // Rule 309:  layout_qualifier ::= [ ]
            //
            case 309: { action.beforeConsume(); action.   consumeLayoutQualifier(false, false);            break;
            }
 
            //
            // Rule 311:  synchronization_statement ::= upc_notify expression ;
            //
            case 311: { action.beforeConsume(); action.   consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_notify, true);           break;
            }
 
            //
            // Rule 312:  synchronization_statement ::= upc_notify ;
            //
            case 312: { action.beforeConsume(); action.   consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_notify, false);           break;
            }
 
            //
            // Rule 313:  synchronization_statement ::= upc_wait expression ;
            //
            case 313: { action.beforeConsume(); action.   consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_wait, true);           break;
            }
 
            //
            // Rule 314:  synchronization_statement ::= upc_wait ;
            //
            case 314: { action.beforeConsume(); action.   consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_wait, false);           break;
            }
 
            //
            // Rule 315:  synchronization_statement ::= upc_barrier expression ;
            //
            case 315: { action.beforeConsume(); action.   consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_barrier, true);           break;
            }
 
            //
            // Rule 316:  synchronization_statement ::= upc_barrier ;
            //
            case 316: { action.beforeConsume(); action.   consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_barrier, false);           break;
            }
 
            //
            // Rule 317:  synchronization_statement ::= upc_fence ;
            //
            case 317: { action.beforeConsume(); action.   consumeStatementSynchronizationStatement(IUPCASTSynchronizationStatement.st_upc_fence, false);           break;
            }
 
            //
            // Rule 318:  iteration_statement ::= upc_forall ( expression ; expression ; expression ; affinity ) statement
            //
            case 318: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(true, true, true, true);           break;
            }
 
            //
            // Rule 319:  iteration_statement ::= upc_forall ( expression ; expression ; expression ; ) statement
            //
            case 319: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(true, true, true, false);           break;
            }
 
            //
            // Rule 320:  iteration_statement ::= upc_forall ( expression ; expression ; ; affinity ) statement
            //
            case 320: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(true, true, false, true);           break;
            }
 
            //
            // Rule 321:  iteration_statement ::= upc_forall ( expression ; expression ; ; ) statement
            //
            case 321: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(true, true, false, false);           break;
            }
 
            //
            // Rule 322:  iteration_statement ::= upc_forall ( expression ; ; expression ; affinity ) statement
            //
            case 322: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(true, false, true, true);           break;
            }
 
            //
            // Rule 323:  iteration_statement ::= upc_forall ( expression ; ; expression ; ) statement
            //
            case 323: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(true, false, true, false);           break;
            }
 
            //
            // Rule 324:  iteration_statement ::= upc_forall ( expression ; ; ; affinity ) statement
            //
            case 324: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(true, false, false, true);           break;
            }
 
            //
            // Rule 325:  iteration_statement ::= upc_forall ( expression ; ; ; ) statement
            //
            case 325: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(true, false, false, false);           break;
            }
 
            //
            // Rule 326:  iteration_statement ::= upc_forall ( ; expression ; expression ; affinity ) statement
            //
            case 326: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(false, true, true, true);           break;
            }
 
            //
            // Rule 327:  iteration_statement ::= upc_forall ( ; expression ; expression ; ) statement
            //
            case 327: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(false, true, true, false);           break;
            }
 
            //
            // Rule 328:  iteration_statement ::= upc_forall ( ; expression ; ; affinity ) statement
            //
            case 328: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(false, true, false, true);           break;
            }
 
            //
            // Rule 329:  iteration_statement ::= upc_forall ( ; expression ; ; ) statement
            //
            case 329: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(false, true, false, false);           break;
            }
 
            //
            // Rule 330:  iteration_statement ::= upc_forall ( ; ; expression ; affinity ) statement
            //
            case 330: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(false, false, true, true);           break;
            }
 
            //
            // Rule 331:  iteration_statement ::= upc_forall ( ; ; expression ; ) statement
            //
            case 331: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(false, false, true, false);           break;
            }
 
            //
            // Rule 332:  iteration_statement ::= upc_forall ( ; ; ; affinity ) statement
            //
            case 332: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(false, false, false, true);           break;
            }
 
            //
            // Rule 333:  iteration_statement ::= upc_forall ( ; ; ; ) statement
            //
            case 333: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(false, false, false, false);           break;
            }
 
            //
            // Rule 334:  iteration_statement ::= upc_forall ( declaration expression ; expression ; affinity ) statement
            //
            case 334: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(true, true, true, true);           break;
            }
 
            //
            // Rule 335:  iteration_statement ::= upc_forall ( declaration expression ; expression ; ) statement
            //
            case 335: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(true, true, true, false);           break;
            }
 
            //
            // Rule 336:  iteration_statement ::= upc_forall ( declaration expression ; ; affinity ) statement
            //
            case 336: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(true, true, false, true);           break;
            }
 
            //
            // Rule 337:  iteration_statement ::= upc_forall ( declaration expression ; ; ) statement
            //
            case 337: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(true, true, false, false);           break;
            }
 
            //
            // Rule 338:  iteration_statement ::= upc_forall ( declaration ; expression ; affinity ) statement
            //
            case 338: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(true, false, true, true);           break;
            }
 
            //
            // Rule 339:  iteration_statement ::= upc_forall ( declaration ; expression ; ) statement
            //
            case 339: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(true, false, true, false);           break;
            }
 
            //
            // Rule 340:  iteration_statement ::= upc_forall ( declaration ; ; affinity ) statement
            //
            case 340: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(true, false, false, true);           break;
            }
 
            //
            // Rule 341:  iteration_statement ::= upc_forall ( declaration ; ; ) statement
            //
            case 341: { action.beforeConsume(); action.   consumeStatementUPCForallLoop(true, false, false, false);           break;
            }
 
            //
            // Rule 343:  affinity ::= continue
            //
            case 343: { action.beforeConsume(); action.   consumeToken();            break;
            }

    
            default:
                break;
        }
        return;
    }
}

