BNFT (Backus Naur Form Transformation) tool released

On my way to publishing my programming language Dawn (which I radically failed to promote for discussion in earlier posts :-) I have created and released a tool BNFT.

The tool takes a BNF input, a source file and outputs a target file. The BNF features an operator "->" where literals and nonterminals specified on the right side of the operator replaces the leftside in the output. This makes it suitable for a lot of purposes:

DSL creation, Advanced substitions (more advance that RegExps), Code prettifying etc.

The tools is vital in Dawns claim of syntax agnosticism, where programmers are allowed to roll their own syntax, while observering a few rules, that will allow other syntax flavors to view the same code with different syntaxes.

It is implemented in Java for now, windows examples are available and released under BSD license.

Feel free to try it out at my blog: Consistent Oxymoron, Neutral Bias, or something

By Poul Krogh at 2009年09月12日 19:42 | LtU Forum | previous forum topic | next forum topic | other blogs | 7472 reads

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

BNFT Update

Years after the fact: BNFT have been translated into javascript, that have proved a better vessel for Dawn development, especially with NodeJS.

So while Dawn is getting close to a release after so many years, BNFT is still excellent for playing with toy languages.

Complete with a fully functioning Brainfuck and Turtle implementation in the testbed, all running in your browser.

Check it out at:
https://github.com/phook/BNFT

By Poul Krogh at Tue, 2020年08月18日 14:43 | login or register to post comments

Come back!

I'll look for your next post in July of 2031?

:-D

By cpurdy at Tue, 2020年08月18日 15:39 | login or register to post comments

Good things come to those who wait :-)

Yeah, not to mention that I thought I hadn't share my javascript version, but actually this is a repost from 2014 :-/

By Poul Krogh at Thu, 2020年08月20日 07:01 | login or register to post comments

algorithm

Excellent idea, I like the integration with BNF.

Is it your own parsing algorithm, or is it some already known existing algorithm?

By Ivan V. at Thu, 2020年08月27日 10:30 | login or register to post comments

Own algoritm. Just a brute

Own algoritm. Just a brute force search, so order is important. This means that you can make catch alls in the "later" specs of an OR statement.

By Poul Krogh at Fri, 2020年09月11日 19:42 | login or register to post comments

AltStyle によって変換されたページ (->オリジナル) /