Exemplo n.º 1
0
 def __init__(self, value):
     Token.__init__(self, value)
     self.supported_neighbors = '([+]|[-]|[*]|[=]|[!]|[>]|[<]|[\/]|[;]|[,]|[.]|[&]|[|]|[(]|[)]|[{]|[}]|[\[]|[\]])'
     self.reserved_words = ("var", "const", "typedef", "struct", "extends",
                            "procedure", "function", "start", "return",
                            "if", "else", "then", "while", "read", "print",
                            "int", "real", "boolean", "string", "true",
                            "false", "global", "local")
     self.value = value
Exemplo n.º 2
0
 def __init__(self, value):
     Token.__init__(self, value)
Exemplo n.º 3
0
 def __init__(self, value):
     Token.__init__(self, value)
     self.error = True
     self.unknown_symbol = False
Exemplo n.º 4
0
 def __init__(self, value):
     Token.__init__(self, value)
     self.supported_neighbors = '([a-z]|[A-Z]|[0-9]|[{]|[}]|["]|[;]|[_]|[=]|[)]|[(])|[+]|[-]|[!]|[/]'
     self.value = value
Exemplo n.º 5
0
 def __init__(self, value):
     Token.__init__(self, value)
     self.supported_neighbors = '([a-z]|[A-Z]|[0-9]|[;]|[+]|[-]|["]|[(])'
     self.supported_value = ['==', '!=', '>=', '<=']
Exemplo n.º 6
0
 def __init__(self, value):
     Token.__init__(self, value)
     self.supported_neighbors = '([a-z]|[A-Z]|[0-9]|[(])'
     self.supported_value = ['&&', '||']
Exemplo n.º 7
0
 def __init__(self, value):
     Token.__init__(self, value)
     self.point_delimiter = False
     self.supported_neighbors = '([+]|[-]|[*]|[=]|[!]|[>]|[<]|[\/]|[;]|[,]|[(]|[)]|[\[]|[\]])'
Exemplo n.º 8
0
 def __init__(self, value):
     Token.__init__(self, value)
     self.supported_neighbors = '([a-z]|[A-Z]|[0-9]|[(]|[)]|[;]|[\[]|[\]])'
     self.supported_value = ['++', '--']