davidm / lua-parser-loose

loose parsing of Lua code, ignoring syntax errors
Other
14 stars 3 forks source link

Paul Kulchenko's fork #3

Open ildar opened 9 years ago

ildar commented 9 years ago

JFYI, Paul Kulchenko is doing his own fork here: https://github.com/pkulchenko/ZeroBraneStudio/tree/master/lualibs If interested, you may make a merge. I did it already, you can cherry-pick here: https://github.com/ildar/lua-parser-loose/commit/67f9007179d8a8f5ac6167e7f503c5846ae496d9

ildar commented 9 years ago

I mean @pkulchenko

pkulchenko commented 9 years ago

Just want to note that most of the changes were introduced for two purposes: make the parser more "complete" (not failing on invalid input) and to add enough information to process global/local/masked variables. There was also some logic added to handle incremental parsing (to allow, for example, restart processing from an earlier point).

I also have another set of changes/improvements that are not included in @ildar's batch of changes that add processing of function definitions and improve incremental processing.

ildar commented 9 years ago

@pkulchenko, yes, the commit I proposed is based on ZBS v0.80. And a few weeks ago you improved parser again. Is that what you mean? ​To manage this I've made another commit: https://github.com/ildar/lua-parser-loose/commit/c6f3f7ba41f6909e03b4effad7b713b3c2e7af0e

Paul, you didn't mention the compatibility level of your fork. I suppose that your changes are made quite compatible. This also means that the most recent version should work with ZBS 0.80, right?

pkulchenko commented 9 years ago

This also means that the most recent version should work with ZBS 0.80, right?

I have not tested that specifically, but I believe the answer is "yes". I wouldn't run it with 0.80 though as there is no code that can benefit from the changes (and still some risk of incompatibility). All these changes will be included in the next version of ZBS.

@davidm, David, I know this was largely an experiment to build a "loose" parser, but it's been working well for me and I wonder if you have any plans for it.