7.1.1.2.1.1.1.3.1.4. pycropml.transpiler.antlr_py.csharp.csharpRules module

class pycropml.transpiler.antlr_py.csharp.csharpRules.Cs_CymlRules[source]

Bases: GeneralRule

binary_op = {'!=': '!=', '&': '&', '*': '*', '+': '+', '-': '-', '/': '/', '<': '<', '<=': '<=', '==': '==', '>': '>', '>=': '>=', 'and': '&&', 'not': '!', 'or': '||'}
constant = {'Math': {'PI': 'pi'}}
functions = {'Math': {'Abs': 'system.abs', 'Acos': 'math.acos', 'Asin': 'math.asin', 'Atan': 'math.atan', 'Ceiling': <function translateCeil>, 'Cos': 'math.cos', 'Exp': 'math.exp', 'Log': 'math.log', 'Max': 'system.max', 'Min': 'system.min', 'Pow': 'math.pow', 'Round': 'math.round', 'Sin': 'math.sin', 'Sqrt': 'math.sqrt', 'Tan': 'math.tan'}, 'datetime': {'new DateTime': 'datetime '}, 'io': {'Console.ReadLine': 'read', 'Console.WriteLine': 'print', 'File.ReadAllText': 'read_file', 'File.WriteAllText': 'write_file'}, 'system': {'copy': 'copy'}}
methods = {'List': {'!Contains': 'not contains?', '.Add': 'append', '.Contains': 'contains?', '.IndexOf': 'index', '.Insert': 'insert_at', '.RemoveAt': 'pop', 'Sum': 'sum', 'length': 'len', 'linq': 'map'}, 'array': {'.Add': 'append', 'len': 'len'}, 'dict': {'get': 'get', 'keys': 'keys', 'len': 'len', 'values': 'value'}, 'float': {'int': 'int'}, 'int': {'float': 'float'}, 'str': {'.IndexOf': 'find', 'int': 'int'}}
types = {'DateTime': 'datetime', 'Dictionary': 'dict', 'Double': 'float', 'Int32': 'int', 'List': 'list', 'array': 'array', 'bool': 'bool', 'double': 'float', 'float': 'float', 'int': 'int', 'string': 'str', 'tuple': 'tuple', 'unknown': 'unknown'}
unary_op = {'+': '+', '-': '-', 'not': '!', '~': '~'}
pycropml.transpiler.antlr_py.csharp.csharpRules.translateCeil(node, *z)[source]