org.eclipse.ocl.lpg
Class DerivedLexStream

java.lang.Object
  extended by LpgLexStream
      extended by org.eclipse.ocl.lpg.DerivedLexStream

public abstract class DerivedLexStream
extends LpgLexStream

This DerivedLexStream will be used in favour of the LpgLexStream for the OCLLexer, so that some customization are introduced and exploited by the generated OCLLexer

Since:
3.0

Field Summary
protected static int ECLIPSE_TAB_VALUE
           
 
Constructor Summary
DerivedLexStream()
           
DerivedLexStream(BasicEnvironment environment, char[] input_chars, java.lang.String filename, int tab)
           
DerivedLexStream(BasicEnvironment environment, java.lang.String filename, int tab)
           
 
Method Summary
protected  int computeErrorCode(int leftToken, int rightToken)
           
 void initialize(char[] inputChars)
          Define the input text as a given array of characters.
 void reportLexicalError(int errorCode, int leftLoc, int rightLoc, int errorLeftLoc, int errorRightLoc, java.lang.String[] errorInfo)
          Errors generated within the lexer are redirected to the error handler if there is one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ECLIPSE_TAB_VALUE

protected static final int ECLIPSE_TAB_VALUE
See Also:
Constant Field Values
Constructor Detail

DerivedLexStream

public DerivedLexStream(BasicEnvironment environment,
                        java.lang.String filename,
                        int tab)
                 throws java.io.IOException
Throws:
java.io.IOException

DerivedLexStream

public DerivedLexStream(BasicEnvironment environment,
                        char[] input_chars,
                        java.lang.String filename,
                        int tab)

DerivedLexStream

public DerivedLexStream()
Method Detail

computeErrorCode

protected int computeErrorCode(int leftToken,
                               int rightToken)

initialize

public void initialize(char[] inputChars)
Define the input text as a given array of characters.

Parameters:
inputChars - the characters

reportLexicalError

public void reportLexicalError(int errorCode,
                               int leftLoc,
                               int rightLoc,
                               int errorLeftLoc,
                               int errorRightLoc,
                               java.lang.String[] errorInfo)
Errors generated within the lexer are redirected to the error handler if there is one. Note that other variants of reportLexicalError and reportError either feed this one, are fed from a default implementation of this one or originate in the parser, where a ParserErrorHandler can intercept them.

Since:
3.0

Copyright 2002, 2007 IBM Corporation and others.
All Rights Reserved.