TheLartians / PEGParser

💡 Build your own programming language! A C++17 PEG parser generator supporting parser combination, memoization, left-recursion and context-dependent grammars.
BSD 3-Clause "New" or "Revised" License
240 stars 21 forks source link

Parser state in filters #32

Open TheLartians opened 5 years ago

TheLartians commented 5 years ago

Currently, filters only capture an external state and are therefore not thread-safe and is not also not reset on syntax errors. Adding an internal state variable that is unique to the current parsing process would resolve this. The difficulty lies in finding a type-safe way to implement this.