add template to generate instruction YAML

This commit is contained in:
Eyck Jentzsch 2021-10-01 13:05:36 +02:00
parent 2f15d9676e
commit 6acf73a40f
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
<% def getInstructionGroups() {
def instrGroups = [:]
instructions.each {
def groupName = it['instruction'].eContainer().name
if(!instrGroups.containsKey(groupName)) {
instrGroups[groupName]=[]
}
instrGroups[groupName]+=it;
}
instrGroups
}%><%getInstructionGroups().each{name, instrList -> %>
${name}: <% instrList.findAll{!it.instruction.name.startsWith("__")}.each { %>
- ${it.instruction.name}
encoding: ${it.encoding}
mask: ${it.mask}<%}}%>