org.eclipse.mtl.parser.ast
Class CST2ASTConverter

java.lang.Object
  extended by org.eclipse.mtl.parser.ast.CST2ASTConverter
Direct Known Subclasses:
CST2ASTConverterWithResolver

public class CST2ASTConverter
extends java.lang.Object

The main class used to transform a CST model to an AST model. This class is not able to run the 'Resolve' step.


Field Summary
protected  ASTFactory factory
          The factory used to create the objects of the AST model.
 
Constructor Summary
CST2ASTConverter()
          Constructor.
 
Method Summary
 void createAST(Module rootCST, org.eclipse.emf.ecore.resource.Resource resourceAST)
          Creates an AST model in the given resource.
 OCLParser getOCL()
          Gets the OCL parser (from the OCL plug-in).
protected  void log(java.lang.String message, int posBegin, int posEnd)
          To log a new problem.
 void setLogHandler(IASTLogHandler logHandler)
          Sets the log Handler to save AST logging messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

protected ASTFactory factory
The factory used to create the objects of the AST model.

Constructor Detail

CST2ASTConverter

public CST2ASTConverter()
Constructor.

Method Detail

getOCL

public OCLParser getOCL()
Gets the OCL parser (from the OCL plug-in).

Returns:
the OCL parser

setLogHandler

public void setLogHandler(IASTLogHandler logHandler)
Sets the log Handler to save AST logging messages.

Parameters:
logHandler - is the new log handler

log

protected void log(java.lang.String message,
                   int posBegin,
                   int posEnd)
To log a new problem.

Parameters:
message - is the message
posBegin - is the beginning index of the problem
posEnd - is the ending index of the problem

createAST

public void createAST(Module rootCST,
                      org.eclipse.emf.ecore.resource.Resource resourceAST)
Creates an AST model in the given resource. This method is not able to run the 'Resolve' step.

Parameters:
rootCST - is the root element of the input module (CST)
resourceAST - is the resource to be updated with the output model (AST)

Copyright 2008 Obeo
All Rights Reserved.