added ability to check if token id is a lexer rule and wrote parser, still need to test

This commit is contained in:
herbglitch 2024-10-24 19:56:26 -06:00
parent 7a3495f7ae
commit d8d1a1a107
7 changed files with 211 additions and 13 deletions

View file

@ -4,7 +4,6 @@
#ifdef __cplusplus
extern "C" {
#endif
#include "arc/std/string.h"
#include <stdint.h>
@ -115,6 +114,16 @@ ARC_LexerToken ARC_Lexer_GetToken(ARC_Lexer *lexer, uint32_t index);
*/
uint32_t ARC_Lexer_GetTokensSize(ARC_Lexer *lexer);
/**
* @brief returns a boolean based on if a given id is a stored token rule id
*
* @param[in] lexer the lexer to check stored token rule ids
* @param[in] id the id to check against the token rules
*
* @return ARC_True if the id is a rule id, ARC_False otherwise
*/
ARC_Bool ARC_Lexer_IsTokenId(ARC_Lexer *lexer, uint32_t id);
/**
* @brief checks if the first character of string matches the automataData cast as a char
*