The current parser in OvaleCompile.lua is using a string.gsub() technique to implement a script grammar, but there are problems with this approach:
- It constantly creates new Lua strings which causes a lot of overhead.
- It takes an indeterminate number of passes over the code text to parse and generate an AST.
- It's slow: all reports of the "script ran too long" error have been from the Compile() method; it needs to execute within 200ms at most.
The parser should be rewritten as an LR parser that can parse the code in a single pass.
- 6 comments
- Last updated
- Jul 03, 2014
- Oct 12, 2012
- Fixed - Developer made requested changes. QA should verify.
- Enhancement - A change which is intended to better the project in some way
- Medium - Normal priority.