[Pntool-developers] SF.net SVN: pntool:[189] translator
Brought to you by:
compaqdrew,
miordache
From: <the...@us...> - 2009-07-08 17:40:09
|
Revision: 189 http://pntool.svn.sourceforge.net/pntool/?rev=189&view=rev Author: thecodeweasel Date: 2009-07-08 17:40:08 +0000 (Wed, 08 Jul 2009) Log Message: ----------- Cleaning up memory in an order that makes sense. Documenting pnscript_java_compat.g Modified Paths: -------------- translator/README.txt translator/main.c Modified: translator/README.txt =================================================================== --- translator/README.txt 2009-07-08 16:32:00 UTC (rev 188) +++ translator/README.txt 2009-07-08 17:40:08 UTC (rev 189) @@ -21,6 +21,8 @@ #ABOUT pnscript.g containts the lexer and parser that handle the initial parsing of input and do semantic validation. +pnscript_java_compat.g is purely the grammar of pnscript.g without any of the C code that primarily does error checking and recovery. This is maintained because it allows the grammar to be debugged in ANTLRWorks. + pncompactor.g reorganizes constraint expressions to be of the form ax1 + bx2 + ... <= c Specifically, it Modified: translator/main.c =================================================================== --- translator/main.c 2009-07-08 16:32:00 UTC (rev 188) +++ translator/main.c 2009-07-08 17:40:08 UTC (rev 189) @@ -243,18 +243,6 @@ fflush(stdout); printf("Starting cleanup...\n"); } - processes ->free (processes); processes = NULL; - if(is_verbose() >= 10) { - printf("Processes dealloced\n"); - } - threads ->free (threads); threads = NULL; - if(is_verbose() >= 10) { - printf("Threads dealloced\n"); - } - nodes ->free (nodes); nodes = NULL; - if(is_verbose() >= 10) { - printf("Nodes freed\n"); - } generator ->free (generator); generator = NULL; if(is_verbose() >= 10) { printf("Generator freed\n"); @@ -266,9 +254,20 @@ } } - // We did not return anything from this parser rule, so we can finish. It only remains - // to close down our open objects, in the reverse order we created them + // Close down our open objects, in the reverse order we created them // + processes ->free (processes); processes = NULL; + if(is_verbose() >= 10) { + printf("Processes dealloced\n"); + } + threads ->free (threads); threads = NULL; + if(is_verbose() >= 10) { + printf("Threads dealloced\n"); + } + nodes ->free (nodes); nodes = NULL; + if(is_verbose() >= 10) { + printf("Nodes freed\n"); + } psr ->free (psr); psr = NULL; if(is_verbose() >= 10) { printf("Parser freed\n"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |