Ejemplo n.º 1
0
	} // transitions

	public override state shiftNonterm(string nonterm, int count, Coordinate end, string rule, state rightmost) {
		nonterminalState s;
		update(count);
		switch(nonterm) {
		default: throw new System.Exception("\""+nonterm+"\":"+rule);
		case "attributesopt": {
				bool reject = false;
				s = new itemSet_426(this, end, rule, rightmost, reject, count);
				if (memo1 != null) {
					memo1.add(s, count);
					return null;
				} else {
					memo1 = s;
					return s;
				}
			}
		case "type-declaration": {
				bool reject = false;
				s = new itemSet_427(this, end, rule, rightmost, reject, count);
				if (memo2 != null) {
					memo2.add(s, count);
					return null;
				} else {
					memo2 = s;
					return s;
				}
			}
		case "delegate-declaration": {
				bool reject = false;
				s = new itemSet_25(this, end, rule, rightmost, reject, count);
				if (memo3 != null) {
					memo3.add(s, count);
					return null;
				} else {
					memo3 = s;
					return s;
				}
			}
		case "event-declaration": {
				bool reject = false;
				s = new itemSet_428(this, end, rule, rightmost, reject, count);
				if (memo4 != null) {
					memo4.add(s, count);
					return null;
				} else {
					memo4 = s;
					return s;
				}
			}
		case "indexer-declaration": {
				bool reject = false;
				s = new itemSet_429(this, end, rule, rightmost, reject, count);
				if (memo5 != null) {
					memo5.add(s, count);
					return null;
				} else {
					memo5 = s;
					return s;
				}
			}
		case "struct-declaration": {
				bool reject = false;
				s = new itemSet_26(this, end, rule, rightmost, reject, count);
				if (memo6 != null) {
					memo6.add(s, count);
					return null;
				} else {
					memo6 = s;
					return s;
				}
			}
		case "class-declaration": {
				bool reject = false;
				s = new itemSet_27(this, end, rule, rightmost, reject, count);
				if (memo7 != null) {
					memo7.add(s, count);
					return null;
				} else {
					memo7 = s;
					return s;
				}
			}
		case "class-member-declaration": {
				bool reject = false;
				s = new itemSet_430(this, end, rule, rightmost, reject, count);
				if (memo8 != null) {
					memo8.add(s, count);
					return null;
				} else {
					memo8 = s;
					return s;
				}
			}
		case "method-header": {
				bool reject = false;
				s = new itemSet_414(this, end, rule, rightmost, reject, count);
				if (memo9 != null) {
					memo9.add(s, count);
					return null;
				} else {
					memo9 = s;
					return s;
				}
			}
		case "operator-declaration": {
				bool reject = false;
				s = new itemSet_431(this, end, rule, rightmost, reject, count);
				if (memo10 != null) {
					memo10.add(s, count);
					return null;
				} else {
					memo10 = s;
					return s;
				}
			}
		case "class-member-declarations": {
				bool reject = false;
				s = new itemSet_432(this, end, rule, rightmost, reject, count);
				if (memo11 != null) {
					memo11.add(s, count);
					return null;
				} else {
					memo11 = s;
					return s;
				}
			}
		case "constant-declaration": {
				bool reject = false;
				s = new itemSet_433(this, end, rule, rightmost, reject, count);
				if (memo12 != null) {
					memo12.add(s, count);
					return null;
				} else {
					memo12 = s;
					return s;
				}
			}
		case "constructor-declaration": {
				bool reject = false;
				s = new itemSet_434(this, end, rule, rightmost, reject, count);
				if (memo13 != null) {
					memo13.add(s, count);
					return null;
				} else {
					memo13 = s;
					return s;
				}
			}
		case "method-declaration": {
				bool reject = false;
				s = new itemSet_435(this, end, rule, rightmost, reject, count);
				if (memo14 != null) {
					memo14.add(s, count);
					return null;
				} else {
					memo14 = s;
					return s;
				}
			}
		case "class-member-declarationsopt": {
				bool reject = false;
				s = new itemSet_436(this, end, rule, rightmost, reject, count);
				if (memo15 != null) {
					memo15.add(s, count);
					return null;
				} else {
					memo15 = s;
					return s;
				}
			}
		case "attributes": {
				bool reject = false;
				s = new itemSet_29(this, end, rule, rightmost, reject, count);
				if (memo16 != null) {
					memo16.add(s, count);
					return null;
				} else {
					memo16 = s;
					return s;
				}
			}
		case "destructor-declaration": {
				bool reject = false;
				s = new itemSet_437(this, end, rule, rightmost, reject, count);
				if (memo17 != null) {
					memo17.add(s, count);
					return null;
				} else {
					memo17 = s;
					return s;
				}
			}
		case "attribute-section": {
				bool reject = false;
				s = new itemSet_30(this, end, rule, rightmost, reject, count);
				if (memo18 != null) {
					memo18.add(s, count);
					return null;
				} else {
					memo18 = s;
					return s;
				}
			}
		case "property-declaration": {
				bool reject = false;
				s = new itemSet_438(this, end, rule, rightmost, reject, count);
				if (memo19 != null) {
					memo19.add(s, count);
					return null;
				} else {
					memo19 = s;
					return s;
				}
			}
		case "field-declaration": {
				bool reject = false;
				s = new itemSet_439(this, end, rule, rightmost, reject, count);
				if (memo20 != null) {
					memo20.add(s, count);
					return null;
				} else {
					memo20 = s;
					return s;
				}
			}
		case "interface-declaration": {
				bool reject = false;
				s = new itemSet_33(this, end, rule, rightmost, reject, count);
				if (memo21 != null) {
					memo21.add(s, count);
					return null;
				} else {
					memo21 = s;
					return s;
				}
			}
		case "attribute-sections": {
				bool reject = false;
				s = new itemSet_34(this, end, rule, rightmost, reject, count);
				if (memo22 != null) {
					memo22.add(s, count);
					return null;
				} else {
					memo22 = s;
					return s;
				}
			}
		case "enum-declaration": {
				bool reject = false;
				s = new itemSet_37(this, end, rule, rightmost, reject, count);
				if (memo23 != null) {
					memo23.add(s, count);
					return null;
				} else {
					memo23 = s;
					return s;
				}
			}
		} // switch
	} // shiftNonterm
Ejemplo n.º 2
0
	} // transitions

	public override state shiftNonterm(string nonterm, int count, Coordinate end, string rule, state rightmost) {
		nonterminalState s;
		update(count);
		switch(nonterm) {
		default: throw new System.Exception("\""+nonterm+"\":"+rule);
		case "attributesopt": {
				bool reject = false;
				s = new itemSet_23(this, end, rule, rightmost, reject, count);
				if (memo1 != null) {
					memo1.add(s, count);
					return null;
				} else {
					memo1 = s;
					return s;
				}
			}
		case "type-declaration": {
				bool reject = false;
				s = new itemSet_24(this, end, rule, rightmost, reject, count);
				if (memo2 != null) {
					memo2.add(s, count);
					return null;
				} else {
					memo2 = s;
					return s;
				}
			}
		case "delegate-declaration": {
				bool reject = false;
				s = new itemSet_25(this, end, rule, rightmost, reject, count);
				if (memo3 != null) {
					memo3.add(s, count);
					return null;
				} else {
					memo3 = s;
					return s;
				}
			}
		case "struct-declaration": {
				bool reject = false;
				s = new itemSet_26(this, end, rule, rightmost, reject, count);
				if (memo4 != null) {
					memo4.add(s, count);
					return null;
				} else {
					memo4 = s;
					return s;
				}
			}
		case "class-declaration": {
				bool reject = false;
				s = new itemSet_27(this, end, rule, rightmost, reject, count);
				if (memo5 != null) {
					memo5.add(s, count);
					return null;
				} else {
					memo5 = s;
					return s;
				}
			}
		case "namespace-member-declarationsopt": {
				bool reject = false;
				s = new itemSet_232(this, end, rule, rightmost, reject, count);
				if (memo6 != null) {
					memo6.add(s, count);
					return null;
				} else {
					memo6 = s;
					return s;
				}
			}
		case "attributes": {
				bool reject = false;
				s = new itemSet_29(this, end, rule, rightmost, reject, count);
				if (memo7 != null) {
					memo7.add(s, count);
					return null;
				} else {
					memo7 = s;
					return s;
				}
			}
		case "attribute-section": {
				bool reject = false;
				s = new itemSet_30(this, end, rule, rightmost, reject, count);
				if (memo8 != null) {
					memo8.add(s, count);
					return null;
				} else {
					memo8 = s;
					return s;
				}
			}
		case "namespace-member-declaration": {
				bool reject = false;
				s = new itemSet_31(this, end, rule, rightmost, reject, count);
				if (memo9 != null) {
					memo9.add(s, count);
					return null;
				} else {
					memo9 = s;
					return s;
				}
			}
		case "interface-declaration": {
				bool reject = false;
				s = new itemSet_33(this, end, rule, rightmost, reject, count);
				if (memo10 != null) {
					memo10.add(s, count);
					return null;
				} else {
					memo10 = s;
					return s;
				}
			}
		case "attribute-sections": {
				bool reject = false;
				s = new itemSet_34(this, end, rule, rightmost, reject, count);
				if (memo11 != null) {
					memo11.add(s, count);
					return null;
				} else {
					memo11 = s;
					return s;
				}
			}
		case "namespace-declaration": {
				bool reject = false;
				s = new itemSet_35(this, end, rule, rightmost, reject, count);
				if (memo12 != null) {
					memo12.add(s, count);
					return null;
				} else {
					memo12 = s;
					return s;
				}
			}
		case "namespace-member-declarations": {
				bool reject = false;
				s = new itemSet_36(this, end, rule, rightmost, reject, count);
				if (memo13 != null) {
					memo13.add(s, count);
					return null;
				} else {
					memo13 = s;
					return s;
				}
			}
		case "enum-declaration": {
				bool reject = false;
				s = new itemSet_37(this, end, rule, rightmost, reject, count);
				if (memo14 != null) {
					memo14.add(s, count);
					return null;
				} else {
					memo14 = s;
					return s;
				}
			}
		} // switch
	} // shiftNonterm