Example #1
0
 def getRuleInvocationStack(self, p:RuleContext=None):
     if p is None:
         p = self._ctx
     stack = list()
     while p is not None:
         # compute what follows who invoked us
         ruleIndex = p.getRuleIndex()
         if ruleIndex<0:
             stack.append("n/a")
         else:
             stack.append(self.ruleNames[ruleIndex])
         p = p.parentCtx
     return stack
Example #2
0
 def getRuleInvocationStack(self, p: RuleContext = None):
     if p is None:
         p = self._ctx
     stack = list()
     while p is not None:
         # compute what follows who invoked us
         ruleIndex = p.getRuleIndex()
         if ruleIndex < 0:
             stack.append("n/a")
         else:
             stack.append(self.ruleNames[ruleIndex])
         p = p.parentCtx
     return stack