fixed constants in parserlang, still working on whitespace error

This commit is contained in:
herbglitch 2024-12-02 23:01:42 -07:00
parent c9a06e50ca
commit f0a20f2374

View file

@ -322,8 +322,8 @@ void ARC_Parser_CreateAsParserLang(ARC_Parser **parser, ARC_ParserLang_GetIdFn g
//<constantBody> -> <constantChar> <constantBody> | LAMBDA
uint32_t *constantBody[] = { (uint32_t[]){ 2, ARC_PARSERLANG_CONSTANT_CHAR, ARC_PARSERLANG_CONSTANT_BODY }, (uint32_t[]){ 1, ARC_PARSERLANG_LAMBDA } };
//<constantChar> -> ALPHA_UPPER_CHAR | UNDERSCORE
uint32_t *constantChar[] = { (uint32_t[]){ 2, ARC_PARSERLANG_TOKEN_ALPHA_UPPER_CHAR, ARC_PARSERLANG_TOKEN_UNDERSCORE_ID } };
//<constantChar> -> ALPHA_UPPER_CHAR | UNDERSCORE
uint32_t *constantChar[] = { (uint32_t[]){ 1, ARC_PARSERLANG_TOKEN_ALPHA_UPPER_CHAR }, (uint32_t[]){ 1, ARC_PARSERLANG_TOKEN_UNDERSCORE_ID } };
//<tag> -> LESS_THAN <variable> GREATER_THAN
uint32_t *tag[] = { (uint32_t[]){ 3, ARC_PARSERLANG_TOKEN_LESS_THAN_ID, ARC_PARSERLANG_VARIABLE, ARC_PARSERLANG_TOKEN_GREATER_THAN_ID } };
@ -368,6 +368,6 @@ void ARC_Parser_CreateAsParserLang(ARC_Parser **parser, ARC_ParserLang_GetIdFn g
ARC_ParserLang_GetIdFn *newGetIdFn = (ARC_ParserLang_GetIdFn *)malloc(sizeof(ARC_ParserLang_GetIdFn));
*newGetIdFn = getIdFn;
//TODO: add the create, destroy, and add callbacks
//create the parserlang
ARC_Parser_Create(parser, &parserLanguageArray, ARC_ParserLang_InitLexerRulesFn, &createDataFn, &destroyDataFn, newGetIdFn);
}