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)
def visitCodeDecl ( self , ctx : ShExDocParser . CodeDeclContext ) : 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 )
codeDecl: '%' iri (CODE | '%') 
            CODE: : '{' (~[%\\] | '\\' [%\\] | UCHAR)* '%' '}'