I'm trying to define a simplistic language using Irony. Some language usecases are
Dear {Name},
It is free text with therein references to fields enclosed in curly braces. a double curly brace escapes a field declaration. I came up with the following spec:
var orText = new FreeTextLiteral("Text", FreeTextOptions.AllowEof | FreeTextOptions.AllowEmpty);
var orFieldName = new FreeTextLiteral("FieldName");
//Nonterminals
var orField = new NonTerminal("Field");
var orValue = new NonTerminal("Value");
//Rules
orField.Rule = "{" + orFieldName + "}";
orValue.Rule = orText | orField;
Root = orValue;
However, the Irony GrammarExplorer only parses a Value which has a Text element. A field is not recognized. What am I missing here?