code: def p_inheritance(self, p):
          
          if p[1]:
              if p[2].nullable:
                  msg = 'Reference cannot be nullable.'
                  self.errors.append((msg, p.lineno(1), self.path))
              else:
                  p[0] = p[2]
docs: inheritance : EXTENDS type_ref
                         | empty