public final void exprTERNARYEx() throws RecognitionException
    {
        
        AST ast1 = null, ast2 = null, ast3 = null;
        
        try {
            // CPP.g:539:3: ( '?' exprASSIGN ':' exprASSIGN | )
            int alt30 = 2;
            int LA30_0 = this.input.LA(1);
            
            if ((LA30_0 == 67)) {
                alt30 = 1;
            }
            else if (((LA30_0 == EOF) || ((LA30_0 >= 23) && (LA30_0 <= 24)) || (LA30_0 == 26) || (LA30_0 == 29)
                    || (LA30_0 == 43) || (LA30_0 == 52))) {
                alt30 = 2;
            }
            else {
                if (this.state.backtracking > 0) {
                    this.state.failed = true;
                    return;
                }
                NoViableAltException nvae = new NoViableAltException("", 30, 0, this.input);
                
                throw nvae;
            }
            switch (alt30)
            {
                case 1:
                    // CPP.g:539:5: '?' exprASSIGN ':' exprASSIGN
                {
                    if (this.state.backtracking == 0) {
                        ast1 = this.in;
                    }
                    this.match(this.input, 67, FOLLOW_67_in_exprTERNARYEx2296);
                    if (this.state.failed) {
                        return;
                    }
                    this.pushFollow(FOLLOW_exprASSIGN_in_exprTERNARYEx2303);
                    this.exprASSIGN();
                    
                    this.state._fsp--;
                    if (this.state.failed) {
                        return;
                    }
                    if (this.state.backtracking == 0) {
                        ast2 = this.out;
                        this.out = null;
                    }
                    this.match(this.input, 52, FOLLOW_52_in_exprTERNARYEx2311);
                    if (this.state.failed) {
                        return;
                    }
                    this.pushFollow(FOLLOW_exprASSIGN_in_exprTERNARYEx2318);
                    this.exprASSIGN();
                    
                    this.state._fsp--;
                    if (this.state.failed) {
                        return;
                    }
                    if (this.state.backtracking == 0) {
                        ast3 = this.out;
                        this.out = null;
                    }
                    if (this.state.backtracking == 0) {
                        this.out = new TernaryExprAST((ExprAST) ast1, (ExprAST) ast2, (ExprAST) ast3);
                    }
                    
                }
                    break;
                case 2:
                    // CPP.g:546:3:
                {
                }
                    break;
                
            }
        }
        catch (RecognitionException re) {
            this.reportError(re);
            this.recover(this.input, re);
        } finally {
        }
        return;
    }