diff --git a/4coder_API/4coder_custom.h b/4coder_API/4coder_custom.h index 427fad69..96a98df5 100644 --- a/4coder_API/4coder_custom.h +++ b/4coder_API/4coder_custom.h @@ -7,12 +7,7 @@ #ifndef FCODER_CUSTOM_H #define FCODER_CUSTOM_H -#include -#include -#include - #include "4coder_base_types.h" -#include "4coder_lib/4cpp_lexer_types.h" #include "4coder_API/4coder_version.h" #include "4coder_API/4coder_keycodes.h" #include "4coder_API/4coder_default_colors.h" diff --git a/4coder_API/4coder_version.h b/4coder_API/4coder_version.h index 01d982c8..98596a84 100644 --- a/4coder_API/4coder_version.h +++ b/4coder_API/4coder_version.h @@ -1,12 +1,12 @@ #define MAJOR 4 -#define MINOR 0 -#define PATCH 30 +#define MINOR 1 +#define PATCH 0 // string #define VN__(a,b,c) #a "." #b "." #c #define VN_(a,b,c) VN__(a,b,c) #define VERSION_NUMBER VN_(MAJOR,MINOR,PATCH) -#define VERSION_STRING "alpha " VERSION_NUMBER +#define VERSION_STRING "beta " VERSION_NUMBER #define ST__(s) #s #define ST_(s) ST__(s) @@ -24,7 +24,7 @@ #define VN__(a,b,c) #a "." #b "." #c #define VN_(a,b,c) VN__(a,b,c) #define VERSION_NUMBER VN_(MAJOR,MINOR,PATCH) -#define VERSION_STRING "alpha " VERSION_NUMBER +#define VERSION_STRING "beta " VERSION_NUMBER #define VERSION VERSION_STRING VERSION_TYPE @@ -34,7 +34,7 @@ #define L_VN__(a,b,c) L#a L"." L#b L"." L#c #define L_VN_(a,b,c) L_VN__(a,b,c) #define L_VERSION_NUMBER L_VN_(MAJOR,MINOR,PATCH) -#define L_VERSION_STRING L"alpha " L_VERSION_NUMBER +#define L_VERSION_STRING L"beta " L_VERSION_NUMBER #if defined(FRED_SUPER) #define L_VERSION_TYPE L" super!" diff --git a/4coder_auto_indent.cpp b/4coder_auto_indent.cpp index 39734612..86565e28 100644 --- a/4coder_auto_indent.cpp +++ b/4coder_auto_indent.cpp @@ -72,7 +72,7 @@ seek_matching_token_backwards(Token_Array tokens, Token *token, else{ i32 nesting_level = 0; for (; token > tokens.tokens; --token){ - if (!HasFlag(token->flags, TokenBaseFlag_PreProcessorBody)){ + if (!HasFlag(token->flags, TokenBaseFlag_PreprocessorBody)){ if (token->kind == close){ ++nesting_level; } @@ -104,7 +104,7 @@ find_anchor_token(Application_Links *app, Buffer_ID buffer, Token_Array tokens, Token *token_it = tokens.tokens; i64 highest_checked_line_number = -1; for (; token_it < first_invalid_token; ++token_it){ - i64 line_number = get_line_number_from_pos(app, buffer, token_it->start); + i64 line_number = get_line_number_from_pos(app, buffer, token_it->pos); if (highest_checked_line_number < line_number){ highest_checked_line_number = line_number; if (top == -1){ @@ -112,50 +112,34 @@ find_anchor_token(Application_Links *app, Buffer_ID buffer, Token_Array tokens, } } - switch (token_it->type){ - case CPP_TOKEN_BRACE_OPEN: - case CPP_TOKEN_BRACKET_OPEN: - case CPP_TOKEN_PARENTHESE_OPEN: + switch (token_it->kind){ + case TokenBaseKind_ParentheticalOpen: + case TokenBaseKind_ScopeOpen: { top += 1; - stack[top] = token_it->type; + stack[top] = token_it->kind; }break; - case CPP_TOKEN_PARENTHESE_CLOSE: + case TokenBaseKind_ParentheticalClose: { for (;top >= 0;){ i32 index = top; top -= 1; - if (stack[index] == CPP_TOKEN_PARENTHESE_OPEN){ + if (stack[index] == TokenBaseKind_ParentheticalOpen){ break; } } }break; - case CPP_TOKEN_BRACE_CLOSE: + case TokenBaseKind_ScopeClose: { for (;top >= 0;){ i32 index = top; - if (stack[index] == CPP_TOKEN_PARENTHESE_OPEN){ + if (stack[index] == TokenBaseKind_ParentheticalOpen){ break; } top -= 1; - if (stack[index] == CPP_TOKEN_BRACE_OPEN){ - break; - } - } - }break; - - case CPP_TOKEN_BRACKET_CLOSE: - { - for (;top >= 0;){ - i32 index = top; - if (stack[index] == CPP_TOKEN_PARENTHESE_OPEN || - stack[index] == CPP_TOKEN_BRACE_OPEN){ - break; - } - top -= 1; - if (stack[index] == CPP_TOKEN_BRACKET_OPEN){ + if (stack[index] == TokenBaseKind_ScopeClose){ break; } } @@ -188,10 +172,8 @@ get_indentation_marks(Application_Links *app, Arena *arena, Buffer_ID buffer, } } else{ - i64 line_number = get_line_number_from_pos(app, buffer, token_ptr->start); - if (line_number > first_line){ - line_number = first_line; - } + i64 line_number = get_line_number_from_pos(app, buffer, token_ptr->pos); + line_number = clamp_top(line_number, first_line); if (token_ptr == tokens.tokens){ indent.current_indent = 0; @@ -206,7 +188,7 @@ get_indentation_marks(Application_Links *app, Arena *arena, Buffer_ID buffer, } // Back up and consume this token too IF it is a scope opener. - if (token.type == CPP_TOKEN_BRACE_OPEN || token.type == CPP_TOKEN_BRACKET_OPEN){ + if (token.kind == TokenBaseKind_ScopeOpen){ --token_ptr; } @@ -222,12 +204,12 @@ get_indentation_marks(Application_Links *app, Arena *arena, Buffer_ID buffer, token = *token_ptr; } else{ - token.type = CPP_TOKEN_EOF; - token.start = (i32)buffer_get_size(app, buffer); - token.flags = 0; + block_zero_struct(&token); + token.kind = TokenBaseKind_EOF; + token.pos = buffer_get_size(app, buffer); } - for (;token.start >= next_line_start_pos && line_number < one_past_last_line;){ + for (;token.pos >= next_line_start_pos && line_number < one_past_last_line;){ next_line_start_pos = get_line_start_pos(app, buffer, line_number + 1); i64 this_indent = 0; @@ -239,8 +221,8 @@ get_indentation_marks(Application_Links *app, Arena *arena, Buffer_ID buffer, b32 did_multi_line_behavior = false; // NOTE(allen): Check for multi-line tokens - if (prev_token.start <= this_line_start && prev_token.start + prev_token.size > this_line_start){ - if (prev_token.type == CPP_TOKEN_COMMENT || prev_token.type == CPP_TOKEN_STRING_CONSTANT){ + if (prev_token.pos <= this_line_start && prev_token.pos + prev_token.size > this_line_start){ + if (prev_token.kind == TokenBaseKind_Comment || prev_token.kind == TokenBaseKind_LiteralString){ Indent_Info hard_start = get_indent_info_line_start(app, buffer, this_line_start, tab_width); if (exact_align){ @@ -274,72 +256,67 @@ get_indentation_marks(Application_Links *app, Arena *arena, Buffer_ID buffer, if (!did_multi_line_behavior){ this_indent = indent.current_indent; - if (token.start < next_line_start){ - if (token.flags & CPP_TFLAG_PP_DIRECTIVE){ - this_indent = 0; - } - else{ - switch (token.type){ - case CPP_TOKEN_BRACKET_CLOSE: - { - this_indent -= tab_width; - }break; - case CPP_TOKEN_BRACE_CLOSE: - { - this_indent -= tab_width; - }break; - case CPP_TOKEN_BRACE_OPEN: - {}break; + if (token.pos < next_line_start){ + switch (token.kind){ + case TokenBaseKind_Preprocessor: + { + this_indent = 0; + }break; + + case TokenBaseKind_ScopeClose: + { + this_indent -= tab_width; + }break; + case TokenBaseKind_ScopeOpen: + {}break; + + default: + if (indent.current_indent > 0){ + b32 statement_complete = false; - default: - if (indent.current_indent > 0){ - b32 statement_complete = false; - - Token *prev_usable_token_ptr = token_ptr - 1; - Token prev_usable_token = {}; - if (prev_usable_token_ptr >= tokens.tokens){ - prev_usable_token = *prev_usable_token_ptr; - } - - // Scan backwards for the previous token that actually tells us about the statement. - b32 has_prev_usable_token = true; + Token *prev_usable_token_ptr = token_ptr - 1; + Token prev_usable_token = {}; + if (prev_usable_token_ptr >= tokens.tokens){ + prev_usable_token = *prev_usable_token_ptr; + } + + // Scan backwards for the previous token that actually tells us about the statement. + b32 has_prev_usable_token = true; #define NotUsable(T) \ - (((T).flags&CPP_TFLAG_PP_BODY) || ((T).flags&CPP_TFLAG_PP_DIRECTIVE) || ((T).type == CPP_TOKEN_COMMENT)) - if (NotUsable(prev_usable_token)){ - has_prev_usable_token = false; + (((T).flags&TokenBaseFlag_PreprocessorBody) || ((T).kind == TokenBaseKind_Comment) || ((T).kind == TokenBaseKind_Whitespace)) + if (NotUsable(prev_usable_token)){ + has_prev_usable_token = false; + + for (--prev_usable_token_ptr; + prev_usable_token_ptr >= tokens.tokens; + --prev_usable_token_ptr){ - for (--prev_usable_token_ptr; - prev_usable_token_ptr >= tokens.tokens; - --prev_usable_token_ptr){ - - prev_usable_token = *prev_usable_token_ptr; - if (!NotUsable(prev_usable_token)){ - has_prev_usable_token = true; - break; - } + prev_usable_token = *prev_usable_token_ptr; + if (!NotUsable(prev_usable_token)){ + has_prev_usable_token = true; + break; } } -#undef NotUsable - - if (!has_prev_usable_token){ - statement_complete = true; - } - else{ - if (prev_usable_token.type == CPP_TOKEN_BRACKET_OPEN || - prev_usable_token.type == CPP_TOKEN_BRACE_OPEN || - prev_usable_token.type == CPP_TOKEN_BRACE_CLOSE || - prev_usable_token.type == CPP_TOKEN_SEMICOLON || - prev_usable_token.type == CPP_TOKEN_COLON || - prev_usable_token.type == CPP_TOKEN_COMMA){ - statement_complete = true; - } - } - - if (!statement_complete){ - this_indent += tab_width; - } } - } +#undef NotUsable + + if (!has_prev_usable_token){ + statement_complete = true; + } + else{ + if (prev_usable_token.kind == TokenBaseKind_ScopeOpen || + prev_usable_token.kind == TokenBaseKind_ScopeClose || + prev_usable_token.sub_kind == TokenCppKind_Semicolon || + prev_usable_token.sub_kind == TokenCppKind_Colon || + prev_usable_token.sub_kind == TokenCppKind_Comma){ + statement_complete = true; + } + } + + if (!statement_complete){ + this_indent += tab_width; + } + }break; } } if (this_indent < 0){ @@ -348,7 +325,7 @@ get_indentation_marks(Application_Links *app, Arena *arena, Buffer_ID buffer, } if (indent.paren_nesting > 0){ - if (prev_token.type != CPP_TOKEN_PARENTHESE_OPEN){ + if (prev_token.kind != TokenBaseKind_ParentheticalOpen){ i64 level = indent.paren_nesting - 1; level = clamp_top(level, ArrayCount(indent.paren_anchor_indent) - 1); this_indent = indent.paren_anchor_indent[level]; @@ -357,12 +334,11 @@ get_indentation_marks(Application_Links *app, Arena *arena, Buffer_ID buffer, // Rebase the paren anchor if the first token // after the open paren is on the next line. - if (indent.paren_nesting > 0){ - if (prev_token.type == CPP_TOKEN_PARENTHESE_OPEN){ - i64 level = indent.paren_nesting - 1; - level = clamp_top(level, ArrayCount(indent.paren_anchor_indent) - 1); - indent.paren_anchor_indent[level] = this_indent; - } + if (indent.paren_nesting > 0 && + prev_token.kind == TokenBaseKind_ParentheticalOpen){ + i64 level = indent.paren_nesting - 1; + level = clamp_top(level, ArrayCount(indent.paren_anchor_indent) - 1); + indent.paren_anchor_indent[level] = this_indent; } if (line_number >= first_line){ @@ -374,20 +350,18 @@ get_indentation_marks(Application_Links *app, Arena *arena, Buffer_ID buffer, } // Update indent state. - switch (token.type){ - case CPP_TOKEN_BRACKET_OPEN: indent.current_indent += tab_width; break; - case CPP_TOKEN_BRACKET_CLOSE: indent.current_indent -= tab_width; break; - case CPP_TOKEN_BRACE_OPEN: indent.current_indent += tab_width; break; - case CPP_TOKEN_BRACE_CLOSE: indent.current_indent -= tab_width; break; + switch (token.kind){ + case TokenBaseKind_ScopeOpen: indent.current_indent += tab_width; break; + case TokenBaseKind_ScopeClose: indent.current_indent -= tab_width; break; - case CPP_TOKEN_COMMENT: - case CPP_TOKEN_STRING_CONSTANT: + case TokenBaseKind_Comment: + case TokenBaseKind_LiteralString: { - i64 line = get_line_number_from_pos(app, buffer, token.start); + i64 line = get_line_number_from_pos(app, buffer, token.pos); i64 start = get_line_start_pos(app, buffer, line); Indent_Info hard_start = get_indent_info_line_start(app, buffer, start, tab_width); - i64 old_dist_to_token = (token.start - start); + i64 old_dist_to_token = (token.pos - start); i64 old_indent = hard_start.indent_pos; i64 token_start_inset = old_dist_to_token - old_indent; i64 new_dist_to_token = indent.current_indent + token_start_inset; @@ -396,13 +370,13 @@ get_indentation_marks(Application_Links *app, Arena *arena, Buffer_ID buffer, indent.previous_comment_indent = old_indent; }break; - case CPP_TOKEN_PARENTHESE_OPEN: + case TokenBaseKind_ParentheticalOpen: { - if (!(token.flags & CPP_TFLAG_PP_BODY)){ + if (!HasFlag(token.flags, TokenBaseFlag_PreprocessorBody)){ if (indent.paren_nesting < ArrayCount(indent.paren_anchor_indent)){ - i64 line = get_line_number_from_pos(app, buffer, token.start); + i64 line = get_line_number_from_pos(app, buffer, token.pos); i64 start = get_line_start_pos(app, buffer, line); - i64 char_pos = token.start - start; + i64 char_pos = token.pos - start; Indent_Info hard_start = get_indent_info_line_start(app, buffer, start, tab_width); @@ -414,9 +388,9 @@ get_indentation_marks(Application_Links *app, Arena *arena, Buffer_ID buffer, } }break; - case CPP_TOKEN_PARENTHESE_CLOSE: + case TokenBaseKind_ParentheticalClose: { - if (!(token.flags & CPP_TFLAG_PP_BODY)){ + if (!HasFlag(token.flags, TokenBaseFlag_PreprocessorBody)){ if (indent.paren_nesting > 0){ --indent.paren_nesting; } @@ -448,8 +422,8 @@ get_indent_lines_whole_tokens(Application_Links *app, Buffer_ID buffer, Token_Ar for (;line_start > 1;){ i64 line_start_pos = get_line_start_pos(app, buffer, line_start); Token *token = get_first_token_from_pos(tokens, line_start_pos); - if (token != 0 && token->start < line_start_pos){ - line_start = get_line_number_from_pos(app, buffer, token->start); + if (token != 0 && token->pos < line_start_pos){ + line_start = get_line_number_from_pos(app, buffer, token->pos); } else{ break; @@ -461,8 +435,8 @@ get_indent_lines_whole_tokens(Application_Links *app, Buffer_ID buffer, Token_Ar for (;line_end < line_count;){ i64 next_line_start_pos = get_line_start_pos(app, buffer, line_end + 1); Token *token = get_first_token_from_pos(tokens, next_line_start_pos); - if (token != 0 && token->start < next_line_start_pos){ - line_end = get_line_number_from_pos(app, buffer, token->start + token->size); + if (token != 0 && token->pos < next_line_start_pos){ + line_end = get_line_number_from_pos(app, buffer, token->pos + token->size); } else{ break; @@ -485,7 +459,7 @@ buffer_auto_indent(Application_Links *app, Buffer_ID buffer, i64 start, i64 end, Token_Array *tokens_ptr = scope_attachment(app, scope, attachment_tokens, Token_Array); if (tokens_ptr != 0 && tokens_ptr->count != 0){ Scratch_Block scratch(app); - Token_Array tokens = *token_ptr; + Token_Array tokens = *tokens_ptr; i64 line_start = 0; i64 line_end = 0; diff --git a/4coder_config.cpp b/4coder_config.cpp index d8239f63..607a2b40 100644 --- a/4coder_config.cpp +++ b/4coder_config.cpp @@ -4,7 +4,7 @@ // TOP -static String_Const_u8_Array +internal String_Const_u8_Array parse_extension_line_to_extension_list(Arena *arena, String_Const_u8 str){ i32 count = 0; for (umem i = 0; i < str.size; i += 1){ @@ -32,7 +32,7 @@ parse_extension_line_to_extension_list(Arena *arena, String_Const_u8 str){ //////////////////////////////// -static Error_Location +internal Error_Location get_error_location(u8 *base, u8 *pos){ Error_Location location = {}; location.line_number = 1; @@ -51,7 +51,7 @@ get_error_location(u8 *base, u8 *pos){ return(location); } -static String_Const_u8 +internal String_Const_u8 config_stringize_errors(Arena *arena, Config *parsed){ String_Const_u8 result = {}; if (parsed->errors.first != 0){ @@ -70,16 +70,19 @@ config_stringize_errors(Arena *arena, Config *parsed){ //////////////////////////////// -static void +internal void config_parser__advance_to_next(Config_Parser *ctx){ Token *t = ctx->token; Token *e = ctx->end; - for (t += 1; t < e && t->type == CPP_TOKEN_COMMENT; t += 1); + for (t += 1; + t < e && (t->kind == TokenBaseKind_Comment || + t->kind == TokenBaseKind_Whitespace); + t += 1); ctx->token = t; } -static Config_Parser -make_config_parser(Arena *arena, String_Const_u8 file_name, String_Const_u8 data, Cpp_Token_Array array){ +internal Config_Parser +make_config_parser(Arena *arena, String_Const_u8 file_name, String_Const_u8 data, Token_Array array){ Config_Parser ctx = {}; ctx.start = array.tokens; ctx.token = ctx.start - 1; @@ -91,40 +94,52 @@ make_config_parser(Arena *arena, String_Const_u8 file_name, String_Const_u8 data return(ctx); } -static b32 -config_parser__recognize_token(Config_Parser *ctx, Cpp_Token_Type type){ +internal b32 +config_parser__recognize_base_token(Config_Parser *ctx, Token_Base_Kind kind){ b32 result = false; if (ctx->start <= ctx->token && ctx->token < ctx->end){ - result = (ctx->token->type == type); + result = (ctx->token->kind == kind); } - else if (type == CPP_TOKEN_EOF){ + else if (kind == TokenBaseKind_EOF){ result = true; } return(result); } -static b32 -config_parser__recognize_token_category(Config_Parser *ctx, Cpp_Token_Category category){ +internal b32 +config_parser__recognize_token(Config_Parser *ctx, Token_Cpp_Kind kind){ b32 result = false; if (ctx->start <= ctx->token && ctx->token < ctx->end){ - result = (cpp_token_category_from_type(ctx->token->type) == category); + result = (ctx->token->sub_kind == kind); } - else if (category == CPP_TOKEN_CAT_EOF){ + else if (kind == TokenCppKind_EOF){ result = true; } return(result); } -static String_Const_u8 +internal b32 +config_parser__recognize_boolean(Config_Parser *ctx){ + b32 result = false; + Token *token = ctx->token; + if (ctx->start <= ctx->token && ctx->token < ctx->end){ + result = (token->sub_kind == TokenCppKind_LiteralTrue || + token->sub_kind == TokenCppKind_LiteralFalse); + } + return(result); +} + +internal String_Const_u8 config_parser__get_lexeme(Config_Parser *ctx){ String_Const_u8 lexeme = {}; - if (ctx->start <= ctx->token && ctx->token < ctx->end){ - lexeme = SCu8(ctx->data.str + ctx->token->start, ctx->token->size); + Token *token = ctx->token; + if (ctx->start <= token && token < ctx->end){ + lexeme = SCu8(ctx->data.str + token->pos, token->size); } return(lexeme); } -static Config_Integer +internal Config_Integer config_parser__get_int(Config_Parser *ctx){ Config_Integer config_integer = {}; String_Const_u8 str = config_parser__get_lexeme(ctx); @@ -146,28 +161,28 @@ config_parser__get_int(Config_Parser *ctx){ return(config_integer); } -static b32 +internal b32 config_parser__get_boolean(Config_Parser *ctx){ String_Const_u8 str = config_parser__get_lexeme(ctx); return(string_match(str, string_u8_litexpr("true"))); } -static b32 +internal b32 config_parser__recognize_text(Config_Parser *ctx, String_Const_u8 text){ String_Const_u8 lexeme = config_parser__get_lexeme(ctx); return(lexeme.str != 0 && string_match(lexeme, text)); } -static b32 -config_parser__match_token(Config_Parser *ctx, Cpp_Token_Type type){ - b32 result = config_parser__recognize_token(ctx, type); +internal b32 +config_parser__match_token(Config_Parser *ctx, Token_Cpp_Kind kind){ + b32 result = config_parser__recognize_token(ctx, kind); if (result){ config_parser__advance_to_next(ctx); } return(result); } -static b32 +internal b32 config_parser__match_text(Config_Parser *ctx, String_Const_u8 text){ b32 result = config_parser__recognize_text(ctx, text); if (result){ @@ -178,16 +193,16 @@ config_parser__match_text(Config_Parser *ctx, String_Const_u8 text){ #define config_parser__match_text_lit(c,s) config_parser__match_text((c), string_u8_litexpr(s)) -static Config *config_parser__config (Config_Parser *ctx); -static i32 *config_parser__version (Config_Parser *ctx); -static Config_Assignment *config_parser__assignment(Config_Parser *ctx); -static Config_LValue *config_parser__lvalue (Config_Parser *ctx); -static Config_RValue *config_parser__rvalue (Config_Parser *ctx); -static Config_Compound *config_parser__compound (Config_Parser *ctx); -static Config_Compound_Element *config_parser__element (Config_Parser *ctx); +internal Config *config_parser__config (Config_Parser *ctx); +internal i32 *config_parser__version (Config_Parser *ctx); +internal Config_Assignment *config_parser__assignment(Config_Parser *ctx); +internal Config_LValue *config_parser__lvalue (Config_Parser *ctx); +internal Config_RValue *config_parser__rvalue (Config_Parser *ctx); +internal Config_Compound *config_parser__compound (Config_Parser *ctx); +internal Config_Compound_Element *config_parser__element (Config_Parser *ctx); -static Config* -text_data_and_token_array_to_parse_data(Arena *arena, String_Const_u8 file_name, String_Const_u8 data, Cpp_Token_Array array){ +internal Config* +text_data_and_token_array_to_parse_data(Arena *arena, String_Const_u8 file_name, String_Const_u8 data, Token_Array array){ Temp_Memory restore_point = begin_temp(arena); Config_Parser ctx = make_config_parser(arena, file_name, data, array); Config *config = config_parser__config(&ctx); @@ -198,7 +213,7 @@ text_data_and_token_array_to_parse_data(Arena *arena, String_Const_u8 file_name, } // TODO(allen): Move to string library -static Config_Error* +internal Config_Error* config_error_push(Arena *arena, Config_Error_List *list, String_Const_u8 file_name, u8 *pos, char *error_text){ Config_Error *error = push_array(arena, Config_Error, 1); zdll_push_back(list->first, list->last, error); @@ -209,29 +224,29 @@ config_error_push(Arena *arena, Config_Error_List *list, String_Const_u8 file_na return(error); } -static u8* +internal u8* config_parser__get_pos(Config_Parser *ctx){ - return(ctx->data.str + ctx->token->start); + return(ctx->data.str + ctx->token->pos); } -static void +internal void config_parser__log_error_pos(Config_Parser *ctx, u8 *pos, char *error_text){ config_error_push(ctx->arena, &ctx->errors, ctx->file_name, pos, error_text); } -static void +internal void config_parser__log_error(Config_Parser *ctx, char *error_text){ config_parser__log_error_pos(ctx, config_parser__get_pos(ctx), error_text); } -static Config* +internal Config* config_parser__config(Config_Parser *ctx){ i32 *version = config_parser__version(ctx); Config_Assignment *first = 0; Config_Assignment *last = 0; i32 count = 0; - for (;!config_parser__recognize_token(ctx, CPP_TOKEN_EOF);){ + for (;!config_parser__recognize_token(ctx, TokenCppKind_EOF);){ Config_Assignment *assignment = config_parser__assignment(ctx); if (assignment != 0){ zdll_push_back(first, last, assignment); @@ -240,7 +255,7 @@ config_parser__config(Config_Parser *ctx){ } Config *config = push_array(ctx->arena, Config, 1); - memset(config, 0, sizeof(*config)); + block_zero_struct(config); config->version = version; config->first = first; config->last = last; @@ -251,30 +266,30 @@ config_parser__config(Config_Parser *ctx){ return(config); } -static void +internal void config_parser__recover_parse(Config_Parser *ctx){ for (;;){ - if (config_parser__match_token(ctx, CPP_TOKEN_SEMICOLON)){ + if (config_parser__match_token(ctx, TokenCppKind_Semicolon)){ break; } - if (config_parser__recognize_token(ctx, CPP_TOKEN_EOF)){ + if (config_parser__recognize_token(ctx, TokenCppKind_EOF)){ break; } config_parser__advance_to_next(ctx); } } -static i32* +internal i32* config_parser__version(Config_Parser *ctx){ require(config_parser__match_text_lit(ctx, "version")); - if (!config_parser__match_token(ctx, CPP_TOKEN_PARENTHESE_OPEN)){ + if (!config_parser__match_token(ctx, TokenCppKind_ParenOp)){ config_parser__log_error(ctx, "expected token '(' for version specifier: 'version(#)'"); config_parser__recover_parse(ctx); return(0); } - if (!config_parser__recognize_token(ctx, CPP_TOKEN_INTEGER_CONSTANT)){ + if (!config_parser__recognize_base_token(ctx, TokenBaseKind_LiteralInteger)){ config_parser__log_error(ctx, "expected an integer constant for version specifier: 'version(#)'"); config_parser__recover_parse(ctx); return(0); @@ -283,13 +298,13 @@ config_parser__version(Config_Parser *ctx){ Config_Integer value = config_parser__get_int(ctx); config_parser__advance_to_next(ctx); - if (!config_parser__match_token(ctx, CPP_TOKEN_PARENTHESE_CLOSE)){ + if (!config_parser__match_token(ctx, TokenCppKind_ParenCl)){ config_parser__log_error(ctx, "expected token ')' for version specifier: 'version(#)'"); config_parser__recover_parse(ctx); return(0); } - if (!config_parser__match_token(ctx, CPP_TOKEN_SEMICOLON)){ + if (!config_parser__match_token(ctx, TokenCppKind_Semicolon)){ config_parser__log_error(ctx, "expected token ';' for version specifier: 'version(#)'"); config_parser__recover_parse(ctx); return(0); @@ -300,7 +315,7 @@ config_parser__version(Config_Parser *ctx){ return(ptr); } -static Config_Assignment* +internal Config_Assignment* config_parser__assignment(Config_Parser *ctx){ u8 *pos = config_parser__get_pos(ctx); @@ -311,7 +326,7 @@ config_parser__assignment(Config_Parser *ctx){ return(0); } - if (!config_parser__match_token(ctx, CPP_TOKEN_EQ)){ + if (!config_parser__match_token(ctx, TokenCppKind_Eq)){ config_parser__log_error(ctx, "expected token '=' for assignment: 'l-value = r-value;'"); config_parser__recover_parse(ctx); return(0); @@ -329,7 +344,7 @@ config_parser__assignment(Config_Parser *ctx){ return(0); } - if (!config_parser__match_token(ctx, CPP_TOKEN_SEMICOLON)){ + if (!config_parser__match_token(ctx, TokenCppKind_Semicolon)){ config_parser__log_error(ctx, "expected token ';' for assignment: 'l-value = r-value;'"); config_parser__recover_parse(ctx); return(0); @@ -342,19 +357,19 @@ config_parser__assignment(Config_Parser *ctx){ return(assignment); } -static Config_LValue* +internal Config_LValue* config_parser__lvalue(Config_Parser *ctx){ - require(config_parser__recognize_token(ctx, CPP_TOKEN_IDENTIFIER)); + require(config_parser__recognize_token(ctx, TokenCppKind_Identifier)); String_Const_u8 identifier = config_parser__get_lexeme(ctx); config_parser__advance_to_next(ctx); i32 index = 0; - if (config_parser__match_token(ctx, CPP_TOKEN_BRACKET_OPEN)){ - require(config_parser__recognize_token(ctx, CPP_TOKEN_INTEGER_CONSTANT)); + if (config_parser__match_token(ctx, TokenCppKind_BrackOp)){ + require(config_parser__recognize_base_token(ctx, TokenBaseKind_LiteralInteger)); Config_Integer value = config_parser__get_int(ctx); index = value.integer; config_parser__advance_to_next(ctx); - require(config_parser__match_token(ctx, CPP_TOKEN_BRACKET_CLOSE)); + require(config_parser__match_token(ctx, TokenCppKind_BrackCl)); } Config_LValue *lvalue = push_array_zero(ctx->arena, Config_LValue, 1); @@ -363,17 +378,17 @@ config_parser__lvalue(Config_Parser *ctx){ return(lvalue); } -static Config_RValue* +internal Config_RValue* config_parser__rvalue(Config_Parser *ctx){ Config_RValue *rvalue = 0; - if (config_parser__recognize_token(ctx, CPP_TOKEN_IDENTIFIER)){ + if (config_parser__recognize_token(ctx, TokenCppKind_Identifier)){ Config_LValue *l = config_parser__lvalue(ctx); require(l != 0); rvalue = push_array_zero(ctx->arena, Config_RValue, 1); rvalue->type = ConfigRValueType_LValue; rvalue->lvalue = l; } - else if (config_parser__recognize_token(ctx, CPP_TOKEN_BRACE_OPEN)){ + else if (config_parser__recognize_token(ctx, TokenCppKind_BraceOp)){ config_parser__advance_to_next(ctx); Config_Compound *compound = config_parser__compound(ctx); require(compound != 0); @@ -381,14 +396,14 @@ config_parser__rvalue(Config_Parser *ctx){ rvalue->type = ConfigRValueType_Compound; rvalue->compound = compound; } - else if (config_parser__recognize_token_category(ctx, CPP_TOKEN_CAT_BOOLEAN_CONSTANT)){ + else if (config_parser__recognize_boolean(ctx)){ b32 b = config_parser__get_boolean(ctx); config_parser__advance_to_next(ctx); rvalue = push_array_zero(ctx->arena, Config_RValue, 1); rvalue->type = ConfigRValueType_Boolean; rvalue->boolean = b; } - else if (config_parser__recognize_token(ctx, CPP_TOKEN_INTEGER_CONSTANT)){ + else if (config_parser__recognize_base_token(ctx, TokenBaseKind_LiteralInteger)){ Config_Integer value = config_parser__get_int(ctx); config_parser__advance_to_next(ctx); rvalue = push_array_zero(ctx->arena, Config_RValue, 1); @@ -400,7 +415,7 @@ config_parser__rvalue(Config_Parser *ctx){ rvalue->uinteger = value.uinteger; } } - else if (config_parser__recognize_token(ctx, CPP_TOKEN_STRING_CONSTANT)){ + else if (config_parser__recognize_token(ctx, TokenCppKind_LiteralString)){ String_Const_u8 s = config_parser__get_lexeme(ctx); config_parser__advance_to_next(ctx); s = string_chop(string_skip(s, 1), 1); @@ -409,7 +424,7 @@ config_parser__rvalue(Config_Parser *ctx){ rvalue->type = ConfigRValueType_String; rvalue->string = interpreted; } - else if (config_parser__recognize_token(ctx, CPP_TOKEN_CHARACTER_CONSTANT)){ + else if (config_parser__recognize_token(ctx, TokenCppKind_LiteralCharacter)){ String_Const_u8 s = config_parser__get_lexeme(ctx); config_parser__advance_to_next(ctx); s = string_chop(string_skip(s, 1), 1); @@ -421,7 +436,7 @@ config_parser__rvalue(Config_Parser *ctx){ return(rvalue); } -static void +internal void config_parser__compound__check(Config_Parser *ctx, Config_Compound *compound){ b32 implicit_index_allowed = true; for (Config_Compound_Element *node = compound->first; @@ -437,7 +452,7 @@ config_parser__compound__check(Config_Parser *ctx, Config_Compound *compound){ } } -static Config_Compound* +internal Config_Compound* config_parser__compound(Config_Parser *ctx){ Config_Compound_Element *first = 0; Config_Compound_Element *last = 0; @@ -448,8 +463,8 @@ config_parser__compound(Config_Parser *ctx){ zdll_push_back(first, last, element); count += 1; - for (;config_parser__match_token(ctx, CPP_TOKEN_COMMA);){ - if (config_parser__recognize_token(ctx, CPP_TOKEN_BRACE_CLOSE)){ + for (;config_parser__match_token(ctx, TokenCppKind_Comma);){ + if (config_parser__recognize_token(ctx, TokenCppKind_BraceCl)){ break; } element = config_parser__element(ctx); @@ -458,10 +473,10 @@ config_parser__compound(Config_Parser *ctx){ count += 1; } - require(config_parser__match_token(ctx, CPP_TOKEN_BRACE_CLOSE)); + require(config_parser__match_token(ctx, TokenCppKind_BraceCl)); Config_Compound *compound = push_array(ctx->arena, Config_Compound, 1); - memset(compound, 0, sizeof(*compound)); + block_zero_struct(compound); compound->first = first; compound->last = last; compound->count = count; @@ -469,17 +484,17 @@ config_parser__compound(Config_Parser *ctx){ return(compound); } -static Config_Compound_Element* +internal Config_Compound_Element* config_parser__element(Config_Parser *ctx){ Config_Layout layout = {}; layout.pos = config_parser__get_pos(ctx); - if (config_parser__match_token(ctx, CPP_TOKEN_DOT)){ - if (config_parser__recognize_token(ctx, CPP_TOKEN_IDENTIFIER)){ + if (config_parser__match_token(ctx, TokenCppKind_Dot)){ + if (config_parser__recognize_token(ctx, TokenCppKind_Identifier)){ layout.type = ConfigLayoutType_Identifier; layout.identifier = config_parser__get_lexeme(ctx); config_parser__advance_to_next(ctx); } - else if (config_parser__recognize_token(ctx, CPP_TOKEN_INTEGER_CONSTANT)){ + else if (config_parser__recognize_base_token(ctx, TokenBaseKind_LiteralInteger)){ layout.type = ConfigLayoutType_Integer; Config_Integer value = config_parser__get_int(ctx); layout.integer = value.integer; @@ -488,12 +503,12 @@ config_parser__element(Config_Parser *ctx){ else{ return(0); } - require(config_parser__match_token(ctx, CPP_TOKEN_EQ)); + require(config_parser__match_token(ctx, TokenCppKind_Eq)); } Config_RValue *rvalue = config_parser__rvalue(ctx); require(rvalue != 0); Config_Compound_Element *element = push_array(ctx->arena, Config_Compound_Element, 1); - memset(element, 0, sizeof(*element)); + block_zero_struct(element); element->l = layout; element->r = rvalue; return(element); @@ -501,14 +516,14 @@ config_parser__element(Config_Parser *ctx){ //////////////////////////////// -static Config_Error* +internal Config_Error* config_add_error(Arena *arena, Config *config, u8 *pos, char *error_text){ return(config_error_push(arena, &config->errors, config->file_name, pos, error_text)); } //////////////////////////////// -static Config_Assignment* +internal Config_Assignment* config_lookup_assignment(Config *config, String_Const_u8 var_name, i32 subscript){ Config_Assignment *assignment = 0; for (assignment = config->first; @@ -522,10 +537,10 @@ config_lookup_assignment(Config *config, String_Const_u8 var_name, i32 subscript return(assignment); } -static Config_Get_Result +internal Config_Get_Result config_var(Config *config, String_Const_u8 var_name, i32 subscript); -static Config_Get_Result +internal Config_Get_Result config_evaluate_rvalue(Config *config, Config_Assignment *assignment, Config_RValue *r){ Config_Get_Result result = {}; if (r != 0 && !assignment->visited){ @@ -1141,36 +1156,17 @@ change_mode(Application_Links *app, String_Const_u8 mode){ //////////////////////////////// -// TODO(allen): rewrite! -static Cpp_Token_Array -text_data_to_token_array(Arena *arena, String_Const_u8 data){ - b32 success = false; - Temp_Memory restore_point = begin_temp(arena); - Cpp_Token_Array array = {}; - i32 max_count = (1 << 20)/sizeof(Token); - array.tokens = push_array(arena, Token, max_count); - array.max_count = max_count; - Cpp_Keyword_Table kw_table = {}; - Cpp_Keyword_Table pp_table = {}; - if (lexer_keywords_default_init(arena, &kw_table, &pp_table)){ - Cpp_Lex_Data S = cpp_lex_data_init(false, kw_table, pp_table); - Cpp_Lex_Result result = cpp_lex_step(&S, (char*)data.str, (i32)(data.size + 1), HAS_NULL_TERM, &array, NO_OUT_LIMIT); - if (result == LexResult_Finished){ - success = true; - } - } - if (!success){ - block_zero_struct(&array); - end_temp(restore_point); - } - return(array); +static Token_Array +token_array_from_text(Arena *arena, String_Const_u8 data){ + Token_List list = lex_full_input_cpp(arena, data); + return(token_array_from_list(arena, &list)); } static Config* text_data_to_parsed_data(Arena *arena, String_Const_u8 file_name, String_Const_u8 data){ Config *parsed = 0; Temp_Memory restore_point = begin_temp(arena); - Cpp_Token_Array array = text_data_to_token_array(arena, data); + Token_Array array = token_array_from_text(arena, data); if (array.tokens != 0){ parsed = text_data_and_token_array_to_parse_data(arena, file_name, data, array); if (parsed == 0){ diff --git a/4coder_default_hooks.cpp b/4coder_default_hooks.cpp index 1d93e10d..23f42769 100644 --- a/4coder_default_hooks.cpp +++ b/4coder_default_hooks.cpp @@ -4,10 +4,6 @@ // TOP -#include "languages/generated_lexer_cpp.h" - -#include "languages/generated_lexer_cpp.cpp" - CUSTOM_COMMAND_SIG(set_bindings_choose); CUSTOM_COMMAND_SIG(set_bindings_default); CUSTOM_COMMAND_SIG(set_bindings_mac_default); @@ -409,7 +405,7 @@ default_buffer_render_caller(Application_Links *app, Frame_Info frame_info, View colors[i] = Stag_Back_Cycle_1 + i; } draw_enclosures(app, text_layout_id, buffer, - cursor_pos, FindScope_Brace, RangeHighlightKind_LineHighlight, + cursor_pos, FindScope_Scope, RangeHighlightKind_LineHighlight, colors, 0, color_count); } @@ -554,9 +550,6 @@ default_buffer_render_caller(Application_Links *app, Frame_Info frame_info, View dts[1] = history_animation_dt[j]; i32 frame_index = history_frame_index[j]; - Fancy_Color white = fancy_rgba(1.f, 1.f, 1.f, 1.f); - Fancy_Color pink = fancy_rgba(1.f, 0.f, 1.f, 1.f); - Fancy_Color green = fancy_rgba(0.f, 1.f, 0.f, 1.f); Fancy_String_List list = {}; push_fancy_stringf(scratch, &list, pink , "FPS: "); push_fancy_stringf(scratch, &list, green, "["); @@ -871,7 +864,7 @@ BUFFER_NAME_RESOLVER_SIG(default_buffer_name_resolution){ umem size = conflict->base_name.size; size = clamp_top(size, conflict->unique_name_capacity); conflict->unique_name_len_in_out = size; - memcpy(conflict->unique_name_in_out, conflict->base_name.str, size); + block_copy(conflict->unique_name_in_out, conflict->base_name.str, size); if (conflict->file_name.str != 0){ Scratch_Block per_file_closer(scratch); @@ -966,8 +959,7 @@ BUFFER_HOOK_SIG(default_file_settings){ String_Const_u8_Array extensions = global_config.code_exts; - Arena *scratch = context_get_arena(app); - Temp_Memory temp = begin_temp(scratch); + Scratch_Block scratch = context_get_arena(app); String_Const_u8 file_name = push_buffer_file_name(app, scratch, buffer_id); @@ -1081,7 +1073,9 @@ BUFFER_HOOK_SIG(default_file_settings){ String_Const_u8 contents = push_whole_buffer(app, scratch, buffer_id); Managed_Scope scope = buffer_get_managed_scope(app, buffer_id); Base_Allocator *allocator = managed_scope_allocator(app, scope); - Token_Array tokens = lex_cpp_initial(allocator, contents); + Arena alloc_arena = make_arena(allocator); + Token_List list = lex_full_input_cpp(&alloc_arena, contents); + Token_Array tokens = token_array_from_list(&alloc_arena, &list); Token_Array *tokens_ptr = scope_attachment(app, scope, attachment_tokens, Token_Array); block_copy_struct(tokens_ptr, &tokens); @@ -1102,8 +1096,6 @@ BUFFER_HOOK_SIG(default_file_settings){ buffer_set_setting(app, buffer_id, BufferSetting_Lex, use_lexer); #endif - end_temp(temp); - // no meaning for return return(0); } @@ -1169,7 +1161,7 @@ BUFFER_HOOK_SIG(default_end_file){ // extended to have access to the key presses soon. INPUT_FILTER_SIG(default_suppress_mouse_filter){ if (suppressing_mouse){ - memset(mouse, 0, sizeof(*mouse)); + block_zero_struct(mouse); mouse->p.x = -100; mouse->p.y = -100; } diff --git a/4coder_default_include.cpp b/4coder_default_include.cpp index 0acfeb98..da17c928 100644 --- a/4coder_default_include.cpp +++ b/4coder_default_include.cpp @@ -16,10 +16,11 @@ #include "4coder_app_links_allocator.cpp" #include "4coder_lib/4coder_utf8.h" -#include "4coder_lib/4cpp_lexer.h" #include "4coder_table.h" -#include "4coder_string_match.h" +#include "4coder_token.h" +#include "languages/generated_lexer_cpp.h" +#include "4coder_string_match.h" #include "4coder_helper.h" #include "4coder_insertion.h" #include "4coder_fancy.h" @@ -46,6 +47,7 @@ #include "4coder_buffer_seek_constructors.cpp" #include "4coder_token.cpp" +#include "languages/generated_lexer_cpp.cpp" #include "4coder_default_framework_variables.cpp" #include "4coder_helper.cpp" #include "4coder_seek.cpp" diff --git a/4coder_experiments.cpp b/4coder_experiments.cpp index 45e2d54b..c4e197c6 100644 --- a/4coder_experiments.cpp +++ b/4coder_experiments.cpp @@ -61,9 +61,10 @@ multi_paste_range(Application_Links *app, View_ID view, Range_i64 range, i32 pas if (buffer != 0){ i64 total_size = 0; for (i32 paste_index = 0; paste_index < paste_count; ++paste_index){ - Scratch_Block scratch(app); + Temp_Memory temp = begin_temp(scratch); String_Const_u8 string = push_clipboard_index(app, scratch, 0, paste_index); total_size += string.size + 1; + end_temp(temp); } total_size -= 1; diff --git a/4coder_fancy.cpp b/4coder_fancy.cpp index 031db2bc..afb8c483 100644 --- a/4coder_fancy.cpp +++ b/4coder_fancy.cpp @@ -247,6 +247,7 @@ draw_rectangle(Application_Links *app, Rect_f32 rect, Fancy_Color fancy_color){ //////////////////////////////// +// TODO(allen): beta: color palette global Fancy_Color white = fancy_rgba(1.0f, 1.0f, 1.0f, 1.0f); global Fancy_Color light_gray = fancy_rgba(0.7f, 0.7f, 0.7f, 1.0f); global Fancy_Color gray = fancy_rgba(0.5f, 0.5f, 0.5f, 1.0f); diff --git a/4coder_generated/command_metadata.h b/4coder_generated/command_metadata.h index 5fee8981..42e0d733 100644 --- a/4coder_generated/command_metadata.h +++ b/4coder_generated/command_metadata.h @@ -2,7 +2,7 @@ #define command_id(c) (fcoder_metacmd_ID_##c) #define command_metadata(c) (&fcoder_metacmd_table[command_id(c)]) #define command_metadata_by_id(id) (&fcoder_metacmd_table[id]) -#define command_one_past_last_id 233 +#define command_one_past_last_id 232 #if defined(CUSTOM_COMMAND_SIG) #define PROC_LINKS(x,y) x #else @@ -217,7 +217,6 @@ CUSTOM_COMMAND_SIG(select_next_scope_absolute); CUSTOM_COMMAND_SIG(select_prev_scope_absolute); CUSTOM_COMMAND_SIG(place_in_scope); CUSTOM_COMMAND_SIG(delete_current_scope); -CUSTOM_COMMAND_SIG(scope_absorb_down); CUSTOM_COMMAND_SIG(open_long_braces); CUSTOM_COMMAND_SIG(open_long_braces_semicolon); CUSTOM_COMMAND_SIG(open_long_braces_break); @@ -246,479 +245,477 @@ CUSTOM_COMMAND_SIG(write_explicit_enum_values); struct Command_Metadata{ PROC_LINKS(Custom_Command_Function, void) *proc; char *name; -int32_t name_len; +i32 name_len; char *description; -int32_t description_len; +i32 description_len; char *source_name; -int32_t source_name_len; -int32_t line_number; +i32 source_name_len; +i32 line_number; }; -static Command_Metadata fcoder_metacmd_table[233] = { -{ PROC_LINKS(write_explicit_enum_flags, 0), "write_explicit_enum_flags", 25, "If the cursor is found to be on the '{' of an enum definition, the values of the enum will be filled in to give each a unique power of 2 value, starting from 1. Existing values are overwritten.", 194, "c:\\work\\4ed\\code\\4coder_experiments.cpp", 39, 502 }, -{ PROC_LINKS(seek_beginning_of_textual_line, 0), "seek_beginning_of_textual_line", 30, "Seeks the cursor to the beginning of the line across all text.", 62, "c:\\work\\4ed\\code\\4coder_seek.cpp", 32, 29 }, -{ PROC_LINKS(seek_end_of_textual_line, 0), "seek_end_of_textual_line", 24, "Seeks the cursor to the end of the line across all text.", 56, "c:\\work\\4ed\\code\\4coder_seek.cpp", 32, 35 }, -{ PROC_LINKS(seek_beginning_of_line, 0), "seek_beginning_of_line", 22, "Seeks the cursor to the beginning of the visual line.", 53, "c:\\work\\4ed\\code\\4coder_seek.cpp", 32, 41 }, -{ PROC_LINKS(seek_end_of_line, 0), "seek_end_of_line", 16, "Seeks the cursor to the end of the visual line.", 47, "c:\\work\\4ed\\code\\4coder_seek.cpp", 32, 47 }, -{ PROC_LINKS(goto_beginning_of_file, 0), "goto_beginning_of_file", 22, "Sets the cursor to the beginning of the file.", 45, "c:\\work\\4ed\\code\\4coder_seek.cpp", 32, 53 }, -{ PROC_LINKS(goto_end_of_file, 0), "goto_end_of_file", 16, "Sets the cursor to the end of the file.", 39, "c:\\work\\4ed\\code\\4coder_seek.cpp", 32, 61 }, -{ PROC_LINKS(change_active_panel, 0), "change_active_panel", 19, "Change the currently active panel, moving to the panel with the next highest view_id.", 85, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 45, 201 }, -{ PROC_LINKS(change_active_panel_backwards, 0), "change_active_panel_backwards", 29, "Change the currently active panel, moving to the panel with the next lowest view_id.", 84, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 45, 211 }, -{ PROC_LINKS(open_panel_vsplit, 0), "open_panel_vsplit", 17, "Create a new panel by vertically splitting the active panel.", 60, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 45, 221 }, -{ PROC_LINKS(open_panel_hsplit, 0), "open_panel_hsplit", 17, "Create a new panel by horizontally splitting the active panel.", 62, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 45, 231 }, -{ PROC_LINKS(suppress_mouse, 0), "suppress_mouse", 14, "Hides the mouse and causes all mosue input (clicks, position, wheel) to be ignored.", 83, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 45, 294 }, -{ PROC_LINKS(allow_mouse, 0), "allow_mouse", 11, "Shows the mouse and causes all mouse input to be processed normally.", 68, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 45, 300 }, -{ PROC_LINKS(toggle_mouse, 0), "toggle_mouse", 12, "Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.", 71, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 45, 306 }, -{ PROC_LINKS(set_mode_to_original, 0), "set_mode_to_original", 20, "Sets the edit mode to 4coder original.", 38, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 45, 312 }, -{ PROC_LINKS(set_mode_to_notepad_like, 0), "set_mode_to_notepad_like", 24, "Sets the edit mode to Notepad like.", 35, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 45, 318 }, -{ PROC_LINKS(toggle_highlight_line_at_cursor, 0), "toggle_highlight_line_at_cursor", 31, "Toggles the line highlight at the cursor.", 41, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 45, 324 }, -{ PROC_LINKS(toggle_highlight_enclosing_scopes, 0), "toggle_highlight_enclosing_scopes", 33, "In code files scopes surrounding the cursor are highlighted with distinguishing colors.", 87, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 45, 330 }, -{ PROC_LINKS(toggle_paren_matching_helper, 0), "toggle_paren_matching_helper", 28, "In code files matching parentheses pairs are colored with distinguishing colors.", 80, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 45, 336 }, -{ PROC_LINKS(toggle_fullscreen, 0), "toggle_fullscreen", 17, "Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.", 89, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 45, 342 }, -{ PROC_LINKS(remap_interactive, 0), "remap_interactive", 17, "Switch to a named key binding map.", 34, "c:\\work\\4ed\\code\\4coder_default_framework.cpp", 45, 350 }, -{ PROC_LINKS(write_character, 0), "write_character", 15, "Inserts whatever character was used to trigger this command.", 60, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 57 }, -{ PROC_LINKS(write_underscore, 0), "write_underscore", 16, "Inserts an underscore.", 22, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 66 }, -{ PROC_LINKS(delete_char, 0), "delete_char", 11, "Deletes the character to the right of the cursor.", 49, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 73 }, -{ PROC_LINKS(backspace_char, 0), "backspace_char", 14, "Deletes the character to the left of the cursor.", 48, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 90 }, -{ PROC_LINKS(set_mark, 0), "set_mark", 8, "Sets the mark to the current position of the cursor.", 52, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 109 }, -{ PROC_LINKS(cursor_mark_swap, 0), "cursor_mark_swap", 16, "Swaps the position of the cursor and the mark.", 46, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 118 }, -{ PROC_LINKS(delete_range, 0), "delete_range", 12, "Deletes the text in the range between the cursor and the mark.", 62, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 128 }, -{ PROC_LINKS(backspace_alpha_numeric_boundary, 0), "backspace_alpha_numeric_boundary", 32, "Delete characters between the cursor position and the first alphanumeric boundary to the left.", 94, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 148 }, -{ PROC_LINKS(delete_alpha_numeric_boundary, 0), "delete_alpha_numeric_boundary", 29, "Delete characters between the cursor position and the first alphanumeric boundary to the right.", 95, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 156 }, -{ PROC_LINKS(snipe_backward_whitespace_or_token_boundary, 0), "snipe_backward_whitespace_or_token_boundary", 43, "Delete a single, whole token on or to the left of the cursor and post it to the clipboard.", 90, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 176 }, -{ PROC_LINKS(snipe_forward_whitespace_or_token_boundary, 0), "snipe_forward_whitespace_or_token_boundary", 42, "Delete a single, whole token on or to the right of the cursor and post it to the clipboard.", 91, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 184 }, -{ PROC_LINKS(center_view, 0), "center_view", 11, "Centers the view vertically on the line on which the cursor sits.", 65, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 197 }, -{ PROC_LINKS(left_adjust_view, 0), "left_adjust_view", 16, "Sets the left size of the view near the x position of the cursor.", 65, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 211 }, -{ PROC_LINKS(click_set_cursor_and_mark, 0), "click_set_cursor_and_mark", 25, "Sets the cursor position and mark to the mouse position.", 56, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 223 }, -{ PROC_LINKS(click_set_cursor, 0), "click_set_cursor", 16, "Sets the cursor position to the mouse position.", 47, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 235 }, -{ PROC_LINKS(click_set_cursor_if_lbutton, 0), "click_set_cursor_if_lbutton", 27, "If the mouse left button is pressed, sets the cursor position to the mouse position.", 84, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 247 }, -{ PROC_LINKS(click_set_mark, 0), "click_set_mark", 14, "Sets the mark position to the mouse position.", 45, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 261 }, -{ PROC_LINKS(mouse_wheel_scroll, 0), "mouse_wheel_scroll", 18, "Reads the scroll wheel value from the mouse state and scrolls accordingly.", 74, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 273 }, -{ PROC_LINKS(move_up, 0), "move_up", 7, "Moves the cursor up one line.", 29, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 334 }, -{ PROC_LINKS(move_down, 0), "move_down", 9, "Moves the cursor down one line.", 31, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 340 }, -{ PROC_LINKS(move_up_10, 0), "move_up_10", 10, "Moves the cursor up ten lines.", 30, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 346 }, -{ PROC_LINKS(move_down_10, 0), "move_down_10", 12, "Moves the cursor down ten lines.", 32, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 352 }, -{ PROC_LINKS(move_down_textual, 0), "move_down_textual", 17, "Moves down to the next line of actual text, regardless of line wrapping.", 72, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 358 }, -{ PROC_LINKS(page_up, 0), "page_up", 7, "Scrolls the view up one view height and moves the cursor up one view height.", 76, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 368 }, -{ PROC_LINKS(page_down, 0), "page_down", 9, "Scrolls the view down one view height and moves the cursor down one view height.", 80, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 376 }, -{ PROC_LINKS(move_up_to_blank_line, 0), "move_up_to_blank_line", 21, "Seeks the cursor up to the next blank line.", 43, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 405 }, -{ PROC_LINKS(move_down_to_blank_line, 0), "move_down_to_blank_line", 23, "Seeks the cursor down to the next blank line.", 45, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 411 }, -{ PROC_LINKS(move_up_to_blank_line_skip_whitespace, 0), "move_up_to_blank_line_skip_whitespace", 37, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 417 }, -{ PROC_LINKS(move_down_to_blank_line_skip_whitespace, 0), "move_down_to_blank_line_skip_whitespace", 39, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 423 }, -{ PROC_LINKS(move_up_to_blank_line_end, 0), "move_up_to_blank_line_end", 25, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 429 }, -{ PROC_LINKS(move_down_to_blank_line_end, 0), "move_down_to_blank_line_end", 27, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 435 }, -{ PROC_LINKS(move_left, 0), "move_left", 9, "Moves the cursor one character to the left.", 43, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 441 }, -{ PROC_LINKS(move_right, 0), "move_right", 10, "Moves the cursor one character to the right.", 44, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 453 }, -{ PROC_LINKS(move_right_whitespace_boundary, 0), "move_right_whitespace_boundary", 30, "Seek right for the next boundary between whitespace and non-whitespace.", 71, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 475 }, -{ PROC_LINKS(move_left_whitespace_boundary, 0), "move_left_whitespace_boundary", 29, "Seek left for the next boundary between whitespace and non-whitespace.", 70, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 483 }, -{ PROC_LINKS(move_right_token_boundary, 0), "move_right_token_boundary", 25, "Seek right for the next end of a token.", 39, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 491 }, -{ PROC_LINKS(move_left_token_boundary, 0), "move_left_token_boundary", 24, "Seek left for the next beginning of a token.", 44, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 499 }, -{ PROC_LINKS(move_right_whitespace_or_token_boundary, 0), "move_right_whitespace_or_token_boundary", 39, "Seek right for the next end of a token or boundary between whitespace and non-whitespace.", 89, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 507 }, -{ PROC_LINKS(move_left_whitespace_or_token_boundary, 0), "move_left_whitespace_or_token_boundary", 38, "Seek left for the next end of a token or boundary between whitespace and non-whitespace.", 88, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 515 }, -{ PROC_LINKS(move_right_alpha_numeric_boundary, 0), "move_right_alpha_numeric_boundary", 33, "Seek right for boundary between alphanumeric characters and non-alphanumeric characters.", 88, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 523 }, -{ PROC_LINKS(move_left_alpha_numeric_boundary, 0), "move_left_alpha_numeric_boundary", 32, "Seek left for boundary between alphanumeric characters and non-alphanumeric characters.", 87, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 531 }, -{ PROC_LINKS(move_right_alpha_numeric_or_camel_boundary, 0), "move_right_alpha_numeric_or_camel_boundary", 42, "Seek right for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 107, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 539 }, -{ PROC_LINKS(move_left_alpha_numeric_or_camel_boundary, 0), "move_left_alpha_numeric_or_camel_boundary", 41, "Seek left for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 106, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 547 }, -{ PROC_LINKS(select_all, 0), "select_all", 10, "Puts the cursor at the top of the file, and the mark at the bottom of the file.", 79, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 568 }, -{ PROC_LINKS(to_uppercase, 0), "to_uppercase", 12, "Converts all ascii text in the range between the cursor and the mark to uppercase.", 82, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 581 }, -{ PROC_LINKS(to_lowercase, 0), "to_lowercase", 12, "Converts all ascii text in the range between the cursor and the mark to lowercase.", 82, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 594 }, -{ PROC_LINKS(clean_all_lines, 0), "clean_all_lines", 15, "Removes trailing whitespace from all lines in the current buffer.", 65, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 607 }, -{ PROC_LINKS(basic_change_active_panel, 0), "basic_change_active_panel", 25, "Change the currently active panel, moving to the panel with the next highest view_id. Will not skipe the build panel if it is open.", 132, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 641 }, -{ PROC_LINKS(close_panel, 0), "close_panel", 11, "Closes the currently active panel if it is not the only panel open.", 67, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 649 }, -{ PROC_LINKS(show_scrollbar, 0), "show_scrollbar", 14, "Sets the current view to show it's scrollbar.", 45, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 658 }, -{ PROC_LINKS(hide_scrollbar, 0), "hide_scrollbar", 14, "Sets the current view to hide it's scrollbar.", 45, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 665 }, -{ PROC_LINKS(show_filebar, 0), "show_filebar", 12, "Sets the current view to show it's filebar.", 43, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 672 }, -{ PROC_LINKS(hide_filebar, 0), "hide_filebar", 12, "Sets the current view to hide it's filebar.", 43, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 679 }, -{ PROC_LINKS(toggle_filebar, 0), "toggle_filebar", 14, "Toggles the visibility status of the current view's filebar.", 60, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 686 }, -{ PROC_LINKS(toggle_line_wrap, 0), "toggle_line_wrap", 16, "Toggles the current buffer's line wrapping status.", 50, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 695 }, -{ PROC_LINKS(toggle_fps_meter, 0), "toggle_fps_meter", 16, "Toggles the visibility of the FPS performance meter", 51, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 708 }, -{ PROC_LINKS(increase_line_wrap, 0), "increase_line_wrap", 18, "Increases the current buffer's width for line wrapping.", 55, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 714 }, -{ PROC_LINKS(decrease_line_wrap, 0), "decrease_line_wrap", 18, "Decrases the current buffer's width for line wrapping.", 54, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 727 }, -{ PROC_LINKS(increase_face_size, 0), "increase_face_size", 18, "Increase the size of the face used by the current buffer.", 57, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 740 }, -{ PROC_LINKS(decrease_face_size, 0), "decrease_face_size", 18, "Decrease the size of the face used by the current buffer.", 57, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 751 }, -{ PROC_LINKS(mouse_wheel_change_face_size, 0), "mouse_wheel_change_face_size", 28, "Reads the state of the mouse wheel and uses it to either increase or decrease the face size.", 92, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 762 }, -{ PROC_LINKS(toggle_virtual_whitespace, 0), "toggle_virtual_whitespace", 25, "Toggles the current buffer's virtual whitespace status.", 55, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 779 }, -{ PROC_LINKS(toggle_show_whitespace, 0), "toggle_show_whitespace", 22, "Toggles the current buffer's whitespace visibility status.", 58, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 789 }, -{ PROC_LINKS(toggle_line_numbers, 0), "toggle_line_numbers", 19, "Toggles the left margin line numbers.", 37, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 798 }, -{ PROC_LINKS(eol_dosify, 0), "eol_dosify", 10, "Puts the buffer in DOS line ending mode.", 40, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 804 }, -{ PROC_LINKS(eol_nixify, 0), "eol_nixify", 10, "Puts the buffer in NIX line ending mode.", 40, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 812 }, -{ PROC_LINKS(exit_4coder, 0), "exit_4coder", 11, "Attempts to close 4coder.", 25, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 820 }, -{ PROC_LINKS(goto_line, 0), "goto_line", 9, "Queries the user for a number, and jumps the cursor to the corresponding line.", 78, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 828 }, -{ PROC_LINKS(search, 0), "search", 6, "Begins an incremental search down through the current buffer for a user specified string.", 89, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1039 }, -{ PROC_LINKS(reverse_search, 0), "reverse_search", 14, "Begins an incremental search up through the current buffer for a user specified string.", 87, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1045 }, -{ PROC_LINKS(search_identifier, 0), "search_identifier", 17, "Begins an incremental search down through the current buffer for the word or token under the cursor.", 100, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1051 }, -{ PROC_LINKS(reverse_search_identifier, 0), "reverse_search_identifier", 25, "Begins an incremental search up through the current buffer for the word or token under the cursor.", 98, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1062 }, -{ PROC_LINKS(replace_in_range, 0), "replace_in_range", 16, "Queries the user for a needle and string. Replaces all occurences of needle with string in the range between cursor and the mark in the active buffer.", 150, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1113 }, -{ PROC_LINKS(replace_in_buffer, 0), "replace_in_buffer", 17, "Queries the user for a needle and string. Replaces all occurences of needle with string in the active buffer.", 109, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1122 }, -{ PROC_LINKS(replace_in_all_buffers, 0), "replace_in_all_buffers", 22, "Queries the user for a needle and string. Replaces all occurences of needle with string in all editable buffers.", 112, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1131 }, -{ PROC_LINKS(query_replace, 0), "query_replace", 13, "Queries the user for two strings, and incrementally replaces every occurence of the first string with the second string.", 120, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1219 }, -{ PROC_LINKS(query_replace_identifier, 0), "query_replace_identifier", 24, "Queries the user for a string, and incrementally replace every occurence of the word or token found at the cursor with the specified string.", 140, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1239 }, -{ PROC_LINKS(query_replace_selection, 0), "query_replace_selection", 23, "Queries the user for a string, and incrementally replace every occurence of the string found in the selected range with the specified string.", 141, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1255 }, -{ PROC_LINKS(save_all_dirty_buffers, 0), "save_all_dirty_buffers", 22, "Saves all buffers marked dirty (showing the '*' indicator).", 59, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1290 }, -{ PROC_LINKS(delete_file_query, 0), "delete_file_query", 17, "Deletes the file of the current buffer if 4coder has the appropriate access rights. Will ask the user for confirmation first.", 125, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1315 }, -{ PROC_LINKS(save_to_query, 0), "save_to_query", 13, "Queries the user for a file name and saves the contents of the current buffer, altering the buffer's name too.", 110, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1353 }, -{ PROC_LINKS(rename_file_query, 0), "rename_file_query", 17, "Queries the user for a new name and renames the file of the current buffer, altering the buffer's name too.", 107, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1388 }, -{ PROC_LINKS(make_directory_query, 0), "make_directory_query", 20, "Queries the user for a name and creates a new directory with the given name.", 76, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1428 }, -{ PROC_LINKS(move_line_up, 0), "move_line_up", 12, "Swaps the line under the cursor with the line above it, and moves the cursor up with it.", 88, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1461 }, -{ PROC_LINKS(move_line_down, 0), "move_line_down", 14, "Swaps the line under the cursor with the line below it, and moves the cursor down with it.", 90, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1467 }, -{ PROC_LINKS(duplicate_line, 0), "duplicate_line", 14, "Create a copy of the line on which the cursor sits.", 51, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1473 }, -{ PROC_LINKS(delete_line, 0), "delete_line", 11, "Delete the line the on which the cursor sits.", 45, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1487 }, -{ PROC_LINKS(open_file_in_quotes, 0), "open_file_in_quotes", 19, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file.", 94, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1552 }, -{ PROC_LINKS(open_matching_file_cpp, 0), "open_matching_file_cpp", 22, "If the current file is a *.cpp or *.h, attempts to open the corresponding *.h or *.cpp file in the other view.", 110, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1584 }, -{ PROC_LINKS(view_buffer_other_panel, 0), "view_buffer_other_panel", 23, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1597 }, -{ PROC_LINKS(swap_buffers_between_panels, 0), "swap_buffers_between_panels", 27, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1609 }, -{ PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1645 }, -{ PROC_LINKS(save, 0), "save", 4, "Saves the current buffer.", 25, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1653 }, -{ PROC_LINKS(reopen, 0), "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1665 }, -{ PROC_LINKS(undo, 0), "undo", 4, "Advances backwards through the undo history of the current buffer.", 66, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1723 }, -{ PROC_LINKS(redo, 0), "redo", 4, "Advances forwards through the undo history of the current buffer.", 65, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1736 }, -{ PROC_LINKS(undo_all_buffers, 0), "undo_all_buffers", 16, "Advances backward through the undo history in the buffer containing the most recent regular edit.", 97, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1750 }, -{ PROC_LINKS(redo_all_buffers, 0), "redo_all_buffers", 16, "Advances forward through the undo history in the buffer containing the most recent regular edit.", 96, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1824 }, -{ PROC_LINKS(open_in_other, 0), "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "c:\\work\\4ed\\code\\4coder_base_commands.cpp", 41, 1927 }, -{ PROC_LINKS(lister__quit, 0), "lister__quit", 12, "A lister mode command that quits the list without executing any actions.", 72, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 8 }, -{ PROC_LINKS(lister__activate, 0), "lister__activate", 16, "A lister mode command that activates the list's action on the highlighted item.", 79, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 15 }, -{ PROC_LINKS(lister__write_character, 0), "lister__write_character", 23, "A lister mode command that dispatches to the lister's write character handler.", 78, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 30 }, -{ PROC_LINKS(lister__backspace_text_field, 0), "lister__backspace_text_field", 28, "A lister mode command that dispatches to the lister's backspace text field handler.", 83, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 40 }, -{ PROC_LINKS(lister__move_up, 0), "lister__move_up", 15, "A lister mode command that dispatches to the lister's navigate up handler.", 74, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 50 }, -{ PROC_LINKS(lister__move_down, 0), "lister__move_down", 17, "A lister mode command that dispatches to the lister's navigate down handler.", 76, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 60 }, -{ PROC_LINKS(lister__wheel_scroll, 0), "lister__wheel_scroll", 20, "A lister mode command that scrolls the list in response to the mouse wheel.", 75, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 70 }, -{ PROC_LINKS(lister__mouse_press, 0), "lister__mouse_press", 19, "A lister mode command that beings a click interaction with a list item under the mouse.", 87, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 84 }, -{ PROC_LINKS(lister__mouse_release, 0), "lister__mouse_release", 21, "A lister mode command that ends a click interaction with a list item under the mouse, possibly activating it.", 109, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 95 }, -{ PROC_LINKS(lister__repaint, 0), "lister__repaint", 15, "A lister mode command that updates the lists UI data.", 53, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 110 }, -{ PROC_LINKS(lister__write_character__default, 0), "lister__write_character__default", 32, "A lister mode command that inserts a new character to the text field.", 69, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 120 }, -{ PROC_LINKS(lister__backspace_text_field__default, 0), "lister__backspace_text_field__default", 37, "A lister mode command that backspaces one character from the text field.", 72, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 139 }, -{ PROC_LINKS(lister__move_up__default, 0), "lister__move_up__default", 24, "A lister mode command that moves the highlighted item one up in the list.", 73, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 153 }, -{ PROC_LINKS(lister__move_down__default, 0), "lister__move_down__default", 26, "A lister mode command that moves the highlighted item one down in the list.", 75, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 168 }, -{ PROC_LINKS(lister__write_character__file_path, 0), "lister__write_character__file_path", 34, "A lister mode command that inserts a character into the text field of a file system list.", 89, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 183 }, -{ PROC_LINKS(lister__backspace_text_field__file_path, 0), "lister__backspace_text_field__file_path", 39, "A lister mode command that backspaces one character from the text field of a file system list.", 94, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 208 }, -{ PROC_LINKS(lister__write_character__fixed_list, 0), "lister__write_character__fixed_list", 35, "A lister mode command that handles input for the fixed sure to kill list.", 73, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 249 }, -{ PROC_LINKS(interactive_switch_buffer, 0), "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 723 }, -{ PROC_LINKS(interactive_kill_buffer, 0), "interactive_kill_buffer", 23, "Interactively kill an open buffer.", 34, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 742 }, -{ PROC_LINKS(interactive_open_or_new, 0), "interactive_open_or_new", 23, "Interactively open a file out of the file system.", 49, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 815 }, -{ PROC_LINKS(interactive_new, 0), "interactive_new", 15, "Interactively creates a new file.", 33, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 854 }, -{ PROC_LINKS(interactive_open, 0), "interactive_open", 16, "Interactively opens a file.", 27, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 887 }, -{ PROC_LINKS(command_lister, 0), "command_lister", 14, "Opens an interactive list of all registered commands.", 53, "c:\\work\\4ed\\code\\4coder_lists.cpp", 33, 969 }, -{ PROC_LINKS(auto_tab_whole_file, 0), "auto_tab_whole_file", 19, "Audo-indents the entire current buffer.", 39, "c:\\work\\4ed\\code\\4coder_auto_indent.cpp", 39, 526 }, -{ PROC_LINKS(auto_tab_line_at_cursor, 0), "auto_tab_line_at_cursor", 23, "Auto-indents the line on which the cursor sits.", 47, "c:\\work\\4ed\\code\\4coder_auto_indent.cpp", 39, 535 }, -{ PROC_LINKS(auto_tab_range, 0), "auto_tab_range", 14, "Auto-indents the range between the cursor and the mark.", 55, "c:\\work\\4ed\\code\\4coder_auto_indent.cpp", 39, 545 }, -{ PROC_LINKS(write_and_auto_tab, 0), "write_and_auto_tab", 18, "Inserts a character and auto-indents the line on which the cursor sits.", 71, "c:\\work\\4ed\\code\\4coder_auto_indent.cpp", 39, 555 }, -{ PROC_LINKS(list_all_locations, 0), "list_all_locations", 18, "Queries the user for a string and lists all exact case-sensitive matches found in all open buffers.", 99, "c:\\work\\4ed\\code\\4coder_search.cpp", 34, 166 }, -{ PROC_LINKS(list_all_substring_locations, 0), "list_all_substring_locations", 28, "Queries the user for a string and lists all case-sensitive substring matches found in all open buffers.", 103, "c:\\work\\4ed\\code\\4coder_search.cpp", 34, 172 }, -{ PROC_LINKS(list_all_locations_case_insensitive, 0), "list_all_locations_case_insensitive", 35, "Queries the user for a string and lists all exact case-insensitive matches found in all open buffers.", 101, "c:\\work\\4ed\\code\\4coder_search.cpp", 34, 178 }, -{ PROC_LINKS(list_all_substring_locations_case_insensitive, 0), "list_all_substring_locations_case_insensitive", 45, "Queries the user for a string and lists all case-insensitive substring matches found in all open buffers.", 105, "c:\\work\\4ed\\code\\4coder_search.cpp", 34, 184 }, -{ PROC_LINKS(list_all_locations_of_identifier, 0), "list_all_locations_of_identifier", 32, "Reads a token or word under the cursor and lists all exact case-sensitive mathces in all open buffers.", 102, "c:\\work\\4ed\\code\\4coder_search.cpp", 34, 190 }, -{ PROC_LINKS(list_all_locations_of_identifier_case_insensitive, 0), "list_all_locations_of_identifier_case_insensitive", 49, "Reads a token or word under the cursor and lists all exact case-insensitive mathces in all open buffers.", 104, "c:\\work\\4ed\\code\\4coder_search.cpp", 34, 196 }, -{ PROC_LINKS(list_all_locations_of_selection, 0), "list_all_locations_of_selection", 31, "Reads the string in the selected range and lists all exact case-sensitive mathces in all open buffers.", 102, "c:\\work\\4ed\\code\\4coder_search.cpp", 34, 202 }, -{ PROC_LINKS(list_all_locations_of_selection_case_insensitive, 0), "list_all_locations_of_selection_case_insensitive", 48, "Reads the string in the selected range and lists all exact case-insensitive mathces in all open buffers.", 104, "c:\\work\\4ed\\code\\4coder_search.cpp", 34, 208 }, -{ PROC_LINKS(list_all_locations_of_type_definition, 0), "list_all_locations_of_type_definition", 37, "Queries user for string, lists all locations of strings that appear to define a type whose name matches the input string.", 121, "c:\\work\\4ed\\code\\4coder_search.cpp", 34, 214 }, -{ PROC_LINKS(list_all_locations_of_type_definition_of_identifier, 0), "list_all_locations_of_type_definition_of_identifier", 51, "Reads a token or word under the cursor and lists all locations of strings that appear to define a type whose name matches it.", 125, "c:\\work\\4ed\\code\\4coder_search.cpp", 34, 222 }, -{ PROC_LINKS(word_complete, 0), "word_complete", 13, "Iteratively tries completing the word to the left of the cursor with other words in open buffers that have the same prefix string.", 130, "c:\\work\\4ed\\code\\4coder_search.cpp", 34, 376 }, -{ PROC_LINKS(goto_jump_at_cursor, 0), "goto_jump_at_cursor", 19, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in another view and changes the active panel to the view containing the jump.", 187, "c:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 39, 353 }, -{ PROC_LINKS(goto_jump_at_cursor_same_panel, 0), "goto_jump_at_cursor_same_panel", 30, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list.", 167, "c:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 39, 380 }, -{ PROC_LINKS(goto_next_jump, 0), "goto_next_jump", 14, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "c:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 39, 469 }, -{ PROC_LINKS(goto_prev_jump, 0), "goto_prev_jump", 14, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "c:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 39, 486 }, -{ PROC_LINKS(goto_next_jump_no_skips, 0), "goto_next_jump_no_skips", 23, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "c:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 39, 499 }, -{ PROC_LINKS(goto_prev_jump_no_skips, 0), "goto_prev_jump_no_skips", 23, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "c:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 39, 516 }, -{ PROC_LINKS(goto_first_jump, 0), "goto_first_jump", 15, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "c:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 39, 530 }, -{ PROC_LINKS(goto_first_jump_same_panel_sticky, 0), "goto_first_jump_same_panel_sticky", 33, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer and views the buffer in the panel where the jump list was.", 153, "c:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 39, 547 }, -{ PROC_LINKS(newline_or_goto_position, 0), "newline_or_goto_position", 24, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "c:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 39, 569 }, -{ PROC_LINKS(newline_or_goto_position_same_panel, 0), "newline_or_goto_position_same_panel", 35, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "c:\\work\\4ed\\code\\4coder_jump_sticky.cpp", 39, 586 }, -{ PROC_LINKS(view_jump_list_with_lister, 0), "view_jump_list_with_lister", 26, "When executed on a buffer with jumps, creates a persistent lister for all the jumps", 83, "c:\\work\\4ed\\code\\4coder_jump_lister.cpp", 39, 104 }, -{ PROC_LINKS(log_graph__escape, 0), "log_graph__escape", 17, "Ends the log grapher", 20, "c:\\work\\4ed\\code\\4coder_log_parser.cpp", 38, 906 }, -{ PROC_LINKS(log_graph__scroll_wheel, 0), "log_graph__scroll_wheel", 23, "Scrolls the log graph", 21, "c:\\work\\4ed\\code\\4coder_log_parser.cpp", 38, 915 }, -{ PROC_LINKS(log_graph__page_up, 0), "log_graph__page_up", 18, "Scroll the log graph up one whole page", 38, "c:\\work\\4ed\\code\\4coder_log_parser.cpp", 38, 926 }, -{ PROC_LINKS(log_graph__page_down, 0), "log_graph__page_down", 20, "Scroll the log graph down one whole page", 40, "c:\\work\\4ed\\code\\4coder_log_parser.cpp", 38, 934 }, -{ PROC_LINKS(log_graph__click_select_event, 0), "log_graph__click_select_event", 29, "Select the event record at the mouse point in the log graph", 59, "c:\\work\\4ed\\code\\4coder_log_parser.cpp", 38, 968 }, -{ PROC_LINKS(log_graph__click_jump_to_event_source, 0), "log_graph__click_jump_to_event_source", 37, "Jump to the code that logged the event record at the mouse point in the log graph", 81, "c:\\work\\4ed\\code\\4coder_log_parser.cpp", 38, 987 }, -{ PROC_LINKS(show_the_log_graph, 0), "show_the_log_graph", 18, "Parser *log* and displays the 'log graph' UI", 44, "c:\\work\\4ed\\code\\4coder_log_parser.cpp", 38, 1035 }, -{ PROC_LINKS(copy, 0), "copy", 4, "Copy the text in the range from the cursor to the mark onto the clipboard.", 74, "c:\\work\\4ed\\code\\4coder_clipboard.cpp", 37, 19 }, -{ PROC_LINKS(cut, 0), "cut", 3, "Cut the text in the range from the cursor to the mark onto the clipboard.", 73, "c:\\work\\4ed\\code\\4coder_clipboard.cpp", 37, 28 }, -{ PROC_LINKS(paste, 0), "paste", 5, "At the cursor, insert the text at the top of the clipboard.", 59, "c:\\work\\4ed\\code\\4coder_clipboard.cpp", 37, 39 }, -{ PROC_LINKS(paste_next, 0), "paste_next", 10, "If the previous command was paste or paste_next, replaces the paste range with the next text down on the clipboard, otherwise operates as the paste command.", 156, "c:\\work\\4ed\\code\\4coder_clipboard.cpp", 37, 73 }, -{ PROC_LINKS(paste_and_indent, 0), "paste_and_indent", 16, "Paste from the top of clipboard and run auto-indent on the newly pasted text.", 77, "c:\\work\\4ed\\code\\4coder_clipboard.cpp", 37, 114 }, -{ PROC_LINKS(paste_next_and_indent, 0), "paste_next_and_indent", 21, "Paste the next item on the clipboard and run auto-indent on the newly pasted text.", 82, "c:\\work\\4ed\\code\\4coder_clipboard.cpp", 37, 121 }, -{ PROC_LINKS(execute_previous_cli, 0), "execute_previous_cli", 20, "If the command execute_any_cli has already been used, this will execute a CLI reusing the most recent buffer name and command.", 126, "c:\\work\\4ed\\code\\4coder_system_command.cpp", 42, 7 }, -{ PROC_LINKS(execute_any_cli, 0), "execute_any_cli", 15, "Queries for an output buffer name and system command, runs the system command as a CLI and prints the output to the specified buffer.", 133, "c:\\work\\4ed\\code\\4coder_system_command.cpp", 42, 22 }, -{ PROC_LINKS(build_search, 0), "build_search", 12, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*.", 153, "c:\\work\\4ed\\code\\4coder_build_commands.cpp", 42, 128 }, -{ PROC_LINKS(build_in_build_panel, 0), "build_in_build_panel", 20, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*. Puts the *compilation* buffer in a panel at the footer of the current view.", 230, "c:\\work\\4ed\\code\\4coder_build_commands.cpp", 42, 163 }, -{ PROC_LINKS(close_build_panel, 0), "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "c:\\work\\4ed\\code\\4coder_build_commands.cpp", 42, 178 }, -{ PROC_LINKS(change_to_build_panel, 0), "change_to_build_panel", 21, "If the special build panel is open, makes the build panel the active panel.", 75, "c:\\work\\4ed\\code\\4coder_build_commands.cpp", 42, 184 }, -{ PROC_LINKS(close_all_code, 0), "close_all_code", 14, "Closes any buffer with a filename ending with an extension configured to be recognized as a code file type.", 107, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 44, 921 }, -{ PROC_LINKS(open_all_code, 0), "open_all_code", 13, "Open all code in the current directory. File types are determined by extensions. An extension is considered code based on the extensions specified in 4coder.config.", 164, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 44, 927 }, -{ PROC_LINKS(open_all_code_recursive, 0), "open_all_code_recursive", 23, "Works as open_all_code but also runs in all subdirectories.", 59, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 44, 933 }, -{ PROC_LINKS(load_project, 0), "load_project", 12, "Looks for a project.4coder file in the current directory and tries to load it. Looks in parent directories until a project file is found or there are no more parents.", 167, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 44, 941 }, -{ PROC_LINKS(project_fkey_command, 0), "project_fkey_command", 20, "Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.", 175, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 44, 948 }, -{ PROC_LINKS(project_go_to_root_directory, 0), "project_go_to_root_directory", 28, "Changes 4coder's hot directory to the root directory of the currently loaded project. With no loaded project nothing hapepns.", 125, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 44, 971 }, -{ PROC_LINKS(setup_new_project, 0), "setup_new_project", 17, "Queries the user for several configuration options and initializes a new 4coder project with build scripts for every OS.", 120, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 44, 1306 }, -{ PROC_LINKS(setup_build_bat, 0), "setup_build_bat", 15, "Queries the user for several configuration options and initializes a new build batch script.", 92, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 44, 1313 }, -{ PROC_LINKS(setup_build_sh, 0), "setup_build_sh", 14, "Queries the user for several configuration options and initializes a new build shell script.", 92, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 44, 1319 }, -{ PROC_LINKS(setup_build_bat_and_sh, 0), "setup_build_bat_and_sh", 22, "Queries the user for several configuration options and initializes a new build batch script.", 92, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 44, 1325 }, -{ PROC_LINKS(project_command_lister, 0), "project_command_lister", 22, "Open a lister of all commands in the currently loaded project.", 62, "c:\\work\\4ed\\code\\4coder_project_commands.cpp", 44, 1340 }, -{ PROC_LINKS(list_all_functions_current_buffer, 0), "list_all_functions_current_buffer", 33, "Creates a jump list of lines of the current buffer that appear to define or declare functions.", 94, "c:\\work\\4ed\\code\\4coder_function_list.cpp", 41, 276 }, -{ PROC_LINKS(list_all_functions_current_buffer_lister, 0), "list_all_functions_current_buffer_lister", 40, "Creates a lister of locations that look like function definitions and declarations in the buffer.", 97, "c:\\work\\4ed\\code\\4coder_function_list.cpp", 41, 286 }, -{ PROC_LINKS(list_all_functions_all_buffers, 0), "list_all_functions_all_buffers", 30, "Creates a jump list of lines from all buffers that appear to define or declare functions.", 89, "c:\\work\\4ed\\code\\4coder_function_list.cpp", 41, 298 }, -{ PROC_LINKS(list_all_functions_all_buffers_lister, 0), "list_all_functions_all_buffers_lister", 37, "Creates a lister of locations that look like function definitions and declarations all buffers.", 95, "c:\\work\\4ed\\code\\4coder_function_list.cpp", 41, 304 }, -{ PROC_LINKS(select_surrounding_scope, 0), "select_surrounding_scope", 24, "Finds the scope enclosed by '{' '}' surrounding the cursor and puts the cursor and mark on the '{' and '}'.", 107, "c:\\work\\4ed\\code\\4coder_scope_commands.cpp", 42, 352 }, -{ PROC_LINKS(select_next_scope_absolute, 0), "select_next_scope_absolute", 26, "Finds the first scope started by '{' after the cursor and puts the cursor and mark on the '{' and '}'.", 102, "c:\\work\\4ed\\code\\4coder_scope_commands.cpp", 42, 367 }, -{ PROC_LINKS(select_prev_scope_absolute, 0), "select_prev_scope_absolute", 26, "Finds the first scope started by '{' before the cursor and puts the cursor and mark on the '{' and '}'.", 103, "c:\\work\\4ed\\code\\4coder_scope_commands.cpp", 42, 386 }, -{ PROC_LINKS(place_in_scope, 0), "place_in_scope", 14, "Wraps the code contained in the range between cursor and mark with a new curly brace scope.", 91, "c:\\work\\4ed\\code\\4coder_scope_commands.cpp", 42, 460 }, -{ PROC_LINKS(delete_current_scope, 0), "delete_current_scope", 20, "Deletes the braces surrounding the currently selected scope. Leaves the contents within the scope.", 99, "c:\\work\\4ed\\code\\4coder_scope_commands.cpp", 42, 466 }, -{ PROC_LINKS(scope_absorb_down, 0), "scope_absorb_down", 17, "If a scope is currently selected, and a statement or block statement is present below the current scope, the statement is moved into the scope.", 143, "c:\\work\\4ed\\code\\4coder_scope_commands.cpp", 42, 698 }, -{ PROC_LINKS(open_long_braces, 0), "open_long_braces", 16, "At the cursor, insert a '{' and '}' separated by a blank line.", 62, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 51, 46 }, -{ PROC_LINKS(open_long_braces_semicolon, 0), "open_long_braces_semicolon", 26, "At the cursor, insert a '{' and '};' separated by a blank line.", 63, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 51, 54 }, -{ PROC_LINKS(open_long_braces_break, 0), "open_long_braces_break", 22, "At the cursor, insert a '{' and '}break;' separated by a blank line.", 68, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 51, 62 }, -{ PROC_LINKS(if0_off, 0), "if0_off", 7, "Surround the range between the cursor and mark with an '#if 0' and an '#endif'", 78, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 51, 70 }, -{ PROC_LINKS(write_todo, 0), "write_todo", 10, "At the cursor, insert a '// TODO' comment, includes user name if it was specified in config.4coder.", 99, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 51, 76 }, -{ PROC_LINKS(write_hack, 0), "write_hack", 10, "At the cursor, insert a '// HACK' comment, includes user name if it was specified in config.4coder.", 99, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 51, 82 }, -{ PROC_LINKS(write_note, 0), "write_note", 10, "At the cursor, insert a '// NOTE' comment, includes user name if it was specified in config.4coder.", 99, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 51, 88 }, -{ PROC_LINKS(write_block, 0), "write_block", 11, "At the cursor, insert a block comment.", 38, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 51, 94 }, -{ PROC_LINKS(write_zero_struct, 0), "write_zero_struct", 17, "At the cursor, insert a ' = {};'.", 33, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 51, 100 }, -{ PROC_LINKS(comment_line, 0), "comment_line", 12, "Insert '//' at the beginning of the line after leading whitespace.", 66, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 51, 125 }, -{ PROC_LINKS(uncomment_line, 0), "uncomment_line", 14, "If present, delete '//' at the beginning of the line after leading whitespace.", 78, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 51, 137 }, -{ PROC_LINKS(comment_line_toggle, 0), "comment_line_toggle", 19, "Turns uncommented lines into commented lines and vice versa for comments starting with '//'.", 92, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 51, 149 }, -{ PROC_LINKS(snippet_lister, 0), "snippet_lister", 14, "Opens a snippet lister for inserting whole pre-written snippets of text.", 72, "c:\\work\\4ed\\code\\4coder_combined_write_commands.cpp", 51, 235 }, -{ PROC_LINKS(set_bindings_choose, 0), "set_bindings_choose", 19, "Remap keybindings using the 'choose' mapping rule.", 50, "c:\\work\\4ed\\code\\4coder_remapping_commands.cpp", 46, 41 }, -{ PROC_LINKS(set_bindings_default, 0), "set_bindings_default", 20, "Remap keybindings using the 'default' mapping rule.", 51, "c:\\work\\4ed\\code\\4coder_remapping_commands.cpp", 46, 51 }, -{ PROC_LINKS(set_bindings_mac_default, 0), "set_bindings_mac_default", 24, "Remap keybindings using the 'mac-default' mapping rule.", 55, "c:\\work\\4ed\\code\\4coder_remapping_commands.cpp", 46, 66 }, -{ PROC_LINKS(miblo_increment_basic, 0), "miblo_increment_basic", 21, "Increment an integer under the cursor by one.", 45, "c:\\work\\4ed\\code\\4coder_miblo_numbers.cpp", 41, 29 }, -{ PROC_LINKS(miblo_decrement_basic, 0), "miblo_decrement_basic", 21, "Decrement an integer under the cursor by one.", 45, "c:\\work\\4ed\\code\\4coder_miblo_numbers.cpp", 41, 44 }, -{ PROC_LINKS(miblo_increment_time_stamp, 0), "miblo_increment_time_stamp", 26, "Increment a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "c:\\work\\4ed\\code\\4coder_miblo_numbers.cpp", 41, 231 }, -{ PROC_LINKS(miblo_decrement_time_stamp, 0), "miblo_decrement_time_stamp", 26, "Decrement a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "c:\\work\\4ed\\code\\4coder_miblo_numbers.cpp", 41, 237 }, -{ PROC_LINKS(miblo_increment_time_stamp_minute, 0), "miblo_increment_time_stamp_minute", 33, "Increment a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "c:\\work\\4ed\\code\\4coder_miblo_numbers.cpp", 41, 243 }, -{ PROC_LINKS(miblo_decrement_time_stamp_minute, 0), "miblo_decrement_time_stamp_minute", 33, "Decrement a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "c:\\work\\4ed\\code\\4coder_miblo_numbers.cpp", 41, 249 }, -{ PROC_LINKS(rename_parameter, 0), "rename_parameter", 16, "If the cursor is found to be on the name of a function parameter in the signature of a function definition, all occurences within the scope of the function will be replaced with a new provided string.", 200, "c:\\work\\4ed\\code\\4coder_experiments.cpp", 39, 187 }, -{ PROC_LINKS(write_explicit_enum_values, 0), "write_explicit_enum_values", 26, "If the cursor is found to be on the '{' of an enum definition, the values of the enum will be filled in sequentially starting from zero. Existing values are overwritten.", 170, "c:\\work\\4ed\\code\\4coder_experiments.cpp", 39, 496 }, +static Command_Metadata fcoder_metacmd_table[232] = { +{ PROC_LINKS(write_explicit_enum_flags, 0), "write_explicit_enum_flags", 25, "If the cursor is found to be on the '{' of an enum definition, the values of the enum will be filled in to give each a unique power of 2 value, starting from 1. Existing values are overwritten.", 194, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 503 }, +{ PROC_LINKS(seek_beginning_of_textual_line, 0), "seek_beginning_of_textual_line", 30, "Seeks the cursor to the beginning of the line across all text.", 62, "w:\\4ed\\code\\4coder_seek.cpp", 27, 29 }, +{ PROC_LINKS(seek_end_of_textual_line, 0), "seek_end_of_textual_line", 24, "Seeks the cursor to the end of the line across all text.", 56, "w:\\4ed\\code\\4coder_seek.cpp", 27, 35 }, +{ PROC_LINKS(seek_beginning_of_line, 0), "seek_beginning_of_line", 22, "Seeks the cursor to the beginning of the visual line.", 53, "w:\\4ed\\code\\4coder_seek.cpp", 27, 41 }, +{ PROC_LINKS(seek_end_of_line, 0), "seek_end_of_line", 16, "Seeks the cursor to the end of the visual line.", 47, "w:\\4ed\\code\\4coder_seek.cpp", 27, 47 }, +{ PROC_LINKS(goto_beginning_of_file, 0), "goto_beginning_of_file", 22, "Sets the cursor to the beginning of the file.", 45, "w:\\4ed\\code\\4coder_seek.cpp", 27, 53 }, +{ PROC_LINKS(goto_end_of_file, 0), "goto_end_of_file", 16, "Sets the cursor to the end of the file.", 39, "w:\\4ed\\code\\4coder_seek.cpp", 27, 61 }, +{ PROC_LINKS(change_active_panel, 0), "change_active_panel", 19, "Change the currently active panel, moving to the panel with the next highest view_id.", 85, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 201 }, +{ PROC_LINKS(change_active_panel_backwards, 0), "change_active_panel_backwards", 29, "Change the currently active panel, moving to the panel with the next lowest view_id.", 84, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 211 }, +{ PROC_LINKS(open_panel_vsplit, 0), "open_panel_vsplit", 17, "Create a new panel by vertically splitting the active panel.", 60, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 221 }, +{ PROC_LINKS(open_panel_hsplit, 0), "open_panel_hsplit", 17, "Create a new panel by horizontally splitting the active panel.", 62, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 231 }, +{ PROC_LINKS(suppress_mouse, 0), "suppress_mouse", 14, "Hides the mouse and causes all mosue input (clicks, position, wheel) to be ignored.", 83, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 294 }, +{ PROC_LINKS(allow_mouse, 0), "allow_mouse", 11, "Shows the mouse and causes all mouse input to be processed normally.", 68, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 300 }, +{ PROC_LINKS(toggle_mouse, 0), "toggle_mouse", 12, "Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.", 71, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 306 }, +{ PROC_LINKS(set_mode_to_original, 0), "set_mode_to_original", 20, "Sets the edit mode to 4coder original.", 38, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 312 }, +{ PROC_LINKS(set_mode_to_notepad_like, 0), "set_mode_to_notepad_like", 24, "Sets the edit mode to Notepad like.", 35, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 318 }, +{ PROC_LINKS(toggle_highlight_line_at_cursor, 0), "toggle_highlight_line_at_cursor", 31, "Toggles the line highlight at the cursor.", 41, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 324 }, +{ PROC_LINKS(toggle_highlight_enclosing_scopes, 0), "toggle_highlight_enclosing_scopes", 33, "In code files scopes surrounding the cursor are highlighted with distinguishing colors.", 87, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 330 }, +{ PROC_LINKS(toggle_paren_matching_helper, 0), "toggle_paren_matching_helper", 28, "In code files matching parentheses pairs are colored with distinguishing colors.", 80, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 336 }, +{ PROC_LINKS(toggle_fullscreen, 0), "toggle_fullscreen", 17, "Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.", 89, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 342 }, +{ PROC_LINKS(remap_interactive, 0), "remap_interactive", 17, "Switch to a named key binding map.", 34, "w:\\4ed\\code\\4coder_default_framework.cpp", 40, 350 }, +{ PROC_LINKS(write_character, 0), "write_character", 15, "Inserts whatever character was used to trigger this command.", 60, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 57 }, +{ PROC_LINKS(write_underscore, 0), "write_underscore", 16, "Inserts an underscore.", 22, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 66 }, +{ PROC_LINKS(delete_char, 0), "delete_char", 11, "Deletes the character to the right of the cursor.", 49, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 73 }, +{ PROC_LINKS(backspace_char, 0), "backspace_char", 14, "Deletes the character to the left of the cursor.", 48, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 90 }, +{ PROC_LINKS(set_mark, 0), "set_mark", 8, "Sets the mark to the current position of the cursor.", 52, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 109 }, +{ PROC_LINKS(cursor_mark_swap, 0), "cursor_mark_swap", 16, "Swaps the position of the cursor and the mark.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 118 }, +{ PROC_LINKS(delete_range, 0), "delete_range", 12, "Deletes the text in the range between the cursor and the mark.", 62, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 128 }, +{ PROC_LINKS(backspace_alpha_numeric_boundary, 0), "backspace_alpha_numeric_boundary", 32, "Delete characters between the cursor position and the first alphanumeric boundary to the left.", 94, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 148 }, +{ PROC_LINKS(delete_alpha_numeric_boundary, 0), "delete_alpha_numeric_boundary", 29, "Delete characters between the cursor position and the first alphanumeric boundary to the right.", 95, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 156 }, +{ PROC_LINKS(snipe_backward_whitespace_or_token_boundary, 0), "snipe_backward_whitespace_or_token_boundary", 43, "Delete a single, whole token on or to the left of the cursor and post it to the clipboard.", 90, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 176 }, +{ PROC_LINKS(snipe_forward_whitespace_or_token_boundary, 0), "snipe_forward_whitespace_or_token_boundary", 42, "Delete a single, whole token on or to the right of the cursor and post it to the clipboard.", 91, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 184 }, +{ PROC_LINKS(center_view, 0), "center_view", 11, "Centers the view vertically on the line on which the cursor sits.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 197 }, +{ PROC_LINKS(left_adjust_view, 0), "left_adjust_view", 16, "Sets the left size of the view near the x position of the cursor.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 211 }, +{ PROC_LINKS(click_set_cursor_and_mark, 0), "click_set_cursor_and_mark", 25, "Sets the cursor position and mark to the mouse position.", 56, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 223 }, +{ PROC_LINKS(click_set_cursor, 0), "click_set_cursor", 16, "Sets the cursor position to the mouse position.", 47, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 235 }, +{ PROC_LINKS(click_set_cursor_if_lbutton, 0), "click_set_cursor_if_lbutton", 27, "If the mouse left button is pressed, sets the cursor position to the mouse position.", 84, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 247 }, +{ PROC_LINKS(click_set_mark, 0), "click_set_mark", 14, "Sets the mark position to the mouse position.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 261 }, +{ PROC_LINKS(mouse_wheel_scroll, 0), "mouse_wheel_scroll", 18, "Reads the scroll wheel value from the mouse state and scrolls accordingly.", 74, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 273 }, +{ PROC_LINKS(move_up, 0), "move_up", 7, "Moves the cursor up one line.", 29, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 334 }, +{ PROC_LINKS(move_down, 0), "move_down", 9, "Moves the cursor down one line.", 31, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 340 }, +{ PROC_LINKS(move_up_10, 0), "move_up_10", 10, "Moves the cursor up ten lines.", 30, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 346 }, +{ PROC_LINKS(move_down_10, 0), "move_down_10", 12, "Moves the cursor down ten lines.", 32, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 352 }, +{ PROC_LINKS(move_down_textual, 0), "move_down_textual", 17, "Moves down to the next line of actual text, regardless of line wrapping.", 72, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 358 }, +{ PROC_LINKS(page_up, 0), "page_up", 7, "Scrolls the view up one view height and moves the cursor up one view height.", 76, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 368 }, +{ PROC_LINKS(page_down, 0), "page_down", 9, "Scrolls the view down one view height and moves the cursor down one view height.", 80, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 376 }, +{ PROC_LINKS(move_up_to_blank_line, 0), "move_up_to_blank_line", 21, "Seeks the cursor up to the next blank line.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 405 }, +{ PROC_LINKS(move_down_to_blank_line, 0), "move_down_to_blank_line", 23, "Seeks the cursor down to the next blank line.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 411 }, +{ PROC_LINKS(move_up_to_blank_line_skip_whitespace, 0), "move_up_to_blank_line_skip_whitespace", 37, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 417 }, +{ PROC_LINKS(move_down_to_blank_line_skip_whitespace, 0), "move_down_to_blank_line_skip_whitespace", 39, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 423 }, +{ PROC_LINKS(move_up_to_blank_line_end, 0), "move_up_to_blank_line_end", 25, "Seeks the cursor up to the next blank line and places it at the end of the line.", 80, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 429 }, +{ PROC_LINKS(move_down_to_blank_line_end, 0), "move_down_to_blank_line_end", 27, "Seeks the cursor down to the next blank line and places it at the end of the line.", 82, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 435 }, +{ PROC_LINKS(move_left, 0), "move_left", 9, "Moves the cursor one character to the left.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 441 }, +{ PROC_LINKS(move_right, 0), "move_right", 10, "Moves the cursor one character to the right.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 453 }, +{ PROC_LINKS(move_right_whitespace_boundary, 0), "move_right_whitespace_boundary", 30, "Seek right for the next boundary between whitespace and non-whitespace.", 71, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 475 }, +{ PROC_LINKS(move_left_whitespace_boundary, 0), "move_left_whitespace_boundary", 29, "Seek left for the next boundary between whitespace and non-whitespace.", 70, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 483 }, +{ PROC_LINKS(move_right_token_boundary, 0), "move_right_token_boundary", 25, "Seek right for the next end of a token.", 39, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 491 }, +{ PROC_LINKS(move_left_token_boundary, 0), "move_left_token_boundary", 24, "Seek left for the next beginning of a token.", 44, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 499 }, +{ PROC_LINKS(move_right_whitespace_or_token_boundary, 0), "move_right_whitespace_or_token_boundary", 39, "Seek right for the next end of a token or boundary between whitespace and non-whitespace.", 89, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 507 }, +{ PROC_LINKS(move_left_whitespace_or_token_boundary, 0), "move_left_whitespace_or_token_boundary", 38, "Seek left for the next end of a token or boundary between whitespace and non-whitespace.", 88, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 515 }, +{ PROC_LINKS(move_right_alpha_numeric_boundary, 0), "move_right_alpha_numeric_boundary", 33, "Seek right for boundary between alphanumeric characters and non-alphanumeric characters.", 88, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 523 }, +{ PROC_LINKS(move_left_alpha_numeric_boundary, 0), "move_left_alpha_numeric_boundary", 32, "Seek left for boundary between alphanumeric characters and non-alphanumeric characters.", 87, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 531 }, +{ PROC_LINKS(move_right_alpha_numeric_or_camel_boundary, 0), "move_right_alpha_numeric_or_camel_boundary", 42, "Seek right for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 107, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 539 }, +{ PROC_LINKS(move_left_alpha_numeric_or_camel_boundary, 0), "move_left_alpha_numeric_or_camel_boundary", 41, "Seek left for boundary between alphanumeric characters or camel case word and non-alphanumeric characters.", 106, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 547 }, +{ PROC_LINKS(select_all, 0), "select_all", 10, "Puts the cursor at the top of the file, and the mark at the bottom of the file.", 79, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 568 }, +{ PROC_LINKS(to_uppercase, 0), "to_uppercase", 12, "Converts all ascii text in the range between the cursor and the mark to uppercase.", 82, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 581 }, +{ PROC_LINKS(to_lowercase, 0), "to_lowercase", 12, "Converts all ascii text in the range between the cursor and the mark to lowercase.", 82, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 594 }, +{ PROC_LINKS(clean_all_lines, 0), "clean_all_lines", 15, "Removes trailing whitespace from all lines in the current buffer.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 607 }, +{ PROC_LINKS(basic_change_active_panel, 0), "basic_change_active_panel", 25, "Change the currently active panel, moving to the panel with the next highest view_id. Will not skipe the build panel if it is open.", 132, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 641 }, +{ PROC_LINKS(close_panel, 0), "close_panel", 11, "Closes the currently active panel if it is not the only panel open.", 67, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 649 }, +{ PROC_LINKS(show_scrollbar, 0), "show_scrollbar", 14, "Sets the current view to show it's scrollbar.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 658 }, +{ PROC_LINKS(hide_scrollbar, 0), "hide_scrollbar", 14, "Sets the current view to hide it's scrollbar.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 665 }, +{ PROC_LINKS(show_filebar, 0), "show_filebar", 12, "Sets the current view to show it's filebar.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 672 }, +{ PROC_LINKS(hide_filebar, 0), "hide_filebar", 12, "Sets the current view to hide it's filebar.", 43, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 679 }, +{ PROC_LINKS(toggle_filebar, 0), "toggle_filebar", 14, "Toggles the visibility status of the current view's filebar.", 60, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 686 }, +{ PROC_LINKS(toggle_line_wrap, 0), "toggle_line_wrap", 16, "Toggles the current buffer's line wrapping status.", 50, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 695 }, +{ PROC_LINKS(toggle_fps_meter, 0), "toggle_fps_meter", 16, "Toggles the visibility of the FPS performance meter", 51, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 708 }, +{ PROC_LINKS(increase_line_wrap, 0), "increase_line_wrap", 18, "Increases the current buffer's width for line wrapping.", 55, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 714 }, +{ PROC_LINKS(decrease_line_wrap, 0), "decrease_line_wrap", 18, "Decrases the current buffer's width for line wrapping.", 54, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 727 }, +{ PROC_LINKS(increase_face_size, 0), "increase_face_size", 18, "Increase the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 740 }, +{ PROC_LINKS(decrease_face_size, 0), "decrease_face_size", 18, "Decrease the size of the face used by the current buffer.", 57, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 751 }, +{ PROC_LINKS(mouse_wheel_change_face_size, 0), "mouse_wheel_change_face_size", 28, "Reads the state of the mouse wheel and uses it to either increase or decrease the face size.", 92, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 762 }, +{ PROC_LINKS(toggle_virtual_whitespace, 0), "toggle_virtual_whitespace", 25, "Toggles the current buffer's virtual whitespace status.", 55, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 779 }, +{ PROC_LINKS(toggle_show_whitespace, 0), "toggle_show_whitespace", 22, "Toggles the current buffer's whitespace visibility status.", 58, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 789 }, +{ PROC_LINKS(toggle_line_numbers, 0), "toggle_line_numbers", 19, "Toggles the left margin line numbers.", 37, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 798 }, +{ PROC_LINKS(eol_dosify, 0), "eol_dosify", 10, "Puts the buffer in DOS line ending mode.", 40, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 804 }, +{ PROC_LINKS(eol_nixify, 0), "eol_nixify", 10, "Puts the buffer in NIX line ending mode.", 40, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 812 }, +{ PROC_LINKS(exit_4coder, 0), "exit_4coder", 11, "Attempts to close 4coder.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 820 }, +{ PROC_LINKS(goto_line, 0), "goto_line", 9, "Queries the user for a number, and jumps the cursor to the corresponding line.", 78, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 828 }, +{ PROC_LINKS(search, 0), "search", 6, "Begins an incremental search down through the current buffer for a user specified string.", 89, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1039 }, +{ PROC_LINKS(reverse_search, 0), "reverse_search", 14, "Begins an incremental search up through the current buffer for a user specified string.", 87, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1045 }, +{ PROC_LINKS(search_identifier, 0), "search_identifier", 17, "Begins an incremental search down through the current buffer for the word or token under the cursor.", 100, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1051 }, +{ PROC_LINKS(reverse_search_identifier, 0), "reverse_search_identifier", 25, "Begins an incremental search up through the current buffer for the word or token under the cursor.", 98, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1062 }, +{ PROC_LINKS(replace_in_range, 0), "replace_in_range", 16, "Queries the user for a needle and string. Replaces all occurences of needle with string in the range between cursor and the mark in the active buffer.", 150, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1113 }, +{ PROC_LINKS(replace_in_buffer, 0), "replace_in_buffer", 17, "Queries the user for a needle and string. Replaces all occurences of needle with string in the active buffer.", 109, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1122 }, +{ PROC_LINKS(replace_in_all_buffers, 0), "replace_in_all_buffers", 22, "Queries the user for a needle and string. Replaces all occurences of needle with string in all editable buffers.", 112, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1131 }, +{ PROC_LINKS(query_replace, 0), "query_replace", 13, "Queries the user for two strings, and incrementally replaces every occurence of the first string with the second string.", 120, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1219 }, +{ PROC_LINKS(query_replace_identifier, 0), "query_replace_identifier", 24, "Queries the user for a string, and incrementally replace every occurence of the word or token found at the cursor with the specified string.", 140, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1239 }, +{ PROC_LINKS(query_replace_selection, 0), "query_replace_selection", 23, "Queries the user for a string, and incrementally replace every occurence of the string found in the selected range with the specified string.", 141, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1255 }, +{ PROC_LINKS(save_all_dirty_buffers, 0), "save_all_dirty_buffers", 22, "Saves all buffers marked dirty (showing the '*' indicator).", 59, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1290 }, +{ PROC_LINKS(delete_file_query, 0), "delete_file_query", 17, "Deletes the file of the current buffer if 4coder has the appropriate access rights. Will ask the user for confirmation first.", 125, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1315 }, +{ PROC_LINKS(save_to_query, 0), "save_to_query", 13, "Queries the user for a file name and saves the contents of the current buffer, altering the buffer's name too.", 110, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1353 }, +{ PROC_LINKS(rename_file_query, 0), "rename_file_query", 17, "Queries the user for a new name and renames the file of the current buffer, altering the buffer's name too.", 107, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1388 }, +{ PROC_LINKS(make_directory_query, 0), "make_directory_query", 20, "Queries the user for a name and creates a new directory with the given name.", 76, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1428 }, +{ PROC_LINKS(move_line_up, 0), "move_line_up", 12, "Swaps the line under the cursor with the line above it, and moves the cursor up with it.", 88, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1461 }, +{ PROC_LINKS(move_line_down, 0), "move_line_down", 14, "Swaps the line under the cursor with the line below it, and moves the cursor down with it.", 90, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1467 }, +{ PROC_LINKS(duplicate_line, 0), "duplicate_line", 14, "Create a copy of the line on which the cursor sits.", 51, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1473 }, +{ PROC_LINKS(delete_line, 0), "delete_line", 11, "Delete the line the on which the cursor sits.", 45, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1487 }, +{ PROC_LINKS(open_file_in_quotes, 0), "open_file_in_quotes", 19, "Reads a filename from surrounding '\"' characters and attempts to open the corresponding file.", 94, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1552 }, +{ PROC_LINKS(open_matching_file_cpp, 0), "open_matching_file_cpp", 22, "If the current file is a *.cpp or *.h, attempts to open the corresponding *.h or *.cpp file in the other view.", 110, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1584 }, +{ PROC_LINKS(view_buffer_other_panel, 0), "view_buffer_other_panel", 23, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1597 }, +{ PROC_LINKS(swap_buffers_between_panels, 0), "swap_buffers_between_panels", 27, "Set the other non-active panel to view the buffer that the active panel views, and switch to that panel.", 104, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1609 }, +{ PROC_LINKS(kill_buffer, 0), "kill_buffer", 11, "Kills the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1645 }, +{ PROC_LINKS(save, 0), "save", 4, "Saves the current buffer.", 25, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1653 }, +{ PROC_LINKS(reopen, 0), "reopen", 6, "Reopen the current buffer from the hard drive.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1665 }, +{ PROC_LINKS(undo, 0), "undo", 4, "Advances backwards through the undo history of the current buffer.", 66, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1723 }, +{ PROC_LINKS(redo, 0), "redo", 4, "Advances forwards through the undo history of the current buffer.", 65, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1736 }, +{ PROC_LINKS(undo_all_buffers, 0), "undo_all_buffers", 16, "Advances backward through the undo history in the buffer containing the most recent regular edit.", 97, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1750 }, +{ PROC_LINKS(redo_all_buffers, 0), "redo_all_buffers", 16, "Advances forward through the undo history in the buffer containing the most recent regular edit.", 96, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1824 }, +{ PROC_LINKS(open_in_other, 0), "open_in_other", 13, "Interactively opens a file in the other panel.", 46, "w:\\4ed\\code\\4coder_base_commands.cpp", 36, 1927 }, +{ PROC_LINKS(lister__quit, 0), "lister__quit", 12, "A lister mode command that quits the list without executing any actions.", 72, "w:\\4ed\\code\\4coder_lists.cpp", 28, 8 }, +{ PROC_LINKS(lister__activate, 0), "lister__activate", 16, "A lister mode command that activates the list's action on the highlighted item.", 79, "w:\\4ed\\code\\4coder_lists.cpp", 28, 15 }, +{ PROC_LINKS(lister__write_character, 0), "lister__write_character", 23, "A lister mode command that dispatches to the lister's write character handler.", 78, "w:\\4ed\\code\\4coder_lists.cpp", 28, 30 }, +{ PROC_LINKS(lister__backspace_text_field, 0), "lister__backspace_text_field", 28, "A lister mode command that dispatches to the lister's backspace text field handler.", 83, "w:\\4ed\\code\\4coder_lists.cpp", 28, 40 }, +{ PROC_LINKS(lister__move_up, 0), "lister__move_up", 15, "A lister mode command that dispatches to the lister's navigate up handler.", 74, "w:\\4ed\\code\\4coder_lists.cpp", 28, 50 }, +{ PROC_LINKS(lister__move_down, 0), "lister__move_down", 17, "A lister mode command that dispatches to the lister's navigate down handler.", 76, "w:\\4ed\\code\\4coder_lists.cpp", 28, 60 }, +{ PROC_LINKS(lister__wheel_scroll, 0), "lister__wheel_scroll", 20, "A lister mode command that scrolls the list in response to the mouse wheel.", 75, "w:\\4ed\\code\\4coder_lists.cpp", 28, 70 }, +{ PROC_LINKS(lister__mouse_press, 0), "lister__mouse_press", 19, "A lister mode command that beings a click interaction with a list item under the mouse.", 87, "w:\\4ed\\code\\4coder_lists.cpp", 28, 84 }, +{ PROC_LINKS(lister__mouse_release, 0), "lister__mouse_release", 21, "A lister mode command that ends a click interaction with a list item under the mouse, possibly activating it.", 109, "w:\\4ed\\code\\4coder_lists.cpp", 28, 95 }, +{ PROC_LINKS(lister__repaint, 0), "lister__repaint", 15, "A lister mode command that updates the lists UI data.", 53, "w:\\4ed\\code\\4coder_lists.cpp", 28, 110 }, +{ PROC_LINKS(lister__write_character__default, 0), "lister__write_character__default", 32, "A lister mode command that inserts a new character to the text field.", 69, "w:\\4ed\\code\\4coder_lists.cpp", 28, 120 }, +{ PROC_LINKS(lister__backspace_text_field__default, 0), "lister__backspace_text_field__default", 37, "A lister mode command that backspaces one character from the text field.", 72, "w:\\4ed\\code\\4coder_lists.cpp", 28, 139 }, +{ PROC_LINKS(lister__move_up__default, 0), "lister__move_up__default", 24, "A lister mode command that moves the highlighted item one up in the list.", 73, "w:\\4ed\\code\\4coder_lists.cpp", 28, 153 }, +{ PROC_LINKS(lister__move_down__default, 0), "lister__move_down__default", 26, "A lister mode command that moves the highlighted item one down in the list.", 75, "w:\\4ed\\code\\4coder_lists.cpp", 28, 168 }, +{ PROC_LINKS(lister__write_character__file_path, 0), "lister__write_character__file_path", 34, "A lister mode command that inserts a character into the text field of a file system list.", 89, "w:\\4ed\\code\\4coder_lists.cpp", 28, 183 }, +{ PROC_LINKS(lister__backspace_text_field__file_path, 0), "lister__backspace_text_field__file_path", 39, "A lister mode command that backspaces one character from the text field of a file system list.", 94, "w:\\4ed\\code\\4coder_lists.cpp", 28, 208 }, +{ PROC_LINKS(lister__write_character__fixed_list, 0), "lister__write_character__fixed_list", 35, "A lister mode command that handles input for the fixed sure to kill list.", 73, "w:\\4ed\\code\\4coder_lists.cpp", 28, 249 }, +{ PROC_LINKS(interactive_switch_buffer, 0), "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "w:\\4ed\\code\\4coder_lists.cpp", 28, 723 }, +{ PROC_LINKS(interactive_kill_buffer, 0), "interactive_kill_buffer", 23, "Interactively kill an open buffer.", 34, "w:\\4ed\\code\\4coder_lists.cpp", 28, 742 }, +{ PROC_LINKS(interactive_open_or_new, 0), "interactive_open_or_new", 23, "Interactively open a file out of the file system.", 49, "w:\\4ed\\code\\4coder_lists.cpp", 28, 815 }, +{ PROC_LINKS(interactive_new, 0), "interactive_new", 15, "Interactively creates a new file.", 33, "w:\\4ed\\code\\4coder_lists.cpp", 28, 854 }, +{ PROC_LINKS(interactive_open, 0), "interactive_open", 16, "Interactively opens a file.", 27, "w:\\4ed\\code\\4coder_lists.cpp", 28, 887 }, +{ PROC_LINKS(command_lister, 0), "command_lister", 14, "Opens an interactive list of all registered commands.", 53, "w:\\4ed\\code\\4coder_lists.cpp", 28, 969 }, +{ PROC_LINKS(auto_tab_whole_file, 0), "auto_tab_whole_file", 19, "Audo-indents the entire current buffer.", 39, "w:\\4ed\\code\\4coder_auto_indent.cpp", 34, 500 }, +{ PROC_LINKS(auto_tab_line_at_cursor, 0), "auto_tab_line_at_cursor", 23, "Auto-indents the line on which the cursor sits.", 47, "w:\\4ed\\code\\4coder_auto_indent.cpp", 34, 509 }, +{ PROC_LINKS(auto_tab_range, 0), "auto_tab_range", 14, "Auto-indents the range between the cursor and the mark.", 55, "w:\\4ed\\code\\4coder_auto_indent.cpp", 34, 519 }, +{ PROC_LINKS(write_and_auto_tab, 0), "write_and_auto_tab", 18, "Inserts a character and auto-indents the line on which the cursor sits.", 71, "w:\\4ed\\code\\4coder_auto_indent.cpp", 34, 529 }, +{ PROC_LINKS(list_all_locations, 0), "list_all_locations", 18, "Queries the user for a string and lists all exact case-sensitive matches found in all open buffers.", 99, "w:\\4ed\\code\\4coder_search.cpp", 29, 166 }, +{ PROC_LINKS(list_all_substring_locations, 0), "list_all_substring_locations", 28, "Queries the user for a string and lists all case-sensitive substring matches found in all open buffers.", 103, "w:\\4ed\\code\\4coder_search.cpp", 29, 172 }, +{ PROC_LINKS(list_all_locations_case_insensitive, 0), "list_all_locations_case_insensitive", 35, "Queries the user for a string and lists all exact case-insensitive matches found in all open buffers.", 101, "w:\\4ed\\code\\4coder_search.cpp", 29, 178 }, +{ PROC_LINKS(list_all_substring_locations_case_insensitive, 0), "list_all_substring_locations_case_insensitive", 45, "Queries the user for a string and lists all case-insensitive substring matches found in all open buffers.", 105, "w:\\4ed\\code\\4coder_search.cpp", 29, 184 }, +{ PROC_LINKS(list_all_locations_of_identifier, 0), "list_all_locations_of_identifier", 32, "Reads a token or word under the cursor and lists all exact case-sensitive mathces in all open buffers.", 102, "w:\\4ed\\code\\4coder_search.cpp", 29, 190 }, +{ PROC_LINKS(list_all_locations_of_identifier_case_insensitive, 0), "list_all_locations_of_identifier_case_insensitive", 49, "Reads a token or word under the cursor and lists all exact case-insensitive mathces in all open buffers.", 104, "w:\\4ed\\code\\4coder_search.cpp", 29, 196 }, +{ PROC_LINKS(list_all_locations_of_selection, 0), "list_all_locations_of_selection", 31, "Reads the string in the selected range and lists all exact case-sensitive mathces in all open buffers.", 102, "w:\\4ed\\code\\4coder_search.cpp", 29, 202 }, +{ PROC_LINKS(list_all_locations_of_selection_case_insensitive, 0), "list_all_locations_of_selection_case_insensitive", 48, "Reads the string in the selected range and lists all exact case-insensitive mathces in all open buffers.", 104, "w:\\4ed\\code\\4coder_search.cpp", 29, 208 }, +{ PROC_LINKS(list_all_locations_of_type_definition, 0), "list_all_locations_of_type_definition", 37, "Queries user for string, lists all locations of strings that appear to define a type whose name matches the input string.", 121, "w:\\4ed\\code\\4coder_search.cpp", 29, 214 }, +{ PROC_LINKS(list_all_locations_of_type_definition_of_identifier, 0), "list_all_locations_of_type_definition_of_identifier", 51, "Reads a token or word under the cursor and lists all locations of strings that appear to define a type whose name matches it.", 125, "w:\\4ed\\code\\4coder_search.cpp", 29, 222 }, +{ PROC_LINKS(word_complete, 0), "word_complete", 13, "Iteratively tries completing the word to the left of the cursor with other words in open buffers that have the same prefix string.", 130, "w:\\4ed\\code\\4coder_search.cpp", 29, 376 }, +{ PROC_LINKS(goto_jump_at_cursor, 0), "goto_jump_at_cursor", 19, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in another view and changes the active panel to the view containing the jump.", 187, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 353 }, +{ PROC_LINKS(goto_jump_at_cursor_same_panel, 0), "goto_jump_at_cursor_same_panel", 30, "If the cursor is found to be on a jump location, parses the jump location and brings up the file and position in this view, losing the compilation output or jump list.", 167, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 380 }, +{ PROC_LINKS(goto_next_jump, 0), "goto_next_jump", 14, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, skipping sub jump locations.", 123, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 469 }, +{ PROC_LINKS(goto_prev_jump, 0), "goto_prev_jump", 14, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, skipping sub jump locations.", 127, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 486 }, +{ PROC_LINKS(goto_next_jump_no_skips, 0), "goto_next_jump_no_skips", 23, "If a buffer containing jump locations has been locked in, goes to the next jump in the buffer, and does not skip sub jump locations.", 132, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 499 }, +{ PROC_LINKS(goto_prev_jump_no_skips, 0), "goto_prev_jump_no_skips", 23, "If a buffer containing jump locations has been locked in, goes to the previous jump in the buffer, and does not skip sub jump locations.", 136, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 516 }, +{ PROC_LINKS(goto_first_jump, 0), "goto_first_jump", 15, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer.", 95, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 530 }, +{ PROC_LINKS(goto_first_jump_same_panel_sticky, 0), "goto_first_jump_same_panel_sticky", 33, "If a buffer containing jump locations has been locked in, goes to the first jump in the buffer and views the buffer in the panel where the jump list was.", 153, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 547 }, +{ PROC_LINKS(newline_or_goto_position, 0), "newline_or_goto_position", 24, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 569 }, +{ PROC_LINKS(newline_or_goto_position_same_panel, 0), "newline_or_goto_position_same_panel", 35, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "w:\\4ed\\code\\4coder_jump_sticky.cpp", 34, 586 }, +{ PROC_LINKS(view_jump_list_with_lister, 0), "view_jump_list_with_lister", 26, "When executed on a buffer with jumps, creates a persistent lister for all the jumps", 83, "w:\\4ed\\code\\4coder_jump_lister.cpp", 34, 104 }, +{ PROC_LINKS(log_graph__escape, 0), "log_graph__escape", 17, "Ends the log grapher", 20, "w:\\4ed\\code\\4coder_log_parser.cpp", 33, 906 }, +{ PROC_LINKS(log_graph__scroll_wheel, 0), "log_graph__scroll_wheel", 23, "Scrolls the log graph", 21, "w:\\4ed\\code\\4coder_log_parser.cpp", 33, 915 }, +{ PROC_LINKS(log_graph__page_up, 0), "log_graph__page_up", 18, "Scroll the log graph up one whole page", 38, "w:\\4ed\\code\\4coder_log_parser.cpp", 33, 926 }, +{ PROC_LINKS(log_graph__page_down, 0), "log_graph__page_down", 20, "Scroll the log graph down one whole page", 40, "w:\\4ed\\code\\4coder_log_parser.cpp", 33, 934 }, +{ PROC_LINKS(log_graph__click_select_event, 0), "log_graph__click_select_event", 29, "Select the event record at the mouse point in the log graph", 59, "w:\\4ed\\code\\4coder_log_parser.cpp", 33, 968 }, +{ PROC_LINKS(log_graph__click_jump_to_event_source, 0), "log_graph__click_jump_to_event_source", 37, "Jump to the code that logged the event record at the mouse point in the log graph", 81, "w:\\4ed\\code\\4coder_log_parser.cpp", 33, 987 }, +{ PROC_LINKS(show_the_log_graph, 0), "show_the_log_graph", 18, "Parser *log* and displays the 'log graph' UI", 44, "w:\\4ed\\code\\4coder_log_parser.cpp", 33, 1035 }, +{ PROC_LINKS(copy, 0), "copy", 4, "Copy the text in the range from the cursor to the mark onto the clipboard.", 74, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 19 }, +{ PROC_LINKS(cut, 0), "cut", 3, "Cut the text in the range from the cursor to the mark onto the clipboard.", 73, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 28 }, +{ PROC_LINKS(paste, 0), "paste", 5, "At the cursor, insert the text at the top of the clipboard.", 59, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 39 }, +{ PROC_LINKS(paste_next, 0), "paste_next", 10, "If the previous command was paste or paste_next, replaces the paste range with the next text down on the clipboard, otherwise operates as the paste command.", 156, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 73 }, +{ PROC_LINKS(paste_and_indent, 0), "paste_and_indent", 16, "Paste from the top of clipboard and run auto-indent on the newly pasted text.", 77, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 114 }, +{ PROC_LINKS(paste_next_and_indent, 0), "paste_next_and_indent", 21, "Paste the next item on the clipboard and run auto-indent on the newly pasted text.", 82, "w:\\4ed\\code\\4coder_clipboard.cpp", 32, 121 }, +{ PROC_LINKS(execute_previous_cli, 0), "execute_previous_cli", 20, "If the command execute_any_cli has already been used, this will execute a CLI reusing the most recent buffer name and command.", 126, "w:\\4ed\\code\\4coder_system_command.cpp", 37, 7 }, +{ PROC_LINKS(execute_any_cli, 0), "execute_any_cli", 15, "Queries for an output buffer name and system command, runs the system command as a CLI and prints the output to the specified buffer.", 133, "w:\\4ed\\code\\4coder_system_command.cpp", 37, 22 }, +{ PROC_LINKS(build_search, 0), "build_search", 12, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*.", 153, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 128 }, +{ PROC_LINKS(build_in_build_panel, 0), "build_in_build_panel", 20, "Looks for a build.bat, build.sh, or makefile in the current and parent directories. Runs the first that it finds and prints the output to *compilation*. Puts the *compilation* buffer in a panel at the footer of the current view.", 230, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 163 }, +{ PROC_LINKS(close_build_panel, 0), "close_build_panel", 17, "If the special build panel is open, closes it.", 46, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 178 }, +{ PROC_LINKS(change_to_build_panel, 0), "change_to_build_panel", 21, "If the special build panel is open, makes the build panel the active panel.", 75, "w:\\4ed\\code\\4coder_build_commands.cpp", 37, 184 }, +{ PROC_LINKS(close_all_code, 0), "close_all_code", 14, "Closes any buffer with a filename ending with an extension configured to be recognized as a code file type.", 107, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 921 }, +{ PROC_LINKS(open_all_code, 0), "open_all_code", 13, "Open all code in the current directory. File types are determined by extensions. An extension is considered code based on the extensions specified in 4coder.config.", 164, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 927 }, +{ PROC_LINKS(open_all_code_recursive, 0), "open_all_code_recursive", 23, "Works as open_all_code but also runs in all subdirectories.", 59, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 933 }, +{ PROC_LINKS(load_project, 0), "load_project", 12, "Looks for a project.4coder file in the current directory and tries to load it. Looks in parent directories until a project file is found or there are no more parents.", 167, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 941 }, +{ PROC_LINKS(project_fkey_command, 0), "project_fkey_command", 20, "Run an 'fkey command' configured in a project.4coder file. Determines the index of the 'fkey command' by which function key or numeric key was pressed to trigger the command.", 175, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 948 }, +{ PROC_LINKS(project_go_to_root_directory, 0), "project_go_to_root_directory", 28, "Changes 4coder's hot directory to the root directory of the currently loaded project. With no loaded project nothing hapepns.", 125, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 971 }, +{ PROC_LINKS(setup_new_project, 0), "setup_new_project", 17, "Queries the user for several configuration options and initializes a new 4coder project with build scripts for every OS.", 120, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1306 }, +{ PROC_LINKS(setup_build_bat, 0), "setup_build_bat", 15, "Queries the user for several configuration options and initializes a new build batch script.", 92, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1313 }, +{ PROC_LINKS(setup_build_sh, 0), "setup_build_sh", 14, "Queries the user for several configuration options and initializes a new build shell script.", 92, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1319 }, +{ PROC_LINKS(setup_build_bat_and_sh, 0), "setup_build_bat_and_sh", 22, "Queries the user for several configuration options and initializes a new build batch script.", 92, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1325 }, +{ PROC_LINKS(project_command_lister, 0), "project_command_lister", 22, "Open a lister of all commands in the currently loaded project.", 62, "w:\\4ed\\code\\4coder_project_commands.cpp", 39, 1340 }, +{ PROC_LINKS(list_all_functions_current_buffer, 0), "list_all_functions_current_buffer", 33, "Creates a jump list of lines of the current buffer that appear to define or declare functions.", 94, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 276 }, +{ PROC_LINKS(list_all_functions_current_buffer_lister, 0), "list_all_functions_current_buffer_lister", 40, "Creates a lister of locations that look like function definitions and declarations in the buffer.", 97, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 286 }, +{ PROC_LINKS(list_all_functions_all_buffers, 0), "list_all_functions_all_buffers", 30, "Creates a jump list of lines from all buffers that appear to define or declare functions.", 89, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 298 }, +{ PROC_LINKS(list_all_functions_all_buffers_lister, 0), "list_all_functions_all_buffers_lister", 37, "Creates a lister of locations that look like function definitions and declarations all buffers.", 95, "w:\\4ed\\code\\4coder_function_list.cpp", 36, 304 }, +{ PROC_LINKS(select_surrounding_scope, 0), "select_surrounding_scope", 24, "Finds the scope enclosed by '{' '}' surrounding the cursor and puts the cursor and mark on the '{' and '}'.", 107, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 348 }, +{ PROC_LINKS(select_next_scope_absolute, 0), "select_next_scope_absolute", 26, "Finds the first scope started by '{' after the cursor and puts the cursor and mark on the '{' and '}'.", 102, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 363 }, +{ PROC_LINKS(select_prev_scope_absolute, 0), "select_prev_scope_absolute", 26, "Finds the first scope started by '{' before the cursor and puts the cursor and mark on the '{' and '}'.", 103, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 382 }, +{ PROC_LINKS(place_in_scope, 0), "place_in_scope", 14, "Wraps the code contained in the range between cursor and mark with a new curly brace scope.", 91, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 456 }, +{ PROC_LINKS(delete_current_scope, 0), "delete_current_scope", 20, "Deletes the braces surrounding the currently selected scope. Leaves the contents within the scope.", 99, "w:\\4ed\\code\\4coder_scope_commands.cpp", 37, 462 }, +{ PROC_LINKS(open_long_braces, 0), "open_long_braces", 16, "At the cursor, insert a '{' and '}' separated by a blank line.", 62, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 46 }, +{ PROC_LINKS(open_long_braces_semicolon, 0), "open_long_braces_semicolon", 26, "At the cursor, insert a '{' and '};' separated by a blank line.", 63, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 54 }, +{ PROC_LINKS(open_long_braces_break, 0), "open_long_braces_break", 22, "At the cursor, insert a '{' and '}break;' separated by a blank line.", 68, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 62 }, +{ PROC_LINKS(if0_off, 0), "if0_off", 7, "Surround the range between the cursor and mark with an '#if 0' and an '#endif'", 78, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 70 }, +{ PROC_LINKS(write_todo, 0), "write_todo", 10, "At the cursor, insert a '// TODO' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 76 }, +{ PROC_LINKS(write_hack, 0), "write_hack", 10, "At the cursor, insert a '// HACK' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 82 }, +{ PROC_LINKS(write_note, 0), "write_note", 10, "At the cursor, insert a '// NOTE' comment, includes user name if it was specified in config.4coder.", 99, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 88 }, +{ PROC_LINKS(write_block, 0), "write_block", 11, "At the cursor, insert a block comment.", 38, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 94 }, +{ PROC_LINKS(write_zero_struct, 0), "write_zero_struct", 17, "At the cursor, insert a ' = {};'.", 33, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 100 }, +{ PROC_LINKS(comment_line, 0), "comment_line", 12, "Insert '//' at the beginning of the line after leading whitespace.", 66, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 125 }, +{ PROC_LINKS(uncomment_line, 0), "uncomment_line", 14, "If present, delete '//' at the beginning of the line after leading whitespace.", 78, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 137 }, +{ PROC_LINKS(comment_line_toggle, 0), "comment_line_toggle", 19, "Turns uncommented lines into commented lines and vice versa for comments starting with '//'.", 92, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 149 }, +{ PROC_LINKS(snippet_lister, 0), "snippet_lister", 14, "Opens a snippet lister for inserting whole pre-written snippets of text.", 72, "w:\\4ed\\code\\4coder_combined_write_commands.cpp", 46, 235 }, +{ PROC_LINKS(set_bindings_choose, 0), "set_bindings_choose", 19, "Remap keybindings using the 'choose' mapping rule.", 50, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 41 }, +{ PROC_LINKS(set_bindings_default, 0), "set_bindings_default", 20, "Remap keybindings using the 'default' mapping rule.", 51, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 51 }, +{ PROC_LINKS(set_bindings_mac_default, 0), "set_bindings_mac_default", 24, "Remap keybindings using the 'mac-default' mapping rule.", 55, "w:\\4ed\\code\\4coder_remapping_commands.cpp", 41, 66 }, +{ PROC_LINKS(miblo_increment_basic, 0), "miblo_increment_basic", 21, "Increment an integer under the cursor by one.", 45, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 29 }, +{ PROC_LINKS(miblo_decrement_basic, 0), "miblo_decrement_basic", 21, "Decrement an integer under the cursor by one.", 45, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 44 }, +{ PROC_LINKS(miblo_increment_time_stamp, 0), "miblo_increment_time_stamp", 26, "Increment a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 231 }, +{ PROC_LINKS(miblo_decrement_time_stamp, 0), "miblo_decrement_time_stamp", 26, "Decrement a time stamp under the cursor by one second. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 237 }, +{ PROC_LINKS(miblo_increment_time_stamp_minute, 0), "miblo_increment_time_stamp_minute", 33, "Increment a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 243 }, +{ PROC_LINKS(miblo_decrement_time_stamp_minute, 0), "miblo_decrement_time_stamp_minute", 33, "Decrement a time stamp under the cursor by one minute. (format [m]m:ss or h:mm:ss", 81, "w:\\4ed\\code\\4coder_miblo_numbers.cpp", 36, 249 }, +{ PROC_LINKS(rename_parameter, 0), "rename_parameter", 16, "If the cursor is found to be on the name of a function parameter in the signature of a function definition, all occurences within the scope of the function will be replaced with a new provided string.", 200, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 188 }, +{ PROC_LINKS(write_explicit_enum_values, 0), "write_explicit_enum_values", 26, "If the cursor is found to be on the '{' of an enum definition, the values of the enum will be filled in sequentially starting from zero. Existing values are overwritten.", 170, "w:\\4ed\\code\\4coder_experiments.cpp", 34, 497 }, }; -static int32_t fcoder_metacmd_ID_write_explicit_enum_flags = 0; -static int32_t fcoder_metacmd_ID_seek_beginning_of_textual_line = 1; -static int32_t fcoder_metacmd_ID_seek_end_of_textual_line = 2; -static int32_t fcoder_metacmd_ID_seek_beginning_of_line = 3; -static int32_t fcoder_metacmd_ID_seek_end_of_line = 4; -static int32_t fcoder_metacmd_ID_goto_beginning_of_file = 5; -static int32_t fcoder_metacmd_ID_goto_end_of_file = 6; -static int32_t fcoder_metacmd_ID_change_active_panel = 7; -static int32_t fcoder_metacmd_ID_change_active_panel_backwards = 8; -static int32_t fcoder_metacmd_ID_open_panel_vsplit = 9; -static int32_t fcoder_metacmd_ID_open_panel_hsplit = 10; -static int32_t fcoder_metacmd_ID_suppress_mouse = 11; -static int32_t fcoder_metacmd_ID_allow_mouse = 12; -static int32_t fcoder_metacmd_ID_toggle_mouse = 13; -static int32_t fcoder_metacmd_ID_set_mode_to_original = 14; -static int32_t fcoder_metacmd_ID_set_mode_to_notepad_like = 15; -static int32_t fcoder_metacmd_ID_toggle_highlight_line_at_cursor = 16; -static int32_t fcoder_metacmd_ID_toggle_highlight_enclosing_scopes = 17; -static int32_t fcoder_metacmd_ID_toggle_paren_matching_helper = 18; -static int32_t fcoder_metacmd_ID_toggle_fullscreen = 19; -static int32_t fcoder_metacmd_ID_remap_interactive = 20; -static int32_t fcoder_metacmd_ID_write_character = 21; -static int32_t fcoder_metacmd_ID_write_underscore = 22; -static int32_t fcoder_metacmd_ID_delete_char = 23; -static int32_t fcoder_metacmd_ID_backspace_char = 24; -static int32_t fcoder_metacmd_ID_set_mark = 25; -static int32_t fcoder_metacmd_ID_cursor_mark_swap = 26; -static int32_t fcoder_metacmd_ID_delete_range = 27; -static int32_t fcoder_metacmd_ID_backspace_alpha_numeric_boundary = 28; -static int32_t fcoder_metacmd_ID_delete_alpha_numeric_boundary = 29; -static int32_t fcoder_metacmd_ID_snipe_backward_whitespace_or_token_boundary = 30; -static int32_t fcoder_metacmd_ID_snipe_forward_whitespace_or_token_boundary = 31; -static int32_t fcoder_metacmd_ID_center_view = 32; -static int32_t fcoder_metacmd_ID_left_adjust_view = 33; -static int32_t fcoder_metacmd_ID_click_set_cursor_and_mark = 34; -static int32_t fcoder_metacmd_ID_click_set_cursor = 35; -static int32_t fcoder_metacmd_ID_click_set_cursor_if_lbutton = 36; -static int32_t fcoder_metacmd_ID_click_set_mark = 37; -static int32_t fcoder_metacmd_ID_mouse_wheel_scroll = 38; -static int32_t fcoder_metacmd_ID_move_up = 39; -static int32_t fcoder_metacmd_ID_move_down = 40; -static int32_t fcoder_metacmd_ID_move_up_10 = 41; -static int32_t fcoder_metacmd_ID_move_down_10 = 42; -static int32_t fcoder_metacmd_ID_move_down_textual = 43; -static int32_t fcoder_metacmd_ID_page_up = 44; -static int32_t fcoder_metacmd_ID_page_down = 45; -static int32_t fcoder_metacmd_ID_move_up_to_blank_line = 46; -static int32_t fcoder_metacmd_ID_move_down_to_blank_line = 47; -static int32_t fcoder_metacmd_ID_move_up_to_blank_line_skip_whitespace = 48; -static int32_t fcoder_metacmd_ID_move_down_to_blank_line_skip_whitespace = 49; -static int32_t fcoder_metacmd_ID_move_up_to_blank_line_end = 50; -static int32_t fcoder_metacmd_ID_move_down_to_blank_line_end = 51; -static int32_t fcoder_metacmd_ID_move_left = 52; -static int32_t fcoder_metacmd_ID_move_right = 53; -static int32_t fcoder_metacmd_ID_move_right_whitespace_boundary = 54; -static int32_t fcoder_metacmd_ID_move_left_whitespace_boundary = 55; -static int32_t fcoder_metacmd_ID_move_right_token_boundary = 56; -static int32_t fcoder_metacmd_ID_move_left_token_boundary = 57; -static int32_t fcoder_metacmd_ID_move_right_whitespace_or_token_boundary = 58; -static int32_t fcoder_metacmd_ID_move_left_whitespace_or_token_boundary = 59; -static int32_t fcoder_metacmd_ID_move_right_alpha_numeric_boundary = 60; -static int32_t fcoder_metacmd_ID_move_left_alpha_numeric_boundary = 61; -static int32_t fcoder_metacmd_ID_move_right_alpha_numeric_or_camel_boundary = 62; -static int32_t fcoder_metacmd_ID_move_left_alpha_numeric_or_camel_boundary = 63; -static int32_t fcoder_metacmd_ID_select_all = 64; -static int32_t fcoder_metacmd_ID_to_uppercase = 65; -static int32_t fcoder_metacmd_ID_to_lowercase = 66; -static int32_t fcoder_metacmd_ID_clean_all_lines = 67; -static int32_t fcoder_metacmd_ID_basic_change_active_panel = 68; -static int32_t fcoder_metacmd_ID_close_panel = 69; -static int32_t fcoder_metacmd_ID_show_scrollbar = 70; -static int32_t fcoder_metacmd_ID_hide_scrollbar = 71; -static int32_t fcoder_metacmd_ID_show_filebar = 72; -static int32_t fcoder_metacmd_ID_hide_filebar = 73; -static int32_t fcoder_metacmd_ID_toggle_filebar = 74; -static int32_t fcoder_metacmd_ID_toggle_line_wrap = 75; -static int32_t fcoder_metacmd_ID_toggle_fps_meter = 76; -static int32_t fcoder_metacmd_ID_increase_line_wrap = 77; -static int32_t fcoder_metacmd_ID_decrease_line_wrap = 78; -static int32_t fcoder_metacmd_ID_increase_face_size = 79; -static int32_t fcoder_metacmd_ID_decrease_face_size = 80; -static int32_t fcoder_metacmd_ID_mouse_wheel_change_face_size = 81; -static int32_t fcoder_metacmd_ID_toggle_virtual_whitespace = 82; -static int32_t fcoder_metacmd_ID_toggle_show_whitespace = 83; -static int32_t fcoder_metacmd_ID_toggle_line_numbers = 84; -static int32_t fcoder_metacmd_ID_eol_dosify = 85; -static int32_t fcoder_metacmd_ID_eol_nixify = 86; -static int32_t fcoder_metacmd_ID_exit_4coder = 87; -static int32_t fcoder_metacmd_ID_goto_line = 88; -static int32_t fcoder_metacmd_ID_search = 89; -static int32_t fcoder_metacmd_ID_reverse_search = 90; -static int32_t fcoder_metacmd_ID_search_identifier = 91; -static int32_t fcoder_metacmd_ID_reverse_search_identifier = 92; -static int32_t fcoder_metacmd_ID_replace_in_range = 93; -static int32_t fcoder_metacmd_ID_replace_in_buffer = 94; -static int32_t fcoder_metacmd_ID_replace_in_all_buffers = 95; -static int32_t fcoder_metacmd_ID_query_replace = 96; -static int32_t fcoder_metacmd_ID_query_replace_identifier = 97; -static int32_t fcoder_metacmd_ID_query_replace_selection = 98; -static int32_t fcoder_metacmd_ID_save_all_dirty_buffers = 99; -static int32_t fcoder_metacmd_ID_delete_file_query = 100; -static int32_t fcoder_metacmd_ID_save_to_query = 101; -static int32_t fcoder_metacmd_ID_rename_file_query = 102; -static int32_t fcoder_metacmd_ID_make_directory_query = 103; -static int32_t fcoder_metacmd_ID_move_line_up = 104; -static int32_t fcoder_metacmd_ID_move_line_down = 105; -static int32_t fcoder_metacmd_ID_duplicate_line = 106; -static int32_t fcoder_metacmd_ID_delete_line = 107; -static int32_t fcoder_metacmd_ID_open_file_in_quotes = 108; -static int32_t fcoder_metacmd_ID_open_matching_file_cpp = 109; -static int32_t fcoder_metacmd_ID_view_buffer_other_panel = 110; -static int32_t fcoder_metacmd_ID_swap_buffers_between_panels = 111; -static int32_t fcoder_metacmd_ID_kill_buffer = 112; -static int32_t fcoder_metacmd_ID_save = 113; -static int32_t fcoder_metacmd_ID_reopen = 114; -static int32_t fcoder_metacmd_ID_undo = 115; -static int32_t fcoder_metacmd_ID_redo = 116; -static int32_t fcoder_metacmd_ID_undo_all_buffers = 117; -static int32_t fcoder_metacmd_ID_redo_all_buffers = 118; -static int32_t fcoder_metacmd_ID_open_in_other = 119; -static int32_t fcoder_metacmd_ID_lister__quit = 120; -static int32_t fcoder_metacmd_ID_lister__activate = 121; -static int32_t fcoder_metacmd_ID_lister__write_character = 122; -static int32_t fcoder_metacmd_ID_lister__backspace_text_field = 123; -static int32_t fcoder_metacmd_ID_lister__move_up = 124; -static int32_t fcoder_metacmd_ID_lister__move_down = 125; -static int32_t fcoder_metacmd_ID_lister__wheel_scroll = 126; -static int32_t fcoder_metacmd_ID_lister__mouse_press = 127; -static int32_t fcoder_metacmd_ID_lister__mouse_release = 128; -static int32_t fcoder_metacmd_ID_lister__repaint = 129; -static int32_t fcoder_metacmd_ID_lister__write_character__default = 130; -static int32_t fcoder_metacmd_ID_lister__backspace_text_field__default = 131; -static int32_t fcoder_metacmd_ID_lister__move_up__default = 132; -static int32_t fcoder_metacmd_ID_lister__move_down__default = 133; -static int32_t fcoder_metacmd_ID_lister__write_character__file_path = 134; -static int32_t fcoder_metacmd_ID_lister__backspace_text_field__file_path = 135; -static int32_t fcoder_metacmd_ID_lister__write_character__fixed_list = 136; -static int32_t fcoder_metacmd_ID_interactive_switch_buffer = 137; -static int32_t fcoder_metacmd_ID_interactive_kill_buffer = 138; -static int32_t fcoder_metacmd_ID_interactive_open_or_new = 139; -static int32_t fcoder_metacmd_ID_interactive_new = 140; -static int32_t fcoder_metacmd_ID_interactive_open = 141; -static int32_t fcoder_metacmd_ID_command_lister = 142; -static int32_t fcoder_metacmd_ID_auto_tab_whole_file = 143; -static int32_t fcoder_metacmd_ID_auto_tab_line_at_cursor = 144; -static int32_t fcoder_metacmd_ID_auto_tab_range = 145; -static int32_t fcoder_metacmd_ID_write_and_auto_tab = 146; -static int32_t fcoder_metacmd_ID_list_all_locations = 147; -static int32_t fcoder_metacmd_ID_list_all_substring_locations = 148; -static int32_t fcoder_metacmd_ID_list_all_locations_case_insensitive = 149; -static int32_t fcoder_metacmd_ID_list_all_substring_locations_case_insensitive = 150; -static int32_t fcoder_metacmd_ID_list_all_locations_of_identifier = 151; -static int32_t fcoder_metacmd_ID_list_all_locations_of_identifier_case_insensitive = 152; -static int32_t fcoder_metacmd_ID_list_all_locations_of_selection = 153; -static int32_t fcoder_metacmd_ID_list_all_locations_of_selection_case_insensitive = 154; -static int32_t fcoder_metacmd_ID_list_all_locations_of_type_definition = 155; -static int32_t fcoder_metacmd_ID_list_all_locations_of_type_definition_of_identifier = 156; -static int32_t fcoder_metacmd_ID_word_complete = 157; -static int32_t fcoder_metacmd_ID_goto_jump_at_cursor = 158; -static int32_t fcoder_metacmd_ID_goto_jump_at_cursor_same_panel = 159; -static int32_t fcoder_metacmd_ID_goto_next_jump = 160; -static int32_t fcoder_metacmd_ID_goto_prev_jump = 161; -static int32_t fcoder_metacmd_ID_goto_next_jump_no_skips = 162; -static int32_t fcoder_metacmd_ID_goto_prev_jump_no_skips = 163; -static int32_t fcoder_metacmd_ID_goto_first_jump = 164; -static int32_t fcoder_metacmd_ID_goto_first_jump_same_panel_sticky = 165; -static int32_t fcoder_metacmd_ID_newline_or_goto_position = 166; -static int32_t fcoder_metacmd_ID_newline_or_goto_position_same_panel = 167; -static int32_t fcoder_metacmd_ID_view_jump_list_with_lister = 168; -static int32_t fcoder_metacmd_ID_log_graph__escape = 169; -static int32_t fcoder_metacmd_ID_log_graph__scroll_wheel = 170; -static int32_t fcoder_metacmd_ID_log_graph__page_up = 171; -static int32_t fcoder_metacmd_ID_log_graph__page_down = 172; -static int32_t fcoder_metacmd_ID_log_graph__click_select_event = 173; -static int32_t fcoder_metacmd_ID_log_graph__click_jump_to_event_source = 174; -static int32_t fcoder_metacmd_ID_show_the_log_graph = 175; -static int32_t fcoder_metacmd_ID_copy = 176; -static int32_t fcoder_metacmd_ID_cut = 177; -static int32_t fcoder_metacmd_ID_paste = 178; -static int32_t fcoder_metacmd_ID_paste_next = 179; -static int32_t fcoder_metacmd_ID_paste_and_indent = 180; -static int32_t fcoder_metacmd_ID_paste_next_and_indent = 181; -static int32_t fcoder_metacmd_ID_execute_previous_cli = 182; -static int32_t fcoder_metacmd_ID_execute_any_cli = 183; -static int32_t fcoder_metacmd_ID_build_search = 184; -static int32_t fcoder_metacmd_ID_build_in_build_panel = 185; -static int32_t fcoder_metacmd_ID_close_build_panel = 186; -static int32_t fcoder_metacmd_ID_change_to_build_panel = 187; -static int32_t fcoder_metacmd_ID_close_all_code = 188; -static int32_t fcoder_metacmd_ID_open_all_code = 189; -static int32_t fcoder_metacmd_ID_open_all_code_recursive = 190; -static int32_t fcoder_metacmd_ID_load_project = 191; -static int32_t fcoder_metacmd_ID_project_fkey_command = 192; -static int32_t fcoder_metacmd_ID_project_go_to_root_directory = 193; -static int32_t fcoder_metacmd_ID_setup_new_project = 194; -static int32_t fcoder_metacmd_ID_setup_build_bat = 195; -static int32_t fcoder_metacmd_ID_setup_build_sh = 196; -static int32_t fcoder_metacmd_ID_setup_build_bat_and_sh = 197; -static int32_t fcoder_metacmd_ID_project_command_lister = 198; -static int32_t fcoder_metacmd_ID_list_all_functions_current_buffer = 199; -static int32_t fcoder_metacmd_ID_list_all_functions_current_buffer_lister = 200; -static int32_t fcoder_metacmd_ID_list_all_functions_all_buffers = 201; -static int32_t fcoder_metacmd_ID_list_all_functions_all_buffers_lister = 202; -static int32_t fcoder_metacmd_ID_select_surrounding_scope = 203; -static int32_t fcoder_metacmd_ID_select_next_scope_absolute = 204; -static int32_t fcoder_metacmd_ID_select_prev_scope_absolute = 205; -static int32_t fcoder_metacmd_ID_place_in_scope = 206; -static int32_t fcoder_metacmd_ID_delete_current_scope = 207; -static int32_t fcoder_metacmd_ID_scope_absorb_down = 208; -static int32_t fcoder_metacmd_ID_open_long_braces = 209; -static int32_t fcoder_metacmd_ID_open_long_braces_semicolon = 210; -static int32_t fcoder_metacmd_ID_open_long_braces_break = 211; -static int32_t fcoder_metacmd_ID_if0_off = 212; -static int32_t fcoder_metacmd_ID_write_todo = 213; -static int32_t fcoder_metacmd_ID_write_hack = 214; -static int32_t fcoder_metacmd_ID_write_note = 215; -static int32_t fcoder_metacmd_ID_write_block = 216; -static int32_t fcoder_metacmd_ID_write_zero_struct = 217; -static int32_t fcoder_metacmd_ID_comment_line = 218; -static int32_t fcoder_metacmd_ID_uncomment_line = 219; -static int32_t fcoder_metacmd_ID_comment_line_toggle = 220; -static int32_t fcoder_metacmd_ID_snippet_lister = 221; -static int32_t fcoder_metacmd_ID_set_bindings_choose = 222; -static int32_t fcoder_metacmd_ID_set_bindings_default = 223; -static int32_t fcoder_metacmd_ID_set_bindings_mac_default = 224; -static int32_t fcoder_metacmd_ID_miblo_increment_basic = 225; -static int32_t fcoder_metacmd_ID_miblo_decrement_basic = 226; -static int32_t fcoder_metacmd_ID_miblo_increment_time_stamp = 227; -static int32_t fcoder_metacmd_ID_miblo_decrement_time_stamp = 228; -static int32_t fcoder_metacmd_ID_miblo_increment_time_stamp_minute = 229; -static int32_t fcoder_metacmd_ID_miblo_decrement_time_stamp_minute = 230; -static int32_t fcoder_metacmd_ID_rename_parameter = 231; -static int32_t fcoder_metacmd_ID_write_explicit_enum_values = 232; +static i32 fcoder_metacmd_ID_write_explicit_enum_flags = 0; +static i32 fcoder_metacmd_ID_seek_beginning_of_textual_line = 1; +static i32 fcoder_metacmd_ID_seek_end_of_textual_line = 2; +static i32 fcoder_metacmd_ID_seek_beginning_of_line = 3; +static i32 fcoder_metacmd_ID_seek_end_of_line = 4; +static i32 fcoder_metacmd_ID_goto_beginning_of_file = 5; +static i32 fcoder_metacmd_ID_goto_end_of_file = 6; +static i32 fcoder_metacmd_ID_change_active_panel = 7; +static i32 fcoder_metacmd_ID_change_active_panel_backwards = 8; +static i32 fcoder_metacmd_ID_open_panel_vsplit = 9; +static i32 fcoder_metacmd_ID_open_panel_hsplit = 10; +static i32 fcoder_metacmd_ID_suppress_mouse = 11; +static i32 fcoder_metacmd_ID_allow_mouse = 12; +static i32 fcoder_metacmd_ID_toggle_mouse = 13; +static i32 fcoder_metacmd_ID_set_mode_to_original = 14; +static i32 fcoder_metacmd_ID_set_mode_to_notepad_like = 15; +static i32 fcoder_metacmd_ID_toggle_highlight_line_at_cursor = 16; +static i32 fcoder_metacmd_ID_toggle_highlight_enclosing_scopes = 17; +static i32 fcoder_metacmd_ID_toggle_paren_matching_helper = 18; +static i32 fcoder_metacmd_ID_toggle_fullscreen = 19; +static i32 fcoder_metacmd_ID_remap_interactive = 20; +static i32 fcoder_metacmd_ID_write_character = 21; +static i32 fcoder_metacmd_ID_write_underscore = 22; +static i32 fcoder_metacmd_ID_delete_char = 23; +static i32 fcoder_metacmd_ID_backspace_char = 24; +static i32 fcoder_metacmd_ID_set_mark = 25; +static i32 fcoder_metacmd_ID_cursor_mark_swap = 26; +static i32 fcoder_metacmd_ID_delete_range = 27; +static i32 fcoder_metacmd_ID_backspace_alpha_numeric_boundary = 28; +static i32 fcoder_metacmd_ID_delete_alpha_numeric_boundary = 29; +static i32 fcoder_metacmd_ID_snipe_backward_whitespace_or_token_boundary = 30; +static i32 fcoder_metacmd_ID_snipe_forward_whitespace_or_token_boundary = 31; +static i32 fcoder_metacmd_ID_center_view = 32; +static i32 fcoder_metacmd_ID_left_adjust_view = 33; +static i32 fcoder_metacmd_ID_click_set_cursor_and_mark = 34; +static i32 fcoder_metacmd_ID_click_set_cursor = 35; +static i32 fcoder_metacmd_ID_click_set_cursor_if_lbutton = 36; +static i32 fcoder_metacmd_ID_click_set_mark = 37; +static i32 fcoder_metacmd_ID_mouse_wheel_scroll = 38; +static i32 fcoder_metacmd_ID_move_up = 39; +static i32 fcoder_metacmd_ID_move_down = 40; +static i32 fcoder_metacmd_ID_move_up_10 = 41; +static i32 fcoder_metacmd_ID_move_down_10 = 42; +static i32 fcoder_metacmd_ID_move_down_textual = 43; +static i32 fcoder_metacmd_ID_page_up = 44; +static i32 fcoder_metacmd_ID_page_down = 45; +static i32 fcoder_metacmd_ID_move_up_to_blank_line = 46; +static i32 fcoder_metacmd_ID_move_down_to_blank_line = 47; +static i32 fcoder_metacmd_ID_move_up_to_blank_line_skip_whitespace = 48; +static i32 fcoder_metacmd_ID_move_down_to_blank_line_skip_whitespace = 49; +static i32 fcoder_metacmd_ID_move_up_to_blank_line_end = 50; +static i32 fcoder_metacmd_ID_move_down_to_blank_line_end = 51; +static i32 fcoder_metacmd_ID_move_left = 52; +static i32 fcoder_metacmd_ID_move_right = 53; +static i32 fcoder_metacmd_ID_move_right_whitespace_boundary = 54; +static i32 fcoder_metacmd_ID_move_left_whitespace_boundary = 55; +static i32 fcoder_metacmd_ID_move_right_token_boundary = 56; +static i32 fcoder_metacmd_ID_move_left_token_boundary = 57; +static i32 fcoder_metacmd_ID_move_right_whitespace_or_token_boundary = 58; +static i32 fcoder_metacmd_ID_move_left_whitespace_or_token_boundary = 59; +static i32 fcoder_metacmd_ID_move_right_alpha_numeric_boundary = 60; +static i32 fcoder_metacmd_ID_move_left_alpha_numeric_boundary = 61; +static i32 fcoder_metacmd_ID_move_right_alpha_numeric_or_camel_boundary = 62; +static i32 fcoder_metacmd_ID_move_left_alpha_numeric_or_camel_boundary = 63; +static i32 fcoder_metacmd_ID_select_all = 64; +static i32 fcoder_metacmd_ID_to_uppercase = 65; +static i32 fcoder_metacmd_ID_to_lowercase = 66; +static i32 fcoder_metacmd_ID_clean_all_lines = 67; +static i32 fcoder_metacmd_ID_basic_change_active_panel = 68; +static i32 fcoder_metacmd_ID_close_panel = 69; +static i32 fcoder_metacmd_ID_show_scrollbar = 70; +static i32 fcoder_metacmd_ID_hide_scrollbar = 71; +static i32 fcoder_metacmd_ID_show_filebar = 72; +static i32 fcoder_metacmd_ID_hide_filebar = 73; +static i32 fcoder_metacmd_ID_toggle_filebar = 74; +static i32 fcoder_metacmd_ID_toggle_line_wrap = 75; +static i32 fcoder_metacmd_ID_toggle_fps_meter = 76; +static i32 fcoder_metacmd_ID_increase_line_wrap = 77; +static i32 fcoder_metacmd_ID_decrease_line_wrap = 78; +static i32 fcoder_metacmd_ID_increase_face_size = 79; +static i32 fcoder_metacmd_ID_decrease_face_size = 80; +static i32 fcoder_metacmd_ID_mouse_wheel_change_face_size = 81; +static i32 fcoder_metacmd_ID_toggle_virtual_whitespace = 82; +static i32 fcoder_metacmd_ID_toggle_show_whitespace = 83; +static i32 fcoder_metacmd_ID_toggle_line_numbers = 84; +static i32 fcoder_metacmd_ID_eol_dosify = 85; +static i32 fcoder_metacmd_ID_eol_nixify = 86; +static i32 fcoder_metacmd_ID_exit_4coder = 87; +static i32 fcoder_metacmd_ID_goto_line = 88; +static i32 fcoder_metacmd_ID_search = 89; +static i32 fcoder_metacmd_ID_reverse_search = 90; +static i32 fcoder_metacmd_ID_search_identifier = 91; +static i32 fcoder_metacmd_ID_reverse_search_identifier = 92; +static i32 fcoder_metacmd_ID_replace_in_range = 93; +static i32 fcoder_metacmd_ID_replace_in_buffer = 94; +static i32 fcoder_metacmd_ID_replace_in_all_buffers = 95; +static i32 fcoder_metacmd_ID_query_replace = 96; +static i32 fcoder_metacmd_ID_query_replace_identifier = 97; +static i32 fcoder_metacmd_ID_query_replace_selection = 98; +static i32 fcoder_metacmd_ID_save_all_dirty_buffers = 99; +static i32 fcoder_metacmd_ID_delete_file_query = 100; +static i32 fcoder_metacmd_ID_save_to_query = 101; +static i32 fcoder_metacmd_ID_rename_file_query = 102; +static i32 fcoder_metacmd_ID_make_directory_query = 103; +static i32 fcoder_metacmd_ID_move_line_up = 104; +static i32 fcoder_metacmd_ID_move_line_down = 105; +static i32 fcoder_metacmd_ID_duplicate_line = 106; +static i32 fcoder_metacmd_ID_delete_line = 107; +static i32 fcoder_metacmd_ID_open_file_in_quotes = 108; +static i32 fcoder_metacmd_ID_open_matching_file_cpp = 109; +static i32 fcoder_metacmd_ID_view_buffer_other_panel = 110; +static i32 fcoder_metacmd_ID_swap_buffers_between_panels = 111; +static i32 fcoder_metacmd_ID_kill_buffer = 112; +static i32 fcoder_metacmd_ID_save = 113; +static i32 fcoder_metacmd_ID_reopen = 114; +static i32 fcoder_metacmd_ID_undo = 115; +static i32 fcoder_metacmd_ID_redo = 116; +static i32 fcoder_metacmd_ID_undo_all_buffers = 117; +static i32 fcoder_metacmd_ID_redo_all_buffers = 118; +static i32 fcoder_metacmd_ID_open_in_other = 119; +static i32 fcoder_metacmd_ID_lister__quit = 120; +static i32 fcoder_metacmd_ID_lister__activate = 121; +static i32 fcoder_metacmd_ID_lister__write_character = 122; +static i32 fcoder_metacmd_ID_lister__backspace_text_field = 123; +static i32 fcoder_metacmd_ID_lister__move_up = 124; +static i32 fcoder_metacmd_ID_lister__move_down = 125; +static i32 fcoder_metacmd_ID_lister__wheel_scroll = 126; +static i32 fcoder_metacmd_ID_lister__mouse_press = 127; +static i32 fcoder_metacmd_ID_lister__mouse_release = 128; +static i32 fcoder_metacmd_ID_lister__repaint = 129; +static i32 fcoder_metacmd_ID_lister__write_character__default = 130; +static i32 fcoder_metacmd_ID_lister__backspace_text_field__default = 131; +static i32 fcoder_metacmd_ID_lister__move_up__default = 132; +static i32 fcoder_metacmd_ID_lister__move_down__default = 133; +static i32 fcoder_metacmd_ID_lister__write_character__file_path = 134; +static i32 fcoder_metacmd_ID_lister__backspace_text_field__file_path = 135; +static i32 fcoder_metacmd_ID_lister__write_character__fixed_list = 136; +static i32 fcoder_metacmd_ID_interactive_switch_buffer = 137; +static i32 fcoder_metacmd_ID_interactive_kill_buffer = 138; +static i32 fcoder_metacmd_ID_interactive_open_or_new = 139; +static i32 fcoder_metacmd_ID_interactive_new = 140; +static i32 fcoder_metacmd_ID_interactive_open = 141; +static i32 fcoder_metacmd_ID_command_lister = 142; +static i32 fcoder_metacmd_ID_auto_tab_whole_file = 143; +static i32 fcoder_metacmd_ID_auto_tab_line_at_cursor = 144; +static i32 fcoder_metacmd_ID_auto_tab_range = 145; +static i32 fcoder_metacmd_ID_write_and_auto_tab = 146; +static i32 fcoder_metacmd_ID_list_all_locations = 147; +static i32 fcoder_metacmd_ID_list_all_substring_locations = 148; +static i32 fcoder_metacmd_ID_list_all_locations_case_insensitive = 149; +static i32 fcoder_metacmd_ID_list_all_substring_locations_case_insensitive = 150; +static i32 fcoder_metacmd_ID_list_all_locations_of_identifier = 151; +static i32 fcoder_metacmd_ID_list_all_locations_of_identifier_case_insensitive = 152; +static i32 fcoder_metacmd_ID_list_all_locations_of_selection = 153; +static i32 fcoder_metacmd_ID_list_all_locations_of_selection_case_insensitive = 154; +static i32 fcoder_metacmd_ID_list_all_locations_of_type_definition = 155; +static i32 fcoder_metacmd_ID_list_all_locations_of_type_definition_of_identifier = 156; +static i32 fcoder_metacmd_ID_word_complete = 157; +static i32 fcoder_metacmd_ID_goto_jump_at_cursor = 158; +static i32 fcoder_metacmd_ID_goto_jump_at_cursor_same_panel = 159; +static i32 fcoder_metacmd_ID_goto_next_jump = 160; +static i32 fcoder_metacmd_ID_goto_prev_jump = 161; +static i32 fcoder_metacmd_ID_goto_next_jump_no_skips = 162; +static i32 fcoder_metacmd_ID_goto_prev_jump_no_skips = 163; +static i32 fcoder_metacmd_ID_goto_first_jump = 164; +static i32 fcoder_metacmd_ID_goto_first_jump_same_panel_sticky = 165; +static i32 fcoder_metacmd_ID_newline_or_goto_position = 166; +static i32 fcoder_metacmd_ID_newline_or_goto_position_same_panel = 167; +static i32 fcoder_metacmd_ID_view_jump_list_with_lister = 168; +static i32 fcoder_metacmd_ID_log_graph__escape = 169; +static i32 fcoder_metacmd_ID_log_graph__scroll_wheel = 170; +static i32 fcoder_metacmd_ID_log_graph__page_up = 171; +static i32 fcoder_metacmd_ID_log_graph__page_down = 172; +static i32 fcoder_metacmd_ID_log_graph__click_select_event = 173; +static i32 fcoder_metacmd_ID_log_graph__click_jump_to_event_source = 174; +static i32 fcoder_metacmd_ID_show_the_log_graph = 175; +static i32 fcoder_metacmd_ID_copy = 176; +static i32 fcoder_metacmd_ID_cut = 177; +static i32 fcoder_metacmd_ID_paste = 178; +static i32 fcoder_metacmd_ID_paste_next = 179; +static i32 fcoder_metacmd_ID_paste_and_indent = 180; +static i32 fcoder_metacmd_ID_paste_next_and_indent = 181; +static i32 fcoder_metacmd_ID_execute_previous_cli = 182; +static i32 fcoder_metacmd_ID_execute_any_cli = 183; +static i32 fcoder_metacmd_ID_build_search = 184; +static i32 fcoder_metacmd_ID_build_in_build_panel = 185; +static i32 fcoder_metacmd_ID_close_build_panel = 186; +static i32 fcoder_metacmd_ID_change_to_build_panel = 187; +static i32 fcoder_metacmd_ID_close_all_code = 188; +static i32 fcoder_metacmd_ID_open_all_code = 189; +static i32 fcoder_metacmd_ID_open_all_code_recursive = 190; +static i32 fcoder_metacmd_ID_load_project = 191; +static i32 fcoder_metacmd_ID_project_fkey_command = 192; +static i32 fcoder_metacmd_ID_project_go_to_root_directory = 193; +static i32 fcoder_metacmd_ID_setup_new_project = 194; +static i32 fcoder_metacmd_ID_setup_build_bat = 195; +static i32 fcoder_metacmd_ID_setup_build_sh = 196; +static i32 fcoder_metacmd_ID_setup_build_bat_and_sh = 197; +static i32 fcoder_metacmd_ID_project_command_lister = 198; +static i32 fcoder_metacmd_ID_list_all_functions_current_buffer = 199; +static i32 fcoder_metacmd_ID_list_all_functions_current_buffer_lister = 200; +static i32 fcoder_metacmd_ID_list_all_functions_all_buffers = 201; +static i32 fcoder_metacmd_ID_list_all_functions_all_buffers_lister = 202; +static i32 fcoder_metacmd_ID_select_surrounding_scope = 203; +static i32 fcoder_metacmd_ID_select_next_scope_absolute = 204; +static i32 fcoder_metacmd_ID_select_prev_scope_absolute = 205; +static i32 fcoder_metacmd_ID_place_in_scope = 206; +static i32 fcoder_metacmd_ID_delete_current_scope = 207; +static i32 fcoder_metacmd_ID_open_long_braces = 208; +static i32 fcoder_metacmd_ID_open_long_braces_semicolon = 209; +static i32 fcoder_metacmd_ID_open_long_braces_break = 210; +static i32 fcoder_metacmd_ID_if0_off = 211; +static i32 fcoder_metacmd_ID_write_todo = 212; +static i32 fcoder_metacmd_ID_write_hack = 213; +static i32 fcoder_metacmd_ID_write_note = 214; +static i32 fcoder_metacmd_ID_write_block = 215; +static i32 fcoder_metacmd_ID_write_zero_struct = 216; +static i32 fcoder_metacmd_ID_comment_line = 217; +static i32 fcoder_metacmd_ID_uncomment_line = 218; +static i32 fcoder_metacmd_ID_comment_line_toggle = 219; +static i32 fcoder_metacmd_ID_snippet_lister = 220; +static i32 fcoder_metacmd_ID_set_bindings_choose = 221; +static i32 fcoder_metacmd_ID_set_bindings_default = 222; +static i32 fcoder_metacmd_ID_set_bindings_mac_default = 223; +static i32 fcoder_metacmd_ID_miblo_increment_basic = 224; +static i32 fcoder_metacmd_ID_miblo_decrement_basic = 225; +static i32 fcoder_metacmd_ID_miblo_increment_time_stamp = 226; +static i32 fcoder_metacmd_ID_miblo_decrement_time_stamp = 227; +static i32 fcoder_metacmd_ID_miblo_increment_time_stamp_minute = 228; +static i32 fcoder_metacmd_ID_miblo_decrement_time_stamp_minute = 229; +static i32 fcoder_metacmd_ID_rename_parameter = 230; +static i32 fcoder_metacmd_ID_write_explicit_enum_values = 231; #endif diff --git a/4coder_generated/remapping.h b/4coder_generated/remapping.h index 497e511c..921f9297 100644 --- a/4coder_generated/remapping.h +++ b/4coder_generated/remapping.h @@ -1,373 +1,371 @@ #if defined(CUSTOM_COMMAND_SIG) void fill_keys_default(Bind_Helper *context){ -begin_map(context, mapid_global); -bind(context, ',', MDFR_CTRL, change_active_panel); -bind(context, '<', MDFR_CTRL, change_active_panel_backwards); -bind(context, 'n', MDFR_CTRL, interactive_new); -bind(context, 'o', MDFR_CTRL, interactive_open_or_new); -bind(context, 'o', MDFR_ALT, open_in_other); -bind(context, 'k', MDFR_CTRL, interactive_kill_buffer); -bind(context, 'i', MDFR_CTRL, interactive_switch_buffer); -bind(context, 'h', MDFR_CTRL, project_go_to_root_directory); -bind(context, 'S', MDFR_CTRL, save_all_dirty_buffers); -bind(context, key_scroll_lock, MDFR_NONE, toggle_filebar); -bind(context, key_pause, MDFR_NONE, toggle_filebar); -bind(context, key_caps, MDFR_NONE, toggle_filebar); -bind(context, '.', MDFR_ALT, change_to_build_panel); -bind(context, ',', MDFR_ALT, close_build_panel); -bind(context, 'n', MDFR_ALT, goto_next_jump); -bind(context, 'N', MDFR_ALT, goto_prev_jump); -bind(context, 'M', MDFR_ALT, goto_first_jump); -bind(context, 'm', MDFR_ALT, build_in_build_panel); -bind(context, 'b', MDFR_ALT, toggle_filebar); -bind(context, 'z', MDFR_ALT, execute_any_cli); -bind(context, 'Z', MDFR_ALT, execute_previous_cli); -bind(context, 'x', MDFR_ALT, command_lister); -bind(context, 'X', MDFR_ALT, project_command_lister); -bind(context, 'I', MDFR_CTRL, list_all_functions_all_buffers_lister); -bind(context, 'E', MDFR_ALT, exit_4coder); -bind(context, key_f1, MDFR_NONE, project_fkey_command); -bind(context, key_f2, MDFR_NONE, project_fkey_command); -bind(context, key_f3, MDFR_NONE, project_fkey_command); -bind(context, key_f4, MDFR_NONE, project_fkey_command); -bind(context, key_f5, MDFR_NONE, project_fkey_command); -bind(context, key_f6, MDFR_NONE, project_fkey_command); -bind(context, key_f7, MDFR_NONE, project_fkey_command); -bind(context, key_f8, MDFR_NONE, project_fkey_command); -bind(context, key_f9, MDFR_NONE, project_fkey_command); -bind(context, key_f10, MDFR_NONE, project_fkey_command); -bind(context, key_f11, MDFR_NONE, project_fkey_command); -bind(context, key_f12, MDFR_NONE, project_fkey_command); -bind(context, key_f13, MDFR_NONE, project_fkey_command); -bind(context, key_f14, MDFR_NONE, project_fkey_command); -bind(context, key_f15, MDFR_NONE, project_fkey_command); -bind(context, key_f16, MDFR_NONE, project_fkey_command); -bind(context, key_mouse_wheel, MDFR_NONE, mouse_wheel_scroll); -bind(context, key_mouse_wheel, MDFR_CTRL, mouse_wheel_change_face_size); -end_map(context); -begin_map(context, mapid_file); -bind_vanilla_keys(context, write_character); -bind(context, key_mouse_left, MDFR_NONE, click_set_cursor_and_mark); -bind(context, key_click_activate_view, MDFR_NONE, click_set_cursor_and_mark); -bind(context, key_mouse_left_release, MDFR_NONE, click_set_cursor); -bind(context, key_mouse_move, MDFR_NONE, click_set_cursor_if_lbutton); -bind(context, key_del, MDFR_NONE, delete_char); -bind(context, key_del, MDFR_SHIFT, delete_char); -bind(context, key_back, MDFR_NONE, backspace_char); -bind(context, key_back, MDFR_SHIFT, backspace_char); -bind(context, key_up, MDFR_NONE, move_up); -bind(context, key_down, MDFR_NONE, move_down); -bind(context, key_left, MDFR_NONE, move_left); -bind(context, key_right, MDFR_NONE, move_right); -bind(context, key_up, MDFR_SHIFT, move_up); -bind(context, key_down, MDFR_SHIFT, move_down); -bind(context, key_left, MDFR_SHIFT, move_left); -bind(context, key_right, MDFR_SHIFT, move_right); -bind(context, key_end, MDFR_NONE, seek_end_of_line); -bind(context, key_home, MDFR_NONE, seek_beginning_of_line); -bind(context, key_page_up, MDFR_CTRL, goto_beginning_of_file); -bind(context, key_page_down, MDFR_CTRL, goto_end_of_file); -bind(context, key_page_up, MDFR_NONE, page_up); -bind(context, key_page_down, MDFR_NONE, page_down); -bind(context, key_end, MDFR_SHIFT, seek_end_of_line); -bind(context, key_home, MDFR_SHIFT, seek_beginning_of_line); -bind(context, key_page_up, MDFR_CTRL|MDFR_SHIFT, goto_beginning_of_file); -bind(context, key_page_down, MDFR_CTRL|MDFR_SHIFT, goto_end_of_file); -bind(context, key_page_up, MDFR_SHIFT, page_up); -bind(context, key_page_down, MDFR_SHIFT, page_down); -bind(context, key_up, MDFR_CTRL, move_up_to_blank_line_skip_whitespace); -bind(context, key_down, MDFR_CTRL, move_down_to_blank_line_end); -bind(context, key_left, MDFR_CTRL, move_left_whitespace_boundary); -bind(context, key_right, MDFR_CTRL, move_right_whitespace_boundary); -bind(context, key_up, MDFR_CTRL|MDFR_SHIFT, move_up_to_blank_line_skip_whitespace); -bind(context, key_down, MDFR_CTRL|MDFR_SHIFT, move_down_to_blank_line_end); -bind(context, key_left, MDFR_CTRL|MDFR_SHIFT, move_left_whitespace_boundary); -bind(context, key_right, MDFR_CTRL|MDFR_SHIFT, move_right_whitespace_boundary); -bind(context, key_up, MDFR_ALT, move_line_up); -bind(context, key_down, MDFR_ALT, move_line_down); -bind(context, key_back, MDFR_CTRL, backspace_alpha_numeric_boundary); -bind(context, key_del, MDFR_CTRL, delete_alpha_numeric_boundary); -bind(context, key_back, MDFR_ALT, snipe_backward_whitespace_or_token_boundary); -bind(context, key_del, MDFR_ALT, snipe_forward_whitespace_or_token_boundary); -bind(context, ' ', MDFR_CTRL, set_mark); -bind(context, 'a', MDFR_CTRL, replace_in_range); -bind(context, 'c', MDFR_CTRL, copy); -bind(context, 'd', MDFR_CTRL, delete_range); -bind(context, 'D', MDFR_CTRL, delete_line); -bind(context, 'e', MDFR_CTRL, center_view); -bind(context, 'E', MDFR_CTRL, left_adjust_view); -bind(context, 'f', MDFR_CTRL, search); -bind(context, 'F', MDFR_CTRL, list_all_locations); -bind(context, 'F', MDFR_ALT, list_all_substring_locations_case_insensitive); -bind(context, 'g', MDFR_CTRL, goto_line); -bind(context, 'G', MDFR_CTRL, list_all_locations_of_selection); -bind(context, 'j', MDFR_CTRL, snippet_lister); -bind(context, 'K', MDFR_CTRL, kill_buffer); -bind(context, 'L', MDFR_CTRL, duplicate_line); -bind(context, 'm', MDFR_CTRL, cursor_mark_swap); -bind(context, 'O', MDFR_CTRL, reopen); -bind(context, 'q', MDFR_CTRL, query_replace); -bind(context, 'Q', MDFR_CTRL, query_replace_identifier); -bind(context, 'q', MDFR_ALT, query_replace_selection); -bind(context, 'r', MDFR_CTRL, reverse_search); -bind(context, 's', MDFR_CTRL, save); -bind(context, 't', MDFR_CTRL, search_identifier); -bind(context, 'T', MDFR_CTRL, list_all_locations_of_identifier); -bind(context, 'v', MDFR_CTRL, paste_and_indent); -bind(context, 'V', MDFR_CTRL, paste_next_and_indent); -bind(context, 'x', MDFR_CTRL, cut); -bind(context, 'y', MDFR_CTRL, redo); -bind(context, 'z', MDFR_CTRL, undo); -bind(context, '1', MDFR_CTRL, view_buffer_other_panel); -bind(context, '2', MDFR_CTRL, swap_buffers_between_panels); -bind(context, '\n', MDFR_NONE, newline_or_goto_position); -bind(context, '\n', MDFR_SHIFT, newline_or_goto_position_same_panel); -bind(context, '>', MDFR_CTRL, view_jump_list_with_lister); -bind(context, ' ', MDFR_SHIFT, write_character); -end_map(context); -begin_map(context, default_code_map); -inherit_map(context, mapid_file); -bind(context, key_left, MDFR_CTRL, move_left_alpha_numeric_or_camel_boundary); -bind(context, key_right, MDFR_CTRL, move_right_alpha_numeric_or_camel_boundary); -bind(context, key_left, MDFR_ALT, move_left_alpha_numeric_boundary); -bind(context, key_right, MDFR_ALT, move_right_alpha_numeric_boundary); -bind(context, '\n', MDFR_NONE, write_and_auto_tab); -bind(context, '\n', MDFR_SHIFT, write_and_auto_tab); -bind(context, '}', MDFR_NONE, write_and_auto_tab); -bind(context, ')', MDFR_NONE, write_and_auto_tab); -bind(context, ']', MDFR_NONE, write_and_auto_tab); -bind(context, ';', MDFR_NONE, write_and_auto_tab); -bind(context, '#', MDFR_NONE, write_and_auto_tab); -bind(context, ';', MDFR_CTRL, comment_line_toggle); -bind(context, '\t', MDFR_NONE, word_complete); -bind(context, '\t', MDFR_CTRL, auto_tab_range); -bind(context, '\t', MDFR_SHIFT, auto_tab_line_at_cursor); -bind(context, 'r', MDFR_ALT, write_block); -bind(context, 't', MDFR_ALT, write_todo); -bind(context, 'y', MDFR_ALT, write_note); -bind(context, 'D', MDFR_ALT, list_all_locations_of_type_definition); -bind(context, 'T', MDFR_ALT, list_all_locations_of_type_definition_of_identifier); -bind(context, '[', MDFR_CTRL, open_long_braces); -bind(context, '{', MDFR_CTRL, open_long_braces_semicolon); -bind(context, '}', MDFR_CTRL, open_long_braces_break); -bind(context, '[', MDFR_ALT, select_surrounding_scope); -bind(context, ']', MDFR_ALT, select_prev_scope_absolute); -bind(context, '\'', MDFR_ALT, select_next_scope_absolute); -bind(context, '/', MDFR_ALT, place_in_scope); -bind(context, '-', MDFR_ALT, delete_current_scope); -bind(context, 'j', MDFR_ALT, scope_absorb_down); -bind(context, 'i', MDFR_ALT, if0_off); -bind(context, '1', MDFR_ALT, open_file_in_quotes); -bind(context, '2', MDFR_ALT, open_matching_file_cpp); -bind(context, '0', MDFR_CTRL, write_zero_struct); -end_map(context); -begin_map(context, default_lister_ui_map); -bind_vanilla_keys(context, lister__write_character); -bind(context, key_esc, MDFR_NONE, lister__quit); -bind(context, '\n', MDFR_NONE, lister__activate); -bind(context, '\t', MDFR_NONE, lister__activate); -bind(context, key_back, MDFR_NONE, lister__backspace_text_field); -bind(context, key_back, MDFR_CTRL, lister__backspace_text_field); -bind(context, key_back, MDFR_ALT, lister__backspace_text_field); -bind(context, key_back, MDFR_CMND, lister__backspace_text_field); -bind(context, key_back, MDFR_CTRL|MDFR_ALT, lister__backspace_text_field); -bind(context, key_back, MDFR_ALT|MDFR_CMND, lister__backspace_text_field); -bind(context, key_back, MDFR_CTRL|MDFR_CMND, lister__backspace_text_field); -bind(context, key_back, MDFR_CTRL|MDFR_ALT|MDFR_CMND, lister__backspace_text_field); -bind(context, key_up, MDFR_NONE, lister__move_up); -bind(context, 'k', MDFR_ALT, lister__move_up); -bind(context, key_page_up, MDFR_NONE, lister__move_up); -bind(context, key_down, MDFR_NONE, lister__move_down); -bind(context, 'j', MDFR_ALT, lister__move_down); -bind(context, key_page_down, MDFR_NONE, lister__move_down); -bind(context, key_mouse_wheel, MDFR_NONE, lister__wheel_scroll); -bind(context, key_mouse_left, MDFR_NONE, lister__mouse_press); -bind(context, key_mouse_left_release, MDFR_NONE, lister__mouse_release); -bind(context, key_mouse_move, MDFR_NONE, lister__repaint); -bind(context, key_animate, MDFR_NONE, lister__repaint); -end_map(context); + begin_map(context, mapid_global); + bind(context, ',', MDFR_CTRL, change_active_panel); + bind(context, '<', MDFR_CTRL, change_active_panel_backwards); + bind(context, 'n', MDFR_CTRL, interactive_new); + bind(context, 'o', MDFR_CTRL, interactive_open_or_new); + bind(context, 'o', MDFR_ALT, open_in_other); + bind(context, 'k', MDFR_CTRL, interactive_kill_buffer); + bind(context, 'i', MDFR_CTRL, interactive_switch_buffer); + bind(context, 'h', MDFR_CTRL, project_go_to_root_directory); + bind(context, 'S', MDFR_CTRL, save_all_dirty_buffers); + bind(context, key_scroll_lock, MDFR_NONE, toggle_filebar); + bind(context, key_pause, MDFR_NONE, toggle_filebar); + bind(context, key_caps, MDFR_NONE, toggle_filebar); + bind(context, '.', MDFR_ALT, change_to_build_panel); + bind(context, ',', MDFR_ALT, close_build_panel); + bind(context, 'n', MDFR_ALT, goto_next_jump); + bind(context, 'N', MDFR_ALT, goto_prev_jump); + bind(context, 'M', MDFR_ALT, goto_first_jump); + bind(context, 'm', MDFR_ALT, build_in_build_panel); + bind(context, 'b', MDFR_ALT, toggle_filebar); + bind(context, 'z', MDFR_ALT, execute_any_cli); + bind(context, 'Z', MDFR_ALT, execute_previous_cli); + bind(context, 'x', MDFR_ALT, command_lister); + bind(context, 'X', MDFR_ALT, project_command_lister); + bind(context, 'I', MDFR_CTRL, list_all_functions_all_buffers_lister); + bind(context, 'E', MDFR_ALT, exit_4coder); + bind(context, key_f1, MDFR_NONE, project_fkey_command); + bind(context, key_f2, MDFR_NONE, project_fkey_command); + bind(context, key_f3, MDFR_NONE, project_fkey_command); + bind(context, key_f4, MDFR_NONE, project_fkey_command); + bind(context, key_f5, MDFR_NONE, project_fkey_command); + bind(context, key_f6, MDFR_NONE, project_fkey_command); + bind(context, key_f7, MDFR_NONE, project_fkey_command); + bind(context, key_f8, MDFR_NONE, project_fkey_command); + bind(context, key_f9, MDFR_NONE, project_fkey_command); + bind(context, key_f10, MDFR_NONE, project_fkey_command); + bind(context, key_f11, MDFR_NONE, project_fkey_command); + bind(context, key_f12, MDFR_NONE, project_fkey_command); + bind(context, key_f13, MDFR_NONE, project_fkey_command); + bind(context, key_f14, MDFR_NONE, project_fkey_command); + bind(context, key_f15, MDFR_NONE, project_fkey_command); + bind(context, key_f16, MDFR_NONE, project_fkey_command); + bind(context, key_mouse_wheel, MDFR_NONE, mouse_wheel_scroll); + bind(context, key_mouse_wheel, MDFR_CTRL, mouse_wheel_change_face_size); + end_map(context); + begin_map(context, mapid_file); + bind_vanilla_keys(context, write_character); + bind(context, key_mouse_left, MDFR_NONE, click_set_cursor_and_mark); + bind(context, key_click_activate_view, MDFR_NONE, click_set_cursor_and_mark); + bind(context, key_mouse_left_release, MDFR_NONE, click_set_cursor); + bind(context, key_mouse_move, MDFR_NONE, click_set_cursor_if_lbutton); + bind(context, key_del, MDFR_NONE, delete_char); + bind(context, key_del, MDFR_SHIFT, delete_char); + bind(context, key_back, MDFR_NONE, backspace_char); + bind(context, key_back, MDFR_SHIFT, backspace_char); + bind(context, key_up, MDFR_NONE, move_up); + bind(context, key_down, MDFR_NONE, move_down); + bind(context, key_left, MDFR_NONE, move_left); + bind(context, key_right, MDFR_NONE, move_right); + bind(context, key_up, MDFR_SHIFT, move_up); + bind(context, key_down, MDFR_SHIFT, move_down); + bind(context, key_left, MDFR_SHIFT, move_left); + bind(context, key_right, MDFR_SHIFT, move_right); + bind(context, key_end, MDFR_NONE, seek_end_of_line); + bind(context, key_home, MDFR_NONE, seek_beginning_of_line); + bind(context, key_page_up, MDFR_CTRL, goto_beginning_of_file); + bind(context, key_page_down, MDFR_CTRL, goto_end_of_file); + bind(context, key_page_up, MDFR_NONE, page_up); + bind(context, key_page_down, MDFR_NONE, page_down); + bind(context, key_end, MDFR_SHIFT, seek_end_of_line); + bind(context, key_home, MDFR_SHIFT, seek_beginning_of_line); + bind(context, key_page_up, MDFR_CTRL|MDFR_SHIFT, goto_beginning_of_file); + bind(context, key_page_down, MDFR_CTRL|MDFR_SHIFT, goto_end_of_file); + bind(context, key_page_up, MDFR_SHIFT, page_up); + bind(context, key_page_down, MDFR_SHIFT, page_down); + bind(context, key_up, MDFR_CTRL, move_up_to_blank_line_skip_whitespace); + bind(context, key_down, MDFR_CTRL, move_down_to_blank_line_end); + bind(context, key_left, MDFR_CTRL, move_left_whitespace_boundary); + bind(context, key_right, MDFR_CTRL, move_right_whitespace_boundary); + bind(context, key_up, MDFR_CTRL|MDFR_SHIFT, move_up_to_blank_line_skip_whitespace); + bind(context, key_down, MDFR_CTRL|MDFR_SHIFT, move_down_to_blank_line_end); + bind(context, key_left, MDFR_CTRL|MDFR_SHIFT, move_left_whitespace_boundary); + bind(context, key_right, MDFR_CTRL|MDFR_SHIFT, move_right_whitespace_boundary); + bind(context, key_up, MDFR_ALT, move_line_up); + bind(context, key_down, MDFR_ALT, move_line_down); + bind(context, key_back, MDFR_CTRL, backspace_alpha_numeric_boundary); + bind(context, key_del, MDFR_CTRL, delete_alpha_numeric_boundary); + bind(context, key_back, MDFR_ALT, snipe_backward_whitespace_or_token_boundary); + bind(context, key_del, MDFR_ALT, snipe_forward_whitespace_or_token_boundary); + bind(context, ' ', MDFR_CTRL, set_mark); + bind(context, 'a', MDFR_CTRL, replace_in_range); + bind(context, 'c', MDFR_CTRL, copy); + bind(context, 'd', MDFR_CTRL, delete_range); + bind(context, 'D', MDFR_CTRL, delete_line); + bind(context, 'e', MDFR_CTRL, center_view); + bind(context, 'E', MDFR_CTRL, left_adjust_view); + bind(context, 'f', MDFR_CTRL, search); + bind(context, 'F', MDFR_CTRL, list_all_locations); + bind(context, 'F', MDFR_ALT, list_all_substring_locations_case_insensitive); + bind(context, 'g', MDFR_CTRL, goto_line); + bind(context, 'G', MDFR_CTRL, list_all_locations_of_selection); + bind(context, 'j', MDFR_CTRL, snippet_lister); + bind(context, 'K', MDFR_CTRL, kill_buffer); + bind(context, 'L', MDFR_CTRL, duplicate_line); + bind(context, 'm', MDFR_CTRL, cursor_mark_swap); + bind(context, 'O', MDFR_CTRL, reopen); + bind(context, 'q', MDFR_CTRL, query_replace); + bind(context, 'Q', MDFR_CTRL, query_replace_identifier); + bind(context, 'q', MDFR_ALT, query_replace_selection); + bind(context, 'r', MDFR_CTRL, reverse_search); + bind(context, 's', MDFR_CTRL, save); + bind(context, 't', MDFR_CTRL, search_identifier); + bind(context, 'T', MDFR_CTRL, list_all_locations_of_identifier); + bind(context, 'v', MDFR_CTRL, paste_and_indent); + bind(context, 'V', MDFR_CTRL, paste_next_and_indent); + bind(context, 'x', MDFR_CTRL, cut); + bind(context, 'y', MDFR_CTRL, redo); + bind(context, 'z', MDFR_CTRL, undo); + bind(context, '1', MDFR_CTRL, view_buffer_other_panel); + bind(context, '2', MDFR_CTRL, swap_buffers_between_panels); + bind(context, '\n', MDFR_NONE, newline_or_goto_position); + bind(context, '\n', MDFR_SHIFT, newline_or_goto_position_same_panel); + bind(context, '>', MDFR_CTRL, view_jump_list_with_lister); + bind(context, ' ', MDFR_SHIFT, write_character); + end_map(context); + begin_map(context, default_code_map); + inherit_map(context, mapid_file); + bind(context, key_left, MDFR_CTRL, move_left_alpha_numeric_or_camel_boundary); + bind(context, key_right, MDFR_CTRL, move_right_alpha_numeric_or_camel_boundary); + bind(context, key_left, MDFR_ALT, move_left_alpha_numeric_boundary); + bind(context, key_right, MDFR_ALT, move_right_alpha_numeric_boundary); + bind(context, '\n', MDFR_NONE, write_and_auto_tab); + bind(context, '\n', MDFR_SHIFT, write_and_auto_tab); + bind(context, '}', MDFR_NONE, write_and_auto_tab); + bind(context, ')', MDFR_NONE, write_and_auto_tab); + bind(context, ']', MDFR_NONE, write_and_auto_tab); + bind(context, ';', MDFR_NONE, write_and_auto_tab); + bind(context, '#', MDFR_NONE, write_and_auto_tab); + bind(context, ';', MDFR_CTRL, comment_line_toggle); + bind(context, '\t', MDFR_NONE, word_complete); + bind(context, '\t', MDFR_CTRL, auto_tab_range); + bind(context, '\t', MDFR_SHIFT, auto_tab_line_at_cursor); + bind(context, 'r', MDFR_ALT, write_block); + bind(context, 't', MDFR_ALT, write_todo); + bind(context, 'y', MDFR_ALT, write_note); + bind(context, 'D', MDFR_ALT, list_all_locations_of_type_definition); + bind(context, 'T', MDFR_ALT, list_all_locations_of_type_definition_of_identifier); + bind(context, '[', MDFR_CTRL, open_long_braces); + bind(context, '{', MDFR_CTRL, open_long_braces_semicolon); + bind(context, '}', MDFR_CTRL, open_long_braces_break); + bind(context, '[', MDFR_ALT, select_surrounding_scope); + bind(context, ']', MDFR_ALT, select_prev_scope_absolute); + bind(context, '\'', MDFR_ALT, select_next_scope_absolute); + bind(context, '/', MDFR_ALT, place_in_scope); + bind(context, '-', MDFR_ALT, delete_current_scope); + bind(context, 'i', MDFR_ALT, if0_off); + bind(context, '1', MDFR_ALT, open_file_in_quotes); + bind(context, '2', MDFR_ALT, open_matching_file_cpp); + bind(context, '0', MDFR_CTRL, write_zero_struct); + end_map(context); + begin_map(context, default_lister_ui_map); + bind_vanilla_keys(context, lister__write_character); + bind(context, key_esc, MDFR_NONE, lister__quit); + bind(context, '\n', MDFR_NONE, lister__activate); + bind(context, '\t', MDFR_NONE, lister__activate); + bind(context, key_back, MDFR_NONE, lister__backspace_text_field); + bind(context, key_back, MDFR_CTRL, lister__backspace_text_field); + bind(context, key_back, MDFR_ALT, lister__backspace_text_field); + bind(context, key_back, MDFR_CMND, lister__backspace_text_field); + bind(context, key_back, MDFR_CTRL|MDFR_ALT, lister__backspace_text_field); + bind(context, key_back, MDFR_ALT|MDFR_CMND, lister__backspace_text_field); + bind(context, key_back, MDFR_CTRL|MDFR_CMND, lister__backspace_text_field); + bind(context, key_back, MDFR_CTRL|MDFR_ALT|MDFR_CMND, lister__backspace_text_field); + bind(context, key_up, MDFR_NONE, lister__move_up); + bind(context, 'k', MDFR_ALT, lister__move_up); + bind(context, key_page_up, MDFR_NONE, lister__move_up); + bind(context, key_down, MDFR_NONE, lister__move_down); + bind(context, 'j', MDFR_ALT, lister__move_down); + bind(context, key_page_down, MDFR_NONE, lister__move_down); + bind(context, key_mouse_wheel, MDFR_NONE, lister__wheel_scroll); + bind(context, key_mouse_left, MDFR_NONE, lister__mouse_press); + bind(context, key_mouse_left_release, MDFR_NONE, lister__mouse_release); + bind(context, key_mouse_move, MDFR_NONE, lister__repaint); + bind(context, key_animate, MDFR_NONE, lister__repaint); + end_map(context); } void fill_keys_mac_default(Bind_Helper *context){ -begin_map(context, mapid_global); -bind(context, ',', MDFR_CMND, change_active_panel); -bind(context, '<', MDFR_CMND, change_active_panel_backwards); -bind(context, 'n', MDFR_CMND, interactive_new); -bind(context, 'o', MDFR_CMND, interactive_open_or_new); -bind(context, 'o', MDFR_CTRL, open_in_other); -bind(context, 'k', MDFR_CMND, interactive_kill_buffer); -bind(context, 'i', MDFR_CMND, interactive_switch_buffer); -bind(context, 'h', MDFR_CMND, project_go_to_root_directory); -bind(context, 'S', MDFR_CMND, save_all_dirty_buffers); -bind(context, '.', MDFR_CTRL, change_to_build_panel); -bind(context, ',', MDFR_CTRL, close_build_panel); -bind(context, 'n', MDFR_CTRL, goto_next_jump); -bind(context, 'N', MDFR_CTRL, goto_prev_jump); -bind(context, 'M', MDFR_CTRL, goto_first_jump); -bind(context, 'm', MDFR_CTRL, build_in_build_panel); -bind(context, 'b', MDFR_CTRL, toggle_filebar); -bind(context, 'z', MDFR_CTRL, execute_any_cli); -bind(context, 'Z', MDFR_CTRL, execute_previous_cli); -bind(context, 'x', MDFR_CTRL, command_lister); -bind(context, 'X', MDFR_CTRL, project_command_lister); -bind(context, 'I', MDFR_CMND, list_all_functions_all_buffers_lister); -bind(context, 'E', MDFR_CTRL, exit_4coder); -bind(context, key_f1, MDFR_NONE, project_fkey_command); -bind(context, key_f2, MDFR_NONE, project_fkey_command); -bind(context, key_f3, MDFR_NONE, project_fkey_command); -bind(context, key_f4, MDFR_NONE, project_fkey_command); -bind(context, key_f5, MDFR_NONE, project_fkey_command); -bind(context, key_f6, MDFR_NONE, project_fkey_command); -bind(context, key_f7, MDFR_NONE, project_fkey_command); -bind(context, key_f8, MDFR_NONE, project_fkey_command); -bind(context, key_f9, MDFR_NONE, project_fkey_command); -bind(context, key_f10, MDFR_NONE, project_fkey_command); -bind(context, key_f11, MDFR_NONE, project_fkey_command); -bind(context, key_f12, MDFR_NONE, project_fkey_command); -bind(context, key_f13, MDFR_NONE, project_fkey_command); -bind(context, key_f14, MDFR_NONE, project_fkey_command); -bind(context, key_f15, MDFR_NONE, project_fkey_command); -bind(context, key_f16, MDFR_NONE, project_fkey_command); -bind(context, key_mouse_wheel, MDFR_NONE, mouse_wheel_scroll); -bind(context, key_mouse_wheel, MDFR_CMND, mouse_wheel_change_face_size); -end_map(context); -begin_map(context, mapid_file); -bind_vanilla_keys(context, write_character); -bind_vanilla_keys(context, MDFR_ALT, write_character); -bind(context, key_mouse_left, MDFR_NONE, click_set_cursor_and_mark); -bind(context, key_click_activate_view, MDFR_NONE, click_set_cursor_and_mark); -bind(context, key_mouse_left_release, MDFR_NONE, click_set_cursor); -bind(context, key_mouse_move, MDFR_NONE, click_set_cursor_if_lbutton); -bind(context, key_del, MDFR_NONE, delete_char); -bind(context, key_del, MDFR_SHIFT, delete_char); -bind(context, key_back, MDFR_NONE, backspace_char); -bind(context, key_back, MDFR_SHIFT, backspace_char); -bind(context, key_up, MDFR_NONE, move_up); -bind(context, key_down, MDFR_NONE, move_down); -bind(context, key_left, MDFR_NONE, move_left); -bind(context, key_right, MDFR_NONE, move_right); -bind(context, key_up, MDFR_SHIFT, move_up); -bind(context, key_down, MDFR_SHIFT, move_down); -bind(context, key_left, MDFR_SHIFT, move_left); -bind(context, key_right, MDFR_SHIFT, move_right); -bind(context, key_end, MDFR_NONE, seek_end_of_line); -bind(context, key_home, MDFR_NONE, seek_beginning_of_line); -bind(context, key_page_up, MDFR_CTRL, goto_beginning_of_file); -bind(context, key_page_down, MDFR_CTRL, goto_end_of_file); -bind(context, key_page_up, MDFR_NONE, page_up); -bind(context, key_page_down, MDFR_NONE, page_down); -bind(context, key_end, MDFR_SHIFT, seek_end_of_line); -bind(context, key_home, MDFR_SHIFT, seek_beginning_of_line); -bind(context, key_page_up, MDFR_CTRL|MDFR_SHIFT, goto_beginning_of_file); -bind(context, key_page_down, MDFR_CTRL|MDFR_SHIFT, goto_end_of_file); -bind(context, key_page_up, MDFR_SHIFT, page_up); -bind(context, key_page_down, MDFR_SHIFT, page_down); -bind(context, key_up, MDFR_CMND, move_up_to_blank_line_skip_whitespace); -bind(context, key_down, MDFR_CMND, move_down_to_blank_line_end); -bind(context, key_left, MDFR_CMND, move_left_whitespace_boundary); -bind(context, key_right, MDFR_CMND, move_right_whitespace_boundary); -bind(context, key_up, MDFR_CMND|MDFR_SHIFT, move_up_to_blank_line_skip_whitespace); -bind(context, key_down, MDFR_CMND|MDFR_SHIFT, move_down_to_blank_line_end); -bind(context, key_left, MDFR_CMND|MDFR_SHIFT, move_left_whitespace_boundary); -bind(context, key_right, MDFR_CMND|MDFR_SHIFT, move_right_whitespace_boundary); -bind(context, key_up, MDFR_ALT, move_line_up); -bind(context, key_down, MDFR_ALT, move_line_down); -bind(context, key_back, MDFR_CMND, backspace_alpha_numeric_boundary); -bind(context, key_del, MDFR_CMND, delete_alpha_numeric_boundary); -bind(context, key_back, MDFR_CTRL, snipe_backward_whitespace_or_token_boundary); -bind(context, key_del, MDFR_CTRL, snipe_forward_whitespace_or_token_boundary); -bind(context, '/', MDFR_CMND, set_mark); -bind(context, 'a', MDFR_CMND, replace_in_range); -bind(context, 'c', MDFR_CMND, copy); -bind(context, 'd', MDFR_CMND, delete_range); -bind(context, 'D', MDFR_CMND, delete_line); -bind(context, 'e', MDFR_CMND, center_view); -bind(context, 'E', MDFR_CMND, left_adjust_view); -bind(context, 'f', MDFR_CMND, search); -bind(context, 'F', MDFR_CMND, list_all_locations); -bind(context, 'F', MDFR_CTRL, list_all_substring_locations_case_insensitive); -bind(context, 'g', MDFR_CMND, goto_line); -bind(context, 'G', MDFR_CMND, list_all_locations_of_selection); -bind(context, 'K', MDFR_CMND, kill_buffer); -bind(context, 'L', MDFR_CMND, duplicate_line); -bind(context, 'm', MDFR_CMND, cursor_mark_swap); -bind(context, 'O', MDFR_CMND, reopen); -bind(context, 'q', MDFR_CMND, query_replace); -bind(context, 'Q', MDFR_CMND, query_replace_identifier); -bind(context, 'r', MDFR_CMND, reverse_search); -bind(context, 's', MDFR_CMND, save); -bind(context, 't', MDFR_CMND, search_identifier); -bind(context, 'T', MDFR_CMND, list_all_locations_of_identifier); -bind(context, 'v', MDFR_CMND, paste_and_indent); -bind(context, 'V', MDFR_CMND, paste_next_and_indent); -bind(context, 'x', MDFR_CMND, cut); -bind(context, 'y', MDFR_CMND, redo); -bind(context, 'z', MDFR_CMND, undo); -bind(context, '1', MDFR_CMND, view_buffer_other_panel); -bind(context, '2', MDFR_CMND, swap_buffers_between_panels); -bind(context, '\n', MDFR_NONE, newline_or_goto_position); -bind(context, '\n', MDFR_SHIFT, newline_or_goto_position_same_panel); -bind(context, '>', MDFR_CMND, view_jump_list_with_lister); -bind(context, ' ', MDFR_SHIFT, write_character); -end_map(context); -begin_map(context, default_code_map); -inherit_map(context, mapid_file); -bind(context, key_left, MDFR_CMND, move_left_alpha_numeric_or_camel_boundary); -bind(context, key_right, MDFR_CMND, move_right_alpha_numeric_or_camel_boundary); -bind(context, key_left, MDFR_CTRL, move_left_alpha_numeric_boundary); -bind(context, key_right, MDFR_CTRL, move_right_alpha_numeric_boundary); -bind(context, '\n', MDFR_NONE, write_and_auto_tab); -bind(context, '\n', MDFR_SHIFT, write_and_auto_tab); -bind(context, '}', MDFR_NONE, write_and_auto_tab); -bind(context, ')', MDFR_NONE, write_and_auto_tab); -bind(context, ']', MDFR_NONE, write_and_auto_tab); -bind(context, ';', MDFR_NONE, write_and_auto_tab); -bind(context, '#', MDFR_NONE, write_and_auto_tab); -bind(context, ';', MDFR_CTRL, comment_line_toggle); -bind(context, '\t', MDFR_NONE, word_complete); -bind(context, '\t', MDFR_CMND, auto_tab_range); -bind(context, '\t', MDFR_SHIFT, auto_tab_line_at_cursor); -bind(context, 'r', MDFR_CTRL, write_block); -bind(context, 't', MDFR_CTRL, write_todo); -bind(context, 'y', MDFR_CTRL, write_note); -bind(context, 'D', MDFR_CTRL, list_all_locations_of_type_definition); -bind(context, 'T', MDFR_CTRL, list_all_locations_of_type_definition_of_identifier); -bind(context, '[', MDFR_CMND, open_long_braces); -bind(context, '{', MDFR_CMND, open_long_braces_semicolon); -bind(context, '}', MDFR_CMND, open_long_braces_break); -bind(context, '[', MDFR_CTRL, select_surrounding_scope); -bind(context, ']', MDFR_CTRL, select_prev_scope_absolute); -bind(context, '\'', MDFR_CTRL, select_next_scope_absolute); -bind(context, '/', MDFR_CTRL, place_in_scope); -bind(context, '-', MDFR_CTRL, delete_current_scope); -bind(context, 'j', MDFR_CTRL, scope_absorb_down); -bind(context, 'i', MDFR_CTRL, if0_off); -bind(context, '1', MDFR_CTRL, open_file_in_quotes); -bind(context, '2', MDFR_CTRL, open_matching_file_cpp); -bind(context, '0', MDFR_CMND, write_zero_struct); -end_map(context); -begin_map(context, default_lister_ui_map); -bind_vanilla_keys(context, lister__write_character); -bind(context, key_esc, MDFR_NONE, lister__quit); -bind(context, '\n', MDFR_NONE, lister__activate); -bind(context, '\t', MDFR_NONE, lister__activate); -bind(context, key_back, MDFR_NONE, lister__backspace_text_field); -bind(context, key_back, MDFR_CTRL, lister__backspace_text_field); -bind(context, key_back, MDFR_ALT, lister__backspace_text_field); -bind(context, key_back, MDFR_CMND, lister__backspace_text_field); -bind(context, key_back, MDFR_CTRL|MDFR_ALT, lister__backspace_text_field); -bind(context, key_back, MDFR_ALT|MDFR_CMND, lister__backspace_text_field); -bind(context, key_back, MDFR_CTRL|MDFR_CMND, lister__backspace_text_field); -bind(context, key_back, MDFR_CTRL|MDFR_ALT|MDFR_CMND, lister__backspace_text_field); -bind(context, key_up, MDFR_NONE, lister__move_up); -bind(context, key_page_up, MDFR_NONE, lister__move_up); -bind(context, key_down, MDFR_NONE, lister__move_down); -bind(context, key_page_down, MDFR_NONE, lister__move_down); -bind(context, key_mouse_wheel, MDFR_NONE, lister__wheel_scroll); -bind(context, key_mouse_left, MDFR_NONE, lister__mouse_press); -bind(context, key_mouse_left_release, MDFR_NONE, lister__mouse_release); -bind(context, key_mouse_move, MDFR_NONE, lister__repaint); -bind(context, key_animate, MDFR_NONE, lister__repaint); -end_map(context); + begin_map(context, mapid_global); + bind(context, ',', MDFR_CMND, change_active_panel); + bind(context, '<', MDFR_CMND, change_active_panel_backwards); + bind(context, 'n', MDFR_CMND, interactive_new); + bind(context, 'o', MDFR_CMND, interactive_open_or_new); + bind(context, 'o', MDFR_CTRL, open_in_other); + bind(context, 'k', MDFR_CMND, interactive_kill_buffer); + bind(context, 'i', MDFR_CMND, interactive_switch_buffer); + bind(context, 'h', MDFR_CMND, project_go_to_root_directory); + bind(context, 'S', MDFR_CMND, save_all_dirty_buffers); + bind(context, '.', MDFR_CTRL, change_to_build_panel); + bind(context, ',', MDFR_CTRL, close_build_panel); + bind(context, 'n', MDFR_CTRL, goto_next_jump); + bind(context, 'N', MDFR_CTRL, goto_prev_jump); + bind(context, 'M', MDFR_CTRL, goto_first_jump); + bind(context, 'm', MDFR_CTRL, build_in_build_panel); + bind(context, 'b', MDFR_CTRL, toggle_filebar); + bind(context, 'z', MDFR_CTRL, execute_any_cli); + bind(context, 'Z', MDFR_CTRL, execute_previous_cli); + bind(context, 'x', MDFR_CTRL, command_lister); + bind(context, 'X', MDFR_CTRL, project_command_lister); + bind(context, 'I', MDFR_CMND, list_all_functions_all_buffers_lister); + bind(context, 'E', MDFR_CTRL, exit_4coder); + bind(context, key_f1, MDFR_NONE, project_fkey_command); + bind(context, key_f2, MDFR_NONE, project_fkey_command); + bind(context, key_f3, MDFR_NONE, project_fkey_command); + bind(context, key_f4, MDFR_NONE, project_fkey_command); + bind(context, key_f5, MDFR_NONE, project_fkey_command); + bind(context, key_f6, MDFR_NONE, project_fkey_command); + bind(context, key_f7, MDFR_NONE, project_fkey_command); + bind(context, key_f8, MDFR_NONE, project_fkey_command); + bind(context, key_f9, MDFR_NONE, project_fkey_command); + bind(context, key_f10, MDFR_NONE, project_fkey_command); + bind(context, key_f11, MDFR_NONE, project_fkey_command); + bind(context, key_f12, MDFR_NONE, project_fkey_command); + bind(context, key_f13, MDFR_NONE, project_fkey_command); + bind(context, key_f14, MDFR_NONE, project_fkey_command); + bind(context, key_f15, MDFR_NONE, project_fkey_command); + bind(context, key_f16, MDFR_NONE, project_fkey_command); + bind(context, key_mouse_wheel, MDFR_NONE, mouse_wheel_scroll); + bind(context, key_mouse_wheel, MDFR_CMND, mouse_wheel_change_face_size); + end_map(context); + begin_map(context, mapid_file); + bind_vanilla_keys(context, write_character); + bind_vanilla_keys(context, MDFR_ALT, write_character); + bind(context, key_mouse_left, MDFR_NONE, click_set_cursor_and_mark); + bind(context, key_click_activate_view, MDFR_NONE, click_set_cursor_and_mark); + bind(context, key_mouse_left_release, MDFR_NONE, click_set_cursor); + bind(context, key_mouse_move, MDFR_NONE, click_set_cursor_if_lbutton); + bind(context, key_del, MDFR_NONE, delete_char); + bind(context, key_del, MDFR_SHIFT, delete_char); + bind(context, key_back, MDFR_NONE, backspace_char); + bind(context, key_back, MDFR_SHIFT, backspace_char); + bind(context, key_up, MDFR_NONE, move_up); + bind(context, key_down, MDFR_NONE, move_down); + bind(context, key_left, MDFR_NONE, move_left); + bind(context, key_right, MDFR_NONE, move_right); + bind(context, key_up, MDFR_SHIFT, move_up); + bind(context, key_down, MDFR_SHIFT, move_down); + bind(context, key_left, MDFR_SHIFT, move_left); + bind(context, key_right, MDFR_SHIFT, move_right); + bind(context, key_end, MDFR_NONE, seek_end_of_line); + bind(context, key_home, MDFR_NONE, seek_beginning_of_line); + bind(context, key_page_up, MDFR_CTRL, goto_beginning_of_file); + bind(context, key_page_down, MDFR_CTRL, goto_end_of_file); + bind(context, key_page_up, MDFR_NONE, page_up); + bind(context, key_page_down, MDFR_NONE, page_down); + bind(context, key_end, MDFR_SHIFT, seek_end_of_line); + bind(context, key_home, MDFR_SHIFT, seek_beginning_of_line); + bind(context, key_page_up, MDFR_CTRL|MDFR_SHIFT, goto_beginning_of_file); + bind(context, key_page_down, MDFR_CTRL|MDFR_SHIFT, goto_end_of_file); + bind(context, key_page_up, MDFR_SHIFT, page_up); + bind(context, key_page_down, MDFR_SHIFT, page_down); + bind(context, key_up, MDFR_CMND, move_up_to_blank_line_skip_whitespace); + bind(context, key_down, MDFR_CMND, move_down_to_blank_line_end); + bind(context, key_left, MDFR_CMND, move_left_whitespace_boundary); + bind(context, key_right, MDFR_CMND, move_right_whitespace_boundary); + bind(context, key_up, MDFR_CMND|MDFR_SHIFT, move_up_to_blank_line_skip_whitespace); + bind(context, key_down, MDFR_CMND|MDFR_SHIFT, move_down_to_blank_line_end); + bind(context, key_left, MDFR_CMND|MDFR_SHIFT, move_left_whitespace_boundary); + bind(context, key_right, MDFR_CMND|MDFR_SHIFT, move_right_whitespace_boundary); + bind(context, key_up, MDFR_ALT, move_line_up); + bind(context, key_down, MDFR_ALT, move_line_down); + bind(context, key_back, MDFR_CMND, backspace_alpha_numeric_boundary); + bind(context, key_del, MDFR_CMND, delete_alpha_numeric_boundary); + bind(context, key_back, MDFR_CTRL, snipe_backward_whitespace_or_token_boundary); + bind(context, key_del, MDFR_CTRL, snipe_forward_whitespace_or_token_boundary); + bind(context, '/', MDFR_CMND, set_mark); + bind(context, 'a', MDFR_CMND, replace_in_range); + bind(context, 'c', MDFR_CMND, copy); + bind(context, 'd', MDFR_CMND, delete_range); + bind(context, 'D', MDFR_CMND, delete_line); + bind(context, 'e', MDFR_CMND, center_view); + bind(context, 'E', MDFR_CMND, left_adjust_view); + bind(context, 'f', MDFR_CMND, search); + bind(context, 'F', MDFR_CMND, list_all_locations); + bind(context, 'F', MDFR_CTRL, list_all_substring_locations_case_insensitive); + bind(context, 'g', MDFR_CMND, goto_line); + bind(context, 'G', MDFR_CMND, list_all_locations_of_selection); + bind(context, 'K', MDFR_CMND, kill_buffer); + bind(context, 'L', MDFR_CMND, duplicate_line); + bind(context, 'm', MDFR_CMND, cursor_mark_swap); + bind(context, 'O', MDFR_CMND, reopen); + bind(context, 'q', MDFR_CMND, query_replace); + bind(context, 'Q', MDFR_CMND, query_replace_identifier); + bind(context, 'r', MDFR_CMND, reverse_search); + bind(context, 's', MDFR_CMND, save); + bind(context, 't', MDFR_CMND, search_identifier); + bind(context, 'T', MDFR_CMND, list_all_locations_of_identifier); + bind(context, 'v', MDFR_CMND, paste_and_indent); + bind(context, 'V', MDFR_CMND, paste_next_and_indent); + bind(context, 'x', MDFR_CMND, cut); + bind(context, 'y', MDFR_CMND, redo); + bind(context, 'z', MDFR_CMND, undo); + bind(context, '1', MDFR_CMND, view_buffer_other_panel); + bind(context, '2', MDFR_CMND, swap_buffers_between_panels); + bind(context, '\n', MDFR_NONE, newline_or_goto_position); + bind(context, '\n', MDFR_SHIFT, newline_or_goto_position_same_panel); + bind(context, '>', MDFR_CMND, view_jump_list_with_lister); + bind(context, ' ', MDFR_SHIFT, write_character); + end_map(context); + begin_map(context, default_code_map); + inherit_map(context, mapid_file); + bind(context, key_left, MDFR_CMND, move_left_alpha_numeric_or_camel_boundary); + bind(context, key_right, MDFR_CMND, move_right_alpha_numeric_or_camel_boundary); + bind(context, key_left, MDFR_CTRL, move_left_alpha_numeric_boundary); + bind(context, key_right, MDFR_CTRL, move_right_alpha_numeric_boundary); + bind(context, '\n', MDFR_NONE, write_and_auto_tab); + bind(context, '\n', MDFR_SHIFT, write_and_auto_tab); + bind(context, '}', MDFR_NONE, write_and_auto_tab); + bind(context, ')', MDFR_NONE, write_and_auto_tab); + bind(context, ']', MDFR_NONE, write_and_auto_tab); + bind(context, ';', MDFR_NONE, write_and_auto_tab); + bind(context, '#', MDFR_NONE, write_and_auto_tab); + bind(context, ';', MDFR_CTRL, comment_line_toggle); + bind(context, '\t', MDFR_NONE, word_complete); + bind(context, '\t', MDFR_CMND, auto_tab_range); + bind(context, '\t', MDFR_SHIFT, auto_tab_line_at_cursor); + bind(context, 'r', MDFR_CTRL, write_block); + bind(context, 't', MDFR_CTRL, write_todo); + bind(context, 'y', MDFR_CTRL, write_note); + bind(context, 'D', MDFR_CTRL, list_all_locations_of_type_definition); + bind(context, 'T', MDFR_CTRL, list_all_locations_of_type_definition_of_identifier); + bind(context, '[', MDFR_CMND, open_long_braces); + bind(context, '{', MDFR_CMND, open_long_braces_semicolon); + bind(context, '}', MDFR_CMND, open_long_braces_break); + bind(context, '[', MDFR_CTRL, select_surrounding_scope); + bind(context, ']', MDFR_CTRL, select_prev_scope_absolute); + bind(context, '\'', MDFR_CTRL, select_next_scope_absolute); + bind(context, '/', MDFR_CTRL, place_in_scope); + bind(context, '-', MDFR_CTRL, delete_current_scope); + bind(context, 'i', MDFR_CTRL, if0_off); + bind(context, '1', MDFR_CTRL, open_file_in_quotes); + bind(context, '2', MDFR_CTRL, open_matching_file_cpp); + bind(context, '0', MDFR_CMND, write_zero_struct); + end_map(context); + begin_map(context, default_lister_ui_map); + bind_vanilla_keys(context, lister__write_character); + bind(context, key_esc, MDFR_NONE, lister__quit); + bind(context, '\n', MDFR_NONE, lister__activate); + bind(context, '\t', MDFR_NONE, lister__activate); + bind(context, key_back, MDFR_NONE, lister__backspace_text_field); + bind(context, key_back, MDFR_CTRL, lister__backspace_text_field); + bind(context, key_back, MDFR_ALT, lister__backspace_text_field); + bind(context, key_back, MDFR_CMND, lister__backspace_text_field); + bind(context, key_back, MDFR_CTRL|MDFR_ALT, lister__backspace_text_field); + bind(context, key_back, MDFR_ALT|MDFR_CMND, lister__backspace_text_field); + bind(context, key_back, MDFR_CTRL|MDFR_CMND, lister__backspace_text_field); + bind(context, key_back, MDFR_CTRL|MDFR_ALT|MDFR_CMND, lister__backspace_text_field); + bind(context, key_up, MDFR_NONE, lister__move_up); + bind(context, key_page_up, MDFR_NONE, lister__move_up); + bind(context, key_down, MDFR_NONE, lister__move_down); + bind(context, key_page_down, MDFR_NONE, lister__move_down); + bind(context, key_mouse_wheel, MDFR_NONE, lister__wheel_scroll); + bind(context, key_mouse_left, MDFR_NONE, lister__mouse_press); + bind(context, key_mouse_left_release, MDFR_NONE, lister__mouse_release); + bind(context, key_mouse_move, MDFR_NONE, lister__repaint); + bind(context, key_animate, MDFR_NONE, lister__repaint); + end_map(context); } #endif #if defined(CUSTOM_COMMAND_SIG) @@ -376,409 +374,407 @@ end_map(context); #define LINK_PROCS(x) #endif struct Meta_Key_Bind{ -int32_t vanilla; -uint32_t keycode; -uint32_t modifiers; -char *command; -int32_t command_len; -LINK_PROCS(Custom_Command_Function *proc;) + int32_t vanilla; + uint32_t keycode; + uint32_t modifiers; + char *command; + int32_t command_len; + LINK_PROCS(Custom_Command_Function *proc;) }; struct Meta_Sub_Map{ -char *name; -int32_t name_len; -char *description; -int32_t description_len; -char *parent; -int32_t parent_len; -Meta_Key_Bind *binds; -int32_t bind_count; + char *name; + int32_t name_len; + char *description; + int32_t description_len; + char *parent; + int32_t parent_len; + Meta_Key_Bind *binds; + int32_t bind_count; }; struct Meta_Mapping{ -char *name; -int32_t name_len; -char *description; -int32_t description_len; -Meta_Sub_Map *sub_maps; -int32_t sub_map_count; -LINK_PROCS(void (*fill_keys_proc)(Bind_Helper *context);) + char *name; + int32_t name_len; + char *description; + int32_t description_len; + Meta_Sub_Map *sub_maps; + int32_t sub_map_count; + LINK_PROCS(void (*fill_keys_proc)(Bind_Helper *context);) }; static Meta_Key_Bind fcoder_binds_for_default_mapid_global[43] = { -{0, 44, 1, "change_active_panel", 19, LINK_PROCS(change_active_panel)}, -{0, 60, 1, "change_active_panel_backwards", 29, LINK_PROCS(change_active_panel_backwards)}, -{0, 110, 1, "interactive_new", 15, LINK_PROCS(interactive_new)}, -{0, 111, 1, "interactive_open_or_new", 23, LINK_PROCS(interactive_open_or_new)}, -{0, 111, 2, "open_in_other", 13, LINK_PROCS(open_in_other)}, -{0, 107, 1, "interactive_kill_buffer", 23, LINK_PROCS(interactive_kill_buffer)}, -{0, 105, 1, "interactive_switch_buffer", 25, LINK_PROCS(interactive_switch_buffer)}, -{0, 104, 1, "project_go_to_root_directory", 28, LINK_PROCS(project_go_to_root_directory)}, -{0, 83, 1, "save_all_dirty_buffers", 22, LINK_PROCS(save_all_dirty_buffers)}, -{0, 55315, 0, "toggle_filebar", 14, LINK_PROCS(toggle_filebar)}, -{0, 55308, 0, "toggle_filebar", 14, LINK_PROCS(toggle_filebar)}, -{0, 55313, 0, "toggle_filebar", 14, LINK_PROCS(toggle_filebar)}, -{0, 46, 2, "change_to_build_panel", 21, LINK_PROCS(change_to_build_panel)}, -{0, 44, 2, "close_build_panel", 17, LINK_PROCS(close_build_panel)}, -{0, 110, 2, "goto_next_jump", 14, LINK_PROCS(goto_next_jump)}, -{0, 78, 2, "goto_prev_jump", 14, LINK_PROCS(goto_prev_jump)}, -{0, 77, 2, "goto_first_jump", 15, LINK_PROCS(goto_first_jump)}, -{0, 109, 2, "build_in_build_panel", 20, LINK_PROCS(build_in_build_panel)}, -{0, 98, 2, "toggle_filebar", 14, LINK_PROCS(toggle_filebar)}, -{0, 122, 2, "execute_any_cli", 15, LINK_PROCS(execute_any_cli)}, -{0, 90, 2, "execute_previous_cli", 20, LINK_PROCS(execute_previous_cli)}, -{0, 120, 2, "command_lister", 14, LINK_PROCS(command_lister)}, -{0, 88, 2, "project_command_lister", 22, LINK_PROCS(project_command_lister)}, -{0, 73, 1, "list_all_functions_all_buffers_lister", 37, LINK_PROCS(list_all_functions_all_buffers_lister)}, -{0, 69, 2, "exit_4coder", 11, LINK_PROCS(exit_4coder)}, -{0, 55326, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55327, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55328, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55329, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55330, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55331, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55332, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55333, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55334, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55335, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55336, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55337, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55338, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55339, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55340, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55341, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55321, 0, "mouse_wheel_scroll", 18, LINK_PROCS(mouse_wheel_scroll)}, -{0, 55321, 1, "mouse_wheel_change_face_size", 28, LINK_PROCS(mouse_wheel_change_face_size)}, + {0, 44, 1, "change_active_panel", 19, LINK_PROCS(change_active_panel)}, + {0, 60, 1, "change_active_panel_backwards", 29, LINK_PROCS(change_active_panel_backwards)}, + {0, 110, 1, "interactive_new", 15, LINK_PROCS(interactive_new)}, + {0, 111, 1, "interactive_open_or_new", 23, LINK_PROCS(interactive_open_or_new)}, + {0, 111, 2, "open_in_other", 13, LINK_PROCS(open_in_other)}, + {0, 107, 1, "interactive_kill_buffer", 23, LINK_PROCS(interactive_kill_buffer)}, + {0, 105, 1, "interactive_switch_buffer", 25, LINK_PROCS(interactive_switch_buffer)}, + {0, 104, 1, "project_go_to_root_directory", 28, LINK_PROCS(project_go_to_root_directory)}, + {0, 83, 1, "save_all_dirty_buffers", 22, LINK_PROCS(save_all_dirty_buffers)}, + {0, 55315, 0, "toggle_filebar", 14, LINK_PROCS(toggle_filebar)}, + {0, 55308, 0, "toggle_filebar", 14, LINK_PROCS(toggle_filebar)}, + {0, 55313, 0, "toggle_filebar", 14, LINK_PROCS(toggle_filebar)}, + {0, 46, 2, "change_to_build_panel", 21, LINK_PROCS(change_to_build_panel)}, + {0, 44, 2, "close_build_panel", 17, LINK_PROCS(close_build_panel)}, + {0, 110, 2, "goto_next_jump", 14, LINK_PROCS(goto_next_jump)}, + {0, 78, 2, "goto_prev_jump", 14, LINK_PROCS(goto_prev_jump)}, + {0, 77, 2, "goto_first_jump", 15, LINK_PROCS(goto_first_jump)}, + {0, 109, 2, "build_in_build_panel", 20, LINK_PROCS(build_in_build_panel)}, + {0, 98, 2, "toggle_filebar", 14, LINK_PROCS(toggle_filebar)}, + {0, 122, 2, "execute_any_cli", 15, LINK_PROCS(execute_any_cli)}, + {0, 90, 2, "execute_previous_cli", 20, LINK_PROCS(execute_previous_cli)}, + {0, 120, 2, "command_lister", 14, LINK_PROCS(command_lister)}, + {0, 88, 2, "project_command_lister", 22, LINK_PROCS(project_command_lister)}, + {0, 73, 1, "list_all_functions_all_buffers_lister", 37, LINK_PROCS(list_all_functions_all_buffers_lister)}, + {0, 69, 2, "exit_4coder", 11, LINK_PROCS(exit_4coder)}, + {0, 55326, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55327, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55328, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55329, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55330, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55331, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55332, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55333, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55334, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55335, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55336, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55337, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55338, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55339, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55340, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55341, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55321, 0, "mouse_wheel_scroll", 18, LINK_PROCS(mouse_wheel_scroll)}, + {0, 55321, 1, "mouse_wheel_change_face_size", 28, LINK_PROCS(mouse_wheel_change_face_size)}, }; static Meta_Key_Bind fcoder_binds_for_default_mapid_file[78] = { -{1, 0, 0, "write_character", 15, LINK_PROCS(write_character)}, -{0, 55317, 0, "click_set_cursor_and_mark", 25, LINK_PROCS(click_set_cursor_and_mark)}, -{0, 55324, 0, "click_set_cursor_and_mark", 25, LINK_PROCS(click_set_cursor_and_mark)}, -{0, 55319, 0, "click_set_cursor", 16, LINK_PROCS(click_set_cursor)}, -{0, 55322, 0, "click_set_cursor_if_lbutton", 27, LINK_PROCS(click_set_cursor_if_lbutton)}, -{0, 55301, 0, "delete_char", 11, LINK_PROCS(delete_char)}, -{0, 55301, 8, "delete_char", 11, LINK_PROCS(delete_char)}, -{0, 55296, 0, "backspace_char", 14, LINK_PROCS(backspace_char)}, -{0, 55296, 8, "backspace_char", 14, LINK_PROCS(backspace_char)}, -{0, 55297, 0, "move_up", 7, LINK_PROCS(move_up)}, -{0, 55298, 0, "move_down", 9, LINK_PROCS(move_down)}, -{0, 55299, 0, "move_left", 9, LINK_PROCS(move_left)}, -{0, 55300, 0, "move_right", 10, LINK_PROCS(move_right)}, -{0, 55297, 8, "move_up", 7, LINK_PROCS(move_up)}, -{0, 55298, 8, "move_down", 9, LINK_PROCS(move_down)}, -{0, 55299, 8, "move_left", 9, LINK_PROCS(move_left)}, -{0, 55300, 8, "move_right", 10, LINK_PROCS(move_right)}, -{0, 55304, 0, "seek_end_of_line", 16, LINK_PROCS(seek_end_of_line)}, -{0, 55303, 0, "seek_beginning_of_line", 22, LINK_PROCS(seek_beginning_of_line)}, -{0, 55305, 1, "goto_beginning_of_file", 22, LINK_PROCS(goto_beginning_of_file)}, -{0, 55306, 1, "goto_end_of_file", 16, LINK_PROCS(goto_end_of_file)}, -{0, 55305, 0, "page_up", 7, LINK_PROCS(page_up)}, -{0, 55306, 0, "page_down", 9, LINK_PROCS(page_down)}, -{0, 55304, 8, "seek_end_of_line", 16, LINK_PROCS(seek_end_of_line)}, -{0, 55303, 8, "seek_beginning_of_line", 22, LINK_PROCS(seek_beginning_of_line)}, -{0, 55305, 9, "goto_beginning_of_file", 22, LINK_PROCS(goto_beginning_of_file)}, -{0, 55306, 9, "goto_end_of_file", 16, LINK_PROCS(goto_end_of_file)}, -{0, 55305, 8, "page_up", 7, LINK_PROCS(page_up)}, -{0, 55306, 8, "page_down", 9, LINK_PROCS(page_down)}, -{0, 55297, 1, "move_up_to_blank_line_skip_whitespace", 37, LINK_PROCS(move_up_to_blank_line_skip_whitespace)}, -{0, 55298, 1, "move_down_to_blank_line_end", 27, LINK_PROCS(move_down_to_blank_line_end)}, -{0, 55299, 1, "move_left_whitespace_boundary", 29, LINK_PROCS(move_left_whitespace_boundary)}, -{0, 55300, 1, "move_right_whitespace_boundary", 30, LINK_PROCS(move_right_whitespace_boundary)}, -{0, 55297, 9, "move_up_to_blank_line_skip_whitespace", 37, LINK_PROCS(move_up_to_blank_line_skip_whitespace)}, -{0, 55298, 9, "move_down_to_blank_line_end", 27, LINK_PROCS(move_down_to_blank_line_end)}, -{0, 55299, 9, "move_left_whitespace_boundary", 29, LINK_PROCS(move_left_whitespace_boundary)}, -{0, 55300, 9, "move_right_whitespace_boundary", 30, LINK_PROCS(move_right_whitespace_boundary)}, -{0, 55297, 2, "move_line_up", 12, LINK_PROCS(move_line_up)}, -{0, 55298, 2, "move_line_down", 14, LINK_PROCS(move_line_down)}, -{0, 55296, 1, "backspace_alpha_numeric_boundary", 32, LINK_PROCS(backspace_alpha_numeric_boundary)}, -{0, 55301, 1, "delete_alpha_numeric_boundary", 29, LINK_PROCS(delete_alpha_numeric_boundary)}, -{0, 55296, 2, "snipe_backward_whitespace_or_token_boundary", 43, LINK_PROCS(snipe_backward_whitespace_or_token_boundary)}, -{0, 55301, 2, "snipe_forward_whitespace_or_token_boundary", 42, LINK_PROCS(snipe_forward_whitespace_or_token_boundary)}, -{0, 32, 1, "set_mark", 8, LINK_PROCS(set_mark)}, -{0, 97, 1, "replace_in_range", 16, LINK_PROCS(replace_in_range)}, -{0, 99, 1, "copy", 4, LINK_PROCS(copy)}, -{0, 100, 1, "delete_range", 12, LINK_PROCS(delete_range)}, -{0, 68, 1, "delete_line", 11, LINK_PROCS(delete_line)}, -{0, 101, 1, "center_view", 11, LINK_PROCS(center_view)}, -{0, 69, 1, "left_adjust_view", 16, LINK_PROCS(left_adjust_view)}, -{0, 102, 1, "search", 6, LINK_PROCS(search)}, -{0, 70, 1, "list_all_locations", 18, LINK_PROCS(list_all_locations)}, -{0, 70, 2, "list_all_substring_locations_case_insensitive", 45, LINK_PROCS(list_all_substring_locations_case_insensitive)}, -{0, 103, 1, "goto_line", 9, LINK_PROCS(goto_line)}, -{0, 71, 1, "list_all_locations_of_selection", 31, LINK_PROCS(list_all_locations_of_selection)}, -{0, 106, 1, "snippet_lister", 14, LINK_PROCS(snippet_lister)}, -{0, 75, 1, "kill_buffer", 11, LINK_PROCS(kill_buffer)}, -{0, 76, 1, "duplicate_line", 14, LINK_PROCS(duplicate_line)}, -{0, 109, 1, "cursor_mark_swap", 16, LINK_PROCS(cursor_mark_swap)}, -{0, 79, 1, "reopen", 6, LINK_PROCS(reopen)}, -{0, 113, 1, "query_replace", 13, LINK_PROCS(query_replace)}, -{0, 81, 1, "query_replace_identifier", 24, LINK_PROCS(query_replace_identifier)}, -{0, 113, 2, "query_replace_selection", 23, LINK_PROCS(query_replace_selection)}, -{0, 114, 1, "reverse_search", 14, LINK_PROCS(reverse_search)}, -{0, 115, 1, "save", 4, LINK_PROCS(save)}, -{0, 116, 1, "search_identifier", 17, LINK_PROCS(search_identifier)}, -{0, 84, 1, "list_all_locations_of_identifier", 32, LINK_PROCS(list_all_locations_of_identifier)}, -{0, 118, 1, "paste_and_indent", 16, LINK_PROCS(paste_and_indent)}, -{0, 86, 1, "paste_next_and_indent", 21, LINK_PROCS(paste_next_and_indent)}, -{0, 120, 1, "cut", 3, LINK_PROCS(cut)}, -{0, 121, 1, "redo", 4, LINK_PROCS(redo)}, -{0, 122, 1, "undo", 4, LINK_PROCS(undo)}, -{0, 49, 1, "view_buffer_other_panel", 23, LINK_PROCS(view_buffer_other_panel)}, -{0, 50, 1, "swap_buffers_between_panels", 27, LINK_PROCS(swap_buffers_between_panels)}, -{0, 10, 0, "newline_or_goto_position", 24, LINK_PROCS(newline_or_goto_position)}, -{0, 10, 8, "newline_or_goto_position_same_panel", 35, LINK_PROCS(newline_or_goto_position_same_panel)}, -{0, 62, 1, "view_jump_list_with_lister", 26, LINK_PROCS(view_jump_list_with_lister)}, -{0, 32, 8, "write_character", 15, LINK_PROCS(write_character)}, + {1, 0, 0, "write_character", 15, LINK_PROCS(write_character)}, + {0, 55317, 0, "click_set_cursor_and_mark", 25, LINK_PROCS(click_set_cursor_and_mark)}, + {0, 55324, 0, "click_set_cursor_and_mark", 25, LINK_PROCS(click_set_cursor_and_mark)}, + {0, 55319, 0, "click_set_cursor", 16, LINK_PROCS(click_set_cursor)}, + {0, 55322, 0, "click_set_cursor_if_lbutton", 27, LINK_PROCS(click_set_cursor_if_lbutton)}, + {0, 55301, 0, "delete_char", 11, LINK_PROCS(delete_char)}, + {0, 55301, 8, "delete_char", 11, LINK_PROCS(delete_char)}, + {0, 55296, 0, "backspace_char", 14, LINK_PROCS(backspace_char)}, + {0, 55296, 8, "backspace_char", 14, LINK_PROCS(backspace_char)}, + {0, 55297, 0, "move_up", 7, LINK_PROCS(move_up)}, + {0, 55298, 0, "move_down", 9, LINK_PROCS(move_down)}, + {0, 55299, 0, "move_left", 9, LINK_PROCS(move_left)}, + {0, 55300, 0, "move_right", 10, LINK_PROCS(move_right)}, + {0, 55297, 8, "move_up", 7, LINK_PROCS(move_up)}, + {0, 55298, 8, "move_down", 9, LINK_PROCS(move_down)}, + {0, 55299, 8, "move_left", 9, LINK_PROCS(move_left)}, + {0, 55300, 8, "move_right", 10, LINK_PROCS(move_right)}, + {0, 55304, 0, "seek_end_of_line", 16, LINK_PROCS(seek_end_of_line)}, + {0, 55303, 0, "seek_beginning_of_line", 22, LINK_PROCS(seek_beginning_of_line)}, + {0, 55305, 1, "goto_beginning_of_file", 22, LINK_PROCS(goto_beginning_of_file)}, + {0, 55306, 1, "goto_end_of_file", 16, LINK_PROCS(goto_end_of_file)}, + {0, 55305, 0, "page_up", 7, LINK_PROCS(page_up)}, + {0, 55306, 0, "page_down", 9, LINK_PROCS(page_down)}, + {0, 55304, 8, "seek_end_of_line", 16, LINK_PROCS(seek_end_of_line)}, + {0, 55303, 8, "seek_beginning_of_line", 22, LINK_PROCS(seek_beginning_of_line)}, + {0, 55305, 9, "goto_beginning_of_file", 22, LINK_PROCS(goto_beginning_of_file)}, + {0, 55306, 9, "goto_end_of_file", 16, LINK_PROCS(goto_end_of_file)}, + {0, 55305, 8, "page_up", 7, LINK_PROCS(page_up)}, + {0, 55306, 8, "page_down", 9, LINK_PROCS(page_down)}, + {0, 55297, 1, "move_up_to_blank_line_skip_whitespace", 37, LINK_PROCS(move_up_to_blank_line_skip_whitespace)}, + {0, 55298, 1, "move_down_to_blank_line_end", 27, LINK_PROCS(move_down_to_blank_line_end)}, + {0, 55299, 1, "move_left_whitespace_boundary", 29, LINK_PROCS(move_left_whitespace_boundary)}, + {0, 55300, 1, "move_right_whitespace_boundary", 30, LINK_PROCS(move_right_whitespace_boundary)}, + {0, 55297, 9, "move_up_to_blank_line_skip_whitespace", 37, LINK_PROCS(move_up_to_blank_line_skip_whitespace)}, + {0, 55298, 9, "move_down_to_blank_line_end", 27, LINK_PROCS(move_down_to_blank_line_end)}, + {0, 55299, 9, "move_left_whitespace_boundary", 29, LINK_PROCS(move_left_whitespace_boundary)}, + {0, 55300, 9, "move_right_whitespace_boundary", 30, LINK_PROCS(move_right_whitespace_boundary)}, + {0, 55297, 2, "move_line_up", 12, LINK_PROCS(move_line_up)}, + {0, 55298, 2, "move_line_down", 14, LINK_PROCS(move_line_down)}, + {0, 55296, 1, "backspace_alpha_numeric_boundary", 32, LINK_PROCS(backspace_alpha_numeric_boundary)}, + {0, 55301, 1, "delete_alpha_numeric_boundary", 29, LINK_PROCS(delete_alpha_numeric_boundary)}, + {0, 55296, 2, "snipe_backward_whitespace_or_token_boundary", 43, LINK_PROCS(snipe_backward_whitespace_or_token_boundary)}, + {0, 55301, 2, "snipe_forward_whitespace_or_token_boundary", 42, LINK_PROCS(snipe_forward_whitespace_or_token_boundary)}, + {0, 32, 1, "set_mark", 8, LINK_PROCS(set_mark)}, + {0, 97, 1, "replace_in_range", 16, LINK_PROCS(replace_in_range)}, + {0, 99, 1, "copy", 4, LINK_PROCS(copy)}, + {0, 100, 1, "delete_range", 12, LINK_PROCS(delete_range)}, + {0, 68, 1, "delete_line", 11, LINK_PROCS(delete_line)}, + {0, 101, 1, "center_view", 11, LINK_PROCS(center_view)}, + {0, 69, 1, "left_adjust_view", 16, LINK_PROCS(left_adjust_view)}, + {0, 102, 1, "search", 6, LINK_PROCS(search)}, + {0, 70, 1, "list_all_locations", 18, LINK_PROCS(list_all_locations)}, + {0, 70, 2, "list_all_substring_locations_case_insensitive", 45, LINK_PROCS(list_all_substring_locations_case_insensitive)}, + {0, 103, 1, "goto_line", 9, LINK_PROCS(goto_line)}, + {0, 71, 1, "list_all_locations_of_selection", 31, LINK_PROCS(list_all_locations_of_selection)}, + {0, 106, 1, "snippet_lister", 14, LINK_PROCS(snippet_lister)}, + {0, 75, 1, "kill_buffer", 11, LINK_PROCS(kill_buffer)}, + {0, 76, 1, "duplicate_line", 14, LINK_PROCS(duplicate_line)}, + {0, 109, 1, "cursor_mark_swap", 16, LINK_PROCS(cursor_mark_swap)}, + {0, 79, 1, "reopen", 6, LINK_PROCS(reopen)}, + {0, 113, 1, "query_replace", 13, LINK_PROCS(query_replace)}, + {0, 81, 1, "query_replace_identifier", 24, LINK_PROCS(query_replace_identifier)}, + {0, 113, 2, "query_replace_selection", 23, LINK_PROCS(query_replace_selection)}, + {0, 114, 1, "reverse_search", 14, LINK_PROCS(reverse_search)}, + {0, 115, 1, "save", 4, LINK_PROCS(save)}, + {0, 116, 1, "search_identifier", 17, LINK_PROCS(search_identifier)}, + {0, 84, 1, "list_all_locations_of_identifier", 32, LINK_PROCS(list_all_locations_of_identifier)}, + {0, 118, 1, "paste_and_indent", 16, LINK_PROCS(paste_and_indent)}, + {0, 86, 1, "paste_next_and_indent", 21, LINK_PROCS(paste_next_and_indent)}, + {0, 120, 1, "cut", 3, LINK_PROCS(cut)}, + {0, 121, 1, "redo", 4, LINK_PROCS(redo)}, + {0, 122, 1, "undo", 4, LINK_PROCS(undo)}, + {0, 49, 1, "view_buffer_other_panel", 23, LINK_PROCS(view_buffer_other_panel)}, + {0, 50, 1, "swap_buffers_between_panels", 27, LINK_PROCS(swap_buffers_between_panels)}, + {0, 10, 0, "newline_or_goto_position", 24, LINK_PROCS(newline_or_goto_position)}, + {0, 10, 8, "newline_or_goto_position_same_panel", 35, LINK_PROCS(newline_or_goto_position_same_panel)}, + {0, 62, 1, "view_jump_list_with_lister", 26, LINK_PROCS(view_jump_list_with_lister)}, + {0, 32, 8, "write_character", 15, LINK_PROCS(write_character)}, }; static Meta_Key_Bind fcoder_binds_for_default_default_code_map[33] = { -{0, 55299, 1, "move_left_alpha_numeric_or_camel_boundary", 41, LINK_PROCS(move_left_alpha_numeric_or_camel_boundary)}, -{0, 55300, 1, "move_right_alpha_numeric_or_camel_boundary", 42, LINK_PROCS(move_right_alpha_numeric_or_camel_boundary)}, -{0, 55299, 2, "move_left_alpha_numeric_boundary", 32, LINK_PROCS(move_left_alpha_numeric_boundary)}, -{0, 55300, 2, "move_right_alpha_numeric_boundary", 33, LINK_PROCS(move_right_alpha_numeric_boundary)}, -{0, 10, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, -{0, 10, 8, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, -{0, 125, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, -{0, 41, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, -{0, 93, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, -{0, 59, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, -{0, 35, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, -{0, 59, 1, "comment_line_toggle", 19, LINK_PROCS(comment_line_toggle)}, -{0, 9, 0, "word_complete", 13, LINK_PROCS(word_complete)}, -{0, 9, 1, "auto_tab_range", 14, LINK_PROCS(auto_tab_range)}, -{0, 9, 8, "auto_tab_line_at_cursor", 23, LINK_PROCS(auto_tab_line_at_cursor)}, -{0, 114, 2, "write_block", 11, LINK_PROCS(write_block)}, -{0, 116, 2, "write_todo", 10, LINK_PROCS(write_todo)}, -{0, 121, 2, "write_note", 10, LINK_PROCS(write_note)}, -{0, 68, 2, "list_all_locations_of_type_definition", 37, LINK_PROCS(list_all_locations_of_type_definition)}, -{0, 84, 2, "list_all_locations_of_type_definition_of_identifier", 51, LINK_PROCS(list_all_locations_of_type_definition_of_identifier)}, -{0, 91, 1, "open_long_braces", 16, LINK_PROCS(open_long_braces)}, -{0, 123, 1, "open_long_braces_semicolon", 26, LINK_PROCS(open_long_braces_semicolon)}, -{0, 125, 1, "open_long_braces_break", 22, LINK_PROCS(open_long_braces_break)}, -{0, 91, 2, "select_surrounding_scope", 24, LINK_PROCS(select_surrounding_scope)}, -{0, 93, 2, "select_prev_scope_absolute", 26, LINK_PROCS(select_prev_scope_absolute)}, -{0, 39, 2, "select_next_scope_absolute", 26, LINK_PROCS(select_next_scope_absolute)}, -{0, 47, 2, "place_in_scope", 14, LINK_PROCS(place_in_scope)}, -{0, 45, 2, "delete_current_scope", 20, LINK_PROCS(delete_current_scope)}, -{0, 106, 2, "scope_absorb_down", 17, LINK_PROCS(scope_absorb_down)}, -{0, 105, 2, "if0_off", 7, LINK_PROCS(if0_off)}, -{0, 49, 2, "open_file_in_quotes", 19, LINK_PROCS(open_file_in_quotes)}, -{0, 50, 2, "open_matching_file_cpp", 22, LINK_PROCS(open_matching_file_cpp)}, -{0, 48, 1, "write_zero_struct", 17, LINK_PROCS(write_zero_struct)}, + {0, 55299, 1, "move_left_alpha_numeric_or_camel_boundary", 41, LINK_PROCS(move_left_alpha_numeric_or_camel_boundary)}, + {0, 55300, 1, "move_right_alpha_numeric_or_camel_boundary", 42, LINK_PROCS(move_right_alpha_numeric_or_camel_boundary)}, + {0, 55299, 2, "move_left_alpha_numeric_boundary", 32, LINK_PROCS(move_left_alpha_numeric_boundary)}, + {0, 55300, 2, "move_right_alpha_numeric_boundary", 33, LINK_PROCS(move_right_alpha_numeric_boundary)}, + {0, 10, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, + {0, 10, 8, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, + {0, 125, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, + {0, 41, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, + {0, 93, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, + {0, 59, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, + {0, 35, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, + {0, 59, 1, "comment_line_toggle", 19, LINK_PROCS(comment_line_toggle)}, + {0, 9, 0, "word_complete", 13, LINK_PROCS(word_complete)}, + {0, 9, 1, "auto_tab_range", 14, LINK_PROCS(auto_tab_range)}, + {0, 9, 8, "auto_tab_line_at_cursor", 23, LINK_PROCS(auto_tab_line_at_cursor)}, + {0, 114, 2, "write_block", 11, LINK_PROCS(write_block)}, + {0, 116, 2, "write_todo", 10, LINK_PROCS(write_todo)}, + {0, 121, 2, "write_note", 10, LINK_PROCS(write_note)}, + {0, 68, 2, "list_all_locations_of_type_definition", 37, LINK_PROCS(list_all_locations_of_type_definition)}, + {0, 84, 2, "list_all_locations_of_type_definition_of_identifier", 51, LINK_PROCS(list_all_locations_of_type_definition_of_identifier)}, + {0, 91, 1, "open_long_braces", 16, LINK_PROCS(open_long_braces)}, + {0, 123, 1, "open_long_braces_semicolon", 26, LINK_PROCS(open_long_braces_semicolon)}, + {0, 125, 1, "open_long_braces_break", 22, LINK_PROCS(open_long_braces_break)}, + {0, 91, 2, "select_surrounding_scope", 24, LINK_PROCS(select_surrounding_scope)}, + {0, 93, 2, "select_prev_scope_absolute", 26, LINK_PROCS(select_prev_scope_absolute)}, + {0, 39, 2, "select_next_scope_absolute", 26, LINK_PROCS(select_next_scope_absolute)}, + {0, 47, 2, "place_in_scope", 14, LINK_PROCS(place_in_scope)}, + {0, 45, 2, "delete_current_scope", 20, LINK_PROCS(delete_current_scope)}, + {0, 105, 2, "if0_off", 7, LINK_PROCS(if0_off)}, + {0, 49, 2, "open_file_in_quotes", 19, LINK_PROCS(open_file_in_quotes)}, + {0, 50, 2, "open_matching_file_cpp", 22, LINK_PROCS(open_matching_file_cpp)}, + {0, 48, 1, "write_zero_struct", 17, LINK_PROCS(write_zero_struct)}, }; static Meta_Key_Bind fcoder_binds_for_default_default_lister_ui_map[23] = { -{1, 0, 0, "lister__write_character", 23, LINK_PROCS(lister__write_character)}, -{0, 55307, 0, "lister__quit", 12, LINK_PROCS(lister__quit)}, -{0, 10, 0, "lister__activate", 16, LINK_PROCS(lister__activate)}, -{0, 9, 0, "lister__activate", 16, LINK_PROCS(lister__activate)}, -{0, 55296, 0, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, -{0, 55296, 1, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, -{0, 55296, 2, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, -{0, 55296, 4, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, -{0, 55296, 3, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, -{0, 55296, 6, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, -{0, 55296, 5, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, -{0, 55296, 7, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, -{0, 55297, 0, "lister__move_up", 15, LINK_PROCS(lister__move_up)}, -{0, 107, 2, "lister__move_up", 15, LINK_PROCS(lister__move_up)}, -{0, 55305, 0, "lister__move_up", 15, LINK_PROCS(lister__move_up)}, -{0, 55298, 0, "lister__move_down", 17, LINK_PROCS(lister__move_down)}, -{0, 106, 2, "lister__move_down", 17, LINK_PROCS(lister__move_down)}, -{0, 55306, 0, "lister__move_down", 17, LINK_PROCS(lister__move_down)}, -{0, 55321, 0, "lister__wheel_scroll", 20, LINK_PROCS(lister__wheel_scroll)}, -{0, 55317, 0, "lister__mouse_press", 19, LINK_PROCS(lister__mouse_press)}, -{0, 55319, 0, "lister__mouse_release", 21, LINK_PROCS(lister__mouse_release)}, -{0, 55322, 0, "lister__repaint", 15, LINK_PROCS(lister__repaint)}, -{0, 55323, 0, "lister__repaint", 15, LINK_PROCS(lister__repaint)}, + {1, 0, 0, "lister__write_character", 23, LINK_PROCS(lister__write_character)}, + {0, 55307, 0, "lister__quit", 12, LINK_PROCS(lister__quit)}, + {0, 10, 0, "lister__activate", 16, LINK_PROCS(lister__activate)}, + {0, 9, 0, "lister__activate", 16, LINK_PROCS(lister__activate)}, + {0, 55296, 0, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, + {0, 55296, 1, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, + {0, 55296, 2, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, + {0, 55296, 4, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, + {0, 55296, 3, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, + {0, 55296, 6, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, + {0, 55296, 5, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, + {0, 55296, 7, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, + {0, 55297, 0, "lister__move_up", 15, LINK_PROCS(lister__move_up)}, + {0, 107, 2, "lister__move_up", 15, LINK_PROCS(lister__move_up)}, + {0, 55305, 0, "lister__move_up", 15, LINK_PROCS(lister__move_up)}, + {0, 55298, 0, "lister__move_down", 17, LINK_PROCS(lister__move_down)}, + {0, 106, 2, "lister__move_down", 17, LINK_PROCS(lister__move_down)}, + {0, 55306, 0, "lister__move_down", 17, LINK_PROCS(lister__move_down)}, + {0, 55321, 0, "lister__wheel_scroll", 20, LINK_PROCS(lister__wheel_scroll)}, + {0, 55317, 0, "lister__mouse_press", 19, LINK_PROCS(lister__mouse_press)}, + {0, 55319, 0, "lister__mouse_release", 21, LINK_PROCS(lister__mouse_release)}, + {0, 55322, 0, "lister__repaint", 15, LINK_PROCS(lister__repaint)}, + {0, 55323, 0, "lister__repaint", 15, LINK_PROCS(lister__repaint)}, }; static Meta_Sub_Map fcoder_submaps_for_default[4] = { -{"mapid_global", 12, "The following bindings apply in all situations.", 47, 0, 0, fcoder_binds_for_default_mapid_global, 43}, -{"mapid_file", 10, "The following bindings apply in general text files and most apply in code files, but some are overriden by other commands specific to code files.", 145, 0, 0, fcoder_binds_for_default_mapid_file, 78}, -{"default_code_map", 16, "The following commands only apply in files where the lexer (syntax highlighting) is turned on.", 94, "mapid_file", 10, fcoder_binds_for_default_default_code_map, 33}, -{"default_lister_ui_map", 21, "These commands apply in 'lister mode' such as when you open a file.", 67, 0, 0, fcoder_binds_for_default_default_lister_ui_map, 23}, + {"mapid_global", 12, "The following bindings apply in all situations.", 47, 0, 0, fcoder_binds_for_default_mapid_global, 43}, + {"mapid_file", 10, "The following bindings apply in general text files and most apply in code files, but some are overriden by other commands specific to code files.", 145, 0, 0, fcoder_binds_for_default_mapid_file, 78}, + {"default_code_map", 16, "The following commands only apply in files where the lexer (syntax highlighting) is turned on.", 94, "mapid_file", 10, fcoder_binds_for_default_default_code_map, 33}, + {"default_lister_ui_map", 21, "These commands apply in 'lister mode' such as when you open a file.", 67, 0, 0, fcoder_binds_for_default_default_lister_ui_map, 23}, }; static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_global[40] = { -{0, 44, 4, "change_active_panel", 19, LINK_PROCS(change_active_panel)}, -{0, 60, 4, "change_active_panel_backwards", 29, LINK_PROCS(change_active_panel_backwards)}, -{0, 110, 4, "interactive_new", 15, LINK_PROCS(interactive_new)}, -{0, 111, 4, "interactive_open_or_new", 23, LINK_PROCS(interactive_open_or_new)}, -{0, 111, 1, "open_in_other", 13, LINK_PROCS(open_in_other)}, -{0, 107, 4, "interactive_kill_buffer", 23, LINK_PROCS(interactive_kill_buffer)}, -{0, 105, 4, "interactive_switch_buffer", 25, LINK_PROCS(interactive_switch_buffer)}, -{0, 104, 4, "project_go_to_root_directory", 28, LINK_PROCS(project_go_to_root_directory)}, -{0, 83, 4, "save_all_dirty_buffers", 22, LINK_PROCS(save_all_dirty_buffers)}, -{0, 46, 1, "change_to_build_panel", 21, LINK_PROCS(change_to_build_panel)}, -{0, 44, 1, "close_build_panel", 17, LINK_PROCS(close_build_panel)}, -{0, 110, 1, "goto_next_jump", 14, LINK_PROCS(goto_next_jump)}, -{0, 78, 1, "goto_prev_jump", 14, LINK_PROCS(goto_prev_jump)}, -{0, 77, 1, "goto_first_jump", 15, LINK_PROCS(goto_first_jump)}, -{0, 109, 1, "build_in_build_panel", 20, LINK_PROCS(build_in_build_panel)}, -{0, 98, 1, "toggle_filebar", 14, LINK_PROCS(toggle_filebar)}, -{0, 122, 1, "execute_any_cli", 15, LINK_PROCS(execute_any_cli)}, -{0, 90, 1, "execute_previous_cli", 20, LINK_PROCS(execute_previous_cli)}, -{0, 120, 1, "command_lister", 14, LINK_PROCS(command_lister)}, -{0, 88, 1, "project_command_lister", 22, LINK_PROCS(project_command_lister)}, -{0, 73, 4, "list_all_functions_all_buffers_lister", 37, LINK_PROCS(list_all_functions_all_buffers_lister)}, -{0, 69, 1, "exit_4coder", 11, LINK_PROCS(exit_4coder)}, -{0, 55326, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55327, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55328, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55329, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55330, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55331, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55332, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55333, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55334, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55335, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55336, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55337, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55338, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55339, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55340, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55341, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, -{0, 55321, 0, "mouse_wheel_scroll", 18, LINK_PROCS(mouse_wheel_scroll)}, -{0, 55321, 4, "mouse_wheel_change_face_size", 28, LINK_PROCS(mouse_wheel_change_face_size)}, + {0, 44, 4, "change_active_panel", 19, LINK_PROCS(change_active_panel)}, + {0, 60, 4, "change_active_panel_backwards", 29, LINK_PROCS(change_active_panel_backwards)}, + {0, 110, 4, "interactive_new", 15, LINK_PROCS(interactive_new)}, + {0, 111, 4, "interactive_open_or_new", 23, LINK_PROCS(interactive_open_or_new)}, + {0, 111, 1, "open_in_other", 13, LINK_PROCS(open_in_other)}, + {0, 107, 4, "interactive_kill_buffer", 23, LINK_PROCS(interactive_kill_buffer)}, + {0, 105, 4, "interactive_switch_buffer", 25, LINK_PROCS(interactive_switch_buffer)}, + {0, 104, 4, "project_go_to_root_directory", 28, LINK_PROCS(project_go_to_root_directory)}, + {0, 83, 4, "save_all_dirty_buffers", 22, LINK_PROCS(save_all_dirty_buffers)}, + {0, 46, 1, "change_to_build_panel", 21, LINK_PROCS(change_to_build_panel)}, + {0, 44, 1, "close_build_panel", 17, LINK_PROCS(close_build_panel)}, + {0, 110, 1, "goto_next_jump", 14, LINK_PROCS(goto_next_jump)}, + {0, 78, 1, "goto_prev_jump", 14, LINK_PROCS(goto_prev_jump)}, + {0, 77, 1, "goto_first_jump", 15, LINK_PROCS(goto_first_jump)}, + {0, 109, 1, "build_in_build_panel", 20, LINK_PROCS(build_in_build_panel)}, + {0, 98, 1, "toggle_filebar", 14, LINK_PROCS(toggle_filebar)}, + {0, 122, 1, "execute_any_cli", 15, LINK_PROCS(execute_any_cli)}, + {0, 90, 1, "execute_previous_cli", 20, LINK_PROCS(execute_previous_cli)}, + {0, 120, 1, "command_lister", 14, LINK_PROCS(command_lister)}, + {0, 88, 1, "project_command_lister", 22, LINK_PROCS(project_command_lister)}, + {0, 73, 4, "list_all_functions_all_buffers_lister", 37, LINK_PROCS(list_all_functions_all_buffers_lister)}, + {0, 69, 1, "exit_4coder", 11, LINK_PROCS(exit_4coder)}, + {0, 55326, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55327, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55328, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55329, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55330, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55331, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55332, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55333, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55334, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55335, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55336, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55337, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55338, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55339, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55340, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55341, 0, "project_fkey_command", 20, LINK_PROCS(project_fkey_command)}, + {0, 55321, 0, "mouse_wheel_scroll", 18, LINK_PROCS(mouse_wheel_scroll)}, + {0, 55321, 4, "mouse_wheel_change_face_size", 28, LINK_PROCS(mouse_wheel_change_face_size)}, }; static Meta_Key_Bind fcoder_binds_for_mac_default_mapid_file[77] = { -{1, 0, 0, "write_character", 15, LINK_PROCS(write_character)}, -{1, 0, 2, "write_character", 15, LINK_PROCS(write_character)}, -{0, 55317, 0, "click_set_cursor_and_mark", 25, LINK_PROCS(click_set_cursor_and_mark)}, -{0, 55324, 0, "click_set_cursor_and_mark", 25, LINK_PROCS(click_set_cursor_and_mark)}, -{0, 55319, 0, "click_set_cursor", 16, LINK_PROCS(click_set_cursor)}, -{0, 55322, 0, "click_set_cursor_if_lbutton", 27, LINK_PROCS(click_set_cursor_if_lbutton)}, -{0, 55301, 0, "delete_char", 11, LINK_PROCS(delete_char)}, -{0, 55301, 8, "delete_char", 11, LINK_PROCS(delete_char)}, -{0, 55296, 0, "backspace_char", 14, LINK_PROCS(backspace_char)}, -{0, 55296, 8, "backspace_char", 14, LINK_PROCS(backspace_char)}, -{0, 55297, 0, "move_up", 7, LINK_PROCS(move_up)}, -{0, 55298, 0, "move_down", 9, LINK_PROCS(move_down)}, -{0, 55299, 0, "move_left", 9, LINK_PROCS(move_left)}, -{0, 55300, 0, "move_right", 10, LINK_PROCS(move_right)}, -{0, 55297, 8, "move_up", 7, LINK_PROCS(move_up)}, -{0, 55298, 8, "move_down", 9, LINK_PROCS(move_down)}, -{0, 55299, 8, "move_left", 9, LINK_PROCS(move_left)}, -{0, 55300, 8, "move_right", 10, LINK_PROCS(move_right)}, -{0, 55304, 0, "seek_end_of_line", 16, LINK_PROCS(seek_end_of_line)}, -{0, 55303, 0, "seek_beginning_of_line", 22, LINK_PROCS(seek_beginning_of_line)}, -{0, 55305, 1, "goto_beginning_of_file", 22, LINK_PROCS(goto_beginning_of_file)}, -{0, 55306, 1, "goto_end_of_file", 16, LINK_PROCS(goto_end_of_file)}, -{0, 55305, 0, "page_up", 7, LINK_PROCS(page_up)}, -{0, 55306, 0, "page_down", 9, LINK_PROCS(page_down)}, -{0, 55304, 8, "seek_end_of_line", 16, LINK_PROCS(seek_end_of_line)}, -{0, 55303, 8, "seek_beginning_of_line", 22, LINK_PROCS(seek_beginning_of_line)}, -{0, 55305, 9, "goto_beginning_of_file", 22, LINK_PROCS(goto_beginning_of_file)}, -{0, 55306, 9, "goto_end_of_file", 16, LINK_PROCS(goto_end_of_file)}, -{0, 55305, 8, "page_up", 7, LINK_PROCS(page_up)}, -{0, 55306, 8, "page_down", 9, LINK_PROCS(page_down)}, -{0, 55297, 4, "move_up_to_blank_line_skip_whitespace", 37, LINK_PROCS(move_up_to_blank_line_skip_whitespace)}, -{0, 55298, 4, "move_down_to_blank_line_end", 27, LINK_PROCS(move_down_to_blank_line_end)}, -{0, 55299, 4, "move_left_whitespace_boundary", 29, LINK_PROCS(move_left_whitespace_boundary)}, -{0, 55300, 4, "move_right_whitespace_boundary", 30, LINK_PROCS(move_right_whitespace_boundary)}, -{0, 55297, 12, "move_up_to_blank_line_skip_whitespace", 37, LINK_PROCS(move_up_to_blank_line_skip_whitespace)}, -{0, 55298, 12, "move_down_to_blank_line_end", 27, LINK_PROCS(move_down_to_blank_line_end)}, -{0, 55299, 12, "move_left_whitespace_boundary", 29, LINK_PROCS(move_left_whitespace_boundary)}, -{0, 55300, 12, "move_right_whitespace_boundary", 30, LINK_PROCS(move_right_whitespace_boundary)}, -{0, 55297, 2, "move_line_up", 12, LINK_PROCS(move_line_up)}, -{0, 55298, 2, "move_line_down", 14, LINK_PROCS(move_line_down)}, -{0, 55296, 4, "backspace_alpha_numeric_boundary", 32, LINK_PROCS(backspace_alpha_numeric_boundary)}, -{0, 55301, 4, "delete_alpha_numeric_boundary", 29, LINK_PROCS(delete_alpha_numeric_boundary)}, -{0, 55296, 1, "snipe_backward_whitespace_or_token_boundary", 43, LINK_PROCS(snipe_backward_whitespace_or_token_boundary)}, -{0, 55301, 1, "snipe_forward_whitespace_or_token_boundary", 42, LINK_PROCS(snipe_forward_whitespace_or_token_boundary)}, -{0, 47, 4, "set_mark", 8, LINK_PROCS(set_mark)}, -{0, 97, 4, "replace_in_range", 16, LINK_PROCS(replace_in_range)}, -{0, 99, 4, "copy", 4, LINK_PROCS(copy)}, -{0, 100, 4, "delete_range", 12, LINK_PROCS(delete_range)}, -{0, 68, 4, "delete_line", 11, LINK_PROCS(delete_line)}, -{0, 101, 4, "center_view", 11, LINK_PROCS(center_view)}, -{0, 69, 4, "left_adjust_view", 16, LINK_PROCS(left_adjust_view)}, -{0, 102, 4, "search", 6, LINK_PROCS(search)}, -{0, 70, 4, "list_all_locations", 18, LINK_PROCS(list_all_locations)}, -{0, 70, 1, "list_all_substring_locations_case_insensitive", 45, LINK_PROCS(list_all_substring_locations_case_insensitive)}, -{0, 103, 4, "goto_line", 9, LINK_PROCS(goto_line)}, -{0, 71, 4, "list_all_locations_of_selection", 31, LINK_PROCS(list_all_locations_of_selection)}, -{0, 75, 4, "kill_buffer", 11, LINK_PROCS(kill_buffer)}, -{0, 76, 4, "duplicate_line", 14, LINK_PROCS(duplicate_line)}, -{0, 109, 4, "cursor_mark_swap", 16, LINK_PROCS(cursor_mark_swap)}, -{0, 79, 4, "reopen", 6, LINK_PROCS(reopen)}, -{0, 113, 4, "query_replace", 13, LINK_PROCS(query_replace)}, -{0, 81, 4, "query_replace_identifier", 24, LINK_PROCS(query_replace_identifier)}, -{0, 114, 4, "reverse_search", 14, LINK_PROCS(reverse_search)}, -{0, 115, 4, "save", 4, LINK_PROCS(save)}, -{0, 116, 4, "search_identifier", 17, LINK_PROCS(search_identifier)}, -{0, 84, 4, "list_all_locations_of_identifier", 32, LINK_PROCS(list_all_locations_of_identifier)}, -{0, 118, 4, "paste_and_indent", 16, LINK_PROCS(paste_and_indent)}, -{0, 86, 4, "paste_next_and_indent", 21, LINK_PROCS(paste_next_and_indent)}, -{0, 120, 4, "cut", 3, LINK_PROCS(cut)}, -{0, 121, 4, "redo", 4, LINK_PROCS(redo)}, -{0, 122, 4, "undo", 4, LINK_PROCS(undo)}, -{0, 49, 4, "view_buffer_other_panel", 23, LINK_PROCS(view_buffer_other_panel)}, -{0, 50, 4, "swap_buffers_between_panels", 27, LINK_PROCS(swap_buffers_between_panels)}, -{0, 10, 0, "newline_or_goto_position", 24, LINK_PROCS(newline_or_goto_position)}, -{0, 10, 8, "newline_or_goto_position_same_panel", 35, LINK_PROCS(newline_or_goto_position_same_panel)}, -{0, 62, 4, "view_jump_list_with_lister", 26, LINK_PROCS(view_jump_list_with_lister)}, -{0, 32, 8, "write_character", 15, LINK_PROCS(write_character)}, + {1, 0, 0, "write_character", 15, LINK_PROCS(write_character)}, + {1, 0, 2, "write_character", 15, LINK_PROCS(write_character)}, + {0, 55317, 0, "click_set_cursor_and_mark", 25, LINK_PROCS(click_set_cursor_and_mark)}, + {0, 55324, 0, "click_set_cursor_and_mark", 25, LINK_PROCS(click_set_cursor_and_mark)}, + {0, 55319, 0, "click_set_cursor", 16, LINK_PROCS(click_set_cursor)}, + {0, 55322, 0, "click_set_cursor_if_lbutton", 27, LINK_PROCS(click_set_cursor_if_lbutton)}, + {0, 55301, 0, "delete_char", 11, LINK_PROCS(delete_char)}, + {0, 55301, 8, "delete_char", 11, LINK_PROCS(delete_char)}, + {0, 55296, 0, "backspace_char", 14, LINK_PROCS(backspace_char)}, + {0, 55296, 8, "backspace_char", 14, LINK_PROCS(backspace_char)}, + {0, 55297, 0, "move_up", 7, LINK_PROCS(move_up)}, + {0, 55298, 0, "move_down", 9, LINK_PROCS(move_down)}, + {0, 55299, 0, "move_left", 9, LINK_PROCS(move_left)}, + {0, 55300, 0, "move_right", 10, LINK_PROCS(move_right)}, + {0, 55297, 8, "move_up", 7, LINK_PROCS(move_up)}, + {0, 55298, 8, "move_down", 9, LINK_PROCS(move_down)}, + {0, 55299, 8, "move_left", 9, LINK_PROCS(move_left)}, + {0, 55300, 8, "move_right", 10, LINK_PROCS(move_right)}, + {0, 55304, 0, "seek_end_of_line", 16, LINK_PROCS(seek_end_of_line)}, + {0, 55303, 0, "seek_beginning_of_line", 22, LINK_PROCS(seek_beginning_of_line)}, + {0, 55305, 1, "goto_beginning_of_file", 22, LINK_PROCS(goto_beginning_of_file)}, + {0, 55306, 1, "goto_end_of_file", 16, LINK_PROCS(goto_end_of_file)}, + {0, 55305, 0, "page_up", 7, LINK_PROCS(page_up)}, + {0, 55306, 0, "page_down", 9, LINK_PROCS(page_down)}, + {0, 55304, 8, "seek_end_of_line", 16, LINK_PROCS(seek_end_of_line)}, + {0, 55303, 8, "seek_beginning_of_line", 22, LINK_PROCS(seek_beginning_of_line)}, + {0, 55305, 9, "goto_beginning_of_file", 22, LINK_PROCS(goto_beginning_of_file)}, + {0, 55306, 9, "goto_end_of_file", 16, LINK_PROCS(goto_end_of_file)}, + {0, 55305, 8, "page_up", 7, LINK_PROCS(page_up)}, + {0, 55306, 8, "page_down", 9, LINK_PROCS(page_down)}, + {0, 55297, 4, "move_up_to_blank_line_skip_whitespace", 37, LINK_PROCS(move_up_to_blank_line_skip_whitespace)}, + {0, 55298, 4, "move_down_to_blank_line_end", 27, LINK_PROCS(move_down_to_blank_line_end)}, + {0, 55299, 4, "move_left_whitespace_boundary", 29, LINK_PROCS(move_left_whitespace_boundary)}, + {0, 55300, 4, "move_right_whitespace_boundary", 30, LINK_PROCS(move_right_whitespace_boundary)}, + {0, 55297, 12, "move_up_to_blank_line_skip_whitespace", 37, LINK_PROCS(move_up_to_blank_line_skip_whitespace)}, + {0, 55298, 12, "move_down_to_blank_line_end", 27, LINK_PROCS(move_down_to_blank_line_end)}, + {0, 55299, 12, "move_left_whitespace_boundary", 29, LINK_PROCS(move_left_whitespace_boundary)}, + {0, 55300, 12, "move_right_whitespace_boundary", 30, LINK_PROCS(move_right_whitespace_boundary)}, + {0, 55297, 2, "move_line_up", 12, LINK_PROCS(move_line_up)}, + {0, 55298, 2, "move_line_down", 14, LINK_PROCS(move_line_down)}, + {0, 55296, 4, "backspace_alpha_numeric_boundary", 32, LINK_PROCS(backspace_alpha_numeric_boundary)}, + {0, 55301, 4, "delete_alpha_numeric_boundary", 29, LINK_PROCS(delete_alpha_numeric_boundary)}, + {0, 55296, 1, "snipe_backward_whitespace_or_token_boundary", 43, LINK_PROCS(snipe_backward_whitespace_or_token_boundary)}, + {0, 55301, 1, "snipe_forward_whitespace_or_token_boundary", 42, LINK_PROCS(snipe_forward_whitespace_or_token_boundary)}, + {0, 47, 4, "set_mark", 8, LINK_PROCS(set_mark)}, + {0, 97, 4, "replace_in_range", 16, LINK_PROCS(replace_in_range)}, + {0, 99, 4, "copy", 4, LINK_PROCS(copy)}, + {0, 100, 4, "delete_range", 12, LINK_PROCS(delete_range)}, + {0, 68, 4, "delete_line", 11, LINK_PROCS(delete_line)}, + {0, 101, 4, "center_view", 11, LINK_PROCS(center_view)}, + {0, 69, 4, "left_adjust_view", 16, LINK_PROCS(left_adjust_view)}, + {0, 102, 4, "search", 6, LINK_PROCS(search)}, + {0, 70, 4, "list_all_locations", 18, LINK_PROCS(list_all_locations)}, + {0, 70, 1, "list_all_substring_locations_case_insensitive", 45, LINK_PROCS(list_all_substring_locations_case_insensitive)}, + {0, 103, 4, "goto_line", 9, LINK_PROCS(goto_line)}, + {0, 71, 4, "list_all_locations_of_selection", 31, LINK_PROCS(list_all_locations_of_selection)}, + {0, 75, 4, "kill_buffer", 11, LINK_PROCS(kill_buffer)}, + {0, 76, 4, "duplicate_line", 14, LINK_PROCS(duplicate_line)}, + {0, 109, 4, "cursor_mark_swap", 16, LINK_PROCS(cursor_mark_swap)}, + {0, 79, 4, "reopen", 6, LINK_PROCS(reopen)}, + {0, 113, 4, "query_replace", 13, LINK_PROCS(query_replace)}, + {0, 81, 4, "query_replace_identifier", 24, LINK_PROCS(query_replace_identifier)}, + {0, 114, 4, "reverse_search", 14, LINK_PROCS(reverse_search)}, + {0, 115, 4, "save", 4, LINK_PROCS(save)}, + {0, 116, 4, "search_identifier", 17, LINK_PROCS(search_identifier)}, + {0, 84, 4, "list_all_locations_of_identifier", 32, LINK_PROCS(list_all_locations_of_identifier)}, + {0, 118, 4, "paste_and_indent", 16, LINK_PROCS(paste_and_indent)}, + {0, 86, 4, "paste_next_and_indent", 21, LINK_PROCS(paste_next_and_indent)}, + {0, 120, 4, "cut", 3, LINK_PROCS(cut)}, + {0, 121, 4, "redo", 4, LINK_PROCS(redo)}, + {0, 122, 4, "undo", 4, LINK_PROCS(undo)}, + {0, 49, 4, "view_buffer_other_panel", 23, LINK_PROCS(view_buffer_other_panel)}, + {0, 50, 4, "swap_buffers_between_panels", 27, LINK_PROCS(swap_buffers_between_panels)}, + {0, 10, 0, "newline_or_goto_position", 24, LINK_PROCS(newline_or_goto_position)}, + {0, 10, 8, "newline_or_goto_position_same_panel", 35, LINK_PROCS(newline_or_goto_position_same_panel)}, + {0, 62, 4, "view_jump_list_with_lister", 26, LINK_PROCS(view_jump_list_with_lister)}, + {0, 32, 8, "write_character", 15, LINK_PROCS(write_character)}, }; static Meta_Key_Bind fcoder_binds_for_mac_default_default_code_map[33] = { -{0, 55299, 4, "move_left_alpha_numeric_or_camel_boundary", 41, LINK_PROCS(move_left_alpha_numeric_or_camel_boundary)}, -{0, 55300, 4, "move_right_alpha_numeric_or_camel_boundary", 42, LINK_PROCS(move_right_alpha_numeric_or_camel_boundary)}, -{0, 55299, 1, "move_left_alpha_numeric_boundary", 32, LINK_PROCS(move_left_alpha_numeric_boundary)}, -{0, 55300, 1, "move_right_alpha_numeric_boundary", 33, LINK_PROCS(move_right_alpha_numeric_boundary)}, -{0, 10, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, -{0, 10, 8, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, -{0, 125, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, -{0, 41, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, -{0, 93, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, -{0, 59, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, -{0, 35, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, -{0, 59, 1, "comment_line_toggle", 19, LINK_PROCS(comment_line_toggle)}, -{0, 9, 0, "word_complete", 13, LINK_PROCS(word_complete)}, -{0, 9, 4, "auto_tab_range", 14, LINK_PROCS(auto_tab_range)}, -{0, 9, 8, "auto_tab_line_at_cursor", 23, LINK_PROCS(auto_tab_line_at_cursor)}, -{0, 114, 1, "write_block", 11, LINK_PROCS(write_block)}, -{0, 116, 1, "write_todo", 10, LINK_PROCS(write_todo)}, -{0, 121, 1, "write_note", 10, LINK_PROCS(write_note)}, -{0, 68, 1, "list_all_locations_of_type_definition", 37, LINK_PROCS(list_all_locations_of_type_definition)}, -{0, 84, 1, "list_all_locations_of_type_definition_of_identifier", 51, LINK_PROCS(list_all_locations_of_type_definition_of_identifier)}, -{0, 91, 4, "open_long_braces", 16, LINK_PROCS(open_long_braces)}, -{0, 123, 4, "open_long_braces_semicolon", 26, LINK_PROCS(open_long_braces_semicolon)}, -{0, 125, 4, "open_long_braces_break", 22, LINK_PROCS(open_long_braces_break)}, -{0, 91, 1, "select_surrounding_scope", 24, LINK_PROCS(select_surrounding_scope)}, -{0, 93, 1, "select_prev_scope_absolute", 26, LINK_PROCS(select_prev_scope_absolute)}, -{0, 39, 1, "select_next_scope_absolute", 26, LINK_PROCS(select_next_scope_absolute)}, -{0, 47, 1, "place_in_scope", 14, LINK_PROCS(place_in_scope)}, -{0, 45, 1, "delete_current_scope", 20, LINK_PROCS(delete_current_scope)}, -{0, 106, 1, "scope_absorb_down", 17, LINK_PROCS(scope_absorb_down)}, -{0, 105, 1, "if0_off", 7, LINK_PROCS(if0_off)}, -{0, 49, 1, "open_file_in_quotes", 19, LINK_PROCS(open_file_in_quotes)}, -{0, 50, 1, "open_matching_file_cpp", 22, LINK_PROCS(open_matching_file_cpp)}, -{0, 48, 4, "write_zero_struct", 17, LINK_PROCS(write_zero_struct)}, + {0, 55299, 4, "move_left_alpha_numeric_or_camel_boundary", 41, LINK_PROCS(move_left_alpha_numeric_or_camel_boundary)}, + {0, 55300, 4, "move_right_alpha_numeric_or_camel_boundary", 42, LINK_PROCS(move_right_alpha_numeric_or_camel_boundary)}, + {0, 55299, 1, "move_left_alpha_numeric_boundary", 32, LINK_PROCS(move_left_alpha_numeric_boundary)}, + {0, 55300, 1, "move_right_alpha_numeric_boundary", 33, LINK_PROCS(move_right_alpha_numeric_boundary)}, + {0, 10, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, + {0, 10, 8, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, + {0, 125, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, + {0, 41, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, + {0, 93, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, + {0, 59, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, + {0, 35, 0, "write_and_auto_tab", 18, LINK_PROCS(write_and_auto_tab)}, + {0, 59, 1, "comment_line_toggle", 19, LINK_PROCS(comment_line_toggle)}, + {0, 9, 0, "word_complete", 13, LINK_PROCS(word_complete)}, + {0, 9, 4, "auto_tab_range", 14, LINK_PROCS(auto_tab_range)}, + {0, 9, 8, "auto_tab_line_at_cursor", 23, LINK_PROCS(auto_tab_line_at_cursor)}, + {0, 114, 1, "write_block", 11, LINK_PROCS(write_block)}, + {0, 116, 1, "write_todo", 10, LINK_PROCS(write_todo)}, + {0, 121, 1, "write_note", 10, LINK_PROCS(write_note)}, + {0, 68, 1, "list_all_locations_of_type_definition", 37, LINK_PROCS(list_all_locations_of_type_definition)}, + {0, 84, 1, "list_all_locations_of_type_definition_of_identifier", 51, LINK_PROCS(list_all_locations_of_type_definition_of_identifier)}, + {0, 91, 4, "open_long_braces", 16, LINK_PROCS(open_long_braces)}, + {0, 123, 4, "open_long_braces_semicolon", 26, LINK_PROCS(open_long_braces_semicolon)}, + {0, 125, 4, "open_long_braces_break", 22, LINK_PROCS(open_long_braces_break)}, + {0, 91, 1, "select_surrounding_scope", 24, LINK_PROCS(select_surrounding_scope)}, + {0, 93, 1, "select_prev_scope_absolute", 26, LINK_PROCS(select_prev_scope_absolute)}, + {0, 39, 1, "select_next_scope_absolute", 26, LINK_PROCS(select_next_scope_absolute)}, + {0, 47, 1, "place_in_scope", 14, LINK_PROCS(place_in_scope)}, + {0, 45, 1, "delete_current_scope", 20, LINK_PROCS(delete_current_scope)}, + {0, 105, 1, "if0_off", 7, LINK_PROCS(if0_off)}, + {0, 49, 1, "open_file_in_quotes", 19, LINK_PROCS(open_file_in_quotes)}, + {0, 50, 1, "open_matching_file_cpp", 22, LINK_PROCS(open_matching_file_cpp)}, + {0, 48, 4, "write_zero_struct", 17, LINK_PROCS(write_zero_struct)}, }; static Meta_Key_Bind fcoder_binds_for_mac_default_default_lister_ui_map[21] = { -{1, 0, 0, "lister__write_character", 23, LINK_PROCS(lister__write_character)}, -{0, 55307, 0, "lister__quit", 12, LINK_PROCS(lister__quit)}, -{0, 10, 0, "lister__activate", 16, LINK_PROCS(lister__activate)}, -{0, 9, 0, "lister__activate", 16, LINK_PROCS(lister__activate)}, -{0, 55296, 0, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, -{0, 55296, 1, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, -{0, 55296, 2, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, -{0, 55296, 4, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, -{0, 55296, 3, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, -{0, 55296, 6, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, -{0, 55296, 5, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, -{0, 55296, 7, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, -{0, 55297, 0, "lister__move_up", 15, LINK_PROCS(lister__move_up)}, -{0, 55305, 0, "lister__move_up", 15, LINK_PROCS(lister__move_up)}, -{0, 55298, 0, "lister__move_down", 17, LINK_PROCS(lister__move_down)}, -{0, 55306, 0, "lister__move_down", 17, LINK_PROCS(lister__move_down)}, -{0, 55321, 0, "lister__wheel_scroll", 20, LINK_PROCS(lister__wheel_scroll)}, -{0, 55317, 0, "lister__mouse_press", 19, LINK_PROCS(lister__mouse_press)}, -{0, 55319, 0, "lister__mouse_release", 21, LINK_PROCS(lister__mouse_release)}, -{0, 55322, 0, "lister__repaint", 15, LINK_PROCS(lister__repaint)}, -{0, 55323, 0, "lister__repaint", 15, LINK_PROCS(lister__repaint)}, + {1, 0, 0, "lister__write_character", 23, LINK_PROCS(lister__write_character)}, + {0, 55307, 0, "lister__quit", 12, LINK_PROCS(lister__quit)}, + {0, 10, 0, "lister__activate", 16, LINK_PROCS(lister__activate)}, + {0, 9, 0, "lister__activate", 16, LINK_PROCS(lister__activate)}, + {0, 55296, 0, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, + {0, 55296, 1, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, + {0, 55296, 2, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, + {0, 55296, 4, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, + {0, 55296, 3, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, + {0, 55296, 6, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, + {0, 55296, 5, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, + {0, 55296, 7, "lister__backspace_text_field", 28, LINK_PROCS(lister__backspace_text_field)}, + {0, 55297, 0, "lister__move_up", 15, LINK_PROCS(lister__move_up)}, + {0, 55305, 0, "lister__move_up", 15, LINK_PROCS(lister__move_up)}, + {0, 55298, 0, "lister__move_down", 17, LINK_PROCS(lister__move_down)}, + {0, 55306, 0, "lister__move_down", 17, LINK_PROCS(lister__move_down)}, + {0, 55321, 0, "lister__wheel_scroll", 20, LINK_PROCS(lister__wheel_scroll)}, + {0, 55317, 0, "lister__mouse_press", 19, LINK_PROCS(lister__mouse_press)}, + {0, 55319, 0, "lister__mouse_release", 21, LINK_PROCS(lister__mouse_release)}, + {0, 55322, 0, "lister__repaint", 15, LINK_PROCS(lister__repaint)}, + {0, 55323, 0, "lister__repaint", 15, LINK_PROCS(lister__repaint)}, }; static Meta_Sub_Map fcoder_submaps_for_mac_default[4] = { -{"mapid_global", 12, "The following bindings apply in all situations.", 47, 0, 0, fcoder_binds_for_mac_default_mapid_global, 40}, -{"mapid_file", 10, "The following bindings apply in general text files and most apply in code files, but some are overriden by other commands specific to code files.", 145, 0, 0, fcoder_binds_for_mac_default_mapid_file, 77}, -{"default_code_map", 16, "The following commands only apply in files where the lexer (syntax highlighting) is turned on.", 94, "mapid_file", 10, fcoder_binds_for_mac_default_default_code_map, 33}, -{"default_lister_ui_map", 21, "These commands apply in 'lister mode' such as when you open a file.", 67, 0, 0, fcoder_binds_for_mac_default_default_lister_ui_map, 21}, + {"mapid_global", 12, "The following bindings apply in all situations.", 47, 0, 0, fcoder_binds_for_mac_default_mapid_global, 40}, + {"mapid_file", 10, "The following bindings apply in general text files and most apply in code files, but some are overriden by other commands specific to code files.", 145, 0, 0, fcoder_binds_for_mac_default_mapid_file, 77}, + {"default_code_map", 16, "The following commands only apply in files where the lexer (syntax highlighting) is turned on.", 94, "mapid_file", 10, fcoder_binds_for_mac_default_default_code_map, 33}, + {"default_lister_ui_map", 21, "These commands apply in 'lister mode' such as when you open a file.", 67, 0, 0, fcoder_binds_for_mac_default_default_lister_ui_map, 21}, }; static Meta_Mapping fcoder_meta_maps[2] = { -{"default", 7, "The default 4coder bindings - typically good for Windows and Linux", 66, fcoder_submaps_for_default, 4, LINK_PROCS(fill_keys_default)}, -{"mac_default", 11, "Default 4coder bindings on a Mac keyboard", 41, fcoder_submaps_for_mac_default, 4, LINK_PROCS(fill_keys_mac_default)}, + {"default", 7, "The default 4coder bindings - typically good for Windows and Linux", 66, fcoder_submaps_for_default, 4, LINK_PROCS(fill_keys_default)}, + {"mac_default", 11, "Default 4coder bindings on a Mac keyboard", 41, fcoder_submaps_for_mac_default, 4, LINK_PROCS(fill_keys_mac_default)}, }; diff --git a/4coder_helper.cpp b/4coder_helper.cpp index 457e423a..cbd47c36 100644 --- a/4coder_helper.cpp +++ b/4coder_helper.cpp @@ -1874,130 +1874,11 @@ try_buffer_kill(Application_Links *app, Buffer_ID buffer, View_ID gui_view_id, B //////////////////////////////// -internal Token_Iterator -make_token_iter(Buffer_ID buffer, Token_Array array, Token *token){ - Token_Iterator iterator = {buffer, array.tokens, array.tokens + array.count, token}; - return(iterator); -} - -internal Token_Iterator - -make_token_iter(Buffer_ID buffer, Token_Array array, i64 pos){ - i64 first = 0; - i64 one_past_last = array.count; - i64 token_index = 0; - for (;;){ - i64 i = (first + one_past_last)/2; - Token *token = array.tokens + i; - if (token->pos + token->size <= pos){ - first = i + 1; - } - else if (pos < token->pos){ - one_past_last = i; - } - else{ - token_index = i; - break; - } - if (first + 1 >= one_past_last){ - token_index = first; - break; - } - } - return(make_token_iter(buffer, array, array.tokens + token_index)); -} - -internal Token* -token_iter_current(Token_Iterator *iter){ - return(iter->token); -} - -internal Token* -token_iter_next_all(Token_Iterator *iter){ - Token *token = iter->token + 1; - Token *one_past_last = iter->one_past_last; - if (token > one_past_last){ - token = one_past_last; - } - iter->token = token; - return(token); -} - -internal Token* -token_iter_next_non_whitespace(Token_Iterator *iter){ - Token *token = iter->token; - Token *one_past_last = iter->one_past_last; - for (token += 1; token < one_past_last; token += 1){ - if (token->kind != TokenBaseKind_Whitespace){ - break; - } - } - if (token > one_past_last){ - token = one_past_last; - } - iter->token = token; - return(token); -} - -internal Token* -token_iter_next(Token_Iterator *iter){ - Token *token = iter->token; - Token *one_past_last = iter->one_past_last; - for (token += 1; token < one_past_last; token += 1){ - if (token->kind != TokenBaseKind_Whitespace && - token->kind != TokenBaseKind_Comment){ - break; - } - } - if (token > one_past_last){ - token = one_past_last; - } - iter->token = token; - return(token); -} - -internal Token* -token_iter_prev_all(Token_Iterator *iter){ - Token *token = iter->token - 1; - Token *first = iter->first; - if (token < first){ - token = first; - } - iter->token = token; - return(token); -} - -internal Token* -token_iter_prev_non_whitespace(Token_Iterator *iter){ - Token *token = iter->token; - Token *first = iter->first; - for (token -= 1; token >= first; token -= 1){ - if (token->kind != TokenBaseKind_Whitespace){ - break; - } - } - if (token < first){ - token = first; - } - iter->token = token; - return(token); -} - -internal Token* -token_iter_prev(Token_Iterator *iter){ - Token *token = iter->token; - Token *first = iter->first; - for (token -= 1; token >= first; token -= 1){ - if (token->kind != TokenBaseKind_Whitespace && - token->kind != TokenBaseKind_Comment){ - break; - } - } - if (token < first){ - token = first; - } - iter->token = token; - return(token); +internal Token_Array +get_token_array_from_buffer(Application_Links *app, Buffer_ID buffer){ + Token_Array array = {}; + // TODO(allen): implement + return(array); } //////////////////////////////// @@ -2014,34 +1895,30 @@ get_query_string(Application_Links *app, char *query_str, u8 *string_space, i32 return(bar.string); } -internal b32 -get_token_from_pos(Application_Links *app, Buffer_ID buffer, u64 pos, Cpp_Get_Token_Result *result){ - b32 success = false; - NotImplemented; -#if 0 - Token_Array array = buffer_get_token_array(app, buffer); - if (array.count > 0){ - success = true; - *result = cpp_get_token(array, (i32)pos); +internal Token* +get_token_from_pos(Application_Links *app, Token_Array *array, u64 pos){ + Token *result = 0; + if (array->count > 0){ + i64 index = token_index_from_pos(array, pos); + result = array->tokens + index; } -#endif - return(success); + return(result); +} + +internal Token* +get_token_from_pos(Application_Links *app, Buffer_ID buffer, u64 pos){ + Token_Array array = get_token_array_from_buffer(app, buffer); + return(get_token_from_pos(app, &array, pos)); } internal String_Const_u8 push_token_or_word_under_pos(Application_Links *app, Arena *arena, Buffer_ID buffer, u64 pos){ String_Const_u8 result = {}; - NotImplemented; -#if 0 - Get_Token_Result get_result = {}; - b32 success = get_token_from_pos(app, buffer, (i32)pos, &get_result); - if (success && !get_result.in_whitespace_after_token){ - umem size = get_result.token_one_past_last - get_result.token_start; - if (0 < size){ - result = push_buffer_range(app, arena, buffer, Ii64(get_result.token_start, get_result.token_one_past_last)); - } + Token *token = get_token_from_pos(app, buffer, pos); + if (token != 0 && token->size > 0 && token->kind != TokenBaseKind_Whitespace){ + Interval_i64 range = Ii64(token->pos, token->pos + token->size); + result = push_buffer_range(app, arena, buffer, range); } -#endif return(result); } @@ -2053,21 +1930,6 @@ push_token_or_word_under_active_cursor(Application_Links *app, Arena *arena){ return(push_token_or_word_under_pos(app, arena, buffer, pos)); } -internal b32 -lexer_keywords_default_init(Arena *arena, Cpp_Keyword_Table *kw_out, Cpp_Keyword_Table *pp_out){ - b32 success = false; - umem kw_size = cpp_get_table_memory_size_default(CPP_TABLE_KEYWORDS); - umem pp_size = cpp_get_table_memory_size_default(CPP_TABLE_PREPROCESSOR_DIRECTIVES); - void *kw_mem = push_array(arena, char, kw_size); - void *pp_mem = push_array(arena, char, pp_size); - if (kw_mem != 0 && pp_mem != 0){ - *kw_out = cpp_make_table_default(CPP_TABLE_KEYWORDS, kw_mem, kw_size); - *pp_out = cpp_make_table_default(CPP_TABLE_PREPROCESSOR_DIRECTIVES, pp_mem, pp_size); - success = true; - } - return(success); -} - //////////////////////////////// internal b32 diff --git a/4coder_helper.h b/4coder_helper.h index f284ec3c..6c2cfc78 100644 --- a/4coder_helper.h +++ b/4coder_helper.h @@ -144,15 +144,6 @@ struct Indent_Info{ //////////////////////////////// -struct Token_Iterator{ - Buffer_ID buffer; - Token *first; - Token *one_past_last; - Token *token; -}; - -//////////////////////////////// - struct Sort_Pair_i32{ i32 index; i32 key; diff --git a/4coder_insertion.cpp b/4coder_insertion.cpp index cd3dec4d..0514bae9 100644 --- a/4coder_insertion.cpp +++ b/4coder_insertion.cpp @@ -78,7 +78,7 @@ insert_string(Buffer_Insertion *insertion, String_Const_u8 string){ else{ char *space = insert__reserve(insertion, string.size); if (space != 0){ - memcpy(space, string.str, string.size); + block_copy(space, string.str, string.size); } else{ insert_string__no_buffering(insertion, string); diff --git a/4coder_jump_lister.cpp b/4coder_jump_lister.cpp index 3e2e87cb..8503f201 100644 --- a/4coder_jump_lister.cpp +++ b/4coder_jump_lister.cpp @@ -78,7 +78,7 @@ open_jump_lister(Application_Links *app, Heap *heap, View_ID ui_view, Buffer_ID managed_object_load_data(app, stored_jumps, i, 1, &stored); String_Const_u8 line = push_buffer_line(app, scratch, list_buffer_id, stored.list_line); options[i].string = line; - memset(&options[i].status, 0, sizeof(options[i].status)); + block_zero_struct(&options[i].status); options[i].user_data = IntAsPtr(i); i32 aligned_size = ((i32)line.size) + 1 + 7; aligned_size = aligned_size - aligned_size%8; diff --git a/4coder_jump_sticky.cpp b/4coder_jump_sticky.cpp index 60dd464d..4da5397a 100644 --- a/4coder_jump_sticky.cpp +++ b/4coder_jump_sticky.cpp @@ -201,7 +201,7 @@ make_new_marker_list_for_buffer(Heap *heap, i32 buffer_id){ Marker_List_Node *new_node = heap_array(heap, Marker_List_Node, 1); zdll_push_back(marker_list_first, marker_list_last, new_node); new_node->buffer_id = buffer_id; - memset(&new_node->list, 0, sizeof(new_node->list)); + block_zero_struct(&new_node->list); Marker_List *result = &new_node->list; return(result); } diff --git a/4coder_jumping.cpp b/4coder_jumping.cpp index 55aa8034..e55094f5 100644 --- a/4coder_jumping.cpp +++ b/4coder_jumping.cpp @@ -177,7 +177,7 @@ parse_jump_location(String_Const_u8 line){ } if (!jump.success){ - memset(&jump, 0, sizeof(jump)); + block_zero_struct(&jump); } else{ jump.is_sub_jump = (jump.sub_jump_indented || jump.sub_jump_note); diff --git a/4coder_lib/4cpp_default_keywords.h b/4coder_lib/4cpp_default_keywords.h deleted file mode 100644 index 58fffbdf..00000000 --- a/4coder_lib/4cpp_default_keywords.h +++ /dev/null @@ -1,170 +0,0 @@ -// For a quick way to extend the default keywords: -// #define FCPP_LEXER_EXTRA_KEYWORDS "my_keywords.h" -// And in the file "my_keywords.h", list the keywords you want. - -// For a quick way to extend the default preprocessor -// directives do the same thing with the macro: -// #define FCPP_LEXER_EXTRA_PREPROPS - -// TOP - -#if !defined(FCPP_DEFAULT_KEYWORDS_H) -#define FCPP_DEFAULT_KEYWORDS_H - -#define make_stafl(s,f) (s), sizeof(s)-1, f - -struct String_And_Flag{ - char *str; - u32 length; - u32 flags; -}; - -static String_And_Flag default_preprops[] = { - {make_stafl("include" , CPP_PP_INCLUDE )} , - {make_stafl("INCLUDE" , CPP_PP_INCLUDE )} , - {make_stafl("version" , CPP_PP_VERSION )} , - {make_stafl("VERSION" , CPP_PP_VERSION )} , - {make_stafl("ifndef" , CPP_PP_IFNDEF )} , - {make_stafl("IFNDEF" , CPP_PP_IFNDEF )} , - {make_stafl("define" , CPP_PP_DEFINE )} , - {make_stafl("DEFINE" , CPP_PP_DEFINE )} , - {make_stafl("import" , CPP_PP_IMPORT )} , - {make_stafl("IMPORT" , CPP_PP_IMPORT )} , - {make_stafl("pragma" , CPP_PP_PRAGMA )} , - {make_stafl("PRAGMA" , CPP_PP_PRAGMA )} , - {make_stafl("undef" , CPP_PP_UNDEF )} , - {make_stafl("UNDEF" , CPP_PP_UNDEF )} , - {make_stafl("endif" , CPP_PP_ENDIF )} , - {make_stafl("ENDIF" , CPP_PP_ENDIF )} , - {make_stafl("error" , CPP_PP_ERROR )} , - {make_stafl("ERROR" , CPP_PP_ERROR )} , - {make_stafl("ifdef" , CPP_PP_IFDEF )} , - {make_stafl("IFDEF" , CPP_PP_IFDEF )} , - {make_stafl("using" , CPP_PP_USING )} , - {make_stafl("USING" , CPP_PP_USING )} , - {make_stafl("else" , CPP_PP_ELSE )} , - {make_stafl("ELSE" , CPP_PP_ELSE )} , - {make_stafl("elif" , CPP_PP_ELIF )} , - {make_stafl("ELIF" , CPP_PP_ELIF )} , - {make_stafl("line" , CPP_PP_LINE )} , - {make_stafl("LINE" , CPP_PP_LINE )} , - {make_stafl("if" , CPP_PP_IF )} , - {make_stafl("IF" , CPP_PP_IF )} , - -#if defined(FCPP_LEXER_EXTRA_PREPROPS) -#include FCPP_LEXER_EXTRA_PREPROPS -#endif -}; -static i32 default_preprops_count = sizeof(default_preprops)/sizeof(default_preprops[0]); - -static String_And_Flag default_keywords[] = { - // CPP_TOKEN_BOOLEAN_CONSTANT - {make_stafl("true" , CPP_TOKEN_TRUE)}, - {make_stafl("false" , CPP_TOKEN_FALSE)}, - - // CPP_TOKEN_KEY_OPERATOR - {make_stafl("and" , CPP_TOKEN_AND)}, - {make_stafl("and_eq" , CPP_TOKEN_ANDEQ)}, - {make_stafl("bitand" , CPP_TOKEN_BIT_AND)}, - {make_stafl("bitor" , CPP_TOKEN_BIT_OR)}, - {make_stafl("or" , CPP_TOKEN_OR)}, - {make_stafl("or_eq" , CPP_TOKEN_OREQ)}, - {make_stafl("sizeof" , CPP_TOKEN_SIZEOF)}, - {make_stafl("alignof" , CPP_TOKEN_ALIGNOF)}, - {make_stafl("decltype" , CPP_TOKEN_DECLTYPE)}, - {make_stafl("throw" , CPP_TOKEN_THROW)}, - {make_stafl("new" , CPP_TOKEN_NEW)}, - {make_stafl("delete" , CPP_TOKEN_DELETE)}, - {make_stafl("xor" , CPP_TOKEN_BIT_XOR)}, - {make_stafl("xor_eq" , CPP_TOKEN_XOREQ)}, - {make_stafl("not" , CPP_TOKEN_NOT)}, - {make_stafl("not_eq" , CPP_TOKEN_NOTEQ)}, - {make_stafl("typeid" , CPP_TOKEN_TYPEID)}, - {make_stafl("compl" , CPP_TOKEN_BIT_NOT)}, - - // CPP_TOKEN_KEY_TYPE - {make_stafl("void" , CPP_TOKEN_VOID)}, - {make_stafl("bool" , CPP_TOKEN_BOOL)}, - {make_stafl("char" , CPP_TOKEN_CHAR)}, - {make_stafl("int" , CPP_TOKEN_INT)}, - {make_stafl("float" , CPP_TOKEN_FLOAT)}, - {make_stafl("double" , CPP_TOKEN_DOUBLE)}, - - // CPP_TOKEN_KEY_MODIFIER - {make_stafl("long" , CPP_TOKEN_LONG)}, - {make_stafl("short" , CPP_TOKEN_SHORT)}, - {make_stafl("unsigned" , CPP_TOKEN_UNSIGNED)}, - {make_stafl("signed" , CPP_TOKEN_SIGNED)}, - - // CPP_TOKEN_KEY_QUALIFIER - {make_stafl("const" , CPP_TOKEN_CONST)}, - {make_stafl("volatile" , CPP_TOKEN_VOLATILE)}, - - // CPP_TOKEN_KEY_CONTROL_FLOW - {make_stafl("asm" , CPP_TOKEN_ASM)}, - {make_stafl("break" , CPP_TOKEN_BREAK)}, - {make_stafl("case" , CPP_TOKEN_CASE)}, - {make_stafl("catch" , CPP_TOKEN_CATCH)}, - {make_stafl("continue" , CPP_TOKEN_CONTINUE)}, - {make_stafl("default" , CPP_TOKEN_DEFAULT)}, - {make_stafl("do" , CPP_TOKEN_DO)}, - {make_stafl("else" , CPP_TOKEN_ELSE)}, - {make_stafl("for" , CPP_TOKEN_FOR)}, - {make_stafl("goto" , CPP_TOKEN_GOTO)}, - {make_stafl("if" , CPP_TOKEN_IF)}, - {make_stafl("return" , CPP_TOKEN_RETURN)}, - {make_stafl("switch" , CPP_TOKEN_SWITCH)}, - {make_stafl("try" , CPP_TOKEN_TRY)}, - {make_stafl("while" , CPP_TOKEN_WHILE)}, - {make_stafl("static_assert" , CPP_TOKEN_STATIC_ASSERT)}, - - // CPP_TOKEN_KEY_CAST - {make_stafl("const_cast" , CPP_TOKEN_CONST_CAST)}, - {make_stafl("dynamic_cast" , CPP_TOKEN_DYNAMIC_CAST)}, - {make_stafl("reinterpret_cast" , CPP_TOKEN_REINTERPRET_CAST)}, - {make_stafl("static_cast" , CPP_TOKEN_STATIC_CAST)}, - - // CPP_TOKEN_KEY_TYPE_DECLARATION - {make_stafl("class" , CPP_TOKEN_CLASS)}, - {make_stafl("enum" , CPP_TOKEN_ENUM)}, - {make_stafl("struct" , CPP_TOKEN_STRUCT)}, - {make_stafl("typedef" , CPP_TOKEN_TYPEDEF)}, - {make_stafl("union" , CPP_TOKEN_UNION)}, - {make_stafl("template" , CPP_TOKEN_TEMPLATE)}, - {make_stafl("typename" , CPP_TOKEN_TYPENAME)}, - - // CPP_TOKEN_KEY_ACCESS - {make_stafl("friend" , CPP_TOKEN_FRIEND)}, - {make_stafl("namespace" , CPP_TOKEN_NAMESPACE)}, - {make_stafl("private" , CPP_TOKEN_PRIVATE)}, - {make_stafl("protected" , CPP_TOKEN_PROTECTED)}, - {make_stafl("public" , CPP_TOKEN_PUBLIC)}, - {make_stafl("using" , CPP_TOKEN_USING)}, - - // CPP_TOKEN_KEY_LINKAGE - {make_stafl("extern" , CPP_TOKEN_EXTERN)}, - {make_stafl("export" , CPP_TOKEN_EXPORT)}, - {make_stafl("inline" , CPP_TOKEN_INLINE)}, - {make_stafl("static" , CPP_TOKEN_STATIC)}, - {make_stafl("virtual" , CPP_TOKEN_VIRTUAL)}, - - // CPP_TOKEN_KEY_OTHER - {make_stafl("alignas" , CPP_TOKEN_ALIGNAS)}, - {make_stafl("explicit" , CPP_TOKEN_EXPLICIT)}, - {make_stafl("noexcept" , CPP_TOKEN_NOEXCEPT)}, - {make_stafl("nullptr" , CPP_TOKEN_NULLPTR)}, - {make_stafl("operator" , CPP_TOKEN_OPERATOR)}, - {make_stafl("register" , CPP_TOKEN_REGISTER)}, - {make_stafl("this" , CPP_TOKEN_THIS)}, - {make_stafl("thread_local" , CPP_TOKEN_THREAD_LOCAL)}, - -#if defined(FCPP_LEXER_EXTRA_KEYWORDS) -#include FCPP_LEXER_EXTRA_KEYWORDS -#endif -}; -static i32 default_keywords_count = sizeof(default_keywords)/sizeof(default_keywords[0]); - -#endif - -// BOTTOM - diff --git a/4coder_lib/4cpp_lexer.h b/4coder_lib/4cpp_lexer.h deleted file mode 100644 index 59435589..00000000 --- a/4coder_lib/4cpp_lexer.h +++ /dev/null @@ -1,2064 +0,0 @@ -/* -4cpp_lexer.h - 1.0.3 -no warranty implied; use at your own risk - -This software is in the public domain. Where that dedication is not -recognized, you are granted a perpetual, irrevocable license to copy, -distribute, and modify this file as you see fit. -*/ - -// TOP - -#ifndef FCPP_NEW_LEXER_H -#define FCPP_NEW_LEXER_H - -#include "4cpp_lexer_types.h" -#include "4cpp_lexer_tables.c" -#include "4cpp_default_keywords.h" - -API_EXPORT internal umem -cpp_get_table_memory_size_null_terminated(char **str_array, u32 str_count) -/* -DOC_PARAM(str_array, An array of null terminated strings that specifies every string that will be put in the table.) -DOC_PARAM(str_count, The number of strings in str_array.) -DOC_RETURN(Returns the memory size, in bytes, needed to allocate a table for the given strings.) -*/{ - umem memsize = 0; - for (u32 i = 0; i < str_count; ++i){ - char *str = str_array[i]; - u32 len = 0; - for (; str[len]; ++len); - memsize += 8 + (len+3)&(~3); - } - u32 table_count = (str_count * 3) / 2; - memsize += table_count*sizeof(Member(Cpp_Keyword_Table, keywords)); - return(memsize); -} - -API_EXPORT internal umem -cpp_get_table_memory_size_string_lengths(u32 *str_len, u32 byte_stride, u32 str_count) -/* -DOC_PARAM(str_len, An array specifying the length of every string that will be put in the table.) -DOC_PARAM(byte_stride, The distance in bytes between each length element.) -DOC_PARAM(str_count, The number of length elements in the array.) -DOC_RETURN(Returns the memory size, in bytes, needed to allocate a table for the given strings.) -*/{ - umem memsize = 0; - u8 *length_data = (u8*)str_len; - for (u32 i = 0; i < str_count; ++i, length_data += byte_stride){ - u32 len = *(u32*)(length_data); - memsize += 8 + (len+3)&(~3); - } - u32 table_count = (str_count * 3)/2; - memsize += table_count*sizeof(*Member(Cpp_Keyword_Table, keywords)); - return(memsize); -} - -internal void -cpp__write_word_data(char **out_ptr, u32 len, u32 type, char *str){ - char *out = *out_ptr; - *(u32*)out = len; - out += 4; - *(u32*)out = type; - out += 4; - for (u32 j = 0; str[j]; ++j){ - out[j] = str[j]; - } - len = (len+3)&(~3); - out += len; - *out_ptr = out; -} - -internal b32 -cpp__match(char *a, i32 a_len, char *b, i32 b_len){ - b32 result = false; - if (a_len == b_len){ - char *a_end = a + a_len; - result = true; - for (; a < a_end; ++a, ++b){ - if (*a != *b){ - result = false; - break; - } - } - } - return(result); -} - -internal void -cpp__fill_table(Cpp_Keyword_Table *table, char *str, u32 str_count){ - u64 *keywords = table->keywords; - u8 *base = (u8*)keywords; - u32 max = table->max; - - for (u32 i = 0; i < str_count; ++i){ - u32 str_len = *(u32*)str; - str += 8; - - u32 hash = 0; - for (u32 j = 0; j < str_len; ++j){ - hash = (hash << 5) + (u32)(str[j]); - } - - u32 first_index = hash % max; - u32 index = first_index; - for (;;){ - u64 *keyword_ptr = keywords + index; - if (*keyword_ptr == 0){ - *keyword_ptr = (u64)((str - 8) - (char*)base); - break; - } - else{ - u32 *table_str_len = (u32*)(*keyword_ptr + base); - char *table_str = (char*)(table_str_len + 2); - if (cpp__match(table_str, *table_str_len, str, str_len)){ - break; - } - } - - ++index; - if (index >= max){ - index = 0; - } - if (index == first_index){ - break; - } - } - - str_len = (str_len+3)&(~3); - str += str_len; - } -} - -API_EXPORT internal Cpp_Keyword_Table -cpp_make_table(char **str_array, u32 str_stride, u32 *len_array, u32 len_stride, u32 *type_array, u32 type_stride, u32 str_count, void *memory, umem memsize) -/* -DOC_PARAM(str_array, An array of strings to be put in the new table.) -DOC_PARAM(str_stride, The number of bytes separating each string pointer in the array.) -DOC_PARAM(len_array, An optional array of string lengths. If this array is specified it should have the same number of elements as str_array. If this is not specified the strings in str_array should be null terminated.) -DOC_PARAM(len_stride, If len_array is specified this indicates the number of bytes separating each length element in the array.) -DOC_PARAM(type_array, An optional array of type values. If this array is specified it should have the same number of elements as str_array. If this is not specified the value of each keyword type integer will default to CPP_TOKEN_KEY_OTHER.) -DOC_PARAM(type_stride, If type_array is specified this indicates the number of bytes separating each type integer element in the array.) -DOC_PARAM(str_count, Specifies the number of strings in str_array, and any of the used optional arrays.) -DOC_PARAM(memory, A chunk of memory set aside for this table. This should have at least as much memory as returned by one of the cpp_get_table_memory_size functions.) -DOC_PARAM(memsize, The number of bytes reserved at the memory address for the keyword table.) - -DOC_RETURN(On success returns a keyword table struct built on the memory chunk.) - -DOC(This call reads in an array of strings, either null terminated or not, and optionally an array of types, and constructs a compact list of the strings and types, and a hashed lookup table. As long as the table will be in use by the lexer the memory chunk passed in is used by the table. The memory may be free or otherwise recycled if the table will not be used again.) - -DOC_SEE(cpp_get_table_memory_size_null_terminated) -DOC_SEE(cpp_get_table_memory_size_string_lengths) -*/{ - Cpp_Keyword_Table table = {}; - table.mem = memory; - table.memsize = memsize; - table.keywords = (u64*)memory; - table.max = (str_count * 3)/2; - umem size_of_table = sizeof(*table.keywords)*table.max; - - { - u8 *ptr = (u8*)memory; - for (umem i = memsize; i > 0; --i, ++ptr){ - *ptr = 0; - } - } - - char *out_base = ((char*)memory) + size_of_table; - char *out_ptr = out_base; - - u8 *str_ptr = (u8*)str_array; - u8 *len_ptr = (u8*)len_array; - u8 *type_ptr = (u8*)type_array; - - if (len_ptr == 0){ - if (type_ptr == 0){ - for (u32 i = 0; i < str_count; ++i){ - char *str_item = *(char**)str_ptr; - str_ptr += str_stride; - u32 len = 0; - for (; str_item[len]; ++len); - cpp__write_word_data(&out_ptr, len, CPP_TOKEN_KEY_OTHER, str_item); - } - } - else{ - for (u32 i = 0; i < str_count; ++i){ - char *str_item = *(char**)str_ptr; - str_ptr += str_stride; - u32 len = 0; - for (; str_item[len]; ++len); - u32 type = *(u32*)(type_ptr); - cpp__write_word_data(&out_ptr, len, type, str_item); - } - } - } - else{ - if (type_ptr == 0){ - for (u32 i = 0; i < str_count; ++i){ - char *str_item = *(char**)str_ptr; - str_ptr += str_stride; - u32 len = *(u32*)(len_ptr); - len_ptr += len_stride; - cpp__write_word_data(&out_ptr, len, CPP_TOKEN_KEY_OTHER, str_item); - } - } - else{ - for (u32 i = 0; i < str_count; ++i){ - char *str_item = *(char**)str_ptr; - str_ptr += str_stride; - u32 len = *(u32*)(len_ptr); - len_ptr += len_stride; - u32 type = *(u32*)(type_ptr); - type_ptr += type_stride; - cpp__write_word_data(&out_ptr, len, type, str_item); - } - } - } - - cpp__fill_table(&table, out_base, str_count); - - return(table); -} - -internal b32 -cpp__table_match(Cpp_Keyword_Table *table, char *s, u32 s_len, u32 **item_ptr_out){ - u32 hash = 0; - for (u32 i = 0; i < s_len; ++i){ - hash = (hash << 5) + (u32)(s[i]); - } - - u64 *keywords = table->keywords; - u8 *base = (u8*)keywords; - - b32 result = false; - u32 max = table->max; - if (max > 0){ - u32 first_index = hash % max; - u32 index = first_index; - for (;;){ - u64 *keyword_ptr = keywords + index; - if (*keyword_ptr == 0){ - break; - } - - u32 *str_len = (u32*)(*keyword_ptr + base); - char *str = (char*)(str_len + 2); - if (cpp__match(str, *str_len, s, s_len)){ - *item_ptr_out = (u32*)(*keyword_ptr + base); - result = true; - break; - } - - ++index; - if (index >= max){ - index = 0; - } - if (index == first_index){ - break; - } - } - } - - return(result); -} - -API_EXPORT internal umem -cpp_get_table_memory_size_default(Cpp_Word_Table_Type type) -/* -DOC_PARAM(type, Specifies for which slot of the parser context to get a default result.) -DOC_RETURN(Returns the memory size, in bytes, needed to allocate a table for the given default slot.) -DOC_SEE(Cpp_Word_Table_Type) -*/{ - u32 *ptr = 0; - u32 count = 0; - - switch (type){ - case CPP_TABLE_KEYWORDS: - { - ptr = &default_keywords->length; - count = default_keywords_count; - }break; - - case CPP_TABLE_PREPROCESSOR_DIRECTIVES: - { - ptr = &default_preprops->length; - count = default_preprops_count; - }break; - } - - u32 stride = sizeof(String_And_Flag); - umem size = cpp_get_table_memory_size_string_lengths(ptr, stride, count); - return(size); -} - -API_EXPORT internal Cpp_Keyword_Table -cpp_make_table_default(Cpp_Word_Table_Type type, void *memory, umem memsize) -/* -DOC_PARAM(type, Specifies for which slot of the parser context to get a default result.) -DOC_PARAM(memory, A chunk of memory set aside for this table. This should have at least as much memory as returned by one of the cpp_get_table_memory_size functions.) -DOC_PARAM(memsize, The number of bytes reserved at the memory address for the keyword table.) - -DOC_RETURN(On success returns a keyword table struct built on the memory chunk.) - -DOC(Works as cpp_make_table for a default C++ keyword set.) - -DOC_SEE(Cpp_Word_Table_Type) -DOC_SEE(cpp_make_table) -*/{ - char **str_ptr = 0; - u32 *len_ptr = 0; - u32 *type_ptr = 0; - u32 count = 0; - - switch (type){ - case CPP_TABLE_KEYWORDS: - { - str_ptr = &default_keywords->str; - len_ptr = &default_keywords->length; - type_ptr = &default_keywords->flags; - count = default_keywords_count; - }break; - - case CPP_TABLE_PREPROCESSOR_DIRECTIVES: - { - str_ptr = &default_preprops->str; - len_ptr = &default_preprops->length; - type_ptr = &default_preprops->flags; - count = default_preprops_count; - }break; - } - - u32 stride = sizeof(String_And_Flag); - Cpp_Keyword_Table table = cpp_make_table(str_ptr, stride, len_ptr, stride, type_ptr, stride, count, memory, memsize); - return(table); -} - -//////////////// - -API_EXPORT internal Cpp_Token_Category -cpp_token_category_from_type(Cpp_Token_Type type){ - Cpp_Token_Category cat = 0; - switch (type){ - case CPP_TOKEN_TRUE: - case CPP_TOKEN_FALSE: - { - cat = CPP_TOKEN_CAT_BOOLEAN_CONSTANT; - }break; - - case CPP_TOKEN_AND: - case CPP_TOKEN_ANDEQ: - case CPP_TOKEN_BIT_AND: - case CPP_TOKEN_BIT_OR: - case CPP_TOKEN_OR: - case CPP_TOKEN_OREQ: - case CPP_TOKEN_SIZEOF: - case CPP_TOKEN_ALIGNOF: - case CPP_TOKEN_DECLTYPE: - case CPP_TOKEN_THROW: - case CPP_TOKEN_NEW: - case CPP_TOKEN_DELETE: - case CPP_TOKEN_BIT_XOR: - case CPP_TOKEN_XOREQ: - case CPP_TOKEN_NOT: - case CPP_TOKEN_NOTEQ: - case CPP_TOKEN_TYPEID: - case CPP_TOKEN_BIT_NOT: - { - cat = CPP_TOKEN_CAT_OPERATOR; - }break; - - case CPP_TOKEN_VOID: - case CPP_TOKEN_BOOL: - case CPP_TOKEN_CHAR: - case CPP_TOKEN_INT: - case CPP_TOKEN_FLOAT: - case CPP_TOKEN_DOUBLE: - { - cat = CPP_TOKEN_CAT_TYPE; - }break; - - case CPP_TOKEN_LONG: - case CPP_TOKEN_SHORT: - case CPP_TOKEN_UNSIGNED: - case CPP_TOKEN_SIGNED: - { - cat = CPP_TOKEN_CAT_MODIFIER; - }break; - - case CPP_TOKEN_CONST: - case CPP_TOKEN_VOLATILE: - { - cat = CPP_TOKEN_CAT_QUALIFIER; - }break; - - case CPP_TOKEN_ASM: - case CPP_TOKEN_BREAK: - case CPP_TOKEN_CASE: - case CPP_TOKEN_CATCH: - case CPP_TOKEN_CONTINUE: - case CPP_TOKEN_DEFAULT: - case CPP_TOKEN_DO: - case CPP_TOKEN_ELSE: - case CPP_TOKEN_FOR: - case CPP_TOKEN_GOTO: - case CPP_TOKEN_IF: - case CPP_TOKEN_RETURN: - case CPP_TOKEN_SWITCH: - case CPP_TOKEN_TRY: - case CPP_TOKEN_WHILE: - case CPP_TOKEN_STATIC_ASSERT: - { - cat = CPP_TOKEN_CAT_CONTROL_FLOW; - }break; - - case CPP_TOKEN_CONST_CAST: - case CPP_TOKEN_DYNAMIC_CAST: - case CPP_TOKEN_REINTERPRET_CAST: - case CPP_TOKEN_STATIC_CAST: - { - cat = CPP_TOKEN_CAT_CAST; - }break; - - case CPP_TOKEN_CLASS: - case CPP_TOKEN_ENUM: - case CPP_TOKEN_STRUCT: - case CPP_TOKEN_TYPEDEF: - case CPP_TOKEN_UNION: - case CPP_TOKEN_TEMPLATE: - case CPP_TOKEN_TYPENAME: - { - cat = CPP_TOKEN_CAT_TYPE_DECLARATION; - }break; - - case CPP_TOKEN_FRIEND: - case CPP_TOKEN_NAMESPACE: - case CPP_TOKEN_PRIVATE: - case CPP_TOKEN_PROTECTED: - case CPP_TOKEN_PUBLIC: - case CPP_TOKEN_USING: - { - cat = CPP_TOKEN_CAT_ACCESS; - }break; - - case CPP_TOKEN_EXTERN: - case CPP_TOKEN_EXPORT: - case CPP_TOKEN_INLINE: - case CPP_TOKEN_STATIC: - case CPP_TOKEN_VIRTUAL: - { - cat = CPP_TOKEN_CAT_LINKAGE; - }break; - - case CPP_TOKEN_ALIGNAS: - case CPP_TOKEN_EXPLICIT: - case CPP_TOKEN_NOEXCEPT: - case CPP_TOKEN_NULLPTR: - case CPP_TOKEN_OPERATOR: - case CPP_TOKEN_REGISTER: - case CPP_TOKEN_THIS: - case CPP_TOKEN_THREAD_LOCAL: - case CPP_TOKEN_KEY_OTHER: - { - cat = CPP_TOKEN_CAT_OTHER; - }break; - - case CPP_TOKEN_EOF: - { - cat = CPP_TOKEN_CAT_EOF; - }break; - } - return(cat); -} - -API_EXPORT internal Cpp_Get_Token_Result -cpp_get_token(Cpp_Token_Array array, i32 pos)/* -DOC_PARAM(array, The array of tokens from which to get a token.) -DOC_PARAM(pos, The position, measured in bytes, to get the token for.) -DOC_RETURN(A Cpp_Get_Token_Result struct is returned containing the index of a token and a flag indicating whether the pos is contained in the token or in whitespace after the token.) - -DOC(This call finds the token that contains a particular position, or if the position is in between tokens it finds the index of the token to the left of the position. The returned index can be -1 if the position is before the first token.) - -DOC_SEE(Cpp_Get_Token_Result) -*/{ - Cpp_Get_Token_Result result = {}; - Cpp_Token *tokens = array.tokens; - i32 count = array.count; - - i32 first_index = 0; - i32 one_past_last_index = count; - for (;;){ - if (first_index == one_past_last_index){ - result.token_index = -1; - result.in_whitespace_after_token = 1; - break; - } - - i32 mid_index = (first_index + one_past_last_index)/2; - Cpp_Token *token = tokens + mid_index; - - i32 range_first = token->start; - i32 range_one_past_last = 0x7FFFFFFF; - if (mid_index + 1 < count){ - range_one_past_last = tokens[mid_index + 1].start; - } - - if (range_first <= pos && pos < range_one_past_last){ - result.token_index = mid_index; - i32 token_one_past_last = range_first + token->size; - if (token_one_past_last <= pos){ - result.in_whitespace_after_token = 1; - } - result.token_start = range_first; - result.token_one_past_last = token_one_past_last; - break; - } - if (pos < range_first){ - one_past_last_index = mid_index; - } - else if (range_one_past_last <= pos){ - first_index = mid_index + 1; - } - } - - return(result); - -#if 0 - Cpp_Get_Token_Result result = {}; - Cpp_Token *token_array = array.tokens; - Cpp_Token *token = 0; - i32 first = 0; - i32 count = array.count; - i32 last = count; - i32 this_start = 0; - i32 next_start = 0; - - if (count > 0){ - for (;;){ - result.token_index = (first + last)/2; - token = token_array + result.token_index; - - this_start = token->start; - - if (result.token_index + 1 < count){ - next_start = (token + 1)->start; - } - else{ - next_start = this_start + token->size; - } - if (this_start <= pos && pos < next_start){ - break; - } - else if (pos < this_start){ - last = result.token_index; - } - else{ - first = result.token_index + 1; - } - if (first == last){ - result.token_index = first; - break; - } - } - - if (result.token_index == count){ - --result.token_index; - result.in_whitespace = 1; - } - else{ - if (token->start + token->size <= pos){ - result.in_whitespace = 1; - } - } - } - else{ - result.token_index = -1; - result.in_whitespace = 1; - } - - if (result.token_index >= 0 && result.token_index < count){ - token = array.tokens + result.token_index; - result.token_start = token->start; - result.token_end = token->start + token->size; - } - - return(result); -#endif -} - -// TODO(allen): eliminate this and just make a table. -internal Cpp_Lex_PP_State -cpp__pp_directive_to_state(Cpp_Token_Type type){ - Cpp_Lex_PP_State result = LSPP_default; - switch (type){ - case CPP_PP_INCLUDE: case CPP_PP_IMPORT: case CPP_PP_USING: - { - result = LSPP_include; - }break; - - case CPP_PP_DEFINE: - { - result = LSPP_macro_identifier; - }break; - - case CPP_PP_UNDEF: case CPP_PP_IFDEF: case CPP_PP_IFNDEF: - { - result = LSPP_identifier; - }break; - - case CPP_PP_IF: case CPP_PP_ELIF: - { - result = LSPP_body_if; - }break; - - case CPP_PP_PRAGMA: - { - result = LSPP_body; - }break; - - case CPP_PP_VERSION: case CPP_PP_LINE: - { - result = LSPP_number; - }break; - - case CPP_PP_ERROR: - { - result = LSPP_error; - }break; - - case CPP_PP_UNKNOWN: case CPP_PP_ELSE: case CPP_PP_ENDIF: - { - result = LSPP_junk; - }break; - } - return(result); -} - -#define LEXER_TB(n) ((n) & (sizeof(S.tb)-1)) - -internal Cpp_Lex_Result -cpp_lex_nonalloc_null_end_no_limit(Cpp_Lex_Data *S_ptr, char *chunk, i32 size, Cpp_Token_Array *token_array_out){ - Cpp_Lex_Data S = *S_ptr; - - Cpp_Token *out_tokens = token_array_out->tokens; - i32 token_i = token_array_out->count; - i32 max_token_i = token_array_out->max_count; - - u8 c = 0; - - i32 end_pos = size + S.chunk_pos; - chunk -= S.chunk_pos; - - switch (S.__pc__){ - DrCase(1); - DrCase(2); - DrCase(3); - DrCase(4); - DrCase(5); - DrCase(6); - DrCase(7); - DrCase(8); - DrCase(9); - DrCase(10); - } - - Assert(S.keyword_table.keywords != 0); - Assert(S.preprops_table.keywords != 0); - - for (;;){ - S.white_done = 0; - for(;;){ - for (; S.pp_state < LSPP_count && S.pos < end_pos;){ - c = (u8)chunk[S.pos++]; - i32 i = S.pp_state + whitespace_fsm_eq_classes[c]; - S.pp_state = whitespace_fsm_table[i]; - } - S.white_done = (S.pp_state >= LSPP_count); - - if (S.white_done == 0){ - S.chunk_pos += size; - token_array_out->count = token_i; - DrYield(4, LexResult_NeedChunk); - } - else{ - break; - } - } - --S.pos; - if (S.pp_state >= LSPP_count){ - S.pp_state -= LSPP_count; - } - - S.token.state_flags = S.pp_state; - if (S.pp_state == LSPP_default && S.ignore_string_delims){ - S.pp_state = LSPP_no_strings; - } - - S.token_start = S.pos; - S.tb_pos = 0; - S.fsm = null_lex_fsm; - for(;;){ - { - u16 *eq_classes = get_eq_classes[S.pp_state]; - u8 *fsm_table = get_table[S.pp_state]; - - for (; S.fsm.state < LS_count && S.pos < end_pos;){ - c = chunk[S.pos++]; - S.tb[LEXER_TB(S.tb_pos++)] = c; - - i32 i = S.fsm.state + eq_classes[c]; - S.fsm.state = fsm_table[i]; - } - S.fsm.emit_token = (S.fsm.state >= LS_count); - } - - if (S.fsm.emit_token == 0){ - S.chunk_pos += size; - token_array_out->count = token_i; - DrYield(3, LexResult_NeedChunk); - } - else{ - break; - } - } - - Assert(S.fsm.emit_token == 1); - - if (c == 0){ - S.completed = 1; - } - - if (S.fsm.state >= LS_count){ - S.fsm.state -= LS_count; - } - - switch (S.fsm.state){ - case LS_default: - { - switch (c){ - case 0: S.fsm.emit_token = 0; break; - -#define OperCase(op,t) case op: S.token.type = t; break; - OperCase('{', CPP_TOKEN_BRACE_OPEN); - OperCase('}', CPP_TOKEN_BRACE_CLOSE); - - OperCase('[', CPP_TOKEN_BRACKET_OPEN); - OperCase(']', CPP_TOKEN_BRACKET_CLOSE); - - OperCase('(', CPP_TOKEN_PARENTHESE_OPEN); - OperCase(')', CPP_TOKEN_PARENTHESE_CLOSE); - - OperCase('~', CPP_TOKEN_TILDE); - OperCase(',', CPP_TOKEN_COMMA); - OperCase(';', CPP_TOKEN_SEMICOLON); - OperCase('?', CPP_TOKEN_TERNARY_QMARK); - - OperCase('@', CPP_TOKEN_JUNK); -#undef OperCase - - case '\\': - if (S.pp_state == LSPP_default || S.pp_state == LSPP_no_strings){ - S.token.type = CPP_TOKEN_JUNK; - } - else{ - S.pos_overide = S.pos; - S.white_done = false; - for (;;){ - for (; !S.white_done && S.pos < end_pos;){ - c = chunk[S.pos++]; - if (!(c == ' ' || c == '\t' || c == '\r' || c == '\v' || c == '\f')){ - S.white_done = true; - } - } - - if (!S.white_done){ - S.chunk_pos += size; - token_array_out->count = token_i; - DrYield(1, LexResult_NeedChunk); - } - else{ - break; - } - } - - if (c == '\n'){ - S.fsm.emit_token = 0; - S.pos_overide = 0; - } - else{ - S.token.type = CPP_TOKEN_JUNK; - } - } - break; - } - - if (c != '@' && c != '\\'){ - S.token.flags = CPP_TFLAG_IS_OPERATOR; - } - }break; - - case LS_identifier: - { - --S.pos; - - i32 word_size = S.pos - S.token_start; - - if (word_size < sizeof(S.tb)){ - if (S.pp_state == LSPP_body_if){ - if (cpp__match(S.tb, word_size, "defined", sizeof("defined")-1)){ - S.token.type = CPP_PP_DEFINED; - S.token.flags = CPP_TFLAG_IS_OPERATOR | CPP_TFLAG_IS_KEYWORD; - break; - } - } - - u32 *item_ptr = 0; - cpp__table_match(&S.keyword_table, S.tb, S.tb_pos-1, &item_ptr); - - if (item_ptr != 0){ - S.token.type = (Cpp_Token_Type)(item_ptr[1]); - S.token.flags = CPP_TFLAG_IS_KEYWORD; - break; - } - } - - S.token.type = CPP_TOKEN_IDENTIFIER; - S.token.flags = 0; - }break; - - case LS_pound: - { - S.token.flags = 0; - switch (c){ - case '#': S.token.type = CPP_PP_CONCAT; break; - default: - S.token.type = CPP_PP_STRINGIFY; - --S.pos; - break; - } - }break; - - case LS_pp: - { - S.token.type = CPP_TOKEN_JUNK; - S.token.flags = 0; - --S.pos; - }break; - - case LS_ppdef: - { - --S.pos; - - if (S.tb_pos < sizeof(S.tb)){ - i32 pos = S.tb_pos-1; - i32 i = 1; - for (;i < pos; ++i){ - if (S.tb[i] != ' '){ - break; - } - } - - u32 *item_ptr = 0; - cpp__table_match(&S.preprops_table, S.tb+i, S.tb_pos-i-1, &item_ptr); - - if (item_ptr != 0){ - S.token.type = (Cpp_Token_Type)(item_ptr[1]); - if (CPP_PP_INCLUDE <= S.token.type && S.token.type <= CPP_PP_UNKNOWN){ - S.token.flags = CPP_TFLAG_PP_DIRECTIVE; - } - else{ - S.token.flags = 0; - } - S.pp_state = (u8)cpp__pp_directive_to_state(S.token.type); - break; - } - } - - S.token.type = CPP_TOKEN_JUNK; - S.token.flags = 0; - }break; - - case LS_number: - case LS_number0: - case LS_hex: - { - S.fsm.state = LSINT_default; - S.fsm.emit_token = 0; - --S.pos; - for (;;){ - for (; S.fsm.state < LSINT_count && S.pos < end_pos;){ - c = chunk[S.pos++]; - S.fsm.state = int_fsm_table[S.fsm.state + int_fsm_eq_classes[c]]; - } - S.fsm.emit_token = (S.fsm.state >= LSINT_count); - - if (S.fsm.emit_token == 0){ - S.chunk_pos += size; - token_array_out->count = token_i; - DrYield(5, LexResult_NeedChunk); - } - else{ - break; - } - } - --S.pos; - - S.token.type = CPP_TOKEN_INTEGER_CONSTANT; - S.token.flags = 0; - }break; - - case LS_float: - case LS_crazy_float0: - case LS_crazy_float1: - { - S.token.type = CPP_TOKEN_FLOATING_CONSTANT; - S.token.flags = 0; - switch (c){ - case 'f': case 'F': case 'l': case 'L': break; - default: --S.pos; break; - } - }break; - - case LS_string_raw: - { - Assert(c != 0); - - S.tb_pos = 0; - S.delim_length = 0; - - S.token.type = CPP_TOKEN_STRING_CONSTANT; - - S.fsm.state = LSSTR_default; - S.fsm.flags = 0; - for (;;){ - for (; S.fsm.state < LSSTR_count && S.pos < end_pos;){ - c = chunk[S.pos++]; - S.tb[LEXER_TB(S.tb_pos++)] = c; - S.fsm.state = raw_str_table[S.fsm.state + raw_str_eq_classes[c]]; - S.fsm.flags |= raw_str_flags[S.fsm.state]; - } - S.fsm.emit_token = (S.fsm.state >= LSSTR_count); - - if (S.fsm.emit_token == 0){ - S.chunk_pos += size; - token_array_out->count = token_i; - DrYield(7, LexResult_NeedChunk); - } - else{ - u8 emit_state = S.fsm.state - LSSTR_count; - switch (emit_state){ - case LSSTR_default: - { - S.token.type = CPP_TOKEN_JUNK; - goto doublebreak; - }break; - - case LSSTR_get_delim: - { - if (S.tb_pos <= 17){ - S.delim_length = S.tb_pos-1; - for (i32 n = 0; n < S.delim_length; ++n){ - S.raw_delim[n] = S.tb[n]; - } - S.tb_pos = 0; - } - else{ - S.token.type = CPP_TOKEN_JUNK; - --S.pos; - goto doublebreak; - } - }break; - - case LSSTR_check_delim: - { - if (c == 0){ - goto doublebreak; - } - else if (S.tb_pos >= S.delim_length){ - u32 m = S.tb_pos - S.delim_length - 2; - if (S.tb[LEXER_TB(m)] == ')'){ - b32 is_match = true; - ++m; - for (i32 n = 0; n < S.delim_length; ++n, ++m){ - if (S.tb[LEXER_TB(m)] != S.raw_delim[n]){ - is_match = false; - break; - } - } - - if (is_match){ - goto doublebreak; - } - } - } - }break; - } - S.fsm.state = LSSTR_get_delim; - } - } - doublebreak:; - - S.token.flags = (S.fsm.flags)?(CPP_TFLAG_MULTILINE):(0); - }break; - - case LS_string_normal: - { - Assert(c != 0); - - S.fsm.state = LSSTR_default; - S.fsm.flags = 0; - for (;;){ - for (; S.fsm.state < LSSTR_count && S.pos < end_pos;){ - c = chunk[S.pos++]; - S.fsm.state = normal_str_table[S.fsm.state + normal_str_eq_classes[c]]; - S.fsm.flags |= normal_str_flags[S.fsm.state]; - } - S.fsm.emit_token = (S.fsm.state >= LSSTR_count); - - if (S.fsm.emit_token == 0){ - S.chunk_pos += size; - token_array_out->count = token_i; - DrYield(8, LexResult_NeedChunk); - } - else{ - break; - } - } - - S.token.type = CPP_TOKEN_STRING_CONSTANT; - S.token.flags = (S.fsm.flags)?(CPP_TFLAG_MULTILINE):(0); - - if (c == '\n'){ - --S.pos; - } - }break; - - case LS_string_include: - { - S.fsm.state = LSSTR_default; - for (;;){ - for (; S.fsm.state < LSSTR_include_count && S.pos < end_pos;){ - c = chunk[S.pos++]; - S.fsm.state = include_str_table[S.fsm.state + include_str_eq_classes[c]]; - } - S.fsm.emit_token = (S.fsm.state >= LSSTR_include_count); - - if (S.fsm.emit_token == 0){ - S.chunk_pos += size; - token_array_out->count = token_i; - DrYield(6, LexResult_NeedChunk); - } - else{ - break; - } - } - - S.fsm.state -= LSSTR_include_count; - - if (S.fsm.state == LSSTR_default){ - S.token.type = CPP_PP_INCLUDE_FILE; - } - else{ - S.token.type = CPP_TOKEN_JUNK; - } - S.token.flags = 0; - - if (c == '\n'){ - --S.pos; - } - }break; - - case LS_char: - { - S.fsm.state = LSSTR_default; - S.fsm.flags = 0; - for (;;){ - for (; S.fsm.state < LSSTR_count && S.pos < end_pos;){ - c = chunk[S.pos++]; - S.fsm.state = normal_char_table[S.fsm.state + normal_char_eq_classes[c]]; - S.fsm.flags |= normal_char_flags[S.fsm.state]; - } - S.fsm.emit_token = (S.fsm.state >= LSSTR_count); - - if (S.fsm.emit_token == 0){ - S.chunk_pos += size; - token_array_out->count = token_i; - DrYield(9, LexResult_NeedChunk); - } - else{ - break; - } - } - - S.token.type = CPP_TOKEN_CHARACTER_CONSTANT; - S.token.flags = (S.fsm.flags)?(CPP_TFLAG_MULTILINE):(0); - - if (c == '\n'){ - --S.pos; - } - }break; - - case LS_comment_pre: - { - S.token.flags = CPP_TFLAG_IS_OPERATOR; - switch (c){ - case '=': S.token.type = CPP_TOKEN_DIVEQ; break; - default: - S.token.type = CPP_TOKEN_DIV; - --S.pos; - break; - } - }break; - - case LS_comment: - case LS_comment_slashed: - { - S.token.type = CPP_TOKEN_COMMENT; - S.token.flags = 0; - --S.pos; - }break; - - case LS_comment_block: - case LS_comment_block_ending: - { - S.token.type = CPP_TOKEN_COMMENT; - S.token.flags = 0; - }break; - - case LS_error_message: - { - S.token.type = CPP_PP_ERROR_MESSAGE; - S.token.flags = 0; - --S.pos; - }break; - - case LS_dot: - { - S.token.flags = CPP_TFLAG_IS_OPERATOR; - switch (c){ - case '*': S.token.type = CPP_TOKEN_PTRDOT; break; - default: - S.token.type = CPP_TOKEN_DOT; - --S.pos; - break; - } - }break; - - case LS_ellipsis: - { - switch (c){ - case '.': - S.token.flags = CPP_TFLAG_IS_OPERATOR; - S.token.type = CPP_TOKEN_ELLIPSIS; - break; - - default: - S.token.type = CPP_TOKEN_JUNK; - --S.pos; - break; - } - }break; - - case LS_less: - { - S.token.flags = CPP_TFLAG_IS_OPERATOR; - switch (c){ - case '=': S.token.type = CPP_TOKEN_LESSEQ; break; - default: - S.token.type = CPP_TOKEN_LESS; - --S.pos; - break; - } - }break; - - case LS_more: - { - S.token.flags = CPP_TFLAG_IS_OPERATOR; - switch (c){ - case '=': S.token.type = CPP_TOKEN_GRTREQ; break; - default: - S.token.type = CPP_TOKEN_GRTR; - --S.pos; - break; - } - }break; - - case LS_minus: - { - S.token.flags = CPP_TFLAG_IS_OPERATOR; - switch (c){ - case '-': S.token.type = CPP_TOKEN_DECREMENT; break; - case '=': S.token.type = CPP_TOKEN_SUBEQ; break; - default: - S.token.type = CPP_TOKEN_MINUS; - --S.pos; - break; - } - }break; - - case LS_arrow: - { - S.token.flags = CPP_TFLAG_IS_OPERATOR; - switch (c){ - case '*': S.token.type = CPP_TOKEN_PTRARROW; break; - default: - S.token.type = CPP_TOKEN_ARROW; - --S.pos; - break; - } - }break; - - case LS_and: - { - S.token.flags = CPP_TFLAG_IS_OPERATOR; - switch (c){ - case '&': S.token.type = CPP_TOKEN_AND; break; - case '=': S.token.type = CPP_TOKEN_ANDEQ; break; - default: - S.token.type = CPP_TOKEN_AMPERSAND; - --S.pos; - break; - } - }break; - - case LS_or: - { - S.token.flags = CPP_TFLAG_IS_OPERATOR; - switch (c){ - case '|': S.token.type = CPP_TOKEN_OR; break; - case '=': S.token.type = CPP_TOKEN_OREQ; break; - default: - S.token.type = CPP_TOKEN_BIT_OR; - --S.pos; - break; - } - }break; - - case LS_plus: - { - S.token.flags = CPP_TFLAG_IS_OPERATOR; - switch (c){ - case '+': S.token.type = CPP_TOKEN_INCREMENT; break; - case '=': S.token.type = CPP_TOKEN_ADDEQ; break; - default: - S.token.type = CPP_TOKEN_PLUS; - --S.pos; - break; - } - }break; - - case LS_colon: - { - S.token.flags = CPP_TFLAG_IS_OPERATOR; - switch (c){ - case ':': S.token.type = CPP_TOKEN_SCOPE; break; - default: - S.token.type = CPP_TOKEN_COLON; - --S.pos; - break; - } - }break; - - case LS_single_op: - { - u32 plain_version = 0; - u32 eq_version = 0; - S.token.flags = CPP_TFLAG_IS_OPERATOR; - switch (S.tb[0]){ - case '*': plain_version = CPP_TOKEN_STAR; eq_version = CPP_TOKEN_MULEQ; break; - case '%': plain_version = CPP_TOKEN_MOD; eq_version = CPP_TOKEN_MODEQ; break; - case '^': plain_version = CPP_TOKEN_BIT_XOR; eq_version = CPP_TOKEN_XOREQ; break; - case '=': plain_version = CPP_TOKEN_EQ; eq_version = CPP_TOKEN_EQEQ; break; - case '!': plain_version = CPP_TOKEN_NOT; eq_version = CPP_TOKEN_NOTEQ; break; - case '<': plain_version = CPP_TOKEN_LSHIFT; eq_version = CPP_TOKEN_LSHIFTEQ; break; - case '>': plain_version = CPP_TOKEN_RSHIFT; eq_version = CPP_TOKEN_RSHIFTEQ; break; - } - - S.token.type = eq_version; - if (c != '='){ - S.token.type = plain_version; - --S.pos; - } - }break; - } - - if (S.pos > S.chunk_pos && chunk[S.pos-1] == 0){ - --S.pos; - } - - if (S.pp_state == LSPP_default && S.ignore_string_delims){ - S.pp_state = LSPP_no_strings; - } - if ((S.token.flags & CPP_TFLAG_PP_DIRECTIVE) == 0){ - switch (S.pp_state){ - case LSPP_macro_identifier: - { - if (S.fsm.state != LS_identifier){ - S.token.type = CPP_TOKEN_JUNK; - S.pp_state = LSPP_junk; - } - else{ - S.pp_state = LSPP_body; - } - }break; - - case LSPP_identifier: - { - if (S.fsm.state != LS_identifier){ - S.token.type = CPP_TOKEN_JUNK; - } - S.pp_state = LSPP_junk; - }break; - - case LSPP_number: - { - if (S.token.type != CPP_TOKEN_INTEGER_CONSTANT){ - S.token.type = CPP_TOKEN_JUNK; - S.pp_state = LSPP_junk; - } - else{ - S.pp_state = LSPP_include; - } - }break; - - case LSPP_junk: - { - if (S.token.type != CPP_TOKEN_COMMENT){ - S.token.type = CPP_TOKEN_JUNK; - } - }break; - } - } - - if (S.fsm.emit_token){ - S.token.start = S.token_start; - if (S.pos_overide){ - S.token.size = S.pos_overide - S.token_start; - S.pos_overide = 0; - } - else{ - S.token.size = S.pos - S.token_start; - } - if ((S.token.flags & CPP_TFLAG_PP_DIRECTIVE) == 0){ - if (S.token.state_flags != LSPP_default && S.pp_state){ - S.token.flags |= CPP_TFLAG_PP_BODY; - } - } - - out_tokens[token_i++] = S.token; - if (token_i == max_token_i){ - if (S.pos == end_pos){ - S.chunk_pos += size; - token_array_out->count = token_i; - DrYield(10, LexResult_NeedChunk); - } - token_array_out->count = token_i; - DrYield(2, LexResult_NeedTokenMemory); - } - } - - if (S.completed){ - break; - } - } - - token_array_out->count = token_i; - DrReturn(LexResult_Finished); -} - -internal Cpp_Lex_Result -cpp_lex_nonalloc_null_end_out_limit(Cpp_Lex_Data *S_ptr, char *chunk, i32 size, - Cpp_Token_Array *token_array_out, i32 max_tokens_out){ - Cpp_Token_Array temp_array = *token_array_out; - if (temp_array.max_count > temp_array.count + max_tokens_out){ - temp_array.max_count = temp_array.count + max_tokens_out; - } - - Cpp_Lex_Result result = cpp_lex_nonalloc_null_end_no_limit(S_ptr, chunk, size, &temp_array); - - token_array_out->count = temp_array.count; - if (result == LexResult_NeedTokenMemory){ - if (token_array_out->count < token_array_out->max_count){ - result = LexResult_HitTokenLimit; - } - } - - return(result); -} - -internal Cpp_Lex_Result -cpp_lex_nonalloc_no_null_no_limit(Cpp_Lex_Data *S_ptr, char *chunk, i32 size, i32 full_size, - Cpp_Token_Array *token_array_out){ - Cpp_Lex_Result result = 0; - if (S_ptr->pos >= full_size){ - char end_null = 0; - result = cpp_lex_nonalloc_null_end_no_limit(S_ptr, &end_null, 1, token_array_out); - } - else{ - result = cpp_lex_nonalloc_null_end_no_limit(S_ptr, chunk, size, token_array_out); - if (result == LexResult_NeedChunk){ - if (S_ptr->pos >= full_size){ - char end_null = 0; - result = cpp_lex_nonalloc_null_end_no_limit(S_ptr, &end_null, 1, token_array_out); - } - } - } - return(result); -} - -internal Cpp_Lex_Result -cpp_lex_nonalloc_no_null_out_limit(Cpp_Lex_Data *S_ptr, char *chunk, i32 size, i32 full_size, - Cpp_Token_Array *token_array_out, i32 max_tokens_out){ - Cpp_Token_Array temp_stack = *token_array_out; - if (temp_stack.max_count > temp_stack.count + max_tokens_out){ - temp_stack.max_count = temp_stack.count + max_tokens_out; - } - - Cpp_Lex_Result result = cpp_lex_nonalloc_no_null_no_limit(S_ptr, chunk, size, full_size, - &temp_stack); - - token_array_out->count = temp_stack.count; - - if (result == LexResult_NeedTokenMemory){ - if (token_array_out->count < token_array_out->max_count){ - result = LexResult_HitTokenLimit; - } - } - - return(result); -} - -#define HAS_NULL_TERM ((i32)(-1)) -#define NO_OUT_LIMIT ((i32)(-1)) - -API_EXPORT internal Cpp_Lex_Result -cpp_lex_step(Cpp_Lex_Data *S_ptr, char *chunk, i32 size, i32 full_size, Cpp_Token_Array *token_array_out, i32 max_tokens_out)/* -DOC_PARAM(S_ptr, The lexer state. Go to the Cpp_Lex_Data section to see how to initialize the state.) -DOC_PARAM(chunk, The first or next chunk of the file being lexed.) -DOC_PARAM(size, The number of bytes in the chunk including the null terminator if the chunk ends in a null terminator. If the chunk ends in a null terminator the system will interpret it as the end of the file.) -DOC_PARAM(full_size, If the final chunk is not null terminated this parameter should specify the length of the file in bytes. To rely on an eventual null terminator use HAS_NULL_TERM for this parameter.) -DOC_PARAM(token_array_out, The token array structure that will receive the tokens output by the lexer.) -DOC_PARAM(max_tokens_out, The maximum number of tokens to be output to the token array. To rely on the max built into the token array pass NO_OUT_LIMIT here.) - -DOC(This call is the primary interface of the lexing system. It is quite general so it can be used in a lot of different ways. I will explain the general rules first, and then give some examples of common ways it might be used. - -First a lexing state, Cpp_Lex_Data, must be initialized. The file to lex must be read into N contiguous chunks of memory. An output Cpp_Token_Array must be allocated and initialized with the appropriate count and max_count values. Then each chunk of the file must be passed to cpp_lex_step in order using the same lexing state for each call. Every time a call to cpp_lex_step returns LexResult_NeedChunk, the next call to cpp_lex_step should use the next chunk. If the return is some other value, the lexer hasn't finished with the current chunk and it sopped for some other reason, so the same chunk should be used again in the next call. - -If the file chunks contain a null terminator the lexer will return LexResult_Finished when it finds this character. At this point calling the lexer again with the same state will result in an error. If you do not have a null terminated chunk to end the file, you may instead pass the exact size in bytes of the entire file to the full_size parameter and it will automatically handle the termination of the lexing state when it has read that many bytes. If a full_size is specified and the system terminates for having seen that many bytes, it will return LexResult_Finished. If a full_size is specified and a null character is read before the total number of bytes have been read the system will still terminate as usual and return LexResult_Finished. - -If the system has filled the entire output array it will return LexResult_NeedTokenMemory. When this happens if you want to continue lexing the file you can grow the token array, or switch to a new output array and then call cpp_lex_step again with the chunk that was being lexed and the new output. You can also specify a max_tokens_out which is limits how many new tokens will be added to the token array. Even if token_array_out still had more space to hold tokens, if the max_tokens_out limit is hit, the lexer will stop and return LexResult_HitTokenLimit. If this happens there is still space left in the token array, so you can resume simply by calling cpp_lex_step again with the same chunk and the same output array. Also note that, unlike the chunks which must only be replaced when the system says it needs a chunk. You may switch to or modify the output array in between calls as much as you like. - -The most basic use of this system is to get it all done in one big chunk and try to allocate a nearly "infinite" output array so that it will not run out of memory. This way you can get the entire job done in one call and then just assert to make sure it returns LexResult_Finished to you: - -CODE_EXAMPLE( -Cpp_Token_Array lex_file(char *file_name){ -File_Data file = read_whole_file(file_name); - -Cpp_Lex_Data lex_state = cpp_lex_data_init(false); - -Cpp_Token_Array array = {}; -array.tokens = (Cpp_Token*)malloc(1 << 20); // hopefully big enough -array.max_count = (1 << 20)/sizeof(Cpp_Token); - -Cpp_Lex_Result result = cpp_lex_step(&lex_state, file.data, file.size, file.size, &array, NO_OUT_LIMIT); -Assert(result == LexResult_Finished); - -return(array); -}) - -) - -DOC_SEE(Cpp_Lex_Data) -DOC_SEE(Cpp_Lex_Result) -*/{ - Cpp_Lex_Result result = 0; - if (full_size == HAS_NULL_TERM){ - if (max_tokens_out == NO_OUT_LIMIT){ - result = cpp_lex_nonalloc_null_end_no_limit(S_ptr, chunk, size, token_array_out); - } - else{ - result = cpp_lex_nonalloc_null_end_out_limit(S_ptr, chunk, size, token_array_out, max_tokens_out); - } - } - else{ - if (max_tokens_out == NO_OUT_LIMIT){ - result = cpp_lex_nonalloc_no_null_no_limit(S_ptr, chunk, size, full_size, token_array_out); - } - else{ - result = cpp_lex_nonalloc_no_null_out_limit(S_ptr, chunk, size, full_size, token_array_out, max_tokens_out); - } - } - return(result); -} - -API_EXPORT internal Cpp_Lex_Data -cpp_lex_data_init(b32 ignore_string_delims, Cpp_Keyword_Table keywords, Cpp_Keyword_Table preprocessor_words)/* -DOC_PARAM(ignore_string_delims, TODO) -DOC_PARAM(keywords, TODO) -DOC_PARAM(preprocessor_words, TODO) -DOC_RETURN(A brand new lex state setup to lex from the beginning of the file.) - -DOC(Creates a new lex state in the form of a Cpp_Lex_Data struct and returns the struct.) -*/{ - Cpp_Lex_Data data = {}; - data.ignore_string_delims = (b8)ignore_string_delims; - data.keyword_table = keywords; - data.preprops_table = preprocessor_words; - return(data); -} - -API_EXPORT internal void -cpp_rebase_tables(Cpp_Lex_Data *data, void *old_base, void *new_base) -/* -DOC_PARAM(data, The lex data in which to perform the rebase.) -DOC_PARAM(old_base, The old base memory address in which the tables were stored.) -DOC_PARAM(new_base, The new base memory address in which the tables are or will be stored.) -DOC(Updates the base address pointers for the all the tables in the lex data as if the data in the original memory chunk old_base was copied to new_base.) -*/{ - u8 *old_base_ptr = (u8*)old_base; - u8 *new_base_ptr = (u8*)new_base; - - u8 *ptr = (u8*)data->keyword_table.keywords; - data->keyword_table.keywords = (u64*)(ptr + (new_base_ptr - old_base_ptr)); - - ptr = (u8*)data->preprops_table.keywords; - data->preprops_table.keywords = (u64*)(ptr + (new_base_ptr - old_base_ptr)); -} - -internal char -cpp_token_get_pp_state(u16 bitfield){ - return (char)(bitfield); -} - -internal void -cpp_shift_token_starts(Cpp_Token_Array *array, i32 from_token_i, i32 shift_amount){ - Cpp_Token *token = array->tokens + from_token_i; - i32 count = array->count, i = 0; - for (i = from_token_i; i < count; ++i, ++token){ - token->start += shift_amount; - } -} - -internal Cpp_Token -cpp_index_array(Cpp_Token_Array *array, i32 file_size, i32 index){ - Cpp_Token result; - if (index < array->count){ - result = array->tokens[index]; - } - else{ - result.start = file_size; - result.size = 0; - result.type = CPP_TOKEN_EOF; - result.flags = 0; - result.state_flags = 0; - } - return(result); -} - -API_EXPORT internal Cpp_Relex_Range -cpp_get_relex_range(Cpp_Token_Array *array, i32 start_pos, i32 end_pos) -/* -DOC_PARAM(array, A pointer to the token array that will be modified by the relex, -this array should already contain the tokens for the previous state of the file.) -DOC_PARAM(start_pos, The start position of the edited region of the file. -The start and end points are based on the edited region of the file before the edit.) -DOC_PARAM(end_pos, The end position of the edited region of the file. In particular, end_pos is the first character after the edited region not effected by the edit. Thus if the edited region contained one character end_pos - start_pos should equal 1. The start and end points are based on the edited region of the file before the edit.) -*/{ - Cpp_Relex_Range range = {}; - Cpp_Get_Token_Result get_result = {}; - - get_result = cpp_get_token(*array, start_pos); - range.start_token_index = get_result.token_index-1; - if (range.start_token_index < 0){ - range.start_token_index = 0; - } - - get_result = cpp_get_token(*array, end_pos); - range.end_token_index = get_result.token_index; - i32 token_start = 0; - if (range.end_token_index >= 0){ - token_start = array->tokens[range.end_token_index].start; - } - if (end_pos > token_start){ - ++range.end_token_index; - } - if (range.end_token_index < 0){ - range.end_token_index = 0; - } - - return(range); -} - -API_EXPORT internal Cpp_Relex_Data -cpp_relex_init(Cpp_Token_Array *array, i32 start_pos, i32 end_pos, i32 character_shift_amount, b32 ignore_string_delims, Cpp_Keyword_Table keywords, Cpp_Keyword_Table preprocessor_words) -/* -DOC_PARAM(array, A pointer to the token array that will be modified by the relex, this array should already contain the tokens for the previous state of the file.) -DOC_PARAM(start_pos, The start position of the edited region of the file. The start and end points are based on the edited region of the file before the edit.) -DOC_PARAM(end_pos, The end position of the edited region of the file. In particular, end_pos is the first character after the edited region not effected by the edit. Thus if the edited region contained one character end_pos - start_pos should equal 1. The start and end points are based on the edited region of the file before the edit.) -DOC_PARAM(character_shift_amount, The shift in the characters after the edited region.) -DOC_PARAM(ignore_string_delims, TODO) -DOC_PARAM(keywords, TODO) -DOC_PARAM(preprocessor_words, TODO) -DOC_RETURN(Returns a partially initialized relex state.) - -DOC(This call does the first setup step of initializing a relex state. To finish initializing the relex state you must tell the state about the positioning of the first chunk it will be fed. There are two methods of doing this, the direct method is with cpp_relex_declare_first_chunk_position, the method that is often more convenient is with cpp_relex_is_start_chunk. If the file is not chunked the second step of initialization can be skipped.) - -DOC_SEE(cpp_relex_declare_first_chunk_position) -DOC_SEE(cpp_relex_is_start_chunk) - -*/{ - Cpp_Relex_Data state = {}; - - Cpp_Relex_Range range = cpp_get_relex_range(array, start_pos, end_pos); - state.start_token_index = range.start_token_index; - state.end_token_index = range.end_token_index; - state.original_end_token_index = range.end_token_index; - - if (state.start_token_index < array->count){ - state.relex_start_position = array->tokens[state.start_token_index].start; - } - else{ - state.relex_start_position = 0; - } - if (start_pos < state.relex_start_position){ - state.relex_start_position = start_pos; - } - - state.character_shift_amount = character_shift_amount; - - state.lex = cpp_lex_data_init(ignore_string_delims, keywords, preprocessor_words); - if (state.start_token_index < array->count){ - state.lex.pp_state = cpp_token_get_pp_state(array->tokens[state.start_token_index].state_flags); - } - else{ - state.lex.pp_state = 0; - } - state.lex.pos = state.relex_start_position; - - return(state); -} - -API_EXPORT internal i32 -cpp_relex_start_position(Cpp_Relex_Data *S_ptr) -/* -DOC_PARAM(S_ptr, A pointer to a state that is done with the first stage of initialization (cpp_relex_init)) -DOC_RETURN(Returns the first position in the file the relexer wants to read. This is usually a position slightly -earlier than the start_pos provided as the edit range.) - -DOC(After doing the first stage of initialization this call is useful for figuring out what chunk -of the file to feed to the lexer first. It should be a chunk that contains the position returned -by this call.) - -DOC_SEE(cpp_relex_init) -DOC_SEE(cpp_relex_declare_first_chunk_position) - -*/{ - i32 result = S_ptr->relex_start_position; - return(result); -} - -API_EXPORT internal void -cpp_relex_declare_first_chunk_position(Cpp_Relex_Data *S_ptr, i32 position) -/* -DOC_PARAM(S_ptr, A pointer to a state that is done with the first stage of initialization (cpp_relex_init)) -DOC_PARAM(position, The start position of the first chunk that will be fed to the relex process.) - -DOC(To initialize the relex system completely, the system needs to know how the characters in the -first file line up with the file's absolute layout. This call declares where the first chunk's start -position is in the absolute file layout, and the system infers the alignment from that. For this method -to work the starting position of the relexing needs to be inside the first chunk. To get the relexers -starting position call cpp_relex_start_position.) - -DOC_SEE(cpp_relex_init) -DOC_SEE(cpp_relex_start_position) - -*/{ - S_ptr->lex.chunk_pos = position; -} - -API_EXPORT internal i32 -cpp_relex_is_start_chunk(Cpp_Relex_Data *S_ptr, char *chunk, i32 chunk_size) -/* -DOC_PARAM(S_ptr, A pointer to a state that is done with the first stage of initialization (cpp_relex_init)) -DOC_PARAM(chunk, The chunk to check.) -DOC_PARAM(chunk_size, The size of the chunk to check.) - -DOC_RETURN(Returns non-zero if the passed in chunk should be used as the first chunk for lexing.) - -DOC(With this method, once a state is initialized, each chunk can be fed in one after the other in -the order they appear in the absolute file layout. When this call returns non-zero it means that -the chunk that was passed in on that call should be used in the first call to cpp_relex_step. If, -after trying all of the chunks, they all return zero, pass in NULL for chunk and 0 for chunk_size -to tell the system that all possible chunks have already been tried, and then use those values again -in the one and only call to cpp_relex_step.) - -DOC_SEE(cpp_relex_init) -*/{ - i32 pos = S_ptr->relex_start_position; - i32 start = S_ptr->lex.chunk_pos; - i32 end = start + chunk_size; - - i32 good_chunk = 0; - if (start <= pos && pos < end){ - good_chunk = 1; - } - else{ - if (chunk == 0){ - good_chunk = 1; - S_ptr->lex.chunk_pos = pos; - } - else{ - S_ptr->lex.chunk_pos += chunk_size; - } - } - - return(good_chunk); -} - -API_EXPORT internal Cpp_Lex_Result -cpp_relex_step(Cpp_Relex_Data *S_ptr, char *chunk, i32 chunk_size, i32 full_size, - Cpp_Token_Array *array, Cpp_Token_Array *relex_array) -/* -DOC_PARAM(S_ptr, A pointer to a fully initiazed relex state.) -DOC_PARAM(chunk, A chunk of the edited file being relexed.) -DOC_PARAM(chunk_size, The size of the current chunk.) -DOC_PARAM(full_size, The full size of the edited file.) -DOC_PARAM(array, A pointer to a token array that contained the original tokens before the edit.) -DOC_PARAM(relex_array, A pointer to a token array for spare space. The capacity of the -relex_array determines how far the relex process can go. If it runs out, the process -can be continued if the same relex_array is extended without losing the tokens it contains. - -To get an appropriate capacity for relex_array, you can get the range of tokens that the relex -operation is likely to traverse by looking at the result from cpp_get_relex_range.) - -DOC(When a file has already been lexed, and then it is edited in a small local way, -rather than lexing the new file all over again, cpp_relex_step can try to find just -the range of tokens that need to be updated and fix them in. - -First the lex state must be initialized (cpp_relex_init). Then one or more calls to -cpp_relex_step will start editing the array and filling out the relex_array. The return -value of cpp_relex_step indicates whether the relex was successful or was interrupted -and if it was interrupted, what the system needs to resume. - -LexResult_Finished indicates that the relex engine finished successfully. - -LexResult_NeedChunk indicates that the system needs the next chunk of the file. - -LexResult_NeedTokenMemory indicates that the relex_array has reached capacity, and that -it needs to be extended if it is going to continue. Sometimes in this case it is better -to stop and just lex the entire file normally, because there are a few cases where a small -local change effects a long range of the lexers output. - -The relex operation can be closed in one of two ways. If the LexResult_Finished -value has been returned by this call, then to complete the edits to the array make -sure the original array has enough capacity to store the final result by calling -cpp_relex_get_new_count. Then the operation can be finished successfully by calling -cpp_relex_complete. - -Whether or not the relex process finished with LexResult_Finished the process can be -finished by calling cpp_relex_abort, which puts the array back into it's original state. -No close is necessary if getting the original array state back is not necessary.) - -DOC_SEE(cpp_relex_init) -DOC_SEE(cpp_get_relex_range) -DOC_SEE(Cpp_Lex_Result) -DOC_SEE(cpp_relex_get_new_count) -DOC_SEE(cpp_relex_complete) -DOC_SEE(cpp_relex_abort) -*/{ - - Cpp_Relex_Data S = *S_ptr; - Cpp_Lex_Result step_result = LexResult_Finished; - - switch (S.__pc__){ - DrCase(1); - DrCase(2); - } - - cpp_shift_token_starts(array, S.end_token_index, S.character_shift_amount); - S.end_token = cpp_index_array(array, full_size, S.end_token_index); - - // TODO(allen): This can be better I suspect. - for (;;){ - step_result = cpp_lex_nonalloc_no_null_out_limit(&S.lex, chunk, chunk_size, full_size, relex_array, 1); - - switch (step_result){ - case LexResult_HitTokenLimit: - { - Cpp_Token token = relex_array->tokens[relex_array->count-1]; - if (token.type == S.end_token.type && - token.start == S.end_token.start && - token.size == S.end_token.size && - token.flags == S.end_token.flags && - token.state_flags == S.end_token.state_flags){ - --relex_array->count; - goto double_break; - } - - while (S.lex.pos > S.end_token.start && S.end_token_index < array->count){ - ++S.end_token_index; - S.end_token = cpp_index_array(array, full_size, S.end_token_index); - } - } - break; - - case LexResult_NeedChunk: - { - S_ptr->result_state = LexResult_NeedChunk; - DrYield(1, LexResult_NeedChunk); - }break; - - case LexResult_NeedTokenMemory: - { - S_ptr->result_state = LexResult_NeedTokenMemory; - DrYield(2, LexResult_NeedTokenMemory); - }break; - - case LexResult_Finished: goto double_break; - } - } - - double_break:; - S_ptr->result_state = LexResult_Finished; - DrReturn(LexResult_Finished); -} - -API_EXPORT internal i32 -cpp_relex_get_new_count(Cpp_Relex_Data *S_ptr, i32 current_count, Cpp_Token_Array *relex_array) -/* -DOC_PARAM(S_ptr, A pointer to a state that has gone through cpp_relex_step with a LexResult_Finished return.) -DOC_PARAM(current_count, The count of tokens in the original array before the edit.) -DOC_PARAM(relex_array, The relex_array that was used in the cpp_relex_step call/calls.) - -DOC(After getting a LexResult_Finished from cpp_relex_step, this call can be used to get -the size the new array will have. If the original array doesn't have enough capacity to store -the new array, it's capacity should be increased before passing to cpp_relex_complete.) -*/{ - i32 result = -1; - - if (S_ptr->result_state == LexResult_Finished){ - i32 delete_amount = S_ptr->end_token_index - S_ptr->start_token_index; - i32 shift_amount = relex_array->count - delete_amount; - result = current_count + shift_amount; - } - - return(result); -} - -#if !defined(FCPP_FORBID_MEMCPY) -#include -#endif - -internal void -cpp__block_move(void *dst, void *src, i32 size){ -#if !defined(FCPP_FORBID_MEMCPY) - memmove(dst, src, size); -#else - // TODO(allen): find a way to write a fast one of these. - u8 *d = (u8*)dst, *s = (u8*)src; - if (d < s || d >= s + size){ - for (; size > 0; --size){ - *(d++) = *(s++); - } - } - else{ - d += size - 1; - s += size - 1; - for (; size > 0; --size){ - *(d--) = *(s--); - } - } -#endif -} - -API_EXPORT internal void -cpp_relex_complete(Cpp_Relex_Data *S_ptr, Cpp_Token_Array *array, Cpp_Token_Array *relex_array) -/* -DOC_PARAM(S_ptr, A pointer to a state that has gone through cpp_relex_step with a LexResult_Finished return.) -DOC_PARAM(array, The original array being edited by cpp_relex_step calls.) -DOC_PARAM(relex_array, The relex_array that was filled by cpp_relex_step.) - -DOC(After getting a LexResult_Finished from cpp_relex_step, and ensuring that -array has a large enough capacity by calling cpp_relex_get_new_count, this call -does the necessary replacement of tokens in the array to make it match the new file.) -*/{ - i32 delete_amount = S_ptr->end_token_index - S_ptr->start_token_index; - i32 shift_amount = relex_array->count - delete_amount; - - if (shift_amount != 0){ - i32 shift_size = array->count - S_ptr->end_token_index; - if (shift_size > 0){ - Cpp_Token *old_base = array->tokens + S_ptr->end_token_index; - cpp__block_move(old_base + shift_amount, old_base, sizeof(Cpp_Token)*shift_size); - } - array->count += shift_amount; - } - - cpp__block_move(array->tokens + S_ptr->start_token_index, relex_array->tokens, sizeof(Cpp_Token)*relex_array->count); -} - -API_EXPORT internal void -cpp_relex_abort(Cpp_Relex_Data *S_ptr, Cpp_Token_Array *array) -/* -DOC_PARAM(S_ptr, A pointer to a state that has gone through at least one cpp_relex_step.) -DOC_PARAM(array, The original array that went through cpp_relex_step to be edited.) - -DOC(After the first call to cpp_relex_step, the array's contents may have been changed, -this call assures the array is in it's original state. After this call the relex state -is dead.) -*/{ - cpp_shift_token_starts(array, S_ptr->original_end_token_index, -S_ptr->character_shift_amount); - S_ptr->__pc__ = -1; -} - - -#if !defined(FCPP_FORBID_MALLOC) - -#include -#include - -API_EXPORT internal Cpp_Token_Array -cpp_make_token_array(i32 starting_max)/* -DOC_PARAM(starting_max, The number of tokens to initialize the array with.) -DOC_RETURN(An empty Cpp_Token_Array with memory malloc'd for storing tokens.) -DOC(This call allocates a Cpp_Token_Array with malloc for use in other -convenience functions. Stacks that are not allocated this way should not be -used in the convenience functions.) -*/{ - Cpp_Token_Array token_array; - token_array.tokens = (Cpp_Token*)malloc(sizeof(Cpp_Token)*starting_max); - token_array.count = 0; - token_array.max_count = starting_max; - return(token_array); -} - -API_EXPORT internal void -cpp_free_token_array(Cpp_Token_Array token_array)/* -DOC_PARAM(token_array, An array previously allocated by cpp_make_token_array) -DOC(This call frees a Cpp_Token_Array.) -DOC_SEE(cpp_make_token_array) -*/{ - free(token_array.tokens); -} - -API_EXPORT internal void -cpp_resize_token_array(Cpp_Token_Array *token_array, i32 new_max)/* -DOC_PARAM(token_array, An array previously allocated by cpp_make_token_array.) -DOC_PARAM(new_max, The new maximum size the array should support. If this is not greater -than the current size of the array the operation is ignored.) -DOC(This call allocates a new memory chunk and moves the existing tokens in the array -over to the new chunk.) -DOC_SEE(cpp_make_token_array) -*/{ - if (new_max > token_array->count){ - Cpp_Token *new_tokens = (Cpp_Token*)malloc(sizeof(Cpp_Token)*new_max); - - if (new_tokens){ - memcpy(new_tokens, token_array->tokens, sizeof(Cpp_Token)*token_array->count); - free(token_array->tokens); - token_array->tokens = new_tokens; - token_array->max_count = new_max; - } - } -} - -API_EXPORT internal Cpp_Keyword_Table -cpp_alloc_make_table_default(Cpp_Word_Table_Type type) -/* -DOC_PARAM(type, Specifies for which slot of the parser context to get a default result.) -DOC_RETURN(On success returns a keyword table struct built on a memory chunk created by malloc.) -DOC(Works as cpp_make_table for a default keyword list but takes the further liberty of using malloc and getting the memory it needs itself.) -DOC_SEE(cpp_free_table) -DOC_SEE(Cpp_Word_Table_Type) -DOC_SEE(cpp_make_table) -*/{ - Cpp_Keyword_Table result = {}; - umem size = cpp_get_table_memory_size_default(type); - if (size > 0){ - void *mem = malloc((size_t)size); - result = cpp_make_table_default(type, mem, size); - } - return(result); -} - -API_EXPORT internal void -cpp_free_table(Cpp_Keyword_Table table) -/* -DOC_PARAM(table, A table previously allocated by cpp_alloc_make_table_default.) -DOC(Frees the memory allocated in a cpp_alloc_make_table call.) -*/{ - free(table.keywords); -} - -API_EXPORT internal void -cpp_lex_file(char *data, i32 size, Cpp_Token_Array *token_array_out)/* -DOC_PARAM(data, The file data to be lexed in a single contiguous block.) -DOC_PARAM(size, The number of bytes in data.) -DOC_PARAM(token_array_out, The token array where the output tokens will be pushed. -This token array must be previously allocated with cpp_make_token_array) -DOC(Lexes an entire file and manages the interaction with the lexer system so that -it is quick and convenient to lex files. - -CODE_EXAMPLE( -Cpp_Token_Array lex_file(char *file_name){ -File_Data file = read_whole_file(file_name); - -// This array will be automatically grown if it runs -// out of memory. -Cpp_Token_Array array = cpp_make_token_array(100); - -cpp_lex_file(file.data, file.size, &array); - -return(array); -}) - -) -DOC_SEE(cpp_make_token_array) -*/{ - Cpp_Keyword_Table keywords = cpp_alloc_make_table_default(CPP_TABLE_KEYWORDS); - Cpp_Keyword_Table preprocessor_words = cpp_alloc_make_table_default(CPP_TABLE_PREPROCESSOR_DIRECTIVES); - - Cpp_Lex_Data S = cpp_lex_data_init(false, keywords, preprocessor_words); - i32 quit = 0; - - char empty = 0; - - token_array_out->count = 0; - for (;!quit;){ - i32 result = cpp_lex_step(&S, data, size, HAS_NULL_TERM, token_array_out, NO_OUT_LIMIT); - switch (result){ - case LexResult_Finished: - { - quit = 1; - }break; - - case LexResult_NeedChunk: - { - Assert(token_array_out->count < token_array_out->max_count); - - // NOTE(allen): We told the system we would provide the null - // terminator, but as it turned out we didn't actually. So in - // the next iteration pass a 1 byte chunk with the null terminator. - data = ∅ - size = 1; - }break; - - case LexResult_NeedTokenMemory: - { - // NOTE(allen): We told the system to use all of the output memory - // but we ran out anyway, so allocate more memory. We hereby assume - // the stack was allocated using cpp_make_token_array. - i32 new_max = 2*token_array_out->max_count + 1; - cpp_resize_token_array(token_array_out, new_max); - }break; - } - } - - cpp_free_table(keywords); - cpp_free_table(preprocessor_words); -} - -#endif - -#endif - -// BOTTOM diff --git a/4coder_lib/4cpp_lexer_tables.c b/4coder_lib/4cpp_lexer_tables.c deleted file mode 100644 index 1ad3d28f..00000000 --- a/4coder_lib/4cpp_lexer_tables.c +++ /dev/null @@ -1,733 +0,0 @@ -u16 whitespace_fsm_eq_classes[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 20, 10, 10, 10, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -}; - -const i32 num_whitespace_fsm_eq_classes = 3; - -u8 whitespace_fsm_table[] = { - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -}; - -u16 int_fsm_eq_classes[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, - 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, - 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -}; - -const i32 num_int_fsm_eq_classes = 4; - -u8 int_fsm_table[] = { - 8, 9, 10, 11, 12, 13, 14, 15, - 3, 5, 10, 6, 12, 7, 14, 15, - 1, 9, 7, 7, 12, 13, 7, 15, - 2, 4, 6, 11, 7, 13, 14, 15, -}; - -u16 raw_str_eq_classes[] = { - 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 9, 3, 12, 3, 3, 3, 3, 3, 15, 9, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 9, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, -}; - -const i32 num_raw_str_eq_classes = 6; - -u8 raw_str_table[] = { - 3, 6, 6, - 0, 1, 2, - 3, 2, 2, - 3, 1, 2, - 0, 6, 6, - 4, 1, 2, -}; - -u8 raw_str_flags[] = { -0x00,0x00,0x01, -}; - -u16 normal_str_eq_classes[] = { - 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 9, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 12, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, -}; - -const i32 num_normal_str_eq_classes = 5; - -u8 normal_str_table[] = { - 4, 0, 4, - 0, 0, 2, - 4, 2, 4, - 3, 0, 5, - 1, 0, 1, -}; - -u8 normal_str_flags[] = { -0x00,0x00,0x01, -}; - -u16 include_str_eq_classes[] = { - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -}; - -const i32 num_include_str_eq_classes = 3; - -u8 include_str_table[] = { - 2, - 0, - 1, -}; - -u16 normal_char_eq_classes[] = { - 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 6, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 9, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 12, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, -}; - -const i32 num_normal_char_eq_classes = 5; - -u8 normal_char_table[] = { - 4, 0, 4, - 0, 0, 2, - 4, 2, 4, - 3, 0, 5, - 1, 0, 1, -}; - -u8 normal_char_flags[] = { -0x00,0x00,0x01, -}; - -u16 main_fsm_eq_classes[] = { - 0, 31, 31, 31, 31, 31, 31, 31, 31, 31, 62, 93, 93, 93, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, -124,155,186,217,248,155,279,310,341,341,372,403,341,434,465,496, -527,558,558,558,558,558,558,558,589,558,620,341,651,155,682,341, -341,713,713,713,713,713,713,744,744,744,744,744,775,744,744,744, -744,744,806,744,744,775,744,744,744,744,744,341,837,341,155,248, - 31,713,713,713,713,868,713,744,744,744,744,744,744,744,744,744, -744,744,744,744,744,899,744,744,930,744,744,341,961,341,341, 31, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -}; - -const i32 num_main_fsm_eq_classes = 32; - -u8 main_fsm_table[] = { - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 0, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 46, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 3, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 16, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 3, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 37, 32, 33, 34, 35, 36, 37, 37, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 3, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 34, 35, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 25, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 63, 32, 33, 34, 35, 32, 63, 63, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 17, 15, 15, 18, 18, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 23, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 19, 32, 33, 34, 35, 32, 32, 32, 10, 10, 41, 42, 43, 44, 45, 15, 15, 17, 17, 20, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 14, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 15, 15, 15, 17, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 9, 1, 33, 34, 35, 1, 1, 1, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 8, 1, 33, 34, 35, 1, 1, 1, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 8, 1, 33, 34, 35, 1, 1, 6, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 28, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 21, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 29, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 22, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 29, 24, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 13, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 6, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 5, 1, 33, 4, 4, 1, 5, 5, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 16, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 11, 42, 43, 13, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 7, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 13, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 26, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, -}; - -u16 pp_include_fsm_eq_classes[] = { - 0, 31, 31, 31, 31, 31, 31, 31, 31, 31, 62, 93, 93, 93, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, -124,155,186,217,248,155,279,310,341,341,372,403,341,434,465,496, -527,558,558,558,558,558,558,558,589,558,620,341,651,155,682,341, -341,713,713,713,713,713,713,744,744,744,744,744,775,744,744,744, -744,744,806,744,744,775,744,744,744,744,744,341,837,341,155,248, - 31,713,713,713,713,868,713,744,744,744,744,744,744,744,744,744, -744,744,744,744,744,899,744,744,930,744,744,341,961,341,341, 31, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -}; - -const i32 num_pp_include_fsm_eq_classes = 32; - -u8 pp_include_fsm_table[] = { - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 0, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 46, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 3, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 16, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 3, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 37, 32, 33, 34, 35, 36, 37, 37, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 2, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 34, 35, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 25, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 63, 32, 33, 34, 35, 32, 63, 63, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 17, 15, 15, 18, 18, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 23, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 19, 32, 33, 34, 35, 32, 32, 32, 10, 10, 41, 42, 43, 44, 45, 15, 15, 17, 17, 20, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 14, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 15, 15, 15, 17, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 9, 1, 33, 34, 35, 1, 1, 1, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 8, 1, 33, 34, 35, 1, 1, 1, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 8, 1, 33, 34, 35, 1, 1, 6, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 28, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 38, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 29, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 22, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 29, 24, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 13, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 6, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 5, 1, 33, 4, 4, 1, 5, 5, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 16, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 11, 42, 43, 13, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 7, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 13, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 26, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, -}; - -u16 pp_macro_fsm_eq_classes[] = { - 0, 31, 31, 31, 31, 31, 31, 31, 31, 31, 62, 93, 93, 93, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, -124,155,186,217,248,155,279,310,341,341,372,403,341,434,465,496, -527,558,558,558,558,558,558,558,589,558,620,341,651,155,682,341, -341,713,713,713,713,713,713,744,744,744,744,744,775,744,744,744, -744,744,806,744,744,775,744,744,744,744,744,341,837,341,155,248, - 31,713,713,713,713,868,713,744,744,744,744,744,744,744,744,744, -744,744,744,744,744,899,744,744,930,744,744,341,961,341,341, 31, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -}; - -const i32 num_pp_macro_fsm_eq_classes = 32; - -u8 pp_macro_fsm_table[] = { - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 0, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 46, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 3, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 16, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 3, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 37, 32, 33, 34, 35, 36, 37, 37, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 2, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 34, 35, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 25, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 63, 32, 33, 34, 35, 32, 63, 63, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 17, 15, 15, 18, 18, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 23, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 19, 32, 33, 34, 35, 32, 32, 32, 10, 10, 41, 42, 43, 44, 45, 15, 15, 17, 17, 20, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 14, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 15, 15, 15, 17, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 9, 1, 33, 34, 35, 1, 1, 1, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 8, 1, 33, 34, 35, 1, 1, 1, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 8, 1, 33, 34, 35, 1, 1, 6, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 28, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 21, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 29, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 22, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 29, 24, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 13, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 6, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 5, 1, 33, 4, 4, 1, 5, 5, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 16, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 11, 42, 43, 13, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 7, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 13, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 26, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, -}; - -u16 pp_identifier_fsm_eq_classes[] = { - 0, 31, 31, 31, 31, 31, 31, 31, 31, 31, 62, 93, 93, 93, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, -124,155,186,217,248,155,279,310,341,341,372,403,341,434,465,496, -527,558,558,558,558,558,558,558,589,558,620,341,651,155,682,341, -341,713,713,713,713,713,713,744,744,744,744,744,775,744,744,744, -744,744,806,744,744,775,744,744,744,744,744,341,837,341,155,248, - 31,713,713,713,713,868,713,744,744,744,744,744,744,744,744,744, -744,744,744,744,744,899,744,744,930,744,744,341,961,341,341, 31, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -}; - -const i32 num_pp_identifier_fsm_eq_classes = 32; - -u8 pp_identifier_fsm_table[] = { - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 0, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 46, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 3, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 16, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 3, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 37, 32, 33, 34, 35, 36, 37, 37, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 2, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 34, 35, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 25, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 63, 32, 33, 34, 35, 32, 63, 63, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 17, 15, 15, 18, 18, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 23, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 19, 32, 33, 34, 35, 32, 32, 32, 10, 10, 41, 42, 43, 44, 45, 15, 15, 17, 17, 20, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 14, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 15, 15, 15, 17, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 9, 1, 33, 34, 35, 1, 1, 1, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 8, 1, 33, 34, 35, 1, 1, 1, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 8, 1, 33, 34, 35, 1, 1, 6, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 28, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 21, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 29, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 22, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 29, 24, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 13, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 6, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 5, 1, 33, 4, 4, 1, 5, 5, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 16, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 11, 42, 43, 13, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 7, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 13, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 26, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, -}; - -u16 pp_body_if_fsm_eq_classes[] = { - 0, 31, 31, 31, 31, 31, 31, 31, 31, 31, 62, 93, 93, 93, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, -124,155,186,217,248,155,279,310,341,341,372,403,341,434,465,496, -527,558,558,558,558,558,558,558,589,558,620,341,651,155,682,341, -341,713,713,713,713,713,713,744,744,744,744,744,775,744,744,744, -744,744,806,744,744,775,744,744,744,744,744,341,837,341,155,248, - 31,713,713,713,713,868,713,744,744,744,744,744,744,744,744,744, -744,744,744,744,744,899,744,744,930,744,744,341,961,341,341, 31, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -}; - -const i32 num_pp_body_if_fsm_eq_classes = 32; - -u8 pp_body_if_fsm_table[] = { - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 0, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 46, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 3, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 16, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 3, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 37, 32, 33, 34, 35, 36, 37, 37, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 2, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 34, 35, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 25, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 63, 32, 33, 34, 35, 32, 63, 63, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 17, 15, 15, 18, 18, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 23, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 19, 32, 33, 34, 35, 32, 32, 32, 10, 10, 41, 42, 43, 44, 45, 15, 15, 17, 17, 20, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 14, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 15, 15, 15, 17, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 9, 1, 33, 34, 35, 1, 1, 1, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 8, 1, 33, 34, 35, 1, 1, 1, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 8, 1, 33, 34, 35, 1, 1, 6, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 28, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 21, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 29, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 22, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 29, 24, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 13, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 6, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 5, 1, 33, 4, 4, 1, 5, 5, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 16, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 11, 42, 43, 13, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 7, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 13, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 26, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, -}; - -u16 pp_body_fsm_eq_classes[] = { - 0, 31, 31, 31, 31, 31, 31, 31, 31, 31, 62, 93, 93, 93, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, -124,155,186,217,248,155,279,310,341,341,372,403,341,434,465,496, -527,558,558,558,558,558,558,558,589,558,620,341,651,155,682,341, -341,713,713,713,713,713,713,744,744,744,744,744,775,744,744,744, -744,744,806,744,744,775,744,744,744,744,744,341,837,341,155,248, - 31,713,713,713,713,868,713,744,744,744,744,744,744,744,744,744, -744,744,744,744,744,899,744,744,930,744,744,341,961,341,341, 31, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -}; - -const i32 num_pp_body_fsm_eq_classes = 32; - -u8 pp_body_fsm_table[] = { - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 0, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 46, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 3, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 16, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 3, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 37, 32, 33, 34, 35, 36, 37, 37, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 2, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 34, 35, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 25, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 63, 32, 33, 34, 35, 32, 63, 63, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 17, 15, 15, 18, 18, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 23, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 19, 32, 33, 34, 35, 32, 32, 32, 10, 10, 41, 42, 43, 44, 45, 15, 15, 17, 17, 20, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 14, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 15, 15, 15, 17, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 9, 1, 33, 34, 35, 1, 1, 1, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 8, 1, 33, 34, 35, 1, 1, 1, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 8, 1, 33, 34, 35, 1, 1, 6, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 28, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 21, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 29, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 22, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 29, 24, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 13, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 6, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 5, 1, 33, 4, 4, 1, 5, 5, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 16, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 11, 42, 43, 13, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 7, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 13, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 26, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, -}; - -u16 pp_number_fsm_eq_classes[] = { - 0, 31, 31, 31, 31, 31, 31, 31, 31, 31, 62, 93, 93, 93, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, -124,155,186,217,248,155,279,310,341,341,372,403,341,434,465,496, -527,558,558,558,558,558,558,558,589,558,620,341,651,155,682,341, -341,713,713,713,713,713,713,744,744,744,744,744,775,744,744,744, -744,744,806,744,744,775,744,744,744,744,744,341,837,341,155,248, - 31,713,713,713,713,868,713,744,744,744,744,744,744,744,744,744, -744,744,744,744,744,899,744,744,930,744,744,341,961,341,341, 31, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -}; - -const i32 num_pp_number_fsm_eq_classes = 32; - -u8 pp_number_fsm_table[] = { - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 0, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 46, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 3, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 16, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 3, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 37, 32, 33, 34, 35, 36, 37, 37, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 2, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 34, 35, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 25, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 63, 32, 33, 34, 35, 32, 63, 63, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 17, 15, 15, 18, 18, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 23, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 19, 32, 33, 34, 35, 32, 32, 32, 10, 10, 41, 42, 43, 44, 45, 15, 15, 17, 17, 20, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 14, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 15, 15, 15, 17, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 9, 1, 33, 34, 35, 1, 1, 1, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 8, 1, 33, 34, 35, 1, 1, 1, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 8, 1, 33, 34, 35, 1, 1, 6, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 28, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 21, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 29, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 22, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 29, 24, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 13, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 6, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 5, 1, 33, 4, 4, 1, 5, 5, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 16, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 11, 42, 43, 13, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 7, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 13, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 26, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, -}; - -u16 pp_error_fsm_eq_classes[] = { - 0, 31, 31, 31, 31, 31, 31, 31, 31, 31, 62, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, -}; - -const i32 num_pp_error_fsm_eq_classes = 3; - -u8 pp_error_fsm_table[] = { - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, - 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, 61, -}; - -u16 pp_junk_fsm_eq_classes[] = { - 0, 31, 31, 31, 31, 31, 31, 31, 31, 31, 62, 93, 93, 93, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, -124,155,186,217,248,155,279,310,341,341,372,403,341,434,465,496, -527,558,558,558,558,558,558,558,589,558,620,341,651,155,682,341, -341,713,713,713,713,713,713,744,744,744,744,744,775,744,744,744, -744,744,806,744,744,775,744,744,744,744,744,341,837,341,155,248, - 31,713,713,713,713,868,713,744,744,744,744,744,744,744,744,744, -744,744,744,744,744,899,744,744,930,744,744,341,961,341,341, 31, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -713,713,713,713,713,713,713,713,713,713,713,713,713,713,713,713, -}; - -const i32 num_pp_junk_fsm_eq_classes = 32; - -u8 pp_junk_fsm_table[] = { - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 0, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 46, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 3, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 16, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 3, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 37, 32, 33, 34, 35, 36, 37, 37, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 2, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 34, 35, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 25, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 63, 32, 33, 34, 35, 32, 63, 63, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 29, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 17, 15, 15, 18, 18, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 27, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 23, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 19, 32, 33, 34, 35, 32, 32, 32, 10, 10, 41, 42, 43, 44, 45, 15, 15, 17, 17, 20, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 14, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 15, 15, 15, 17, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 9, 1, 33, 34, 35, 1, 1, 1, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 8, 1, 33, 34, 35, 1, 1, 1, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 8, 1, 33, 34, 35, 1, 1, 6, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 28, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 21, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 29, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 22, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 29, 24, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 13, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 6, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 5, 1, 33, 4, 4, 1, 5, 5, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 16, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 40, 11, 42, 43, 13, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 7, 1, 33, 4, 4, 1, 1, 1, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 1, 1, 1, 39, 13, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 26, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, -}; - -u16 no_string_fsm_eq_classes[] = { - 0, 31, 31, 31, 31, 31, 31, 31, 31, 31, 62, 93, 93, 93, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, -124,155,186,217,248,155,279,186,310,310,341,372,310,403,434,465, -496,527,527,527,527,527,527,527,527,527,558,310,589,155,620,310, -310,651,651,651,651,651,651,186,186,186,186,186,186,186,186,186, -186,186,186,186,186,186,186,186,186,186,186,310,682,310,155,248, - 31,651,651,651,651,713,651,186,186,186,186,186,186,186,186,186, -186,186,186,186,186,186,186,186,744,186,186,310,775,310,310, 31, -651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651, -651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651, -651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651, -651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651, -651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651, -651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651, -651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651, -651,651,651,651,651,651,651,651,651,651,651,651,651,651,651,651, -}; - -const i32 num_no_string_fsm_eq_classes = 26; - -u8 no_string_fsm_table[] = { - 31, 32, 33, 34, 35, 32, 32, 32, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 0, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 45, 46, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 3, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 45, 15, 16, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 0, 32, 33, 3, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 29, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 62, 62, 62, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 3, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 34, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 25, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 31, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 29, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 17, 15, 15, 18, 18, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 27, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 23, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 12, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 19, 32, 33, 34, 35, 62, 62, 62, 10, 10, 41, 42, 43, 44, 45, 15, 15, 17, 17, 20, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 14, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 15, 15, 15, 17, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 9, 1, 33, 34, 35, 62, 62, 62, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 8, 1, 33, 34, 35, 62, 62, 62, 8, 8, 10, 12, 12, 13, 45, 15, 15, 17, 17, 10, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 28, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 21, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 29, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 22, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 29, 24, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 62, 62, 62, 39, 40, 41, 42, 43, 13, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 31, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 45, 16, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 62, 62, 62, 39, 40, 11, 42, 43, 13, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 1, 1, 33, 4, 4, 62, 62, 62, 39, 13, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, - 26, 32, 33, 34, 35, 62, 62, 62, 39, 40, 41, 42, 43, 44, 45, 15, 15, 17, 17, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 30, -}; - -uint16_t * get_eq_classes[] = { -main_fsm_eq_classes, -pp_include_fsm_eq_classes, -pp_macro_fsm_eq_classes, -pp_identifier_fsm_eq_classes, -pp_body_if_fsm_eq_classes, -pp_body_fsm_eq_classes, -pp_number_fsm_eq_classes, -pp_error_fsm_eq_classes, -pp_junk_fsm_eq_classes, -no_string_fsm_eq_classes, -}; - -uint8_t * get_table[] = { -main_fsm_table, -pp_include_fsm_table, -pp_macro_fsm_table, -pp_identifier_fsm_table, -pp_body_if_fsm_table, -pp_body_fsm_table, -pp_number_fsm_table, -pp_error_fsm_table, -pp_junk_fsm_table, -no_string_fsm_table, -}; - diff --git a/4coder_lib/4cpp_lexer_types.h b/4coder_lib/4cpp_lexer_types.h deleted file mode 100644 index 0e419c30..00000000 --- a/4coder_lib/4cpp_lexer_types.h +++ /dev/null @@ -1,568 +0,0 @@ -// TOP - -#ifndef FCPP_LEXER_TYPES_INC -#define FCPP_LEXER_TYPES_INC - -#ifndef ENUM -#define ENUM(type,name) typedef type name; enum name##_ -#endif - -#ifndef ENUM_INTERNAL -#define ENUM_INTERNAL(type,name) typedef type name; enum name##_ -#endif - -#ifndef STRUCT -#define STRUCT struct -#endif - -/* DOC(A Cpp_Word_Table_Type names one of the keyword table slots in a parse context.) */ -ENUM(uint32_t, Cpp_Word_Table_Type){ - /* DOC(The Cpp_Keyword_Table used to list the typical keywords.) */ - CPP_TABLE_KEYWORDS, - /* DOC(The Cpp_Keyword_Table used to list preprocessor directives.) */ - CPP_TABLE_PREPROCESSOR_DIRECTIVES, -}; - -/* DOC(A Cpp_Token_Type classifies a token to make parsing easier. Some types are not actually output by the lexer, but exist because parsers will also make use of token types in their own output.) */ -ENUM(uint32_t, Cpp_Token_Type){ - CPP_TOKEN_JUNK = 0, - CPP_TOKEN_COMMENT = 1, - - CPP_PP_INCLUDE = 2, - CPP_PP_VERSION = 3, - CPP_PP_DEFINE = 4, - CPP_PP_UNDEF = 5, - CPP_PP_IF = 6, - CPP_PP_IFDEF = 7, - CPP_PP_IFNDEF = 8, - CPP_PP_ELSE = 9, - CPP_PP_ELIF = 10, - CPP_PP_ENDIF = 11, - CPP_PP_ERROR = 12, - CPP_PP_IMPORT = 13, - CPP_PP_USING = 14, - CPP_PP_LINE = 15, - CPP_PP_PRAGMA = 16, - CPP_PP_STRINGIFY = 17, - CPP_PP_CONCAT = 18, - CPP_PP_UNKNOWN = 19, - - CPP_PP_DEFINED = 20, - CPP_PP_INCLUDE_FILE = 21, - CPP_PP_ERROR_MESSAGE = 22, - - CPP_TOKEN_VOID = 23, - CPP_TOKEN_BOOL = 24, - CPP_TOKEN_CHAR = 25, - CPP_TOKEN_INT = 26, - CPP_TOKEN_FLOAT = 27, - CPP_TOKEN_DOUBLE = 28, - CPP_TOKEN_LONG = 29, - CPP_TOKEN_SHORT = 30, - CPP_TOKEN_UNSIGNED = 31, - CPP_TOKEN_SIGNED = 32, - - CPP_TOKEN_CONST = 33, - CPP_TOKEN_VOLATILE = 34, - - CPP_TOKEN_ASM = 35, - CPP_TOKEN_BREAK = 36, - CPP_TOKEN_CASE = 37, - CPP_TOKEN_CATCH = 38, - CPP_TOKEN_CONTINUE = 39, - CPP_TOKEN_DEFAULT = 40, - CPP_TOKEN_DO = 41, - CPP_TOKEN_ELSE = 42, - CPP_TOKEN_FOR = 43, - CPP_TOKEN_GOTO = 44, - CPP_TOKEN_IF = 45, - CPP_TOKEN_RETURN = 46, - CPP_TOKEN_SWITCH = 47, - CPP_TOKEN_TRY = 48, - CPP_TOKEN_WHILE = 49, - CPP_TOKEN_STATIC_ASSERT = 50, - - CPP_TOKEN_CONST_CAST = 51, - CPP_TOKEN_DYNAMIC_CAST = 52, - CPP_TOKEN_REINTERPRET_CAST = 53, - CPP_TOKEN_STATIC_CAST = 54, - - CPP_TOKEN_CLASS = 55, - CPP_TOKEN_ENUM = 56, - CPP_TOKEN_STRUCT = 57, - CPP_TOKEN_TYPEDEF = 58, - CPP_TOKEN_UNION = 59, - CPP_TOKEN_TEMPLATE = 60, - CPP_TOKEN_TYPENAME = 61, - - CPP_TOKEN_FRIEND = 62, - CPP_TOKEN_NAMESPACE = 63, - CPP_TOKEN_PRIVATE = 64, - CPP_TOKEN_PROTECTED = 65, - CPP_TOKEN_PUBLIC = 66, - CPP_TOKEN_USING = 67, - - CPP_TOKEN_EXTERN = 68, - CPP_TOKEN_EXPORT = 69, - CPP_TOKEN_INLINE = 70, - CPP_TOKEN_STATIC = 71, - CPP_TOKEN_VIRTUAL = 72, - - CPP_TOKEN_ALIGNAS = 73, - CPP_TOKEN_EXPLICIT = 74, - CPP_TOKEN_NOEXCEPT = 75, - CPP_TOKEN_NULLPTR = 76, - CPP_TOKEN_OPERATOR = 77, - CPP_TOKEN_REGISTER = 78, - CPP_TOKEN_THIS = 79, - CPP_TOKEN_THREAD_LOCAL = 80, - - CPP_TOKEN_KEY_OTHER = 81, - - CPP_TOKEN_IDENTIFIER = 82, - CPP_TOKEN_INTEGER_CONSTANT = 83, - CPP_TOKEN_CHARACTER_CONSTANT = 84, - CPP_TOKEN_FLOATING_CONSTANT = 85, - CPP_TOKEN_STRING_CONSTANT = 86, - CPP_TOKEN_TRUE = 87, - CPP_TOKEN_FALSE = 88, - - CPP_TOKEN_BRACKET_OPEN = 89, - CPP_TOKEN_BRACKET_CLOSE = 90, - CPP_TOKEN_PARENTHESE_OPEN = 91, - CPP_TOKEN_PARENTHESE_CLOSE = 92, - CPP_TOKEN_BRACE_OPEN = 93, - CPP_TOKEN_BRACE_CLOSE = 94, - CPP_TOKEN_SEMICOLON = 95, - CPP_TOKEN_ELLIPSIS = 96, - - /* DOC(This is an 'ambiguous' token type because it requires parsing to determine the full nature of the token.) */ - CPP_TOKEN_STAR = 97, - - /* DOC(This is an 'ambiguous' token type because it requires parsing to determine the full nature of the token.) */ - CPP_TOKEN_AMPERSAND = 98, - - /* DOC(This is an 'ambiguous' token type because it requires parsing to determine the full nature of the token.) */ - CPP_TOKEN_TILDE = 99, - - /* DOC(This is an 'ambiguous' token type because it requires parsing to determine the full nature of the token.) */ - CPP_TOKEN_PLUS = 100, - - /* DOC(This is an 'ambiguous' token type because it requires parsing to determine the full nature of the token.) */ - CPP_TOKEN_MINUS = 101, - - /* DOC(This is an 'ambiguous' token type because it requires parsing to determine the full nature of the token.) */ - CPP_TOKEN_INCREMENT = 102, - - /* DOC(This is an 'ambiguous' token type because it requires parsing to determine the full nature of the token.) */ - CPP_TOKEN_DECREMENT = 103, - - // NOTE(allen): Precedence 1, LtoR - CPP_TOKEN_SCOPE = 104, - - // NOTE(allen): Precedence 2, LtoR - /* DOC(This type is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_POSTINC = 105, - /* DOC(This type is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_POSTDEC = 106, - /* DOC(This type is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_FUNC_STYLE_CAST = 107, - CPP_TOKEN_CPP_STYLE_CAST = 108, - /* DOC(This type is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_CALL = 109, - /* DOC(This type is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_INDEX = 110, - CPP_TOKEN_DOT = 111, - CPP_TOKEN_ARROW = 112, - - // NOTE(allen): Precedence 3, RtoL - /* DOC(This token is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_PREINC = 113, - /* DOC(This token is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_PREDEC = 114, - /* DOC(This token is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_POSITIVE = 115, - /* DOC(This token is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_NEGAITVE = 116, - CPP_TOKEN_NOT = 117, - - /* DOC(This type is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_BIT_NOT = 118, - - /* DOC(This type is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_CAST = 119, - /* DOC(This type is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_DEREF = 120, - /* DOC(This type is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_TYPE_PTR = 121, - /* DOC(This type is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_ADDRESS = 122, - /* DOC(This type is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_TYPE_REF = 123, - CPP_TOKEN_SIZEOF = 124, - CPP_TOKEN_ALIGNOF = 125, - CPP_TOKEN_DECLTYPE = 126, - CPP_TOKEN_TYPEID = 127, - CPP_TOKEN_NEW = 128, - CPP_TOKEN_DELETE = 129, - /* DOC(This type is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_NEW_ARRAY = 130, - /* DOC(This type is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_DELETE_ARRAY = 131, - - // NOTE(allen): Precedence 4, LtoR - CPP_TOKEN_PTRDOT = 132, - CPP_TOKEN_PTRARROW = 133, - - // NOTE(allen): Precedence 5, LtoR - - /* DOC(This type is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_MUL = 134, - CPP_TOKEN_DIV = 135, - CPP_TOKEN_MOD = 136, - - // NOTE(allen): Precedence 6, LtoR - - /* DOC(This type is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_ADD = 137, - - /* DOC(This type is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_SUB = 138, - - // NOTE(allen): Precedence 7, LtoR - CPP_TOKEN_LSHIFT = 139, - CPP_TOKEN_RSHIFT = 140, - - // NOTE(allen): Precedence 8, LtoR - CPP_TOKEN_LESS = 141, - CPP_TOKEN_GRTR = 142, - CPP_TOKEN_GRTREQ = 143, - CPP_TOKEN_LESSEQ = 144, - - // NOTE(allen): Precedence 9, LtoR - CPP_TOKEN_EQEQ = 145, - CPP_TOKEN_NOTEQ = 146, - - // NOTE(allen): Precedence 10, LtoR - - /* DOC(This type is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_BIT_AND = 147, - - // NOTE(allen): Precedence 11, LtoR - CPP_TOKEN_BIT_XOR = 148, - - // NOTE(allen): Precedence 12, LtoR - CPP_TOKEN_BIT_OR = 149, - - // NOTE(allen): Precedence 13, LtoR - CPP_TOKEN_AND = 150, - - // NOTE(allen): Precedence 14, LtoR - CPP_TOKEN_OR = 151, - - // NOTE(allen): Precedence 15, RtoL - CPP_TOKEN_TERNARY_QMARK = 152, - CPP_TOKEN_COLON = 153, - CPP_TOKEN_THROW = 154, - CPP_TOKEN_EQ = 155, - CPP_TOKEN_ADDEQ = 156, - CPP_TOKEN_SUBEQ = 157, - CPP_TOKEN_MULEQ = 158, - CPP_TOKEN_DIVEQ = 159, - CPP_TOKEN_MODEQ = 160, - CPP_TOKEN_LSHIFTEQ = 161, - CPP_TOKEN_RSHIFTEQ = 162, - CPP_TOKEN_ANDEQ = 163, - CPP_TOKEN_OREQ = 164, - CPP_TOKEN_XOREQ = 165, - - // NOTE(allen): Precedence 16, LtoR - CPP_TOKEN_COMMA = 166, - - /* DOC(This type is for parser use, it is not output by the lexer.) */ - CPP_TOKEN_EOF = 167, - - CPP_TOKEN_TYPE_COUNT = 168, -}; - -/* DOC(Cpp_Token represents a single lexed token. It is the primary output of the lexing system.) -DOC_SEE(Cpp_Token_Flag) */ -STRUCT Cpp_Token{ - /* DOC(The type field indicates the type of the token. All tokens have a type no matter the circumstances.) */ - Cpp_Token_Type type; - - /* DOC(The start field indicates the index of the first character of this token's lexeme.) */ - int32_t start; - - /* DOC(The size field indicates the number of bytes in this token's lexeme.) */ - int32_t size; - - /* DOC(The state_flags should not be used outside of the lexer's implementation.) */ - uint16_t state_flags; - - /* DOC(The flags field contains extra useful information about the token.) */ - uint16_t flags; -}; - -/* DOC(The Cpp_Token_Category enum groups certain Cpp_Token_Type values into greater categories) -DOC_SEE(cpp_token_category_from_type) */ -ENUM(uint32_t, Cpp_Token_Category){ - CPP_TOKEN_CAT_NONE = 0, - CPP_TOKEN_CAT_BOOLEAN_CONSTANT = 1, - CPP_TOKEN_CAT_TYPE = 2, - CPP_TOKEN_CAT_MODIFIER = 3, - CPP_TOKEN_CAT_QUALIFIER = 4, - CPP_TOKEN_CAT_OPERATOR = 5, - CPP_TOKEN_CAT_CONTROL_FLOW = 6, - CPP_TOKEN_CAT_CAST = 7, - CPP_TOKEN_CAT_TYPE_DECLARATION = 8, - CPP_TOKEN_CAT_ACCESS = 9, - CPP_TOKEN_CAT_LINKAGE = 10, - CPP_TOKEN_CAT_OTHER = 11, - CPP_TOKEN_CAT_EOF = 12, -}; - -/* DOC(The Cpp_Token_Flags are used to mark up tokens with additional information.) */ -ENUM(uint16_t, Cpp_Token_Flag){ - /* DOC(Indicates that the token is a preprocessor directive.) */ - CPP_TFLAG_PP_DIRECTIVE = 0x1, - - /* DOC(Indicates that the token is on the line of a preprocessor directive.) */ - CPP_TFLAG_PP_BODY = 0x2, - - /* DOC(Indicates that the token spans across multiple lines. This can show up on line comments and string literals with back slash line continuation. ) */ - CPP_TFLAG_MULTILINE = 0x4, - - /* DOC(Indicates that the token is some kind of operator or punctuation like braces.) */ - CPP_TFLAG_IS_OPERATOR = 0x8, - - /* DOC(Indicates that the token is a keyword.) */ - CPP_TFLAG_IS_KEYWORD = 0x10, -}; - -/* DOC(Cpp_Token_Array is used to bundle together the common elements of a growing array of Cpp_Tokens. To initialize it the tokens field should point to a block of memory with a size equal to max_count*sizeof(Cpp_Token) and the count should be initialized to zero.) */ -STRUCT Cpp_Token_Array{ - /* DOC(The tokens field points to the memory used to store the array of tokens.) */ - Cpp_Token *tokens; - - /* DOC(The count field counts how many tokens in the array are currently used.) */ - int32_t count; - - /* DOC(The max_count field specifies the maximum size the count field may grow to before the tokens array is out of space.) */ - int32_t max_count; -}; - -static Cpp_Token_Array null_cpp_token_array = {}; - -/* DOC(Cpp_Get_Token_Result is the return result of the cpp_get_token call.) -DOC_SEE(cpp_get_token) */ -STRUCT Cpp_Get_Token_Result{ - /* DOC(The token_index field indicates which token answers the query. To get the token from the source array CODE_EXAMPLE(array.tokens[result.token_index])) */ - int32_t token_index; - - /* DOC(The in_whitespace field is true when the query position was actually in whitespace after the result token.) */ - int32_t in_whitespace_after_token; - - /* DOC(If the token_index refers to an actual token, this is the start value of the token. Otherwise this is zero.) */ - int32_t token_start; - - /* DOC(If the token_index refers to an actual token, this is the start + size value of the token. Otherwise this is zero.) */ - int32_t token_one_past_last; -}; - -/* DOC(Cpp_Relex_Range is the return result of the cpp_get_relex_range call.) -DOC_SEE(cpp_get_relex_range) */ -STRUCT Cpp_Relex_Range{ - /* DOC(The index of the first token in the unedited array that needs to be relexed.) */ - int32_t start_token_index; - - /* DOC(The index of the first token in the unedited array after the edited range that may not need to be relexed. Sometimes a relex operation has to lex past this position to find a token that is not effected by the edit.) */ - int32_t end_token_index; -}; - -struct Cpp_Lex_FSM{ - uint8_t state; - uint8_t emit_token; - uint8_t flags; -}; -static Cpp_Lex_FSM null_lex_fsm = {}; - -/* DOC(A Cpp_Keyword_Table contains a list of keywords and a hashed lookup table for the keywords. They are used to setup a parse context.) -DOC_SEE(cpp_make_token_array) -HIDE_MEMBERS() */ -STRUCT Cpp_Keyword_Table{ - void *mem; - umem memsize; - u64 *keywords; - u32 max; -}; - -/* DOC(Cpp_Lex_Data represents the state of the lexer so that the system may be resumable and the user can manage the lexer state and decide when to resume lexing with it. To create a new lexer state call cpp_lex_data_init. - -The internals of the lex state should not be treated as a part of the public API.) -DOC_SEE(cpp_lex_data_init) -HIDE_MEMBERS() */ -STRUCT Cpp_Lex_Data{ - char tb[32]; - i32 tb_pos; - i32 token_start; - - i32 pos; - i32 pos_overide; - i32 chunk_pos; - - Cpp_Lex_FSM fsm; - u8 white_done; - u8 pp_state; - u8 completed; - - Cpp_Token token; - - char raw_delim[16]; - i32 delim_length; - - b8 str_raw; - b8 str_include; - b8 ignore_string_delims; - - Cpp_Keyword_Table keyword_table; - Cpp_Keyword_Table preprops_table; - - i32 __pc__; -}; - -/* DOC(Cpp_Lex_Result is returned from the lexing engine to indicate why it stopped lexing.) */ -ENUM(int32_t, Cpp_Lex_Result){ - /* DOC(This indicates that the system got to the end of the file and will not accept more input.) */ - LexResult_Finished = 0, - - /* DOC(This indicates that the system got to the end of an input chunk and is ready to receive the next input chunk.) */ - LexResult_NeedChunk = 1, - - /* DOC(This indicates that the output array ran out of space to store tokens and needs to be replaced or expanded before continuing.) */ - LexResult_NeedTokenMemory = 2, - - /* DOC(This indicates that the maximum number of output tokens as specified by the user was hit.) */ - LexResult_HitTokenLimit = 3, -}; - -/* DOC(Cpp_Relex_Data represents the state of the relexer so that the system may be resumable. To create a new relex state call cpp_relex_init.) -DOC_SEE(cpp_relex_init) -HIDE_MEMBERS()*/ -STRUCT Cpp_Relex_Data{ - Cpp_Lex_Data lex; - - Cpp_Token end_token; - - int32_t relex_start_position; - int32_t start_token_index; - int32_t end_token_index; - int32_t original_end_token_index; - - int32_t character_shift_amount; - - Cpp_Lex_Result result_state; - - int32_t __pc__; -}; - -ENUM_INTERNAL(uint16_t, Cpp_Preprocessor_State){ - CPP_LEX_PP_DEFAULT = 0, - CPP_LEX_PP_IDENTIFIER = 1, - CPP_LEX_PP_MACRO_IDENTIFIER = 2, - CPP_LEX_PP_INCLUDE = 3, - CPP_LEX_PP_BODY = 4, - CPP_LEX_PP_BODY_IF = 5, - CPP_LEX_PP_NUMBER = 6, - CPP_LEX_PP_ERROR = 7, - CPP_LEX_PP_JUNK = 8, - CPP_LEX_PP_COUNT = 9 -}; - -ENUM_INTERNAL(uint8_t, Cpp_Lex_State){ - LS_default = 0, - LS_identifier = 1, - LS_pound = 2, - LS_pp = 3, - LS_ppdef = 4, - LS_string_R = 5, - LS_string_LUu8 = 6, - LS_string_u = 7, - LS_number = 8, - LS_number0 = 9, - LS_float = 10, - LS_crazy_float0 = 11, - LS_crazy_float1 = 12, - LS_hex = 13, - LS_comment_pre = 14, - LS_comment = 15, - LS_comment_slashed = 16, - LS_comment_block = 17, - LS_comment_block_ending = 18, - LS_dot = 19, - LS_ellipsis = 20, - LS_less = 21, - LS_more = 22, - LS_minus = 23, - LS_arrow = 24, - LS_and = 25, - LS_or = 26, - LS_plus = 27, - LS_colon = 28, - LS_single_op = 29, - LS_error_message = 30, - // - LS_count = 31, - LS_char = 32, -}; - -// NOTE(allen): These provide names that match the overloaded meanings of string states. -#define LS_string_raw LS_string_R -#define LS_string_normal LS_string_LUu8 -#define LS_string_include LS_string_u - -ENUM_INTERNAL(uint8_t, Cpp_Lex_Int_State){ - LSINT_default, - LSINT_u, - LSINT_l, - LSINT_L, - LSINT_ul, - LSINT_uL, - LSINT_ll, - LSINT_extra, - // - LSINT_count -}; - -ENUM_INTERNAL(uint8_t, Cpp_Lex_Str_State){ - LSSTR_default, - LSSTR_escape, - LSSTR_multiline, - // - LSSTR_count -}; - -#define LSSTR_include_count 1 -#define LSSTR_error LSSTR_escape -#define LSSTR_get_delim LSSTR_escape -#define LSSTR_check_delim LSSTR_count - -ENUM_INTERNAL(uint8_t, Cpp_Lex_PP_State){ - LSPP_default = 0, - LSPP_include = 1, - LSPP_macro_identifier = 2, - LSPP_identifier = 3, - LSPP_body_if = 4, - LSPP_body = 5, - LSPP_number = 6, - LSPP_error = 7, - LSPP_junk = 8, - LSPP_no_strings = 9, - // - LSPP_count = 10 -}; - -#endif - -// BOTTOM - diff --git a/4coder_lists.cpp b/4coder_lists.cpp index b5a19d0a..8bff483c 100644 --- a/4coder_lists.cpp +++ b/4coder_lists.cpp @@ -379,7 +379,7 @@ begin_integrated_lister__with_fixed_options(Application_Links *app, char *query_ SCu8(options[i].status), options[i].user_data, shortcut_chars_length + 1); - memcpy(extra, shortcut_chars, shortcut_chars_length + 1); + block_copy(extra, shortcut_chars, shortcut_chars_length + 1); } lister_set_query(&state->lister, query_string); state->lister.data.handlers = handlers; diff --git a/4coder_log_parser.cpp b/4coder_log_parser.cpp index 0917f738..a41c9bc7 100644 --- a/4coder_log_parser.cpp +++ b/4coder_log_parser.cpp @@ -646,8 +646,8 @@ log_parse_fill(Application_Links *app, Buffer_ID buffer){ } internal void -log_graph_render__tag(Arena *arena, Fancy_String_List *line, Log_Parse *log_parse, Log_Tag *tag){ - String_Const_u8 tag_name = log_parse__get_string(log_parse, tag->name); +log_graph_render__tag(Arena *arena, Fancy_String_List *line, Log_Parse *log, Log_Tag *tag){ + String_Const_u8 tag_name = log_parse__get_string(log, tag->name); push_fancy_stringf(arena, line, white, "["); push_fancy_string(arena, line, green, tag_name); push_fancy_stringf(arena, line, white, "="); @@ -655,7 +655,7 @@ log_graph_render__tag(Arena *arena, Fancy_String_List *line, Log_Parse *log_pars push_fancy_stringf(arena, line, pink, "0x%llx", tag->value.value_s); } else if (tag->value.kind == LogTagKind_String){ - String_Const_u8 value = log_parse__get_string(log_parse, tag->value.value); + String_Const_u8 value = log_parse__get_string(log, tag->value.value); push_fancy_string(arena, line, pink, value); } push_fancy_stringf(arena, line, white, "]"); @@ -940,15 +940,15 @@ CUSTOM_DOC("Scroll the log graph down one whole page") } internal Log_Graph_Box* -log_graph__get_box_at_point(Log_Graph *log_graph, Vec2_f32 p){ +log_graph__get_box_at_point(Log_Graph *graph, Vec2_f32 p){ Log_Graph_Box *result = 0; - if (!rect_contains_point(log_graph->details_region, p)){ - for (Log_Graph_Box *box_node = log_graph->first_box; + if (!rect_contains_point(graph->details_region, p)){ + for (Log_Graph_Box *box_node = graph->first_box; box_node != 0; box_node = box_node->next){ Rect_f32 box = box_node->rect; - box.y0 -= log_graph->y_scroll; - box.y1 -= log_graph->y_scroll; + box.y0 -= graph->y_scroll; + box.y1 -= graph->y_scroll; if (rect_contains_point(box, p)){ result = box_node; break; @@ -959,10 +959,10 @@ log_graph__get_box_at_point(Log_Graph *log_graph, Vec2_f32 p){ } internal Log_Graph_Box* -log_graph__get_box_at_mouse_point(Application_Links *app, Log_Graph *log_graph){ +log_graph__get_box_at_mouse_point(Application_Links *app, Log_Graph *graph){ Mouse_State mouse = get_mouse_state(app); - Vec2_f32 m_p = V2f32(mouse.p) - log_graph->layout_region.p0; - return(log_graph__get_box_at_point(log_graph, m_p)); + Vec2_f32 m_p = V2f32(mouse.p) - graph->layout_region.p0; + return(log_graph__get_box_at_point(graph, m_p)); } CUSTOM_COMMAND_SIG(log_graph__click_select_event) diff --git a/4coder_metadata_generator.cpp b/4coder_metadata_generator.cpp index e6d1c2a0..209cd598 100644 --- a/4coder_metadata_generator.cpp +++ b/4coder_metadata_generator.cpp @@ -118,6 +118,7 @@ prev_token(Reader *reader){ } if (result.kind != TokenBaseKind_Comment && + result.kind != TokenBaseKind_Whitespace && result.kind != TokenBaseKind_LexError){ break; } @@ -147,6 +148,7 @@ get_token(Reader *reader){ } if (result.kind != TokenBaseKind_Comment && + result.kind != TokenBaseKind_Whitespace && result.kind != TokenBaseKind_LexError){ break; } @@ -645,8 +647,8 @@ parse_alias(Arena *arena, Meta_Command_Entry_Arrays *arrays, Reader *reader){ static void parse_text(Arena *arena, Meta_Command_Entry_Arrays *entry_arrays, u8 *source_name, String_Const_u8 text){ - Base_Allocator *allocator = get_allocator_malloc(); - Token_Array array = lex_cpp_initial(allocator, text); + Token_List token_list = lex_full_input_cpp(arena, text); + Token_Array array = token_array_from_list(arena, &token_list); Reader reader_ = make_reader(array, source_name, text); Reader *reader = &reader_; @@ -692,7 +694,7 @@ parse_text(Arena *arena, Meta_Command_Entry_Arrays *entry_arrays, u8 *source_nam b32 found_start_pos = false; for (i32 R = 0; R < 3; ++R){ Token p_token = prev_token(reader); - if (p_token.sub_kind == TokenCppKind_Define){ + if (p_token.sub_kind == TokenCppKind_PPDefine){ if (R == 2){ found_start_pos = true; } @@ -718,8 +720,6 @@ parse_text(Arena *arena, Meta_Command_Entry_Arrays *entry_arrays, u8 *source_nam break; } } - - base_free(allocator, array.tokens); } static void @@ -816,6 +816,13 @@ main(int argc, char **argv){ start_i = 3; } + printf("metadata_generator "); + for (i32 i = start_i; i < argc; i += 1){ + printf("%s ", argv[i]); + } + printf("\n"); + fflush(stdout); + Meta_Command_Entry_Arrays entry_arrays = {}; for (i32 i = start_i; i < argc; ++i){ Filename_Character *pattern_name = encode(arena, argv[i]); diff --git a/4coder_project_commands.cpp b/4coder_project_commands.cpp index 65d6dd5d..d87571f9 100644 --- a/4coder_project_commands.cpp +++ b/4coder_project_commands.cpp @@ -353,7 +353,7 @@ parse_project__config_data__version_1(Arena *arena, String_Const_u8 root_dir, Co node != 0; node = node->next, ++dst){ Config_Compound *src = node->result.compound; - memset(dst, 0, sizeof(*dst)); + block_zero_struct(dst); dst->recursive = true; dst->relative = true; @@ -523,7 +523,7 @@ static Project_Parse_Result parse_project__data(Arena *arena, String_Const_u8 file_name, Data raw_data, String_Const_u8 file_dir){ String_Const_u8 data = SCu8(raw_data); Project_Parse_Result result = {}; - Cpp_Token_Array array = text_data_to_token_array(arena, data); + Token_Array array = token_array_from_text(arena, data); if (array.tokens != 0){ result.parsed = text_data_and_token_array_to_parse_data(arena, file_name, data, array); if (result.parsed != 0){ @@ -634,7 +634,7 @@ project_deep_copy__inner(Arena *arena, Project *project){ } } - memcpy(result.fkey_commands, project->fkey_commands, sizeof(result.fkey_commands)); + block_copy_array(result.fkey_commands, project->fkey_commands); result.loaded = true; return(result); diff --git a/4coder_scope_commands.cpp b/4coder_scope_commands.cpp index d04749d0..8ab99ba0 100644 --- a/4coder_scope_commands.cpp +++ b/4coder_scope_commands.cpp @@ -4,32 +4,28 @@ // TOP -static b32 parse_statement_down(Application_Links *app, Statement_Parser *parser, Token *token_out); - -//////////////////////////////// - static Find_Scope_Token_Type -find_scope_get_token_type(u32 flags, Token_Type token_type){ +find_scope_get_token_type(Find_Scope_Flag flags, Token_Base_Kind kind){ Find_Scope_Token_Type type = FindScopeTokenType_None; - if (flags & FindScope_Brace){ - switch (token_type){ - case CPP_TOKEN_BRACE_OPEN: + if (flags & FindScope_Scope){ + switch (kind){ + case TokenBaseKind_ScopeOpen: { type = FindScopeTokenType_Open; }break; - case CPP_TOKEN_BRACE_CLOSE: + case TokenBaseKind_ScopeClose: { type = FindScopeTokenType_Close; }break; } } - if (flags & FindScope_Paren){ - switch (token_type){ - case CPP_TOKEN_PARENTHESE_OPEN: + else if (flags & FindScope_Paren){ + switch (kind){ + case TokenBaseKind_ParentheticalOpen: { type = FindScopeTokenType_Open; }break; - case CPP_TOKEN_PARENTHESE_CLOSE: + case TokenBaseKind_ParentheticalClose: { type = FindScopeTokenType_Close; }break; @@ -356,7 +352,7 @@ CUSTOM_DOC("Finds the scope enclosed by '{' '}' surrounding the cursor and puts Buffer_ID buffer = view_get_buffer(app, view, AccessProtected); i64 pos = view_get_cursor_pos(app, view); Range_i64 range = {}; - if (find_scope_range(app, buffer, pos, &range, FindScope_Brace)){ + if (find_scope_range(app, buffer, pos, &range, FindScope_Scope)){ view_set_cursor_and_preferred_x(app, view, seek_pos(range.first)); view_set_mark(app, view, seek_pos(range.end)); view_set_to_region(app, view, range.first, range.end); @@ -373,8 +369,8 @@ CUSTOM_DOC("Finds the first scope started by '{' after the cursor and puts the c i64 start_pos = pos; i64 top = 0; i64 bottom = 0; - if (find_next_scope(app, buffer, start_pos, FindScope_Brace, &top)){ - if (find_scope_bottom(app, buffer, top, FindScope_EndOfToken|FindScope_Brace, &bottom)){ + if (find_next_scope(app, buffer, start_pos, FindScope_Scope, &top)){ + if (find_scope_bottom(app, buffer, top, FindScope_EndOfToken|FindScope_Scope, &bottom)){ view_set_cursor_and_preferred_x(app, view, seek_pos(top)); view_set_mark(app, view, seek_pos(bottom)); view_set_to_region(app, view, top, bottom); @@ -392,8 +388,8 @@ CUSTOM_DOC("Finds the first scope started by '{' before the cursor and puts the i64 start_pos = pos; i64 top = 0; i64 bottom = 0; - if (find_prev_scope(app, buffer, start_pos, FindScope_Brace, &top)){ - if (find_scope_bottom(app, buffer, top, FindScope_EndOfToken|FindScope_Brace, &bottom)){ + if (find_prev_scope(app, buffer, start_pos, FindScope_Scope, &top)){ + if (find_scope_bottom(app, buffer, top, FindScope_EndOfToken|FindScope_Scope, &bottom)){ view_set_cursor_and_preferred_x(app, view, seek_pos(top)); view_set_mark(app, view, seek_pos(bottom)); view_set_to_region(app, view, top, bottom); @@ -494,256 +490,5 @@ CUSTOM_DOC("Deletes the braces surrounding the currently selected scope. Leaves } } -static Token* -parser_next_token(Statement_Parser *parser){ - return(token_iter_next(&parser->token_iterator)); -} - -static b32 -parse_for_down(Application_Links *app, Statement_Parser *parser, Token *token_out){ - b32 success = false; - NotImplemented; -#if 0 - Token *token = parser_next_token(parser); - - i32 paren_level = 0; - for (;token != 0;){ - if (!(token->flags & CPP_TFLAG_PP_BODY)){ - switch (token->type){ - case CPP_TOKEN_PARENTHESE_OPEN: - { - ++paren_level; - }break; - - case CPP_TOKEN_PARENTHESE_CLOSE: - { - --paren_level; - if (paren_level == 0){ - success = parse_statement_down(app, parser, token_out); - goto finished; - } - else if (paren_level < 0){ - success = false; - goto finished; - } - }break; - } - } - token = parser_next_token(parser); - } - - finished:; -#endif - return(success); -} - -static b32 -parse_if_down(Application_Links *app, Statement_Parser *parser, Token *token_out){ - b32 success = false; - NotImplemented; -#if 0 - Token *token = parser_next_token(parser); - if (token != 0){ - success = parse_statement_down(app, parser, token_out); - if (success){ - token = parser_next_token(parser); - if (token != 0 && token->type == CPP_TOKEN_ELSE){ - success = parse_statement_down(app, parser, token_out); - } - } - } -#endif - return(success); -} - -static b32 -parse_block_down(Application_Links *app, Statement_Parser *parser, Token *token_out){ - b32 success = false; - NotImplemented; -#if 0 - Token *token = parser_next_token(parser); - - i32 nest_level = 0; - while (token != 0){ - switch (token->type){ - case CPP_TOKEN_BRACE_OPEN: - { - ++nest_level; - }break; - - case CPP_TOKEN_BRACE_CLOSE: - { - if (nest_level == 0){ - *token_out = *token; - success = true; - goto finished; - } - --nest_level; - }break; - } - token = parser_next_token(parser); - } - - finished:; -#endif - return(success); -} - -static b32 -parse_statement_down(Application_Links *app, Statement_Parser *parser, Token *token_out){ - b32 success = false; - NotImplemented; -#if 0 - Token *token = parser_next_token(parser); - - if (token != 0){ - b32 not_getting_block = false; - - do{ - switch (token->type){ - case CPP_TOKEN_BRACE_CLOSE: - { - goto finished; - }break; - - case CPP_TOKEN_FOR: - { - success = parse_for_down(app, parser, token_out); - goto finished; - }break; - - case CPP_TOKEN_IF: - { - success = parse_if_down(app, parser, token_out); - goto finished; - }break; - - case CPP_TOKEN_ELSE: - { - success = false; - goto finished; - }break; - - case CPP_TOKEN_BRACE_OPEN: - { - if (!not_getting_block){ - success = parse_block_down(app, parser, token_out); - goto finished; - } - }break; - - case CPP_TOKEN_SEMICOLON: - { - success = true; - *token_out = *token; - goto finished; - }break; - - case CPP_TOKEN_EQ: - { - not_getting_block = true; - }break; - } - - token = parser_next_token(parser); - }while(token != 0); - } - - finished:; -#endif - return(success); -} - -static Statement_Parser -make_statement_parser(Application_Links *app, Buffer_ID buffer, i32 token_index){ - Statement_Parser parser = {}; - NotImplemented; -#if 0 - Token_Range token_range = buffer_get_token_range(app, buffer); - if (token_range.first != 0){ - parser.token_iterator = make_token_iterator(token_range, token_index); - parser.buffer = buffer; - } -#endif - return(parser); -} - -static b32 -find_whole_statement_down(Application_Links *app, Buffer_ID buffer, i64 pos, i64 *start_out, i64 *end_out){ - b32 result = false; - i64 start = pos; - i64 end = start; - - Cpp_Get_Token_Result get_result = {}; - if (get_token_from_pos(app, buffer, pos, &get_result)){ - Statement_Parser parser = make_statement_parser(app, buffer, get_result.token_index); - if (parser.buffer != 0){ - if (get_result.in_whitespace_after_token){ - parser_next_token(&parser); - } - - Token end_token = {}; - if (parse_statement_down(app, &parser, &end_token)){ - end = end_token.start + end_token.size; - result = true; - } - } - } - - *start_out = start; - *end_out = end; - return(result); -} - -CUSTOM_COMMAND_SIG(scope_absorb_down) -CUSTOM_DOC("If a scope is currently selected, and a statement or block statement is present below the current scope, the statement is moved into the scope.") -{ - View_ID view = get_active_view(app, AccessOpen); - Buffer_ID buffer = view_get_buffer(app, view, AccessOpen); - - Range_i64 range = get_view_range(app, view); - if (buffer_get_char(app, buffer, range.min) == '{' && - buffer_get_char(app, buffer, range.max - 1) == '}'){ - Scratch_Block scratch(app); - if (find_whole_statement_down(app, buffer, range.max, &range.start, &range.end)){ - String_Const_u8 base_string = push_buffer_range(app, scratch, buffer, range); - String_Const_u8 string = string_skip_chop_whitespace(base_string); - - i32 newline_count = 0; - for (u8 *ptr = base_string.str; ptr < string.str; ++ptr){ - if (*ptr == '\n'){ - ++newline_count; - } - } - - b32 extra_newline = false; - if (newline_count >= 2){ - extra_newline = true; - } - - String_Const_u8 edit_str = {}; - if (extra_newline){ - edit_str = push_u8_stringf(scratch, "\n%.*s\n", string_expand(string)); - } - else{ - edit_str = push_u8_stringf(scratch, "%.*s\n", string_expand(string)); - } - - Batch_Edit batch_first = {}; - Batch_Edit batch_last = {}; - - batch_first.edit.text = edit_str; - batch_first.edit.range = Ii64(range.min - 1, range.min - 1); - batch_first.next = &batch_last; - batch_last.edit.text = SCu8(); - batch_last.edit.range = range; - - buffer_batch_edit(app, buffer, &batch_first); - } - } - - no_mark_snap_to_cursor(app, view); -} - // BOTTOM diff --git a/4coder_scope_commands.h b/4coder_scope_commands.h index 6118c30f..caf21dda 100644 --- a/4coder_scope_commands.h +++ b/4coder_scope_commands.h @@ -7,19 +7,15 @@ #if !defined(FCODER_SCOPE_COMMANDS_H) #define FCODER_SCOPE_COMMANDS_H +typedef u32 Find_Scope_Flag; enum{ FindScope_Parent = 1, FindScope_NextSibling = 2, FindScope_EndOfToken = 4, - FindScope_Brace = 8, + FindScope_Scope = 8, FindScope_Paren = 16, }; -struct Statement_Parser{ - Token_Iterator token_iterator; - Buffer_ID buffer; -}; - typedef i32 Find_Scope_Token_Type; enum{ FindScopeTokenType_None = 0, diff --git a/4coder_token.cpp b/4coder_token.cpp index fea7a739..3c79ac1a 100644 --- a/4coder_token.cpp +++ b/4coder_token.cpp @@ -23,5 +23,532 @@ token_list_push(Arena *arena, Token_List *list, Token *token){ list->total_count += 1; } +internal Token_Array +token_array_from_list(Arena *arena, Token_List *list){ + Token_Array array = {}; + if (list->node_count > 1){ + array.tokens = push_array(arena, Token, list->total_count); + Token *ptr = array.tokens; + for (Token_Block *node = list->first; + node != 0; + node = node->next){ + block_copy_dynamic_array(ptr, node->tokens, node->count); + ptr += node->count; + } + array.count = list->total_count; + array.max = array.count; + } + else if (list->node_count == 1){ + array.tokens = list->first->tokens; + array.count = list->first->count; + array.max = list->first->max; + } + return(array); +} + +internal i64 +token_index_from_pos(Token *tokens, i64 count, i64 pos){ + i64 result = 0; + if (pos >= tokens[count - 1].pos){ + result = count - 1; + } + else if (pos < 0){ + result = 0; + } + else{ + i64 first = 0; + i64 one_past_last = count; + for (;;){ + i64 index = (first + one_past_last) >> 1; + i64 index_pos = tokens[index].pos; + if (index_pos > pos){ + one_past_last = index; + } + else if (index_pos + tokens[index].size <= pos){ + first = index + 1; + } + else{ + result = index; + break; + } + } + } + return(result); +} + +internal i64 +token_index_from_pos(Token_Array *tokens, u64 pos){ + return(token_index_from_pos(tokens->tokens, tokens->count, pos)); +} + +//////////////////////////////// + +internal Token_Iterator_Array +token_iterator_index(u64 user_id, Token *tokens, i64 count, i64 token_index){ + Token_Iterator_Array it = {}; + if (tokens != 0){ + it.user_id = user_id; + it.ptr = tokens + token_index; + it.tokens = tokens; + it.count = count; + } + return(it); +} + +internal Token_Iterator_Array +token_iterator_index(u64 user_id, Token_Array tokens, i64 token_index){ + return(token_iterator_index(user_id, tokens.tokens, tokens.count, token_index)); +} + +internal Token_Iterator_Array +token_iterator(u64 user_id, Token *tokens, i64 count, Token *token){ + return(token_iterator_index(user_id, tokens, count, (i64)(token - tokens))); +} + +internal Token_Iterator_Array +token_iterator(u64 user_id, Token_Array tokens, Token *token){ + return(token_iterator_index(user_id, tokens.tokens, tokens.count, (i64)(token - tokens.tokens))); +} + +internal Token_Iterator_Array +token_iterator(u64 user_id, Token *tokens, i64 count){ + return(token_iterator_index(user_id, tokens, count, 0)); +} + +internal Token_Iterator_Array +token_iterator(u64 user_id, Token_Array tokens){ + return(token_iterator_index(user_id, tokens.tokens, tokens.count, 0)); +} + +internal Token_Iterator_Array +token_iterator_pos(u64 user_id, Token *tokens, i64 count, i64 pos){ + i64 index = token_index_from_pos(tokens, count, pos); + return(token_iterator_index(user_id, tokens, count, index)); +} + +internal Token_Iterator_Array +token_iterator_pos(u64 user_id, Token_Array tokens, i64 pos){ + i64 index = token_index_from_pos(tokens.tokens, tokens.count, pos); + return(token_iterator_index(user_id, tokens.tokens, tokens.count, index)); +} + +internal Token* +token_it_read(Token_Iterator_Array *it){ + Token *result = 0; + if (it->tokens != 0){ + result = it->ptr; + } + return(result); +} + +internal i64 +token_it_index(Token_Iterator_Array *it){ + return((i64)(it->ptr - it->tokens)); +} + +internal b32 +token_it_inc_all(Token_Iterator_Array *it){ + b32 result = false; + if (it->tokens != 0){ + if (it->ptr < it->tokens + it->count - 1){ + it->ptr += 1; + result = true; + } + } + return(result); +} + +internal b32 +token_it_dec_all(Token_Iterator_Array *it){ + b32 result = false; + if (it->tokens != 0){ + if (it->ptr > it->tokens){ + it->ptr -= 1; + result = true; + } + } + return(result); +} + +internal b32 +token_it_inc_non_whitespace(Token_Iterator_Array *it){ + b32 result = false; + repeat: + if (token_it_inc_all(it)){ + Token *token = token_it_read(it); + if (token != 0 && token->kind == TokenBaseKind_Whitespace){ + goto repeat; + } + result = true; + } + return(result); +} + +internal b32 +token_it_dec_non_whitespace(Token_Iterator_Array *it){ + b32 result = false; + repeat: + if (token_it_dec_all(it)){ + Token *token = token_it_read(it); + if (token != 0 && token->kind == TokenBaseKind_Whitespace){ + goto repeat; + } + result = true; + } + return(result); +} + +internal b32 +token_it_inc(Token_Iterator_Array *it){ + b32 result = false; + repeat: + if (token_it_inc_all(it)){ + Token *token = token_it_read(it); + if (token != 0 && (token->kind == TokenBaseKind_Whitespace || + token->kind == TokenBaseKind_Comment)){ + goto repeat; + } + result = true; + } + return(result); +} + +internal b32 +token_it_dec(Token_Iterator_Array *it){ + b32 result = false; + repeat: + if (token_it_dec_all(it)){ + Token *token = token_it_read(it); + if (token != 0 && (token->kind == TokenBaseKind_Whitespace || + token->kind == TokenBaseKind_Comment)){ + goto repeat; + } + result = true; + } + return(result); +} + +internal Token_Iterator_List +token_iterator_index(u64 user_id, Token_List *list, i64 index){ + Token_Iterator_List it = {}; + if (list->first != 0){ + index = clamp(0, index, list->total_count - 1); + i64 base_index = 0; + Token_Block *block = 0; + for (Token_Block *node = list->first; + node != 0; + node = node->next){ + if (index < base_index + node->count){ + block = node; + break; + } + base_index += block->count; + } + Assert(block != 0); + it.user_id = user_id; + it.index = index; + it.ptr = block->tokens + (index - base_index); + it.block = block; + it.first = list->first; + it.last = list->last; + it.node_count = list->node_count; + it.total_count = list->total_count; + } + return(it); +} + +internal Token_Iterator_List +token_iterator(u64 user_id, Token_List *list){ + return(token_iterator_index(user_id, list, 0)); +} + +internal Token_Iterator_List +token_iterator_pos(u64 user_id, Token_List *list, i64 pos){ + Token_Iterator_List it = {}; + if (list->first != 0){ + Token_Block *block = list->last; + Token *token = &block->tokens[block->count - 1]; + i64 size = token->pos + token->size; + pos = clamp(0, pos, size); + i64 base_index = 0; + block = 0; + for (Token_Block *node = list->first; + node != 0; + node = node->next){ + Token *last_token = &node->tokens[node->count - 1]; + i64 one_past_last = last_token->pos + last_token->size; + if (pos < one_past_last || + (node->next == 0 && pos == one_past_last)){ + block = node; + break; + } + base_index += block->count; + } + Assert(block != 0); + i64 sub_index = token_index_from_pos(block->tokens, block->count, pos); + it.user_id = user_id; + it.index = base_index + sub_index; + it.ptr = block->tokens + sub_index; + it.block = block; + it.first = list->first; + it.last = list->last; + it.node_count = list->node_count; + it.total_count = list->total_count; + } + return(it); +} + +internal Token* +token_it_read(Token_Iterator_List *it){ + Token *result = 0; + if (it->block != 0){ + result = it->ptr; + } + return(result); +} + +internal i64 +token_it_index(Token_Iterator_List *it){ + return(it->index); +} + +internal b32 +token_it_inc_all(Token_Iterator_List *it){ + b32 result = false; + if (it->block != 0){ + i64 sub_index = (i64)(it->ptr - it->block->tokens); + if (sub_index + 1 < it->block->count){ + it->index += 1; + it->ptr += 1; + result = true; + } + else{ + if (it->block->next != 0){ + it->block = it->block->next; + it->index += 1; + it->ptr = it->block->tokens; + result = true; + } + } + } + return(result); +} + +internal b32 +token_it_dec_all(Token_Iterator_List *it){ + b32 result = false; + if (it->block != 0){ + i64 sub_index = (i64)(it->ptr - it->block->tokens); + if (sub_index > 0){ + it->index -= 1; + it->ptr -= 1; + result = true; + } + else{ + if (it->block->prev != 0){ + it->block = it->block->prev; + it->index -= 1; + it->ptr = it->block->tokens + it->block->count - 1; + result = true; + } + } + } + return(result); +} + +internal b32 +token_it_inc_non_whitespace(Token_Iterator_List *it){ + b32 result = false; + repeat: + if (token_it_inc_all(it)){ + Token *token = token_it_read(it); + if (token != 0 && token->kind == TokenBaseKind_Whitespace){ + goto repeat; + } + result = true; + } + return(result); +} + +internal b32 +token_it_dec_non_whitespace(Token_Iterator_List *it){ + b32 result = false; + repeat: + if (token_it_dec_all(it)){ + Token *token = token_it_read(it); + if (token != 0 && token->kind == TokenBaseKind_Whitespace){ + goto repeat; + } + result = true; + } + return(result); +} + +internal b32 +token_it_inc(Token_Iterator_List *it){ + b32 result = false; + repeat: + if (token_it_inc_all(it)){ + Token *token = token_it_read(it); + if (token != 0 && (token->kind == TokenBaseKind_Whitespace || + token->kind == TokenBaseKind_Comment)){ + goto repeat; + } + result = true; + } + return(result); +} + +internal b32 +token_it_dec(Token_Iterator_List *it){ + b32 result = false; + repeat: + if (token_it_dec_all(it)){ + Token *token = token_it_read(it); + if (token != 0 && (token->kind == TokenBaseKind_Whitespace || + token->kind == TokenBaseKind_Comment)){ + goto repeat; + } + result = true; + } + return(result); +} + +internal Token_Iterator +token_iterator(Token_Iterator_Array it){ + Token_Iterator result = {}; + result.kind = TokenIterator_Array; + result.array = it; + return(result); +} + +internal Token_Iterator +token_iterator(Token_Iterator_List it){ + Token_Iterator result = {}; + result.kind = TokenIterator_List; + result.list = it; + return(result); +} + +internal Token* +token_it_read(Token_Iterator *it){ + switch (it->kind){ + case TokenIterator_Array: + { + return(token_it_read(&it->array)); + }break; + case TokenIterator_List: + { + return(token_it_read(&it->list)); + }break; + } + return(0); +} + +internal i64 +token_it_index(Token_Iterator *it){ + switch (it->kind){ + case TokenIterator_Array: + { + return(token_it_index(&it->array)); + }break; + case TokenIterator_List: + { + return(token_it_index(&it->list)); + }break; + } + return(0); +} + +internal b32 +token_it_inc_all(Token_Iterator *it){ + switch (it->kind){ + case TokenIterator_Array: + { + return(token_it_inc_all(&it->array)); + }break; + case TokenIterator_List: + { + return(token_it_inc_all(&it->list)); + }break; + } + return(0); +} + +internal b32 +token_it_dec_all(Token_Iterator *it){ + switch (it->kind){ + case TokenIterator_Array: + { + return(token_it_dec_all(&it->array)); + }break; + case TokenIterator_List: + { + return(token_it_dec_all(&it->list)); + }break; + } + return(0); +} + +internal b32 +token_it_inc_non_whitespace(Token_Iterator *it){ + switch (it->kind){ + case TokenIterator_Array: + { + return(token_it_inc_non_whitespace(&it->array)); + }break; + case TokenIterator_List: + { + return(token_it_inc_non_whitespace(&it->list)); + }break; + } + return(0); +} + +internal b32 +token_it_dec_non_whitespace(Token_Iterator *it){ + switch (it->kind){ + case TokenIterator_Array: + { + return(token_it_dec_non_whitespace(&it->array)); + }break; + case TokenIterator_List: + { + return(token_it_dec_non_whitespace(&it->list)); + }break; + } + return(0); +} + +internal b32 +token_it_inc(Token_Iterator *it){ + switch (it->kind){ + case TokenIterator_Array: + { + return(token_it_inc(&it->array)); + }break; + case TokenIterator_List: + { + return(token_it_inc(&it->list)); + }break; + } + return(0); +} + +internal b32 +token_it_dec(Token_Iterator *it){ + switch (it->kind){ + case TokenIterator_Array: + { + return(token_it_dec(&it->array)); + }break; + case TokenIterator_List: + { + return(token_it_dec(&it->list)); + }break; + } + return(0); +} + // BOTTOM diff --git a/4coder_token.h b/4coder_token.h index b1aa966b..13b656db 100644 --- a/4coder_token.h +++ b/4coder_token.h @@ -70,15 +70,47 @@ struct Token_Block{ Token_Block *next; Token_Block *prev; Token *tokens; - i32 count; - i32 max; + i64 count; + i64 max; }; struct Token_List{ Token_Block *first; Token_Block *last; - i32 node_count; - i32 total_count; + i64 node_count; + i64 total_count; +}; + +struct Token_Iterator_Array{ + u64 user_id; + Token *ptr; + Token *tokens; + i64 count; +}; + +struct Token_Iterator_List{ + u64 user_id; + i64 index; + Token *ptr; + Token_Block *block; + Token_Block *first; + Token_Block *last; + i64 node_count; + i64 total_count; +}; + +typedef i32 Token_Iterator_Kind; +enum{ + TokenIterator_Array, + TokenIterator_List, +}; + +struct Token_Iterator{ + Token_Iterator_Kind kind; + union{ + Token_Iterator_Array array; + Token_Iterator_List list; + }; }; #endif diff --git a/4coder_ui_helper.cpp b/4coder_ui_helper.cpp index 960fa11f..49b2e725 100644 --- a/4coder_ui_helper.cpp +++ b/4coder_ui_helper.cpp @@ -77,7 +77,7 @@ view_clear_ui_data(Application_Links *app, View_ID view_id){ static UI_Item* ui_list_add_item(Arena *arena, UI_List *list, UI_Item item){ UI_Item *node = push_array(arena, UI_Item, 1); - memcpy(node, &item, sizeof(item)); + block_copy_struct(node, &item); zdll_push_back(list->first, list->last, node); list->count += 1; return(node); @@ -358,7 +358,7 @@ lister_update_ui(Application_Links *app, View_ID view, Lister_State *state){ UI_Data *ui_data = 0; Arena *ui_arena = 0; if (view_get_ui_data(app, view, ViewGetUIFlag_ClearData, &ui_data, &ui_arena)){ - memset(ui_data, 0, sizeof(*ui_data)); + block_zero_struct(ui_data); UI_Item *highlighted_item = 0; UI_Item *hot_item = 0; @@ -508,7 +508,7 @@ lister_first_init(Application_Links *app, Lister *lister, void *user_data, i32 u lister->data.user_data_size = user_data_size; push_align(&lister->arena, 8); if (user_data != 0){ - memcpy(lister->data.user_data, user_data, user_data_size); + block_copy(lister->data.user_data, user_data, user_data_size); } } diff --git a/4ed_app_models.h b/4ed_app_models.h index 5ef7cb6d..65a39fca 100644 --- a/4ed_app_models.h +++ b/4ed_app_models.h @@ -80,7 +80,6 @@ struct Models{ Layout layout; Working_Set working_set; Live_Views live_set; - Parse_Context_Memory parse_context_memory; Global_History global_history; Text_Layout_Container text_layouts; Font_Set font_set; diff --git a/4ed_app_target.cpp b/4ed_app_target.cpp index 85888e12..99c84469 100644 --- a/4ed_app_target.cpp +++ b/4ed_app_target.cpp @@ -43,8 +43,7 @@ struct Mem_Options{ #include "4ed_buffer_model.h" #include "4ed_coroutine.h" -#define FCPP_FORBID_MALLOC -#include "4coder_lib/4cpp_lexer.h" +#include "4coder_token.h" #include "4ed_dynamic_variables.h" @@ -57,7 +56,6 @@ struct Mem_Options{ #include "4ed_working_set.h" #include "4ed_hot_directory.h" -#include "4ed_parse_context.h" #include "4ed_cli.h" #include "4ed_gui.h" #include "4ed_layout.h" diff --git a/4ed_parse_context.h b/4ed_parse_context.h deleted file mode 100644 index c3e7e3c7..00000000 --- a/4ed_parse_context.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Mr. 4th Dimention - Allen Webster - * - * 24.03.2018 - * - * Parse context structures - * - */ - -// TOP - -#if !defined(FRED_PARSE_CONTEXT_H) -#define FRED_PARSE_CONTEXT_H - -// TODO(allen): this needs a rewrite - -struct Stored_Parse_Context{ - umem memsize; - u64 *kw_keywords; - u64 *pp_keywords; - u32 kw_max; - u32 pp_max; -}; - -struct Stored_Parse_Context_Slot{ - union{ - Stored_Parse_Context_Slot *next; - Stored_Parse_Context *context; - }; - b32 freed; -}; - -struct Parse_Context_Memory{ - Stored_Parse_Context_Slot *parse_context_array; - u32 parse_context_counter; - u32 parse_context_max; - - Stored_Parse_Context_Slot *free_list; -}; - -struct Parse_Context{ - b32 valid; - Cpp_Keyword_Table kw_table; - Cpp_Keyword_Table pp_table; - umem memory_size; -}; - -#endif - -// BOTTOM - diff --git a/4ed_view.cpp b/4ed_view.cpp index 298dbd16..464535b7 100644 --- a/4ed_view.cpp +++ b/4ed_view.cpp @@ -467,43 +467,34 @@ finalize_color(Color_Table color_table, int_color color){ internal u32 get_token_color(Color_Table color_table, Token token){ u32 result = 0; - if ((token.flags & CPP_TFLAG_IS_KEYWORD) != 0){ - if (cpp_token_category_from_type(token.type) == CPP_TOKEN_CAT_BOOLEAN_CONSTANT){ - result = color_table.vals[Stag_Bool_Constant]; - } - else{ - result = color_table.vals[Stag_Keyword]; - } - } - else if ((token.flags & CPP_TFLAG_PP_DIRECTIVE) != 0){ + if (HasFlag(token.flags, TokenBaseFlag_PreprocessorBody)){ result = color_table.vals[Stag_Preproc]; } else{ - switch (token.type){ - case CPP_TOKEN_COMMENT: + switch (token.kind){ + case TokenBaseKind_Keyword: + { + // TODO(allen): beta: Stag_Bool_Constant + result = color_table.vals[Stag_Keyword]; + }break; + case TokenBaseKind_Comment: { result = color_table.vals[Stag_Comment]; }break; - case CPP_TOKEN_STRING_CONSTANT: + case TokenBaseKind_LiteralString: { result = color_table.vals[Stag_Str_Constant]; + // TODO(allen): beta: Stag_Char_Constant + // TODO(allen): beta: Stag_Include }break; - case CPP_TOKEN_CHARACTER_CONSTANT: - { - result = color_table.vals[Stag_Char_Constant]; - }break; - case CPP_TOKEN_INTEGER_CONSTANT: + case TokenBaseKind_LiteralInteger: { result = color_table.vals[Stag_Int_Constant]; }break; - case CPP_TOKEN_FLOATING_CONSTANT: + case TokenBaseKind_LiteralFloat: { result = color_table.vals[Stag_Float_Constant]; }break; - case CPP_PP_INCLUDE_FILE: - { - result = color_table.vals[Stag_Include]; - }break; default: { result = color_table.vals[Stag_Default]; diff --git a/buildsuper_x64.bat b/buildsuper_x64.bat index aceb62a5..89e9296e 100644 --- a/buildsuper_x64.bat +++ b/buildsuper_x64.bat @@ -22,7 +22,7 @@ set preproc_file=4coder_command_metadata.i set meta_macros=/DMETA_PASS call cl /I"%code_home%" %opts% %mode% %src% /P /Fi%preproc_file% %meta_macros% call cl /I"%code_home%" %opts% %mode% "%code_home%\4coder_metadata_generator.cpp" /Femetadata_generator -metadata_generator -R "%code_home%" "%cd%\\%preproc_file%" +metadata_generator -R "%code_home%" "%cd%\%preproc_file%" call cl /I"%code_home%" %opts% %mode% %src% /Fecustom_4coder %build_dll% %exports% diff --git a/project.4coder b/project.4coder index c4b292fe..14777893 100644 --- a/project.4coder +++ b/project.4coder @@ -85,13 +85,16 @@ command_list = { .cmd = { { "build_generator languages\\4coder_lexer_cpp_test.cpp ..\\build", .os = "win" }, }, } }; -//fkey_command[1] = "build x64"; -//fkey_command[3] = "build x86"; -//fkey_command[4] = "build metadata"; +fkey_command[1] = "build x64"; +fkey_command[2] = "build x86"; +fkey_command[3] = "build metadata"; +fkey_command[4] = "build C++ lexer generator"; +fkey_command[5] = "build token tester"; +fkey_command[6] = "run generator"; -fkey_command[1] = "build C++ lexer generator"; -fkey_command[2] = "build token tester"; -fkey_command[3] = "run generator"; +//fkey_command[1] = "build C++ lexer generator"; +//fkey_command[2] = "build token tester"; +//fkey_command[3] = "run generator"; fkey_command[9] = "build one time";