"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ragel/common.cpp" between
ragel-6.9.tar.gz and ragel-6.10.tar.gz

About: Ragel compiles executable finite state machines from regular languages (C, C++, Obj-C, C#, D, Java, Go and Ruby).

common.cpp  (ragel-6.9):common.cpp  (ragel-6.10)
skipping to change at line 30 skipping to change at line 30
*/ */
#include "pcheck.h" #include "pcheck.h"
#include "common.h" #include "common.h"
#include "stdlib.h" #include "stdlib.h"
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
HostType hostTypesC[] = HostType hostTypesC[] =
{ {
{ "char", 0, "char", true, true, false, CHAR_MIN, CHAR_ { "char", 0, "char", true, true, false, CHAR_MIN, CHAR_
MAX, sizeof(char) }, MAX, 0, 0, sizeof(char) },
{ "unsigned", "char", "uchar", false, true, false, 0, UCHAR { "unsigned", "char", "uchar", false, true, false, 0, 0,
_MAX, sizeof(unsigned char) }, 0, UCHAR_MAX, sizeof(unsigned char) },
{ "short", 0, "short", true, true, false, SHRT_MIN, SHRT_ { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_
MAX, sizeof(short) }, MAX, 0, 0, sizeof(short) },
{ "unsigned", "short", "ushort", false, true, false, 0, USHRT { "unsigned", "short", "ushort", false, true, false, 0, 0,
_MAX, sizeof(unsigned short) }, 0, USHRT_MAX, sizeof(unsigned short) },
{ "int", 0, "int", true, true, false, INT_MIN, INT_M { "int", 0, "int", true, true, false, INT_MIN, INT_M
AX, sizeof(int) }, AX, 0, 0, sizeof(int) },
{ "unsigned", "int", "uint", false, true, false, 0, UINT_ { "unsigned", "int", "uint", false, true, false, 0, 0,
MAX, sizeof(unsigned int) }, 0, UINT_MAX, sizeof(unsigned int) },
{ "long", 0, "long", true, true, false, LONG_MIN, LONG_ { "long", 0, "long", true, true, false, LONG_MIN, LONG_
MAX, sizeof(long) }, MAX, 0, 0, sizeof(long) },
{ "unsigned", "long", "ulong", false, true, false, 0, ULONG { "unsigned", "long", "ulong", false, true, false, 0, 0,
_MAX, sizeof(unsigned long) } 0, ULONG_MAX, sizeof(unsigned long) }
}; };
#define S8BIT_MIN -128 #define S8BIT_MIN -128
#define S8BIT_MAX 127 #define S8BIT_MAX 127
#define U8BIT_MIN 0 #define U8BIT_MIN 0
#define U8BIT_MAX 255 #define U8BIT_MAX 255
#define S16BIT_MIN -32768 #define S16BIT_MIN -32768
#define S16BIT_MAX 32767 #define S16BIT_MAX 32767
skipping to change at line 69 skipping to change at line 69
#define U32BIT_MAX 4294967295UL #define U32BIT_MAX 4294967295UL
#define S64BIT_MIN -9223372036854775807LL #define S64BIT_MIN -9223372036854775807LL
#define S64BIT_MAX 9223372036854775807LL #define S64BIT_MAX 9223372036854775807LL
#define U64BIT_MIN 0 #define U64BIT_MIN 0
#define U64BIT_MAX 18446744073709551615ULL #define U64BIT_MAX 18446744073709551615ULL
HostType hostTypesD[] = HostType hostTypesD[] =
{ {
{ "byte", 0, "byte", true, true, false, CHAR_MIN, CHAR_MAX, { "byte", 0, "byte", true, true, false, CHAR_MIN, CHAR_MAX,
1 }, 0, 0, 1 },
{ "ubyte", 0, "ubyte", false, true, false, 0, UCHAR_MAX, { "ubyte", 0, "ubyte", false, true, false, 0, 0,
1 }, 0, UCHAR_MAX, 1 },
{ "char", 0, "char", false, true, false, 0, UCHAR_MAX, { "char", 0, "char", false, true, false, 0, 0,
1 }, 0, UCHAR_MAX, 1 },
{ "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX,
2 }, 0, 0, 2 },
{ "ushort", 0, "ushort", false, true, false, 0, USHRT_MAX, { "ushort", 0, "ushort", false, true, false, 0, 0,
2 }, 0, USHRT_MAX, 2 },
{ "wchar", 0, "wchar", false, true, false, 0, USHRT_MAX, { "wchar", 0, "wchar", false, true, false, 0, 0,
2 }, 0, USHRT_MAX, 2 },
{ "int", 0, "int", true, true, false, INT_MIN, INT_MAX, { "int", 0, "int", true, true, false, INT_MIN, INT_MAX,
4 }, 0, 0, 4 },
{ "uint", 0, "uint", false, true, false, 0, UINT_MAX, { "uint", 0, "uint", false, true, false, 0, 0,
4 }, 0, UINT_MAX, 4 },
{ "dchar", 0, "dchar", false, true, false, 0, UINT_MAX, { "dchar", 0, "dchar", false, true, false, 0, 0,
4 } 0, UINT_MAX, 4 }
}; };
HostType hostTypesGo[] = HostType hostTypesGo[] =
{ {
{ "byte", 0, "uint8", false, true, false, U8BIT_MIN, U8BIT_MAX, { "byte", 0, "uint8", false, true, false, 0, 0,
1 }, U8BIT_MIN, U8BIT_MAX, 1 },
{ "int8", 0, "int8", true, true, false, S8BIT_MIN, S8BIT_MAX, { "int8", 0, "int8", true, true, false, S8BIT_MIN, S8BIT_MAX,
1 }, 0, 0, 1 },
{ "uint8", 0, "uint8", false, true, false, U8BIT_MIN, U8BIT_MAX, { "uint8", 0, "uint8", false, true, false, 0, 0,
1 }, U8BIT_MIN, U8BIT_MAX, 1 },
{ "int16", 0, "int16", true, true, false, S16BIT_MIN, S16BIT_MAX { "int16", 0, "int16", true, true, false, S16BIT_MIN, S16BIT_MAX
, 2 }, , 0, 0, 2 },
{ "uint16", 0, "uint16", false, true, false, U16BIT_MIN, U16BIT_MAX { "uint16", 0, "uint16", false, true, false, 0, 0,
, 2 }, U16BIT_MIN, U16BIT_MAX, 2 },
{ "int32", 0, "int32", true, true, false, S32BIT_MIN, S32BIT_MAX { "int32", 0, "int32", true, true, false, S32BIT_MIN, S32BIT_MAX
, 4 }, , 0, 0, 4 },
{ "uint32", 0, "uint32", false, true, false, U32BIT_MIN, U32BIT_MAX { "uint32", 0, "uint32", false, true, false, 0, 0,
, 4 }, U32BIT_MIN, U32BIT_MAX, 4 },
{ "int64", 0, "int64", true, true, false, S64BIT_MIN, S64BIT_MAX { "int64", 0, "int64", true, true, false, S64BIT_MIN, S64BIT_MAX
, 8 }, , 0, 0, 8 },
{ "uint64", 0, "uint64", false, true, false, U64BIT_MIN, U64BIT_MAX { "uint64", 0, "uint64", false, true, false, 0, 0,
, 8 }, U64BIT_MIN, U64BIT_MAX, 8 },
{ "rune", 0, "int32", true, true, true, S32BIT_MIN, S32BIT_MAX { "rune", 0, "int32", true, true, true, S32BIT_MIN, S32BIT_MAX
, 4 } , 0, 0, 4 }
}; };
HostType hostTypesJava[] = HostType hostTypesJava[] =
{ {
{ "byte", 0, "byte", true, true, false, CHAR_MIN, CHAR_MAX, { "byte", 0, "byte", true, true, false, CHAR_MIN, CHAR_MAX,
1 }, 0, 0, 1 },
{ "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX,
2 }, 0, 0, 2 },
{ "char", 0, "char", false, true, false, 0, USHRT_MAX, { "char", 0, "char", false, true, false, 0, 0,
2 }, 0, USHRT_MAX, 2 },
{ "int", 0, "int", true, true, false, INT_MIN, INT_MAX, { "int", 0, "int", true, true, false, INT_MIN, INT_MAX,
4 }, 0, 0, 4 },
}; };
/* What are the appropriate types for ruby? */ /* What are the appropriate types for ruby? */
HostType hostTypesRuby[] = HostType hostTypesRuby[] =
{ {
{ "char", 0, "char", true, true, false, CHAR_MIN, CHAR_MAX, { "char", 0, "char", true, true, false, CHAR_MIN, CHAR_MAX,
1 }, 0, 0, 1 },
{ "int", 0, "int", true, true, false, INT_MIN, INT_MAX, { "int", 0, "int", true, true, false, INT_MIN, INT_MAX,
4 }, 0, 0, 4 },
}; };
HostType hostTypesCSharp[] = HostType hostTypesCSharp[] =
{ {
{ "sbyte", 0, "sbyte", true, true, false, CHAR_MIN, CHAR_MAX, { "sbyte", 0, "sbyte", true, true, false, CHAR_MIN, CHAR_MAX,
1 }, 0, 0, 1 },
{ "byte", 0, "byte", false, true, false, 0, UCHAR_MAX, { "byte", 0, "byte", false, true, false, 0, 0,
1 }, 0, UCHAR_MAX, 1 },
{ "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX,
2 }, 0, 0, 2 },
{ "ushort", 0, "ushort", false, true, false, 0, USHRT_MAX, { "ushort", 0, "ushort", false, true, false, 0, 0,
2 }, 0, USHRT_MAX, 2 },
{ "char", 0, "char", false, true, true, 0, USHRT_MAX, { "char", 0, "char", false, true, true, 0, 0,
2 }, 0, USHRT_MAX, 2 },
{ "int", 0, "int", true, true, false, INT_MIN, INT_MAX, { "int", 0, "int", true, true, false, INT_MIN, INT_MAX,
4 }, 0, 0, 4 },
{ "uint", 0, "uint", false, true, false, 0, UINT_MAX, { "uint", 0, "uint", false, true, false, 0, 0,
4 }, 0, UINT_MAX, 4 },
{ "long", 0, "long", true, true, false, LONG_MIN, LONG_MAX, { "long", 0, "long", true, true, false, LONG_MIN, LONG_MAX,
8 }, 0, 0, 8 },
{ "ulong", 0, "ulong", false, true, false, 0, ULONG_MAX, { "ulong", 0, "ulong", false, true, false, 0, 0,
8 } 0, ULONG_MAX, 8 }
}; };
HostType hostTypesOCaml[] = HostType hostTypesOCaml[] =
{ {
// { "char", 0, "char", false, true, false, 0, UCHAR_MAX, { "int", 0, "int", true, true, false, S31BIT_MIN, S31BIT_MAX,
1 }, 0, 0, 4 },
{ "int", 0, "int", true, true, false, S31BIT_MIN, S31BIT_MAX,
4 },
}; };
HostLang hostLangC = { HostLang::C, hostTypesC, 8, hostTypesC+0, true }; HostLang hostLangC = { HostLang::C, hostTypesC, 8, hostTypesC+0, true };
HostLang hostLangD = { HostLang::D, hostTypesD, 9, hostTypesD+2, true }; HostLang hostLangD = { HostLang::D, hostTypesD, 9, hostTypesD+2, true };
HostLang hostLangD2 = { HostLang::D2, hostTypesD, 9, hostTypesD+2, true }; HostLang hostLangD2 = { HostLang::D2, hostTypesD, 9, hostTypesD+2, true };
HostLang hostLangGo = { HostLang::Go, hostTypesGo, 10, hostTypesGo+0 , false }; HostLang hostLangGo = { HostLang::Go, hostTypesGo, 10, hostTypesGo+0 , false };
HostLang hostLangJava = { HostLang::Java, hostTypesJava, 4, hostTypesJava +2, false }; HostLang hostLangJava = { HostLang::Java, hostTypesJava, 4, hostTypesJava +2, false };
HostLang hostLangRuby = { HostLang::Ruby, hostTypesRuby, 2, hostTypesRuby +0, false }; HostLang hostLangRuby = { HostLang::Ruby, hostTypesRuby, 2, hostTypesRuby +0, false };
HostLang hostLangCSharp = { HostLang::CSharp, hostTypesCSharp, 9, hostTypesCSha rp+4, true }; HostLang hostLangCSharp = { HostLang::CSharp, hostTypesCSharp, 9, hostTypesCSha rp+4, true };
HostLang hostLangOCaml = { HostLang::OCaml, hostTypesOCaml, 1, hostTypesOCam l+0, false }; HostLang hostLangOCaml = { HostLang::OCaml, hostTypesOCaml, 1, hostTypesOCam l+0, false };
 End of changes. 7 change blocks. 
88 lines changed or deleted 86 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS