help for a beginner

Jun 15, 2010 at 8:09 PM
Edited Jun 15, 2010 at 8:35 PM

Dear Irony developer community,


1. I've just dived into Irony as well the field of Domain-Specific Languages. I'm using Visual Studio 2008 with SilverLight 3 and the Irony 51617 DLL.

In trying to duplicate the following segment of D. Flowers' tutorial code:

MyGrammar grammar = new MyGrammar();
LanguageCompiler compiler = new LanguageCompiler(grammar);
AstNode program = compiler.Parse(source_code);

I've run into an obstacle: I can't find LanguageCompiler. Has it been replaced? Or am I missing a reference?

2. I haven't found much online help in getting started with Irony, and none at all with code examples that work with the latest version. I hope I'm missing something. Do you guys have any advice, references, or resources that I could use?

3. I'm interested in creating a validation program for owl 2 manchester syntax ( using Irony. If anyone has any experience/knowledge in this area, I would much appreciate your assistance (in the form of advice, references, or resources).




Jun 15, 2010 at 9:40 PM

1. Daniel's article (its code) is hopelessly out of sync with current Irony version. Look at Grammar.RunSample method in Irony project for an example of running a parser

2. No docs, sorry. Play with samples, hopefully you'll figure it out.

3. Have no idea about this. Anybody?

Good luck


Jun 16, 2010 at 3:20 PM
Edited Jun 16, 2010 at 3:29 PM

Grammar.RunSample? I didn't want to run anything, I just wanted to get the top node of the tree that results from parsing a string of source with respect to a certain grammar. I found what I was looking for from slowing tracing through the GrammarExplorer project:

MyGrammar grammar = new MyGrammar();
LanguageData language = new LanguageData(grammar);
Parser parser = new Parser(language);
ParseTree parseTree = parser.Context.CurrentParseTree;
ParseTreeNode program = parseTree.Root;

Thanks though!

Jun 18, 2010 at 12:42 PM

I was having this exact same problem and have been scratching my head about it for the past couple of hours. Thanks.