From f1dd78f32a52b35a20a754165a902dfa141c1edc Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Sat, 11 Jan 2020 15:45:28 -0800 Subject: [PATCH] Only compute line indentation info at necessary points in the auto-indent routine --- 4ed.cpp | 2 +- custom/4coder_auto_indent.cpp | 39 +- custom/4coder_helper.cpp | 24 +- custom/generated/command_metadata.h | 8 +- custom/generated/lexer_cpp.cpp | 9964 ++++++++++----------- custom/languages/4coder_cpp_lexer_gen.cpp | 1 - 6 files changed, 5030 insertions(+), 5008 deletions(-) diff --git a/4ed.cpp b/4ed.cpp index 7f10ef54..155c53a5 100644 --- a/4ed.cpp +++ b/4ed.cpp @@ -730,7 +730,7 @@ App_Step_Sig(app_step){ // NOTE(allen): if the exit signal has been sent, run the exit hook. if (!models->keep_playing || input->trying_to_kill){ co_send_core_event(tctx, models, CoreCode_TryExit); - models->keep_playing = true; + models->keep_playing = true; } // NOTE(allen): rendering diff --git a/custom/4coder_auto_indent.cpp b/custom/4coder_auto_indent.cpp index d05d98f8..b672edd4 100644 --- a/custom/4coder_auto_indent.cpp +++ b/custom/4coder_auto_indent.cpp @@ -15,7 +15,7 @@ make_batch_from_indentations(Application_Links *app, Arena *arena, Buffer_ID buf line_number <= lines.max; ++line_number){ i64 line_start_pos = get_line_start_pos(app, buffer, line_number); - Indent_Info indent_info = get_indent_info_line_start(app, buffer, line_start_pos, tab_width); + Indent_Info indent_info = get_indent_info_line_number_and_start(app, buffer, line_number, line_start_pos, tab_width); i64 correct_indentation = shifted_indentations[line_number]; if (indent_info.is_blank && HasFlag(flags, Indent_ClearLine)){ @@ -63,6 +63,7 @@ set_line_indents(Application_Links *app, Arena *arena, Buffer_ID buffer, Range_i internal Token* find_anchor_token(Application_Links *app, Buffer_ID buffer, Token_Array *tokens, i64 invalid_line){ + ProfileScope(app, "find anchor token"); Token *result = 0; if (tokens != 0 && tokens->tokens != 0){ @@ -148,6 +149,7 @@ indent__unfinished_statement(Token *token, Nest *current_nest){ internal i64* get_indentation_array(Application_Links *app, Arena *arena, Buffer_ID buffer, Range_i64 lines, Indent_Flag flags, i32 tab_width, i32 indent_width){ + ProfileScope(app, "get indentation array"); i64 count = lines.max - lines.min + 1; i64 *indentations = push_array(arena, i64, count); i64 *shifted_indentations = indentations - lines.first; @@ -174,11 +176,31 @@ get_indentation_array(Application_Links *app, Arena *arena, Buffer_ID buffer, Ra i64 actual_indent = 0; b32 in_unfinished_statement = false; + i64 line_where_token_starts = 0; + i64 line_start_pos = 0; + i64 line_one_past_last_pos = 0; + Indent_Info line_indent_info = {}; + for (;;){ Token *token = token_it_read(&token_it); - i64 line_where_token_starts = get_line_number_from_pos(app, buffer, token->pos); - i64 line_start_pos = get_line_start_pos(app, buffer, line_where_token_starts); - Indent_Info line_indent_info = get_indent_info_line_start(app, buffer, line_start_pos, tab_width); + + if (line_where_token_starts == 0 || + token->pos >= line_one_past_last_pos){ + + { + line_where_token_starts = get_line_number_from_pos(app, buffer, token->pos); + } + { + line_start_pos = get_line_start_pos(app, buffer, line_where_token_starts); + } + { + line_one_past_last_pos = get_line_end_pos(app, buffer, line_where_token_starts); + } + { + Range_i64 range = Ii64(line_start_pos, line_one_past_last_pos); + line_indent_info = get_indent_info_range(app, buffer, range, tab_width); + } + } i64 current_indent = 0; if (nest != 0){ @@ -255,9 +277,9 @@ get_indentation_array(Application_Links *app, Arena *arena, Buffer_ID buffer, Ra } #define EMIT(N) \ - Stmnt(if (lines.first <= line_it){shifted_indentations[line_it]=N;} \ - if (line_it == lines.end){goto finished;} \ - actual_indent = N; ) +Stmnt(if (lines.first <= line_it){shifted_indentations[line_it]=N;} \ +if (line_it == lines.end){goto finished;} \ +actual_indent = N; ) i64 line_it = line_last_indented; for (;line_it < line_where_token_starts;){ @@ -275,7 +297,7 @@ get_indentation_array(Application_Links *app, Arena *arena, Buffer_ID buffer, Ra for (;line_it < line_where_token_ends;){ line_it += 1; i64 line_it_start_pos = get_line_start_pos(app, buffer, line_it); - Indent_Info line_it_indent_info = get_indent_info_line_start(app, buffer, line_it_start_pos, tab_width); + Indent_Info line_it_indent_info = get_indent_info_line_number_and_start(app, buffer, line_it, line_it_start_pos, tab_width); i64 new_indent = line_it_indent_info.indent_pos + line_where_token_starts_shift; new_indent = clamp_bot(0, new_indent); EMIT(new_indent); @@ -395,6 +417,7 @@ CUSTOM_DOC("Auto-indents the range between the cursor and the mark.") CUSTOM_COMMAND_SIG(write_text_and_auto_indent) CUSTOM_DOC("Inserts text and auto-indents the line on which the cursor sits if any of the text contains 'layout punctuation' such as ;:{}()[]# and new lines.") { + ProfileScope(app, "write and auto indent"); User_Input in = get_current_input(app); String_Const_u8 insert = to_writable(&in); if (insert.str != 0 && insert.size > 0){ diff --git a/custom/4coder_helper.cpp b/custom/4coder_helper.cpp index d074e891..c4246f52 100644 --- a/custom/4coder_helper.cpp +++ b/custom/4coder_helper.cpp @@ -68,15 +68,15 @@ character_predicate_from_function(Character_Predicate_Function *func){ v[bit_index] = func((u8)i); } predicate.b[byte_index] = ( - (v[0] << 0) | - (v[1] << 1) | - (v[2] << 2) | - (v[3] << 3) | - (v[4] << 4) | - (v[5] << 5) | - (v[6] << 6) | - (v[7] << 7) - ); + (v[0] << 0) | + (v[1] << 1) | + (v[2] << 2) | + (v[3] << 3) | + (v[4] << 4) | + (v[5] << 5) | + (v[6] << 6) | + (v[7] << 7) + ); byte_index += 1; } return(predicate); @@ -797,7 +797,7 @@ enclose_boundary(Application_Links *app, Buffer_ID buffer, Range_i64 range, internal Range_i64 left_enclose_boundary(Application_Links *app, Buffer_ID buffer, Range_i64 range, - Boundary_Function *func){ + Boundary_Function *func){ i64 new_min = func(app, buffer, Side_Min, Scan_Backward, range.min + 1); i64 new_min_check = func(app, buffer, Side_Max, Scan_Backward, range.min + 1); if (new_min_check <= new_min && new_min < range.min){ @@ -1227,8 +1227,8 @@ get_indent_info_range(Application_Links *app, Buffer_ID buffer, Range_i64 range, } internal Indent_Info -get_indent_info_line_start(Application_Links *app, Buffer_ID buffer, i64 line_start, i32 tab_width){ - i64 end = get_line_side_pos_from_pos(app, buffer, line_start, Side_Max); +get_indent_info_line_number_and_start(Application_Links *app, Buffer_ID buffer, i64 line_number, i64 line_start, i32 tab_width){ + i64 end = get_line_side_pos(app, buffer, line_number, Side_Max); return(get_indent_info_range(app, buffer, Ii64(line_start, end), tab_width)); } diff --git a/custom/generated/command_metadata.h b/custom/generated/command_metadata.h index b4831970..7064e503 100644 --- a/custom/generated/command_metadata.h +++ b/custom/generated/command_metadata.h @@ -252,9 +252,9 @@ i32 line_number; }; static Command_Metadata fcoder_metacmd_table[229] = { { PROC_LINKS(allow_mouse, 0), false, "allow_mouse", 11, "Shows the mouse and causes all mouse input to be processed normally.", 68, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 409 }, -{ PROC_LINKS(auto_indent_line_at_cursor, 0), false, "auto_indent_line_at_cursor", 26, "Auto-indents the line on which the cursor sits.", 47, "w:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 375 }, -{ PROC_LINKS(auto_indent_range, 0), false, "auto_indent_range", 17, "Auto-indents the range between the cursor and the mark.", 55, "w:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 385 }, -{ PROC_LINKS(auto_indent_whole_file, 0), false, "auto_indent_whole_file", 22, "Audo-indents the entire current buffer.", 39, "w:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 366 }, +{ PROC_LINKS(auto_indent_line_at_cursor, 0), false, "auto_indent_line_at_cursor", 26, "Auto-indents the line on which the cursor sits.", 47, "w:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 397 }, +{ PROC_LINKS(auto_indent_range, 0), false, "auto_indent_range", 17, "Auto-indents the range between the cursor and the mark.", 55, "w:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 407 }, +{ PROC_LINKS(auto_indent_whole_file, 0), false, "auto_indent_whole_file", 22, "Audo-indents the entire current buffer.", 39, "w:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 388 }, { PROC_LINKS(backspace_alpha_numeric_boundary, 0), false, "backspace_alpha_numeric_boundary", 32, "Delete characters between the cursor position and the first alphanumeric boundary to the left.", 94, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 154 }, { PROC_LINKS(backspace_char, 0), false, "backspace_char", 14, "Deletes the character to the left of the cursor.", 48, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 96 }, { PROC_LINKS(basic_change_active_panel, 0), false, "basic_change_active_panel", 25, "Change the currently active panel, moving to the panel with the next highest view_id. Will not skipe the build panel if it is open.", 132, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 611 }, @@ -475,7 +475,7 @@ static Command_Metadata fcoder_metacmd_table[229] = { { PROC_LINKS(write_hack, 0), false, "write_hack", 10, "At the cursor, insert a '// HACK' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 82 }, { PROC_LINKS(write_note, 0), false, "write_note", 10, "At the cursor, insert a '// NOTE' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 88 }, { PROC_LINKS(write_space, 0), false, "write_space", 11, "Inserts a space.", 16, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 67 }, -{ PROC_LINKS(write_text_and_auto_indent, 0), false, "write_text_and_auto_indent", 26, "Inserts text and auto-indents the line on which the cursor sits if any of the text contains 'layout punctuation' such as ;:{}()[]# and new lines.", 145, "w:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 395 }, +{ PROC_LINKS(write_text_and_auto_indent, 0), false, "write_text_and_auto_indent", 26, "Inserts text and auto-indents the line on which the cursor sits if any of the text contains 'layout punctuation' such as ;:{}()[]# and new lines.", 145, "w:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 417 }, { PROC_LINKS(write_text_input, 0), false, "write_text_input", 16, "Inserts whatever text was used to trigger this command.", 55, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 59 }, { PROC_LINKS(write_todo, 0), false, "write_todo", 10, "At the cursor, insert a '// TODO' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\custom\\4coder_combined_write_commands.cpp", 53, 76 }, { PROC_LINKS(write_underscore, 0), false, "write_underscore", 16, "Inserts an underscore.", 22, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 73 }, diff --git a/custom/generated/lexer_cpp.cpp b/custom/generated/lexer_cpp.cpp index 150e5fbf..77bf3f7b 100644 --- a/custom/generated/lexer_cpp.cpp +++ b/custom/generated/lexer_cpp.cpp @@ -44,37 +44,37 @@ lexeme_table_lookup(u64 *hash_array, String_Const_u8 *key_array, #endif u64 main_keys_hash_array[121] = { -0x3165da52e461ac3f,0x0000000000000000,0x3165da52f92661bd,0x0000000000000000, -0x0000000000000000,0x0000000000000000,0x3165da52f9fa6ddb,0xbfc3c777d05a650b, -0x3165da52ea1d2cb3,0x0000000000000000,0x0000000000000000,0x0000000000000000, -0x0000000000000000,0xa47e4b3347ca768b,0xa47e4b0d60643265,0xf9ddaa09147bac4d, -0x95351611c4501ef3,0x0000000000000000,0x0000000000000000,0xa47e4b33693ada65, -0x0000000000000000,0xdb05013ca08bb8f1,0xf9ddaa091485019b,0xbfc3dfcbf5462bb3, -0x0000000000000000,0x3165da52f85e6961,0x0000000000000000,0xdb0563922ce5394d, -0x0000000000000000,0xa47e4b334bfc993f,0xdb02e2748a4d7e43,0x0000000000000000, -0xb4c81ca554c806f3,0x0000000000000000,0x3165da52e0f88b5b,0x501eeeb814fbf821, -0x0000000000000000,0xdb0503951fae6cc1,0x0000000000000000,0x0000000000000000, -0xbfc3de349dfab331,0x0000000000000000,0x0000000000000000,0x3165da52f092830f, -0xa47e4b300b3f05d3,0xbfc3dfcbf546362d,0xdb05125809d1c12f,0x0000000000000000, -0xed66c2eeb45a9c73,0x0000000000000000,0xf9ddaa0914eaa03f,0x77f5a2bcd06af3a3, -0xa47e4b0cab3b440f,0x0000000000000000,0x0000000000000000,0x3165da52ebde8871, -0xa47e4b0cab0869b5,0x3165da52e5b576b7,0x0000000000000000,0x0000000000000000, -0xa47e4b336935d383,0x0000000000000000,0x0000000000000000,0xa47e4b30efc0220b, -0x0000000000000000,0x0000000000000000,0x501eeeb814fabe67,0xbfc3dfefa2fc3a77, -0x0000000000000000,0x0000000000000000,0x0000000000000000,0xf9ddaa0914bb0bf9, -0x0000000000000000,0xf9ddaa09148a58bb,0x0000000000000000,0xdb02e323971f6e8d, -0x501eeeb814fa0161,0xa9cef01e4d45a29b,0x501eeeb814fb939f,0x0000000000000000, -0xdb0517ba16b3ab83,0xbfc3dfb0ab021849,0xdb0541265bb691e9,0xbfc3df66cacb41a5, -0xa47e4b325526bb31,0x0000000000000000,0xeca54fbddbbe35d5,0xa47e4b3347a263d3, -0x0000000000000000,0x77e3dcb62d4753c1,0xdb05aa39286523b1,0x0000000000000000, -0xf9ddaa0914b809a1,0x0000000000000000,0xc6f60bbdf7c8c073,0x3165da52e44f8393, -0x0000000000000000,0x0000000000000000,0xa47e4b32f4f66927,0x0000000000000000, -0xf9ddaa0914dd4631,0x0000000000000000,0xa47e4b322642ad51,0x0000000000000000, -0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000, -0xa47e4b335ea331b5,0x0000000000000000,0x0000000000000000,0x0000000000000000, -0xdb0545d45d35a161,0xeca54fbddbbe34ff,0x44a0daa872c59baf,0x0000000000000000, -0xf9ddaa0914c5876b,0x0000000000000000,0x501eeeb814fa0b79,0xf9ddaa0914df8d85, -0xf9ddaa0914b167f3, + 0x3165da52e461ac3f,0x0000000000000000,0x3165da52f92661bd,0x0000000000000000, + 0x0000000000000000,0x0000000000000000,0x3165da52f9fa6ddb,0xbfc3c777d05a650b, + 0x3165da52ea1d2cb3,0x0000000000000000,0x0000000000000000,0x0000000000000000, + 0x0000000000000000,0xa47e4b3347ca768b,0xa47e4b0d60643265,0xf9ddaa09147bac4d, + 0x95351611c4501ef3,0x0000000000000000,0x0000000000000000,0xa47e4b33693ada65, + 0x0000000000000000,0xdb05013ca08bb8f1,0xf9ddaa091485019b,0xbfc3dfcbf5462bb3, + 0x0000000000000000,0x3165da52f85e6961,0x0000000000000000,0xdb0563922ce5394d, + 0x0000000000000000,0xa47e4b334bfc993f,0xdb02e2748a4d7e43,0x0000000000000000, + 0xb4c81ca554c806f3,0x0000000000000000,0x3165da52e0f88b5b,0x501eeeb814fbf821, + 0x0000000000000000,0xdb0503951fae6cc1,0x0000000000000000,0x0000000000000000, + 0xbfc3de349dfab331,0x0000000000000000,0x0000000000000000,0x3165da52f092830f, + 0xa47e4b300b3f05d3,0xbfc3dfcbf546362d,0xdb05125809d1c12f,0x0000000000000000, + 0xed66c2eeb45a9c73,0x0000000000000000,0xf9ddaa0914eaa03f,0x77f5a2bcd06af3a3, + 0xa47e4b0cab3b440f,0x0000000000000000,0x0000000000000000,0x3165da52ebde8871, + 0xa47e4b0cab0869b5,0x3165da52e5b576b7,0x0000000000000000,0x0000000000000000, + 0xa47e4b336935d383,0x0000000000000000,0x0000000000000000,0xa47e4b30efc0220b, + 0x0000000000000000,0x0000000000000000,0x501eeeb814fabe67,0xbfc3dfefa2fc3a77, + 0x0000000000000000,0x0000000000000000,0x0000000000000000,0xf9ddaa0914bb0bf9, + 0x0000000000000000,0xf9ddaa09148a58bb,0x0000000000000000,0xdb02e323971f6e8d, + 0x501eeeb814fa0161,0xa9cef01e4d45a29b,0x501eeeb814fb939f,0x0000000000000000, + 0xdb0517ba16b3ab83,0xbfc3dfb0ab021849,0xdb0541265bb691e9,0xbfc3df66cacb41a5, + 0xa47e4b325526bb31,0x0000000000000000,0xeca54fbddbbe35d5,0xa47e4b3347a263d3, + 0x0000000000000000,0x77e3dcb62d4753c1,0xdb05aa39286523b1,0x0000000000000000, + 0xf9ddaa0914b809a1,0x0000000000000000,0xc6f60bbdf7c8c073,0x3165da52e44f8393, + 0x0000000000000000,0x0000000000000000,0xa47e4b32f4f66927,0x0000000000000000, + 0xf9ddaa0914dd4631,0x0000000000000000,0xa47e4b322642ad51,0x0000000000000000, + 0x0000000000000000,0x0000000000000000,0x0000000000000000,0x0000000000000000, + 0xa47e4b335ea331b5,0x0000000000000000,0x0000000000000000,0x0000000000000000, + 0xdb0545d45d35a161,0xeca54fbddbbe34ff,0x44a0daa872c59baf,0x0000000000000000, + 0xf9ddaa0914c5876b,0x0000000000000000,0x501eeeb814fa0b79,0xf9ddaa0914df8d85, + 0xf9ddaa0914b167f3, }; u8 main_keys_key_array_0[] = {0x63,0x61,0x74,0x63,0x68,}; u8 main_keys_key_array_2[] = {0x75,0x6e,0x69,0x6f,0x6e,}; @@ -143,261 +143,261 @@ u8 main_keys_key_array_118[] = {0x61,0x73,0x6d,}; u8 main_keys_key_array_119[] = {0x65,0x6e,0x75,0x6d,}; u8 main_keys_key_array_120[] = {0x76,0x6f,0x69,0x64,}; String_Const_u8 main_keys_key_array[121] = { -{main_keys_key_array_0, 5}, -{0, 0}, -{main_keys_key_array_2, 5}, -{0, 0}, -{0, 0}, -{0, 0}, -{main_keys_key_array_6, 5}, -{main_keys_key_array_7, 7}, -{main_keys_key_array_8, 5}, -{0, 0}, -{0, 0}, -{0, 0}, -{0, 0}, -{main_keys_key_array_13, 6}, -{main_keys_key_array_14, 6}, -{main_keys_key_array_15, 4}, -{main_keys_key_array_16, 12}, -{0, 0}, -{0, 0}, -{main_keys_key_array_19, 6}, -{0, 0}, -{main_keys_key_array_21, 8}, -{main_keys_key_array_22, 4}, -{main_keys_key_array_23, 7}, -{0, 0}, -{main_keys_key_array_25, 5}, -{0, 0}, -{main_keys_key_array_27, 8}, -{0, 0}, -{main_keys_key_array_29, 6}, -{main_keys_key_array_30, 8}, -{0, 0}, -{main_keys_key_array_32, 11}, -{0, 0}, -{main_keys_key_array_34, 5}, -{main_keys_key_array_35, 3}, -{0, 0}, -{main_keys_key_array_37, 8}, -{0, 0}, -{0, 0}, -{main_keys_key_array_40, 7}, -{0, 0}, -{0, 0}, -{main_keys_key_array_43, 5}, -{main_keys_key_array_44, 6}, -{main_keys_key_array_45, 7}, -{main_keys_key_array_46, 8}, -{0, 0}, -{main_keys_key_array_48, 16}, -{0, 0}, -{main_keys_key_array_50, 4}, -{main_keys_key_array_51, 9}, -{main_keys_key_array_52, 6}, -{0, 0}, -{0, 0}, -{main_keys_key_array_55, 5}, -{main_keys_key_array_56, 6}, -{main_keys_key_array_57, 5}, -{0, 0}, -{0, 0}, -{main_keys_key_array_60, 6}, -{0, 0}, -{0, 0}, -{main_keys_key_array_63, 6}, -{0, 0}, -{0, 0}, -{main_keys_key_array_66, 3}, -{main_keys_key_array_67, 7}, -{0, 0}, -{0, 0}, -{0, 0}, -{main_keys_key_array_71, 4}, -{0, 0}, -{main_keys_key_array_73, 4}, -{0, 0}, -{main_keys_key_array_75, 8}, -{main_keys_key_array_76, 3}, -{main_keys_key_array_77, 12}, -{main_keys_key_array_78, 3}, -{0, 0}, -{main_keys_key_array_80, 8}, -{main_keys_key_array_81, 7}, -{main_keys_key_array_82, 8}, -{main_keys_key_array_83, 7}, -{main_keys_key_array_84, 6}, -{0, 0}, -{main_keys_key_array_86, 2}, -{main_keys_key_array_87, 6}, -{0, 0}, -{main_keys_key_array_89, 9}, -{main_keys_key_array_90, 8}, -{0, 0}, -{main_keys_key_array_92, 4}, -{0, 0}, -{main_keys_key_array_94, 10}, -{main_keys_key_array_95, 5}, -{0, 0}, -{0, 0}, -{main_keys_key_array_98, 6}, -{0, 0}, -{main_keys_key_array_100, 4}, -{0, 0}, -{main_keys_key_array_102, 6}, -{0, 0}, -{0, 0}, -{0, 0}, -{0, 0}, -{0, 0}, -{main_keys_key_array_108, 6}, -{0, 0}, -{0, 0}, -{0, 0}, -{main_keys_key_array_112, 8}, -{main_keys_key_array_113, 2}, -{main_keys_key_array_114, 13}, -{0, 0}, -{main_keys_key_array_116, 4}, -{0, 0}, -{main_keys_key_array_118, 3}, -{main_keys_key_array_119, 4}, -{main_keys_key_array_120, 4}, + {main_keys_key_array_0, 5}, + {0, 0}, + {main_keys_key_array_2, 5}, + {0, 0}, + {0, 0}, + {0, 0}, + {main_keys_key_array_6, 5}, + {main_keys_key_array_7, 7}, + {main_keys_key_array_8, 5}, + {0, 0}, + {0, 0}, + {0, 0}, + {0, 0}, + {main_keys_key_array_13, 6}, + {main_keys_key_array_14, 6}, + {main_keys_key_array_15, 4}, + {main_keys_key_array_16, 12}, + {0, 0}, + {0, 0}, + {main_keys_key_array_19, 6}, + {0, 0}, + {main_keys_key_array_21, 8}, + {main_keys_key_array_22, 4}, + {main_keys_key_array_23, 7}, + {0, 0}, + {main_keys_key_array_25, 5}, + {0, 0}, + {main_keys_key_array_27, 8}, + {0, 0}, + {main_keys_key_array_29, 6}, + {main_keys_key_array_30, 8}, + {0, 0}, + {main_keys_key_array_32, 11}, + {0, 0}, + {main_keys_key_array_34, 5}, + {main_keys_key_array_35, 3}, + {0, 0}, + {main_keys_key_array_37, 8}, + {0, 0}, + {0, 0}, + {main_keys_key_array_40, 7}, + {0, 0}, + {0, 0}, + {main_keys_key_array_43, 5}, + {main_keys_key_array_44, 6}, + {main_keys_key_array_45, 7}, + {main_keys_key_array_46, 8}, + {0, 0}, + {main_keys_key_array_48, 16}, + {0, 0}, + {main_keys_key_array_50, 4}, + {main_keys_key_array_51, 9}, + {main_keys_key_array_52, 6}, + {0, 0}, + {0, 0}, + {main_keys_key_array_55, 5}, + {main_keys_key_array_56, 6}, + {main_keys_key_array_57, 5}, + {0, 0}, + {0, 0}, + {main_keys_key_array_60, 6}, + {0, 0}, + {0, 0}, + {main_keys_key_array_63, 6}, + {0, 0}, + {0, 0}, + {main_keys_key_array_66, 3}, + {main_keys_key_array_67, 7}, + {0, 0}, + {0, 0}, + {0, 0}, + {main_keys_key_array_71, 4}, + {0, 0}, + {main_keys_key_array_73, 4}, + {0, 0}, + {main_keys_key_array_75, 8}, + {main_keys_key_array_76, 3}, + {main_keys_key_array_77, 12}, + {main_keys_key_array_78, 3}, + {0, 0}, + {main_keys_key_array_80, 8}, + {main_keys_key_array_81, 7}, + {main_keys_key_array_82, 8}, + {main_keys_key_array_83, 7}, + {main_keys_key_array_84, 6}, + {0, 0}, + {main_keys_key_array_86, 2}, + {main_keys_key_array_87, 6}, + {0, 0}, + {main_keys_key_array_89, 9}, + {main_keys_key_array_90, 8}, + {0, 0}, + {main_keys_key_array_92, 4}, + {0, 0}, + {main_keys_key_array_94, 10}, + {main_keys_key_array_95, 5}, + {0, 0}, + {0, 0}, + {main_keys_key_array_98, 6}, + {0, 0}, + {main_keys_key_array_100, 4}, + {0, 0}, + {main_keys_key_array_102, 6}, + {0, 0}, + {0, 0}, + {0, 0}, + {0, 0}, + {0, 0}, + {main_keys_key_array_108, 6}, + {0, 0}, + {0, 0}, + {0, 0}, + {main_keys_key_array_112, 8}, + {main_keys_key_array_113, 2}, + {main_keys_key_array_114, 13}, + {0, 0}, + {main_keys_key_array_116, 4}, + {0, 0}, + {main_keys_key_array_118, 3}, + {main_keys_key_array_119, 4}, + {main_keys_key_array_120, 4}, }; Lexeme_Table_Value main_keys_value_array[121] = { -{4, TokenCppKind_Catch}, -{0, 0}, -{4, TokenCppKind_Union}, -{0, 0}, -{0, 0}, -{0, 0}, -{4, TokenCppKind_Using}, -{4, TokenCppKind_Virtual}, -{4, TokenCppKind_Float}, -{0, 0}, -{0, 0}, -{0, 0}, -{0, 0}, -{4, TokenCppKind_Static}, -{4, TokenCppKind_Inline}, -{8, TokenCppKind_LiteralTrue}, -{4, TokenCppKind_DynamicCast}, -{0, 0}, -{0, 0}, -{4, TokenCppKind_SizeOf}, -{0, 0}, -{4, TokenCppKind_Template}, -{4, TokenCppKind_This}, -{4, TokenCppKind_AlignAs}, -{0, 0}, -{4, TokenCppKind_While}, -{0, 0}, -{4, TokenCppKind_Typename}, -{0, 0}, -{4, TokenCppKind_Switch}, -{4, TokenCppKind_Explicit}, -{0, 0}, -{4, TokenCppKind_StaticCast}, -{0, 0}, -{4, TokenCppKind_Break}, -{4, TokenCppKind_Try}, -{0, 0}, -{4, TokenCppKind_DeclType}, -{0, 0}, -{0, 0}, -{4, TokenCppKind_Private}, -{0, 0}, -{0, 0}, -{4, TokenCppKind_Short}, -{4, TokenCppKind_TypeID}, -{4, TokenCppKind_AlignOf}, -{4, TokenCppKind_NoExcept}, -{0, 0}, -{4, TokenCppKind_ReinterpretCast}, -{0, 0}, -{4, TokenCppKind_Goto}, -{4, TokenCppKind_Protected}, -{4, TokenCppKind_Export}, -{0, 0}, -{0, 0}, -{8, TokenCppKind_LiteralFalse}, -{4, TokenCppKind_Extern}, -{4, TokenCppKind_Class}, -{0, 0}, -{0, 0}, -{4, TokenCppKind_Signed}, -{0, 0}, -{0, 0}, -{4, TokenCppKind_Public}, -{0, 0}, -{0, 0}, -{4, TokenCppKind_Int}, -{4, TokenCppKind_Default}, -{0, 0}, -{0, 0}, -{0, 0}, -{4, TokenCppKind_Char}, -{0, 0}, -{4, TokenCppKind_Long}, -{0, 0}, -{4, TokenCppKind_Continue}, -{4, TokenCppKind_For}, -{4, TokenCppKind_ThreadLocal}, -{4, TokenCppKind_New}, -{0, 0}, -{4, TokenCppKind_Unsigned}, -{4, TokenCppKind_NullPtr}, -{4, TokenCppKind_Operator}, -{4, TokenCppKind_Typedef}, -{4, TokenCppKind_Delete}, -{0, 0}, -{4, TokenCppKind_If}, -{4, TokenCppKind_Struct}, -{0, 0}, -{4, TokenCppKind_Namespace}, -{4, TokenCppKind_Register}, -{0, 0}, -{4, TokenCppKind_Case}, -{0, 0}, -{4, TokenCppKind_ConstCast}, -{4, TokenCppKind_Const}, -{0, 0}, -{0, 0}, -{4, TokenCppKind_Friend}, -{0, 0}, -{4, TokenCppKind_Else}, -{0, 0}, -{4, TokenCppKind_Double}, -{0, 0}, -{0, 0}, -{0, 0}, -{0, 0}, -{0, 0}, -{4, TokenCppKind_Return}, -{0, 0}, -{0, 0}, -{0, 0}, -{4, TokenCppKind_Volatile}, -{4, TokenCppKind_Do}, -{4, TokenCppKind_StaticAssert}, -{0, 0}, -{4, TokenCppKind_Bool}, -{0, 0}, -{4, TokenCppKind_Asm}, -{4, TokenCppKind_Enum}, -{4, TokenCppKind_Void}, + {4, TokenCppKind_Catch}, + {0, 0}, + {4, TokenCppKind_Union}, + {0, 0}, + {0, 0}, + {0, 0}, + {4, TokenCppKind_Using}, + {4, TokenCppKind_Virtual}, + {4, TokenCppKind_Float}, + {0, 0}, + {0, 0}, + {0, 0}, + {0, 0}, + {4, TokenCppKind_Static}, + {4, TokenCppKind_Inline}, + {8, TokenCppKind_LiteralTrue}, + {4, TokenCppKind_DynamicCast}, + {0, 0}, + {0, 0}, + {4, TokenCppKind_SizeOf}, + {0, 0}, + {4, TokenCppKind_Template}, + {4, TokenCppKind_This}, + {4, TokenCppKind_AlignAs}, + {0, 0}, + {4, TokenCppKind_While}, + {0, 0}, + {4, TokenCppKind_Typename}, + {0, 0}, + {4, TokenCppKind_Switch}, + {4, TokenCppKind_Explicit}, + {0, 0}, + {4, TokenCppKind_StaticCast}, + {0, 0}, + {4, TokenCppKind_Break}, + {4, TokenCppKind_Try}, + {0, 0}, + {4, TokenCppKind_DeclType}, + {0, 0}, + {0, 0}, + {4, TokenCppKind_Private}, + {0, 0}, + {0, 0}, + {4, TokenCppKind_Short}, + {4, TokenCppKind_TypeID}, + {4, TokenCppKind_AlignOf}, + {4, TokenCppKind_NoExcept}, + {0, 0}, + {4, TokenCppKind_ReinterpretCast}, + {0, 0}, + {4, TokenCppKind_Goto}, + {4, TokenCppKind_Protected}, + {4, TokenCppKind_Export}, + {0, 0}, + {0, 0}, + {8, TokenCppKind_LiteralFalse}, + {4, TokenCppKind_Extern}, + {4, TokenCppKind_Class}, + {0, 0}, + {0, 0}, + {4, TokenCppKind_Signed}, + {0, 0}, + {0, 0}, + {4, TokenCppKind_Public}, + {0, 0}, + {0, 0}, + {4, TokenCppKind_Int}, + {4, TokenCppKind_Default}, + {0, 0}, + {0, 0}, + {0, 0}, + {4, TokenCppKind_Char}, + {0, 0}, + {4, TokenCppKind_Long}, + {0, 0}, + {4, TokenCppKind_Continue}, + {4, TokenCppKind_For}, + {4, TokenCppKind_ThreadLocal}, + {4, TokenCppKind_New}, + {0, 0}, + {4, TokenCppKind_Unsigned}, + {4, TokenCppKind_NullPtr}, + {4, TokenCppKind_Operator}, + {4, TokenCppKind_Typedef}, + {4, TokenCppKind_Delete}, + {0, 0}, + {4, TokenCppKind_If}, + {4, TokenCppKind_Struct}, + {0, 0}, + {4, TokenCppKind_Namespace}, + {4, TokenCppKind_Register}, + {0, 0}, + {4, TokenCppKind_Case}, + {0, 0}, + {4, TokenCppKind_ConstCast}, + {4, TokenCppKind_Const}, + {0, 0}, + {0, 0}, + {4, TokenCppKind_Friend}, + {0, 0}, + {4, TokenCppKind_Else}, + {0, 0}, + {4, TokenCppKind_Double}, + {0, 0}, + {0, 0}, + {0, 0}, + {0, 0}, + {0, 0}, + {4, TokenCppKind_Return}, + {0, 0}, + {0, 0}, + {0, 0}, + {4, TokenCppKind_Volatile}, + {4, TokenCppKind_Do}, + {4, TokenCppKind_StaticAssert}, + {0, 0}, + {4, TokenCppKind_Bool}, + {0, 0}, + {4, TokenCppKind_Asm}, + {4, TokenCppKind_Enum}, + {4, TokenCppKind_Void}, }; i32 main_keys_slot_count = 121; u64 main_keys_seed = 0x32a240442a6e221f; u64 pp_directives_hash_array[25] = { -0xa8f3b0d79807b793,0x808ba552d670368f,0x0000000000000000,0x808ba54dc047d94b, -0x3b97f7088cbf95df,0x7fd91d3d238e04c9,0x0000000000000000,0x7fd91d3dac09e067, -0x0000000000000000,0x0000000000000000,0xa8f3beab5b880ad3,0x0000000000000000, -0x3b97f7088cbffd3b,0x3b97f7088cdab44b,0x79521904bb682f3f,0x0000000000000000, -0x0000000000000000,0x7fd91d3d978c615f,0x808ba553ad911e19,0x0000000000000000, -0x808ba54ef8496067,0x7fd91d3d2fe85067,0x7fd91d3d97a21607,0x0000000000000000, -0x0000000000000000, + 0xa8f3b0d79807b793,0x808ba552d670368f,0x0000000000000000,0x808ba54dc047d94b, + 0x3b97f7088cbf95df,0x7fd91d3d238e04c9,0x0000000000000000,0x7fd91d3dac09e067, + 0x0000000000000000,0x0000000000000000,0xa8f3beab5b880ad3,0x0000000000000000, + 0x3b97f7088cbffd3b,0x3b97f7088cdab44b,0x79521904bb682f3f,0x0000000000000000, + 0x0000000000000000,0x7fd91d3d978c615f,0x808ba553ad911e19,0x0000000000000000, + 0x808ba54ef8496067,0x7fd91d3d2fe85067,0x7fd91d3d97a21607,0x0000000000000000, + 0x0000000000000000, }; u8 pp_directives_key_array_0[] = {0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,}; u8 pp_directives_key_array_1[] = {0x70,0x72,0x61,0x67,0x6d,0x61,}; @@ -415,4730 +415,4730 @@ u8 pp_directives_key_array_20[] = {0x69,0x66,0x6e,0x64,0x65,0x66,}; u8 pp_directives_key_array_21[] = {0x75,0x6e,0x64,0x65,0x66,}; u8 pp_directives_key_array_22[] = {0x65,0x72,0x72,0x6f,0x72,}; String_Const_u8 pp_directives_key_array[25] = { -{pp_directives_key_array_0, 7}, -{pp_directives_key_array_1, 6}, -{0, 0}, -{pp_directives_key_array_3, 6}, -{pp_directives_key_array_4, 4}, -{pp_directives_key_array_5, 5}, -{0, 0}, -{pp_directives_key_array_7, 5}, -{0, 0}, -{0, 0}, -{pp_directives_key_array_10, 7}, -{0, 0}, -{pp_directives_key_array_12, 4}, -{pp_directives_key_array_13, 4}, -{pp_directives_key_array_14, 2}, -{0, 0}, -{0, 0}, -{pp_directives_key_array_17, 5}, -{pp_directives_key_array_18, 6}, -{0, 0}, -{pp_directives_key_array_20, 6}, -{pp_directives_key_array_21, 5}, -{pp_directives_key_array_22, 5}, -{0, 0}, -{0, 0}, + {pp_directives_key_array_0, 7}, + {pp_directives_key_array_1, 6}, + {0, 0}, + {pp_directives_key_array_3, 6}, + {pp_directives_key_array_4, 4}, + {pp_directives_key_array_5, 5}, + {0, 0}, + {pp_directives_key_array_7, 5}, + {0, 0}, + {0, 0}, + {pp_directives_key_array_10, 7}, + {0, 0}, + {pp_directives_key_array_12, 4}, + {pp_directives_key_array_13, 4}, + {pp_directives_key_array_14, 2}, + {0, 0}, + {0, 0}, + {pp_directives_key_array_17, 5}, + {pp_directives_key_array_18, 6}, + {0, 0}, + {pp_directives_key_array_20, 6}, + {pp_directives_key_array_21, 5}, + {pp_directives_key_array_22, 5}, + {0, 0}, + {0, 0}, }; Lexeme_Table_Value pp_directives_value_array[25] = { -{5, TokenCppKind_PPInclude}, -{5, TokenCppKind_PPPragma}, -{0, 0}, -{5, TokenCppKind_PPDefine}, -{5, TokenCppKind_PPElIf}, -{5, TokenCppKind_PPUsing}, -{0, 0}, -{5, TokenCppKind_PPIfDef}, -{0, 0}, -{0, 0}, -{5, TokenCppKind_PPVersion}, -{0, 0}, -{5, TokenCppKind_PPElse}, -{5, TokenCppKind_PPLine}, -{5, TokenCppKind_PPIf}, -{0, 0}, -{0, 0}, -{5, TokenCppKind_PPEndIf}, -{5, TokenCppKind_PPImport}, -{0, 0}, -{5, TokenCppKind_PPIfNDef}, -{5, TokenCppKind_PPUndef}, -{5, TokenCppKind_PPError}, -{0, 0}, -{0, 0}, + {5, TokenCppKind_PPInclude}, + {5, TokenCppKind_PPPragma}, + {0, 0}, + {5, TokenCppKind_PPDefine}, + {5, TokenCppKind_PPElIf}, + {5, TokenCppKind_PPUsing}, + {0, 0}, + {5, TokenCppKind_PPIfDef}, + {0, 0}, + {0, 0}, + {5, TokenCppKind_PPVersion}, + {0, 0}, + {5, TokenCppKind_PPElse}, + {5, TokenCppKind_PPLine}, + {5, TokenCppKind_PPIf}, + {0, 0}, + {0, 0}, + {5, TokenCppKind_PPEndIf}, + {5, TokenCppKind_PPImport}, + {0, 0}, + {5, TokenCppKind_PPIfNDef}, + {5, TokenCppKind_PPUndef}, + {5, TokenCppKind_PPError}, + {0, 0}, + {0, 0}, }; i32 pp_directives_slot_count = 25; u64 pp_directives_seed = 0x8848fb3caaf5d4d5; u64 pp_keys_hash_array[2] = { -0x0000000000000000,0x72743f437c9f847d, + 0x0000000000000000,0x72743f437c9f847d, }; u8 pp_keys_key_array_1[] = {0x64,0x65,0x66,0x69,0x6e,0x65,0x64,}; String_Const_u8 pp_keys_key_array[2] = { -{0, 0}, -{pp_keys_key_array_1, 7}, + {0, 0}, + {pp_keys_key_array_1, 7}, }; Lexeme_Table_Value pp_keys_value_array[2] = { -{0, 0}, -{4, TokenCppKind_PPDefined}, + {0, 0}, + {4, TokenCppKind_PPDefined}, }; i32 pp_keys_slot_count = 2; u64 pp_keys_seed = 0x71428d58f01a7eed; struct Lex_State_Cpp{ -u32 flags_ZF0; -u32 flags_KF0; -u16 flags_KB0; -u8 *base; -u8 *delim_first; -u8 *delim_one_past_last; -u8 *emit_ptr; -u8 *ptr; -u8 *opl_ptr; + u32 flags_ZF0; + u32 flags_KF0; + u16 flags_KB0; + u8 *base; + u8 *delim_first; + u8 *delim_one_past_last; + u8 *emit_ptr; + u8 *ptr; + u8 *opl_ptr; }; internal void lex_full_input_cpp_init(Lex_State_Cpp *state_ptr, String_Const_u8 input){ -state_ptr->flags_ZF0 = 0; -state_ptr->flags_KF0 = 0; -state_ptr->flags_KB0 = 0; -state_ptr->base = input.str; -state_ptr->delim_first = input.str; -state_ptr->delim_one_past_last = input.str; -state_ptr->emit_ptr = input.str; -state_ptr->ptr = input.str; -state_ptr->opl_ptr = input.str + input.size; + state_ptr->flags_ZF0 = 0; + state_ptr->flags_KF0 = 0; + state_ptr->flags_KB0 = 0; + state_ptr->base = input.str; + state_ptr->delim_first = input.str; + state_ptr->delim_one_past_last = input.str; + state_ptr->emit_ptr = input.str; + state_ptr->ptr = input.str; + state_ptr->opl_ptr = input.str + input.size; } internal b32 lex_full_input_cpp_breaks(Arena *arena, Token_List *list, Lex_State_Cpp *state_ptr, u64 max){ -b32 result = false; -u64 emit_counter = 0; -Lex_State_Cpp state; -block_copy_struct(&state, state_ptr); -{ -state_label_1: // root -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_EOF; -token.kind = 0; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -result = true; -goto end; -} -} -switch (*state.ptr){ -case 0x00:case 0x01:case 0x02:case 0x03:case 0x04:case 0x05:case 0x06: -case 0x07:case 0x08:case 0x0e:case 0x0f:case 0x10:case 0x11:case 0x12: -case 0x13:case 0x14:case 0x15:case 0x16:case 0x17:case 0x18:case 0x19: -case 0x1a:case 0x1b:case 0x1c:case 0x1d:case 0x1e:case 0x1f:case 0x40: -case 0x60:case 0x7f: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LexError; -token.kind = 2; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x09:case 0x0b:case 0x0c:case 0x0d:case 0x20: -{ -if ((HasFlag(state.flags_KF0, 0x2))){ -state.ptr += 1; -goto state_label_4; // error_body -} -state.ptr += 1; -goto state_label_3; // whitespace -}break; -case 0x0a: -{ -state.ptr += 1; -state.flags_KB0 &= ~(0x1); -state.flags_KF0 &= ~(0x1); -state.flags_KF0 &= ~(0x2); -goto state_label_3; // whitespace -}break; -case 0x21: -{ -state.ptr += 1; -goto state_label_60; // op stage -}break; -case 0x22: -{ -if ((HasFlag(state.flags_KF0, 0x1))){ -state.ptr += 1; -goto state_label_26; // include_quotes -} -state.ptr += 1; -goto state_label_32; // string -}break; -case 0x23: -{ -if ((!HasFlag(state.flags_KB0, 0x1))){ -state.ptr += 1; -goto state_label_23; // pp_directive_whitespace -} -state.ptr += 1; -goto state_label_67; // op stage -}break; -default: -{ -state.ptr += 1; -goto state_label_2; // identifier -}break; -case 0x25: -{ -state.ptr += 1; -goto state_label_64; // op stage -}break; -case 0x26: -{ -state.ptr += 1; -goto state_label_61; // op stage -}break; -case 0x27: -{ -state.ptr += 1; -state.flags_ZF0 |= 0x40; -goto state_label_32; // string -}break; -case 0x28: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_ParenOp; -token.kind = 13; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x29: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_ParenCl; -token.kind = 14; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x2a: -{ -state.ptr += 1; -goto state_label_63; // op stage -}break; -case 0x2b: -{ -state.ptr += 1; -goto state_label_53; // op stage -}break; -case 0x2c: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Comma; -token.kind = 15; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x2d: -{ -state.ptr += 1; -goto state_label_54; // op stage -}break; -case 0x2e: -{ -state.ptr += 1; -goto state_label_6; // operator_or_fnumber_dot -}break; -case 0x2f: -{ -state.ptr += 1; -goto state_label_7; // operator_or_comment_slash -}break; -case 0x30: -{ -state.ptr += 1; -goto state_label_9; // znumber -}break; -case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36:case 0x37: -case 0x38:case 0x39: -{ -state.ptr += 1; -goto state_label_8; // number -}break; -case 0x3a: -{ -state.ptr += 1; -goto state_label_52; // op stage -}break; -case 0x3b: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Semicolon; -token.kind = 15; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x3c: -{ -if ((!HasFlag(state.flags_KF0, 0x1))){ -state.ptr += 1; -goto state_label_56; // op stage -} -state.ptr += 1; -goto state_label_25; // include_pointy -}break; -case 0x3d: -{ -state.ptr += 1; -goto state_label_59; // op stage -}break; -case 0x3e: -{ -state.ptr += 1; -goto state_label_57; // op stage -}break; -case 0x3f: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Ternary; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x4c: -{ -state.ptr += 1; -state.flags_ZF0 |= 0x4; -goto state_label_27; // pre_L -}break; -case 0x52: -{ -state.ptr += 1; -goto state_label_31; // pre_R -}break; -case 0x55: -{ -state.ptr += 1; -state.flags_ZF0 |= 0x20; -goto state_label_29; // pre_U -}break; -case 0x5b: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_BrackOp; -token.kind = 13; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x5c: -{ -state.ptr += 1; -goto state_label_5; // backslash -}break; -case 0x5d: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_BrackCl; -token.kind = 14; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x5e: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Xor; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x75: -{ -state.ptr += 1; -state.flags_ZF0 |= 0x10; -goto state_label_28; // pre_u -}break; -case 0x7b: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_BraceOp; -token.kind = 11; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x7c: -{ -state.ptr += 1; -goto state_label_62; // op stage -}break; -case 0x7d: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_BraceCl; -token.kind = 12; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x7e: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Tilde; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_2: // identifier -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_KB0, 0x1)){ -Lexeme_Table_Lookup lookup = lexeme_table_lookup(pp_keys_hash_array, pp_keys_key_array, pp_keys_value_array, pp_keys_slot_count, pp_keys_seed, state.emit_ptr, token.size); -if (lookup.found_match){ -token.kind = lookup.base_kind; -token.sub_kind = lookup.sub_kind; -break; -} -} -Lexeme_Table_Lookup lookup = lexeme_table_lookup(main_keys_hash_array, main_keys_key_array, main_keys_value_array, main_keys_slot_count, main_keys_seed, state.emit_ptr, token.size); -if (lookup.found_match){ -token.kind = lookup.base_kind; -token.sub_kind = lookup.sub_kind; -break; -} -token.sub_kind = TokenCppKind_Identifier; -token.kind = 6; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -case 0x00:case 0x01:case 0x02:case 0x03:case 0x04:case 0x05:case 0x06: -case 0x07:case 0x08:case 0x09:case 0x0a:case 0x0b:case 0x0c:case 0x0d: -case 0x0e:case 0x0f:case 0x10:case 0x11:case 0x12:case 0x13:case 0x14: -case 0x15:case 0x16:case 0x17:case 0x18:case 0x19:case 0x1a:case 0x1b: -case 0x1c:case 0x1d:case 0x1e:case 0x1f:case 0x20:case 0x21:case 0x22: -case 0x23:case 0x25:case 0x26:case 0x27:case 0x28:case 0x29:case 0x2a: -case 0x2b:case 0x2c:case 0x2d:case 0x2e:case 0x2f:case 0x3a:case 0x3b: -case 0x3c:case 0x3d:case 0x3e:case 0x3f:case 0x40:case 0x5b:case 0x5c: -case 0x5d:case 0x5e:case 0x60:case 0x7b:case 0x7c:case 0x7d:case 0x7e: -case 0x7f: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_KB0, 0x1)){ -Lexeme_Table_Lookup lookup = lexeme_table_lookup(pp_keys_hash_array, pp_keys_key_array, pp_keys_value_array, pp_keys_slot_count, pp_keys_seed, state.emit_ptr, token.size); -if (lookup.found_match){ -token.kind = lookup.base_kind; -token.sub_kind = lookup.sub_kind; -break; -} -} -Lexeme_Table_Lookup lookup = lexeme_table_lookup(main_keys_hash_array, main_keys_key_array, main_keys_value_array, main_keys_slot_count, main_keys_seed, state.emit_ptr, token.size); -if (lookup.found_match){ -token.kind = lookup.base_kind; -token.sub_kind = lookup.sub_kind; -break; -} -token.sub_kind = TokenCppKind_Identifier; -token.kind = 6; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -default: -{ -state.ptr += 1; -goto state_label_2; // identifier -}break; -} -} -{ -state_label_3: // whitespace -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Whitespace; -token.kind = 1; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Whitespace; -token.kind = 1; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x09:case 0x0b:case 0x0c:case 0x0d:case 0x20: -{ -state.ptr += 1; -goto state_label_3; // whitespace -}break; -case 0x0a: -{ -state.ptr += 1; -state.flags_KB0 &= ~(0x1); -state.flags_KF0 &= ~(0x1); -state.flags_KF0 &= ~(0x2); -goto state_label_3; // whitespace -}break; -} -} -{ -state_label_4: // error_body -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_PPErrorMessage; -token.kind = 10; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -state.ptr += 1; -goto state_label_4; // error_body -}break; -case 0x0a: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_PPErrorMessage; -token.kind = 10; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_5: // backslash -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Backslash; -token.kind = 1; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Backslash; -token.kind = 1; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x0a: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Backslash; -token.kind = 1; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_6: // operator_or_fnumber_dot -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Dot; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Dot; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x2a: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_DotStar; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x2e: -{ -state.ptr += 1; -goto state_label_68; // op stage -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37:case 0x38:case 0x39: -{ -state.ptr += 1; -goto state_label_10; // fnumber_decimal -}break; -} -} -{ -state_label_7: // operator_or_comment_slash -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Div; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Div; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x2a: -{ -state.ptr += 1; -goto state_label_49; // comment_block -}break; -case 0x2f: -{ -state.ptr += 1; -goto state_label_51; // comment_line -}break; -case 0x3d: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_DivEq; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_8: // number -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralInteger; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralInteger; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x2e: -{ -state.ptr += 1; -goto state_label_10; // fnumber_decimal -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37:case 0x38:case 0x39: -{ -state.ptr += 1; -goto state_label_8; // number -}break; -case 0x45:case 0x65: -{ -state.ptr += 1; -goto state_label_11; // fnumber_exponent -}break; -case 0x4c: -{ -state.ptr += 1; -goto state_label_18; // L_number -}break; -case 0x55:case 0x75: -{ -state.ptr += 1; -goto state_label_17; // U_number -}break; -case 0x6c: -{ -state.ptr += 1; -goto state_label_20; // l_number -}break; -} -} -{ -state_label_9: // znumber -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralInteger; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralInteger; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x2e: -{ -state.ptr += 1; -goto state_label_10; // fnumber_decimal -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37: -{ -state.ptr += 1; -state.flags_ZF0 |= 0x2; -goto state_label_16; // number_oct -}break; -case 0x45:case 0x65: -{ -state.ptr += 1; -goto state_label_11; // fnumber_exponent -}break; -case 0x4c: -{ -state.ptr += 1; -goto state_label_18; // L_number -}break; -case 0x55:case 0x75: -{ -state.ptr += 1; -goto state_label_17; // U_number -}break; -case 0x58:case 0x78: -{ -state.ptr += 1; -state.flags_ZF0 |= 0x1; -goto state_label_14; // number_hex_first -}break; -case 0x6c: -{ -state.ptr += 1; -goto state_label_20; // l_number -}break; -} -} -{ -state_label_10: // fnumber_decimal -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralFloat64; -token.kind = 9; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralFloat64; -token.kind = 9; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37:case 0x38:case 0x39: -{ -state.ptr += 1; -goto state_label_10; // fnumber_decimal -}break; -case 0x45:case 0x65: -{ -state.ptr += 1; -goto state_label_11; // fnumber_exponent -}break; -case 0x46:case 0x66: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralFloat32; -token.kind = 9; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x4c:case 0x6c: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralFloat64; -token.kind = 9; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_11: // fnumber_exponent -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralFloat64; -token.kind = 9; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralFloat64; -token.kind = 9; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x2b:case 0x2d: -{ -state.ptr += 1; -goto state_label_12; // fnumber_exponent_sign -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37:case 0x38:case 0x39: -{ -state.ptr += 1; -goto state_label_13; // fnumber_exponent_digits -}break; -case 0x46:case 0x66: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralFloat32; -token.kind = 9; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x4c:case 0x6c: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralFloat64; -token.kind = 9; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_12: // fnumber_exponent_sign -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralFloat64; -token.kind = 9; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralFloat64; -token.kind = 9; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37:case 0x38:case 0x39: -{ -state.ptr += 1; -goto state_label_13; // fnumber_exponent_digits -}break; -case 0x46:case 0x66: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralFloat32; -token.kind = 9; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x4c:case 0x6c: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralFloat64; -token.kind = 9; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_13: // fnumber_exponent_digits -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralFloat64; -token.kind = 9; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralFloat64; -token.kind = 9; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37:case 0x38:case 0x39: -{ -state.ptr += 1; -goto state_label_13; // fnumber_exponent_digits -}break; -case 0x46:case 0x66: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralFloat32; -token.kind = 9; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x4c:case 0x6c: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralFloat64; -token.kind = 9; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_14: // number_hex_first -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LexError; -token.kind = 2; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LexError; -token.kind = 2; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: -case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: -case 0x66: -{ -state.ptr += 1; -goto state_label_15; // number_hex -}break; -} -} -{ -state_label_15: // number_hex -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralIntegerHex; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralIntegerHex; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: -case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: -case 0x66: -{ -state.ptr += 1; -goto state_label_15; // number_hex -}break; -case 0x4c: -{ -state.ptr += 1; -goto state_label_18; // L_number -}break; -case 0x55:case 0x75: -{ -state.ptr += 1; -goto state_label_17; // U_number -}break; -case 0x6c: -{ -state.ptr += 1; -goto state_label_20; // l_number -}break; -} -} -{ -state_label_16: // number_oct -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralIntegerOct; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LiteralIntegerOct; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37: -{ -state.ptr += 1; -state.flags_ZF0 |= 0x2; -goto state_label_16; // number_oct -}break; -case 0x4c: -{ -state.ptr += 1; -goto state_label_18; // L_number -}break; -case 0x55:case 0x75: -{ -state.ptr += 1; -goto state_label_17; // U_number -}break; -case 0x6c: -{ -state.ptr += 1; -goto state_label_20; // l_number -}break; -} -} -{ -state_label_17: // U_number -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_ZF0, 0x1)){ -token.sub_kind = TokenCppKind_LiteralIntegerHexU; -token.kind = 8; -break; -} -if (HasFlag(state.flags_ZF0, 0x2)){ -token.sub_kind = TokenCppKind_LiteralIntegerOctU; -token.kind = 8; -break; -} -token.sub_kind = TokenCppKind_LiteralIntegerU; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_ZF0, 0x1)){ -token.sub_kind = TokenCppKind_LiteralIntegerHexU; -token.kind = 8; -break; -} -if (HasFlag(state.flags_ZF0, 0x2)){ -token.sub_kind = TokenCppKind_LiteralIntegerOctU; -token.kind = 8; -break; -} -token.sub_kind = TokenCppKind_LiteralIntegerU; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x4c: -{ -state.ptr += 1; -goto state_label_19; // UL_number -}break; -case 0x6c: -{ -state.ptr += 1; -goto state_label_21; // Ul_number -}break; -} -} -{ -state_label_18: // L_number -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_ZF0, 0x1)){ -token.sub_kind = TokenCppKind_LiteralIntegerHexL; -token.kind = 8; -break; -} -if (HasFlag(state.flags_ZF0, 0x2)){ -token.sub_kind = TokenCppKind_LiteralIntegerOctL; -token.kind = 8; -break; -} -token.sub_kind = TokenCppKind_LiteralIntegerL; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_ZF0, 0x1)){ -token.sub_kind = TokenCppKind_LiteralIntegerHexL; -token.kind = 8; -break; -} -if (HasFlag(state.flags_ZF0, 0x2)){ -token.sub_kind = TokenCppKind_LiteralIntegerOctL; -token.kind = 8; -break; -} -token.sub_kind = TokenCppKind_LiteralIntegerL; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x4c: -{ -state.ptr += 1; -goto state_label_22; // LL_number -}break; -case 0x55:case 0x75: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_ZF0, 0x1)){ -token.sub_kind = TokenCppKind_LiteralIntegerHexUL; -token.kind = 8; -break; -} -if (HasFlag(state.flags_ZF0, 0x2)){ -token.sub_kind = TokenCppKind_LiteralIntegerOctUL; -token.kind = 8; -break; -} -token.sub_kind = TokenCppKind_LiteralIntegerUL; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_19: // UL_number -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_ZF0, 0x1)){ -token.sub_kind = TokenCppKind_LiteralIntegerHexUL; -token.kind = 8; -break; -} -if (HasFlag(state.flags_ZF0, 0x2)){ -token.sub_kind = TokenCppKind_LiteralIntegerOctUL; -token.kind = 8; -break; -} -token.sub_kind = TokenCppKind_LiteralIntegerUL; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_ZF0, 0x1)){ -token.sub_kind = TokenCppKind_LiteralIntegerHexUL; -token.kind = 8; -break; -} -if (HasFlag(state.flags_ZF0, 0x2)){ -token.sub_kind = TokenCppKind_LiteralIntegerOctUL; -token.kind = 8; -break; -} -token.sub_kind = TokenCppKind_LiteralIntegerUL; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x4c: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_ZF0, 0x1)){ -token.sub_kind = TokenCppKind_LiteralIntegerHexULL; -token.kind = 8; -break; -} -if (HasFlag(state.flags_ZF0, 0x2)){ -token.sub_kind = TokenCppKind_LiteralIntegerOctULL; -token.kind = 8; -break; -} -token.sub_kind = TokenCppKind_LiteralIntegerULL; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_20: // l_number -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_ZF0, 0x1)){ -token.sub_kind = TokenCppKind_LiteralIntegerHexL; -token.kind = 8; -break; -} -if (HasFlag(state.flags_ZF0, 0x2)){ -token.sub_kind = TokenCppKind_LiteralIntegerOctL; -token.kind = 8; -break; -} -token.sub_kind = TokenCppKind_LiteralIntegerL; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_ZF0, 0x1)){ -token.sub_kind = TokenCppKind_LiteralIntegerHexL; -token.kind = 8; -break; -} -if (HasFlag(state.flags_ZF0, 0x2)){ -token.sub_kind = TokenCppKind_LiteralIntegerOctL; -token.kind = 8; -break; -} -token.sub_kind = TokenCppKind_LiteralIntegerL; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x55:case 0x75: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_ZF0, 0x1)){ -token.sub_kind = TokenCppKind_LiteralIntegerHexUL; -token.kind = 8; -break; -} -if (HasFlag(state.flags_ZF0, 0x2)){ -token.sub_kind = TokenCppKind_LiteralIntegerOctUL; -token.kind = 8; -break; -} -token.sub_kind = TokenCppKind_LiteralIntegerUL; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x6c: -{ -state.ptr += 1; -goto state_label_22; // LL_number -}break; -} -} -{ -state_label_21: // Ul_number -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_ZF0, 0x1)){ -token.sub_kind = TokenCppKind_LiteralIntegerHexUL; -token.kind = 8; -break; -} -if (HasFlag(state.flags_ZF0, 0x2)){ -token.sub_kind = TokenCppKind_LiteralIntegerOctUL; -token.kind = 8; -break; -} -token.sub_kind = TokenCppKind_LiteralIntegerUL; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_ZF0, 0x1)){ -token.sub_kind = TokenCppKind_LiteralIntegerHexUL; -token.kind = 8; -break; -} -if (HasFlag(state.flags_ZF0, 0x2)){ -token.sub_kind = TokenCppKind_LiteralIntegerOctUL; -token.kind = 8; -break; -} -token.sub_kind = TokenCppKind_LiteralIntegerUL; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x6c: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_ZF0, 0x1)){ -token.sub_kind = TokenCppKind_LiteralIntegerHexULL; -token.kind = 8; -break; -} -if (HasFlag(state.flags_ZF0, 0x2)){ -token.sub_kind = TokenCppKind_LiteralIntegerOctULL; -token.kind = 8; -break; -} -token.sub_kind = TokenCppKind_LiteralIntegerULL; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_22: // LL_number -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_ZF0, 0x1)){ -token.sub_kind = TokenCppKind_LiteralIntegerHexLL; -token.kind = 8; -break; -} -if (HasFlag(state.flags_ZF0, 0x2)){ -token.sub_kind = TokenCppKind_LiteralIntegerOctLL; -token.kind = 8; -break; -} -token.sub_kind = TokenCppKind_LiteralIntegerLL; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_ZF0, 0x1)){ -token.sub_kind = TokenCppKind_LiteralIntegerHexLL; -token.kind = 8; -break; -} -if (HasFlag(state.flags_ZF0, 0x2)){ -token.sub_kind = TokenCppKind_LiteralIntegerOctLL; -token.kind = 8; -break; -} -token.sub_kind = TokenCppKind_LiteralIntegerLL; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x55:case 0x75: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_ZF0, 0x1)){ -token.sub_kind = TokenCppKind_LiteralIntegerHexULL; -token.kind = 8; -break; -} -if (HasFlag(state.flags_ZF0, 0x2)){ -token.sub_kind = TokenCppKind_LiteralIntegerOctULL; -token.kind = 8; -break; -} -token.sub_kind = TokenCppKind_LiteralIntegerULL; -token.kind = 8; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_23: // pp_directive_whitespace -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LexError; -token.kind = 2; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LexError; -token.kind = 2; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x09:case 0x0b:case 0x0c:case 0x20: -{ -state.ptr += 1; -goto state_label_23; // pp_directive_whitespace -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: -case 0x45:case 0x46:case 0x47:case 0x48:case 0x49:case 0x4a:case 0x4b: -case 0x4c:case 0x4d:case 0x4e:case 0x4f:case 0x50:case 0x51:case 0x52: -case 0x53:case 0x54:case 0x55:case 0x56:case 0x57:case 0x58:case 0x59: -case 0x5a:case 0x5f:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: -case 0x66:case 0x67:case 0x68:case 0x69:case 0x6a:case 0x6b:case 0x6c: -case 0x6d:case 0x6e:case 0x6f:case 0x70:case 0x71:case 0x72:case 0x73: -case 0x74:case 0x75:case 0x76:case 0x77:case 0x78:case 0x79:case 0x7a: -{ -state.delim_first = state.ptr; -state.flags_KB0 |= 0x1; -state.ptr += 1; -goto state_label_24; // pp_directive -}break; -} -} -{ -state_label_24: // pp_directive -if (state.ptr == state.opl_ptr){ -if ((true)){ -state.delim_one_past_last = state.ptr; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -Lexeme_Table_Lookup lookup = lexeme_table_lookup(pp_directives_hash_array, pp_directives_key_array, pp_directives_value_array, pp_directives_slot_count, pp_directives_seed, state.delim_first, (state.delim_one_past_last - state.delim_first)); -if (lookup.found_match){ -token.kind = lookup.base_kind; -token.sub_kind = lookup.sub_kind; -break; -} -token.sub_kind = TokenCppKind_PPUnknown; -token.kind = 2; -}while(0); -switch (token.sub_kind){ -case TokenCppKind_PPInclude: -{ -state.flags_KF0 |= 0x1; -}break; -case TokenCppKind_PPError: -{ -state.flags_KF0 |= 0x2; -}break; -} -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -state.delim_one_past_last = state.ptr; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -Lexeme_Table_Lookup lookup = lexeme_table_lookup(pp_directives_hash_array, pp_directives_key_array, pp_directives_value_array, pp_directives_slot_count, pp_directives_seed, state.delim_first, (state.delim_one_past_last - state.delim_first)); -if (lookup.found_match){ -token.kind = lookup.base_kind; -token.sub_kind = lookup.sub_kind; -break; -} -token.sub_kind = TokenCppKind_PPUnknown; -token.kind = 2; -}while(0); -switch (token.sub_kind){ -case TokenCppKind_PPInclude: -{ -state.flags_KF0 |= 0x1; -}break; -case TokenCppKind_PPError: -{ -state.flags_KF0 |= 0x2; -}break; -} -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: -case 0x45:case 0x46:case 0x47:case 0x48:case 0x49:case 0x4a:case 0x4b: -case 0x4c:case 0x4d:case 0x4e:case 0x4f:case 0x50:case 0x51:case 0x52: -case 0x53:case 0x54:case 0x55:case 0x56:case 0x57:case 0x58:case 0x59: -case 0x5a:case 0x5f:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: -case 0x66:case 0x67:case 0x68:case 0x69:case 0x6a:case 0x6b:case 0x6c: -case 0x6d:case 0x6e:case 0x6f:case 0x70:case 0x71:case 0x72:case 0x73: -case 0x74:case 0x75:case 0x76:case 0x77:case 0x78:case 0x79:case 0x7a: -{ -state.ptr += 1; -goto state_label_24; // pp_directive -}break; -} -} -{ -state_label_25: // include_pointy -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LexError; -token.kind = 2; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LexError; -token.kind = 2; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x20:case 0x2e:case 0x2f:case 0x30:case 0x31:case 0x32:case 0x33: -case 0x34:case 0x35:case 0x36:case 0x37:case 0x38:case 0x39:case 0x41: -case 0x42:case 0x43:case 0x44:case 0x45:case 0x46:case 0x47:case 0x48: -case 0x49:case 0x4a:case 0x4b:case 0x4c:case 0x4d:case 0x4e:case 0x4f: -case 0x50:case 0x51:case 0x52:case 0x53:case 0x54:case 0x55:case 0x56: -case 0x57:case 0x58:case 0x59:case 0x5a:case 0x5c:case 0x5f:case 0x61: -case 0x62:case 0x63:case 0x64:case 0x65:case 0x66:case 0x67:case 0x68: -case 0x69:case 0x6a:case 0x6b:case 0x6c:case 0x6d:case 0x6e:case 0x6f: -case 0x70:case 0x71:case 0x72:case 0x73:case 0x74:case 0x75:case 0x76: -case 0x77:case 0x78:case 0x79:case 0x7a: -{ -state.ptr += 1; -goto state_label_25; // include_pointy -}break; -case 0x3e: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_PPIncludeFile; -token.kind = 10; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_26: // include_quotes -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LexError; -token.kind = 2; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LexError; -token.kind = 2; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x20:case 0x2e:case 0x2f:case 0x30:case 0x31:case 0x32:case 0x33: -case 0x34:case 0x35:case 0x36:case 0x37:case 0x38:case 0x39:case 0x41: -case 0x42:case 0x43:case 0x44:case 0x45:case 0x46:case 0x47:case 0x48: -case 0x49:case 0x4a:case 0x4b:case 0x4c:case 0x4d:case 0x4e:case 0x4f: -case 0x50:case 0x51:case 0x52:case 0x53:case 0x54:case 0x55:case 0x56: -case 0x57:case 0x58:case 0x59:case 0x5a:case 0x5c:case 0x5f:case 0x61: -case 0x62:case 0x63:case 0x64:case 0x65:case 0x66:case 0x67:case 0x68: -case 0x69:case 0x6a:case 0x6b:case 0x6c:case 0x6d:case 0x6e:case 0x6f: -case 0x70:case 0x71:case 0x72:case 0x73:case 0x74:case 0x75:case 0x76: -case 0x77:case 0x78:case 0x79:case 0x7a: -{ -state.ptr += 1; -goto state_label_26; // include_quotes -}break; -case 0x22: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_PPIncludeFile; -token.kind = 10; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_27: // pre_L -if (state.ptr == state.opl_ptr){ -if ((true)){ -goto state_label_2; // identifier -} -} -switch (*state.ptr){ -default: -{ -goto state_label_2; // identifier -}break; -case 0x22: -{ -state.ptr += 1; -goto state_label_32; // string -}break; -case 0x52: -{ -state.ptr += 1; -goto state_label_31; // pre_R -}break; -} -} -{ -state_label_28: // pre_u -if (state.ptr == state.opl_ptr){ -if ((true)){ -goto state_label_2; // identifier -} -} -switch (*state.ptr){ -default: -{ -goto state_label_2; // identifier -}break; -case 0x22: -{ -state.ptr += 1; -goto state_label_32; // string -}break; -case 0x38: -{ -state.ptr += 1; -state.flags_ZF0 |= 0x8; -goto state_label_30; // pre_u8 -}break; -case 0x52: -{ -state.ptr += 1; -goto state_label_31; // pre_R -}break; -} -} -{ -state_label_29: // pre_U -if (state.ptr == state.opl_ptr){ -if ((true)){ -goto state_label_2; // identifier -} -} -switch (*state.ptr){ -default: -{ -goto state_label_2; // identifier -}break; -case 0x22: -{ -state.ptr += 1; -goto state_label_32; // string -}break; -case 0x52: -{ -state.ptr += 1; -goto state_label_31; // pre_R -}break; -} -} -{ -state_label_30: // pre_u8 -if (state.ptr == state.opl_ptr){ -if ((true)){ -goto state_label_2; // identifier -} -} -switch (*state.ptr){ -default: -{ -goto state_label_2; // identifier -}break; -case 0x22: -{ -state.ptr += 1; -goto state_label_32; // string -}break; -case 0x52: -{ -state.ptr += 1; -goto state_label_31; // pre_R -}break; -} -} -{ -state_label_31: // pre_R -if (state.ptr == state.opl_ptr){ -if ((true)){ -goto state_label_2; // identifier -} -} -switch (*state.ptr){ -default: -{ -goto state_label_2; // identifier -}break; -case 0x22: -{ -state.ptr += 1; -state.delim_first = state.ptr; -goto state_label_45; // raw_string_get_delim -}break; -} -} -{ -state_label_32: // string -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LexError; -token.kind = 2; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -state.ptr += 1; -goto state_label_32; // string -}break; -case 0x0a: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LexError; -token.kind = 2; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x22: -{ -if ((!HasFlag(state.flags_ZF0, 0x40))){ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_ZF0, 0x4)){ -token.sub_kind = TokenCppKind_LiteralStringWide; -token.kind = 10; -break; -} -if (HasFlag(state.flags_ZF0, 0x8)){ -token.sub_kind = TokenCppKind_LiteralStringUTF8; -token.kind = 10; -break; -} -if (HasFlag(state.flags_ZF0, 0x10)){ -token.sub_kind = TokenCppKind_LiteralStringUTF16; -token.kind = 10; -break; -} -if (HasFlag(state.flags_ZF0, 0x20)){ -token.sub_kind = TokenCppKind_LiteralStringUTF32; -token.kind = 10; -break; -} -token.sub_kind = TokenCppKind_LiteralString; -token.kind = 10; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -state.ptr += 1; -goto state_label_32; // string -}break; -case 0x27: -{ -if ((HasFlag(state.flags_ZF0, 0x40))){ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_ZF0, 0x4)){ -token.sub_kind = TokenCppKind_LiteralCharacterWide; -token.kind = 10; -break; -} -if (HasFlag(state.flags_ZF0, 0x8)){ -token.sub_kind = TokenCppKind_LiteralCharacterUTF8; -token.kind = 10; -break; -} -if (HasFlag(state.flags_ZF0, 0x10)){ -token.sub_kind = TokenCppKind_LiteralCharacterUTF16; -token.kind = 10; -break; -} -if (HasFlag(state.flags_ZF0, 0x20)){ -token.sub_kind = TokenCppKind_LiteralCharacterUTF32; -token.kind = 10; -break; -} -token.sub_kind = TokenCppKind_LiteralCharacter; -token.kind = 10; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -state.ptr += 1; -goto state_label_32; // string -}break; -case 0x5c: -{ -state.ptr += 1; -goto state_label_33; // string_esc -}break; -} -} -{ -state_label_33: // string_esc -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LexError; -token.kind = 2; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_EOF; -token.kind = 0; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -result = true; -goto end; -} -} -switch (*state.ptr){ -default: -{ -state.ptr += 1; -goto state_label_32; // string -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37: -{ -state.ptr += 1; -goto state_label_34; // string_esc_oct2 -}break; -case 0x55: -{ -state.ptr += 1; -goto state_label_37; // string_esc_universal_8 -}break; -case 0x75: -{ -state.ptr += 1; -goto state_label_41; // string_esc_universal_4 -}break; -case 0x78: -{ -state.ptr += 1; -goto state_label_36; // string_esc_hex -}break; -} -} -{ -state_label_34: // string_esc_oct2 -if (state.ptr == state.opl_ptr){ -if ((true)){ -goto state_label_32; // string -} -} -switch (*state.ptr){ -default: -{ -goto state_label_32; // string -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37: -{ -state.ptr += 1; -goto state_label_35; // string_esc_oct1 -}break; -} -} -{ -state_label_35: // string_esc_oct1 -if (state.ptr == state.opl_ptr){ -if ((true)){ -goto state_label_32; // string -} -} -switch (*state.ptr){ -default: -{ -goto state_label_32; // string -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37: -{ -state.ptr += 1; -goto state_label_32; // string -}break; -} -} -{ -state_label_36: // string_esc_hex -if (state.ptr == state.opl_ptr){ -if ((true)){ -goto state_label_32; // string -} -} -switch (*state.ptr){ -default: -{ -goto state_label_32; // string -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: -case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: -case 0x66: -{ -state.ptr += 1; -goto state_label_36; // string_esc_hex -}break; -} -} -{ -state_label_37: // string_esc_universal_8 -if (state.ptr == state.opl_ptr){ -if ((true)){ -goto state_label_32; // string -} -} -switch (*state.ptr){ -default: -{ -goto state_label_32; // string -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: -case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: -case 0x66: -{ -state.ptr += 1; -goto state_label_38; // string_esc_universal_7 -}break; -} -} -{ -state_label_38: // string_esc_universal_7 -if (state.ptr == state.opl_ptr){ -if ((true)){ -goto state_label_32; // string -} -} -switch (*state.ptr){ -default: -{ -goto state_label_32; // string -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: -case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: -case 0x66: -{ -state.ptr += 1; -goto state_label_39; // string_esc_universal_6 -}break; -} -} -{ -state_label_39: // string_esc_universal_6 -if (state.ptr == state.opl_ptr){ -if ((true)){ -goto state_label_32; // string -} -} -switch (*state.ptr){ -default: -{ -goto state_label_32; // string -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: -case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: -case 0x66: -{ -state.ptr += 1; -goto state_label_40; // string_esc_universal_5 -}break; -} -} -{ -state_label_40: // string_esc_universal_5 -if (state.ptr == state.opl_ptr){ -if ((true)){ -goto state_label_32; // string -} -} -switch (*state.ptr){ -default: -{ -goto state_label_32; // string -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: -case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: -case 0x66: -{ -state.ptr += 1; -goto state_label_41; // string_esc_universal_4 -}break; -} -} -{ -state_label_41: // string_esc_universal_4 -if (state.ptr == state.opl_ptr){ -if ((true)){ -goto state_label_32; // string -} -} -switch (*state.ptr){ -default: -{ -goto state_label_32; // string -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: -case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: -case 0x66: -{ -state.ptr += 1; -goto state_label_42; // string_esc_universal_3 -}break; -} -} -{ -state_label_42: // string_esc_universal_3 -if (state.ptr == state.opl_ptr){ -if ((true)){ -goto state_label_32; // string -} -} -switch (*state.ptr){ -default: -{ -goto state_label_32; // string -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: -case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: -case 0x66: -{ -state.ptr += 1; -goto state_label_43; // string_esc_universal_2 -}break; -} -} -{ -state_label_43: // string_esc_universal_2 -if (state.ptr == state.opl_ptr){ -if ((true)){ -goto state_label_32; // string -} -} -switch (*state.ptr){ -default: -{ -goto state_label_32; // string -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: -case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: -case 0x66: -{ -state.ptr += 1; -goto state_label_44; // string_esc_universal_1 -}break; -} -} -{ -state_label_44: // string_esc_universal_1 -if (state.ptr == state.opl_ptr){ -if ((true)){ -goto state_label_32; // string -} -} -switch (*state.ptr){ -default: -{ -goto state_label_32; // string -}break; -case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: -case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: -case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: -case 0x66: -{ -state.ptr += 1; -goto state_label_32; // string -}break; -} -} -{ -state_label_45: // raw_string_get_delim -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LexError; -token.kind = 2; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_EOF; -token.kind = 0; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -result = true; -goto end; -} -} -switch (*state.ptr){ -default: -{ -state.ptr += 1; -goto state_label_45; // raw_string_get_delim -}break; -case 0x20:case 0x29:case 0x5c: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LexError; -token.kind = 2; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x28: -{ -state.delim_one_past_last = state.ptr; -state.ptr += 1; -goto state_label_46; // raw_string_find_close -}break; -} -} -{ -state_label_46: // raw_string_find_close -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LexError; -token.kind = 2; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_EOF; -token.kind = 0; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -result = true; -goto end; -} -} -switch (*state.ptr){ -default: -{ -state.ptr += 1; -goto state_label_46; // raw_string_find_close -}break; -case 0x29: -{ -state.ptr += 1; -goto state_label_47; // raw_string_try_delim -}break; -} -} -{ -state_label_47: // raw_string_try_delim -u64 delim_length = state.delim_one_past_last - state.delim_first; -u64 parse_length = 0; -for (;;){ -if (parse_length == delim_length){ -goto state_label_48; // raw_string_try_quote -} -if (state.ptr == state.opl_ptr){ -goto state_label_48; // raw_string_try_quote -} -if (*state.ptr == state.delim_first[parse_length]){ -state.ptr += 1; -parse_length += 1; -} -else{ -goto state_label_46; // raw_string_find_close -} -} -} -{ -state_label_48: // raw_string_try_quote -if (state.ptr == state.opl_ptr){ -if ((true)){ -goto state_label_46; // raw_string_find_close -} -} -switch (*state.ptr){ -default: -{ -goto state_label_46; // raw_string_find_close -}break; -case 0x22: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -if (HasFlag(state.flags_ZF0, 0x4)){ -token.sub_kind = TokenCppKind_LiteralStringWideRaw; -token.kind = 10; -break; -} -if (HasFlag(state.flags_ZF0, 0x8)){ -token.sub_kind = TokenCppKind_LiteralStringUTF8Raw; -token.kind = 10; -break; -} -if (HasFlag(state.flags_ZF0, 0x10)){ -token.sub_kind = TokenCppKind_LiteralStringUTF16Raw; -token.kind = 10; -break; -} -if (HasFlag(state.flags_ZF0, 0x20)){ -token.sub_kind = TokenCppKind_LiteralStringUTF32Raw; -token.kind = 10; -break; -} -token.sub_kind = TokenCppKind_LiteralStringRaw; -token.kind = 10; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_49: // comment_block -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_BlockComment; -token.kind = 3; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_EOF; -token.kind = 0; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -result = true; -goto end; -} -} -switch (*state.ptr){ -default: -{ -state.ptr += 1; -goto state_label_49; // comment_block -}break; -case 0x0a: -{ -state.ptr += 1; -state.flags_KB0 &= ~(0x1); -state.flags_KF0 &= ~(0x1); -goto state_label_49; // comment_block -}break; -case 0x2a: -{ -state.ptr += 1; -goto state_label_50; // comment_block_try_close -}break; -} -} -{ -state_label_50: // comment_block_try_close -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_BlockComment; -token.kind = 3; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_EOF; -token.kind = 0; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -result = true; -goto end; -} -} -switch (*state.ptr){ -default: -{ -state.ptr += 1; -goto state_label_49; // comment_block -}break; -case 0x2a: -{ -state.ptr += 1; -goto state_label_50; // comment_block_try_close -}break; -case 0x2f: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_BlockComment; -token.kind = 3; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_51: // comment_line -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LineComment; -token.kind = 3; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -state.ptr += 1; -goto state_label_51; // comment_line -}break; -case 0x0a: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LineComment; -token.kind = 3; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_52: // op stage -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Colon; -token.kind = 15; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Colon; -token.kind = 15; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x3a: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_ColonColon; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_53: // op stage -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Plus; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Plus; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x2b: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_PlusPlus; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x3d: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_PlusEq; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_54: // op stage -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Minus; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Minus; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x2d: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_MinusMinus; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x3d: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_MinusEq; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x3e: -{ -state.ptr += 1; -goto state_label_55; // op stage -}break; -} -} -{ -state_label_55: // op stage -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Arrow; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Arrow; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x2a: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_ArrowStar; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_56: // op stage -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Less; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Less; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x3c: -{ -state.ptr += 1; -goto state_label_65; // op stage -}break; -case 0x3d: -{ -state.ptr += 1; -goto state_label_58; // op stage -}break; -} -} -{ -state_label_57: // op stage -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Grtr; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Grtr; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x3d: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_GrtrEq; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x3e: -{ -state.ptr += 1; -goto state_label_66; // op stage -}break; -} -} -{ -state_label_58: // op stage -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LessEq; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LessEq; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x3e: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Compare; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_59: // op stage -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Eq; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Eq; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x3d: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_EqEq; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_60: // op stage -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Not; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Not; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x3d: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_NotEq; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_61: // op stage -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_And; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_And; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x26: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_AndAnd; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_62: // op stage -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Or; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Or; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x7c: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_OrOr; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_63: // op stage -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Star; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Star; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x3d: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_StarEq; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_64: // op stage -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Mod; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_Mod; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x3d: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_ModEq; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_65: // op stage -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LeftLeft; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LeftLeft; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x3d: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LeftLeftEq; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_66: // op stage -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_RightRight; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_RightRight; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x3d: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_RightRightEq; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_67: // op stage -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_PPStringify; -token.kind = 15; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_PPStringify; -token.kind = 15; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x23: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_PPConcat; -token.kind = 15; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -{ -state_label_68: // op stage -if (state.ptr == state.opl_ptr){ -if ((true)){ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LexError; -token.kind = 2; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -} -} -switch (*state.ptr){ -default: -{ -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_LexError; -token.kind = 2; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -case 0x2e: -{ -state.ptr += 1; -{ -Token token = {}; -token.pos = (i64)(state.emit_ptr - state.base); -token.size = (i64)(state.ptr - state.emit_ptr); -token.flags = state.flags_KB0; -do{ -token.sub_kind = TokenCppKind_DotDotDot; -token.kind = 7; -}while(0); -token_list_push(arena, list, &token); -emit_counter += 1; -if (emit_counter == max){ -goto end; -} -state.emit_ptr = state.ptr; -} -state.flags_ZF0 = 0; -goto state_label_1; // root -}break; -} -} -end:; -block_copy_struct(state_ptr, &state); -return(result); + b32 result = false; + u64 emit_counter = 0; + Lex_State_Cpp state; + block_copy_struct(&state, state_ptr); + { + state_label_1: // root + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_EOF; + token.kind = 0; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + result = true; + goto end; + } + } + switch (*state.ptr){ + case 0x00:case 0x01:case 0x02:case 0x03:case 0x04:case 0x05:case 0x06: + case 0x07:case 0x08:case 0x0e:case 0x0f:case 0x10:case 0x11:case 0x12: + case 0x13:case 0x14:case 0x15:case 0x16:case 0x17:case 0x18:case 0x19: + case 0x1a:case 0x1b:case 0x1c:case 0x1d:case 0x1e:case 0x1f:case 0x40: + case 0x60:case 0x7f: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LexError; + token.kind = 2; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x09:case 0x0b:case 0x0c:case 0x0d:case 0x20: + { + if ((HasFlag(state.flags_KF0, 0x2))){ + state.ptr += 1; + goto state_label_4; // error_body + } + state.ptr += 1; + goto state_label_3; // whitespace + }break; + case 0x0a: + { + state.ptr += 1; + state.flags_KB0 &= ~(0x1); + state.flags_KF0 &= ~(0x1); + state.flags_KF0 &= ~(0x2); + goto state_label_3; // whitespace + }break; + case 0x21: + { + state.ptr += 1; + goto state_label_60; // op stage + }break; + case 0x22: + { + if ((HasFlag(state.flags_KF0, 0x1))){ + state.ptr += 1; + goto state_label_26; // include_quotes + } + state.ptr += 1; + goto state_label_32; // string + }break; + case 0x23: + { + if ((!HasFlag(state.flags_KB0, 0x1))){ + state.ptr += 1; + goto state_label_23; // pp_directive_whitespace + } + state.ptr += 1; + goto state_label_67; // op stage + }break; + default: + { + state.ptr += 1; + goto state_label_2; // identifier + }break; + case 0x25: + { + state.ptr += 1; + goto state_label_64; // op stage + }break; + case 0x26: + { + state.ptr += 1; + goto state_label_61; // op stage + }break; + case 0x27: + { + state.ptr += 1; + state.flags_ZF0 |= 0x40; + goto state_label_32; // string + }break; + case 0x28: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_ParenOp; + token.kind = 13; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x29: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_ParenCl; + token.kind = 14; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x2a: + { + state.ptr += 1; + goto state_label_63; // op stage + }break; + case 0x2b: + { + state.ptr += 1; + goto state_label_53; // op stage + }break; + case 0x2c: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Comma; + token.kind = 15; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x2d: + { + state.ptr += 1; + goto state_label_54; // op stage + }break; + case 0x2e: + { + state.ptr += 1; + goto state_label_6; // operator_or_fnumber_dot + }break; + case 0x2f: + { + state.ptr += 1; + goto state_label_7; // operator_or_comment_slash + }break; + case 0x30: + { + state.ptr += 1; + goto state_label_9; // znumber + }break; + case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36:case 0x37: + case 0x38:case 0x39: + { + state.ptr += 1; + goto state_label_8; // number + }break; + case 0x3a: + { + state.ptr += 1; + goto state_label_52; // op stage + }break; + case 0x3b: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Semicolon; + token.kind = 15; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x3c: + { + if ((!HasFlag(state.flags_KF0, 0x1))){ + state.ptr += 1; + goto state_label_56; // op stage + } + state.ptr += 1; + goto state_label_25; // include_pointy + }break; + case 0x3d: + { + state.ptr += 1; + goto state_label_59; // op stage + }break; + case 0x3e: + { + state.ptr += 1; + goto state_label_57; // op stage + }break; + case 0x3f: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Ternary; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x4c: + { + state.ptr += 1; + state.flags_ZF0 |= 0x4; + goto state_label_27; // pre_L + }break; + case 0x52: + { + state.ptr += 1; + goto state_label_31; // pre_R + }break; + case 0x55: + { + state.ptr += 1; + state.flags_ZF0 |= 0x20; + goto state_label_29; // pre_U + }break; + case 0x5b: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_BrackOp; + token.kind = 13; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x5c: + { + state.ptr += 1; + goto state_label_5; // backslash + }break; + case 0x5d: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_BrackCl; + token.kind = 14; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x5e: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Xor; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x75: + { + state.ptr += 1; + state.flags_ZF0 |= 0x10; + goto state_label_28; // pre_u + }break; + case 0x7b: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_BraceOp; + token.kind = 11; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x7c: + { + state.ptr += 1; + goto state_label_62; // op stage + }break; + case 0x7d: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_BraceCl; + token.kind = 12; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x7e: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Tilde; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_2: // identifier + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_KB0, 0x1)){ + Lexeme_Table_Lookup lookup = lexeme_table_lookup(pp_keys_hash_array, pp_keys_key_array, pp_keys_value_array, pp_keys_slot_count, pp_keys_seed, state.emit_ptr, token.size); + if (lookup.found_match){ + token.kind = lookup.base_kind; + token.sub_kind = lookup.sub_kind; + break; + } + } + Lexeme_Table_Lookup lookup = lexeme_table_lookup(main_keys_hash_array, main_keys_key_array, main_keys_value_array, main_keys_slot_count, main_keys_seed, state.emit_ptr, token.size); + if (lookup.found_match){ + token.kind = lookup.base_kind; + token.sub_kind = lookup.sub_kind; + break; + } + token.sub_kind = TokenCppKind_Identifier; + token.kind = 6; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + case 0x00:case 0x01:case 0x02:case 0x03:case 0x04:case 0x05:case 0x06: + case 0x07:case 0x08:case 0x09:case 0x0a:case 0x0b:case 0x0c:case 0x0d: + case 0x0e:case 0x0f:case 0x10:case 0x11:case 0x12:case 0x13:case 0x14: + case 0x15:case 0x16:case 0x17:case 0x18:case 0x19:case 0x1a:case 0x1b: + case 0x1c:case 0x1d:case 0x1e:case 0x1f:case 0x20:case 0x21:case 0x22: + case 0x23:case 0x25:case 0x26:case 0x27:case 0x28:case 0x29:case 0x2a: + case 0x2b:case 0x2c:case 0x2d:case 0x2e:case 0x2f:case 0x3a:case 0x3b: + case 0x3c:case 0x3d:case 0x3e:case 0x3f:case 0x40:case 0x5b:case 0x5c: + case 0x5d:case 0x5e:case 0x60:case 0x7b:case 0x7c:case 0x7d:case 0x7e: + case 0x7f: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_KB0, 0x1)){ + Lexeme_Table_Lookup lookup = lexeme_table_lookup(pp_keys_hash_array, pp_keys_key_array, pp_keys_value_array, pp_keys_slot_count, pp_keys_seed, state.emit_ptr, token.size); + if (lookup.found_match){ + token.kind = lookup.base_kind; + token.sub_kind = lookup.sub_kind; + break; + } + } + Lexeme_Table_Lookup lookup = lexeme_table_lookup(main_keys_hash_array, main_keys_key_array, main_keys_value_array, main_keys_slot_count, main_keys_seed, state.emit_ptr, token.size); + if (lookup.found_match){ + token.kind = lookup.base_kind; + token.sub_kind = lookup.sub_kind; + break; + } + token.sub_kind = TokenCppKind_Identifier; + token.kind = 6; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + default: + { + state.ptr += 1; + goto state_label_2; // identifier + }break; + } + } + { + state_label_3: // whitespace + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Whitespace; + token.kind = 1; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Whitespace; + token.kind = 1; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x09:case 0x0b:case 0x0c:case 0x0d:case 0x20: + { + state.ptr += 1; + goto state_label_3; // whitespace + }break; + case 0x0a: + { + state.ptr += 1; + state.flags_KB0 &= ~(0x1); + state.flags_KF0 &= ~(0x1); + state.flags_KF0 &= ~(0x2); + goto state_label_3; // whitespace + }break; + } + } + { + state_label_4: // error_body + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_PPErrorMessage; + token.kind = 10; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + state.ptr += 1; + goto state_label_4; // error_body + }break; + case 0x0a: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_PPErrorMessage; + token.kind = 10; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_5: // backslash + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Backslash; + token.kind = 1; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Backslash; + token.kind = 1; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x0a: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Backslash; + token.kind = 1; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_6: // operator_or_fnumber_dot + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Dot; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Dot; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x2a: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_DotStar; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x2e: + { + state.ptr += 1; + goto state_label_68; // op stage + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37:case 0x38:case 0x39: + { + state.ptr += 1; + goto state_label_10; // fnumber_decimal + }break; + } + } + { + state_label_7: // operator_or_comment_slash + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Div; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Div; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x2a: + { + state.ptr += 1; + goto state_label_49; // comment_block + }break; + case 0x2f: + { + state.ptr += 1; + goto state_label_51; // comment_line + }break; + case 0x3d: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_DivEq; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_8: // number + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralInteger; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralInteger; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x2e: + { + state.ptr += 1; + goto state_label_10; // fnumber_decimal + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37:case 0x38:case 0x39: + { + state.ptr += 1; + goto state_label_8; // number + }break; + case 0x45:case 0x65: + { + state.ptr += 1; + goto state_label_11; // fnumber_exponent + }break; + case 0x4c: + { + state.ptr += 1; + goto state_label_18; // L_number + }break; + case 0x55:case 0x75: + { + state.ptr += 1; + goto state_label_17; // U_number + }break; + case 0x6c: + { + state.ptr += 1; + goto state_label_20; // l_number + }break; + } + } + { + state_label_9: // znumber + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralInteger; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralInteger; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x2e: + { + state.ptr += 1; + goto state_label_10; // fnumber_decimal + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37: + { + state.ptr += 1; + state.flags_ZF0 |= 0x2; + goto state_label_16; // number_oct + }break; + case 0x45:case 0x65: + { + state.ptr += 1; + goto state_label_11; // fnumber_exponent + }break; + case 0x4c: + { + state.ptr += 1; + goto state_label_18; // L_number + }break; + case 0x55:case 0x75: + { + state.ptr += 1; + goto state_label_17; // U_number + }break; + case 0x58:case 0x78: + { + state.ptr += 1; + state.flags_ZF0 |= 0x1; + goto state_label_14; // number_hex_first + }break; + case 0x6c: + { + state.ptr += 1; + goto state_label_20; // l_number + }break; + } + } + { + state_label_10: // fnumber_decimal + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralFloat64; + token.kind = 9; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralFloat64; + token.kind = 9; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37:case 0x38:case 0x39: + { + state.ptr += 1; + goto state_label_10; // fnumber_decimal + }break; + case 0x45:case 0x65: + { + state.ptr += 1; + goto state_label_11; // fnumber_exponent + }break; + case 0x46:case 0x66: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralFloat32; + token.kind = 9; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x4c:case 0x6c: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralFloat64; + token.kind = 9; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_11: // fnumber_exponent + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralFloat64; + token.kind = 9; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralFloat64; + token.kind = 9; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x2b:case 0x2d: + { + state.ptr += 1; + goto state_label_12; // fnumber_exponent_sign + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37:case 0x38:case 0x39: + { + state.ptr += 1; + goto state_label_13; // fnumber_exponent_digits + }break; + case 0x46:case 0x66: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralFloat32; + token.kind = 9; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x4c:case 0x6c: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralFloat64; + token.kind = 9; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_12: // fnumber_exponent_sign + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralFloat64; + token.kind = 9; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralFloat64; + token.kind = 9; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37:case 0x38:case 0x39: + { + state.ptr += 1; + goto state_label_13; // fnumber_exponent_digits + }break; + case 0x46:case 0x66: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralFloat32; + token.kind = 9; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x4c:case 0x6c: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralFloat64; + token.kind = 9; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_13: // fnumber_exponent_digits + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralFloat64; + token.kind = 9; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralFloat64; + token.kind = 9; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37:case 0x38:case 0x39: + { + state.ptr += 1; + goto state_label_13; // fnumber_exponent_digits + }break; + case 0x46:case 0x66: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralFloat32; + token.kind = 9; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x4c:case 0x6c: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralFloat64; + token.kind = 9; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_14: // number_hex_first + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LexError; + token.kind = 2; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LexError; + token.kind = 2; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: + case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: + case 0x66: + { + state.ptr += 1; + goto state_label_15; // number_hex + }break; + } + } + { + state_label_15: // number_hex + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralIntegerHex; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralIntegerHex; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: + case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: + case 0x66: + { + state.ptr += 1; + goto state_label_15; // number_hex + }break; + case 0x4c: + { + state.ptr += 1; + goto state_label_18; // L_number + }break; + case 0x55:case 0x75: + { + state.ptr += 1; + goto state_label_17; // U_number + }break; + case 0x6c: + { + state.ptr += 1; + goto state_label_20; // l_number + }break; + } + } + { + state_label_16: // number_oct + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralIntegerOct; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LiteralIntegerOct; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37: + { + state.ptr += 1; + state.flags_ZF0 |= 0x2; + goto state_label_16; // number_oct + }break; + case 0x4c: + { + state.ptr += 1; + goto state_label_18; // L_number + }break; + case 0x55:case 0x75: + { + state.ptr += 1; + goto state_label_17; // U_number + }break; + case 0x6c: + { + state.ptr += 1; + goto state_label_20; // l_number + }break; + } + } + { + state_label_17: // U_number + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_ZF0, 0x1)){ + token.sub_kind = TokenCppKind_LiteralIntegerHexU; + token.kind = 8; + break; + } + if (HasFlag(state.flags_ZF0, 0x2)){ + token.sub_kind = TokenCppKind_LiteralIntegerOctU; + token.kind = 8; + break; + } + token.sub_kind = TokenCppKind_LiteralIntegerU; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_ZF0, 0x1)){ + token.sub_kind = TokenCppKind_LiteralIntegerHexU; + token.kind = 8; + break; + } + if (HasFlag(state.flags_ZF0, 0x2)){ + token.sub_kind = TokenCppKind_LiteralIntegerOctU; + token.kind = 8; + break; + } + token.sub_kind = TokenCppKind_LiteralIntegerU; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x4c: + { + state.ptr += 1; + goto state_label_19; // UL_number + }break; + case 0x6c: + { + state.ptr += 1; + goto state_label_21; // Ul_number + }break; + } + } + { + state_label_18: // L_number + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_ZF0, 0x1)){ + token.sub_kind = TokenCppKind_LiteralIntegerHexL; + token.kind = 8; + break; + } + if (HasFlag(state.flags_ZF0, 0x2)){ + token.sub_kind = TokenCppKind_LiteralIntegerOctL; + token.kind = 8; + break; + } + token.sub_kind = TokenCppKind_LiteralIntegerL; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_ZF0, 0x1)){ + token.sub_kind = TokenCppKind_LiteralIntegerHexL; + token.kind = 8; + break; + } + if (HasFlag(state.flags_ZF0, 0x2)){ + token.sub_kind = TokenCppKind_LiteralIntegerOctL; + token.kind = 8; + break; + } + token.sub_kind = TokenCppKind_LiteralIntegerL; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x4c: + { + state.ptr += 1; + goto state_label_22; // LL_number + }break; + case 0x55:case 0x75: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_ZF0, 0x1)){ + token.sub_kind = TokenCppKind_LiteralIntegerHexUL; + token.kind = 8; + break; + } + if (HasFlag(state.flags_ZF0, 0x2)){ + token.sub_kind = TokenCppKind_LiteralIntegerOctUL; + token.kind = 8; + break; + } + token.sub_kind = TokenCppKind_LiteralIntegerUL; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_19: // UL_number + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_ZF0, 0x1)){ + token.sub_kind = TokenCppKind_LiteralIntegerHexUL; + token.kind = 8; + break; + } + if (HasFlag(state.flags_ZF0, 0x2)){ + token.sub_kind = TokenCppKind_LiteralIntegerOctUL; + token.kind = 8; + break; + } + token.sub_kind = TokenCppKind_LiteralIntegerUL; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_ZF0, 0x1)){ + token.sub_kind = TokenCppKind_LiteralIntegerHexUL; + token.kind = 8; + break; + } + if (HasFlag(state.flags_ZF0, 0x2)){ + token.sub_kind = TokenCppKind_LiteralIntegerOctUL; + token.kind = 8; + break; + } + token.sub_kind = TokenCppKind_LiteralIntegerUL; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x4c: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_ZF0, 0x1)){ + token.sub_kind = TokenCppKind_LiteralIntegerHexULL; + token.kind = 8; + break; + } + if (HasFlag(state.flags_ZF0, 0x2)){ + token.sub_kind = TokenCppKind_LiteralIntegerOctULL; + token.kind = 8; + break; + } + token.sub_kind = TokenCppKind_LiteralIntegerULL; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_20: // l_number + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_ZF0, 0x1)){ + token.sub_kind = TokenCppKind_LiteralIntegerHexL; + token.kind = 8; + break; + } + if (HasFlag(state.flags_ZF0, 0x2)){ + token.sub_kind = TokenCppKind_LiteralIntegerOctL; + token.kind = 8; + break; + } + token.sub_kind = TokenCppKind_LiteralIntegerL; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_ZF0, 0x1)){ + token.sub_kind = TokenCppKind_LiteralIntegerHexL; + token.kind = 8; + break; + } + if (HasFlag(state.flags_ZF0, 0x2)){ + token.sub_kind = TokenCppKind_LiteralIntegerOctL; + token.kind = 8; + break; + } + token.sub_kind = TokenCppKind_LiteralIntegerL; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x55:case 0x75: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_ZF0, 0x1)){ + token.sub_kind = TokenCppKind_LiteralIntegerHexUL; + token.kind = 8; + break; + } + if (HasFlag(state.flags_ZF0, 0x2)){ + token.sub_kind = TokenCppKind_LiteralIntegerOctUL; + token.kind = 8; + break; + } + token.sub_kind = TokenCppKind_LiteralIntegerUL; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x6c: + { + state.ptr += 1; + goto state_label_22; // LL_number + }break; + } + } + { + state_label_21: // Ul_number + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_ZF0, 0x1)){ + token.sub_kind = TokenCppKind_LiteralIntegerHexUL; + token.kind = 8; + break; + } + if (HasFlag(state.flags_ZF0, 0x2)){ + token.sub_kind = TokenCppKind_LiteralIntegerOctUL; + token.kind = 8; + break; + } + token.sub_kind = TokenCppKind_LiteralIntegerUL; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_ZF0, 0x1)){ + token.sub_kind = TokenCppKind_LiteralIntegerHexUL; + token.kind = 8; + break; + } + if (HasFlag(state.flags_ZF0, 0x2)){ + token.sub_kind = TokenCppKind_LiteralIntegerOctUL; + token.kind = 8; + break; + } + token.sub_kind = TokenCppKind_LiteralIntegerUL; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x6c: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_ZF0, 0x1)){ + token.sub_kind = TokenCppKind_LiteralIntegerHexULL; + token.kind = 8; + break; + } + if (HasFlag(state.flags_ZF0, 0x2)){ + token.sub_kind = TokenCppKind_LiteralIntegerOctULL; + token.kind = 8; + break; + } + token.sub_kind = TokenCppKind_LiteralIntegerULL; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_22: // LL_number + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_ZF0, 0x1)){ + token.sub_kind = TokenCppKind_LiteralIntegerHexLL; + token.kind = 8; + break; + } + if (HasFlag(state.flags_ZF0, 0x2)){ + token.sub_kind = TokenCppKind_LiteralIntegerOctLL; + token.kind = 8; + break; + } + token.sub_kind = TokenCppKind_LiteralIntegerLL; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_ZF0, 0x1)){ + token.sub_kind = TokenCppKind_LiteralIntegerHexLL; + token.kind = 8; + break; + } + if (HasFlag(state.flags_ZF0, 0x2)){ + token.sub_kind = TokenCppKind_LiteralIntegerOctLL; + token.kind = 8; + break; + } + token.sub_kind = TokenCppKind_LiteralIntegerLL; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x55:case 0x75: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_ZF0, 0x1)){ + token.sub_kind = TokenCppKind_LiteralIntegerHexULL; + token.kind = 8; + break; + } + if (HasFlag(state.flags_ZF0, 0x2)){ + token.sub_kind = TokenCppKind_LiteralIntegerOctULL; + token.kind = 8; + break; + } + token.sub_kind = TokenCppKind_LiteralIntegerULL; + token.kind = 8; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_23: // pp_directive_whitespace + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LexError; + token.kind = 2; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LexError; + token.kind = 2; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x09:case 0x0b:case 0x0c:case 0x20: + { + state.ptr += 1; + goto state_label_23; // pp_directive_whitespace + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: + case 0x45:case 0x46:case 0x47:case 0x48:case 0x49:case 0x4a:case 0x4b: + case 0x4c:case 0x4d:case 0x4e:case 0x4f:case 0x50:case 0x51:case 0x52: + case 0x53:case 0x54:case 0x55:case 0x56:case 0x57:case 0x58:case 0x59: + case 0x5a:case 0x5f:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: + case 0x66:case 0x67:case 0x68:case 0x69:case 0x6a:case 0x6b:case 0x6c: + case 0x6d:case 0x6e:case 0x6f:case 0x70:case 0x71:case 0x72:case 0x73: + case 0x74:case 0x75:case 0x76:case 0x77:case 0x78:case 0x79:case 0x7a: + { + state.delim_first = state.ptr; + state.flags_KB0 |= 0x1; + state.ptr += 1; + goto state_label_24; // pp_directive + }break; + } + } + { + state_label_24: // pp_directive + if (state.ptr == state.opl_ptr){ + if ((true)){ + state.delim_one_past_last = state.ptr; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + Lexeme_Table_Lookup lookup = lexeme_table_lookup(pp_directives_hash_array, pp_directives_key_array, pp_directives_value_array, pp_directives_slot_count, pp_directives_seed, state.delim_first, (state.delim_one_past_last - state.delim_first)); + if (lookup.found_match){ + token.kind = lookup.base_kind; + token.sub_kind = lookup.sub_kind; + break; + } + token.sub_kind = TokenCppKind_PPUnknown; + token.kind = 2; + }while(0); + switch (token.sub_kind){ + case TokenCppKind_PPInclude: + { + state.flags_KF0 |= 0x1; + }break; + case TokenCppKind_PPError: + { + state.flags_KF0 |= 0x2; + }break; + } + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + state.delim_one_past_last = state.ptr; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + Lexeme_Table_Lookup lookup = lexeme_table_lookup(pp_directives_hash_array, pp_directives_key_array, pp_directives_value_array, pp_directives_slot_count, pp_directives_seed, state.delim_first, (state.delim_one_past_last - state.delim_first)); + if (lookup.found_match){ + token.kind = lookup.base_kind; + token.sub_kind = lookup.sub_kind; + break; + } + token.sub_kind = TokenCppKind_PPUnknown; + token.kind = 2; + }while(0); + switch (token.sub_kind){ + case TokenCppKind_PPInclude: + { + state.flags_KF0 |= 0x1; + }break; + case TokenCppKind_PPError: + { + state.flags_KF0 |= 0x2; + }break; + } + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: + case 0x45:case 0x46:case 0x47:case 0x48:case 0x49:case 0x4a:case 0x4b: + case 0x4c:case 0x4d:case 0x4e:case 0x4f:case 0x50:case 0x51:case 0x52: + case 0x53:case 0x54:case 0x55:case 0x56:case 0x57:case 0x58:case 0x59: + case 0x5a:case 0x5f:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: + case 0x66:case 0x67:case 0x68:case 0x69:case 0x6a:case 0x6b:case 0x6c: + case 0x6d:case 0x6e:case 0x6f:case 0x70:case 0x71:case 0x72:case 0x73: + case 0x74:case 0x75:case 0x76:case 0x77:case 0x78:case 0x79:case 0x7a: + { + state.ptr += 1; + goto state_label_24; // pp_directive + }break; + } + } + { + state_label_25: // include_pointy + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LexError; + token.kind = 2; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LexError; + token.kind = 2; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x20:case 0x2e:case 0x2f:case 0x30:case 0x31:case 0x32:case 0x33: + case 0x34:case 0x35:case 0x36:case 0x37:case 0x38:case 0x39:case 0x41: + case 0x42:case 0x43:case 0x44:case 0x45:case 0x46:case 0x47:case 0x48: + case 0x49:case 0x4a:case 0x4b:case 0x4c:case 0x4d:case 0x4e:case 0x4f: + case 0x50:case 0x51:case 0x52:case 0x53:case 0x54:case 0x55:case 0x56: + case 0x57:case 0x58:case 0x59:case 0x5a:case 0x5c:case 0x5f:case 0x61: + case 0x62:case 0x63:case 0x64:case 0x65:case 0x66:case 0x67:case 0x68: + case 0x69:case 0x6a:case 0x6b:case 0x6c:case 0x6d:case 0x6e:case 0x6f: + case 0x70:case 0x71:case 0x72:case 0x73:case 0x74:case 0x75:case 0x76: + case 0x77:case 0x78:case 0x79:case 0x7a: + { + state.ptr += 1; + goto state_label_25; // include_pointy + }break; + case 0x3e: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_PPIncludeFile; + token.kind = 10; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_26: // include_quotes + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LexError; + token.kind = 2; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LexError; + token.kind = 2; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x20:case 0x2e:case 0x2f:case 0x30:case 0x31:case 0x32:case 0x33: + case 0x34:case 0x35:case 0x36:case 0x37:case 0x38:case 0x39:case 0x41: + case 0x42:case 0x43:case 0x44:case 0x45:case 0x46:case 0x47:case 0x48: + case 0x49:case 0x4a:case 0x4b:case 0x4c:case 0x4d:case 0x4e:case 0x4f: + case 0x50:case 0x51:case 0x52:case 0x53:case 0x54:case 0x55:case 0x56: + case 0x57:case 0x58:case 0x59:case 0x5a:case 0x5c:case 0x5f:case 0x61: + case 0x62:case 0x63:case 0x64:case 0x65:case 0x66:case 0x67:case 0x68: + case 0x69:case 0x6a:case 0x6b:case 0x6c:case 0x6d:case 0x6e:case 0x6f: + case 0x70:case 0x71:case 0x72:case 0x73:case 0x74:case 0x75:case 0x76: + case 0x77:case 0x78:case 0x79:case 0x7a: + { + state.ptr += 1; + goto state_label_26; // include_quotes + }break; + case 0x22: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_PPIncludeFile; + token.kind = 10; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_27: // pre_L + if (state.ptr == state.opl_ptr){ + if ((true)){ + goto state_label_2; // identifier + } + } + switch (*state.ptr){ + default: + { + goto state_label_2; // identifier + }break; + case 0x22: + { + state.ptr += 1; + goto state_label_32; // string + }break; + case 0x52: + { + state.ptr += 1; + goto state_label_31; // pre_R + }break; + } + } + { + state_label_28: // pre_u + if (state.ptr == state.opl_ptr){ + if ((true)){ + goto state_label_2; // identifier + } + } + switch (*state.ptr){ + default: + { + goto state_label_2; // identifier + }break; + case 0x22: + { + state.ptr += 1; + goto state_label_32; // string + }break; + case 0x38: + { + state.ptr += 1; + state.flags_ZF0 |= 0x8; + goto state_label_30; // pre_u8 + }break; + case 0x52: + { + state.ptr += 1; + goto state_label_31; // pre_R + }break; + } + } + { + state_label_29: // pre_U + if (state.ptr == state.opl_ptr){ + if ((true)){ + goto state_label_2; // identifier + } + } + switch (*state.ptr){ + default: + { + goto state_label_2; // identifier + }break; + case 0x22: + { + state.ptr += 1; + goto state_label_32; // string + }break; + case 0x52: + { + state.ptr += 1; + goto state_label_31; // pre_R + }break; + } + } + { + state_label_30: // pre_u8 + if (state.ptr == state.opl_ptr){ + if ((true)){ + goto state_label_2; // identifier + } + } + switch (*state.ptr){ + default: + { + goto state_label_2; // identifier + }break; + case 0x22: + { + state.ptr += 1; + goto state_label_32; // string + }break; + case 0x52: + { + state.ptr += 1; + goto state_label_31; // pre_R + }break; + } + } + { + state_label_31: // pre_R + if (state.ptr == state.opl_ptr){ + if ((true)){ + goto state_label_2; // identifier + } + } + switch (*state.ptr){ + default: + { + goto state_label_2; // identifier + }break; + case 0x22: + { + state.ptr += 1; + state.delim_first = state.ptr; + goto state_label_45; // raw_string_get_delim + }break; + } + } + { + state_label_32: // string + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LexError; + token.kind = 2; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + state.ptr += 1; + goto state_label_32; // string + }break; + case 0x0a: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LexError; + token.kind = 2; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x22: + { + if ((!HasFlag(state.flags_ZF0, 0x40))){ + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_ZF0, 0x4)){ + token.sub_kind = TokenCppKind_LiteralStringWide; + token.kind = 10; + break; + } + if (HasFlag(state.flags_ZF0, 0x8)){ + token.sub_kind = TokenCppKind_LiteralStringUTF8; + token.kind = 10; + break; + } + if (HasFlag(state.flags_ZF0, 0x10)){ + token.sub_kind = TokenCppKind_LiteralStringUTF16; + token.kind = 10; + break; + } + if (HasFlag(state.flags_ZF0, 0x20)){ + token.sub_kind = TokenCppKind_LiteralStringUTF32; + token.kind = 10; + break; + } + token.sub_kind = TokenCppKind_LiteralString; + token.kind = 10; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + state.ptr += 1; + goto state_label_32; // string + }break; + case 0x27: + { + if ((HasFlag(state.flags_ZF0, 0x40))){ + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_ZF0, 0x4)){ + token.sub_kind = TokenCppKind_LiteralCharacterWide; + token.kind = 10; + break; + } + if (HasFlag(state.flags_ZF0, 0x8)){ + token.sub_kind = TokenCppKind_LiteralCharacterUTF8; + token.kind = 10; + break; + } + if (HasFlag(state.flags_ZF0, 0x10)){ + token.sub_kind = TokenCppKind_LiteralCharacterUTF16; + token.kind = 10; + break; + } + if (HasFlag(state.flags_ZF0, 0x20)){ + token.sub_kind = TokenCppKind_LiteralCharacterUTF32; + token.kind = 10; + break; + } + token.sub_kind = TokenCppKind_LiteralCharacter; + token.kind = 10; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + state.ptr += 1; + goto state_label_32; // string + }break; + case 0x5c: + { + state.ptr += 1; + goto state_label_33; // string_esc + }break; + } + } + { + state_label_33: // string_esc + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LexError; + token.kind = 2; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_EOF; + token.kind = 0; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + result = true; + goto end; + } + } + switch (*state.ptr){ + default: + { + state.ptr += 1; + goto state_label_32; // string + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37: + { + state.ptr += 1; + goto state_label_34; // string_esc_oct2 + }break; + case 0x55: + { + state.ptr += 1; + goto state_label_37; // string_esc_universal_8 + }break; + case 0x75: + { + state.ptr += 1; + goto state_label_41; // string_esc_universal_4 + }break; + case 0x78: + { + state.ptr += 1; + goto state_label_36; // string_esc_hex + }break; + } + } + { + state_label_34: // string_esc_oct2 + if (state.ptr == state.opl_ptr){ + if ((true)){ + goto state_label_32; // string + } + } + switch (*state.ptr){ + default: + { + goto state_label_32; // string + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37: + { + state.ptr += 1; + goto state_label_35; // string_esc_oct1 + }break; + } + } + { + state_label_35: // string_esc_oct1 + if (state.ptr == state.opl_ptr){ + if ((true)){ + goto state_label_32; // string + } + } + switch (*state.ptr){ + default: + { + goto state_label_32; // string + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37: + { + state.ptr += 1; + goto state_label_32; // string + }break; + } + } + { + state_label_36: // string_esc_hex + if (state.ptr == state.opl_ptr){ + if ((true)){ + goto state_label_32; // string + } + } + switch (*state.ptr){ + default: + { + goto state_label_32; // string + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: + case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: + case 0x66: + { + state.ptr += 1; + goto state_label_36; // string_esc_hex + }break; + } + } + { + state_label_37: // string_esc_universal_8 + if (state.ptr == state.opl_ptr){ + if ((true)){ + goto state_label_32; // string + } + } + switch (*state.ptr){ + default: + { + goto state_label_32; // string + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: + case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: + case 0x66: + { + state.ptr += 1; + goto state_label_38; // string_esc_universal_7 + }break; + } + } + { + state_label_38: // string_esc_universal_7 + if (state.ptr == state.opl_ptr){ + if ((true)){ + goto state_label_32; // string + } + } + switch (*state.ptr){ + default: + { + goto state_label_32; // string + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: + case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: + case 0x66: + { + state.ptr += 1; + goto state_label_39; // string_esc_universal_6 + }break; + } + } + { + state_label_39: // string_esc_universal_6 + if (state.ptr == state.opl_ptr){ + if ((true)){ + goto state_label_32; // string + } + } + switch (*state.ptr){ + default: + { + goto state_label_32; // string + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: + case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: + case 0x66: + { + state.ptr += 1; + goto state_label_40; // string_esc_universal_5 + }break; + } + } + { + state_label_40: // string_esc_universal_5 + if (state.ptr == state.opl_ptr){ + if ((true)){ + goto state_label_32; // string + } + } + switch (*state.ptr){ + default: + { + goto state_label_32; // string + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: + case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: + case 0x66: + { + state.ptr += 1; + goto state_label_41; // string_esc_universal_4 + }break; + } + } + { + state_label_41: // string_esc_universal_4 + if (state.ptr == state.opl_ptr){ + if ((true)){ + goto state_label_32; // string + } + } + switch (*state.ptr){ + default: + { + goto state_label_32; // string + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: + case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: + case 0x66: + { + state.ptr += 1; + goto state_label_42; // string_esc_universal_3 + }break; + } + } + { + state_label_42: // string_esc_universal_3 + if (state.ptr == state.opl_ptr){ + if ((true)){ + goto state_label_32; // string + } + } + switch (*state.ptr){ + default: + { + goto state_label_32; // string + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: + case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: + case 0x66: + { + state.ptr += 1; + goto state_label_43; // string_esc_universal_2 + }break; + } + } + { + state_label_43: // string_esc_universal_2 + if (state.ptr == state.opl_ptr){ + if ((true)){ + goto state_label_32; // string + } + } + switch (*state.ptr){ + default: + { + goto state_label_32; // string + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: + case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: + case 0x66: + { + state.ptr += 1; + goto state_label_44; // string_esc_universal_1 + }break; + } + } + { + state_label_44: // string_esc_universal_1 + if (state.ptr == state.opl_ptr){ + if ((true)){ + goto state_label_32; // string + } + } + switch (*state.ptr){ + default: + { + goto state_label_32; // string + }break; + case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36: + case 0x37:case 0x38:case 0x39:case 0x41:case 0x42:case 0x43:case 0x44: + case 0x45:case 0x46:case 0x61:case 0x62:case 0x63:case 0x64:case 0x65: + case 0x66: + { + state.ptr += 1; + goto state_label_32; // string + }break; + } + } + { + state_label_45: // raw_string_get_delim + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LexError; + token.kind = 2; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_EOF; + token.kind = 0; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + result = true; + goto end; + } + } + switch (*state.ptr){ + default: + { + state.ptr += 1; + goto state_label_45; // raw_string_get_delim + }break; + case 0x20:case 0x29:case 0x5c: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LexError; + token.kind = 2; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x28: + { + state.delim_one_past_last = state.ptr; + state.ptr += 1; + goto state_label_46; // raw_string_find_close + }break; + } + } + { + state_label_46: // raw_string_find_close + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LexError; + token.kind = 2; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_EOF; + token.kind = 0; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + result = true; + goto end; + } + } + switch (*state.ptr){ + default: + { + state.ptr += 1; + goto state_label_46; // raw_string_find_close + }break; + case 0x29: + { + state.ptr += 1; + goto state_label_47; // raw_string_try_delim + }break; + } + } + { + state_label_47: // raw_string_try_delim + u64 delim_length = state.delim_one_past_last - state.delim_first; + u64 parse_length = 0; + for (;;){ + if (parse_length == delim_length){ + goto state_label_48; // raw_string_try_quote + } + if (state.ptr == state.opl_ptr){ + goto state_label_48; // raw_string_try_quote + } + if (*state.ptr == state.delim_first[parse_length]){ + state.ptr += 1; + parse_length += 1; + } + else{ + goto state_label_46; // raw_string_find_close + } + } + } + { + state_label_48: // raw_string_try_quote + if (state.ptr == state.opl_ptr){ + if ((true)){ + goto state_label_46; // raw_string_find_close + } + } + switch (*state.ptr){ + default: + { + goto state_label_46; // raw_string_find_close + }break; + case 0x22: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + if (HasFlag(state.flags_ZF0, 0x4)){ + token.sub_kind = TokenCppKind_LiteralStringWideRaw; + token.kind = 10; + break; + } + if (HasFlag(state.flags_ZF0, 0x8)){ + token.sub_kind = TokenCppKind_LiteralStringUTF8Raw; + token.kind = 10; + break; + } + if (HasFlag(state.flags_ZF0, 0x10)){ + token.sub_kind = TokenCppKind_LiteralStringUTF16Raw; + token.kind = 10; + break; + } + if (HasFlag(state.flags_ZF0, 0x20)){ + token.sub_kind = TokenCppKind_LiteralStringUTF32Raw; + token.kind = 10; + break; + } + token.sub_kind = TokenCppKind_LiteralStringRaw; + token.kind = 10; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_49: // comment_block + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_BlockComment; + token.kind = 3; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_EOF; + token.kind = 0; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + result = true; + goto end; + } + } + switch (*state.ptr){ + default: + { + state.ptr += 1; + goto state_label_49; // comment_block + }break; + case 0x0a: + { + state.ptr += 1; + state.flags_KB0 &= ~(0x1); + state.flags_KF0 &= ~(0x1); + goto state_label_49; // comment_block + }break; + case 0x2a: + { + state.ptr += 1; + goto state_label_50; // comment_block_try_close + }break; + } + } + { + state_label_50: // comment_block_try_close + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_BlockComment; + token.kind = 3; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_EOF; + token.kind = 0; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + result = true; + goto end; + } + } + switch (*state.ptr){ + default: + { + state.ptr += 1; + goto state_label_49; // comment_block + }break; + case 0x2a: + { + state.ptr += 1; + goto state_label_50; // comment_block_try_close + }break; + case 0x2f: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_BlockComment; + token.kind = 3; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_51: // comment_line + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LineComment; + token.kind = 3; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + state.ptr += 1; + goto state_label_51; // comment_line + }break; + case 0x0a: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LineComment; + token.kind = 3; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_52: // op stage + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Colon; + token.kind = 15; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Colon; + token.kind = 15; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x3a: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_ColonColon; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_53: // op stage + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Plus; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Plus; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x2b: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_PlusPlus; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x3d: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_PlusEq; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_54: // op stage + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Minus; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Minus; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x2d: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_MinusMinus; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x3d: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_MinusEq; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x3e: + { + state.ptr += 1; + goto state_label_55; // op stage + }break; + } + } + { + state_label_55: // op stage + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Arrow; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Arrow; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x2a: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_ArrowStar; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_56: // op stage + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Less; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Less; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x3c: + { + state.ptr += 1; + goto state_label_65; // op stage + }break; + case 0x3d: + { + state.ptr += 1; + goto state_label_58; // op stage + }break; + } + } + { + state_label_57: // op stage + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Grtr; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Grtr; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x3d: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_GrtrEq; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x3e: + { + state.ptr += 1; + goto state_label_66; // op stage + }break; + } + } + { + state_label_58: // op stage + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LessEq; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LessEq; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x3e: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Compare; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_59: // op stage + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Eq; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Eq; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x3d: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_EqEq; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_60: // op stage + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Not; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Not; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x3d: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_NotEq; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_61: // op stage + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_And; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_And; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x26: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_AndAnd; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_62: // op stage + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Or; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Or; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x7c: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_OrOr; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_63: // op stage + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Star; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Star; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x3d: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_StarEq; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_64: // op stage + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Mod; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_Mod; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x3d: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_ModEq; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_65: // op stage + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LeftLeft; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LeftLeft; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x3d: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LeftLeftEq; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_66: // op stage + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_RightRight; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_RightRight; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x3d: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_RightRightEq; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_67: // op stage + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_PPStringify; + token.kind = 15; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_PPStringify; + token.kind = 15; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x23: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_PPConcat; + token.kind = 15; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + { + state_label_68: // op stage + if (state.ptr == state.opl_ptr){ + if ((true)){ + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LexError; + token.kind = 2; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + } + } + switch (*state.ptr){ + default: + { + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_LexError; + token.kind = 2; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + case 0x2e: + { + state.ptr += 1; + { + Token token = {}; + token.pos = (i64)(state.emit_ptr - state.base); + token.size = (i64)(state.ptr - state.emit_ptr); + token.flags = state.flags_KB0; + do{ + token.sub_kind = TokenCppKind_DotDotDot; + token.kind = 7; + }while(0); + token_list_push(arena, list, &token); + emit_counter += 1; + if (emit_counter == max){ + goto end; + } + state.emit_ptr = state.ptr; + } + state.flags_ZF0 = 0; + goto state_label_1; // root + }break; + } + } + end:; + block_copy_struct(state_ptr, &state); + return(result); } internal Token_List lex_full_input_cpp(Arena *arena, String_Const_u8 input){ -Lex_State_Cpp state = {}; -lex_full_input_cpp_init(&state, input); -Token_List list = {}; -lex_full_input_cpp_breaks(arena, &list, &state, max_u64); -return(list); + Lex_State_Cpp state = {}; + lex_full_input_cpp_init(&state, input); + Token_List list = {}; + lex_full_input_cpp_breaks(arena, &list, &state, max_u64); + return(list); } diff --git a/custom/languages/4coder_cpp_lexer_gen.cpp b/custom/languages/4coder_cpp_lexer_gen.cpp index 8832d60c..84c3eb90 100644 --- a/custom/languages/4coder_cpp_lexer_gen.cpp +++ b/custom/languages/4coder_cpp_lexer_gen.cpp @@ -1130,7 +1130,6 @@ build_language_model(void){ sm_case_eof_peek(emit); } sm_fallback(comment_line); - } // BOTTOM