This project has moved and is read-only. For the latest updates, please go here.

Generating plus rule from an identifier?

Aug 18, 2015 at 10:43 PM
I'm using Irony for parsing a grammar, and at one point I have a rule defined like this:
QualId ::= id {‘.’ id}
Where id is an identifier. In my code, I have something like the code segment below, but it gives me an error, saying that it cannot convert identifier to a nonterminal.
IdentifierTerminal id = new IdentifierTerminal("id");

NonTerminal QualId = new NonTerminal("QualId");
QualId.Rule = MakePlusRule(id, Dot, id);
Any idea how to solve the problem?
Aug 21, 2015 at 8:55 PM
I believe your call is wrong:
QualId.Rule = MakePlusRule(QualId, ".", id);