got chemical creation string working

This commit is contained in:
herbglitch 2025-01-29 17:31:18 -07:00
parent 5b2b8ef21c
commit 122eb1d351
3 changed files with 334 additions and 34 deletions

View file

@ -11,25 +11,32 @@ extern "C" {
/*
* TODO: note here in header that this uses parser
* TODO: note here in header that group being used is persistant
<language> -> <group> <language> | <variableLine> <language> | <whitespace> <language>
* TODO: add allowance for any symbol in string?
<language> -> <group> <language> | <variableLine> <language> | <whitespace> <language>
<group> -> <groupName> <whitespace> <variable> <whitespace> LEFT_CURLY_BRACE <whitespace> <variableLine> <whitespace> RIGHT_CURLY_BRACE
<group> -> <groupName> <whitespace> <variable> <whitespace> OPEN_CURLY_BRACE <whitespace> <variableLine> <whitespace> CLOSE_CURLY_BRACE
<variableLine> -> <type> <whitespace> <variable> <whitespace> EQUALS <whitespace> value <whitespace> SEMICOLON <whitespace>
<variableLine> -> <type> <whitespace> <variable> <whitespace> EQUAL <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>
<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
<variable> -> ALPHA_UPPER_CHAR <variableName> | ALPHA_LOWER_CHAR <variableName> | UNDERSCORE <variableName>
<variableName> -> <variableChar> <variableName> | LAMBDA
<variableChar> -> ALPHA_UPPER_CHAR | ALPHA_LOWER_CHAR | UNDERSCORE | NUMBER
<number> -> NUMBER <number> | NUMBER LAMBDA
<string> -> QUOTE <stringChars> QUOTE
<stringChars> -> <stringChar> <stringChars> | <escapeChar> <stringChars> | LAMBDA
<stringChar> -> ALPHA_UPPER_CHAR | ALPHA_LOWER_CHAR | NUMBER | WHITESPACE | UNDERSCORE | OPEN_CURLY_BRACE | CLOSE_CURLY_BRACE | OPEN_PAREN | CLOSE_PAREN | BANG | HASH | DOLLER | PERCENT | AMPERSAND | SINGLE_QUOTE | ASTERISK | PLUS | COMMA | MINUS | PERIOD | SHASH | COLON | SEMICOLON | QUESTION_MARK | AT | OPEN_BRACKET | CLOSE_BRACKET | CARET | GRAVE | VERTICAL_LINE | TILDE
<comparisonChar> -> LESS_THAN | EQUAL | GREATER_THAN
<escapeChar> -> BACKSLASH BACKSLASH | BACKSLASH QUOTE BACKSLASH ALPHA_UPPER_CHAR | BACKSLASH ALPHA_LOWER_CHAR
<whitespace> -> SPACE <whitespace> | TAB <whitespace> | NEWLINE <whitespace> | LAMBDA
<number> -> NUMBER <number> | NUMBER LAMBDA
<whitespace> -> SPACE <whitespace> | TAB <whitespace> | NEWLINE <whitespace> | LAMBDA
*/
/**