net.sf.parser4j.parsetreeinspector.service
Class ParseTreeToXML

java.lang.Object
  extended by net.sf.parser4j.parsetreeinspector.service.ParseTreeToXML

public final class ParseTreeToXML
extends java.lang.Object

output parse tree ( through its root parse node ) to xml in XStream forms

Author:
luc peuvrier

Method Summary
static ParseTreeToXML getInstance()
           
 void toXml(java.io.File outputFile, ParseNodeComponent parseNodeComponent, java.util.Map<java.lang.Integer,NonTerminal> nonTerminalByIdentifierMap)
          write parse tree in xml form
 void toXml(java.lang.String filePrefix, HasAmbiguityParserException exception, java.util.Map<java.lang.Integer,NonTerminal> nonTerminalByIdentifierMap)
          write parse tree with ambiguity in xml form
 void toXml(java.lang.String filePrefix, ParseStack[] parseStacks, java.util.Map<java.lang.Integer,NonTerminal> nonTerminalByIdentifierMap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ParseTreeToXML getInstance()

toXml

public void toXml(java.lang.String filePrefix,
                  HasAmbiguityParserException exception,
                  java.util.Map<java.lang.Integer,NonTerminal> nonTerminalByIdentifierMap)
           throws ParserException
write parse tree with ambiguity in xml form

Parameters:
filePrefix - the file prefix for all output
exception - in witch are stored parse tree with ambiguity
nonTerminalByIdentifierMap - map between non terminal name and its identifier
Throws:
ParserException

toXml

public void toXml(java.lang.String filePrefix,
                  ParseStack[] parseStacks,
                  java.util.Map<java.lang.Integer,NonTerminal> nonTerminalByIdentifierMap)
           throws ParserException
Throws:
ParserException

toXml

public void toXml(java.io.File outputFile,
                  ParseNodeComponent parseNodeComponent,
                  java.util.Map<java.lang.Integer,NonTerminal> nonTerminalByIdentifierMap)
           throws ParserException
write parse tree in xml form

Parameters:
outputFile - the file to store the parse tree
parseNodeComponent - the tree root
nonTerminalByIdentifierMap - map between non terminal name and its identifier
Throws:
ParserException


Copyright © 2008-2009 Luc Peuvrier. All Rights Reserved.