<commit_before>/*
 * DEFAULT Operators
 * OP - Operators
 * UOP - Unary operators
**/

export const RESERVED_KEYWORDS = new Set([
    'sqrt', 'cbrt', 'root',
    'sin', 'cos', 'tan',
    'acos', 'asin', 'atan',
    'log',
    'has',
    'floor', 'ceil', 'round',
    'len', 'reverse', 'abs', 'repr',
    'sign', 'print',
    'and', 'or', 'xor',
    // States
    'var', 'const',
    'if', 'for', 'while',
    'func', 'class',
    // Literals
    'true', 'false', 'nil'
]);

export const EXCLUDE_META_ASSIGNMENT = new Set(['==', '!=', '<=', '>=' ]);

export const OP = [
'**', '*', '/', '%', '+', '-', '<=', '>=', '<', '>', '==',
'&', '|', '^',
'&&', '||',
'!=', '=', '+=', '-=', '*=', '/=', '^=', '%=', '&=', '|=', '<<', '>>', '<<=', '>>=',
'|>', '::',
'@"', 'has',
'and', 'or', 'xor',
'log', 'sign',
'root'
];

// Unary operators
export const UOP = [
'-', '+',
'!',
'|>',
'sqrt', 'cbrt',
'sin', 'cos', 'tan',
'acos', 'asin', 'atan',
'floor', 'ceil', 'round',
'len', 'reverse', 'abs', 'repr',
'print',
'log', 'sign',
'@"'
];

// TODO: how will the user modify this? no idea
//TODO: fix precedence
export const UNARY_PRECEDENCE = new Map([
    ['!', 20000],
    ['-', 20000],
    ['+', 20000],
    ['|>', 18000],
    ['@"', 17000],
    ['sqrt', 15000],
    ['cbrt', 15000],
    ['cos', 15000],
    ['sin', 15000],
    ['tan', 15000],
    ['acos', 15000],
    ['asin', 15000],
    ['atan', 15000],
    ['log', 15000],
    ['floor', 15000],
    ['ceil', 15000],
    ['abs', 15000],
    ['len', 15000],
    ['repr', 15000],
    ['reverse', 15000],
    ['round', 15000],
    ['sign', 15000],
    ['print', 0]
]);

export const PRECEDENCE = new Map([
    ['::', 15000],
    ['log', 14000],
    ['root', 14000],
    ['*', 13000],
    ['/', 13000],
    ['%', 13000],
    ['+', 12000],
    ['-', 12000],
    ['@"', 12000],
    ['<<', 11000],
    ['>>', 11000],
    ['<', 10000],
    ['>', 10000],
    ['<=', 10000],
    ['>=', 10000],
    ['sign', 10000],

    ['has', 90000],
    ['==', 9000],
    ['!=', 9000],

    ['&', 8000],
    ['xor', 7000],
    ['|', 6000],
    ['and', 5000],
    ['or', 4000],

    ['&&', 2001],
    ['||', 2000],


    ['+=', 1000],
    ['-=', 1000],
    ['*=', 1000],
    ['/=', 1000],
    ['%=', 1000],
    ['&=', 1000],
    ['|=', 1000],
    ['^=', 1000],
    ['<<=', 1000],
    ['>>=', 1000]
]);

export const RA_PRECEDENCE = new Map([
    ['**', 14000],<commit_msg>fix [precedence]: add binary precedence for '^'<commit_after>/*
 * DEFAULT Operators
 * OP - Operators
 * UOP - Unary operators
**/

export const RESERVED_KEYWORDS = new Set([
    'sqrt', 'cbrt', 'root',
    'sin', 'cos', 'tan',
    'acos', 'asin', 'atan',
    'log',
    'has',
    'floor', 'ceil', 'round',
    'len', 'reverse', 'abs', 'repr',
    'sign', 'print',
    'and', 'or', 'xor',
    // States
    'var', 'const',
    'if', 'for', 'while',
    'func', 'class',
    // Literals
    'true', 'false', 'nil'
]);

export const EXCLUDE_META_ASSIGNMENT = new Set(['==', '!=', '<=', '>=' ]);

export const OP = [
'**', '*', '/', '%', '+', '-', '<=', '>=', '<', '>', '==',
'&', '|', '^',
'&&', '||',
'!=', '=', '+=', '-=', '*=', '/=', '^=', '%=', '&=', '|=', '<<', '>>', '<<=', '>>=',
'|>', '::',
'@"', 'has',
'and', 'or', 'xor',
'log', 'sign',
'root'
];

// Unary operators
export const UOP = [
'-', '+',
'!',
'|>',
'sqrt', 'cbrt',
'sin', 'cos', 'tan',
'acos', 'asin', 'atan',
'floor', 'ceil', 'round',
'len', 'reverse', 'abs', 'repr',
'print',
'log', 'sign',
'@"'
];

// TODO: how will the user modify this? no idea
//TODO: fix precedence
export const UNARY_PRECEDENCE = new Map([
    ['!', 20000],
    ['-', 20000],
    ['+', 20000],
    ['|>', 18000],
    ['@"', 17000],
    ['sqrt', 15000],
    ['cbrt', 15000],
    ['cos', 15000],
    ['sin', 15000],
    ['tan', 15000],
    ['acos', 15000],
    ['asin', 15000],
    ['atan', 15000],
    ['log', 15000],
    ['floor', 15000],
    ['ceil', 15000],
    ['abs', 15000],
    ['len', 15000],
    ['repr', 15000],
    ['reverse', 15000],
    ['round', 15000],
    ['sign', 15000],
    ['print', 0]
]);

export const PRECEDENCE = new Map([
    ['::', 15000],
    ['log', 14000],
    ['root', 14000],
    ['*', 13000],
    ['/', 13000],
    ['%', 13000],
    ['+', 12000],
    ['-', 12000],
    ['@"', 12000],
    ['<<', 11000],
    ['>>', 11000],
    ['<', 10000],
    ['>', 10000],
    ['<=', 10000],
    ['>=', 10000],
    ['sign', 10000],

    ['has', 90000],
    ['==', 9000],
    ['!=', 9000],

    ['&', 8000],
    ['^', 7000],
    ['xor', 7000],
    ['|', 6000],
    ['and', 5000],
    ['or', 4000],

    ['&&', 2001],
    ['||', 2000],

    ['+=', 1000],
    ['-=', 1000],
    ['*=', 1000],
    ['/=', 1000],
    ['%=', 1000],
    ['&=', 1000],
    ['|=', 1000],
    ['^=', 1000],
    ['<<=', 1000],
    ['>>=', 1000]
]);

export const RA_PRECEDENCE = new Map([
    ['**', 14000],
{'fraction_non_alphanumeric': 0.3535625517812759, 'fraction_numerical': 0.1155758077879039, 'mean_word_length': 2.755054432348367, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3923901', 'n_tokens_mistral': 2510, 'n_tokens_neox': 1987, 'n_words': 402}