You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Or just not initializing it to 0 for non-consuming operators.
-> That was it, indeed, in the new _DEF op. (probably called from a _SEQ loop)!
Now in match():
#ifdef NDEBUG
len = 0; //! This doesn't help (it's even bad, for false sense of sec., and
//! easily masking bugs with that benign-looking 0 in the output),
//! as 0 is a valid output, which should still be ignored -- as any
//! others! -- if match() returned false!
//! OK, disabling it in debug builds for better diagnostics, but
//! enabling in release mode for some cushioning!...
#else
len = (unsigned)-666; // And indeed, this *did* crash! :) (e.g. #29)
#endif
The text was updated successfully, but these errors were encountered:
xparq
changed the title
Fix: Apparently using the len output of failed match somewhere
Fix: Apparently using the len output of a failed match somewhere
Sep 6, 2023
Nested structures like { some = code; { block; {another} stuff} yay }
can be parsed now with (almost) the ususal recursive grammar productions.
+ Rule tree: name lookup for _USE (no generic find() yet)
+ #14: Recursion is implemented, but not via _SELF yet
+ #15 (_DEF/_USE)
+ #28: Parser::run() added
+ OPERATORS -> CONST_OPERATORS, preparing to taking it seriously
(RULE.name is mutable though, for _DEF to still work on const rules,
but that's a tmp. kludge!)
+ Fix#29: Crash in _DEF for missing len = 0
+ Better diagnostics (tests, debug messages etc.)
+ Comments, cosmetics
Nested structures like { some = code; { block; {another} stuff} yay }
can be parsed now with (almost) the ususal recursive grammar productions.
+ Rule tree: name lookup for _USE (no generic find() yet)
+ #14: Recursion is implemented, but not via _SELF yet
+ #15 (_DEF/_USE)
+ #28: Parser::run() added
+ OPERATORS -> CONST_OPERATORS, preparing to taking it seriously
(RULE.name is mutable though, for _DEF to still work on const rules,
but that's a tmp. kludge!)
+ Fix#29: Crash in _DEF for missing len = 0
+ Better diagnostics (tests, debug messages etc.)
+ Comments, cosmetics
Or just not initializing it to 0 for non-consuming operators.
-> That was it, indeed, in the new
_DEF
op. (probably called from a_SEQ
loop)!Now in match():
The text was updated successfully, but these errors were encountered: