<commit_before>lexer grammar BigDataScriptLexerRules;

//------------------------------------------------------------------------------
// Lexer
//------------------------------------------------------------------------------

//---
// Lexer Fragments
//---

fragment IntegerNumber
        : '0'
        | '1'..'9' ('0'..'9')*
        | '0' ('0'..'7')+
        | HexPrefix HexDigit+
        ;

fragment EscapeSequence
        : '\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\'' | '\\'
        | ('0'..'3') ('0'..'7') ('0'..'7')
        | ('0'..'7') ('0'..'7')
        | ('0'..'7')
        )
        ;

fragment EscapedNewLine : '\\' ( '\r' | '\n' | '\r\n');

fragment Exponent : ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ ;

fragment HexPrefix : '0x' | '0X' ;

fragment HexDigit : ('0'..'9'|'a'..'f'|'A'..'F') ;


fragment NonIntegerNumber
        : ('0' .. '9')+ '.' ('0' .. '9')* Exponent?
        | '.' ( '0' .. '9' )+ Exponent?
        | ('0' .. '9')+ Exponent
        | ('0' .. '9')+
        ;

fragment SysMultiLine : ( EscapedNewLine | ~( '\r' | '\n') )*;

//---
// Lexer tokens<commit_msg>Project updated<commit_after>lexer grammar BigDataScriptLexerRules;

//------------------------------------------------------------------------------
// Lexer
//------------------------------------------------------------------------------

//---
// Lexer Fragments
//---

fragment IntegerNumber
        : '0'
        | '1'..'9' ('0'..'9')*
        | '0' ('0'..'7')+
        | HexPrefix HexDigit+
        ;

fragment EscapeSequence
        : '\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\'' | '\\'
        | ('0'..'3') ('0'..'7') ('0'..'7')
        | ('0'..'7') ('0'..'7')
        | ('0'..'7')
        )
        ;

fragment EscapedNewLine : '\\' ( '\r' | '\n' | '\r\n');

fragment Exponent : ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ ;

fragment HexPrefix : '0x' | '0X' ;

fragment HexDigit : ('0'..'9'|'a'..'f'|'A'..'F') ;

fragment NonIntegerNumber
        : ('0' .. '9')+ '.' ('0' .. '9')* Exponent?
        | '.' ( '0' .. '9' )+ Exponent?
        | ('0' .. '9')+ Exponent
        | ('0' .. '9')+
        ;

fragment SysMultiLine : ( EscapedNewLine | ~( '\r' | '\n') )*;

//---
// Lexer tokens
{'fraction_non_alphanumeric': 0.41875284478834773, 'fraction_numerical': 0.032771961766044605, 'mean_word_length': 1.1319107662463628, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7468494', 'n_tokens_mistral': 841, 'n_tokens_neox': 827, 'n_words': 136}