added some more doxygen to parser header
This commit is contained in:
parent
c4e6b525e2
commit
a3e640c252
1 changed files with 13 additions and 5 deletions
|
|
@ -11,12 +11,12 @@ extern "C" {
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief a parser type
|
* @brief a type used for splitting a string up into parts and storing them in user defined types
|
||||||
*/
|
*/
|
||||||
typedef struct ARC_Parser ARC_Parser;
|
typedef struct ARC_Parser ARC_Parser;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief a langue tag type for the parser //TODO: explain this better
|
* @brief a type that stores a tag id, and a list of tokens and tags that are the rules for a tag in a language
|
||||||
*/
|
*/
|
||||||
typedef struct ARC_ParserTag {
|
typedef struct ARC_ParserTag {
|
||||||
uint32_t tagId;
|
uint32_t tagId;
|
||||||
|
|
@ -42,17 +42,25 @@ typedef struct ARC_ParserTagToken {
|
||||||
/**
|
/**
|
||||||
* @brief a callback function to initialize the lexer the parser uses with rules
|
* @brief a callback function to initialize the lexer the parser uses with rules
|
||||||
*
|
*
|
||||||
* @param lexer the lexer used by the parser that rules should be added to
|
* @param[in] lexer the lexer used by the parser that rules should be added to
|
||||||
*/
|
*/
|
||||||
typedef void (* ARC_Parser_InitLexerRulesFn)(ARC_Lexer *lexer);
|
typedef void (* ARC_Parser_InitLexerRulesFn)(ARC_Lexer *lexer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief TODO: write this
|
* @brief a function callback the user provides to get a tag or token ID from a string
|
||||||
|
*
|
||||||
|
* @param[in] string the string to get an id from
|
||||||
|
*
|
||||||
|
* @return an id from the user, the user also can determine what id should be an error
|
||||||
*/
|
*/
|
||||||
typedef uint32_t (* ARC_Parser_GetStringIdFn)(ARC_String *string);
|
typedef uint32_t (* ARC_Parser_GetStringIdFn)(ARC_String *string);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief TODO: write this
|
* @brief a function callback to create and store parsed data passed in
|
||||||
|
*
|
||||||
|
* @param[in/out] data the place to store the datatype after it is created
|
||||||
|
* @param[in] parsedData the parsed data to use in creating the data
|
||||||
|
* @param[in] userData the data that is passed in during parser create, can be anything this callback
|
||||||
*/
|
*/
|
||||||
typedef void (* ARC_ParserData_CreateFn)(void **data, ARC_ParserTagToken *parsedData, void *userData);
|
typedef void (* ARC_ParserData_CreateFn)(void **data, ARC_ParserTagToken *parsedData, void *userData);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue