58 lines
1.1 KiB
C
58 lines
1.1 KiB
C
#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_
|