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

Method postfixExpression

runtime/Python3/tests/parser/cparser.py:1351–1542  ·  view source on GitHub ↗
(self, _p:int=0)

Source from the content-addressed store, hash-verified

1349
1350
1351 def postfixExpression(self, _p:int=0):
1352 _parentctx = self._ctx
1353 _parentState = self.state
1354 localctx = CParser.PostfixExpressionContext(self, self._ctx, _parentState)
1355 _prevctx = localctx
1356 _startState = 8
1357 self.enterRecursionRule(localctx, 8, self.RULE_postfixExpression, _p)
1358 self._la = 0 # Token type
1359 try:
1360 self.enterOuterAlt(localctx, 1)
1361 self.state = 264
1362 la_ = self._interp.adaptivePredict(self._input,5,self._ctx)
1363 if la_ == 1:
1364 self.state = 231
1365 self.primaryExpression()
1366 pass
1367
1368 elif la_ == 2:
1369 self.state = 232
1370 self.match(CParser.LeftParen)
1371 self.state = 233
1372 self.typeName()
1373 self.state = 234
1374 self.match(CParser.RightParen)
1375 self.state = 235
1376 self.match(CParser.LeftBrace)
1377 self.state = 236
1378 self.initializerList(0)
1379 self.state = 237
1380 self.match(CParser.RightBrace)
1381 pass
1382
1383 elif la_ == 3:
1384 self.state = 239
1385 self.match(CParser.LeftParen)
1386 self.state = 240
1387 self.typeName()
1388 self.state = 241
1389 self.match(CParser.RightParen)
1390 self.state = 242
1391 self.match(CParser.LeftBrace)
1392 self.state = 243
1393 self.initializerList(0)
1394 self.state = 244
1395 self.match(CParser.Comma)
1396 self.state = 245
1397 self.match(CParser.RightBrace)
1398 pass
1399
1400 elif la_ == 4:
1401 self.state = 247
1402 self.match(CParser.T__0)
1403 self.state = 248
1404 self.match(CParser.LeftParen)
1405 self.state = 249
1406 self.typeName()
1407 self.state = 250
1408 self.match(CParser.RightParen)

Callers 1

unaryExpressionMethod · 0.95

Calls 15

primaryExpressionMethod · 0.95
typeNameMethod · 0.95
initializerListMethod · 0.95
expressionMethod · 0.95
LTMethod · 0.65
syncMethod · 0.65
LAMethod · 0.65
reportErrorMethod · 0.65
recoverMethod · 0.65
enterRecursionRuleMethod · 0.45

Tested by

no test coverage detected