/* Generated By:JJTree: Do not edit this line. ASTProgram.java */

import java.io.*;

public class ASTProgram extends SimpleNode {
  public ASTProgram(int id) {
    super(id);
  }

  public ASTProgram(drawphase1 p, int id) {
    super(p, id);
  }

  public void generateFile()
  {
    String file = "tester.svg";
    try
    {
    	FileWriter fw = new FileWriter(file);
    	BufferedWriter bw = new BufferedWriter(fw);
    	PrintWriter outFile = new PrintWriter(bw);
    	
    	outFile.println("<svg>\n");    	
   	    System.out.println("<svg>");      	    
   	    
   	    //runs the generate method of each of the children in the program.
        for(int i = 2; i < jjtGetNumChildren(); i++)
    	{    		
    		outFile.println(jjtGetChild(i).generate());
    	}
    	outFile.println("</svg>\n");
    	System.out.println("</svg>");
    	outFile.close();
    }
    catch(IOException e)
    {
    	System.exit(1);
    }
    
   
    	
  }
}
