oscript
Class DefaultParser

java.lang.Object
  extended byoscript.DefaultParser
All Implemented Interfaces:
Parser

public class DefaultParser
extends java.lang.Object
implements Parser

Version:
1.3.1.4
Author:
Rob Clark (rob@ti.com)

Constructor Summary
DefaultParser()
           
 
Method Summary
 java.lang.String getExtension()
          Get the file extension for file type to handle, eg.
 Node parse(AbstractFile file)
          Convert a file to Node.
static Node parse(java.io.Reader in, java.lang.String desc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultParser

public DefaultParser()
Method Detail

getExtension

public java.lang.String getExtension()
Get the file extension for file type to handle, eg. os. This is used to determine which parser to use for which file to parse.

Specified by:
getExtension in interface Parser
Returns:
the file extension

parse

public Node parse(AbstractFile file)
           throws ParseException,
                  java.io.IOException
Convert a file to Node.

Specified by:
parse in interface Parser
Parameters:
file - the file to parse
Returns:
the parsed syntaxtree
Throws:
ParseException
java.io.IOException

parse

public static Node parse(java.io.Reader in,
                         java.lang.String desc)
                  throws ParseException,
                         java.io.IOException
Throws:
ParseException
java.io.IOException