public CanonicalContext canonical() { CanonicalContext _localctx = new CanonicalContext(Context, State); EnterRule(_localctx, 2, RULE_canonical); int _la; try { State = 29; ErrorHandler.Sync(this); switch (Interpreter.AdaptivePredict(TokenStream, 3, Context)) { case 1: _localctx = new CanonicalPolynomContext(_localctx); EnterOuterAlt(_localctx, 1); { State = 14; ErrorHandler.Sync(this); _la = TokenStream.LA(1); do { { { State = 13; polynomial(); } } State = 16; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << INT) | (1L << DEC) | (1L << VAR) | (1L << SIGN))) != 0)); } break; case 2: _localctx = new EqualityContext(_localctx); EnterOuterAlt(_localctx, 2); { State = 19; ErrorHandler.Sync(this); _la = TokenStream.LA(1); do { { { State = 18; polynomial(); } } State = 21; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << INT) | (1L << DEC) | (1L << VAR) | (1L << SIGN))) != 0)); State = 23; Match(EQUAL); State = 25; ErrorHandler.Sync(this); _la = TokenStream.LA(1); do { { { State = 24; polynomial(); } } State = 27; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << INT) | (1L << DEC) | (1L << VAR) | (1L << SIGN))) != 0)); } break; } } catch (RecognitionException re) { _localctx.exception = re; ErrorHandler.ReportError(this, re); ErrorHandler.Recover(this, re); } finally { ExitRule(); } return(_localctx); }
public CanonicalPolynomContext(CanonicalContext context) { CopyFrom(context); }
public EqualityContext(CanonicalContext context) { CopyFrom(context); }
public virtual void CopyFrom(CanonicalContext context) { base.CopyFrom(context); }