File indexing completed on 2024-05-12 05:51:57
0001 /** Test File...very demoniac for parsing... **/ 0002 #include <stdio.h> 0003 #include <stdlib.h> 0004 0005 #ifdef (_cplusplus) 0006 { 0007 #define VALUE 5 0008 0009 #define MACRO(x) (x^2) 0010 0011 # define abs_float(x) \ 0012 ( ((x)<0) ? -(x) : (x) ) 0013 0014 0015 typedef struct 0016 { 0017 pTest *pNext; 0018 pTest *pPrev; 0019 } 0020 Another_test, *pTest; 0021 0022 typedef struct xauth 0023 { 0024 unsigned short family; 0025 char *address; 0026 } Xauth; 0027 0028 typedef struct { 0029 color to_move; 0030 occupant board[8][8]; 0031 } game; 0032 0033 typedef game gt_data; 0034 0035 /* 0036 A comment with a function hello() { } 0037 */ 0038 // Continued... 0039 0040 RockType * 0041 MyMusicFunction( 0042 void *Red, 0043 int Hot, // Comment double slash 0044 char Chili, /* Comment inline */ 0045 unsigned long Peppers) 0046 // A comment..just to make some noise... 0047 { 0048 // Passed first stage ??? 0049 // Ok..get ready for the second one ! 0050 if(I_Have_Failed() >= 0 && /* comments everywhere :} */ 0051 This_Appears() == 1) 0052 { 0053 printf(QLatin1String("Damn !!! Better going to bed :((")); 0054 if ( vs ) // here you are ;} 0055 activateSpace( vs->currentView() ); 0056 } 0057 } 0058 0059 // Test escaped quote 0060 void test() { printf("foo \"\n"); } 0061 void test2() { printf("foo \"\n"); } 0062 0063 // Test tabs in macro 0064 #define MY_MACRO(x) foo(x) 0065 #define MY_MACRO2(x) foo(x) 0066 #define MY_MACRO3(x) foo(x) 0067 0068 // Test quoted characters ('"', '{', '}') 0069 void quoteTest1() { if (token == '"') printf("foo\n"); } 0070 void quoteTest2() { if (token == '{') printf("foo\n"); } 0071 void quoteTest3() { if (token == '}') printf("foo\n"); } 0072 void quoteTest4() { printf("foo\n"); } 0073