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