ParserCode.grm
|
// FILE. . . . . /home/hak/ilt/src/ilog/rif/ParserCode.grm // EDIT BY . . . Hassan Ait-Kaci // ON MACHINE. . 4j4zn71 // STARTED ON. . Wed Apr 02 08:18:35 2008 // Last modified on Mon May 05 21:32:42 2008 by hak %import java.io.PrintStream; %import ilog.language.tools.Misc; %{ long start; boolean quiet = true; boolean applet = false; String xmlForm; PrintStream out = System.out; public void setStartTime () { start = System.currentTimeMillis(); } public void setApplet (boolean flag) { applet = flag; } public void setQuiet (boolean flag) { quiet = flag; } public void setOutputStream (PrintStream stream) { out = stream; } public String xmlForm () { return xmlForm; } /* * A function to show what happened. */ void showXml () { if (applet) { xmlForm = xmlForm(currentNode().xmlDocument()); } else { out.println("*** Total parsing time = " +(System.currentTimeMillis()-start) +" ms"); if (!quiet) { errorManager().tallyErrors(); if (Misc.askYesNo("*** Do you want to see the XML serialization")) { out.println(); try { writeXml(currentNode(),System.out); } catch (Exception e) { e.printStackTrace(); } // currentNode().display(); out.println(); } } } } %}
This file was generated on Thu Feb 17 16:55:59 PST 2011 from file ParserCode.grm
by the ilog.language.tools.Hilite Java tool written by Hassan Aït-Kaci