This project has moved. For the latest updates, please go here.

Irony capability question

Dec 13, 2012 at 8:32 PM


I have a couple of questions about how powerful Irony is. How does Irony handle context-sensitive tex? For example, in order to do this in ANTLR code needs to be injected to keep track of the state.

Another question I have is, how easy is it to call another parser during a parsing session. This is necessary when you have a mix of 2 or more languages ex) C# embedded in XML.

Thank you!


Dec 14, 2012 at 7:59 AM

as for custom code and tracking stuff. it's all c#, and there are events you can hook to. For example, NonTerminal has Reduced event which is fired when the rule is recognized and reduced. You can handle this event and do your custom stuff.

As for #2 - mixing grammars. Directly and automatically it's not supported. But it is doable I think. Let's say you have a mix of HTML with JavaScript snippets inside closing tag. Something like this. 

Parsing 'combined' languages is an interesting feature, may be we'll get to support it in more direct way.