3

Are there any programs that do what Irony .NET language implementation kit does, but for other programming languages?

Abbafei
  • 3,088
  • 3
  • 27
  • 24
  • http://www.meta-alternative.net/mbase.html - see http://www.meta-alternative.net/pfdoc.pdf for example. This framework allows to implement embedded DSLs for .NET and to implement any kind of languages targeting .NET, LLVM, C, or whatever else (but you'd still need .NET to run the compiler). – SK-logic Mar 24 '11 at 10:19
  • I think your question is too vague. What are the properties of Irony that you want? – Ira Baxter Mar 24 '11 at 22:06

3 Answers3

1

Irony's grammar is encoded in C# with a BNF like notation, but of course you can use it to parse your own or other languages.

If you are looking for a parser/generator that doesn't have its grammar encoded in C#, try something like ANTLR. With ANTLR, you define your grammar separately in a language description file.

Dave Clemmer
  • 3,741
  • 12
  • 49
  • 72
1

There are parser combinator libraries for several other languages, just to name a few:

thSoft
  • 21,755
  • 5
  • 88
  • 103
0

Python has PLY, which is a wrapper around Lex/Yacc.

It's quite easy to use once you wrap your head around how they want you to use it and you figure out how to navigate the skimpy documentation. PLY has better documentation than Irony, but the bar is set pretty low.

I started out with PLY, but am finding Irony to be a more enjoyable framework because:

  • Irony has support for simple EBNF grammar rules (MakeStarRule etc.), whereas accomplishing the same thing in PLY is doable, but cumbersome.
  • Both tools have decent out-of-the-box debugging tools, but Irony has a slight edge here because it has a decent GUI for browsing the parsing rules, shift-reduce errors etc.

Good luck to anyone starting out on their Lex/Yacc journey!

Colin Basnett
  • 4,052
  • 2
  • 30
  • 49