oscript
Interface Parser

All Known Implementing Classes:
DefaultParser

public interface Parser

An abstraction for the parser, with is the entity that converts an input source to a Node.

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

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.
 

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.

Returns:
the file extension

parse

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

Parameters:
file - the file to parse
Returns:
the parsed syntaxtree
Throws:
ParseException
java.io.IOException