shithub: mc

Download patch

ref: 000472348577f453116a4fe4dd922546fd8466f9
parent: 0642dae7fd76080cae32ea7055f645579d5f9bc2
author: Ori Bernstein <[email protected]>
date: Tue Jan 3 15:35:38 EST 2012

A bit more logical arrangement of stuff.

--- a/parse/main.c
+++ b/parse/main.c
@@ -53,18 +53,23 @@
         file->file.globls = mkstab(NULL);
         yyparse();
 
+        /* before we do anything to the parse */
         dump(file, stdout);
 
+        infer(file);
+
+        /* test storing tree to file */
         tmp = fopen("test.pkl", "w");
         pickle(file, tmp);
         fclose(tmp);
 
+        /* and reading it back */
         tmp = fopen("test.pkl", "r");
         rdback = unpickle(tmp);
         dump(rdback, stdout);
         fclose(tmp);
 
-        infer(file);
+        /* after all processing */
         dump(file, stdout);
         gen();
     }