When our two-state PDA constructed from CFG is non-deterministic PDA?

We can always convert our GNF-CFG/CNF-CFG to a two-state PDA but i’m wondering when our PDA is non-deterministic? i’m sure we can not make DPDA for non-Deterministic-CFL , and i suspect that same rule which applied for differing between DCFG and non-Deterministic-CFG also applied here. i mean when we have non-Deterministic δ (delta) implied non-Deterministic edge in our PDA. if my suspicion is right , then for every DCFL exist at least one DPDA. Am i right?

R ≝ Production Rules of CFG (x,y,"LBL") is a labeled-edge between x and y with “LBL” as a label  ∀r∊R: r= (A,aⱰ) ( A∊V ⋀ a∊T ∧ Ɒ∊V*) add (q,q,"a,A/Ɒ") to E Add (q,q,"ε,z/Sz′") to E Add (q,f,"ε,z′/z′") to E 

enter image description here

What is the “best” way to branch on a two-state enum?

Given an enumeration with two enumerators:

enum class State {   first,   second }; 

What is the “best” way to branch on this enum? Here are a few alternatives:

// 0 if (state == State::first) { } else { }  // 1 if (state == State::first) { } else { // State::second }  // 2 if (state == State::first) { } else if (state == State::second) { } else {   UNREACHABLE();   // UNREACHABLE expands to something like this:   // assert(false);   // __builtin_unreachable(); } 

These are the approaches that immediately come to mind. Maybe there are better ways. I usually use approach 1 but there may be a reason to do something completely different.

Note that “best” means a good balance of this question’s tags (clean, readable, fast, good practice).