Originally shared by David Berneda
Originally shared by David Berneda
2017 will be a very busy year I guess. I'm working on a "PEG" engine for Delphi, in order to improve TeeBI expression and sql parsers. PEG is a formalism for generic lexer/parsing of any language, just using BNF-like grammars.
First attempt looks promising, it can now bootstrap itself with its own grammar, so it can also parse any other grammars.
Sources:
https://github.com/davidberneda/PEG
There are several other PEG implementations for other languages (Go, Dart, Rust etc) but couldn't find anyone for Delphi
2017 will be a very busy year I guess. I'm working on a "PEG" engine for Delphi, in order to improve TeeBI expression and sql parsers. PEG is a formalism for generic lexer/parsing of any language, just using BNF-like grammars.
First attempt looks promising, it can now bootstrap itself with its own grammar, so it can also parse any other grammars.
Sources:
https://github.com/davidberneda/PEG
There are several other PEG implementations for other languages (Go, Dart, Rust etc) but couldn't find anyone for Delphi
Have you seen Gold? goldparser.org - GOLD Parsing System - A Free, Multi-Programming Language, Parser Generator
ReplyDeleteOndrej Kelle I didn't know about it, the problem is I need to make my own, because it has to be included inside my products (TeeBI mainly), with native Delphi source. I've looked now at Gold, I think PEG technique has more advantadges
ReplyDeleteOndrej Kelle: GOLD Parser is and always will be free. However, it produces a LR(1) parser, what is different from a PEG parser. Congratulations for your innitiative!
ReplyDeleteOh very cool. Haven't found a Grammarcompiler for delphi and always wrote my grammar just by writing the parser^^.
ReplyDeleteCan you add it to Delphinus?
Alexander Benikowski yes thanks !! , I'll submit when its more perfectioned (made as a design time component, fixed bugs etc)
ReplyDeleteI have some other small freeware things that can be published too