The alphabet type is now communicated from the frontend to the backend using a
[external/ragel.git] / common / common.h
index 864c3ff..c0470d3 100644 (file)
@@ -99,6 +99,7 @@ struct HostType
 {
        char *data1;
        char *data2;
+       char *internalName;
        bool isSigned;
        long long minVal;
        long long maxVal;
@@ -107,30 +108,30 @@ struct HostType
 
 struct HostLang
 {
+       /* Target language. */
+       enum Lang
+       {
+               C, D, Java, Ruby
+       };
+
+       Lang lang;
        HostType *hostTypes;
        int numHostTypes;
        HostType *defaultAlphType;
        bool explicitUnsigned;
 };
 
-
-/* Target language. */
-enum HostLangType
-{
-       CCode,
-       DCode,
-       JavaCode,
-       RubyCode
-};
-
 extern HostLang *hostLang;
-extern HostLangType hostLangType;
 
 extern HostLang hostLangC;
 extern HostLang hostLangD;
 extern HostLang hostLangJava;
 extern HostLang hostLangRuby;
 
+HostType *findAlphType( char *s1 );
+HostType *findAlphType( char *s1, char *s2 );
+HostType *findAlphTypeInternal( char *s1 );
+
 /* An abstraction of the key operators that manages key operations such as
  * comparison and increment according the signedness of the key. */
 struct KeyOps