00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 #ifndef _cvc3__lang_h_
00023 #define _cvc3__lang_h_
00024 
00025 #include "debug.h"
00026 
00027 namespace CVC3 {
00028 
00029 
00030   typedef enum {
00031 
00032     PRESENTATION_LANG,
00033 
00034     SMTLIB_LANG,
00035 
00036     LISP_LANG,
00037     AST_LANG, 
00038 
00039     
00040 
00041     SIMPLIFY_LANG,
00042 
00043   } InputLanguage;
00044   
00045   inline InputLanguage getLanguage(const std::string& lang) {
00046     if (lang.size() > 0) {
00047       if(lang[0] == 'p') return PRESENTATION_LANG;
00048       if(lang[0] == 'l') return LISP_LANG;
00049       if(lang[0] == 'a') return AST_LANG;
00050       if(lang[0] == 's') {
00051         if (lang.size() > 1 && lang[1] == 'i') return SIMPLIFY_LANG;
00052         else return SMTLIB_LANG;
00053       }
00054     }
00055 
00056     throw Exception("Bad input language specified");
00057     return AST_LANG;
00058   }
00059 
00060 } 
00061 
00062 #endif