void ParseRhsGroup(LhsDef parent) { do { ParseRhsGroupItem(parent); } while (CurrentToken != null); }
void ParseLhs(LhsDef def) { PushNode(def); do { CreateState(CurrentList); ParseCondition(); PopState(); } while (Advance() && !CurrentList[0].IsArrow); PopNode(); // ParseRhsGroup(def); }
void ParseRhsGroupItem(LhsDef parent) { RhsDef rhsDef = new RhsDef(); switch (CurrentList[0].Kind) { case TokenKind.LongSkinnyArrow: Advance(); //past (-->) parent.SuccessRhs = rhsDef; break; case TokenKind.NotLongSkinnyArrow: Advance(); //past (!-->) parent.FailureRhs = rhsDef; break; case TokenKind.LongFatArrow: Advance(); //past (==>) parent.TotalSuccessRhs = rhsDef; break; case TokenKind.NotLongFatArrow: Advance(); //past (!==>) parent.TotalFailureRhs = rhsDef; break; default: throw new Exception(); } do { CreateState(CurrentList); ParseRhsItem(rhsDef); PopState(); } while (Advance() && !CurrentList[0].IsArrow); }