codeDecl: '%' iri (CODE | '%') 
            CODE: : '{' (~[%\\] | '\\' [%\\] | UCHAR)* '%' '}'

def visitCodeDecl(self, ctx: ShExDocParser.CodeDeclContext):
        """ codeDecl: '%' iri (CODE | '%') 
            CODE: : '{' (~[%\\] | '\\' [%\\] | UCHAR)* '%' '}' """
        semact = SemAct()
        semact.name = self.context.iri_to_iriref(ctx.iri())
        if ctx.CODE():
            semact.code = ctx.CODE().getText()[1:-2].replace('\\%', '%').encode('utf-8').decode('unicode-escape')
        self.semacts.append(semact)