Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
class RecordStart(Action):
pass
class RecordEnd(Action):
pass
class FieldStart(Action):
def __init__(self, field_name):
self.field_name = field_name
class FieldEnd(Action):
pass
class Action(Symbol):
pass
class EnumLabels(Action):
def __init__(self, labels):
self.labels = labels
class UnionEnd(Action):
pass
class RecordStart(Action):
pass
class RecordEnd(Action):
pass
class FieldStart(Action):
def __init__(self, field_name):
self.field_name = field_name
class FieldEnd(Action):
pass
def __init__(self, symbols, labels):
Symbol.__init__(self, symbols)
self.labels = labels
def get_symbol(self, index):
return self.production[index]
def get_label(self, index):
return self.labels[index]
class Action(Symbol):
pass
class EnumLabels(Action):
def __init__(self, labels):
self.labels = labels
class UnionEnd(Action):
pass
class RecordStart(Action):
pass
class RecordEnd(Action):
pass
return self.production[index]
def get_label(self, index):
return self.labels[index]
class Action(Symbol):
pass
class EnumLabels(Action):
def __init__(self, labels):
self.labels = labels
class UnionEnd(Action):
pass
class RecordStart(Action):
pass
class RecordEnd(Action):
pass
class FieldStart(Action):
def __init__(self, field_name):
self.field_name = field_name
self.labels = labels
class UnionEnd(Action):
pass
class RecordStart(Action):
pass
class RecordEnd(Action):
pass
class FieldStart(Action):
def __init__(self, field_name):
self.field_name = field_name
class FieldEnd(Action):
pass
def flush(self):
while len(self.stack) > 0:
top = self.stack.pop()
if isinstance(top, Action) or isinstance(top, Root):
self.action_function(top)
else:
raise Exception("Internal Parser Exception: {}".format(top))
class EnumLabels(Action):
def __init__(self, labels):
self.labels = labels
class UnionEnd(Action):
pass
class RecordStart(Action):
pass
class RecordEnd(Action):
pass
class FieldStart(Action):
def __init__(self, field_name):
self.field_name = field_name
class FieldEnd(Action):
pass
def advance(self, symbol):
while True:
top = self.stack.pop()
if top == symbol:
return top
elif isinstance(top, Action):
self.action_function(top)
elif isinstance(top, Terminal):
raise Exception("Internal Parser Exception: {}".format(top))
elif isinstance(top, Repeater) and top.end == symbol:
return symbol
else:
self.stack.extend(top.production)