#!/bin/bash TEMPLATE=' void %NT%List(): {} { %NT%() ( "," %NT%() )* } void %NT%2List(): {} { %NT%() "," %NT%List() } void %NT%AnnotatedList(): {} { (annotations())? %NT%() ( "," (annotations()) %NT%() )* } ' ## objectProperty ## dataProperty for x in \ objectOrDataProperty \ annotation \ annotationPropertyIRI \ description \ objectPropertyCharacteristic \ objectPropertyExpression \ dataRange \ dataPropertyExpression \ IRI \ fact \ individual \ literal do #echo $x echo "$TEMPLATE" | sed -e "s/%NT%/$x/g" | \ sed -e 's/objectProperty()/objectPropertyIRI()/g' | \ sed -e 's/dataProperty()/dataPropertyIRI()/g' | \ sed -e 's/objectOrDataProperty()/objectOrDataPropertyIRI()/g' #sed -e 's/annotationProperty()/annotationPropertyIRI()/g' | done