Create a custom language definition from bnf or ebnf.

SyntaxEditor for WPF Forum

Posted 15 years ago by Craig - Nstrument
Version: 9.1.0502
Avatar
If I have the BNF or EBNF definitions that describes a specific domain. What would be the best way to translate this into a custom language definition?

Thanks
Craig.

Comments (1)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Craig,

Right now we don't have anything in the product itself that would translate over from BNF/EBNF. That is something we're looking into for the future.

What you'd want to do to get up and running fast is to use a dynamic lexer and define the keywords and other patterns (identifiers, comments, strings, etc.) so they are highlighted properly. We are currently working on enhancing the format used to define dynamic lexers and are also making Language Designer tool enhancements so that will make it easy to define them quickly, but this is all still work in progress. Dynamic lexers currently can be defined using the SyntaxEditor 4.0 XML definition format (some samples in the sample project).

One alternative is to use MGrammar. MGrammar uses syntax similar to EBNF and we provide a free add-on that interfaces with it to implement syntax highlighting in SyntaxEditor. However as of yet, Microsoft hasn't announced the pricing for use of MGrammar (if any) and don't allow go live with it yet.

I should also note that the next build will have the beginnings of advanced parsing features that can be triggered in a separate thread (like calling ANTLR, etc.). Some info on that in the blog.

[Modified at 07/20/2009 06:10 PM]


Actipro Software Support

The latest build of this product (v24.1.2) was released 5 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.