Advertisement
snake5

some half-working generated code from ast

Dec 27th, 2014
504
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.35 KB | None | 0 0
  1.  
  2. #include <inttypes.h>
  3.  
  4. typedef int8_t int8;
  5. typedef uint8_t uint8;
  6. typedef int16_t int16;
  7. typedef uint16_t uint16;
  8. typedef int32_t int32;
  9. typedef uint32_t uint32;
  10. typedef int64_t int64;
  11. typedef uint64_t uint64;
  12. typedef float float32;
  13. typedef double float64;
  14.  
  15. int32 _Isomething = 42;
  16.  
  17. typedef struct _Istring_N_I_data
  18. {
  19.     int32 size;
  20.     uint8 data[0];
  21. }
  22. _Istring_N_I_data;
  23.  
  24. typedef struct _Istring
  25. {
  26.     _Istring_N_I_data_C data;
  27. }
  28. _Istring;
  29.  
  30. typedef struct _Iarray_L_Istring_G
  31. {
  32.     _Istring_P m_data;
  33.     int32 m_size;
  34.     int32 m_mem;
  35. }
  36. _Iarray_L_Istring_G;
  37.  
  38. _Istring _Iarray_L_Istring_G_M_Igetindex_B_Iint32_E
  39. (
  40.     int32 index
  41. )
  42. {
  43.     if(((((index)<(0)))||(((index)>=(null)))))
  44. {
  45.     _IWARNING("\x19\x00\x00\x00""array index out of bounds")
  46.     return "\x00\x00\x00\x00""";
  47. }
  48.  
  49.     return _Isomethingsomething_getindex(null,index);
  50. }
  51.  
  52. _Ivoid _Iarray_L_Istring_G_N_Iclear_B_E
  53. (
  54. )
  55. {
  56.     _Iarray_L_Istring_G_N_Iresize_B_Iint32_E(0)
  57. }
  58.  
  59. _Ivoid _Imain_B_Iarray_L_Istring_G_E
  60. (
  61.     _Iarray_L_Istring_G args
  62. )
  63. {
  64.     {int32 i;
  65. i = 0;while(((i)<(null)))
  66. {
  67.     _Iprintln_B_Istring_E(_Isomethingsomething_getindex(args,i))
  68.  
  69. i = ((i)+(1));
  70. }}
  71.  
  72.     _Iprintln_B_Istring_E(runtime_concat(3,"\x0f\x00\x00\x00""Hello, world! (",null,"\x01\x00\x00\x00"")"))
  73. }
  74.  
  75. _Ivoid _I_test_B_E
  76. (
  77. )
  78. {
  79.     _Imain_B_Iarray_L_Istring_G_E({m_data=array,m_size=dict,m_mem=dict})
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement