creation and destruction in parser, also added some stuff to gitingore
This commit is contained in:
parent
5842197142
commit
60acfd075a
6 changed files with 151 additions and 4 deletions
|
|
@ -0,0 +1,58 @@
|
|||
#ifndef ARC_STD_PARSER_H_
|
||||
#define ARC_STD_PARSER_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "arc/std/array.h"
|
||||
//#include "arc/std/bool.h"
|
||||
//#include "arc/std/lexer.h"
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* @brief a lexer type
|
||||
*/
|
||||
typedef struct ARC_Parser ARC_Parser;
|
||||
|
||||
/**
|
||||
* @brief a lexer type
|
||||
*/
|
||||
typedef struct ARC_ParserLanguageTag {
|
||||
uint32_t tagId;
|
||||
|
||||
uint32_t **tokensOrTags;
|
||||
uint32_t tokensOrTagsSize;
|
||||
} ARC_ParserLanguageTag;
|
||||
|
||||
/**
|
||||
* @brief creates an ARC_Parser type
|
||||
*
|
||||
* @TODO: probs want to move the note to another file
|
||||
* @note array of tokens for langauge? like
|
||||
* ARC_ParserTag tag = {
|
||||
* VARIABLE_NAME, //tagId
|
||||
* {
|
||||
* { 2, CHAR_OR_NUM, VARIABLE_NAME },
|
||||
* { 1, LAMBDA },
|
||||
* }, //components
|
||||
* 2 //componentsSize
|
||||
* };
|
||||
*
|
||||
* @param[out] parser ARC_Parser to create
|
||||
* @param[in] language an arry of ARC_ParserLanguageTags defining a langauge
|
||||
*/
|
||||
void ARC_Parser_Create(ARC_Parser **parser, ARC_Array *language);
|
||||
|
||||
/**
|
||||
* @brief destroys an ARC_Parser type
|
||||
*
|
||||
* @param[in] parser ARC_Parser to free
|
||||
*/
|
||||
void ARC_Parser_Destroy(ARC_Parser *parser);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // !ARC_STD_PARSER_H_
|
||||
Loading…
Add table
Add a link
Reference in a new issue