Advertisement
JoshDreamland

Parser_Progress_2012_03_11

Mar 11th, 2012
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.62 KB | None | 0 0
  1. // INPUT
  2.  
  3. int (killed)(int);
  4. const int a = 10 + 20 + 30, b, c = 5;
  5. double d, e, f = 10;
  6. namespace justdefineit {
  7.   long unsigned g;
  8.   long unsigned int h;
  9.   long unsigned long k;
  10. }
  11. long double i;
  12. class koalacub {
  13.   int leavesEaten;
  14.   int chutesEaten;
  15. };
  16. class koala: koalacub {
  17.   koalacub *children[10]; // A koala can have at most ten children because of reasons.
  18. };
  19.  
  20. int *level1_simple[10];
  21. unsigned long const int   (  *  level2_better )  [ 10+5+7+9 / 3 ] ;
  22. int* (*(*level3_confusing)[10][12])[15];
  23. long double (*(&*level4_whatthefuck[10])[2][4])(char, short, int, long, double, long double);
  24. long double (*(&*(***level5_okaycutitout[1^2^4^8])(int illegalnest, char (*but)(int oh, int well))[10])[2][4])(char, short, int, long, double, long double);
  25.  
  26.  
  27. int my_implemented_function(int) {
  28.   implementation
  29. }
  30.  
  31. int my_implemented_function_2(int, double, char) {
  32.   implementation
  33. }
  34. int (my_implemented_function_3)(const long double) {
  35.   implementation
  36. }
  37.  
  38. /*
  39. int function(int,int) {
  40.   implementation 2
  41. }
  42.  
  43. template<typename a> int function2(a b) { }
  44.  
  45. template<typename b> class templateclass { b aidu; }
  46.  
  47. #if false
  48. #error Failure
  49. #endif
  50. */
  51.  
  52. int zzzzz_success;
  53.  
  54.  
  55.  
  56. // OUTPUT
  57.  
  58. ============================================================================
  59. =: Test simple macros :=====================================================
  60. ============================================================================
  61.  
  62. #define one_arg_function(x) \
  63.   (1/(1-(\
  64.   x\
  65.   )))
  66. #define scalar_macro
  67.   simple value
  68. #define simple_function() \
  69.   Takes no parameters
  70. #define two_arg_function(a, b) \
  71.   (-(\
  72.   b\
  73.   )/(2*(\
  74.   a\
  75.   )))
  76. #define variadic_three_arg_function(a, b, c...) \
  77.   printf(\
  78.   a\
  79.   ,\
  80.   b\
  81.   ,\
  82.   c\
  83.   )
  84.  
  85.  
  86.  
  87.  
  88. ============================================================================
  89. =: Metrics :================================================================
  90. ============================================================================
  91.  
  92. sizeof(jdip::macro_type):       4
  93. sizeof(jdip::macro_function):   56
  94. sizeof(jdip::macro_scalar):     16
  95.  
  96.  
  97.  
  98.  
  99. ============================================================================
  100. =: Test expression evaluator :==============================================
  101. ============================================================================
  102.  
  103. 10
  104. 20
  105. 30
  106. 40
  107. 50
  108. 60
  109. 1
  110. 12
  111. 123
  112.  
  113.  
  114.  
  115.  
  116. ============================================================================
  117. =: Test parser :============================================================
  118. ============================================================================
  119.  
  120. Parse finished in 224 microseconds.
  121. const int a;
  122. const int b;
  123. const int c;
  124. double d;
  125. double e;
  126. double f;
  127. long double i;
  128. namespace justdefineit {
  129.   unsigned long g;
  130.   unsigned long int h;
  131.   unsigned long long k;
  132. }
  133. int killed(int);
  134. class koala: private koalacub {
  135.   koalacub *children[10];
  136. }
  137. class koalacub {
  138.   int chutesEaten;
  139.   int leavesEaten;
  140. }
  141. int *level1_simple[10];
  142. const unsigned long int (*level2_better)[25];
  143. int *(*(*level3_confusing)[10][12])[15];
  144. long double (*(&*level4_whatthefuck[10])[2][4])(char, short, int, long, double, long double);
  145. long double (*(&*(***level5_okaycutitout[15])(int illegalnest, char (*but)(int oh, int well))[10])[2][4])(char, short, int, long, double, long double);
  146. int my_implemented_function(int);
  147. int my_implemented_function_2(int, double, char);
  148. int my_implemented_function_3(const long double);
  149. int zzzzz_success;
  150.  
  151. ====[++++++++++++++++++++++++++++++ SUCCESS! ++++++++++++++++++++++++++++++]====
  152.  
  153.  
  154. Process returned 0 (0x0)   execution time : 0.016 s
  155. Press ENTER to continue.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement