167 printf ("Parsing script..\n"); |
167 printf ("Parsing script..\n"); |
168 r->BeginParse (w); |
168 r->BeginParse (w); |
169 |
169 |
170 // Parse done, print statistics and write to file |
170 // Parse done, print statistics and write to file |
171 unsigned int globalcount = CountGlobalVars (); |
171 unsigned int globalcount = CountGlobalVars (); |
172 printf ("%u/%u global variable%s\n", globalcount, MAX_SCRIPT_VARIABLES, PLURAL (globalcount)); |
172 printf ("%u / %u global variable%s\n", globalcount, MAX_SCRIPT_VARIABLES, PLURAL (globalcount)); |
173 printf ("%d state%s written\n", g_NumStates, PLURAL (g_NumStates)); |
173 printf ("%d state%s written\n", g_NumStates, PLURAL (g_NumStates)); |
174 printf ("%d event%s written\n", g_NumEvents, PLURAL (g_NumEvents)); |
174 printf ("%d event%s written\n", g_NumEvents, PLURAL (g_NumEvents)); |
175 w->WriteToFile (); |
175 w->WriteToFile (); |
176 |
176 |
177 // Clear out the junk |
177 // Clear out the junk |
178 printf ("clear r\n"); |
|
179 delete r; |
178 delete r; |
180 printf ("clear w\n"); |
|
181 delete w; |
179 delete w; |
182 printf ("done!\n"); |
180 |
|
181 // Done! |
|
182 exit (0); |
183 } |
183 } |
184 |
184 |
185 // ============================================================================ |
185 // ============================================================================ |
186 // Utility functions |
186 // Utility functions |
187 |
187 |