This repository has been archived by the owner on Oct 28, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi!
I was looking for a parser generator and your project matched my requirements. However, I needed to make some improvements so i decided to fork it (to be precise, the 1.1-alpha version).
I've completely rewritten the ParserBase class as it had some problems.
I revised the Parsable class (renamed to Scanner) and C# code emitter and made some performance optimalization:
I measured 10,000 iterations of parsing the pascal assignment grammar. There is some boost.
I made the generated code more readable, as well (https://github.com/adams85/human-parser-generator/blob/improvements/netcore/parser.cs), and included generation of the visitor pattern. (For demonstration, I rewrote AST generation using the visitor. It emits now formatted JSON.)
What do you think? Do you have any intention to merge this into the original project? I used C# 7 features heavily, but as far as I know mono supports it already. (But you may consider NET Core 2.0. I think, that's the future of cross-platform development.)
I gladly help you with developing the project if you choose so because it can become a neat tool. As a matter of fact, it is like that already. It needs some code cleanup/organization and there are some glitches in the model/code generation that should be fixed.