Closed Atmaks closed 4 years ago
I'm not too familiar with the Lua example (@ColinH wrote the grammar), so my first guess would be, that the children are empty and hence node->children.begin() + 1
is simply invalid. Could you add a check and see if that is causing the crash?
Closing due to inactivity.
I'm trying to use the example grammar for Lua to build a call graph. The approach I have in mind is building a parse tree and then traversing it to create a proper call graph. For now, suppose we only care about "straight" function definitions (no assignment shenanigans). This is the selector I came up with:
The line with "children.erase" causes
print_dot
to crash with a Windows SEH exception with code 0xc0000005 "read access violation", which means this is not a proper way to trim the parse tree. What should I do instead?And thank you for making this awesome library open source! I believe this is the only modern lexer-parser C++ library publically available.