From 0bbafd636e92aa20d9877d64c4a9ee65f0860528 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Wed, 15 Jan 2020 10:42:02 -0800 Subject: [PATCH] Fixed random crashes and misbehaviors --- 4ed_api_implementation.cpp | 2 +- 4ed_layout.cpp | 10 + custom/4coder_base_commands.cpp | 22 +- custom/generated/lexer_cpp.cpp | 10158 ++++++++-------- .../lexer_generator/4coder_lex_gen_main.cpp | 30 +- 5 files changed, 5120 insertions(+), 5102 deletions(-) diff --git a/4ed_api_implementation.cpp b/4ed_api_implementation.cpp index 5cbb28de..73fbfcd4 100644 --- a/4ed_api_implementation.cpp +++ b/4ed_api_implementation.cpp @@ -1108,7 +1108,7 @@ get_view_prev__inner(Layout *layout, View *view){ } } else{ - Panel *panel = layout_get_first_open_panel(layout); + Panel *panel = layout_get_last_open_panel(layout); view = panel->view; } return(view); diff --git a/4ed_layout.cpp b/4ed_layout.cpp index fd493dee..3b81bdbd 100644 --- a/4ed_layout.cpp +++ b/4ed_layout.cpp @@ -123,6 +123,16 @@ layout_get_first_open_panel(Layout *layout){ return(panel); } +internal Panel* +layout_get_last_open_panel(Layout *layout){ + Panel *panel = CastFromMember(Panel, node, layout->open_panels.prev); + if (panel != 0 && &panel->node == &layout->open_panels){ + panel = 0; + } + AssertImplies(panel != 0, panel->kind == PanelKind_Final); + return(panel); +} + internal Panel* layout_get_next_open_panel(Layout *layout, Panel *panel){ panel = CastFromMember(Panel, node, panel->node.next); diff --git a/custom/4coder_base_commands.cpp b/custom/4coder_base_commands.cpp index b80e646f..45b100b4 100644 --- a/custom/4coder_base_commands.cpp +++ b/custom/4coder_base_commands.cpp @@ -1312,18 +1312,18 @@ CUSTOM_DOC("Queries the user for a new name and renames the file of the current bar.string = SCu8(name_space, (u64)0); bar.string_capacity = sizeof(name_space); if (query_user_string(app, &bar) && bar.string.size != 0){ - // TODO(allen): There should be a way to say, "detach a buffer's file" and "attach this file to a buffer" - List_String_Const_u8 new_file_name_list = {}; - string_list_push(scratch, &new_file_name_list, string_remove_front_of_path(file_name)); - string_list_push(scratch, &new_file_name_list, bar.string); - String_Const_u8 new_file_name = string_list_flatten(scratch, new_file_name_list, StringFill_NullTerminate); - if (buffer_save(app, buffer, new_file_name, BufferSave_IgnoreDirtyFlag)){ - Buffer_ID new_buffer = create_buffer(app, new_file_name, BufferCreate_NeverNew|BufferCreate_JustChangedFile); - if (new_buffer != 0 && new_buffer != buffer){ - delete_file_base(app, file_name, buffer); - view_set_buffer(app, view, new_buffer, 0); - } + // TODO(allen): There should be a way to say, "detach a buffer's file" and "attach this file to a buffer" + List_String_Const_u8 new_file_name_list = {}; + string_list_push(scratch, &new_file_name_list, string_remove_front_of_path(file_name)); + string_list_push(scratch, &new_file_name_list, bar.string); + String_Const_u8 new_file_name = string_list_flatten(scratch, new_file_name_list, StringFill_NullTerminate); + if (buffer_save(app, buffer, new_file_name, BufferSave_IgnoreDirtyFlag)){ + Buffer_ID new_buffer = create_buffer(app, new_file_name, BufferCreate_NeverNew|BufferCreate_JustChangedFile); + if (new_buffer != 0 && new_buffer != buffer){ + delete_file_base(app, file_name, buffer); + view_set_buffer(app, view, new_buffer, 0); } + } } } } diff --git a/custom/generated/lexer_cpp.cpp b/custom/generated/lexer_cpp.cpp index 77bf3f7b..a1a3ffae 100644 --- a/custom/generated/lexer_cpp.cpp +++ b/custom/generated/lexer_cpp.cpp @@ -43,5102 +43,5102 @@ 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, +u64 cpp_main_keys_hash_array[121] = { +0x0000000000000000,0x03cf3a59df2800d7,0x31804e296403b305,0x3b709b613539c371, +0x3b709aad95fb97b3,0x0000000000000000,0x14996033a5460d1b,0x3180604229f03e4d, +0x0000000000000000,0x0000000000000000,0x14996033a7e5b03b,0x0000000000000000, +0x03cf3a58ab580caf,0x0000000000000000,0x0000000000000000,0x1901b5d07bbd53e1, +0x3180496d6573ea51,0x0000000000000000,0x0000000000000000,0x0000000000000000, +0x0000000000000000,0x0000000000000000,0x3b709aaa9c896d6b,0xf11624614cefdacf, +0x3b709b7949044f87,0x0000000000000000,0x3b709aaa14b4549f,0xf114e97ba34018a3, +0x3180604229f29813,0x0000000000000000,0x1904509dbde2a353,0x03cf3a596f0f2511, +0x14996033a5507959,0x0000000000000000,0x5f3f9fc0d0a0c93f,0x03cf3a58b58c753b, +0x0000000000000000,0x0000000000000000,0xf10f7eff9095fb23,0x3b709aaa68405a55, +0x3b709b61a18cc255,0x3b709aaa7edd8723,0x0000000000000000,0xc8abc849dbd6ac9f, +0x0000000000000000,0x7e5f4ab862627b7b,0x0000000000000000,0x0000000000000000, +0xf114b8e386ce372d,0x14996033a5580e25,0x0000000000000000,0x14996033a7d21aed, +0x3b709b61a19e76af,0x0000000000000000,0x14996033ab0ae5d3,0x14996033a5509f41, +0x0000000000000000,0x0000000000000000,0x0000000000000000,0x03cf3a58b646fa01, +0xf10e5cfb2d0856c9,0x8d730a2abbb45b53,0x0000000000000000,0x3b709b4626a5db05, +0x0000000000000000,0x03cf3a59de20fa7b,0x0000000000000000,0x14996033a6b2b45f, +0xf10f17d125465a91,0x03cf3a59dfc04c9f,0x5f3f9fc0d0a0ba41,0x0000000000000000, +0x5f3f9fc0d0a6ec81,0x0000000000000000,0x3b709aaa4a86002b,0x0000000000000000, +0x0000000000000000,0x5f3f9fc0d0a00819,0x0000000000000000,0x0000000000000000, +0xc8abc849dbd6adb5,0x0000000000000000,0x0000000000000000,0x0000000000000000, +0x5f3f9fc0d0a0d087,0x0000000000000000,0x0000000000000000,0x31806cea0e7fbb29, +0x0000000000000000,0x0000000000000000,0x31806c8004d41f17,0x3b709b468ffbb151, +0x03cf3a59df3fc9f3,0x1744d2f34117d803,0x0000000000000000,0x0000000000000000, +0x0000000000000000,0x0000000000000000,0x03cf3a596ff8a353,0x0000000000000000, +0x0000000000000000,0x1a21e4856eaac353,0x3b709aaa7cdf92c5,0x0000000000000000, +0x14996033a553c5cb,0x03cf3a58b52cfddd,0x0000000000000000,0x31804dc503d40aab, +0x0a1c76541b3d4ccf,0x9721eca88effbb53,0xf10ea2bb4912c001,0x14996033a54db691, +0x0000000000000000,0xf1165cbc0c8e31e1,0xf10e41346ef0ed11,0x0000000000000000, +0x0000000000000000,0x0000000000000000,0x3b709aaa4b875f33,0xf10f7c240be83eed, +0x0000000000000000, }; -u8 main_keys_key_array_0[] = {0x63,0x61,0x74,0x63,0x68,}; -u8 main_keys_key_array_2[] = {0x75,0x6e,0x69,0x6f,0x6e,}; -u8 main_keys_key_array_6[] = {0x75,0x73,0x69,0x6e,0x67,}; -u8 main_keys_key_array_7[] = {0x76,0x69,0x72,0x74,0x75,0x61,0x6c,}; -u8 main_keys_key_array_8[] = {0x66,0x6c,0x6f,0x61,0x74,}; -u8 main_keys_key_array_13[] = {0x73,0x74,0x61,0x74,0x69,0x63,}; -u8 main_keys_key_array_14[] = {0x69,0x6e,0x6c,0x69,0x6e,0x65,}; -u8 main_keys_key_array_15[] = {0x74,0x72,0x75,0x65,}; -u8 main_keys_key_array_16[] = {0x64,0x79,0x6e,0x61,0x6d,0x69,0x63,0x5f,0x63,0x61,0x73,0x74,}; -u8 main_keys_key_array_19[] = {0x73,0x69,0x7a,0x65,0x6f,0x66,}; -u8 main_keys_key_array_21[] = {0x74,0x65,0x6d,0x70,0x6c,0x61,0x74,0x65,}; -u8 main_keys_key_array_22[] = {0x74,0x68,0x69,0x73,}; -u8 main_keys_key_array_23[] = {0x61,0x6c,0x69,0x67,0x6e,0x61,0x73,}; -u8 main_keys_key_array_25[] = {0x77,0x68,0x69,0x6c,0x65,}; -u8 main_keys_key_array_27[] = {0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,}; -u8 main_keys_key_array_29[] = {0x73,0x77,0x69,0x74,0x63,0x68,}; -u8 main_keys_key_array_30[] = {0x65,0x78,0x70,0x6c,0x69,0x63,0x69,0x74,}; -u8 main_keys_key_array_32[] = {0x73,0x74,0x61,0x74,0x69,0x63,0x5f,0x63,0x61,0x73,0x74,}; -u8 main_keys_key_array_34[] = {0x62,0x72,0x65,0x61,0x6b,}; -u8 main_keys_key_array_35[] = {0x74,0x72,0x79,}; -u8 main_keys_key_array_37[] = {0x64,0x65,0x63,0x6c,0x74,0x79,0x70,0x65,}; -u8 main_keys_key_array_40[] = {0x70,0x72,0x69,0x76,0x61,0x74,0x65,}; -u8 main_keys_key_array_43[] = {0x73,0x68,0x6f,0x72,0x74,}; -u8 main_keys_key_array_44[] = {0x74,0x79,0x70,0x65,0x69,0x64,}; -u8 main_keys_key_array_45[] = {0x61,0x6c,0x69,0x67,0x6e,0x6f,0x66,}; -u8 main_keys_key_array_46[] = {0x6e,0x6f,0x65,0x78,0x63,0x65,0x70,0x74,}; -u8 main_keys_key_array_48[] = {0x72,0x65,0x69,0x6e,0x74,0x65,0x72,0x70,0x72,0x65,0x74,0x5f,0x63,0x61,0x73,0x74,}; -u8 main_keys_key_array_50[] = {0x67,0x6f,0x74,0x6f,}; -u8 main_keys_key_array_51[] = {0x70,0x72,0x6f,0x74,0x65,0x63,0x74,0x65,0x64,}; -u8 main_keys_key_array_52[] = {0x65,0x78,0x70,0x6f,0x72,0x74,}; -u8 main_keys_key_array_55[] = {0x66,0x61,0x6c,0x73,0x65,}; -u8 main_keys_key_array_56[] = {0x65,0x78,0x74,0x65,0x72,0x6e,}; -u8 main_keys_key_array_57[] = {0x63,0x6c,0x61,0x73,0x73,}; -u8 main_keys_key_array_60[] = {0x73,0x69,0x67,0x6e,0x65,0x64,}; -u8 main_keys_key_array_63[] = {0x70,0x75,0x62,0x6c,0x69,0x63,}; -u8 main_keys_key_array_66[] = {0x69,0x6e,0x74,}; -u8 main_keys_key_array_67[] = {0x64,0x65,0x66,0x61,0x75,0x6c,0x74,}; -u8 main_keys_key_array_71[] = {0x63,0x68,0x61,0x72,}; -u8 main_keys_key_array_73[] = {0x6c,0x6f,0x6e,0x67,}; -u8 main_keys_key_array_75[] = {0x63,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x65,}; -u8 main_keys_key_array_76[] = {0x66,0x6f,0x72,}; -u8 main_keys_key_array_77[] = {0x74,0x68,0x72,0x65,0x61,0x64,0x5f,0x6c,0x6f,0x63,0x61,0x6c,}; -u8 main_keys_key_array_78[] = {0x6e,0x65,0x77,}; -u8 main_keys_key_array_80[] = {0x75,0x6e,0x73,0x69,0x67,0x6e,0x65,0x64,}; -u8 main_keys_key_array_81[] = {0x6e,0x75,0x6c,0x6c,0x70,0x74,0x72,}; -u8 main_keys_key_array_82[] = {0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,}; -u8 main_keys_key_array_83[] = {0x74,0x79,0x70,0x65,0x64,0x65,0x66,}; -u8 main_keys_key_array_84[] = {0x64,0x65,0x6c,0x65,0x74,0x65,}; -u8 main_keys_key_array_86[] = {0x69,0x66,}; -u8 main_keys_key_array_87[] = {0x73,0x74,0x72,0x75,0x63,0x74,}; -u8 main_keys_key_array_89[] = {0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,}; -u8 main_keys_key_array_90[] = {0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,}; -u8 main_keys_key_array_92[] = {0x63,0x61,0x73,0x65,}; -u8 main_keys_key_array_94[] = {0x63,0x6f,0x6e,0x73,0x74,0x5f,0x63,0x61,0x73,0x74,}; -u8 main_keys_key_array_95[] = {0x63,0x6f,0x6e,0x73,0x74,}; -u8 main_keys_key_array_98[] = {0x66,0x72,0x69,0x65,0x6e,0x64,}; -u8 main_keys_key_array_100[] = {0x65,0x6c,0x73,0x65,}; -u8 main_keys_key_array_102[] = {0x64,0x6f,0x75,0x62,0x6c,0x65,}; -u8 main_keys_key_array_108[] = {0x72,0x65,0x74,0x75,0x72,0x6e,}; -u8 main_keys_key_array_112[] = {0x76,0x6f,0x6c,0x61,0x74,0x69,0x6c,0x65,}; -u8 main_keys_key_array_113[] = {0x64,0x6f,}; -u8 main_keys_key_array_114[] = {0x73,0x74,0x61,0x74,0x69,0x63,0x5f,0x61,0x73,0x73,0x65,0x72,0x74,}; -u8 main_keys_key_array_116[] = {0x62,0x6f,0x6f,0x6c,}; -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}, +u8 cpp_main_keys_key_array_1[] = {0x63,0x6c,0x61,0x73,0x73,}; +u8 cpp_main_keys_key_array_2[] = {0x74,0x79,0x70,0x65,0x64,0x65,0x66,}; +u8 cpp_main_keys_key_array_3[] = {0x64,0x6f,0x75,0x62,0x6c,0x65,}; +u8 cpp_main_keys_key_array_4[] = {0x74,0x79,0x70,0x65,0x69,0x64,}; +u8 cpp_main_keys_key_array_6[] = {0x6c,0x6f,0x6e,0x67,}; +u8 cpp_main_keys_key_array_7[] = {0x61,0x6c,0x69,0x67,0x6e,0x6f,0x66,}; +u8 cpp_main_keys_key_array_10[] = {0x74,0x68,0x69,0x73,}; +u8 cpp_main_keys_key_array_12[] = {0x73,0x68,0x6f,0x72,0x74,}; +u8 cpp_main_keys_key_array_15[] = {0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,}; +u8 cpp_main_keys_key_array_16[] = {0x70,0x72,0x69,0x76,0x61,0x74,0x65,}; +u8 cpp_main_keys_key_array_22[] = {0x70,0x75,0x62,0x6c,0x69,0x63,}; +u8 cpp_main_keys_key_array_23[] = {0x6e,0x6f,0x65,0x78,0x63,0x65,0x70,0x74,}; +u8 cpp_main_keys_key_array_24[] = {0x66,0x72,0x69,0x65,0x6e,0x64,}; +u8 cpp_main_keys_key_array_26[] = {0x73,0x77,0x69,0x74,0x63,0x68,}; +u8 cpp_main_keys_key_array_27[] = {0x65,0x78,0x70,0x6c,0x69,0x63,0x69,0x74,}; +u8 cpp_main_keys_key_array_28[] = {0x61,0x6c,0x69,0x67,0x6e,0x61,0x73,}; +u8 cpp_main_keys_key_array_30[] = {0x73,0x74,0x61,0x74,0x69,0x63,0x5f,0x63,0x61,0x73,0x74,}; +u8 cpp_main_keys_key_array_31[] = {0x66,0x61,0x6c,0x73,0x65,}; +u8 cpp_main_keys_key_array_32[] = {0x63,0x68,0x61,0x72,}; +u8 cpp_main_keys_key_array_34[] = {0x6e,0x65,0x77,}; +u8 cpp_main_keys_key_array_35[] = {0x75,0x73,0x69,0x6e,0x67,}; +u8 cpp_main_keys_key_array_38[] = {0x75,0x6e,0x73,0x69,0x67,0x6e,0x65,0x64,}; +u8 cpp_main_keys_key_array_39[] = {0x72,0x65,0x74,0x75,0x72,0x6e,}; +u8 cpp_main_keys_key_array_40[] = {0x65,0x78,0x74,0x65,0x72,0x6e,}; +u8 cpp_main_keys_key_array_41[] = {0x73,0x69,0x67,0x6e,0x65,0x64,}; +u8 cpp_main_keys_key_array_43[] = {0x64,0x6f,}; +u8 cpp_main_keys_key_array_45[] = {0x74,0x68,0x72,0x65,0x61,0x64,0x5f,0x6c,0x6f,0x63,0x61,0x6c,}; +u8 cpp_main_keys_key_array_48[] = {0x63,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x65,}; +u8 cpp_main_keys_key_array_49[] = {0x65,0x6e,0x75,0x6d,}; +u8 cpp_main_keys_key_array_51[] = {0x74,0x72,0x75,0x65,}; +u8 cpp_main_keys_key_array_52[] = {0x65,0x78,0x70,0x6f,0x72,0x74,}; +u8 cpp_main_keys_key_array_54[] = {0x76,0x6f,0x69,0x64,}; +u8 cpp_main_keys_key_array_55[] = {0x63,0x61,0x73,0x65,}; +u8 cpp_main_keys_key_array_59[] = {0x77,0x68,0x69,0x6c,0x65,}; +u8 cpp_main_keys_key_array_60[] = {0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,}; +u8 cpp_main_keys_key_array_61[] = {0x63,0x6f,0x6e,0x73,0x74,0x5f,0x63,0x61,0x73,0x74,}; +u8 cpp_main_keys_key_array_63[] = {0x69,0x6e,0x6c,0x69,0x6e,0x65,}; +u8 cpp_main_keys_key_array_65[] = {0x62,0x72,0x65,0x61,0x6b,}; +u8 cpp_main_keys_key_array_67[] = {0x67,0x6f,0x74,0x6f,}; +u8 cpp_main_keys_key_array_68[] = {0x74,0x65,0x6d,0x70,0x6c,0x61,0x74,0x65,}; +u8 cpp_main_keys_key_array_69[] = {0x63,0x61,0x74,0x63,0x68,}; +u8 cpp_main_keys_key_array_70[] = {0x66,0x6f,0x72,}; +u8 cpp_main_keys_key_array_72[] = {0x74,0x72,0x79,}; +u8 cpp_main_keys_key_array_74[] = {0x73,0x74,0x61,0x74,0x69,0x63,}; +u8 cpp_main_keys_key_array_77[] = {0x61,0x73,0x6d,}; +u8 cpp_main_keys_key_array_80[] = {0x69,0x66,}; +u8 cpp_main_keys_key_array_84[] = {0x69,0x6e,0x74,}; +u8 cpp_main_keys_key_array_87[] = {0x6e,0x75,0x6c,0x6c,0x70,0x74,0x72,}; +u8 cpp_main_keys_key_array_90[] = {0x64,0x65,0x66,0x61,0x75,0x6c,0x74,}; +u8 cpp_main_keys_key_array_91[] = {0x64,0x65,0x6c,0x65,0x74,0x65,}; +u8 cpp_main_keys_key_array_92[] = {0x63,0x6f,0x6e,0x73,0x74,}; +u8 cpp_main_keys_key_array_93[] = {0x70,0x72,0x6f,0x74,0x65,0x63,0x74,0x65,0x64,}; +u8 cpp_main_keys_key_array_98[] = {0x66,0x6c,0x6f,0x61,0x74,}; +u8 cpp_main_keys_key_array_101[] = {0x64,0x79,0x6e,0x61,0x6d,0x69,0x63,0x5f,0x63,0x61,0x73,0x74,}; +u8 cpp_main_keys_key_array_102[] = {0x73,0x69,0x7a,0x65,0x6f,0x66,}; +u8 cpp_main_keys_key_array_104[] = {0x62,0x6f,0x6f,0x6c,}; +u8 cpp_main_keys_key_array_105[] = {0x75,0x6e,0x69,0x6f,0x6e,}; +u8 cpp_main_keys_key_array_107[] = {0x76,0x69,0x72,0x74,0x75,0x61,0x6c,}; +u8 cpp_main_keys_key_array_108[] = {0x73,0x74,0x61,0x74,0x69,0x63,0x5f,0x61,0x73,0x73,0x65,0x72,0x74,}; +u8 cpp_main_keys_key_array_109[] = {0x72,0x65,0x69,0x6e,0x74,0x65,0x72,0x70,0x72,0x65,0x74,0x5f,0x63,0x61,0x73,0x74,}; +u8 cpp_main_keys_key_array_110[] = {0x76,0x6f,0x6c,0x61,0x74,0x69,0x6c,0x65,}; +u8 cpp_main_keys_key_array_111[] = {0x65,0x6c,0x73,0x65,}; +u8 cpp_main_keys_key_array_113[] = {0x64,0x65,0x63,0x6c,0x74,0x79,0x70,0x65,}; +u8 cpp_main_keys_key_array_114[] = {0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,}; +u8 cpp_main_keys_key_array_118[] = {0x73,0x74,0x72,0x75,0x63,0x74,}; +u8 cpp_main_keys_key_array_119[] = {0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,}; +String_Const_u8 cpp_main_keys_key_array[121] = { +{0, 0}, +{cpp_main_keys_key_array_1, 5}, +{cpp_main_keys_key_array_2, 7}, +{cpp_main_keys_key_array_3, 6}, +{cpp_main_keys_key_array_4, 6}, +{0, 0}, +{cpp_main_keys_key_array_6, 4}, +{cpp_main_keys_key_array_7, 7}, +{0, 0}, +{0, 0}, +{cpp_main_keys_key_array_10, 4}, +{0, 0}, +{cpp_main_keys_key_array_12, 5}, +{0, 0}, +{0, 0}, +{cpp_main_keys_key_array_15, 9}, +{cpp_main_keys_key_array_16, 7}, +{0, 0}, +{0, 0}, +{0, 0}, +{0, 0}, +{0, 0}, +{cpp_main_keys_key_array_22, 6}, +{cpp_main_keys_key_array_23, 8}, +{cpp_main_keys_key_array_24, 6}, +{0, 0}, +{cpp_main_keys_key_array_26, 6}, +{cpp_main_keys_key_array_27, 8}, +{cpp_main_keys_key_array_28, 7}, +{0, 0}, +{cpp_main_keys_key_array_30, 11}, +{cpp_main_keys_key_array_31, 5}, +{cpp_main_keys_key_array_32, 4}, +{0, 0}, +{cpp_main_keys_key_array_34, 3}, +{cpp_main_keys_key_array_35, 5}, +{0, 0}, +{0, 0}, +{cpp_main_keys_key_array_38, 8}, +{cpp_main_keys_key_array_39, 6}, +{cpp_main_keys_key_array_40, 6}, +{cpp_main_keys_key_array_41, 6}, +{0, 0}, +{cpp_main_keys_key_array_43, 2}, +{0, 0}, +{cpp_main_keys_key_array_45, 12}, +{0, 0}, +{0, 0}, +{cpp_main_keys_key_array_48, 8}, +{cpp_main_keys_key_array_49, 4}, +{0, 0}, +{cpp_main_keys_key_array_51, 4}, +{cpp_main_keys_key_array_52, 6}, +{0, 0}, +{cpp_main_keys_key_array_54, 4}, +{cpp_main_keys_key_array_55, 4}, +{0, 0}, +{0, 0}, +{0, 0}, +{cpp_main_keys_key_array_59, 5}, +{cpp_main_keys_key_array_60, 8}, +{cpp_main_keys_key_array_61, 10}, +{0, 0}, +{cpp_main_keys_key_array_63, 6}, +{0, 0}, +{cpp_main_keys_key_array_65, 5}, +{0, 0}, +{cpp_main_keys_key_array_67, 4}, +{cpp_main_keys_key_array_68, 8}, +{cpp_main_keys_key_array_69, 5}, +{cpp_main_keys_key_array_70, 3}, +{0, 0}, +{cpp_main_keys_key_array_72, 3}, +{0, 0}, +{cpp_main_keys_key_array_74, 6}, +{0, 0}, +{0, 0}, +{cpp_main_keys_key_array_77, 3}, +{0, 0}, +{0, 0}, +{cpp_main_keys_key_array_80, 2}, +{0, 0}, +{0, 0}, +{0, 0}, +{cpp_main_keys_key_array_84, 3}, +{0, 0}, +{0, 0}, +{cpp_main_keys_key_array_87, 7}, +{0, 0}, +{0, 0}, +{cpp_main_keys_key_array_90, 7}, +{cpp_main_keys_key_array_91, 6}, +{cpp_main_keys_key_array_92, 5}, +{cpp_main_keys_key_array_93, 9}, +{0, 0}, +{0, 0}, +{0, 0}, +{0, 0}, +{cpp_main_keys_key_array_98, 5}, +{0, 0}, +{0, 0}, +{cpp_main_keys_key_array_101, 12}, +{cpp_main_keys_key_array_102, 6}, +{0, 0}, +{cpp_main_keys_key_array_104, 4}, +{cpp_main_keys_key_array_105, 5}, +{0, 0}, +{cpp_main_keys_key_array_107, 7}, +{cpp_main_keys_key_array_108, 13}, +{cpp_main_keys_key_array_109, 16}, +{cpp_main_keys_key_array_110, 8}, +{cpp_main_keys_key_array_111, 4}, +{0, 0}, +{cpp_main_keys_key_array_113, 8}, +{cpp_main_keys_key_array_114, 8}, +{0, 0}, +{0, 0}, +{0, 0}, +{cpp_main_keys_key_array_118, 6}, +{cpp_main_keys_key_array_119, 8}, +{0, 0}, }; -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}, +Lexeme_Table_Value cpp_main_keys_value_array[121] = { +{0, 0}, +{4, TokenCppKind_Class}, +{4, TokenCppKind_Typedef}, +{4, TokenCppKind_Double}, +{4, TokenCppKind_TypeID}, +{0, 0}, +{4, TokenCppKind_Long}, +{4, TokenCppKind_AlignOf}, +{0, 0}, +{0, 0}, +{4, TokenCppKind_This}, +{0, 0}, +{4, TokenCppKind_Short}, +{0, 0}, +{0, 0}, +{4, TokenCppKind_Namespace}, +{4, TokenCppKind_Private}, +{0, 0}, +{0, 0}, +{0, 0}, +{0, 0}, +{0, 0}, +{4, TokenCppKind_Public}, +{4, TokenCppKind_NoExcept}, +{4, TokenCppKind_Friend}, +{0, 0}, +{4, TokenCppKind_Switch}, +{4, TokenCppKind_Explicit}, +{4, TokenCppKind_AlignAs}, +{0, 0}, +{4, TokenCppKind_StaticCast}, +{8, TokenCppKind_LiteralFalse}, +{4, TokenCppKind_Char}, +{0, 0}, +{4, TokenCppKind_New}, +{4, TokenCppKind_Using}, +{0, 0}, +{0, 0}, +{4, TokenCppKind_Unsigned}, +{4, TokenCppKind_Return}, +{4, TokenCppKind_Extern}, +{4, TokenCppKind_Signed}, +{0, 0}, +{4, TokenCppKind_Do}, +{0, 0}, +{4, TokenCppKind_ThreadLocal}, +{0, 0}, +{0, 0}, +{4, TokenCppKind_Continue}, +{4, TokenCppKind_Enum}, +{0, 0}, +{8, TokenCppKind_LiteralTrue}, +{4, TokenCppKind_Export}, +{0, 0}, +{4, TokenCppKind_Void}, +{4, TokenCppKind_Case}, +{0, 0}, +{0, 0}, +{0, 0}, +{4, TokenCppKind_While}, +{4, TokenCppKind_Operator}, +{4, TokenCppKind_ConstCast}, +{0, 0}, +{4, TokenCppKind_Inline}, +{0, 0}, +{4, TokenCppKind_Break}, +{0, 0}, +{4, TokenCppKind_Goto}, +{4, TokenCppKind_Template}, +{4, TokenCppKind_Catch}, +{4, TokenCppKind_For}, +{0, 0}, +{4, TokenCppKind_Try}, +{0, 0}, +{4, TokenCppKind_Static}, +{0, 0}, +{0, 0}, +{4, TokenCppKind_Asm}, +{0, 0}, +{0, 0}, +{4, TokenCppKind_If}, +{0, 0}, +{0, 0}, +{0, 0}, +{4, TokenCppKind_Int}, +{0, 0}, +{0, 0}, +{4, TokenCppKind_NullPtr}, +{0, 0}, +{0, 0}, +{4, TokenCppKind_Default}, +{4, TokenCppKind_Delete}, +{4, TokenCppKind_Const}, +{4, TokenCppKind_Protected}, +{0, 0}, +{0, 0}, +{0, 0}, +{0, 0}, +{4, TokenCppKind_Float}, +{0, 0}, +{0, 0}, +{4, TokenCppKind_DynamicCast}, +{4, TokenCppKind_SizeOf}, +{0, 0}, +{4, TokenCppKind_Bool}, +{4, TokenCppKind_Union}, +{0, 0}, +{4, TokenCppKind_Virtual}, +{4, TokenCppKind_StaticAssert}, +{4, TokenCppKind_ReinterpretCast}, +{4, TokenCppKind_Volatile}, +{4, TokenCppKind_Else}, +{0, 0}, +{4, TokenCppKind_DeclType}, +{4, TokenCppKind_Register}, +{0, 0}, +{0, 0}, +{0, 0}, +{4, TokenCppKind_Struct}, +{4, TokenCppKind_Typename}, +{0, 0}, }; -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, +i32 cpp_main_keys_slot_count = 121; +u64 cpp_main_keys_seed = 0x57fd2e8360fc723f; +u64 cpp_pp_directives_hash_array[25] = { +0x0000000000000000,0x0000000000000000,0xfcbe0e69ab5f0ab5,0x0000000000000000, +0xdfa7f6eb98ca462d,0xdfa7f6ebae1c243d,0x26e6293f7c60a9d7,0x0000000000000000, +0xfcbe0e6b92eff62d,0x0000000000000000,0xdfa7f6604dbd1a65,0xfcbe0e69ab4edf49, +0x0000000000000000,0xdfa7f6ee4efdc3a3,0xfcbe0e6b014df297,0x26e6293f7c60632d, +0x0000000000000000,0xfcbe0e6b09dcce2d,0x0000000000000000,0x0000000000000000, +0x26e6293f722aa025,0xa6ba73c3a74f4285,0xb0a57847c3818ea9,0x0000000000000000, +0xb0a595ffc01d0bd5, }; -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,}; -u8 pp_directives_key_array_3[] = {0x64,0x65,0x66,0x69,0x6e,0x65,}; -u8 pp_directives_key_array_4[] = {0x65,0x6c,0x69,0x66,}; -u8 pp_directives_key_array_5[] = {0x75,0x73,0x69,0x6e,0x67,}; -u8 pp_directives_key_array_7[] = {0x69,0x66,0x64,0x65,0x66,}; -u8 pp_directives_key_array_10[] = {0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,}; -u8 pp_directives_key_array_12[] = {0x65,0x6c,0x73,0x65,}; -u8 pp_directives_key_array_13[] = {0x6c,0x69,0x6e,0x65,}; -u8 pp_directives_key_array_14[] = {0x69,0x66,}; -u8 pp_directives_key_array_17[] = {0x65,0x6e,0x64,0x69,0x66,}; -u8 pp_directives_key_array_18[] = {0x69,0x6d,0x70,0x6f,0x72,0x74,}; -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}, +u8 cpp_pp_directives_key_array_2[] = {0x65,0x6e,0x64,0x69,0x66,}; +u8 cpp_pp_directives_key_array_4[] = {0x69,0x66,0x6e,0x64,0x65,0x66,}; +u8 cpp_pp_directives_key_array_5[] = {0x69,0x6d,0x70,0x6f,0x72,0x74,}; +u8 cpp_pp_directives_key_array_6[] = {0x65,0x6c,0x73,0x65,}; +u8 cpp_pp_directives_key_array_8[] = {0x69,0x66,0x64,0x65,0x66,}; +u8 cpp_pp_directives_key_array_10[] = {0x64,0x65,0x66,0x69,0x6e,0x65,}; +u8 cpp_pp_directives_key_array_11[] = {0x65,0x72,0x72,0x6f,0x72,}; +u8 cpp_pp_directives_key_array_13[] = {0x70,0x72,0x61,0x67,0x6d,0x61,}; +u8 cpp_pp_directives_key_array_14[] = {0x75,0x73,0x69,0x6e,0x67,}; +u8 cpp_pp_directives_key_array_15[] = {0x65,0x6c,0x69,0x66,}; +u8 cpp_pp_directives_key_array_17[] = {0x75,0x6e,0x64,0x65,0x66,}; +u8 cpp_pp_directives_key_array_20[] = {0x6c,0x69,0x6e,0x65,}; +u8 cpp_pp_directives_key_array_21[] = {0x69,0x66,}; +u8 cpp_pp_directives_key_array_22[] = {0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,}; +u8 cpp_pp_directives_key_array_24[] = {0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,}; +String_Const_u8 cpp_pp_directives_key_array[25] = { +{0, 0}, +{0, 0}, +{cpp_pp_directives_key_array_2, 5}, +{0, 0}, +{cpp_pp_directives_key_array_4, 6}, +{cpp_pp_directives_key_array_5, 6}, +{cpp_pp_directives_key_array_6, 4}, +{0, 0}, +{cpp_pp_directives_key_array_8, 5}, +{0, 0}, +{cpp_pp_directives_key_array_10, 6}, +{cpp_pp_directives_key_array_11, 5}, +{0, 0}, +{cpp_pp_directives_key_array_13, 6}, +{cpp_pp_directives_key_array_14, 5}, +{cpp_pp_directives_key_array_15, 4}, +{0, 0}, +{cpp_pp_directives_key_array_17, 5}, +{0, 0}, +{0, 0}, +{cpp_pp_directives_key_array_20, 4}, +{cpp_pp_directives_key_array_21, 2}, +{cpp_pp_directives_key_array_22, 7}, +{0, 0}, +{cpp_pp_directives_key_array_24, 7}, }; -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}, +Lexeme_Table_Value cpp_pp_directives_value_array[25] = { +{0, 0}, +{0, 0}, +{5, TokenCppKind_PPEndIf}, +{0, 0}, +{5, TokenCppKind_PPIfNDef}, +{5, TokenCppKind_PPImport}, +{5, TokenCppKind_PPElse}, +{0, 0}, +{5, TokenCppKind_PPIfDef}, +{0, 0}, +{5, TokenCppKind_PPDefine}, +{5, TokenCppKind_PPError}, +{0, 0}, +{5, TokenCppKind_PPPragma}, +{5, TokenCppKind_PPUsing}, +{5, TokenCppKind_PPElIf}, +{0, 0}, +{5, TokenCppKind_PPUndef}, +{0, 0}, +{0, 0}, +{5, TokenCppKind_PPLine}, +{5, TokenCppKind_PPIf}, +{5, TokenCppKind_PPInclude}, +{0, 0}, +{5, TokenCppKind_PPVersion}, }; -i32 pp_directives_slot_count = 25; -u64 pp_directives_seed = 0x8848fb3caaf5d4d5; -u64 pp_keys_hash_array[2] = { - 0x0000000000000000,0x72743f437c9f847d, +i32 cpp_pp_directives_slot_count = 25; +u64 cpp_pp_directives_seed = 0xe34ca5b52cfeb288; +u64 cpp_pp_keys_hash_array[2] = { +0x0000000000000000,0xbef27711d7aba2b5, }; -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}, +u8 cpp_pp_keys_key_array_1[] = {0x64,0x65,0x66,0x69,0x6e,0x65,0x64,}; +String_Const_u8 cpp_pp_keys_key_array[2] = { +{0, 0}, +{cpp_pp_keys_key_array_1, 7}, }; -Lexeme_Table_Value pp_keys_value_array[2] = { - {0, 0}, - {4, TokenCppKind_PPDefined}, +Lexeme_Table_Value cpp_pp_keys_value_array[2] = { +{0, 0}, +{4, TokenCppKind_PPDefined}, }; -i32 pp_keys_slot_count = 2; -u64 pp_keys_seed = 0x71428d58f01a7eed; +i32 cpp_pp_keys_slot_count = 2; +u64 cpp_pp_keys_seed = 0x5c61314da2466695; 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(cpp_pp_keys_hash_array, cpp_pp_keys_key_array, cpp_pp_keys_value_array, cpp_pp_keys_slot_count, cpp_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(cpp_main_keys_hash_array, cpp_main_keys_key_array, cpp_main_keys_value_array, cpp_main_keys_slot_count, cpp_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(cpp_pp_keys_hash_array, cpp_pp_keys_key_array, cpp_pp_keys_value_array, cpp_pp_keys_slot_count, cpp_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(cpp_main_keys_hash_array, cpp_main_keys_key_array, cpp_main_keys_value_array, cpp_main_keys_slot_count, cpp_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(cpp_pp_directives_hash_array, cpp_pp_directives_key_array, cpp_pp_directives_value_array, cpp_pp_directives_slot_count, cpp_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(cpp_pp_directives_hash_array, cpp_pp_directives_key_array, cpp_pp_directives_value_array, cpp_pp_directives_slot_count, cpp_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/lexer_generator/4coder_lex_gen_main.cpp b/custom/lexer_generator/4coder_lex_gen_main.cpp index 0974cd26..ec02a67b 100644 --- a/custom/lexer_generator/4coder_lex_gen_main.cpp +++ b/custom/lexer_generator/4coder_lex_gen_main.cpp @@ -3181,7 +3181,7 @@ gen_keyword_table(Arena *scratch, Token_Kind_Set tokens, Keyword_Set keywords, F Temp_Memory temp = begin_temp(scratch); Keyword_Layout key_layout = opt_key_layout(scratch, keywords); - fprintf(out, "u64 %.*s_hash_array[%d] = {\n", + fprintf(out, "u64 " LANG_NAME_LOWER_STR "_%.*s_hash_array[%d] = {\n", string_expand(keywords.pretty_name), key_layout.slot_count); for (i32 i = 0; i < key_layout.slot_count; i += 1){ if (key_layout.slots[i] == 0){ @@ -3198,7 +3198,7 @@ gen_keyword_table(Arena *scratch, Token_Kind_Set tokens, Keyword_Set keywords, F for (i32 i = 0; i < key_layout.slot_count; i += 1){ if (key_layout.slots[i] != 0){ - fprintf(out, "u8 %.*s_key_array_%d[] = {", + fprintf(out, "u8 " LANG_NAME_LOWER_STR "_%.*s_key_array_%d[] = {", string_expand(keywords.pretty_name), i); String_Const_u8 lexeme = key_layout.slots[i]->lexeme; for (u64 j = 0; j < lexeme.size; j += 1){ @@ -3208,20 +3208,20 @@ gen_keyword_table(Arena *scratch, Token_Kind_Set tokens, Keyword_Set keywords, F } } - fprintf(out, "String_Const_u8 %.*s_key_array[%d] = {\n", + fprintf(out, "String_Const_u8 " LANG_NAME_LOWER_STR "_%.*s_key_array[%d] = {\n", string_expand(keywords.pretty_name), key_layout.slot_count); for (i32 i = 0; i < key_layout.slot_count; i += 1){ if (key_layout.slots[i] == 0){ fprintf(out, "{0, 0},\n"); } else{ - fprintf(out, "{%.*s_key_array_%d, %llu},\n", + fprintf(out, "{" LANG_NAME_LOWER_STR "_%.*s_key_array_%d, %llu},\n", string_expand(keywords.pretty_name), i, key_layout.slots[i]->lexeme.size); } } fprintf(out, "};\n"); - fprintf(out, "Lexeme_Table_Value %.*s_value_array[%d] = {\n", + fprintf(out, "Lexeme_Table_Value " LANG_NAME_LOWER_STR "_%.*s_value_array[%d] = {\n", string_expand(keywords.pretty_name), key_layout.slot_count); for (i32 i = 0; i < key_layout.slot_count; i += 1){ if (key_layout.slots[i] == 0){ @@ -3245,9 +3245,9 @@ gen_keyword_table(Arena *scratch, Token_Kind_Set tokens, Keyword_Set keywords, F } fprintf(out, "};\n"); - fprintf(out, "i32 %.*s_slot_count = %d;\n", + fprintf(out, "i32 " LANG_NAME_LOWER_STR "_%.*s_slot_count = %d;\n", string_expand(keywords.pretty_name), key_layout.slot_count); - fprintf(out, "u64 %.*s_seed = 0x%016llx;\n", + fprintf(out, "u64 " LANG_NAME_LOWER_STR "_%.*s_seed = 0x%016llx;\n", string_expand(keywords.pretty_name), key_layout.seed); end_temp(temp); @@ -3453,8 +3453,12 @@ gen_SLOW_action_list__cont_flow(Arena *scratch, Token_Kind_Set tokens, Flag_Set { Keyword_Set *keywords = handler->keywords; fprintf(out, "Lexeme_Table_Lookup lookup = " - "lexeme_table_lookup(%.*s_hash_array, %.*s_key_array, " - "%.*s_value_array, %.*s_slot_count, %.*s_seed, " + "lexeme_table_lookup(" + LANG_NAME_LOWER_STR "_%.*s_hash_array, " + LANG_NAME_LOWER_STR "_%.*s_key_array, " + LANG_NAME_LOWER_STR "_%.*s_value_array, " + LANG_NAME_LOWER_STR "_%.*s_slot_count, " + LANG_NAME_LOWER_STR "_%.*s_seed, " "state.emit_ptr, token.size);\n", string_expand(keywords->pretty_name), string_expand(keywords->pretty_name), @@ -3477,8 +3481,12 @@ gen_SLOW_action_list__cont_flow(Arena *scratch, Token_Kind_Set tokens, Flag_Set { Keyword_Set *keywords = handler->keywords; fprintf(out, "Lexeme_Table_Lookup lookup = " - "lexeme_table_lookup(%.*s_hash_array, %.*s_key_array, " - "%.*s_value_array, %.*s_slot_count, %.*s_seed, " + "lexeme_table_lookup(" + LANG_NAME_LOWER_STR "_%.*s_hash_array, " + LANG_NAME_LOWER_STR "_%.*s_key_array, " + LANG_NAME_LOWER_STR "_%.*s_value_array, " + LANG_NAME_LOWER_STR "_%.*s_slot_count, " + LANG_NAME_LOWER_STR "_%.*s_seed, " "state.delim_first, (state.delim_one_past_last - state.delim_first));\n", string_expand(keywords->pretty_name), string_expand(keywords->pretty_name),