The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Use linked list for variables, replacing vector
- Use linked list for operators, replacing vector. Ensure we don't over-reserve space when new operators are added.
- Make sure we copy current stack reference with the object itself
- Context error position is now relative to the start of the input string
- Assignment operator now able to handle moved values
- Faster parsing for strings without escape sequences
- Rework internal token buffering
- Support escaped
\n,\t,\r,\xFFin strings used in expressions positionmember of the context'serrorobject, which will be set by rpn_process()- For floats in expressions, either integral or fractional part can be omitted when equal to 0. But, not both at the same time.
- Add
iandusuffix for integral numbers in expressions, changing default type from Float to Integer or Unsigned respectively - Add
rpn_value::checkedToInt(),rpn_value::checkedToFloat()andrpn_value::checkedToUint()that return error when conversion fails - Add
infandnanoperators
- Preserve variable reference after
ifn - Allow negative offsets for
index - rpnlib_util.h is included automatically
eqwill try to compare floating point numbers by comparing values distance with type's epsilon
- Parser no longer uses fuzzy matching for built-ins, avoiding conflict with operators
- Parser no longer uses fuzzy matching for numbers written in scientific notation
- Parser accepts more characters as end of the token, in addition to the space (
): newline (\n), carriage return (\r), horizontal tab (\t), vertical tab (\v) - Fix incorrect casts between int / uint / float when calculating numeric limits
poperator to print the top of the stack via debug function&varsyntax to create variable reference in expression=operator for variable assignment in expressionexistsoperator to check for variable existance (only for references)derefoperator to convert variable reference into a value (only for references)- Allow to use either float or double as floating type, parse numbers in expressions as specified type
- Add boolean type, parse
trueandfalsein expressions - Add null type, parse
nullin expressions - Add string type, parse double-quoted
"string"in expressions - Add integer and unsigned integer type, used in operators
- Allow to configure underlying types from rpnlib_config.h and -D... flags
- Return
rpn_errorfrom operators, split error types into categories - Create a new stack by using
[keyword. Move stack contents into the previous stack + size by using].
- Stack structure no longer holds raw
float, but internalrpn_valuetype - rpn_... setter and getter methods use
rpn_valuetype - Operator functions return
rpn_errortype, allowing to return both value and operator errors - Variables in expressions are no longer required to exist when using
&varExpression will automatically create the variable, set it tonulland push it's reference on the stack - It is possible to create 'reference' stack values
- Improve precision of
eandpi
- Proper value for
econstant - Allow to use multiple contexts simultaniously, replace
rpn_errorandrpn_debug_callbackwith the currentrpn_contextmemberserroranddebug_callbackrespectively
- Added abs operator
- Change compare operators to eq, ne, gt, ge, lt, le
- rpn_process will (optionally) fail if variable does not exist
- rpn_variable_set will replace value if variable already exists
- Clear context and memory leak fix
- Added more comparison operators (cmp, cmp3, index, map, constrain)
- Added casting methods (round, ceil, floor)
- AUnit testing
- Keywords file
- Do not compile with advanced math support by default
- Renamed 'if' to 'ifn' (numeric if)
- Remote testing using Travis and PIO Plus
- Examples and more commmands
- Renamed 'rpn_begin' to 'rpn_init'
- Variables now start with $ sign
Initial version