org.eclipse.mtl.parser
Class MTLParser

java.lang.Object
  extended by org.eclipse.mtl.parser.MTLParser

public class MTLParser
extends java.lang.Object

The main class of the MTL Parser. Creates an AST from a list of MTL files, using a CST step. You just have to launch the 'parse' method...


Constructor Summary
MTLParser()
           
 
Method Summary
 MTLParserProblems getProblems(java.io.File file)
          Gets the parsing problems of the given file.
 void parse(java.util.List<java.io.File> inputFiles, java.util.List<org.eclipse.emf.common.util.URI> outputURIs, java.util.List<org.eclipse.emf.common.util.URI> dependenciesURIs)
          Creates an AST from a list of MTL files, using a CST step.
 void parse(MTLSourceBuffer source, org.eclipse.emf.ecore.resource.Resource resource, java.util.List<org.eclipse.emf.common.util.URI> dependenciesURIs)
          Creates an AST from a list of MTL files, using a CST step.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MTLParser

public MTLParser()
Method Detail

parse

public void parse(java.util.List<java.io.File> inputFiles,
                  java.util.List<org.eclipse.emf.common.util.URI> outputURIs,
                  java.util.List<org.eclipse.emf.common.util.URI> dependenciesURIs)
Creates an AST from a list of MTL files, using a CST step.

Assert inputFiles.size() == outputURIs.size()

Parameters:
inputFiles - are the files to parse
outputURIs - are the URIs of the output files to create
dependenciesURIs - URIs of the dependencies that need to be loaded before link resolution

parse

public void parse(MTLSourceBuffer source,
                  org.eclipse.emf.ecore.resource.Resource resource,
                  java.util.List<org.eclipse.emf.common.util.URI> dependenciesURIs)
Creates an AST from a list of MTL files, using a CST step.

Assert inputFiles.size() == outputURIs.size()

Parameters:
source - is the source to parse
resource - where the AST will be stored
dependenciesURIs - URIs of the dependencies that need to be loaded before link resolution

getProblems

public MTLParserProblems getProblems(java.io.File file)
Gets the parsing problems of the given file.

Parameters:
file - is the parsed file
Returns:
the parsing problems, or null

Copyright 2008 Obeo
All Rights Reserved.