Is there a way to specify which entry point to use when embedding a nested grammar. The external parser I want to embed in my template grammar has two entry points “Programm” and “Expression”. In the template grammar I want to embed the “Expression” entry point.
The solution I’ve come up with is really hacky. In the grammar I’m specifying an empty grammar:
@external grammar plutoParser empty
In the generated template parser I load the nested parser and remove the “Program” entry point manually.
templateParser.withNested({
'plutoParser': plutoParser.copy({
topRules: { 'Expression': plutoParser.topRules.Expression }
})
})
Is there a better way to do this?