示例#1
0
文件: MetaK.java 项目: TomGebhardt/k
 public static Term defaultTerm(Term v, org.kframework.kil.loader.Context context) {
   String sort = v.getSort();
   KSort ksort = KSort.getKSort(sort).mainSort();
   if (ksort.isDefaultable()) return new Empty(ksort.toString());
   GlobalSettings.kem.register(
       new KException(
           ExceptionType.WARNING,
           KExceptionGroup.COMPILER,
           "Don't know the default value for term " + v.toString() + ". Assuming .K",
           v.getFilename(),
           v.getLocation()));
   return KSequence.EMPTY;
 }
示例#2
0
文件: MetaK.java 项目: TomGebhardt/k
 public static boolean isKSort(String sort) {
   try {
     KSort.valueOf(sort);
   } catch (IllegalArgumentException e) {
     return sort.equals(KSorts.KLIST);
   }
   return true;
 }