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

Comments

  1. Ondrej 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

    ReplyDelete
  2. Ondrej 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!

    ReplyDelete
  3. Oh very cool. Haven't found a Grammarcompiler for delphi and always wrote my grammar just by writing the parser^^.
    Can you add it to Delphinus?

    ReplyDelete
  4. Alexander Benikowski yes thanks !! , I'll submit when its more perfectioned (made as a design time component, fixed bugs etc)
    I have some other small freeware things that can be published too

    ReplyDelete

Post a Comment