progress writing new docs for 4.0.20
parent
a8d778f8b3
commit
bc30fee2b0
|
@ -413,9 +413,13 @@ UNION Range{
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* DOC(Parser_String_And_Type contains a string and type integer used to specify information about keywords to the parser.) */
|
||||||
STRUCT Parser_String_And_Type{
|
STRUCT Parser_String_And_Type{
|
||||||
|
/* DOC(The string specified by the pair, it need not be null terminated.) */
|
||||||
char *str;
|
char *str;
|
||||||
|
/* DOC(The number of bytes in the string str.) */
|
||||||
uint32_t length;
|
uint32_t length;
|
||||||
|
/* DOC(The type integer.) */
|
||||||
uint32_t type;
|
uint32_t type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ typedef int32_t b32_4tech;
|
||||||
|
|
||||||
////////////////
|
////////////////
|
||||||
|
|
||||||
FCPP_LINK umem_4tech
|
API_EXPORT FCPP_LINK umem_4tech
|
||||||
cpp_get_table_memory_size_null_terminated(char **str_array, u32_4tech str_count){
|
cpp_get_table_memory_size_null_terminated(char **str_array, u32_4tech str_count){
|
||||||
umem_4tech memsize = 0;
|
umem_4tech memsize = 0;
|
||||||
for (u32_4tech i = 0; i < str_count; ++i){
|
for (u32_4tech i = 0; i < str_count; ++i){
|
||||||
|
@ -77,7 +77,7 @@ cpp_get_table_memory_size_null_terminated(char **str_array, u32_4tech str_count)
|
||||||
return(memsize);
|
return(memsize);
|
||||||
}
|
}
|
||||||
|
|
||||||
FCPP_LINK umem_4tech
|
API_EXPORT FCPP_LINK umem_4tech
|
||||||
cpp_get_table_memory_size_string_lengths(u32_4tech *str_len, u32_4tech byte_stride, u32_4tech str_count){
|
cpp_get_table_memory_size_string_lengths(u32_4tech *str_len, u32_4tech byte_stride, u32_4tech str_count){
|
||||||
umem_4tech memsize = 0;
|
umem_4tech memsize = 0;
|
||||||
u8_4tech *length_data = (u8_4tech*)str_len;
|
u8_4tech *length_data = (u8_4tech*)str_len;
|
||||||
|
@ -166,7 +166,7 @@ cpp__fill_table(Cpp_Keyword_Table *table, char *str, u32_4tech str_count){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FCPP_LINK Cpp_Keyword_Table
|
API_EXPORT FCPP_LINK Cpp_Keyword_Table
|
||||||
cpp_make_table(char **str_array, u32_4tech str_stride, u32_4tech *len_array, u32_4tech len_stride, u32_4tech *type_array, u32_4tech type_stride, u32_4tech str_count, void *memory, umem_4tech memsize){
|
cpp_make_table(char **str_array, u32_4tech str_stride, u32_4tech *len_array, u32_4tech len_stride, u32_4tech *type_array, u32_4tech type_stride, u32_4tech str_count, void *memory, umem_4tech memsize){
|
||||||
Cpp_Keyword_Table table = {0};
|
Cpp_Keyword_Table table = {0};
|
||||||
table.mem = memory;
|
table.mem = memory;
|
||||||
|
@ -278,7 +278,7 @@ cpp__table_match(Cpp_Keyword_Table *table, char *s, u32_4tech s_len, u32_4tech *
|
||||||
return(result);
|
return(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
FCPP_LINK umem_4tech
|
API_EXPORT FCPP_LINK umem_4tech
|
||||||
cpp_get_table_memory_size_default(Cpp_Word_Table_Type type){
|
cpp_get_table_memory_size_default(Cpp_Word_Table_Type type){
|
||||||
u32_4tech *ptr = 0;
|
u32_4tech *ptr = 0;
|
||||||
u32_4tech count = 0;
|
u32_4tech count = 0;
|
||||||
|
@ -302,7 +302,7 @@ cpp_get_table_memory_size_default(Cpp_Word_Table_Type type){
|
||||||
return(size);
|
return(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
FCPP_LINK Cpp_Keyword_Table
|
API_EXPORT FCPP_LINK Cpp_Keyword_Table
|
||||||
cpp_make_table_default(Cpp_Word_Table_Type type, void *mem, umem_4tech memsize){
|
cpp_make_table_default(Cpp_Word_Table_Type type, void *mem, umem_4tech memsize){
|
||||||
char **str_ptr = 0;
|
char **str_ptr = 0;
|
||||||
u32_4tech *len_ptr = 0;
|
u32_4tech *len_ptr = 0;
|
||||||
|
|
|
@ -16,8 +16,11 @@
|
||||||
#define STRUCT struct
|
#define STRUCT struct
|
||||||
#endif
|
#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){
|
ENUM(uint32_t, Cpp_Word_Table_Type){
|
||||||
|
/* DOC(The Cpp_Keyword_Table used to list the typical keywords.) */
|
||||||
CPP_TABLE_KEYWORDS,
|
CPP_TABLE_KEYWORDS,
|
||||||
|
/* DOC(The Cpp_Keyword_Table used to list preprocessor directives.) */
|
||||||
CPP_TABLE_PREPROCESSOR_DIRECTIVES,
|
CPP_TABLE_PREPROCESSOR_DIRECTIVES,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -311,6 +314,9 @@ struct Cpp_Lex_FSM{
|
||||||
};
|
};
|
||||||
static Cpp_Lex_FSM null_lex_fsm = {0};
|
static Cpp_Lex_FSM null_lex_fsm = {0};
|
||||||
|
|
||||||
|
/* 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{
|
STRUCT Cpp_Keyword_Table{
|
||||||
void *mem;
|
void *mem;
|
||||||
umem_4tech memsize;
|
umem_4tech memsize;
|
||||||
|
|
|
@ -447,7 +447,13 @@ DOC_SEE(The_4coder_Clipboard)
|
||||||
|
|
||||||
API_EXPORT Parse_Context_ID
|
API_EXPORT Parse_Context_ID
|
||||||
Create_Parse_Context(Application_Links *app, Parser_String_And_Type *kw, uint32_t kw_count, Parser_String_And_Type *pp, uint32_t pp_count)
|
Create_Parse_Context(Application_Links *app, Parser_String_And_Type *kw, uint32_t kw_count, Parser_String_And_Type *pp, uint32_t pp_count)
|
||||||
{
|
/*
|
||||||
|
DOC_PARAM(kw, The list of keywords and type of each.)
|
||||||
|
DOC_PARAM(kw_count, The number of keywords in the list.)
|
||||||
|
DOC_PARAM(pp, The list of preprocessor directives and the type of each.)
|
||||||
|
DOC_PARAM(pp_count, The number of preprocessor directives in the list.)
|
||||||
|
DOC_RETURN(On success returns an id for the new parse context. If id == 0, then the maximum number of parse contexts has been reached.)
|
||||||
|
*/{
|
||||||
Command_Data *cmd = (Command_Data*)app->cmd_context;
|
Command_Data *cmd = (Command_Data*)app->cmd_context;
|
||||||
Models *models = cmd->models;
|
Models *models = cmd->models;
|
||||||
|
|
||||||
|
|
BIN
4ed_site.ctm
BIN
4ed_site.ctm
Binary file not shown.
Loading…
Reference in New Issue