Пример #1
0
 def getATNWithBypassAlts(self):
     serializedAtn = self.getSerializedATN()
     if serializedAtn is None:
         raise UnsupportedOperationException("The current parser does not support an ATN with bypass alternatives.")
     result = self.bypassAltsAtnCache.get(serializedAtn, None)
     if result is None:
         deserializationOptions = ATNDeserializationOptions()
         deserializationOptions.generateRuleBypassTransitions = True
         result = ATNDeserializer(deserializationOptions).deserialize(serializedAtn)
         self.bypassAltsAtnCache[serializedAtn] = result
     return result
Пример #2
0
 def getATNWithBypassAlts(self):
     serializedAtn = self.getSerializedATN()
     if serializedAtn is None:
         raise UnsupportedOperationException("The current parser does not support an ATN with bypass alternatives.")
     result = self.bypassAltsAtnCache.get(serializedAtn, None)
     if result is None:
         deserializationOptions = ATNDeserializationOptions()
         deserializationOptions.generateRuleBypassTransitions = True
         result = ATNDeserializer(deserializationOptions).deserialize(serializedAtn)
         self.bypassAltsAtnCache[serializedAtn] = result
     return result