Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internals & comparison to PEG #2

Open
dumblob opened this issue Jun 7, 2021 · 2 comments
Open

Internals & comparison to PEG #2

dumblob opened this issue Jun 7, 2021 · 2 comments

Comments

@dumblob
Copy link

dumblob commented Jun 7, 2021

I'm curious about the internals of nevod app. Could you shed some light on the internal workings (any bytecode? how the extraction virtual machine works? etc.)? Maybe in some blog post or here or on another public place?

After I read the language reference for Nevod, I got the impression it's quite close to PEGs (or at least it seems Nevod could be compiled to PEGs). But I'm probably wrong as it seems you have a hand-crafted parser of Nevod and I suppose the backend will also be your work.

Could you comment on any (potential) relation to PEGs and maybe make some performance comparison (perhaps with LPegs)? Maybe just rewrite the examples from your web page in LPeg and run it on the same machine with default settings to see how it performs. Or maybe some more rigorous comparison...

@dmitry-surkov
Copy link
Member

While Nevod may seem close to PEG, it is targeted at natural language texts or combination of formal language with natural language (e.g. HTML). The performance requirement dictates usage of the programming languages to create parsers for the formal languages. C#, Java, TypeScript, JSON, XML, HTML, etc. - all have specially programmed and optimized parsers. However, we are considering usage of Nevod as a tool for syntax highlighting, where performance is not so important, but this might be a work on top of Nevod.

@dumblob
Copy link
Author

dumblob commented Jun 8, 2021

Thanks Dmitry. Any benchmark results yet (as I said ideally compared to PEGs - those from Lua are very popular and provide a simple Lua interface so it shouldn't be hard to use them as a fair competitor to Nevod).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants