MCPcopy
hub / github.com/antlr/antlr4 / stat

Method stat

runtime/Python3/tests/expr/ExprParser.py:423–478  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

421
422
423 def stat(self):
424
425 localctx = ExprParser.StatContext(self, self._ctx, self.state)
426 self.enterRule(localctx, 8, self.RULE_stat)
427 try:
428 self.state = 56
429 self._errHandler.sync(self)
430 la_ = self._interp.adaptivePredict(self._input,3,self._ctx)
431 if la_ == 1:
432 localctx = ExprParser.PrintExprContext(self, localctx)
433 self.enterOuterAlt(localctx, 1)
434 self.state = 43
435 self.expr(0)
436 self.state = 44
437 self.match(ExprParser.T__6)
438 pass
439
440 elif la_ == 2:
441 localctx = ExprParser.AssignContext(self, localctx)
442 self.enterOuterAlt(localctx, 2)
443 self.state = 46
444 self.match(ExprParser.ID)
445 self.state = 47
446 self.match(ExprParser.T__7)
447 self.state = 48
448 self.expr(0)
449 self.state = 49
450 self.match(ExprParser.T__6)
451 pass
452
453 elif la_ == 3:
454 localctx = ExprParser.RetContext(self, localctx)
455 self.enterOuterAlt(localctx, 3)
456 self.state = 51
457 self.match(ExprParser.RETURN)
458 self.state = 52
459 self.expr(0)
460 self.state = 53
461 self.match(ExprParser.T__6)
462 pass
463
464 elif la_ == 4:
465 localctx = ExprParser.BlankContext(self, localctx)
466 self.enterOuterAlt(localctx, 4)
467 self.state = 55
468 self.match(ExprParser.T__6)
469 pass
470
471
472 except RecognitionException as re:
473 localctx.exception = re
474 self._errHandler.reportError(self, re)
475 self._errHandler.recover(self, re)
476 finally:
477 self.exitRule()
478 return localctx
479
480

Callers 1

bodyMethod · 0.95

Calls 9

exprMethod · 0.95
syncMethod · 0.65
reportErrorMethod · 0.65
recoverMethod · 0.65
enterRuleMethod · 0.45
adaptivePredictMethod · 0.45
enterOuterAltMethod · 0.45
matchMethod · 0.45
exitRuleMethod · 0.45

Tested by

no test coverage detected