51 lines
1.4 KiB
C
51 lines
1.4 KiB
C
|
|
#ifndef ARC_STD_PARSER_CHEMICAL_H_
|
||
|
|
#define ARC_STD_PARSER_CHEMICAL_H_
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
extern "C" {
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#include <stdint.h>
|
||
|
|
|
||
|
|
/*
|
||
|
|
<language> -> <group> <language> | <variableLine> <language> | <whitespace> <language>
|
||
|
|
|
||
|
|
<group> -> <groupName> <whitespace> <variable> <whitespace> LEFT_CURLY_BRACE <whitespace> <variableLine> <whitespace> RIGHT_CURLY_BRACE
|
||
|
|
|
||
|
|
<variableLine> -> <type> <whitespace> <variable> <whitespace> EQUALS <whitespace> value <whitespace> SEMICOLON <whitespace>
|
||
|
|
|
||
|
|
<groupName> -> <variable>
|
||
|
|
<type> -> <variable>
|
||
|
|
<value> -> <variable> | <number> | <nestedValue>
|
||
|
|
<nestedValue> -> OPEN_CURLY_BRACE <whitespace> <valueArgs> <whitespace> CLOSE_CURLY_BRACE
|
||
|
|
<valueArgs> -> <value> | <value> COMMA <valueArgs>
|
||
|
|
|
||
|
|
<variable> -> ALPHA_UPPER_CHAR <variableName> | ALPHA_LOWER_CHAR <variableName> | UNDERSCORE <variableName>
|
||
|
|
<variableName> -> <charOrNum> <variableName> | LAMBDA
|
||
|
|
<charOrNum> -> ALPHA_UPPER_CHAR | ALPHA_LOWER_CHAR | UNDERSCORE | NUM
|
||
|
|
|
||
|
|
<number> -> NUMBER <number> | NUMBER LAMBDA
|
||
|
|
|
||
|
|
<whitespace> -> SPACE <whitespace> | TAB <whitespace> | NEWLINE <whitespace> | LAMBDA
|
||
|
|
*/
|
||
|
|
|
||
|
|
typedef struct ARC_Chemical ARC_Chemical;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @brief TODO: write this
|
||
|
|
*/
|
||
|
|
void ARC_Chemical_Create(ARC_Chemical **parser);
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @brief TODO: write this
|
||
|
|
*/
|
||
|
|
void ARC_Chemical_Destroy(ARC_Chemical *parser);
|
||
|
|
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
}
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#endif //ARC_STD_PARSER_CHEMICAL_H_
|