6.1.1.2.1.1.1.8.1.3. pycropml.transpiler.antlr_py.java.javaRules module¶
- class pycropml.transpiler.antlr_py.java.javaRules.Java_CymlRules[source]¶
Bases:
GeneralRule- binary_op = {'!=': '!=', '*': '*', '+': '+', '-': '-', '/': '/', '<': '<', '<=': '<=', '==': '==', '>': '>', '>=': '>=', 'and': '&&', 'not': '!', 'or': '||'}¶
- constant = {'math': {'pi': 'pi'}}¶
- functions = {'datetime': {'datetime': <function translateDateTime>}, 'io': {'print': <function translatePrint>, 'read': 'readLine', 'read_file': 'File.ReadAllText', 'write_file': 'File.WriteAllText'}, 'math': {'acos': 'acos', 'asin': 'asin', 'atan': 'atan', 'ceil': '(int) ceil', 'cos': 'cos', 'exp': 'exp', 'floor': 'floor', 'ln': 'log10', 'log': 'log', 'pow': 'pow', 'round': 'round', 'sin': 'sin', 'sqrt': 'sqrt', 'tan': 'tan'}, 'system': {'abs': 'abs', 'copy': <function translateCopy>, 'max': 'max', 'min': 'min', 'pow': <function translatePow>}}¶
- methods = {'array': {'append': 'append', 'len': 'len'}, 'dict': {'get': '.get', 'keys': <function translateDictkeys>, 'len': 'len', 'values': <function translateDictValues>}, 'float': {'float': '(double)', 'int': '(int)'}, 'int': {'float': '(double)'}, 'list': {'append': 'append', 'contains?': 'contains?', 'index': 'index', 'insert_at': 'insert_at', 'len': 'len', 'not contains?': 'not contains?', 'pop': 'pop', 'sum': 'sum'}, 'str': {'find': '.IndexOf', 'float': 'Double.', 'int': 'Integer.parseInt'}}¶
- types = {'Double': 'float', 'HashMap': 'dict', 'Integer': 'int', 'List': 'list', 'LocalDateTime': 'datetime', 'String': 'str', 'array': 'array', 'bool': 'boolean', 'double': 'float', 'float': 'float', 'int': 'int', 'tuple': 'tuple'}¶
- types2 = {'Date': 'LocalDateTime', 'bool': 'Boolean', 'datetime': 'LocalDateTime', 'float': 'Double', 'int': 'Integer', 'str': 'String'}¶
- unary_op = {'+': '+', '-': '-', 'not': '!', '~': '~'}¶