[369123] First attempt at use of LPG lexer with Xtext
diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/META-INF/MANIFEST.MF b/examples/org.eclipse.ocl.examples.xtext.essentialocl/META-INF/MANIFEST.MF
index ed3f298..1eafb10 100644
--- a/examples/org.eclipse.ocl.examples.xtext.essentialocl/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/META-INF/MANIFEST.MF
@@ -27,6 +27,7 @@
  org.eclipse.core.resources,
  org.eclipse.ocl.examples.xtext.base;bundle-version="[3.1.0,4.0.0)";visibility:=reexport,
  org.eclipse.xtext.common.types;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
- org.eclipse.ocl.examples.library;bundle-version="[3.1.0,4.0.0)";visibility:=reexport
+ org.eclipse.ocl.examples.library;bundle-version="[3.1.0,4.0.0)";visibility:=reexport,
+ org.eclipse.ocl;bundle-version="3.2.0"
 Bundle-ActivationPolicy: lazy
 Bundle-Activator: org.eclipse.ocl.examples.xtext.essentialocl.utilities.EssentialOCLPlugin$Implementation
diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/EssentialOCLRuntimeModule.java b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/EssentialOCLRuntimeModule.java
index eb09f70..41e78a7 100644
--- a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/EssentialOCLRuntimeModule.java
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/EssentialOCLRuntimeModule.java
@@ -16,7 +16,13 @@
  */
 package org.eclipse.ocl.examples.xtext.essentialocl;
 
+import org.eclipse.ocl.examples.xtext.essentialocl.parser.antlr.internal.InternalEssentialOCLLexer;
+import org.eclipse.xtext.parser.IParser;
+import org.eclipse.xtext.parser.antlr.Lexer;
+import org.eclipse.xtext.parser.antlr.LexerProvider;
+
 import com.google.inject.Binder;
+import com.google.inject.Provider;
 import com.google.inject.name.Names;
 
 /**
@@ -31,6 +37,25 @@
 		super.configure(binder);
 		binder.bindConstant().annotatedWith(Names.named(org.eclipse.xtext.validation.CompositeEValidator.USE_EOBJECT_VALIDATOR)).to(false);
 	}
+
+	@Override
+	public Class<? extends Lexer> bindLexer() {
+		return MyEssentialOCLLexer.class;
+	}
+
+	@Override
+	public Class<? extends IParser> bindIParser() {
+		return MyEssentialOCLParser.class;
+	}
+
+	@Override
+	public Provider<InternalEssentialOCLLexer> provideInternalEssentialOCLLexer() {
+		return new MyLexerProvider<InternalEssentialOCLLexer>(MyEssentialOCLLexer.class);
+	}
+
+//	public Provider<MyEssentialOCLLexer> provideMyEssentialOCLLexer() {
+//		return LexerProvider.create(MyEssentialOCLLexer.class);
+//	}
 	
 //	public Class<? extends CompositeEValidator> bindCompositeEValidator() {
 //		return NoEObjectCompositeEValidator.class;
diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/MyANTLRReaderStream.java b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/MyANTLRReaderStream.java
new file mode 100644
index 0000000..216c630
--- /dev/null
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/MyANTLRReaderStream.java
@@ -0,0 +1,19 @@
+package org.eclipse.ocl.examples.xtext.essentialocl;

+

+import java.io.CharArrayReader;

+import java.io.IOException;

+import java.io.Reader;

+import java.io.StringReader;

+

+import org.antlr.runtime.ANTLRReaderStream;

+

+public class MyANTLRReaderStream extends ANTLRReaderStream

+{

+	public MyANTLRReaderStream(Reader r) throws IOException {

+		super(r);

+	}

+		

+	public Reader getReader() {

+		return new CharArrayReader(data, 0, n);

+	}

+}

diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/MyEssentialOCLLexer.java b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/MyEssentialOCLLexer.java
new file mode 100644
index 0000000..b9128df
--- /dev/null
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/MyEssentialOCLLexer.java
@@ -0,0 +1,472 @@
+package org.eclipse.ocl.examples.xtext.essentialocl;

+

+import java.io.IOException;

+import java.io.Reader;

+import java.util.Collection;

+import java.util.HashMap;

+import java.util.List;

+import java.util.Map;

+

+import lpg.runtime.IPrsStream;

+import lpg.runtime.IToken;

+

+import org.antlr.runtime.CharStream;

+import org.antlr.runtime.CommonToken;

+import org.antlr.runtime.RecognitionException;

+import org.antlr.runtime.RecognizerSharedState;

+import org.antlr.runtime.Token;

+import org.eclipse.ocl.AbstractEnvironment;

+import org.eclipse.ocl.Environment;

+import org.eclipse.ocl.EnvironmentFactory;

+import org.eclipse.ocl.LookupException;

+import org.eclipse.ocl.SemanticException;

+import org.eclipse.ocl.TypeResolver;

+import org.eclipse.ocl.examples.xtext.essentialocl.parser.OCLLexer;

+import org.eclipse.ocl.examples.xtext.essentialocl.parser.OCLParserprs;

+import org.eclipse.ocl.examples.xtext.essentialocl.parser.OCLParsersym;

+import org.eclipse.ocl.examples.xtext.essentialocl.parser.antlr.internal.InternalEssentialOCLParser;

+import org.eclipse.ocl.expressions.OCLExpression;

+import org.eclipse.ocl.expressions.Variable;

+import org.eclipse.ocl.internal.l10n.OCLMessages;

+import org.eclipse.ocl.lpg.DerivedLexStream;

+import org.eclipse.ocl.lpg.DerivedPrsStream;

+import org.eclipse.ocl.lpg.ProblemHandler;

+import org.eclipse.ocl.lpg.ProblemHandler.Severity;

+import org.eclipse.ocl.types.OCLStandardLibrary;

+import org.eclipse.ocl.utilities.OCLFactory;

+import org.eclipse.ocl.utilities.UMLReflection;

+

+

+public class MyEssentialOCLLexer extends org.eclipse.ocl.examples.xtext.essentialocl.parser.antlr.internal.InternalEssentialOCLLexer

+{

+	public static class LPG2ANTLRTokenMap

+	{

+		private Map<String, Integer> kindToType = new HashMap<String, Integer>();

+		private Integer type_RULE_ML_COMMENT;

+		private Integer type_RULE_WS;

+		private int kind_EOF_TOKEN;

+		

+		public LPG2ANTLRTokenMap(String[] lpgOrderedTerminalSymbols, String[] antlrTokenNames) {

+			Map<String, Integer> nameToType = new HashMap<String, Integer>();

+			for (int i = 0; i < antlrTokenNames.length; i++) {

+				nameToType.put(antlrTokenNames[i], i);

+			}

+			type_RULE_ML_COMMENT = nameToType.get("RULE_ML_COMMENT");

+			type_RULE_WS = nameToType.get("RULE_WS");

+			for (int kind = 0; kind < lpgOrderedTerminalSymbols.length; kind++) {

+				String key = lpgOrderedTerminalSymbols[kind];

+				if ("EOF_TOKEN".equals(key)) {

+					kind_EOF_TOKEN = kind;

+					continue;

+				}

+				Integer type = nameToType.get("'" + key + "'");

+				if (type == null) {

+					if ("COLON".equals(key)) type = nameToType.get("':'");

+//					else if ("QUOTED_IDENTIFIER".equals(key)) type = nameToType.get(":");

+		            else if ("IDENTIFIER".equals(key)) type = nameToType.get("RULE_SIMPLE_ID");

+		            else if ("LPAREN".equals(key)) type = nameToType.get("'('");

+		            else if ("RPAREN".equals(key)) type = nameToType.get("')'");

+		            else if ("COMMA".equals(key)) type = nameToType.get("','");

+		            else if ("EQUAL".equals(key)) type = nameToType.get("'='");

+		            else if ("STRING_LITERAL".equals(key)) type = nameToType.get("RULE_SINGLE_QUOTED_STRING");

+		            else if ("MINUS".equals(key)) type = nameToType.get("'-'");

+		            else if ("MULTIPLY".equals(key)) type = nameToType.get("'*'");

+		            else if ("INTEGER_LITERAL".equals(key)) type = nameToType.get("RULE_INT");

+		            else if ("REAL_LITERAL".equals(key)) type = nameToType.get("RULE_REAL");

+		            else if ("BAR".equals(key)) type = nameToType.get("'|'");

+		            else if ("COLONCOLON".equals(key)) type = nameToType.get("'::'");

+		            else if ("QUESTIONMARK".equals(key)) type = nameToType.get("'?'");

+		            else if ("LBRACE".equals(key)) type = nameToType.get("'{'");

+		            else if ("RBRACE".equals(key)) type = nameToType.get("'}'");

+		            else if ("LBRACKET".equals(key)) type = nameToType.get("'['");

+		            else if ("RBRACKET".equals(key)) type = nameToType.get("']'");

+		            else if ("PLUS".equals(key)) type = nameToType.get("'+'");

+		            else if ("DIVIDE".equals(key)) type = nameToType.get("'/'");

+		            else if ("GREATER".equals(key)) type = nameToType.get("'>'");

+		            else if ("LESS".equals(key)) type = nameToType.get("'<'");

+		            else if ("GREATER_EQUAL".equals(key)) type = nameToType.get("'>='");

+		            else if ("LESS_EQUAL".equals(key)) type = nameToType.get("'<='");

+		            else if ("NOT_EQUAL".equals(key)) type = nameToType.get("'<>'");

+		            else if ("ARROW".equals(key)) type = nameToType.get("'->'");

+		            else if ("SEMICOLON".equals(key)) type = nameToType.get("';'");

+		            else if ("DOT".equals(key)) type = nameToType.get("'.'");

+		            else if ("DOTDOT".equals(key)) type = nameToType.get("'..'");

+		            else if ("AT".equals(key)) type = nameToType.get("'@'");

+//		            else if ("CARET".equals(key)) type = nameToType.get("<UP>");

+//		            else if ("CARETCARET".equals(key)) type = nameToType.get("<UP><UP>");

+//		            else if ("EOF_TOKEN".equals(key)) type = nameToType.get(":");

+		            else if ("SINGLE_LINE_COMMENT".equals(key)) type = nameToType.get("RULE_SL_COMMENT");

+		            else if ("MULTI_LINE_COMMENT".equals(key)) type = nameToType.get("RULE_ML_COMMENT");

+//		            else if ("ERROR_TOKEN".equals(key)) type = nameToType.get(":");

+		            else {

+		            	System.out.println("No ANTLR type for LPG '" + key + "'");

+		            	type = nameToType.get("RULE_ANY_OTHER");

+		            }

+				}

+				if (type != null) {

+					kindToType.put(key, type);

+				}

+				else {

+	            	System.out.println("Null ANTLR type for LPG '" + key + "'");

+					kindToType.put(key, type);

+				}

+			}

+		}

+

+		public Integer get_RULE_ML_COMMENT() {

+			return type_RULE_ML_COMMENT;

+		}

+

+		public int get_kind_EOF_TOKEN() {

+			return kind_EOF_TOKEN;

+		}

+

+		public Integer get_RULE_WS() {

+			return type_RULE_WS;

+		}

+

+		public Integer get(int kind) {

+			return kindToType.get(kind);

+		}

+	}

+	

+	protected static class DummyEnvironment extends AbstractEnvironment

+	{

+		private CharStream charStream;

+		protected final LPG2ANTLRTokenMap lpg2antlr;

+		private int nextIndex = 0;

+		private DerivedPrsStream prsStream;

+		private enum State { BOF, PRECEDING_ADJUNCT, TOKEN, EOF };

+		private State state = State.BOF;

+		private IToken currentToken = null;

+		private IToken[] precedingAdjuncts = null;

+		private int adjunctIndex = 0;

+		private int currentOffset = 0;

+		private IToken currentAdjunct = null;

+		

+		public DummyEnvironment(CharStream charStream, LPG2ANTLRTokenMap lpg2antlr) {

+			this.charStream = charStream;

+			this.lpg2antlr = lpg2antlr;

+			Reader reader = ((MyANTLRReaderStream)charStream).getReader();

+			try {

+//				reader.reset();

+				OCLLexer lpgLexer = new OCLLexer(this, reader, "input");

+				prsStream = new DerivedPrsStream(this, lpgLexer.getILexStream());

+				lpgLexer.lexer(prsStream);

+			} catch (IOException e) {

+				// TODO Auto-generated catch block

+				e.printStackTrace();

+			}

+		}

+		

+		public Token nextToken() {

+			Token token = null;

+			while (token == null) {

+				switch (state) {

+					case BOF:

+					{

+						if (nextIndex < prsStream.getSize()) {

+							currentToken = prsStream.getIToken(nextIndex++);

+							precedingAdjuncts = null;

+//							followingAdjuncts = currentToken.getFollowingAdjuncts();

+							adjunctIndex = 0;

+							currentAdjunct = null;

+							state = State.PRECEDING_ADJUNCT;

+						}

+						else {

+							token = Token.EOF_TOKEN;

+							state = State.EOF;

+						}

+						break;

+					}

+					case PRECEDING_ADJUNCT:

+					{

+						if (currentToken == null) {

+							if (nextIndex < prsStream.getSize()) {

+								currentToken = prsStream.getIToken(nextIndex++);

+								precedingAdjuncts = currentToken.getPrecedingAdjuncts();

+//								followingAdjuncts = currentToken.getFollowingAdjuncts();

+								adjunctIndex = 0;

+								currentAdjunct = null;

+							}

+							else {

+								token = Token.EOF_TOKEN;

+								state = State.EOF;

+							}

+						}

+						if ((currentToken != null) && (currentAdjunct == null)) {

+							if ((precedingAdjuncts != null) && (adjunctIndex < precedingAdjuncts.length)) {

+								currentAdjunct = precedingAdjuncts[adjunctIndex++];

+							}

+							else {

+//								currentToken = null;

+								currentAdjunct = null;

+								adjunctIndex = 0;

+								state = State.TOKEN;

+							}

+						}

+						if (currentAdjunct != null) {

+							int startOffset = currentAdjunct.getStartOffset();

+							if (currentOffset < startOffset) {

+								token = asWhite(currentOffset, currentAdjunct);

+								currentOffset = startOffset;

+							}

+							else {

+								token = asToken(currentAdjunct, lpg2antlr.get_RULE_ML_COMMENT());

+								currentAdjunct = null;

+							}

+						}

+						break;

+					}					

+					case TOKEN:

+					{

+						int startOffset = currentToken.getStartOffset();

+						if (currentOffset < startOffset) {

+							token = asWhite(currentOffset, currentToken);

+							currentOffset = startOffset;

+						}

+						else if (startOffset <= currentToken.getEndOffset()) {

+							int iKind = currentToken.getKind();

+							if (iKind == lpg2antlr.get_kind_EOF_TOKEN()) {

+								currentToken = null;

+								currentAdjunct = null;

+								adjunctIndex = 0;

+								state = State.EOF;

+							}

+							else {

+								Integer type = lpg2antlr.get(iKind);

+								token = asToken(currentToken, type);

+								currentToken = null;

+								currentAdjunct = null;

+								adjunctIndex = 0;

+								state = State.PRECEDING_ADJUNCT;

+							}

+						}

+						else {

+							currentToken = null;

+							currentAdjunct = null;

+							adjunctIndex = 0;

+							state = State.PRECEDING_ADJUNCT;

+						}

+						break;

+					}					

+/*					case FOLLOWING_ADJUNCT:

+					{

+						if (currentAdjunct == null) {

+							if ((followingAdjuncts != null) && (adjunctIndex < followingAdjuncts.length)) {

+								currentAdjunct = followingAdjuncts[adjunctIndex++];

+							}

+							else {

+								currentToken = null;

+								currentAdjunct = null;

+								adjunctIndex = 0;

+								state = State.PRECEDING_ADJUNCT;

+							}

+						}

+						if (currentAdjunct != null) {

+							int startOffset = currentAdjunct.getStartOffset();

+							if (currentOffset < startOffset) {

+								token = asWhite(currentOffset, currentAdjunct);

+								currentOffset = startOffset;

+							}

+							else {

+								token = asToken(currentAdjunct, "RULE_ML_COMMENT");

+								currentAdjunct = null;

+							}

+						}

+						break;

+					} */				

+					case EOF:

+					{

+						token = Token.EOF_TOKEN;

+						break;

+					}					

+				}

+			}

+			return token;

+		}

+

+		protected Token asToken(IToken iToken, Integer type) {

+			Token token = new CommonToken(charStream, type != null ? type : 0, Token.DEFAULT_CHANNEL, iToken.getStartOffset(), iToken.getEndOffset());

+//				token.setText(iToken.toString());

+			token.setLine(iToken.getLine());

+			token.setCharPositionInLine(iToken.getColumn()-1);

+			currentOffset = iToken.getEndOffset() + 1;

+			return token;

+		}

+

+		protected Token asWhite(int startOffset, IToken iToken) {

+			int endOffset = iToken.getStartOffset();

+//			int iKind = iToken.getKind();

+//			String iString = OCLParsersym.orderedTerminalSymbols[iKind];

+			Integer type = lpg2antlr.get_RULE_WS();

+			Token token = new CommonToken(charStream, type != null ? type : 0, Token.DEFAULT_CHANNEL, startOffset, endOffset-1);

+//				token.setText(iToken.toString());

+			token.setLine(iToken.getLine());

+			token.setCharPositionInLine(iToken.getColumn()-(endOffset+1)+startOffset);

+			currentOffset = endOffset;

+			return token;

+		}

+

+		public EnvironmentFactory getFactory() {

+			// TODO Auto-generated method stub

+			return null;

+		}

+

+		public void setParent(Environment env) {

+			// TODO Auto-generated method stub

+			

+		}

+

+		public OCLStandardLibrary getOCLStandardLibrary() {

+			// TODO Auto-generated method stub

+			return null;

+		}

+

+		public TypeResolver getTypeResolver() {

+			// TODO Auto-generated method stub

+			return null;

+		}

+

+		public Object lookupPackage(List names) {

+			// TODO Auto-generated method stub

+			return null;

+		}

+

+		@Override

+		public void lexerError(int errorCode, int startOffset, int endOffset) {

+			ProblemHandler problemHandler = getProblemHandler();

+			if (problemHandler != null) {

+				String inputText = '"' + computeInputString(startOffset, endOffset) + '"';

+		        int tokenIndex = prsStream.getTokenIndexAtCharacter(startOffset);

+		        if (tokenIndex < 0) {

+		        	tokenIndex = -tokenIndex;

+		        }

+				String locInfo = prsStream.getEndLineNumberOfTokenAt(tokenIndex)

+					+ ":" + prsStream.getEndColumnOfTokenAt(tokenIndex); //$NON-NLS-1$

+				String messageTemplate = ProblemHandler.ERROR_MESSAGES[errorCode];

+				String message = OCLMessages.bind(messageTemplate, locInfo, inputText);

+				problemHandler.lexerProblem(Severity.ERROR, message, null, startOffset, endOffset);

+			}

+		}

+		public String computeInputString(int left, int right) {

+			StringBuilder result = new StringBuilder(right - left + 1);

+			char[] chars = prsStream.getInputChars();

+			if (chars.length > 0) {

+				for (int i = left; i <= right; i++) {

+					if (chars[i] == '\t') {

+						result.append(' ');

+					} else if (chars[i] == '\n' || chars[i] == '\r'

+						|| chars[i] == '\f') {

+						if (i > 0) {

+							if (!Character.isWhitespace(chars[i - 1])) {

+								result.append(' ');

+							}

+						}

+					} else {

+						result.append(chars[i]);

+					}

+

+				}

+			}

+			return result.toString();

+		}

+

+		public Object lookupClassifier(List names) {

+			// TODO Auto-generated method stub

+			return null;

+		}

+

+		public List getStates(Object owner, List pathPrefix) {

+			// TODO Auto-generated method stub

+			return null;

+		}

+

+		public boolean isInPostcondition(OCLExpression exp) {

+			// TODO Auto-generated method stub

+			return false;

+		}

+

+		public Object defineAttribute(Object owner, Variable variable,

+				Object constraint) {

+			// TODO Auto-generated method stub

+			return null;

+		}

+

+		public Object defineOperation(Object owner, String name,

+				Object type, List params, Object constraint) {

+			// TODO Auto-generated method stub

+			return null;

+		}

+

+		public Object getDefinition(Object feature) {

+			// TODO Auto-generated method stub

+			return null;

+		}

+

+		public void undefine(Object feature) {

+			// TODO Auto-generated method stub

+			

+		}

+

+		public OCLFactory getOCLFactory() {

+			// TODO Auto-generated method stub

+			return null;

+		}

+

+		public UMLReflection getUMLReflection() {

+			// TODO Auto-generated method stub

+			return null;

+		}

+	}

+	

+	private static final LPG2ANTLRTokenMap lpg2antlr = new LPG2ANTLRTokenMap(OCLParsersym.orderedTerminalSymbols, InternalEssentialOCLParser.tokenNames);

+

+	private DummyEnvironment env = null;

+	

+	public MyEssentialOCLLexer() {

+		super();

+	}

+

+	public MyEssentialOCLLexer(CharStream input, RecognizerSharedState state) {

+		super(input, state);

+	}

+

+	public MyEssentialOCLLexer(CharStream input) {

+		super(input);

+	}

+

+	@Override

+	public String getGrammarFileName() {

+		String grammarFileName = super.getGrammarFileName();

+		return grammarFileName;

+	}

+

+	@Override

+	public void setCharStream(CharStream input) {

+		env = new DummyEnvironment(input, lpg2antlr);

+		super.setCharStream(input);

+	}

+

+	@Override

+	public Token nextToken() {

+		Token lpgToken = env.nextToken();

+		String lpgString = lpgToken.toString();

+		Token antlrToken = super.nextToken();

+		String antlrString = antlrToken.toString();

+		if (lpgString.equals(antlrString)) {

+			System.out.println(lpgString);

+		}

+		else {

+			System.out.println(lpgString + " <----> " + antlrString);

+		}

+		return antlrToken;

+	}

+

+	@Override

+	public String getSourceName() {

+		String sourceName = super.getSourceName();

+		return sourceName;

+	}

+

+}

diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/MyEssentialOCLParser.java b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/MyEssentialOCLParser.java
new file mode 100644
index 0000000..e05e562
--- /dev/null
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/MyEssentialOCLParser.java
@@ -0,0 +1,25 @@
+package org.eclipse.ocl.examples.xtext.essentialocl;

+

+import java.io.IOException;

+import java.io.Reader;

+

+import org.eclipse.emf.common.util.WrappedException;

+import org.eclipse.ocl.examples.xtext.essentialocl.parser.antlr.EssentialOCLParser;

+import org.eclipse.xtext.parser.IParseResult;

+

+public class MyEssentialOCLParser extends EssentialOCLParser

+{

+	public MyEssentialOCLParser() {

+		super();

+	}

+

+	@Override

+	public IParseResult doParse(Reader reader) {

+		try {

+			

+			return parse(getDefaultRuleName(), new MyANTLRReaderStream(reader));

+		} catch (IOException e) {

+			throw new WrappedException(e);

+		}

+	}

+}

diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/MyLexerProvider.java b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/MyLexerProvider.java
new file mode 100644
index 0000000..4c04e1c
--- /dev/null
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/MyLexerProvider.java
@@ -0,0 +1,37 @@
+package org.eclipse.ocl.examples.xtext.essentialocl;

+

+import org.antlr.runtime.CharStream;

+import org.antlr.runtime.Lexer;

+import org.eclipse.ocl.examples.xtext.essentialocl.parser.antlr.internal.InternalEssentialOCLLexer;

+import org.eclipse.xtext.parser.antlr.LexerProvider;

+

+import com.google.inject.Provider;

+

+

+public class MyLexerProvider<T extends Lexer> implements Provider<T> {

+

+	private final Class<? extends T> clazz;

+

+	public static <T extends Lexer> LexerProvider<T> create(Class<T> clazz) {

+		return new LexerProvider<T>(clazz);

+	}

+	

+	public MyLexerProvider(Class<? extends T> clazz) {

+		this.clazz = clazz;

+	}

+	

+	/**

+	 * Creates a lexer instance via reflection. The object is not created with the default

+	 * constructor because it will not initialize the backtracking state of the lexer.

+	 * Instead, we pass <code>null</code> as CharStream argument.

+	 */

+	public T get() {

+		try {

+			return clazz.getConstructor(CharStream.class).newInstance(new Object[] { null });

+		}

+		catch (Exception e) {

+			throw new RuntimeException(e);

+		}

+	}

+

+}

diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/lpg/LexerTemplateF.gi b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/lpg/LexerTemplateF.gi
index b3293f9..187323b 100644
--- a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/lpg/LexerTemplateF.gi
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/lpg/LexerTemplateF.gi
@@ -77,7 +77,8 @@
                 ./
 
     $DefaultAction
-    /.$Header: /home/data/cvs/modeling/org.eclipse.mdt/org.eclipse.ocl/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/lpg/LexerTemplateF.gi,v 1.2 2011/01/24 21:31:47 ewillink Exp $case $rule_number: { ./
+    /.$Header
+				case $rule_number: { ./
 
     $BeginAction /.$DefaultAction./
 
@@ -92,7 +93,8 @@
     $EndJava /.$EndAction./
 
     $NoAction
-    /.$Header: /home/data/cvs/modeling/org.eclipse.mdt/org.eclipse.ocl/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/lpg/LexerTemplateF.gi,v 1.2 2011/01/24 21:31:47 ewillink Exp $case $rule_number:
+    /.$Header
+			case $rule_number:
                     break; ./
 
     $BeginActions
diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/.gitignore b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/.gitignore
new file mode 100644
index 0000000..671b5de
--- /dev/null
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/.gitignore
@@ -0,0 +1,5 @@
+/OCLKWLexer.l
+/OCLLexer.l
+/OCLParser.l
+/OCLParser.java
+/OCLParserprs.java
diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCLLexer.gi b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCLLexer.gi
index f88e4c7..dc12987 100644
--- a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCLLexer.gi
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCLLexer.gi
@@ -11,8 +11,6 @@
 -- *   See (or edit) Notice Declaration below
 -- *   
 -- * </copyright>
--- *
--- * $Id: EssentialOCLLexer.gi,v 1.2 2011/01/24 21:31:47 ewillink Exp $
 -- */
 --
 -- The Essential OCL Lexer
diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexer.java b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexer.java
new file mode 100644
index 0000000..166979a
--- /dev/null
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexer.java
@@ -0,0 +1,453 @@
+/**
+* Essential OCL Keyword Lexer
+* <copyright>
+*
+* Copyright (c) 2005, 2009 IBM Corporation and others.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   IBM - Initial API and implementation
+*   E.D.Willink - Lexer and Parser refactoring to support extensibility and flexible error handling
+*   E.D.Willink - Bug 285633, 292112
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - LPG v 2.0.17 adoption (242153)
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - Introducing new LPG templates (299396) 
+*
+* </copyright>
+*
+*
+*/
+/**
+* Complete OCL Keyword Lexer
+* <copyright>
+*
+* Copyright (c) 2005, 2009 IBM Corporation and others.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   IBM - Initial API and implementation
+*   E.D.Willink - Bug 292112
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - LPG v 2.0.17 adoption (242153)
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - Introducing new LPG templates (299396)
+*
+* </copyright>
+*/
+
+package org.eclipse.ocl.examples.xtext.essentialocl.parser;
+
+
+
+public class OCLKWLexer extends OCLKWLexerprs
+{
+    private char[] inputChars;
+    private final int keywordKind[] = new int[42 + 1];
+
+    public int[] getKeywordKinds() { return keywordKind; }
+
+    public int lexer(int curtok, int lasttok)
+    {
+        int current_kind = getKind(inputChars[curtok]),
+            act;
+
+        for (act = tAction(START_STATE, current_kind);
+             act > NUM_RULES && act < ACCEPT_ACTION;
+             act = tAction(act, current_kind))
+        {
+            curtok++;
+            current_kind = (curtok > lasttok
+                                   ? Char_EOF
+                                   : getKind(inputChars[curtok]));
+        }
+
+        if (act > ERROR_ACTION)
+        {
+            curtok++;
+            act -= ERROR_ACTION;
+        }
+
+        return keywordKind[act == ERROR_ACTION  || curtok <= lasttok ? 0 : act];
+    }
+
+    public void setInputChars(char[] inputChars) { this.inputChars = inputChars; }
+
+
+    final static int tokenKind[] = new int[128];
+    static
+    {
+        tokenKind['$'] = OCLKWLexersym.Char_DollarSign;
+        tokenKind['%'] = OCLKWLexersym.Char_Percent;
+        tokenKind['_'] = OCLKWLexersym.Char__;
+
+        tokenKind['a'] = OCLKWLexersym.Char_a;
+        tokenKind['b'] = OCLKWLexersym.Char_b;
+        tokenKind['c'] = OCLKWLexersym.Char_c;
+        tokenKind['d'] = OCLKWLexersym.Char_d;
+        tokenKind['e'] = OCLKWLexersym.Char_e;
+        tokenKind['f'] = OCLKWLexersym.Char_f;
+        tokenKind['g'] = OCLKWLexersym.Char_g;
+        tokenKind['h'] = OCLKWLexersym.Char_h;
+        tokenKind['i'] = OCLKWLexersym.Char_i;
+        tokenKind['j'] = OCLKWLexersym.Char_j;
+        tokenKind['k'] = OCLKWLexersym.Char_k;
+        tokenKind['l'] = OCLKWLexersym.Char_l;
+        tokenKind['m'] = OCLKWLexersym.Char_m;
+        tokenKind['n'] = OCLKWLexersym.Char_n;
+        tokenKind['o'] = OCLKWLexersym.Char_o;
+        tokenKind['p'] = OCLKWLexersym.Char_p;
+        tokenKind['q'] = OCLKWLexersym.Char_q;
+        tokenKind['r'] = OCLKWLexersym.Char_r;
+        tokenKind['s'] = OCLKWLexersym.Char_s;
+        tokenKind['t'] = OCLKWLexersym.Char_t;
+        tokenKind['u'] = OCLKWLexersym.Char_u;
+        tokenKind['v'] = OCLKWLexersym.Char_v;
+        tokenKind['w'] = OCLKWLexersym.Char_w;
+        tokenKind['x'] = OCLKWLexersym.Char_x;
+        tokenKind['y'] = OCLKWLexersym.Char_y;
+        tokenKind['z'] = OCLKWLexersym.Char_z;
+
+        tokenKind['A'] = OCLKWLexersym.Char_A;
+        tokenKind['B'] = OCLKWLexersym.Char_B;
+        tokenKind['C'] = OCLKWLexersym.Char_C;
+        tokenKind['D'] = OCLKWLexersym.Char_D;
+        tokenKind['E'] = OCLKWLexersym.Char_E;
+        tokenKind['F'] = OCLKWLexersym.Char_F;
+        tokenKind['G'] = OCLKWLexersym.Char_G;
+        tokenKind['H'] = OCLKWLexersym.Char_H;
+        tokenKind['I'] = OCLKWLexersym.Char_I;
+        tokenKind['J'] = OCLKWLexersym.Char_J;
+        tokenKind['K'] = OCLKWLexersym.Char_K;
+        tokenKind['L'] = OCLKWLexersym.Char_L;
+        tokenKind['M'] = OCLKWLexersym.Char_M;
+        tokenKind['N'] = OCLKWLexersym.Char_N;
+        tokenKind['O'] = OCLKWLexersym.Char_O;
+        tokenKind['P'] = OCLKWLexersym.Char_P;
+        tokenKind['Q'] = OCLKWLexersym.Char_Q;
+        tokenKind['R'] = OCLKWLexersym.Char_R;
+        tokenKind['S'] = OCLKWLexersym.Char_S;
+        tokenKind['T'] = OCLKWLexersym.Char_T;
+        tokenKind['U'] = OCLKWLexersym.Char_U;
+        tokenKind['V'] = OCLKWLexersym.Char_V;
+        tokenKind['W'] = OCLKWLexersym.Char_W;
+        tokenKind['X'] = OCLKWLexersym.Char_X;
+        tokenKind['Y'] = OCLKWLexersym.Char_Y;
+        tokenKind['Z'] = OCLKWLexersym.Char_Z;
+    };
+
+    final int getKind(char c)
+    {
+        return (((c & 0xFFFFFF80) == 0) /* 0 <= c < 128? */ ? tokenKind[c] : 0);
+    }
+
+
+    public OCLKWLexer(char[] inputChars, int identifierKind)
+    {
+        this.inputChars = inputChars;
+        keywordKind[0] = identifierKind;
+
+        //
+        // Rule 1:  KeyWord ::= s e l f
+        //
+        
+		keywordKind[1] = (OCLParsersym.TK_self);
+	  
+	
+        //
+        // Rule 2:  KeyWord ::= i f
+        //
+        
+		keywordKind[2] = (OCLParsersym.TK_if);
+	  
+	
+        //
+        // Rule 3:  KeyWord ::= t h e n
+        //
+        
+		keywordKind[3] = (OCLParsersym.TK_then);
+	  
+	
+        //
+        // Rule 4:  KeyWord ::= e l s e
+        //
+        
+		keywordKind[4] = (OCLParsersym.TK_else);
+	  
+	
+        //
+        // Rule 5:  KeyWord ::= e n d i f
+        //
+        
+		keywordKind[5] = (OCLParsersym.TK_endif);
+	  
+	
+        //
+        // Rule 6:  KeyWord ::= a n d
+        //
+        
+		keywordKind[6] = (OCLParsersym.TK_and);
+	  
+	
+        //
+        // Rule 7:  KeyWord ::= o r
+        //
+        
+		keywordKind[7] = (OCLParsersym.TK_or);
+	  
+	
+        //
+        // Rule 8:  KeyWord ::= x o r
+        //
+        
+		keywordKind[8] = (OCLParsersym.TK_xor);
+	  
+	
+        //
+        // Rule 9:  KeyWord ::= n o t
+        //
+        
+		keywordKind[9] = (OCLParsersym.TK_not);
+	  
+	
+        //
+        // Rule 10:  KeyWord ::= i m p l i e s
+        //
+        
+		keywordKind[10] = (OCLParsersym.TK_implies);
+	  
+	
+        //
+        // Rule 11:  KeyWord ::= l e t
+        //
+        
+		keywordKind[11] = (OCLParsersym.TK_let);
+	  
+	
+        //
+        // Rule 12:  KeyWord ::= i n
+        //
+        
+		keywordKind[12] = (OCLParsersym.TK_in);
+	  
+	
+        //
+        // Rule 13:  KeyWord ::= t r u e
+        //
+        
+		keywordKind[13] = (OCLParsersym.TK_true);
+	  
+	
+        //
+        // Rule 14:  KeyWord ::= f a l s e
+        //
+        
+		keywordKind[14] = (OCLParsersym.TK_false);
+	  
+	
+        //
+        // Rule 15:  KeyWord ::= S e t
+        //
+        
+		keywordKind[15] = (OCLParsersym.TK_Set);
+	  
+	
+        //
+        // Rule 16:  KeyWord ::= B a g
+        //
+        
+		keywordKind[16] = (OCLParsersym.TK_Bag);
+	  
+	
+        //
+        // Rule 17:  KeyWord ::= S e q u e n c e
+        //
+        
+		keywordKind[17] = (OCLParsersym.TK_Sequence);
+	  
+	
+        //
+        // Rule 18:  KeyWord ::= C o l l e c t i o n
+        //
+        
+		keywordKind[18] = (OCLParsersym.TK_Collection);
+	  
+	
+        //
+        // Rule 19:  KeyWord ::= O r d e r e d S e t
+        //
+        
+		keywordKind[19] = (OCLParsersym.TK_OrderedSet);
+	  
+	
+        //
+        // Rule 20:  KeyWord ::= S t r i n g
+        //
+        
+		keywordKind[20] = (OCLParsersym.TK_String);
+	  
+	
+        //
+        // Rule 21:  KeyWord ::= I n t e g e r
+        //
+        
+		keywordKind[21] = (OCLParsersym.TK_Integer);
+	  
+	
+        //
+        // Rule 22:  KeyWord ::= U n l i m i t e d N a t u r a l
+        //
+        
+		keywordKind[22] = (OCLParsersym.TK_UnlimitedNatural);
+	  
+	
+        //
+        // Rule 23:  KeyWord ::= R e a l
+        //
+        
+		keywordKind[23] = (OCLParsersym.TK_Real);
+	  
+	
+        //
+        // Rule 24:  KeyWord ::= B o o l e a n
+        //
+        
+		keywordKind[24] = (OCLParsersym.TK_Boolean);
+	  
+	
+        //
+        // Rule 25:  KeyWord ::= T u p l e
+        //
+        
+		keywordKind[25] = (OCLParsersym.TK_Tuple);
+	  
+	
+        //
+        // Rule 26:  KeyWord ::= O c l A n y
+        //
+        
+		keywordKind[26] = (OCLParsersym.TK_OclAny);
+	  
+	
+        //
+        // Rule 27:  KeyWord ::= O c l V o i d
+        //
+        
+		keywordKind[27] = (OCLParsersym.TK_OclVoid);
+	  
+	
+        //
+        // Rule 28:  KeyWord ::= O c l I n v a l i d
+        //
+        
+		keywordKind[28] = (OCLParsersym.TK_OclInvalid);
+	  
+	
+        //
+        // Rule 29:  KeyWord ::= n u l l
+        //
+        
+		keywordKind[29] = (OCLParsersym.TK_null);
+	  
+	
+        //
+        // Rule 30:  KeyWord ::= i n v a l i d
+        //
+        
+		keywordKind[30] = (OCLParsersym.TK_invalid);
+	  
+	
+        //
+        // Rule 31:  KeyWord ::= i n v
+        //
+        
+		keywordKind[31] = (OCLParsersym.TK_inv);
+	  
+	
+        //
+        // Rule 32:  KeyWord ::= p r e
+        //
+        
+		keywordKind[32] = (OCLParsersym.TK_pre);
+	  
+	
+        //
+        // Rule 33:  KeyWord ::= p o s t
+        //
+        
+		keywordKind[33] = (OCLParsersym.TK_post);
+	  
+	
+        //
+        // Rule 34:  KeyWord ::= b o d y
+        //
+        
+		keywordKind[34] = (OCLParsersym.TK_body);
+	  
+	
+        //
+        // Rule 35:  KeyWord ::= c o n t e x t
+        //
+        
+		keywordKind[35] = (OCLParsersym.TK_context);
+	  
+	
+        //
+        // Rule 36:  KeyWord ::= p a c k a g e
+        //
+        
+		keywordKind[36] = (OCLParsersym.TK_package);
+	  
+	
+        //
+        // Rule 37:  KeyWord ::= e n d p a c k a g e
+        //
+        
+		keywordKind[37] = (OCLParsersym.TK_endpackage);
+	  
+	
+        //
+        // Rule 38:  KeyWord ::= d e f
+        //
+        
+		keywordKind[38] = (OCLParsersym.TK_def);
+	  
+	
+        //
+        // Rule 39:  KeyWord ::= d e r i v e
+        //
+        
+		keywordKind[39] = (OCLParsersym.TK_derive);
+	  
+	
+        //
+        // Rule 40:  KeyWord ::= i n i t
+        //
+        
+		keywordKind[40] = (OCLParsersym.TK_init);
+	  
+	
+        //
+        // Rule 41:  KeyWord ::= O c l M e s s a g e
+        //
+        
+		keywordKind[41] = (OCLParsersym.TK_OclMessage);
+	  
+	
+        //
+        // Rule 42:  KeyWord ::= s t a t i c
+        //
+        
+		keywordKind[42] = (OCLParsersym.TK_static);
+	  
+	
+        for (int i = 0; i < keywordKind.length; i++)
+        {
+            if (keywordKind[i] == 0)
+                keywordKind[i] = identifierKind;
+        }
+    }
+}
+
diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexer.l b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexer.l
index 3d31288..8d83895 100644
--- a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexer.l
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexer.l
@@ -1,100 +1,100 @@
-
-Options in effect for C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexer.gi:
-
-    ACTION-BLOCK=("C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexer.java","/.","./")
-
-    AST-DIRECTORY=""  AST-TYPE="Ast"  NOATTRIBUTES  NOAUTOMATIC-AST  NOBACKTRACK
-    BYTE  CONFLICTS  
-    DAT-DIRECTORY="C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/"
-    
-    DAT-FILE="C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexerdcl.data"
-    
-    DCL-FILE="C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexerdcl.java"
-    NODEBUG  
-    DEF-FILE="C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexerdef.java"
-    NOEDIT  NOERROR-MAPS  ESCAPE='$'  
-    EXPORT-TERMINALS=("C:\Development\HartLibrary\Workspace3.5.1\org.eclipse.ocl.examples.xtext.essentialocl\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\OCLParsersym.java","TK_","")
-    EXTENDS-PARSETABLE  FACTORY="new "  FILE-PREFIX="OCLKWLexer"  NOFIRST  
-    NOFOLLOW  NOGLR  NOGOTO-DEFAULT  
-    GRM-FILE="C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexer.gi"
-    
-    IMP-FILE="C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexerimp.java"
-    INCLUDE-DIRECTORY=".;../lpg"  LEGACY  NOLIST  MARGIN=4  MAX-CASES=1024  
-    NAMES=OPTIMIZED  NONT-CHECK  OR_MARKER='|'  
-    OUT-DIRECTORY="C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/"
-    PACKAGE="org.eclipse.ocl.examples.xtext.essentialocl.parser"  NOPARENT-SAVE
-    PARSETABLE-INTERFACES="lpg.runtime.ParseTable"  PREFIX="Char_"  PRIORITY  
-    PROGRAMMING_LANGUAGE=JAVA  
-    PRS-FILE="C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexerprs.java"
-    NOQUIET  READ-REDUCE  REMAP-TERMINALS  NOSCOPES  NOSERIALIZE  
-    NOSHIFT-DEFAULT  SINGLE-PRODUCTIONS  SLR  NOSOFT-KEYWORDS  NOSTATES  
-    SUFFIX=""  
-    SYM-FILE="C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexersym.java"
-    TAB-FILE="OCLKWLexer.t"  TABLE  TEMPLATE="../lpg/KeywordTemplateF.gi"  
-    TRACE=CONFLICTS  NOVARIABLES  NOVERBOSE  NOVISITOR  VISITOR-TYPE="Visitor"
-    WARNINGS  NOXREF  
-
-../lpg/KWLexerMapF.gi:14:24:14:24:309:309: Warning: The macro "$" is undefined. No substitution made
-../lpg/KWLexerMapF.gi:2:5:2:14:17:26: Informative: The terminal DollarSign is useless.
-../lpg/KWLexerMapF.gi:3:5:3:11:41:47: Informative: The terminal Percent is useless.
-../lpg/KWLexerMapF.gi:4:5:4:5:62:62: Informative: The terminal _ is useless.
-../lpg/KWLexerMapF.gi:5:23:5:23:87:87: Informative: The terminal j is useless.
-../lpg/KWLexerMapF.gi:5:49:5:49:113:113: Informative: The terminal w is useless.
-../lpg/KWLexerMapF.gi:5:55:5:55:119:119: Informative: The terminal z is useless.
-../lpg/KWLexerMapF.gi:6:11:6:11:132:132: Informative: The terminal D is useless.
-../lpg/KWLexerMapF.gi:6:13:6:13:134:134: Informative: The terminal E is useless.
-../lpg/KWLexerMapF.gi:6:15:6:15:136:136: Informative: The terminal F is useless.
-../lpg/KWLexerMapF.gi:6:17:6:17:138:138: Informative: The terminal G is useless.
-../lpg/KWLexerMapF.gi:6:19:6:19:140:140: Informative: The terminal H is useless.
-../lpg/KWLexerMapF.gi:6:23:6:23:144:144: Informative: The terminal J is useless.
-../lpg/KWLexerMapF.gi:6:25:6:25:146:146: Informative: The terminal K is useless.
-../lpg/KWLexerMapF.gi:6:27:6:27:148:148: Informative: The terminal L is useless.
-../lpg/KWLexerMapF.gi:6:35:6:35:156:156: Informative: The terminal P is useless.
-../lpg/KWLexerMapF.gi:6:37:6:37:158:158: Informative: The terminal Q is useless.
-../lpg/KWLexerMapF.gi:6:49:6:49:170:170: Informative: The terminal W is useless.
-../lpg/KWLexerMapF.gi:6:51:6:51:172:172: Informative: The terminal X is useless.
-../lpg/KWLexerMapF.gi:6:53:6:53:174:174: Informative: The terminal Y is useless.
-../lpg/KWLexerMapF.gi:6:55:6:55:176:176: Informative: The terminal Z is useless.
-
-
-C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCLKWLexer.gi:115:9:115:15:2399:2405: Informative: Grammar is  SLR(1).
-
-Number of Terminals: 56
-Number of Nonterminals: 1
-Number of Productions: 43
-Number of Single Productions: 0
-Number of Items: 275
-Number of States: 159
-Number of Shift actions: 157
-Number of Goto actions: 1
-Number of Shift/Reduce actions: 40
-Number of Goto/Reduce actions: 0
-Number of Reduce actions: 3
-Number of Shift-Reduce conflicts: 0
-Number of Reduce-Reduce conflicts: 0
-
-Number of entries in base Action Table: 160
-Additional space required for compaction of Action Table: 0.6%
-
-Number of unique terminal states: 159
-Number of Shift actions saved by merging: 0
-Number of Conflict points saved by merging: 0
-Number of Reduce actions saved by merging: 0
-Number of Reduce saved by default: 2
-
-Number of entries in Terminal Action Table: 357
-Additional space required for compaction of Terminal Table: 2.5%
-
-Actions in Compressed Tables:
-     Number of Shifts: 157
-     Number of Shift/Reduces: 40
-     Number of Gotos: 1
-     Number of Goto/Reduces: 0
-     Number of Reduces: 1
-     Number of Defaults: 2
-
-Parsing Tables storage:
-    Storage required for BASE_CHECK: 43 Bytes
-    Storage required for BASE_ACTION: 410 Bytes
-    Storage required for TERM_CHECK: 416 Bytes
-    Storage required for TERM_ACTION: 734 Bytes
+

+Options in effect for C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexer.gi:

+

+    ACTION-BLOCK=("C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexer.java","/.","./")

+

+    AST-DIRECTORY=""  AST-TYPE="Ast"  NOATTRIBUTES  NOAUTOMATIC-AST  NOBACKTRACK

+    BYTE  CONFLICTS  

+    DAT-DIRECTORY="C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/"

+    

+    DAT-FILE="C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexerdcl.data"

+    

+    DCL-FILE="C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexerdcl.java"

+    NODEBUG  

+    DEF-FILE="C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexerdef.java"

+    NOEDIT  NOERROR-MAPS  ESCAPE='$'  

+    EXPORT-TERMINALS=("C:\Development\OCL3.2.0\Workspace3.6\org.eclipse.ocl.examples.lpg.lexer\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\OCLParsersym.java","TK_","")

+    EXTENDS-PARSETABLE  FACTORY="new "  FILE-PREFIX="OCLKWLexer"  NOFIRST  

+    NOFOLLOW  NOGLR  NOGOTO-DEFAULT  

+    GRM-FILE="C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexer.gi"

+    

+    IMP-FILE="C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexerimp.java"

+    INCLUDE-DIRECTORY=".;../lpg"  LEGACY  NOLIST  MARGIN=4  MAX-CASES=1024  

+    NAMES=OPTIMIZED  NONT-CHECK  OR_MARKER='|'  

+    OUT-DIRECTORY="C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/"

+    PACKAGE="org.eclipse.ocl.examples.xtext.essentialocl.parser"  NOPARENT-SAVE

+    PARSETABLE-INTERFACES="lpg.runtime.ParseTable"  PREFIX="Char_"  PRIORITY  

+    PROGRAMMING_LANGUAGE=JAVA  

+    PRS-FILE="C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexerprs.java"

+    NOQUIET  READ-REDUCE  REMAP-TERMINALS  NOSCOPES  NOSERIALIZE  

+    NOSHIFT-DEFAULT  SINGLE-PRODUCTIONS  SLR  NOSOFT-KEYWORDS  NOSTATES  

+    SUFFIX=""  

+    SYM-FILE="C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexersym.java"

+    TAB-FILE="OCLKWLexer.t"  TABLE  TEMPLATE="../lpg/KeywordTemplateF.gi"  

+    TRACE=CONFLICTS  NOVARIABLES  NOVERBOSE  NOVISITOR  VISITOR-TYPE="Visitor"

+    WARNINGS  NOXREF  

+

+../lpg/KWLexerMapF.gi:14:24:14:24:296:296: Warning: The macro "$" is undefined. No substitution made

+../lpg/KWLexerMapF.gi:2:5:2:14:16:25: Informative: The terminal DollarSign is useless.

+../lpg/KWLexerMapF.gi:3:5:3:11:39:45: Informative: The terminal Percent is useless.

+../lpg/KWLexerMapF.gi:4:5:4:5:59:59: Informative: The terminal _ is useless.

+../lpg/KWLexerMapF.gi:5:23:5:23:83:83: Informative: The terminal j is useless.

+../lpg/KWLexerMapF.gi:5:49:5:49:109:109: Informative: The terminal w is useless.

+../lpg/KWLexerMapF.gi:5:55:5:55:115:115: Informative: The terminal z is useless.

+../lpg/KWLexerMapF.gi:6:11:6:11:127:127: Informative: The terminal D is useless.

+../lpg/KWLexerMapF.gi:6:13:6:13:129:129: Informative: The terminal E is useless.

+../lpg/KWLexerMapF.gi:6:15:6:15:131:131: Informative: The terminal F is useless.

+../lpg/KWLexerMapF.gi:6:17:6:17:133:133: Informative: The terminal G is useless.

+../lpg/KWLexerMapF.gi:6:19:6:19:135:135: Informative: The terminal H is useless.

+../lpg/KWLexerMapF.gi:6:23:6:23:139:139: Informative: The terminal J is useless.

+../lpg/KWLexerMapF.gi:6:25:6:25:141:141: Informative: The terminal K is useless.

+../lpg/KWLexerMapF.gi:6:27:6:27:143:143: Informative: The terminal L is useless.

+../lpg/KWLexerMapF.gi:6:35:6:35:151:151: Informative: The terminal P is useless.

+../lpg/KWLexerMapF.gi:6:37:6:37:153:153: Informative: The terminal Q is useless.

+../lpg/KWLexerMapF.gi:6:49:6:49:165:165: Informative: The terminal W is useless.

+../lpg/KWLexerMapF.gi:6:51:6:51:167:167: Informative: The terminal X is useless.

+../lpg/KWLexerMapF.gi:6:53:6:53:169:169: Informative: The terminal Y is useless.

+../lpg/KWLexerMapF.gi:6:55:6:55:171:171: Informative: The terminal Z is useless.

+

+

+C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCLKWLexer.gi:115:9:115:15:2281:2287: Informative: Grammar is  SLR(1).

+

+Number of Terminals: 56

+Number of Nonterminals: 1

+Number of Productions: 43

+Number of Single Productions: 0

+Number of Items: 275

+Number of States: 159

+Number of Shift actions: 157

+Number of Goto actions: 1

+Number of Shift/Reduce actions: 40

+Number of Goto/Reduce actions: 0

+Number of Reduce actions: 3

+Number of Shift-Reduce conflicts: 0

+Number of Reduce-Reduce conflicts: 0

+

+Number of entries in base Action Table: 160

+Additional space required for compaction of Action Table: 0.6%

+

+Number of unique terminal states: 159

+Number of Shift actions saved by merging: 0

+Number of Conflict points saved by merging: 0

+Number of Reduce actions saved by merging: 0

+Number of Reduce saved by default: 2

+

+Number of entries in Terminal Action Table: 357

+Additional space required for compaction of Terminal Table: 2.5%

+

+Actions in Compressed Tables:

+     Number of Shifts: 157

+     Number of Shift/Reduces: 40

+     Number of Gotos: 1

+     Number of Goto/Reduces: 0

+     Number of Reduces: 1

+     Number of Defaults: 2

+

+Parsing Tables storage:

+    Storage required for BASE_CHECK: 43 Bytes

+    Storage required for BASE_ACTION: 410 Bytes

+    Storage required for TERM_CHECK: 416 Bytes

+    Storage required for TERM_ACTION: 734 Bytes

diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexerprs.java b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexerprs.java
new file mode 100644
index 0000000..5ee4edd
--- /dev/null
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexerprs.java
@@ -0,0 +1,314 @@
+/**
+* Essential OCL Keyword Lexer
+* <copyright>
+*
+* Copyright (c) 2005, 2009 IBM Corporation and others.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   IBM - Initial API and implementation
+*   E.D.Willink - Lexer and Parser refactoring to support extensibility and flexible error handling
+*   E.D.Willink - Bug 285633, 292112
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - LPG v 2.0.17 adoption (242153)
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - Introducing new LPG templates (299396) 
+*
+* </copyright>
+*
+*
+*/
+/**
+* Complete OCL Keyword Lexer
+* <copyright>
+*
+* Copyright (c) 2005, 2009 IBM Corporation and others.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   IBM - Initial API and implementation
+*   E.D.Willink - Bug 292112
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - LPG v 2.0.17 adoption (242153)
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - Introducing new LPG templates (299396)
+*
+* </copyright>
+*/
+
+package org.eclipse.ocl.examples.xtext.essentialocl.parser;
+
+public class OCLKWLexerprs implements lpg.runtime.ParseTable, OCLKWLexersym {
+    public final static int ERROR_SYMBOL = 0;
+    public final int getErrorSymbol() { return ERROR_SYMBOL; }
+
+    public final static int SCOPE_UBOUND = 0;
+    public final int getScopeUbound() { return SCOPE_UBOUND; }
+
+    public final static int SCOPE_SIZE = 0;
+    public final int getScopeSize() { return SCOPE_SIZE; }
+
+    public final static int MAX_NAME_LENGTH = 0;
+    public final int getMaxNameLength() { return MAX_NAME_LENGTH; }
+
+    public final static int NUM_STATES = 159;
+    public final int getNumStates() { return NUM_STATES; }
+
+    public final static int NT_OFFSET = 56;
+    public final int getNtOffset() { return NT_OFFSET; }
+
+    public final static int LA_STATE_OFFSET = 247;
+    public final int getLaStateOffset() { return LA_STATE_OFFSET; }
+
+    public final static int MAX_LA = 1;
+    public final int getMaxLa() { return MAX_LA; }
+
+    public final static int NUM_RULES = 42;
+    public final int getNumRules() { return NUM_RULES; }
+
+    public final static int NUM_NONTERMINALS = 2;
+    public final int getNumNonterminals() { return NUM_NONTERMINALS; }
+
+    public final static int NUM_SYMBOLS = 58;
+    public final int getNumSymbols() { return NUM_SYMBOLS; }
+
+    public final static int SEGMENT_SIZE = 8192;
+    public final int getSegmentSize() { return SEGMENT_SIZE; }
+
+    public final static int START_STATE = 43;
+    public final int getStartState() { return START_STATE; }
+
+    public final static int IDENTIFIER_SYMBOL = 0;
+    public final int getIdentifier_SYMBOL() { return IDENTIFIER_SYMBOL; }
+
+    public final static int EOFT_SYMBOL = 36;
+    public final int getEoftSymbol() { return EOFT_SYMBOL; }
+
+    public final static int EOLT_SYMBOL = 57;
+    public final int getEoltSymbol() { return EOLT_SYMBOL; }
+
+    public final static int ACCEPT_ACTION = 204;
+    public final int getAcceptAction() { return ACCEPT_ACTION; }
+
+    public final static int ERROR_ACTION = 205;
+    public final int getErrorAction() { return ERROR_ACTION; }
+
+    public final static boolean BACKTRACK = false;
+    public final boolean getBacktrack() { return BACKTRACK; }
+
+    public final int getStartSymbol() { return lhs(0); }
+    public final boolean isValidForParser() { return OCLKWLexersym.isValidForParser; }
+
+
+    public interface IsNullable {
+        public final static byte isNullable[] = {0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0
+        };
+    };
+    public final static byte isNullable[] = IsNullable.isNullable;
+    public final boolean isNullable(int index) { return isNullable[index] != 0; }
+
+    public interface ProsthesesIndex {
+        public final static byte prosthesesIndex[] = {0,
+            2,1
+        };
+    };
+    public final static byte prosthesesIndex[] = ProsthesesIndex.prosthesesIndex;
+    public final int prosthesesIndex(int index) { return prosthesesIndex[index]; }
+
+    public interface IsKeyword {
+        public final static byte isKeyword[] = {0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0
+        };
+    };
+    public final static byte isKeyword[] = IsKeyword.isKeyword;
+    public final boolean isKeyword(int index) { return isKeyword[index] != 0; }
+
+    public interface BaseCheck {
+        public final static byte baseCheck[] = {0,
+            4,2,4,4,5,3,2,3,3,7,
+            3,2,4,5,3,3,8,10,10,6,
+            7,16,4,7,5,6,7,10,4,7,
+            3,3,4,4,7,7,10,3,6,4,
+            10,6
+        };
+    };
+    public final static byte baseCheck[] = BaseCheck.baseCheck;
+    public final int baseCheck(int index) { return baseCheck[index]; }
+    public final static byte rhs[] = baseCheck;
+    public final int rhs(int index) { return rhs[index]; };
+
+    public interface BaseAction {
+        public final static char baseAction[] = {
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,45,66,72,67,70,37,
+            75,81,78,85,17,86,47,18,87,94,
+            42,92,88,96,48,52,25,57,55,98,
+            100,104,105,106,109,111,13,110,117,112,
+            121,118,122,126,59,127,128,130,133,137,
+            139,140,138,141,142,63,144,150,151,152,
+            157,145,156,161,166,167,170,162,10,171,
+            175,178,179,174,181,182,65,186,189,191,
+            194,195,198,201,193,202,207,205,210,203,
+            212,213,215,216,217,219,225,229,227,233,
+            235,237,231,238,239,242,246,243,249,250,
+            251,253,254,257,255,258,266,265,260,268,
+            267,274,278,271,282,283,286,287,288,290,
+            292,293,295,297,303,291,304,305,306,310,
+            309,315,317,318,320,321,322,325,326,328,
+            330,332,338,333,340,344,345,347,350,352,
+            348,354,359,205,205
+        };
+    };
+    public final static char baseAction[] = BaseAction.baseAction;
+    public final int baseAction(int index) { return baseAction[index]; }
+    public final static char lhs[] = baseAction;
+    public final int lhs(int index) { return lhs[index]; };
+
+    public interface TermCheck {
+        public final static byte termCheck[] = {0,
+            0,1,2,3,4,5,6,7,8,0,
+            10,11,0,13,2,15,0,0,1,19,
+            3,21,22,23,0,9,10,27,28,5,
+            21,31,32,33,34,26,0,13,29,0,
+            4,0,18,7,35,9,0,0,7,2,
+            4,0,5,7,0,14,0,1,0,3,
+            9,3,0,9,0,0,0,13,6,0,
+            6,0,1,7,0,24,7,0,16,15,
+            0,1,5,25,0,0,0,0,14,5,
+            4,0,7,0,1,0,9,0,7,0,
+            5,36,5,0,0,0,1,8,0,0,
+            0,0,3,10,4,11,0,0,2,8,
+            0,0,2,15,7,0,0,0,2,0,
+            3,2,0,12,9,3,0,0,0,0,
+            0,0,1,0,0,9,8,8,11,0,
+            0,0,2,4,14,0,0,6,15,3,
+            0,0,1,3,20,0,0,2,2,0,
+            0,1,17,0,0,6,2,0,0,2,
+            0,0,0,2,6,0,1,14,0,1,
+            0,11,0,0,0,5,3,0,4,2,
+            0,0,0,3,0,13,0,1,4,0,
+            1,0,0,1,0,0,0,16,0,5,
+            18,5,7,12,0,1,0,9,0,1,
+            0,5,0,1,0,1,0,0,0,2,
+            4,0,0,13,6,0,1,6,0,0,
+            0,1,0,0,0,6,0,0,1,0,
+            12,19,6,11,0,0,0,0,4,16,
+            0,12,5,0,20,10,10,0,1,6,
+            10,0,0,1,3,0,0,0,3,0,
+            0,0,0,4,0,9,0,3,11,8,
+            8,5,0,0,0,0,1,17,0,0,
+            2,8,10,4,0,11,0,0,1,0,
+            0,0,6,4,0,0,1,0,8,0,
+            6,0,0,12,7,0,22,0,1,0,
+            8,12,3,0,0,1,0,0,5,0,
+            4,0,3,0,0,0,9,4,0,0,
+            2,30,0,0,0,14,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0
+        };
+    };
+    public final static byte termCheck[] = TermCheck.termCheck;
+    public final int termCheck(int index) { return termCheck[index]; }
+
+    public interface TermAction {
+        public final static char termAction[] = {0,
+            205,64,59,65,63,60,66,62,46,205,
+            47,67,205,58,106,49,205,205,84,61,
+            83,53,57,48,205,79,78,56,55,95,
+            132,54,51,50,52,134,205,207,131,205,
+            71,205,96,72,133,73,205,205,88,92,
+            82,205,91,81,205,87,205,98,205,97,
+            93,220,12,99,205,205,205,243,120,205,
+            142,205,68,69,205,94,70,205,121,141,
+            205,75,76,113,205,205,205,205,74,77,
+            85,205,80,205,86,205,212,205,89,205,
+            90,204,100,205,205,205,237,101,205,205,
+            205,205,107,102,105,103,205,205,108,109,
+            205,205,110,104,111,205,205,205,114,205,
+            216,115,205,221,112,214,205,205,205,205,
+            205,205,119,205,205,213,211,116,117,205,
+            205,205,124,123,118,205,205,125,122,126,
+            205,205,130,238,239,205,205,128,228,205,
+            205,135,127,205,205,129,136,205,205,137,
+            205,205,205,234,138,205,209,139,205,218,
+            205,140,205,205,31,208,245,205,143,144,
+            205,205,205,145,205,206,205,147,148,205,
+            230,205,205,151,205,205,205,146,205,152,
+            149,154,153,150,205,156,205,155,205,157,
+            205,158,205,159,205,219,205,205,205,161,
+            160,205,205,210,162,205,244,163,205,205,
+            205,167,205,205,205,166,205,205,171,205,
+            165,164,170,168,205,205,205,205,173,169,
+            205,225,174,205,231,172,175,205,177,176,
+            247,205,205,241,240,205,205,205,178,205,
+            205,205,205,180,205,226,205,182,179,232,
+            181,229,205,205,205,205,185,184,205,205,
+            187,235,183,186,205,215,205,205,222,205,
+            205,205,189,190,205,205,194,205,191,205,
+            193,205,205,192,195,205,188,205,246,205,
+            233,196,224,205,205,242,205,205,223,205,
+            198,205,199,205,205,205,201,202,205,205,
+            227,197,205,205,205,200
+        };
+    };
+    public final static char termAction[] = TermAction.termAction;
+    public final int termAction(int index) { return termAction[index]; }
+    public final int asb(int index) { return 0; }
+    public final int asr(int index) { return 0; }
+    public final int nasb(int index) { return 0; }
+    public final int nasr(int index) { return 0; }
+    public final int terminalIndex(int index) { return 0; }
+    public final int nonterminalIndex(int index) { return 0; }
+    public final int scopePrefix(int index) { return 0;}
+    public final int scopeSuffix(int index) { return 0;}
+    public final int scopeLhs(int index) { return 0;}
+    public final int scopeLa(int index) { return 0;}
+    public final int scopeStateSet(int index) { return 0;}
+    public final int scopeRhs(int index) { return 0;}
+    public final int scopeState(int index) { return 0;}
+    public final int inSymb(int index) { return 0;}
+    public final String name(int index) { return null; }
+    public final int originalState(int state) { return 0; }
+    public final int asi(int state) { return 0; }
+    public final int nasi(int state) { return 0; }
+    public final int inSymbol(int state) { return 0; }
+
+    /**
+     * assert(! goto_default);
+     */
+    public final int ntAction(int state, int sym) {
+        return baseAction[state + sym];
+    }
+
+    /**
+     * assert(! shift_default);
+     */
+    public final int tAction(int state, int sym) {
+        int i = baseAction[state],
+            k = i + sym;
+        return termAction[termCheck[k] == sym ? k : i];
+    }
+    public final int lookAhead(int la_state, int sym) {
+        int k = la_state + sym;
+        return termAction[termCheck[k] == sym ? k : la_state];
+    }
+}
diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexersym.java b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexersym.java
new file mode 100644
index 0000000..4bc9fb0
--- /dev/null
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLKWLexersym.java
@@ -0,0 +1,164 @@
+/**
+* Essential OCL Keyword Lexer
+* <copyright>
+*
+* Copyright (c) 2005, 2009 IBM Corporation and others.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   IBM - Initial API and implementation
+*   E.D.Willink - Lexer and Parser refactoring to support extensibility and flexible error handling
+*   E.D.Willink - Bug 285633, 292112
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - LPG v 2.0.17 adoption (242153)
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - Introducing new LPG templates (299396) 
+*
+* </copyright>
+*
+*
+*/
+/**
+* Complete OCL Keyword Lexer
+* <copyright>
+*
+* Copyright (c) 2005, 2009 IBM Corporation and others.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   IBM - Initial API and implementation
+*   E.D.Willink - Bug 292112
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - LPG v 2.0.17 adoption (242153)
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - Introducing new LPG templates (299396)
+*
+* </copyright>
+*/
+
+package org.eclipse.ocl.examples.xtext.essentialocl.parser;
+
+public interface OCLKWLexersym {
+    public final static int
+      Char_DollarSign = 37,
+      Char_Percent = 38,
+      Char__ = 39,
+      Char_a = 4,
+      Char_b = 23,
+      Char_c = 10,
+      Char_d = 8,
+      Char_e = 1,
+      Char_f = 13,
+      Char_g = 12,
+      Char_h = 24,
+      Char_i = 6,
+      Char_j = 40,
+      Char_k = 17,
+      Char_l = 2,
+      Char_m = 18,
+      Char_n = 5,
+      Char_o = 7,
+      Char_p = 15,
+      Char_q = 25,
+      Char_r = 9,
+      Char_s = 11,
+      Char_t = 3,
+      Char_u = 14,
+      Char_v = 16,
+      Char_w = 41,
+      Char_x = 19,
+      Char_y = 20,
+      Char_z = 42,
+      Char_A = 26,
+      Char_B = 27,
+      Char_C = 28,
+      Char_D = 43,
+      Char_E = 44,
+      Char_F = 45,
+      Char_G = 46,
+      Char_H = 47,
+      Char_I = 21,
+      Char_J = 48,
+      Char_K = 49,
+      Char_L = 50,
+      Char_M = 29,
+      Char_N = 30,
+      Char_O = 31,
+      Char_P = 51,
+      Char_Q = 52,
+      Char_R = 32,
+      Char_S = 22,
+      Char_T = 33,
+      Char_U = 34,
+      Char_V = 35,
+      Char_W = 53,
+      Char_X = 54,
+      Char_Y = 55,
+      Char_Z = 56,
+      Char_EOF = 36;
+
+    public final static String orderedTerminalSymbols[] = {
+                 "",
+                 "e",
+                 "l",
+                 "t",
+                 "a",
+                 "n",
+                 "i",
+                 "o",
+                 "d",
+                 "r",
+                 "c",
+                 "s",
+                 "g",
+                 "f",
+                 "u",
+                 "p",
+                 "v",
+                 "k",
+                 "m",
+                 "x",
+                 "y",
+                 "I",
+                 "S",
+                 "b",
+                 "h",
+                 "q",
+                 "A",
+                 "B",
+                 "C",
+                 "M",
+                 "N",
+                 "O",
+                 "R",
+                 "T",
+                 "U",
+                 "V",
+                 "EOF",
+                 "DollarSign",
+                 "Percent",
+                 "_",
+                 "j",
+                 "w",
+                 "z",
+                 "D",
+                 "E",
+                 "F",
+                 "G",
+                 "H",
+                 "J",
+                 "K",
+                 "L",
+                 "P",
+                 "Q",
+                 "W",
+                 "X",
+                 "Y",
+                 "Z"
+             };
+
+    public final static int numTokenKinds = orderedTerminalSymbols.length;
+    public final static boolean isValidForParser = true;
+}
diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexer.gi b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexer.gi
index ab697f4..06f0ac8 100644
--- a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexer.gi
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexer.gi
@@ -11,8 +11,6 @@
 -- *   See (or edit) Notice Declaration below
 -- *   
 -- * </copyright>
--- *
--- * $Id: OCLLexer.gi,v 1.2 2011/01/24 21:31:47 ewillink Exp $
 -- */
 --
 -- The Complete OCL Lexer
diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexer.java b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexer.java
new file mode 100644
index 0000000..ad5f259
--- /dev/null
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexer.java
@@ -0,0 +1,872 @@
+/**
+* Essential OCL Lexer
+* <copyright>
+*
+* Copyright (c) 2005, 2010 IBM Corporation and others.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   IBM - Initial API and implementation
+*   E.D.Willink - Lexer and Parser refactoring to support extensibility and flexible error handling
+*   Borland - Bug 242880
+*   E.D.Willink - Bug 292112, 295166
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - LPG v 2.0.17 adoption (242153)
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - Introducing new LPG templates (299396)
+*
+* </copyright>
+*
+* $Id: EssentialOCLLexer.gi,v 1.2 2011/01/24 21:31:47 ewillink Exp $
+*/
+/**
+* Complete OCL Lexer
+* <copyright>
+*
+* Copyright (c) 2005, 2009 IBM Corporation and others.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   IBM - Initial API and implementation
+*   E.D.Willink - Bug 292112, 292594
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - LPG v 2.0.17 adoption (242153)
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - Introducing new LPG templates (299396)
+*
+* </copyright>
+*/
+
+package org.eclipse.ocl.examples.xtext.essentialocl.parser;
+
+import lpg.runtime.*;
+import org.eclipse.ocl.lpg.AbstractLexer;
+
+import java.io.Reader;
+
+import org.eclipse.ocl.Environment;
+import org.eclipse.ocl.lpg.BasicEnvironment;
+import org.eclipse.ocl.lpg.DerivedPrsStream;
+import org.eclipse.ocl.lpg.DerivedLexStream;
+import org.eclipse.ocl.util.OCLUtil;
+
+@SuppressWarnings("nls")
+public class OCLLexer extends AbstractLexer implements RuleAction
+{
+    private OCLLexerLpgLexStream lexStream;
+    
+    private static ParseTable prs = new OCLLexerprs();
+    @Override
+    public ParseTable getParseTable() { return prs; }
+
+    private LexParser lexParser = new LexParser();
+    @Override
+    public LexParser getParser() { return lexParser; }
+
+    public int getToken(int i) { return lexParser.getToken(i); }
+    public int getRhsFirstTokenIndex(int i) { return lexParser.getFirstToken(i); }
+    public int getRhsLastTokenIndex(int i) { return lexParser.getLastToken(i); }
+
+    public int getLeftSpan() { return lexParser.getToken(1); }
+    public int getRightSpan() { return lexParser.getLastToken(); }
+
+    @Override
+    public void resetKeywordLexer()
+    {
+        if (kwLexer == null)
+              this.kwLexer = new OCLKWLexer(lexStream.getInputChars(), OCLParsersym.TK_IDENTIFIER);
+        else this.kwLexer.setInputChars(lexStream.getInputChars());
+    }
+
+    @Override
+    public void reset(char[] input_chars, String filename)
+    {
+        reset(input_chars, filename, 1);
+    }
+    
+    @Override
+    public void reset(char[] input_chars, String filename, int tab)
+    {
+        lexStream = new OCLLexerLpgLexStream(getOCLEnvironment(), input_chars, filename, tab);
+        lexParser.reset(lexStream, prs, this);
+        resetKeywordLexer();
+    }
+
+    
+    public OCLLexer(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment) {
+        super(OCLUtil.getAdapter(environment, BasicEnvironment.class));
+        oclEnvironment = environment;
+    }
+
+	public OCLLexer(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment, char[] chars) {
+		this(environment, chars, "OCL", ECLIPSE_TAB_VALUE);
+	}
+
+    public OCLLexer(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment, char[] input_chars, String filename, int tab) {
+        super(OCLUtil.getAdapter(environment, BasicEnvironment.class));
+        oclEnvironment = environment;
+        reset(input_chars, filename, tab);            
+    }
+
+	private final Environment<?,?,?,?,?,?,?,?,?,?,?,?> oclEnvironment;
+    
+	public Environment<?,?,?,?,?,?,?,?,?,?,?,?> getOCLEnvironment() {
+    	return oclEnvironment;
+    }
+
+    @Override
+    public DerivedLexStream getILexStream() { return lexStream; }
+
+    /**
+     * @deprecated replaced by {@link #getILexStream()}
+     */
+    @Deprecated
+    @Override
+    public ILexStream getLexStream() { return lexStream; }
+
+    private void initializeLexer(DerivedPrsStream prsStream, int start_offset, int end_offset)
+    {
+        if (lexStream.getInputChars() == null)
+            throw new NullPointerException("LexStream was not initialized");
+        lexStream.setPrsStream(prsStream);
+        prsStream.makeToken(start_offset, end_offset, 0); // Token list must start with a bad token
+    }
+
+    private void addEOF(DerivedPrsStream prsStream, int end_offset)
+    {
+        prsStream.makeToken(end_offset, end_offset, OCLParsersym.TK_EOF_TOKEN); // and end with the end of file token
+        prsStream.setStreamLength(prsStream.getSize());
+    }
+
+    @Override
+    public void lexer(DerivedPrsStream prsStream)
+    {
+        lexer(null, prsStream);
+    }
+    
+    @Override
+    public void lexer(Monitor monitor, DerivedPrsStream prsStream)
+    {
+        initializeLexer(prsStream, 0, -1);
+        lexParser.parseCharacters(monitor);  // Lex the input characters
+        addEOF(prsStream, lexStream.getStreamIndex());
+    }
+
+    @Override
+    public void lexer(DerivedPrsStream prsStream, int start_offset, int end_offset)
+    {
+        lexer(null, prsStream, start_offset, end_offset);
+    }
+    
+    @Override
+    public void lexer(Monitor monitor, DerivedPrsStream prsStream, int start_offset, int end_offset)
+    {
+        if (start_offset <= 1)
+             initializeLexer(prsStream, 0, -1);
+        else initializeLexer(prsStream, start_offset - 1, start_offset - 1);
+
+        lexParser.parseCharacters(monitor, start_offset, end_offset);
+
+        addEOF(prsStream, (end_offset >= lexStream.getStreamIndex() ? lexStream.getStreamIndex() : end_offset + 1));
+    }
+
+    /**
+     * If a parse stream was not passed to this Lexical analyser then we
+     * simply report a lexical error. Otherwise, we produce a bad token.
+     */
+    @Override
+    public void reportLexicalError(int startLoc, int endLoc) {
+        IPrsStream prs_stream = lexStream.getIPrsStream();
+        if (prs_stream == null)
+            lexStream.reportLexicalError(startLoc, endLoc);
+        else {
+            //
+            // Remove any token that may have been processed that fall in the
+            // range of the lexical error... then add one error token that spans
+            // the error range.
+            //
+            for (int i = prs_stream.getSize() - 1; i > 0; i--) {
+                if (prs_stream.getStartOffset(i) >= startLoc)
+                     prs_stream.removeLastToken();
+                else break;
+            }
+            prs_stream.makeToken(startLoc, endLoc, 0); // add an error token to the prsStream
+        }        
+    }
+
+    //
+    // The Lexer contains an array of characters as the input stream to be parsed.
+    // There are methods to retrieve and classify characters.
+    // The lexparser "token" is implemented simply as the index of the next character in the array.
+    // The Lexer extends the abstract class LpgLexStream with an implementation of the abstract
+    // method getKind.  The template defines the Lexer class and the lexer() method.
+    // A driver creates the action class, "Lexer", passing an Option object to the constructor.
+    //
+    OCLKWLexer kwLexer;
+    boolean printTokens;
+    private final static int ECLIPSE_TAB_VALUE = 4;
+
+    @Override
+    public int [] getKeywordKinds() { return kwLexer.getKeywordKinds(); }
+
+
+    /**
+     * @deprecated function replaced by {@link #reset(char [] content, String filename)}
+     */
+    @Deprecated
+    public void initialize(char [] content, String filename)
+    {
+        reset(content, filename);
+    }
+    
+    final void makeToken(int left_token, int right_token, int kind)
+    {
+        lexStream.makeToken(left_token, right_token, kind);
+    }
+    
+    final void makeToken(int kind)
+    {
+        int startOffset = getLeftSpan(),
+            endOffset = getRightSpan();
+        lexStream.makeToken(startOffset, endOffset, kind);
+        if (printTokens) printValue(startOffset, endOffset);
+    }
+
+    final void makeComment(int kind)
+    {
+        int startOffset = getLeftSpan(),
+            endOffset = getRightSpan();
+        lexStream.getIPrsStream().makeAdjunct(startOffset, endOffset, kind);
+    }
+
+    final void skipToken()
+    {
+        if (printTokens) printValue(getLeftSpan(), getRightSpan());
+    }
+    
+    final void checkForKeyWord()
+    {
+        int startOffset = getLeftSpan(),
+            endOffset = getRightSpan(),
+            kwKind = kwLexer.lexer(startOffset, endOffset);
+        lexStream.makeToken(startOffset, endOffset, kwKind);
+        if (printTokens) printValue(startOffset, endOffset);
+    }
+    
+    //
+    // This flavor of checkForKeyWord is necessary when the default kind
+    // (which is returned when the keyword filter doesn't match) is something
+    // other than _IDENTIFIER.
+    //
+    final void checkForKeyWord(int defaultKind)
+    {
+        int startOffset = getLeftSpan(),
+            endOffset = getRightSpan(),
+            kwKind = kwLexer.lexer(startOffset, endOffset);
+        if (kwKind == OCLParsersym.TK_IDENTIFIER)
+            kwKind = defaultKind;
+        lexStream.makeToken(startOffset, endOffset, kwKind);
+        if (printTokens) printValue(startOffset, endOffset);
+    }
+    
+    final void printValue(int startOffset, int endOffset)
+    {
+        String s = new String(lexStream.getInputChars(), startOffset, endOffset - startOffset + 1);
+        System.out.print(s);
+    }
+
+    //
+    //
+    //
+    static class OCLLexerLpgLexStream extends DerivedLexStream
+    {
+    public final static int tokenKind[] =
+    {
+        OCLLexersym.Char_CtlCharNotWS,    // 000    0x00
+        OCLLexersym.Char_CtlCharNotWS,    // 001    0x01
+        OCLLexersym.Char_CtlCharNotWS,    // 002    0x02
+        OCLLexersym.Char_CtlCharNotWS,    // 003    0x03
+        OCLLexersym.Char_CtlCharNotWS,    // 004    0x04
+        OCLLexersym.Char_CtlCharNotWS,    // 005    0x05
+        OCLLexersym.Char_CtlCharNotWS,    // 006    0x06
+        OCLLexersym.Char_CtlCharNotWS,    // 007    0x07
+        OCLLexersym.Char_CtlCharNotWS,    // 008    0x08
+        OCLLexersym.Char_HT,              // 009    0x09
+        OCLLexersym.Char_LF,              // 010    0x0A
+        OCLLexersym.Char_CtlCharNotWS,    // 011    0x0B
+        OCLLexersym.Char_FF,              // 012    0x0C
+        OCLLexersym.Char_CR,              // 013    0x0D
+        OCLLexersym.Char_CtlCharNotWS,    // 014    0x0E
+        OCLLexersym.Char_CtlCharNotWS,    // 015    0x0F
+        OCLLexersym.Char_CtlCharNotWS,    // 016    0x10
+        OCLLexersym.Char_CtlCharNotWS,    // 017    0x11
+        OCLLexersym.Char_CtlCharNotWS,    // 018    0x12
+        OCLLexersym.Char_CtlCharNotWS,    // 019    0x13
+        OCLLexersym.Char_CtlCharNotWS,    // 020    0x14
+        OCLLexersym.Char_CtlCharNotWS,    // 021    0x15
+        OCLLexersym.Char_CtlCharNotWS,    // 022    0x16
+        OCLLexersym.Char_CtlCharNotWS,    // 023    0x17
+        OCLLexersym.Char_CtlCharNotWS,    // 024    0x18
+        OCLLexersym.Char_CtlCharNotWS,    // 025    0x19
+        OCLLexersym.Char_CtlCharNotWS,    // 026    0x1A
+        OCLLexersym.Char_CtlCharNotWS,    // 027    0x1B
+        OCLLexersym.Char_CtlCharNotWS,    // 028    0x1C
+        OCLLexersym.Char_CtlCharNotWS,    // 029    0x1D
+        OCLLexersym.Char_CtlCharNotWS,    // 030    0x1E
+        OCLLexersym.Char_CtlCharNotWS,    // 031    0x1F
+        OCLLexersym.Char_Space,           // 032    0x20
+        OCLLexersym.Char_Exclamation,     // 033    0x21
+        OCLLexersym.Char_DoubleQuote,     // 034    0x22
+        OCLLexersym.Char_Sharp,           // 035    0x23
+        OCLLexersym.Char_DollarSign,      // 036    0x24
+        OCLLexersym.Char_Percent,         // 037    0x25
+        OCLLexersym.Char_Ampersand,       // 038    0x26
+        OCLLexersym.Char_SingleQuote,     // 039    0x27
+        OCLLexersym.Char_LeftParen,       // 040    0x28
+        OCLLexersym.Char_RightParen,      // 041    0x29
+        OCLLexersym.Char_Star,            // 042    0x2A
+        OCLLexersym.Char_Plus,            // 043    0x2B
+        OCLLexersym.Char_Comma,           // 044    0x2C
+        OCLLexersym.Char_Minus,           // 045    0x2D
+        OCLLexersym.Char_Dot,             // 046    0x2E
+        OCLLexersym.Char_Slash,           // 047    0x2F
+        OCLLexersym.Char_0,               // 048    0x30
+        OCLLexersym.Char_1,               // 049    0x31
+        OCLLexersym.Char_2,               // 050    0x32
+        OCLLexersym.Char_3,               // 051    0x33
+        OCLLexersym.Char_4,               // 052    0x34
+        OCLLexersym.Char_5,               // 053    0x35
+        OCLLexersym.Char_6,               // 054    0x36
+        OCLLexersym.Char_7,               // 055    0x37
+        OCLLexersym.Char_8,               // 056    0x38
+        OCLLexersym.Char_9,               // 057    0x39
+        OCLLexersym.Char_Colon,           // 058    0x3A
+        OCLLexersym.Char_SemiColon,       // 059    0x3B
+        OCLLexersym.Char_LessThan,        // 060    0x3C
+        OCLLexersym.Char_Equal,           // 061    0x3D
+        OCLLexersym.Char_GreaterThan,     // 062    0x3E
+        OCLLexersym.Char_QuestionMark,    // 063    0x3F
+        OCLLexersym.Char_AtSign,          // 064    0x40
+        OCLLexersym.Char_A,               // 065    0x41
+        OCLLexersym.Char_B,               // 066    0x42
+        OCLLexersym.Char_C,               // 067    0x43
+        OCLLexersym.Char_D,               // 068    0x44
+        OCLLexersym.Char_E,               // 069    0x45
+        OCLLexersym.Char_F,               // 070    0x46
+        OCLLexersym.Char_G,               // 071    0x47
+        OCLLexersym.Char_H,               // 072    0x48
+        OCLLexersym.Char_I,               // 073    0x49
+        OCLLexersym.Char_J,               // 074    0x4A
+        OCLLexersym.Char_K,               // 075    0x4B
+        OCLLexersym.Char_L,               // 076    0x4C
+        OCLLexersym.Char_M,               // 077    0x4D
+        OCLLexersym.Char_N,               // 078    0x4E
+        OCLLexersym.Char_O,               // 079    0x4F
+        OCLLexersym.Char_P,               // 080    0x50
+        OCLLexersym.Char_Q,               // 081    0x51
+        OCLLexersym.Char_R,               // 082    0x52
+        OCLLexersym.Char_S,               // 083    0x53
+        OCLLexersym.Char_T,               // 084    0x54
+        OCLLexersym.Char_U,               // 085    0x55
+        OCLLexersym.Char_V,               // 086    0x56
+        OCLLexersym.Char_W,               // 087    0x57
+        OCLLexersym.Char_X,               // 088    0x58
+        OCLLexersym.Char_Y,               // 089    0x59
+        OCLLexersym.Char_Z,               // 090    0x5A
+        OCLLexersym.Char_LeftBracket,     // 091    0x5B
+        OCLLexersym.Char_BackSlash,       // 092    0x5C
+        OCLLexersym.Char_RightBracket,    // 093    0x5D
+        OCLLexersym.Char_Caret,           // 094    0x5E
+        OCLLexersym.Char__,               // 095    0x5F
+        OCLLexersym.Char_BackQuote,       // 096    0x60
+        OCLLexersym.Char_a,               // 097    0x61
+        OCLLexersym.Char_b,               // 098    0x62
+        OCLLexersym.Char_c,               // 099    0x63
+        OCLLexersym.Char_d,               // 100    0x64
+        OCLLexersym.Char_e,               // 101    0x65
+        OCLLexersym.Char_f,               // 102    0x66
+        OCLLexersym.Char_g,               // 103    0x67
+        OCLLexersym.Char_h,               // 104    0x68
+        OCLLexersym.Char_i,               // 105    0x69
+        OCLLexersym.Char_j,               // 106    0x6A
+        OCLLexersym.Char_k,               // 107    0x6B
+        OCLLexersym.Char_l,               // 108    0x6C
+        OCLLexersym.Char_m,               // 109    0x6D
+        OCLLexersym.Char_n,               // 110    0x6E
+        OCLLexersym.Char_o,               // 111    0x6F
+        OCLLexersym.Char_p,               // 112    0x70
+        OCLLexersym.Char_q,               // 113    0x71
+        OCLLexersym.Char_r,               // 114    0x72
+        OCLLexersym.Char_s,               // 115    0x73
+        OCLLexersym.Char_t,               // 116    0x74
+        OCLLexersym.Char_u,               // 117    0x75
+        OCLLexersym.Char_v,               // 118    0x76
+        OCLLexersym.Char_w,               // 119    0x77
+        OCLLexersym.Char_x,               // 120    0x78
+        OCLLexersym.Char_y,               // 121    0x79
+        OCLLexersym.Char_z,               // 122    0x7A
+        OCLLexersym.Char_LeftBrace,       // 123    0x7B
+        OCLLexersym.Char_VerticalBar,     // 124    0x7C
+        OCLLexersym.Char_RightBrace,      // 125    0x7D
+        OCLLexersym.Char_Tilde,           // 126    0x7E
+        OCLLexersym.Char_CtlCharNotWS,    // 127    0x7F
+
+        OCLLexersym.Char_Acute,           // for the acute accent 0xb4
+        OCLLexersym.Char_AfterASCIINotAcute,      // for all chars in range 0x80..0xfffe excluding the acute accent
+        OCLLexersym.Char_EOF              // for '\uffff' or 65535 
+    };
+            
+    @Override
+    public final int getKind(int i)  // Classify character at ith location
+    {
+        char c = (i >= getStreamLength() ? '\uffff' : getCharValue(i));
+        return (c < 128) // ASCII Character
+                  ? tokenKind[c] 
+                  : (c == '\uffff')
+                      ?OCLLexersym.Char_EOF
+                      : (c == '\u00b4')
+                            ? OCLLexersym.Char_EOF
+                            : OCLLexersym.Char_AfterASCIINotAcute;
+    }
+
+    @Override
+    public String[] orderedExportedSymbols() { return OCLParsersym.orderedTerminalSymbols; }
+
+    public OCLLexerLpgLexStream(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment, String filename, int tab) throws java.io.IOException
+    {
+        super(OCLUtil.getAdapter(environment, BasicEnvironment.class), filename, tab);
+    }
+
+    public OCLLexerLpgLexStream(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment, char[] input_chars, String filename, int tab)
+    {
+        super(OCLUtil.getAdapter(environment, BasicEnvironment.class), input_chars, filename, tab);
+    }
+
+    public OCLLexerLpgLexStream(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment, char[] input_chars, String filename)
+    {
+        super(OCLUtil.getAdapter(environment, BasicEnvironment.class), input_chars, filename, 1);
+    }
+    }
+
+    
+// Some OCL additions to make lexer work with an input reader
+/**
+ * @since 3.0
+ */
+public OCLLexer(Environment<?,?,?,?,?,?,?,?,?,?,?,?> environment, Reader reader, String filename) throws java.io.IOException {
+	super(OCLUtil.getAdapter(environment, BasicEnvironment.class));
+	oclEnvironment = environment;
+	reset(reader, filename);
+}
+
+// OCL addition to reset the lexer stream from an input reader
+/**
+ * @since 3.0
+ */
+@Override
+public void reset(Reader reader, String filename) throws java.io.IOException {
+	char[] input_chars = getInputChars(reader);
+    reset(input_chars, filename, ECLIPSE_TAB_VALUE);
+}
+
+    public void ruleAction(int ruleNumber)
+    {
+        switch(ruleNumber)
+        {
+
+            //
+            // Rule 1:  Token ::= Identifier
+            //
+            
+			case 1: { 
+				checkForKeyWord();
+	              break;
+            }
+	
+            //
+            // Rule 2:  Token ::= " SLNotDQ "
+            //
+            
+			case 2: { 
+				makeToken(OCLParsersym.TK_IDENTIFIER);
+	              break;
+            }
+	
+            //
+            // Rule 3:  Token ::= _ SingleQuote SLNotSQOpt SingleQuote
+            //
+            
+			case 3: { 
+				makeToken(OCLParsersym.TK_QUOTED_IDENTIFIER);
+	              break;
+            }
+	
+            //
+            // Rule 4:  Token ::= SingleQuote SLNotSQOpt SingleQuote
+            //
+            
+			case 4: { 
+				makeToken(OCLParsersym.TK_STRING_LITERAL);
+	              break;
+            }
+	
+            //
+            // Rule 5:  Token ::= Acute SLNotSQOpt Acute
+            //
+            
+			case 5: { 
+				makeToken(OCLParsersym.TK_STRING_LITERAL);
+	              break;
+            }
+	
+            //
+            // Rule 6:  Token ::= BackQuote SLNotSQOpt Acute
+            //
+            
+			case 6: { 
+				makeToken(OCLParsersym.TK_STRING_LITERAL);
+	              break;
+            }
+	
+            //
+            // Rule 7:  Token ::= IntegerLiteral
+            //
+            
+		case 7:
+                break; 
+	
+            //
+            // Rule 8:  Token ::= IntegerLiteral DotToken
+            //
+            
+		case 8:
+                break; 
+	
+            //
+            // Rule 9:  Token ::= IntegerLiteral DotDotToken
+            //
+            
+		case 9:
+                break; 
+	
+            //
+            // Rule 10:  Token ::= RealLiteral
+            //
+            
+			case 10: { 
+				makeToken(OCLParsersym.TK_REAL_LITERAL);
+	              break;
+            }
+	
+            //
+            // Rule 11:  Token ::= SLC
+            //
+            
+			case 11: { 
+				makeComment(OCLParsersym.TK_SINGLE_LINE_COMMENT);
+	              break;
+            }
+	
+            //
+            // Rule 12:  Token ::= / * Inside Stars /
+            //
+            
+			case 12: { 
+                makeComment(OCLParsersym.TK_MULTI_LINE_COMMENT);
+                  break;
+            }
+    
+            //
+            // Rule 13:  Token ::= WS
+            //
+            
+			case 13: { 
+				skipToken();
+	              break;
+            }
+	
+            //
+            // Rule 14:  Token ::= +
+            //
+            
+			case 14: { 
+				makeToken(OCLParsersym.TK_PLUS);
+	              break;
+            }
+	
+            //
+            // Rule 15:  Token ::= -
+            //
+            
+			case 15: { 
+				makeToken(OCLParsersym.TK_MINUS);
+	              break;
+            }
+	
+            //
+            // Rule 16:  Token ::= *
+            //
+            
+			case 16: { 
+				makeToken(OCLParsersym.TK_MULTIPLY);
+	              break;
+            }
+	
+            //
+            // Rule 17:  Token ::= /
+            //
+            
+			case 17: { 
+				makeToken(OCLParsersym.TK_DIVIDE);
+	              break;
+            }
+	
+            //
+            // Rule 18:  Token ::= (
+            //
+            
+			case 18: { 
+				makeToken(OCLParsersym.TK_LPAREN);
+	              break;
+            }
+	
+            //
+            // Rule 19:  Token ::= )
+            //
+            
+			case 19: { 
+				makeToken(OCLParsersym.TK_RPAREN);
+	              break;
+            }
+	
+            //
+            // Rule 20:  Token ::= >
+            //
+            
+			case 20: { 
+				makeToken(OCLParsersym.TK_GREATER);
+	              break;
+            }
+	
+            //
+            // Rule 21:  Token ::= <
+            //
+            
+			case 21: { 
+				makeToken(OCLParsersym.TK_LESS);
+	              break;
+            }
+	
+            //
+            // Rule 22:  Token ::= =
+            //
+            
+			case 22: { 
+				makeToken(OCLParsersym.TK_EQUAL);
+	              break;
+            }
+	
+            //
+            // Rule 23:  Token ::= > =
+            //
+            
+			case 23: { 
+				makeToken(OCLParsersym.TK_GREATER_EQUAL);
+	              break;
+            }
+	
+            //
+            // Rule 24:  Token ::= < =
+            //
+            
+			case 24: { 
+				makeToken(OCLParsersym.TK_LESS_EQUAL);
+	              break;
+            }
+	
+            //
+            // Rule 25:  Token ::= < >
+            //
+            
+			case 25: { 
+				makeToken(OCLParsersym.TK_NOT_EQUAL);
+	              break;
+            }
+	
+            //
+            // Rule 26:  Token ::= [
+            //
+            
+			case 26: { 
+				makeToken(OCLParsersym.TK_LBRACKET);
+	              break;
+            }
+	
+            //
+            // Rule 27:  Token ::= ]
+            //
+            
+			case 27: { 
+				makeToken(OCLParsersym.TK_RBRACKET);
+	              break;
+            }
+	
+            //
+            // Rule 28:  Token ::= {
+            //
+            
+			case 28: { 
+				makeToken(OCLParsersym.TK_LBRACE);
+	              break;
+            }
+	
+            //
+            // Rule 29:  Token ::= }
+            //
+            
+			case 29: { 
+				makeToken(OCLParsersym.TK_RBRACE);
+	              break;
+            }
+	
+            //
+            // Rule 30:  Token ::= - >
+            //
+            
+			case 30: { 
+				makeToken(OCLParsersym.TK_ARROW);
+	              break;
+            }
+	
+            //
+            // Rule 31:  Token ::= |
+            //
+            
+			case 31: { 
+				makeToken(OCLParsersym.TK_BAR);
+	              break;
+            }
+	
+            //
+            // Rule 32:  Token ::= ,
+            //
+            
+			case 32: { 
+				makeToken(OCLParsersym.TK_COMMA);
+	              break;
+            }
+	
+            //
+            // Rule 33:  Token ::= :
+            //
+            
+			case 33: { 
+				makeToken(OCLParsersym.TK_COLON);
+	              break;
+            }
+	
+            //
+            // Rule 34:  Token ::= : :
+            //
+            
+			case 34: { 
+				makeToken(OCLParsersym.TK_COLONCOLON);
+	              break;
+            }
+	
+            //
+            // Rule 35:  Token ::= ;
+            //
+            
+			case 35: { 
+				makeToken(OCLParsersym.TK_SEMICOLON);
+	              break;
+            }
+	
+            //
+            // Rule 36:  Token ::= DotToken
+            //
+            
+		case 36:
+                break; 
+	
+            //
+            // Rule 37:  DotToken ::= .
+            //
+            
+			case 37: { 
+				makeToken(OCLParsersym.TK_DOT);
+	              break;
+            }
+	
+            //
+            // Rule 38:  Token ::= DotDotToken
+            //
+            
+		case 38:
+                break; 
+	
+            //
+            // Rule 39:  DotDotToken ::= . .
+            //
+            
+			case 39: { 
+				makeToken(OCLParsersym.TK_DOTDOT);
+	              break;
+            }
+	
+            //
+            // Rule 40:  IntegerLiteral ::= Integer
+            //
+            
+			case 40: { 
+				makeToken(OCLParsersym.TK_INTEGER_LITERAL);
+	              break;
+            }
+	
+            //
+            // Rule 265:  Token ::= @
+            //
+            
+			case 265: { 
+				makeToken(OCLParsersym.TK_AT);
+	              break;
+            }
+	
+            //
+            // Rule 266:  Token ::= ^
+            //
+            
+			case 266: { 
+				makeToken(OCLParsersym.TK_CARET);
+	              break;
+            }
+	
+            //
+            // Rule 267:  Token ::= ^ ^
+            //
+            
+			case 267: { 
+				makeToken(OCLParsersym.TK_CARETCARET);
+	              break;
+            }
+	
+            //
+            // Rule 268:  Token ::= ?
+            //
+            
+			case 268: { 
+				makeToken(OCLParsersym.TK_QUESTIONMARK);
+	              break;
+            }
+	
+    
+            default:
+                break;
+        }
+        return;
+    }
+}
+
diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexer.l b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexer.l
index 906ea9d..28eec8e 100644
--- a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexer.l
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexer.l
@@ -1,83 +1,82 @@
-
-Options in effect for C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexer.gi:
-
-    ACTION-BLOCK=("C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexer.java","/.","./")
-
-    AST-DIRECTORY=""  AST-TYPE="Ast"  NOATTRIBUTES  NOAUTOMATIC-AST  NOBACKTRACK
-    BYTE  CONFLICTS  
-    DAT-DIRECTORY="C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/"
-    
-    DAT-FILE="C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexerdcl.data"
-    
-    DCL-FILE="C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexerdcl.java"
-    NODEBUG  
-    DEF-FILE="C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexerdef.java"
-    NOEDIT  NOERROR-MAPS  ESCAPE='$'  
-    EXPORT-TERMINALS=("C:\Development\HartLibrary\Workspace3.5.1\org.eclipse.ocl.examples.xtext.essentialocl\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\OCLParsersym.java","TK_","")
-    EXTENDS-PARSETABLE  FACTORY="new "  FILE-PREFIX="OCLLexer"  
-    FILTER="OCLKWLexer.gi"  NOFIRST  NOFOLLOW  NOGLR  NOGOTO-DEFAULT  
-    GRM-FILE="C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexer.gi"
-    
-    IMP-FILE="C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexerimp.java"
-    INCLUDE-DIRECTORY=".;../lpg"  LALR=2  LEGACY  NOLIST  MARGIN=4  
-    MAX-CASES=1024  NAMES=OPTIMIZED  NONT-CHECK  OR_MARKER='|'  
-    OUT-DIRECTORY="C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/"
-    PACKAGE="org.eclipse.ocl.examples.xtext.essentialocl.parser"  NOPARENT-SAVE
-    PARSETABLE-INTERFACES="lpg.runtime.ParseTable"  PREFIX="Char_"  PRIORITY  
-    PROGRAMMING_LANGUAGE=JAVA  
-    PRS-FILE="C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexerprs.java"
-    NOQUIET  READ-REDUCE  REMAP-TERMINALS  NOSCOPES  NOSERIALIZE  
-    NOSHIFT-DEFAULT  SINGLE-PRODUCTIONS  NOSOFT-KEYWORDS  NOSTATES  SUFFIX=""  
-    SYM-FILE="C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexersym.java"
-    TAB-FILE="OCLLexer.t"  TABLE  TEMPLATE="../lpg/LexerTemplateF.gi"  
-    TRACE=CONFLICTS  NOVARIABLES  NOVERBOSE  NOVISITOR  VISITOR-TYPE="Visitor"
-    WARNINGS  NOXREF  
-
-C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCLLexer.gi:108:4:108:6:3229:3231: Warning: The macro "$Id" is undefined. No substitution made
-C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCLLexer.gi:108:73:108:73:3298:3298: Warning: The macro "$" is undefined. No substitution made
-C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/../lpg/LexerTemplateF.gi:82:20:82:33:2776:2789: Warning: The macro "$case" is undefined. No substitution made
-
-
-C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCLLexer.gi:220:9:220:13:5115:5119: Informative: Grammar is  LALR(2).
-
-Number of Terminals: 103
-Number of Nonterminals: 34
-Number of Productions: 269
-Number of Single Productions: 202
-Number of Items: 584
-Number of States: 43
-Number of look-ahead states: 1
-Number of Shift actions: 617
-Number of Goto actions: 73
-Number of Shift/Reduce actions: 729
-Number of Goto/Reduce actions: 60
-Number of Reduce actions: 377
-Number of Shift-Reduce conflicts: 0
-Number of Reduce-Reduce conflicts: 0
-
-Number of entries in base Action Table: 176
-Additional space required for compaction of Action Table: 6.8%
-
-Number of unique terminal states: 42
-Number of Shift actions saved by merging: 190
-Number of Conflict points saved by merging: 0
-Number of Reduce actions saved by merging: 1
-Number of Reduce saved by default: 369
-
-Number of entries in Terminal Action Table: 1206
-Additional space required for compaction of Terminal Table: 8.7%
-
-Actions in Compressed Tables:
-     Number of Shifts: 427
-     Number of Shift/Reduces: 729
-     Number of Look-Ahead Shifts: 1
-     Number of Gotos: 73
-     Number of Goto/Reduces: 60
-     Number of Reduces: 7
-     Number of Defaults: 27
-
-Parsing Tables storage:
-    Storage required for BASE_CHECK: 269 Bytes
-    Storage required for BASE_ACTION: 916 Bytes
-    Storage required for TERM_CHECK: 1316 Bytes
-    Storage required for TERM_ACTION: 2624 Bytes
+

+Options in effect for C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexer.gi:

+

+    ACTION-BLOCK=("C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexer.java","/.","./")

+

+    AST-DIRECTORY=""  AST-TYPE="Ast"  NOATTRIBUTES  NOAUTOMATIC-AST  NOBACKTRACK

+    BYTE  CONFLICTS  

+    DAT-DIRECTORY="C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/"

+    

+    DAT-FILE="C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexerdcl.data"

+    

+    DCL-FILE="C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexerdcl.java"

+    NODEBUG  

+    DEF-FILE="C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexerdef.java"

+    NOEDIT  NOERROR-MAPS  ESCAPE='$'  

+    EXPORT-TERMINALS=("C:\Development\OCL3.2.0\Workspace3.6\org.eclipse.ocl.examples.lpg.lexer\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\OCLParsersym.java","TK_","")

+    EXTENDS-PARSETABLE  FACTORY="new "  FILE-PREFIX="OCLLexer"  

+    FILTER="OCLKWLexer.gi"  NOFIRST  NOFOLLOW  NOGLR  NOGOTO-DEFAULT  

+    GRM-FILE="C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexer.gi"

+    

+    IMP-FILE="C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexerimp.java"

+    INCLUDE-DIRECTORY=".;../lpg"  LALR=2  LEGACY  NOLIST  MARGIN=4  

+    MAX-CASES=1024  NAMES=OPTIMIZED  NONT-CHECK  OR_MARKER='|'  

+    OUT-DIRECTORY="C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/"

+    PACKAGE="org.eclipse.ocl.examples.xtext.essentialocl.parser"  NOPARENT-SAVE

+    PARSETABLE-INTERFACES="lpg.runtime.ParseTable"  PREFIX="Char_"  PRIORITY  

+    PROGRAMMING_LANGUAGE=JAVA  

+    PRS-FILE="C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexerprs.java"

+    NOQUIET  READ-REDUCE  REMAP-TERMINALS  NOSCOPES  NOSERIALIZE  

+    NOSHIFT-DEFAULT  SINGLE-PRODUCTIONS  NOSOFT-KEYWORDS  NOSTATES  SUFFIX=""  

+    SYM-FILE="C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexersym.java"

+    TAB-FILE="OCLLexer.t"  TABLE  TEMPLATE="../lpg/LexerTemplateF.gi"  

+    TRACE=CONFLICTS  NOVARIABLES  NOVERBOSE  NOVISITOR  VISITOR-TYPE="Visitor"

+    WARNINGS  NOXREF  

+

+C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCLLexer.gi:106:4:106:6:3041:3043: Warning: The macro "$Id" is undefined. No substitution made

+C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCLLexer.gi:106:69:106:69:3106:3106: Warning: The macro "$" is undefined. No substitution made

+

+

+C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCLLexer.gi:218:9:218:13:4811:4815: Informative: Grammar is  LALR(2).

+

+Number of Terminals: 103

+Number of Nonterminals: 34

+Number of Productions: 269

+Number of Single Productions: 202

+Number of Items: 584

+Number of States: 43

+Number of look-ahead states: 1

+Number of Shift actions: 617

+Number of Goto actions: 73

+Number of Shift/Reduce actions: 729

+Number of Goto/Reduce actions: 60

+Number of Reduce actions: 377

+Number of Shift-Reduce conflicts: 0

+Number of Reduce-Reduce conflicts: 0

+

+Number of entries in base Action Table: 176

+Additional space required for compaction of Action Table: 6.8%

+

+Number of unique terminal states: 42

+Number of Shift actions saved by merging: 190

+Number of Conflict points saved by merging: 0

+Number of Reduce actions saved by merging: 1

+Number of Reduce saved by default: 369

+

+Number of entries in Terminal Action Table: 1206

+Additional space required for compaction of Terminal Table: 8.7%

+

+Actions in Compressed Tables:

+     Number of Shifts: 427

+     Number of Shift/Reduces: 729

+     Number of Look-Ahead Shifts: 1

+     Number of Gotos: 73

+     Number of Goto/Reduces: 60

+     Number of Reduces: 7

+     Number of Defaults: 27

+

+Parsing Tables storage:

+    Storage required for BASE_CHECK: 269 Bytes

+    Storage required for BASE_ACTION: 916 Bytes

+    Storage required for TERM_CHECK: 1316 Bytes

+    Storage required for TERM_ACTION: 2624 Bytes

diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexerprs.java b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexerprs.java
new file mode 100644
index 0000000..fe5dff3
--- /dev/null
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexerprs.java
@@ -0,0 +1,563 @@
+/**
+* Essential OCL Lexer
+* <copyright>
+*
+* Copyright (c) 2005, 2010 IBM Corporation and others.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   IBM - Initial API and implementation
+*   E.D.Willink - Lexer and Parser refactoring to support extensibility and flexible error handling
+*   Borland - Bug 242880
+*   E.D.Willink - Bug 292112, 295166
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - LPG v 2.0.17 adoption (242153)
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - Introducing new LPG templates (299396)
+*
+* </copyright>
+*
+* $Id: EssentialOCLLexer.gi,v 1.2 2011/01/24 21:31:47 ewillink Exp $
+*/
+/**
+* Complete OCL Lexer
+* <copyright>
+*
+* Copyright (c) 2005, 2009 IBM Corporation and others.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   IBM - Initial API and implementation
+*   E.D.Willink - Bug 292112, 292594
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - LPG v 2.0.17 adoption (242153)
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - Introducing new LPG templates (299396)
+*
+* </copyright>
+*/
+
+package org.eclipse.ocl.examples.xtext.essentialocl.parser;
+
+public class OCLLexerprs implements lpg.runtime.ParseTable, OCLLexersym {
+    public final static int ERROR_SYMBOL = 0;
+    public final int getErrorSymbol() { return ERROR_SYMBOL; }
+
+    public final static int SCOPE_UBOUND = 0;
+    public final int getScopeUbound() { return SCOPE_UBOUND; }
+
+    public final static int SCOPE_SIZE = 0;
+    public final int getScopeSize() { return SCOPE_SIZE; }
+
+    public final static int MAX_NAME_LENGTH = 0;
+    public final int getMaxNameLength() { return MAX_NAME_LENGTH; }
+
+    public final static int NUM_STATES = 43;
+    public final int getNumStates() { return NUM_STATES; }
+
+    public final static int NT_OFFSET = 103;
+    public final int getNtOffset() { return NT_OFFSET; }
+
+    public final static int LA_STATE_OFFSET = 726;
+    public final int getLaStateOffset() { return LA_STATE_OFFSET; }
+
+    public final static int MAX_LA = 2;
+    public final int getMaxLa() { return MAX_LA; }
+
+    public final static int NUM_RULES = 268;
+    public final int getNumRules() { return NUM_RULES; }
+
+    public final static int NUM_NONTERMINALS = 35;
+    public final int getNumNonterminals() { return NUM_NONTERMINALS; }
+
+    public final static int NUM_SYMBOLS = 138;
+    public final int getNumSymbols() { return NUM_SYMBOLS; }
+
+    public final static int SEGMENT_SIZE = 8192;
+    public final int getSegmentSize() { return SEGMENT_SIZE; }
+
+    public final static int START_STATE = 269;
+    public final int getStartState() { return START_STATE; }
+
+    public final static int IDENTIFIER_SYMBOL = 0;
+    public final int getIdentifier_SYMBOL() { return IDENTIFIER_SYMBOL; }
+
+    public final static int EOFT_SYMBOL = 99;
+    public final int getEoftSymbol() { return EOFT_SYMBOL; }
+
+    public final static int EOLT_SYMBOL = 104;
+    public final int getEoltSymbol() { return EOLT_SYMBOL; }
+
+    public final static int ACCEPT_ACTION = 457;
+    public final int getAcceptAction() { return ACCEPT_ACTION; }
+
+    public final static int ERROR_ACTION = 458;
+    public final int getErrorAction() { return ERROR_ACTION; }
+
+    public final static boolean BACKTRACK = false;
+    public final boolean getBacktrack() { return BACKTRACK; }
+
+    public final int getStartSymbol() { return lhs(0); }
+    public final boolean isValidForParser() { return OCLLexersym.isValidForParser; }
+
+
+    public interface IsNullable {
+        public final static byte isNullable[] = {0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,1,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,1,
+            0,0,0,0,0,0,0,0
+        };
+    };
+    public final static byte isNullable[] = IsNullable.isNullable;
+    public final boolean isNullable(int index) { return isNullable[index] != 0; }
+
+    public interface ProsthesesIndex {
+        public final static byte prosthesesIndex[] = {0,
+            19,22,23,24,27,32,14,29,34,5,
+            21,35,7,8,16,17,20,26,28,33,
+            2,3,4,6,9,10,11,12,13,15,
+            18,25,30,31,1
+        };
+    };
+    public final static byte prosthesesIndex[] = ProsthesesIndex.prosthesesIndex;
+    public final int prosthesesIndex(int index) { return prosthesesIndex[index]; }
+
+    public interface IsKeyword {
+        public final static byte isKeyword[] = {0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0
+        };
+    };
+    public final static byte isKeyword[] = IsKeyword.isKeyword;
+    public final boolean isKeyword(int index) { return isKeyword[index] != 0; }
+
+    public interface BaseCheck {
+        public final static byte baseCheck[] = {0,
+            1,3,4,3,3,3,1,2,2,1,
+            1,5,1,1,1,1,1,1,1,1,
+            1,1,2,2,2,1,1,1,1,2,
+            1,1,1,2,1,1,1,1,2,1,
+            1,2,2,3,2,2,0,1,2,2,
+            2,1,2,3,2,3,3,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,2,1,2,2,2,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,2,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,1,
+            1,1,1,1,1,1,1,1,1,2,
+            1,2,0,1,1,1,2,1
+        };
+    };
+    public final static byte baseCheck[] = BaseCheck.baseCheck;
+    public final int baseCheck(int index) { return baseCheck[index]; }
+    public final static byte rhs[] = baseCheck;
+    public final int rhs(int index) { return rhs[index]; };
+
+    public interface BaseAction {
+        public final static char baseAction[] = {
+            21,21,21,21,21,21,21,21,21,21,
+            21,21,21,21,21,21,21,21,21,21,
+            21,21,21,21,21,21,21,21,21,21,
+            21,21,21,21,21,21,21,13,21,14,
+            24,25,25,25,27,27,27,27,28,28,
+            26,26,7,7,30,15,15,15,11,11,
+            11,11,11,2,2,2,2,3,3,3,
+            3,3,3,3,3,3,3,3,3,3,
+            3,3,3,3,3,3,3,3,3,3,
+            3,3,3,4,4,4,4,4,4,4,
+            4,4,4,4,4,4,4,4,4,4,
+            4,4,4,4,4,4,4,4,4,1,
+            1,1,1,1,1,1,1,1,1,17,
+            17,29,29,22,22,22,22,32,32,32,
+            32,32,32,32,32,32,32,32,32,32,
+            32,32,32,32,32,32,32,32,32,32,
+            32,32,32,32,32,32,32,18,18,18,
+            18,18,18,18,18,18,18,18,18,18,
+            18,18,18,18,18,18,18,18,18,18,
+            18,18,18,18,18,18,5,5,5,5,
+            5,5,5,5,5,5,5,5,5,5,
+            5,5,5,5,5,5,5,5,5,5,
+            5,5,5,5,19,19,8,8,33,33,
+            33,33,6,16,16,16,16,31,31,31,
+            31,31,31,31,31,34,34,34,34,20,
+            20,20,20,20,9,9,9,9,9,23,
+            23,12,12,10,10,21,21,21,21,891,
+            419,417,417,417,1087,369,397,1098,1158,1198,
+            430,369,36,38,994,135,134,134,134,132,
+            277,284,1199,415,10,423,969,304,278,416,
+            503,432,432,432,432,432,432,1200,432,432,
+            346,990,359,503,432,432,432,432,432,432,
+            1202,432,432,350,383,359,503,432,432,432,
+            432,432,432,1194,432,432,366,1196,359,794,
+            432,432,432,432,432,432,100,432,432,400,
+            1101,359,600,376,376,376,376,376,376,697,
+            262,262,262,262,262,262,1204,262,262,1136,
+            53,376,376,1147,53,376,406,260,260,260,
+            260,260,260,1,46,46,46,46,309,232,
+            232,232,232,232,46,260,260,1073,53,46,
+            1205,46,103,44,44,44,44,1161,53,1172,
+            53,402,43,44,274,1201,1195,1210,44,1211,
+            44,232,232,205,51,51,51,51,8,9,
+            1212,42,1159,274,1103,373,1114,407,1125,409,
+            458,373,458,407,458,409,458,458,458,458,
+            458,458,458,458,51,51,458,458
+        };
+    };
+    public final static char baseAction[] = BaseAction.baseAction;
+    public final int baseAction(int index) { return baseAction[index]; }
+    public final static char lhs[] = baseAction;
+    public final int lhs(int index) { return lhs[index]; };
+
+    public interface TermCheck {
+        public final static byte termCheck[] = {0,
+            0,1,2,3,4,5,6,7,8,9,
+            10,11,12,13,14,15,16,17,18,19,
+            20,21,22,23,24,25,26,27,28,29,
+            30,31,32,33,34,35,36,37,38,39,
+            40,41,42,43,44,45,46,47,48,49,
+            50,51,52,53,54,55,56,57,58,59,
+            60,61,62,63,64,65,66,67,68,69,
+            70,71,72,73,74,75,76,77,78,79,
+            80,81,82,83,84,85,86,87,88,89,
+            90,91,92,93,94,95,96,97,98,0,
+            100,101,0,1,2,3,4,5,6,7,
+            8,9,10,11,12,13,14,15,16,17,
+            18,19,20,21,22,23,24,25,26,27,
+            28,29,30,31,32,33,34,35,36,37,
+            38,39,40,41,42,43,44,45,46,47,
+            48,49,50,51,52,53,54,55,56,57,
+            58,59,60,61,62,63,64,65,66,67,
+            68,69,70,71,72,73,74,75,76,77,
+            78,79,80,81,82,83,84,85,86,87,
+            88,89,90,91,92,93,94,95,96,97,
+            98,102,100,101,0,1,2,3,4,5,
+            6,7,8,9,10,11,12,13,14,15,
+            16,17,18,19,20,21,22,23,24,25,
+            26,27,28,29,30,31,32,33,34,35,
+            36,37,38,39,40,41,42,43,44,45,
+            46,47,48,49,50,51,52,53,54,55,
+            56,57,58,59,60,61,62,63,64,65,
+            66,67,68,69,70,71,72,73,74,75,
+            76,77,78,79,80,81,82,83,84,85,
+            86,87,88,89,90,91,92,93,94,95,
+            96,97,98,0,0,0,0,103,0,1,
+            2,3,4,5,6,7,8,9,10,11,
+            12,13,14,15,16,17,18,19,20,21,
+            22,23,24,25,26,27,28,29,30,31,
+            32,33,34,35,36,37,38,39,40,41,
+            42,43,44,45,46,47,48,49,50,51,
+            52,53,54,55,56,57,58,59,60,61,
+            62,63,64,65,66,67,68,69,70,71,
+            72,73,74,75,76,77,78,79,80,81,
+            82,83,84,85,86,87,88,89,90,91,
+            92,93,94,95,96,0,1,2,3,4,
+            5,6,7,8,9,10,11,12,13,14,
+            15,16,17,18,19,20,21,22,23,24,
+            25,26,27,28,29,30,31,32,33,34,
+            35,36,37,38,39,40,41,42,43,44,
+            45,46,47,48,49,50,51,52,53,54,
+            55,56,57,58,59,60,61,62,63,64,
+            65,66,67,68,69,70,71,72,73,74,
+            75,76,77,78,79,80,81,82,83,84,
+            85,86,87,88,89,90,91,92,93,94,
+            95,96,0,1,2,3,4,5,6,7,
+            8,9,10,11,12,13,14,15,16,17,
+            18,19,20,21,22,23,24,25,26,27,
+            28,29,30,31,32,33,34,35,36,37,
+            38,39,40,41,42,43,44,45,46,47,
+            48,49,50,51,52,53,54,55,56,57,
+            58,59,60,61,62,63,64,65,66,67,
+            68,69,0,71,72,73,74,75,76,77,
+            78,79,80,81,82,83,84,85,86,87,
+            88,89,90,91,92,93,94,95,96,0,
+            1,2,3,4,5,6,7,8,9,10,
+            11,12,13,14,15,16,17,18,19,20,
+            21,22,23,24,25,26,27,28,29,30,
+            31,32,33,34,35,36,37,38,39,40,
+            41,42,43,44,45,46,47,48,49,50,
+            51,52,53,54,55,56,57,58,59,60,
+            61,62,63,64,65,66,67,68,69,70,
+            71,72,73,74,75,76,77,78,79,80,
+            81,82,83,84,85,86,87,88,89,0,
+            91,92,93,94,95,96,0,1,2,3,
+            4,5,6,7,8,9,10,11,12,13,
+            14,15,16,17,18,19,20,21,22,23,
+            24,25,26,27,28,29,30,31,32,33,
+            34,35,36,37,38,39,40,41,42,43,
+            44,45,46,47,48,49,50,51,52,53,
+            54,55,56,57,58,59,60,61,62,63,
+            64,65,66,67,68,69,0,71,72,73,
+            74,75,76,77,78,79,80,81,82,83,
+            84,85,86,87,88,89,90,91,92,93,
+            94,95,96,0,1,2,3,4,5,6,
+            7,8,9,10,11,12,13,14,15,16,
+            17,18,19,20,21,22,23,24,25,26,
+            27,28,29,30,31,32,33,34,35,36,
+            37,38,39,40,41,42,43,44,45,46,
+            47,48,49,50,51,52,53,54,55,56,
+            57,58,59,60,61,62,63,64,65,66,
+            67,68,69,0,71,72,73,74,75,76,
+            77,78,79,80,81,82,83,84,85,86,
+            87,88,89,90,91,92,93,94,95,96,
+            0,1,2,3,4,5,6,7,8,9,
+            10,11,12,13,14,15,16,17,18,19,
+            20,21,22,23,24,25,26,27,28,29,
+            30,31,32,33,34,35,36,37,38,39,
+            40,41,42,43,44,45,46,47,48,49,
+            50,51,52,53,54,55,56,57,58,59,
+            60,61,62,63,64,65,66,67,68,69,
+            70,71,72,73,74,75,76,77,0,79,
+            80,81,82,83,84,85,86,87,88,89,
+            90,0,14,0,16,0,0,97,98,0,
+            100,101,102,0,1,2,3,4,5,6,
+            7,8,9,10,11,12,0,0,0,0,
+            17,18,19,20,21,22,23,24,25,26,
+            27,28,29,30,31,32,33,34,35,36,
+            37,38,39,40,41,42,43,44,45,46,
+            47,48,49,50,51,52,53,54,55,56,
+            57,58,59,60,61,62,63,64,65,66,
+            67,68,0,74,0,0,0,0,0,0,
+            0,78,0,1,2,3,4,5,6,7,
+            8,9,10,11,12,13,0,1,2,3,
+            4,5,6,7,8,9,10,0,0,0,
+            0,15,0,1,2,3,4,5,6,7,
+            8,9,10,0,1,2,3,4,5,6,
+            7,8,9,10,0,1,2,3,4,5,
+            6,7,8,9,10,0,1,2,3,4,
+            5,6,7,8,9,10,0,1,2,3,
+            4,5,6,7,8,9,10,0,0,73,
+            0,1,2,3,4,5,6,7,8,9,
+            10,0,1,2,3,4,5,6,7,8,
+            9,10,0,1,2,3,4,5,6,7,
+            8,9,10,0,0,0,99,0,0,0,
+            0,0,102,0,0,11,12,14,15,0,
+            0,0,0,13,13,16,0,0,0,0,
+            0,0,0,0,0,0,69,0,70,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,97,98,0,100,101,0,
+            102,0,0,0,0,70,0,0,71,0,
+            72,0,0,70,70,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,0,0,
+            0,0,0,0,99,0,0,0,0,0,
+            0,0,0,0,0,0,0,0,99,99,
+            99,0,0,0,0
+        };
+    };
+    public final static byte termCheck[] = TermCheck.termCheck;
+    public final int termCheck(int index) { return termCheck[index]; }
+
+    public interface TermAction {
+        public final static char termAction[] = {0,
+            458,504,504,504,504,504,504,504,504,504,
+            504,504,504,504,504,504,504,504,504,504,
+            504,504,504,504,504,504,504,504,504,504,
+            504,504,504,504,504,504,504,504,504,504,
+            504,504,504,504,504,504,504,504,504,504,
+            504,504,504,504,504,504,504,504,504,504,
+            504,504,504,504,504,504,504,504,504,504,
+            504,504,504,504,402,504,504,504,504,504,
+            504,504,504,504,504,504,504,503,504,504,
+            504,504,504,504,504,504,504,504,504,458,
+            504,504,458,502,502,502,502,502,502,502,
+            502,502,502,502,502,502,502,502,502,502,
+            502,502,502,502,502,502,502,502,502,502,
+            502,502,502,502,502,502,502,502,502,502,
+            502,502,502,502,502,502,502,502,502,502,
+            502,502,502,502,502,502,502,502,502,502,
+            502,502,502,502,502,502,502,502,502,502,
+            502,502,502,502,502,502,507,502,502,502,
+            502,502,502,502,502,502,502,502,502,470,
+            502,502,502,502,502,502,502,502,502,502,
+            502,464,502,502,11,509,509,509,509,509,
+            509,509,509,509,509,509,509,509,509,509,
+            509,509,509,509,509,509,509,509,509,509,
+            509,509,509,509,509,509,509,509,509,509,
+            509,509,509,509,509,509,509,509,509,509,
+            509,509,509,509,509,509,509,509,509,509,
+            509,509,509,509,509,509,509,509,509,509,
+            509,509,509,509,509,509,509,509,509,509,
+            509,509,509,509,509,509,509,509,509,509,
+            509,509,509,509,509,509,509,509,509,509,
+            509,509,509,47,458,458,458,509,458,690,
+            690,690,690,690,690,690,690,690,690,690,
+            690,690,690,690,690,690,690,690,690,690,
+            690,690,690,690,690,690,690,690,690,690,
+            690,690,690,690,690,690,690,690,690,690,
+            690,690,690,690,690,690,690,690,690,690,
+            690,690,690,690,690,690,690,690,690,690,
+            690,690,690,690,690,690,690,690,690,690,
+            690,690,690,690,690,690,690,690,690,690,
+            690,690,690,690,690,690,690,690,690,690,
+            690,690,690,690,690,458,718,718,718,718,
+            718,718,718,718,718,718,718,718,718,718,
+            718,718,718,718,718,718,718,718,718,718,
+            718,718,718,718,718,718,718,718,718,718,
+            718,718,718,718,718,718,718,718,718,718,
+            718,718,718,718,718,718,718,718,718,718,
+            718,718,718,718,718,718,718,718,718,718,
+            718,718,718,718,718,718,718,718,718,718,
+            718,718,718,718,718,718,718,718,718,718,
+            718,718,718,718,718,460,718,718,718,718,
+            718,388,263,432,432,432,432,432,432,432,
+            432,432,432,432,432,432,432,432,432,432,
+            432,432,432,432,432,432,432,432,432,432,
+            432,432,432,432,432,432,432,432,432,432,
+            432,432,432,432,432,432,432,432,432,432,
+            432,432,432,432,432,432,432,432,432,432,
+            432,432,432,432,432,432,432,432,432,432,
+            432,432,458,432,432,432,432,432,432,432,
+            432,432,432,432,432,432,432,432,432,432,
+            432,432,432,432,432,432,432,432,388,458,
+            376,376,376,376,376,376,376,376,376,376,
+            376,376,376,376,376,376,376,376,376,376,
+            376,376,376,376,376,376,376,376,376,376,
+            376,376,376,376,376,376,376,376,376,376,
+            376,376,376,376,376,376,376,376,376,376,
+            376,376,376,376,376,376,376,376,376,376,
+            376,376,376,376,376,376,376,376,376,376,
+            376,376,376,376,376,376,376,376,376,376,
+            376,376,376,376,376,376,376,376,376,458,
+            376,376,376,376,376,388,264,720,720,720,
+            720,720,720,720,720,720,720,720,720,720,
+            720,720,720,720,720,720,720,720,720,720,
+            720,720,720,720,720,720,720,720,720,720,
+            720,720,720,720,720,720,720,720,720,720,
+            720,720,720,720,720,720,720,720,720,720,
+            720,720,720,720,720,720,720,720,720,720,
+            720,720,720,720,720,720,458,720,720,720,
+            720,720,720,720,720,720,720,720,720,720,
+            720,720,720,720,720,720,720,720,720,720,
+            720,720,388,263,432,432,432,432,432,432,
+            432,432,432,432,432,432,432,432,432,432,
+            432,432,432,432,432,432,432,432,432,432,
+            432,432,432,432,432,432,432,432,432,432,
+            432,432,432,432,432,432,432,432,432,432,
+            432,432,432,432,432,432,432,432,432,432,
+            432,432,432,432,432,432,432,432,432,432,
+            432,432,432,458,432,432,432,432,432,432,
+            432,432,432,432,432,432,432,432,432,432,
+            432,432,432,432,432,432,432,432,432,388,
+            458,419,419,419,419,419,419,419,419,419,
+            419,417,417,320,307,333,480,417,417,417,
+            417,417,417,417,417,417,417,417,417,417,
+            417,417,417,417,417,417,417,417,417,417,
+            417,417,337,417,417,417,417,417,417,417,
+            417,417,417,417,417,417,417,417,417,417,
+            417,417,417,417,417,417,417,417,417,430,
+            326,279,292,472,474,489,723,300,21,493,
+            486,487,484,485,726,490,296,311,476,477,
+            352,458,483,458,482,458,458,430,430,17,
+            430,430,313,1,593,593,593,593,593,593,
+            593,593,593,593,592,592,458,458,458,458,
+            592,592,592,592,592,592,592,592,592,592,
+            592,592,592,592,592,592,592,592,592,592,
+            592,592,592,592,592,592,592,592,592,592,
+            592,592,592,592,592,592,592,592,592,592,
+            592,592,592,592,592,592,592,592,592,592,
+            592,592,458,297,458,458,458,458,458,458,
+            458,594,40,511,511,511,511,511,511,511,
+            511,511,511,274,274,1909,458,369,369,369,
+            369,369,369,369,369,369,369,458,458,458,
+            458,438,458,373,373,373,373,373,373,373,
+            373,373,373,458,407,407,407,407,407,407,
+            407,407,407,407,458,409,409,409,409,409,
+            409,409,409,409,409,55,511,511,511,511,
+            511,511,511,511,511,511,54,511,511,511,
+            511,511,511,511,511,511,511,13,261,436,
+            57,511,511,511,511,511,511,511,511,511,
+            511,56,511,511,511,511,511,511,511,511,
+            511,511,40,434,434,434,434,434,434,434,
+            434,434,434,15,10,133,457,266,33,20,
+            7,37,463,458,458,274,274,488,508,133,
+            52,131,458,320,497,481,458,458,458,458,
+            458,458,458,458,458,458,590,458,264,458,
+            458,458,458,458,458,458,458,458,458,458,
+            458,458,458,458,458,458,458,458,458,458,
+            458,458,458,458,590,590,458,590,590,458,
+            264,458,458,458,458,339,458,458,725,458,
+            492,458,458,462,461,458,458,458,458,458,
+            458,458,458,458,458,458,458,458,458,458,
+            458,458,458,458,1,458,458,458,458,458,
+            458,458,458,458,458,458,458,458,1,40,
+            13
+        };
+    };
+    public final static char termAction[] = TermAction.termAction;
+    public final int termAction(int index) { return termAction[index]; }
+    public final int asb(int index) { return 0; }
+    public final int asr(int index) { return 0; }
+    public final int nasb(int index) { return 0; }
+    public final int nasr(int index) { return 0; }
+    public final int terminalIndex(int index) { return 0; }
+    public final int nonterminalIndex(int index) { return 0; }
+    public final int scopePrefix(int index) { return 0;}
+    public final int scopeSuffix(int index) { return 0;}
+    public final int scopeLhs(int index) { return 0;}
+    public final int scopeLa(int index) { return 0;}
+    public final int scopeStateSet(int index) { return 0;}
+    public final int scopeRhs(int index) { return 0;}
+    public final int scopeState(int index) { return 0;}
+    public final int inSymb(int index) { return 0;}
+    public final String name(int index) { return null; }
+    public final int originalState(int state) { return 0; }
+    public final int asi(int state) { return 0; }
+    public final int nasi(int state) { return 0; }
+    public final int inSymbol(int state) { return 0; }
+
+    /**
+     * assert(! goto_default);
+     */
+    public final int ntAction(int state, int sym) {
+        return baseAction[state + sym];
+    }
+
+    /**
+     * assert(! shift_default);
+     */
+    public final int tAction(int state, int sym) {
+        int i = baseAction[state],
+            k = i + sym;
+        return termAction[termCheck[k] == sym ? k : i];
+    }
+    public final int lookAhead(int la_state, int sym) {
+        int k = la_state + sym;
+        return termAction[termCheck[k] == sym ? k : la_state];
+    }
+}
diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexersym.java b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexersym.java
new file mode 100644
index 0000000..c16c9a2
--- /dev/null
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLLexersym.java
@@ -0,0 +1,259 @@
+/**
+* Essential OCL Lexer
+* <copyright>
+*
+* Copyright (c) 2005, 2010 IBM Corporation and others.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   IBM - Initial API and implementation
+*   E.D.Willink - Lexer and Parser refactoring to support extensibility and flexible error handling
+*   Borland - Bug 242880
+*   E.D.Willink - Bug 292112, 295166
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - LPG v 2.0.17 adoption (242153)
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - Introducing new LPG templates (299396)
+*
+* </copyright>
+*
+* $Id: EssentialOCLLexer.gi,v 1.2 2011/01/24 21:31:47 ewillink Exp $
+*/
+/**
+* Complete OCL Lexer
+* <copyright>
+*
+* Copyright (c) 2005, 2009 IBM Corporation and others.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   IBM - Initial API and implementation
+*   E.D.Willink - Bug 292112, 292594
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - LPG v 2.0.17 adoption (242153)
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias) - Introducing new LPG templates (299396)
+*
+* </copyright>
+*/
+
+package org.eclipse.ocl.examples.xtext.essentialocl.parser;
+
+public interface OCLLexersym {
+    public final static int
+      Char_CtlCharNotWS = 103,
+      Char_LF = 100,
+      Char_CR = 101,
+      Char_HT = 97,
+      Char_FF = 98,
+      Char_a = 17,
+      Char_b = 18,
+      Char_c = 19,
+      Char_d = 20,
+      Char_e = 11,
+      Char_f = 21,
+      Char_g = 22,
+      Char_h = 23,
+      Char_i = 24,
+      Char_j = 25,
+      Char_k = 26,
+      Char_l = 27,
+      Char_m = 28,
+      Char_n = 29,
+      Char_o = 30,
+      Char_p = 31,
+      Char_q = 32,
+      Char_r = 33,
+      Char_s = 34,
+      Char_t = 35,
+      Char_u = 36,
+      Char_v = 37,
+      Char_w = 38,
+      Char_x = 39,
+      Char_y = 40,
+      Char_z = 41,
+      Char__ = 42,
+      Char_A = 43,
+      Char_B = 44,
+      Char_C = 45,
+      Char_D = 46,
+      Char_E = 12,
+      Char_F = 47,
+      Char_G = 48,
+      Char_H = 49,
+      Char_I = 50,
+      Char_J = 51,
+      Char_K = 52,
+      Char_L = 53,
+      Char_M = 54,
+      Char_N = 55,
+      Char_O = 56,
+      Char_P = 57,
+      Char_Q = 58,
+      Char_R = 59,
+      Char_S = 60,
+      Char_T = 61,
+      Char_U = 62,
+      Char_V = 63,
+      Char_W = 64,
+      Char_X = 65,
+      Char_Y = 66,
+      Char_Z = 67,
+      Char_0 = 1,
+      Char_1 = 2,
+      Char_2 = 3,
+      Char_3 = 4,
+      Char_4 = 5,
+      Char_5 = 6,
+      Char_6 = 7,
+      Char_7 = 8,
+      Char_8 = 9,
+      Char_9 = 10,
+      Char_AfterASCIINotAcute = 68,
+      Char_Space = 69,
+      Char_DoubleQuote = 90,
+      Char_SingleQuote = 70,
+      Char_Percent = 91,
+      Char_VerticalBar = 75,
+      Char_Exclamation = 92,
+      Char_AtSign = 76,
+      Char_BackQuote = 77,
+      Char_Acute = 102,
+      Char_Tilde = 93,
+      Char_Sharp = 94,
+      Char_DollarSign = 78,
+      Char_Ampersand = 95,
+      Char_Caret = 71,
+      Char_Colon = 72,
+      Char_SemiColon = 79,
+      Char_BackSlash = 96,
+      Char_LeftBrace = 80,
+      Char_RightBrace = 81,
+      Char_LeftBracket = 82,
+      Char_RightBracket = 83,
+      Char_QuestionMark = 84,
+      Char_Comma = 85,
+      Char_Dot = 13,
+      Char_LessThan = 86,
+      Char_GreaterThan = 14,
+      Char_Plus = 73,
+      Char_Minus = 15,
+      Char_Slash = 87,
+      Char_Star = 74,
+      Char_LeftParen = 88,
+      Char_RightParen = 89,
+      Char_Equal = 16,
+      Char_EOF = 99;
+
+    public final static String orderedTerminalSymbols[] = {
+                 "",
+                 "0",
+                 "1",
+                 "2",
+                 "3",
+                 "4",
+                 "5",
+                 "6",
+                 "7",
+                 "8",
+                 "9",
+                 "e",
+                 "E",
+                 "Dot",
+                 "GreaterThan",
+                 "Minus",
+                 "Equal",
+                 "a",
+                 "b",
+                 "c",
+                 "d",
+                 "f",
+                 "g",
+                 "h",
+                 "i",
+                 "j",
+                 "k",
+                 "l",
+                 "m",
+                 "n",
+                 "o",
+                 "p",
+                 "q",
+                 "r",
+                 "s",
+                 "t",
+                 "u",
+                 "v",
+                 "w",
+                 "x",
+                 "y",
+                 "z",
+                 "_",
+                 "A",
+                 "B",
+                 "C",
+                 "D",
+                 "F",
+                 "G",
+                 "H",
+                 "I",
+                 "J",
+                 "K",
+                 "L",
+                 "M",
+                 "N",
+                 "O",
+                 "P",
+                 "Q",
+                 "R",
+                 "S",
+                 "T",
+                 "U",
+                 "V",
+                 "W",
+                 "X",
+                 "Y",
+                 "Z",
+                 "AfterASCIINotAcute",
+                 "Space",
+                 "SingleQuote",
+                 "Caret",
+                 "Colon",
+                 "Plus",
+                 "Star",
+                 "VerticalBar",
+                 "AtSign",
+                 "BackQuote",
+                 "DollarSign",
+                 "SemiColon",
+                 "LeftBrace",
+                 "RightBrace",
+                 "LeftBracket",
+                 "RightBracket",
+                 "QuestionMark",
+                 "Comma",
+                 "LessThan",
+                 "Slash",
+                 "LeftParen",
+                 "RightParen",
+                 "DoubleQuote",
+                 "Percent",
+                 "Exclamation",
+                 "Tilde",
+                 "Sharp",
+                 "Ampersand",
+                 "BackSlash",
+                 "HT",
+                 "FF",
+                 "EOF",
+                 "LF",
+                 "CR",
+                 "Acute",
+                 "CtlCharNotWS"
+             };
+
+    public final static int numTokenKinds = orderedTerminalSymbols.length;
+    public final static boolean isValidForParser = true;
+}
diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLParser.g b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLParser.g
index 4741bcc..89fba10 100644
--- a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLParser.g
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLParser.g
@@ -11,8 +11,6 @@
 -- *   See (or edit) Notice Declaration below
 -- *
 -- * </copyright>
--- *
--- * $Id: OCLParser.g,v 1.2 2011/01/24 21:31:48 ewillink Exp $
 -- */
 --
 -- The Complete OCL Parser
diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLParser.l b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLParser.l
index c0bba91..6a40b95 100644
--- a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLParser.l
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLParser.l
@@ -1,107 +1,107 @@
-
-Options in effect for C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLParser.g:
-
-    ACTION-BLOCK=("C:\Development\HartLibrary\Workspace3.5.1\org.eclipse.ocl.examples.xtext.essentialocl\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\OCLParser.java","/.","./")
-
-    AST-DIRECTORY=""  AST-TYPE="CSTNode"  NOATTRIBUTES  NOAUTOMATIC-AST  
-    NOBACKTRACK  BYTE  CONFLICTS  
-    DAT-DIRECTORY="C:\Development\HartLibrary\Workspace3.5.1\org.eclipse.ocl.examples.xtext.essentialocl\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\"
-    
-    DAT-FILE="C:\Development\HartLibrary\Workspace3.5.1\org.eclipse.ocl.examples.xtext.essentialocl\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\OCLParserdcl.data"
-    
-    DCL-FILE="C:\Development\HartLibrary\Workspace3.5.1\org.eclipse.ocl.examples.xtext.essentialocl\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\OCLParserdcl.java"
-    NODEBUG  
-    DEF-FILE="C:\Development\HartLibrary\Workspace3.5.1\org.eclipse.ocl.examples.xtext.essentialocl\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\OCLParserdef.java"
-    NOEDIT  ERROR-MAPS  ESCAPE='$'  
-    EXPORT-TERMINALS=("C:\Development\HartLibrary\Workspace3.5.1\org.eclipse.ocl.examples.xtext.essentialocl\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\OCLParserexp.java","","")
-    EXTENDS-PARSETABLE  FACTORY="new "  FILE-PREFIX="OCLParser"  NOFIRST  
-    NOFOLLOW  NOGLR  NOGOTO-DEFAULT  
-    GRM-FILE="C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLParser.g"
-    
-    IMP-FILE="C:\Development\HartLibrary\Workspace3.5.1\org.eclipse.ocl.examples.xtext.essentialocl\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\OCLParserimp.java"
-    IMPORT-TERMINALS="OCLLexer.gi"  INCLUDE-DIRECTORY=".;../lpg"  LALR=1  LEGACY
-    NOLIST  MARGIN=4  MAX-CASES=1024  NAMES=OPTIMIZED  NONT-CHECK  OR_MARKER='|'
-    OUT-DIRECTORY="C:\Development\HartLibrary\Workspace3.5.1\org.eclipse.ocl.examples.xtext.essentialocl\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\"
-    PACKAGE="org.eclipse.ocl.examples.xtext.essentialocl.parser"  NOPARENT-SAVE
-    PARSETABLE-INTERFACES="lpg.runtime.ParseTable"  PREFIX="TK_"  PRIORITY  
-    PROGRAMMING_LANGUAGE=JAVA  
-    PRS-FILE="C:\Development\HartLibrary\Workspace3.5.1\org.eclipse.ocl.examples.xtext.essentialocl\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\OCLParserprs.java"
-    NOQUIET  READ-REDUCE  REMAP-TERMINALS  SCOPES  NOSERIALIZE  NOSHIFT-DEFAULT
-    NOSINGLE-PRODUCTIONS  NOSOFT-KEYWORDS  NOSTATES  SUFFIX=""  
-    SYM-FILE="C:\Development\HartLibrary\Workspace3.5.1\org.eclipse.ocl.examples.xtext.essentialocl\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\OCLParsersym.java"
-    TAB-FILE="OCLParser.t"  TABLE  TEMPLATE="dtParserTemplateF.gi"  
-    TRACE=CONFLICTS  NOVARIABLES  NOVERBOSE  NOVISITOR  VISITOR-TYPE="Visitor"
-    WARNINGS  NOXREF  
-
-C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCL.gi:92:4:92:6:2781:2783: Warning: The macro "$Id" is undefined. No substitution made
-C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCL.gi:92:68:92:68:2845:2845: Warning: The macro "$" is undefined. No substitution made
-C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCLLexer.gi:161:9:161:27:3948:3966: Informative: The terminal SINGLE_LINE_COMMENT is useless.
-C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCLLexer.gi:162:9:162:26:3970:3987: Informative: The terminal MULTI_LINE_COMMENT is useless.
-C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLParser.g:115:9:115:23:3198:3212: Warning: The nonterminal reservedKeyword is useless.
-C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCL.gi:292:5:292:21:8655:8671: Warning: The nonterminal reservedKeywordCS is useless.
-
-
-C:/Development/HartLibrary/Workspace3.5.1/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLParser.g:32:9:32:12:883:886: Informative: Grammar is  LALR(1).
-
-Number of Terminals: 79
-Number of Nonterminals: 80
-Number of Productions: 219
-Number of Items: 622
-Number of Scopes: 27
-Number of States: 158
-Number of Shift actions: 271
-Number of Goto actions: 467
-Number of Shift/Reduce actions: 1391
-Number of Goto/Reduce actions: 977
-Number of Reduce actions: 521
-Number of Shift-Reduce conflicts: 0
-Number of Reduce-Reduce conflicts: 0
-Number of Keyword/Identifier Shift conflicts: 0
-Number of Keyword/Identifier Shift-Reduce conflicts: 0
-Number of Keyword/Identifier Reduce-Reduce conflicts: 0
-
-Number of entries in base Action Table: 1602
-Additional space required for compaction of Action Table: 7.3%
-
-Number of unique terminal states: 98
-Number of Shift actions saved by merging: 1249
-Number of Conflict points saved by merging: 0
-Number of Reduce actions saved by merging: 6
-Number of Reduce saved by default: 511
-
-Number of entries in Terminal Action Table: 515
-Additional space required for compaction of Terminal Table: 5.0%
-
-Actions in Compressed Tables:
-     Number of Shifts: 140
-     Number of Shift/Reduces: 273
-     Number of Gotos: 467
-     Number of Goto/Reduces: 977
-     Number of Reduces: 4
-     Number of Defaults: 41
-
-Parsing Tables storage:
-    Storage required for BASE_CHECK: 3876 Bytes
-    Storage required for BASE_ACTION: 3878 Bytes
-    Storage required for TERM_CHECK: 600 Bytes
-    Storage required for TERM_ACTION: 1084 Bytes
-
-Error maps storage:
-    Storage required for ACTION_SYMBOLS_BASE map: 318 Bytes
-    Storage required for ACTION_SYMBOLS_RANGE map: 353 Bytes
-    Storage required for NACTION_SYMBOLS_BASE map: 159 Bytes
-    Storage required for NACTION_SYMBOLS_RANGE map: 112 Bytes
-    Storage required for TERMINAL_INDEX map: 80 Bytes
-    Storage required for NON_TERMINAL_INDEX map: 82 Bytes
-
-    Storage required for SCOPE_PREFIX map: 54 Bytes
-    Storage required for SCOPE_SUFFIX map: 54 Bytes
-    Storage required for SCOPE_LHS_SYMBOL map: 54 Bytes
-    Storage required for SCOPE_LOOK_AHEAD map: 27 Bytes
-    Storage required for SCOPE_STATE_SET map: 27 Bytes
-    Storage required for SCOPE_RIGHT_SIDE map: 300 Bytes
-    Storage required for SCOPE_STATE map: 148 Bytes
-    Storage required for IN_SYMB map: 318 Bytes
-
-    Number of names: 127
-    Number of characters in name: 1122
+

+Options in effect for C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLParser.g:

+

+    ACTION-BLOCK=("C:\Development\OCL3.2.0\Workspace3.6\org.eclipse.ocl.examples.lpg.lexer\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\OCLParser.java","/.","./")

+

+    AST-DIRECTORY=""  AST-TYPE="CSTNode"  NOATTRIBUTES  NOAUTOMATIC-AST  

+    NOBACKTRACK  BYTE  CONFLICTS  

+    DAT-DIRECTORY="C:\Development\OCL3.2.0\Workspace3.6\org.eclipse.ocl.examples.lpg.lexer\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\"

+    

+    DAT-FILE="C:\Development\OCL3.2.0\Workspace3.6\org.eclipse.ocl.examples.lpg.lexer\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\OCLParserdcl.data"

+    

+    DCL-FILE="C:\Development\OCL3.2.0\Workspace3.6\org.eclipse.ocl.examples.lpg.lexer\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\OCLParserdcl.java"

+    NODEBUG  

+    DEF-FILE="C:\Development\OCL3.2.0\Workspace3.6\org.eclipse.ocl.examples.lpg.lexer\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\OCLParserdef.java"

+    NOEDIT  ERROR-MAPS  ESCAPE='$'  

+    EXPORT-TERMINALS=("C:\Development\OCL3.2.0\Workspace3.6\org.eclipse.ocl.examples.lpg.lexer\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\OCLParserexp.java","","")

+    EXTENDS-PARSETABLE  FACTORY="new "  FILE-PREFIX="OCLParser"  NOFIRST  

+    NOFOLLOW  NOGLR  NOGOTO-DEFAULT  

+    GRM-FILE="C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLParser.g"

+    

+    IMP-FILE="C:\Development\OCL3.2.0\Workspace3.6\org.eclipse.ocl.examples.lpg.lexer\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\OCLParserimp.java"

+    IMPORT-TERMINALS="OCLLexer.gi"  INCLUDE-DIRECTORY=".;../lpg"  LALR=1  LEGACY

+    NOLIST  MARGIN=4  MAX-CASES=1024  NAMES=OPTIMIZED  NONT-CHECK  OR_MARKER='|'

+    OUT-DIRECTORY="C:\Development\OCL3.2.0\Workspace3.6\org.eclipse.ocl.examples.lpg.lexer\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\"

+    PACKAGE="org.eclipse.ocl.examples.xtext.essentialocl.parser"  NOPARENT-SAVE

+    PARSETABLE-INTERFACES="lpg.runtime.ParseTable"  PREFIX="TK_"  PRIORITY  

+    PROGRAMMING_LANGUAGE=JAVA  

+    PRS-FILE="C:\Development\OCL3.2.0\Workspace3.6\org.eclipse.ocl.examples.lpg.lexer\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\OCLParserprs.java"

+    NOQUIET  READ-REDUCE  REMAP-TERMINALS  SCOPES  NOSERIALIZE  NOSHIFT-DEFAULT

+    NOSINGLE-PRODUCTIONS  NOSOFT-KEYWORDS  NOSTATES  SUFFIX=""  

+    SYM-FILE="C:\Development\OCL3.2.0\Workspace3.6\org.eclipse.ocl.examples.lpg.lexer\src\org\eclipse\ocl\examples\xtext\essentialocl\parser\OCLParsersym.java"

+    TAB-FILE="OCLParser.t"  TABLE  TEMPLATE="dtParserTemplateF.gi"  

+    TRACE=CONFLICTS  NOVARIABLES  NOVERBOSE  NOVISITOR  VISITOR-TYPE="Visitor"

+    WARNINGS  NOXREF  

+

+C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCL.gi:92:4:92:6:2686:2688: Warning: The macro "$Id" is undefined. No substitution made

+C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCL.gi:92:64:92:64:2746:2746: Warning: The macro "$" is undefined. No substitution made

+C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCLLexer.gi:159:9:159:27:3703:3721: Informative: The terminal SINGLE_LINE_COMMENT is useless.

+C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCLLexer.gi:160:9:160:26:3724:3741: Informative: The terminal MULTI_LINE_COMMENT is useless.

+C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLParser.g:113:9:113:23:3012:3026: Warning: The nonterminal reservedKeyword is useless.

+C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/EssentialOCL.gi:292:5:292:21:8356:8372: Warning: The nonterminal reservedKeywordCS is useless.

+

+

+C:/Development/OCL3.2.0/Workspace3.6/org.eclipse.ocl.examples.lpg.lexer/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLParser.g:30:9:30:12:780:783: Informative: Grammar is  LALR(1).

+

+Number of Terminals: 79

+Number of Nonterminals: 80

+Number of Productions: 219

+Number of Items: 622

+Number of Scopes: 27

+Number of States: 158

+Number of Shift actions: 271

+Number of Goto actions: 467

+Number of Shift/Reduce actions: 1391

+Number of Goto/Reduce actions: 977

+Number of Reduce actions: 521

+Number of Shift-Reduce conflicts: 0

+Number of Reduce-Reduce conflicts: 0

+Number of Keyword/Identifier Shift conflicts: 0

+Number of Keyword/Identifier Shift-Reduce conflicts: 0

+Number of Keyword/Identifier Reduce-Reduce conflicts: 0

+

+Number of entries in base Action Table: 1602

+Additional space required for compaction of Action Table: 7.3%

+

+Number of unique terminal states: 98

+Number of Shift actions saved by merging: 1249

+Number of Conflict points saved by merging: 0

+Number of Reduce actions saved by merging: 6

+Number of Reduce saved by default: 511

+

+Number of entries in Terminal Action Table: 515

+Additional space required for compaction of Terminal Table: 5.0%

+

+Actions in Compressed Tables:

+     Number of Shifts: 140

+     Number of Shift/Reduces: 273

+     Number of Gotos: 467

+     Number of Goto/Reduces: 977

+     Number of Reduces: 4

+     Number of Defaults: 41

+

+Parsing Tables storage:

+    Storage required for BASE_CHECK: 3876 Bytes

+    Storage required for BASE_ACTION: 3878 Bytes

+    Storage required for TERM_CHECK: 600 Bytes

+    Storage required for TERM_ACTION: 1084 Bytes

+

+Error maps storage:

+    Storage required for ACTION_SYMBOLS_BASE map: 318 Bytes

+    Storage required for ACTION_SYMBOLS_RANGE map: 353 Bytes

+    Storage required for NACTION_SYMBOLS_BASE map: 159 Bytes

+    Storage required for NACTION_SYMBOLS_RANGE map: 112 Bytes

+    Storage required for TERMINAL_INDEX map: 80 Bytes

+    Storage required for NON_TERMINAL_INDEX map: 82 Bytes

+

+    Storage required for SCOPE_PREFIX map: 54 Bytes

+    Storage required for SCOPE_SUFFIX map: 54 Bytes

+    Storage required for SCOPE_LHS_SYMBOL map: 54 Bytes

+    Storage required for SCOPE_LOOK_AHEAD map: 27 Bytes

+    Storage required for SCOPE_STATE_SET map: 27 Bytes

+    Storage required for SCOPE_RIGHT_SIDE map: 300 Bytes

+    Storage required for SCOPE_STATE map: 148 Bytes

+    Storage required for IN_SYMB map: 318 Bytes

+

+    Number of names: 127

+    Number of characters in name: 1122

diff --git a/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLParsersym.java b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLParsersym.java
new file mode 100644
index 0000000..71359a3
--- /dev/null
+++ b/examples/org.eclipse.ocl.examples.xtext.essentialocl/src/org/eclipse/ocl/examples/xtext/essentialocl/parser/OCLParsersym.java
@@ -0,0 +1,214 @@
+/**
+* Essential OCL Grammar
+* <copyright>
+*
+* Copyright (c) 2005, 2010 IBM Corporation and others.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   IBM - Initial API and implementation
+*   E.D.Willink - Elimination of some shift-reduce conflicts
+*   E.D.Willink - Remove unnecessary warning suppression
+*   E.D.Willink - Bugs 184048, 225493, 243976, 259818, 282882, 287993, 288040, 292112, 295166
+*   Borland - Bug 242880
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias):
+*        - 242153: LPG v 2.0.17 adoption.
+*        - 299396: Introducing new LPG templates
+*        - 300534: Removing the use of deprecated macros.
+* </copyright>
+*
+* $Id: EssentialOCL.gi,v 1.2 2011/01/24 21:31:48 ewillink Exp $
+*/
+/**
+* Complete OCL Grammar
+* <copyright>
+*
+* Copyright (c) 2005, 2009 IBM Corporation and others.
+* All rights reserved.   This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*   IBM - Initial API and implementation
+*   E.D.Willink - Bug 259818, 285633, 292112
+*   Adolfo Sanchez-Barbudo Herrera (Open Canarias):
+*        - 242153: LPG v 2.0.17 adoption.
+*        - 299396: Introducing new LPG templates
+*        - 300534: Removing the use of deprecated macros.
+* </copyright>
+*/
+
+package org.eclipse.ocl.examples.xtext.essentialocl.parser;
+
+public interface OCLParsersym {
+    public final static int
+      TK_QUOTED_IDENTIFIER = 2,
+      TK_INTEGER_LITERAL = 26,
+      TK_REAL_LITERAL = 27,
+      TK_STRING_LITERAL = 23,
+      TK_PLUS = 53,
+      TK_MINUS = 24,
+      TK_MULTIPLY = 25,
+      TK_DIVIDE = 54,
+      TK_GREATER = 55,
+      TK_LESS = 56,
+      TK_EQUAL = 7,
+      TK_GREATER_EQUAL = 57,
+      TK_LESS_EQUAL = 58,
+      TK_NOT_EQUAL = 59,
+      TK_LPAREN = 4,
+      TK_RPAREN = 5,
+      TK_LBRACE = 48,
+      TK_RBRACE = 49,
+      TK_LBRACKET = 50,
+      TK_RBRACKET = 51,
+      TK_ARROW = 60,
+      TK_BAR = 28,
+      TK_COMMA = 6,
+      TK_COLON = 1,
+      TK_COLONCOLON = 38,
+      TK_SEMICOLON = 61,
+      TK_DOT = 62,
+      TK_DOTDOT = 63,
+      TK_AT = 64,
+      TK_CARET = 65,
+      TK_CARETCARET = 66,
+      TK_QUESTIONMARK = 41,
+      TK_self = 29,
+      TK_if = 30,
+      TK_then = 67,
+      TK_else = 68,
+      TK_endif = 69,
+      TK_and = 70,
+      TK_or = 71,
+      TK_xor = 72,
+      TK_not = 31,
+      TK_implies = 73,
+      TK_let = 32,
+      TK_in = 74,
+      TK_true = 33,
+      TK_false = 34,
+      TK_null = 35,
+      TK_invalid = 36,
+      TK_Set = 8,
+      TK_Bag = 9,
+      TK_Sequence = 10,
+      TK_Collection = 11,
+      TK_OrderedSet = 12,
+      TK_String = 13,
+      TK_Integer = 14,
+      TK_UnlimitedNatural = 15,
+      TK_Real = 16,
+      TK_Boolean = 17,
+      TK_Tuple = 18,
+      TK_OclAny = 19,
+      TK_OclVoid = 20,
+      TK_OclInvalid = 21,
+      TK_inv = 39,
+      TK_pre = 42,
+      TK_post = 44,
+      TK_context = 43,
+      TK_package = 52,
+      TK_endpackage = 75,
+      TK_def = 37,
+      TK_body = 45,
+      TK_derive = 46,
+      TK_init = 47,
+      TK_static = 40,
+      TK_OclMessage = 22,
+      TK_EOF_TOKEN = 76,
+      TK_IDENTIFIER = 3,
+      TK_SINGLE_LINE_COMMENT = 77,
+      TK_MULTI_LINE_COMMENT = 78,
+      TK_ERROR_TOKEN = 79;
+
+    public final static String orderedTerminalSymbols[] = {
+                 "",
+                 "COLON",
+                 "QUOTED_IDENTIFIER",
+                 "IDENTIFIER",
+                 "LPAREN",
+                 "RPAREN",
+                 "COMMA",
+                 "EQUAL",
+                 "Set",
+                 "Bag",
+                 "Sequence",
+                 "Collection",
+                 "OrderedSet",
+                 "String",
+                 "Integer",
+                 "UnlimitedNatural",
+                 "Real",
+                 "Boolean",
+                 "Tuple",
+                 "OclAny",
+                 "OclVoid",
+                 "OclInvalid",
+                 "OclMessage",
+                 "STRING_LITERAL",
+                 "MINUS",
+                 "MULTIPLY",
+                 "INTEGER_LITERAL",
+                 "REAL_LITERAL",
+                 "BAR",
+                 "self",
+                 "if",
+                 "not",
+                 "let",
+                 "true",
+                 "false",
+                 "null",
+                 "invalid",
+                 "def",
+                 "COLONCOLON",
+                 "inv",
+                 "static",
+                 "QUESTIONMARK",
+                 "pre",
+                 "context",
+                 "post",
+                 "body",
+                 "derive",
+                 "init",
+                 "LBRACE",
+                 "RBRACE",
+                 "LBRACKET",
+                 "RBRACKET",
+                 "package",
+                 "PLUS",
+                 "DIVIDE",
+                 "GREATER",
+                 "LESS",
+                 "GREATER_EQUAL",
+                 "LESS_EQUAL",
+                 "NOT_EQUAL",
+                 "ARROW",
+                 "SEMICOLON",
+                 "DOT",
+                 "DOTDOT",
+                 "AT",
+                 "CARET",
+                 "CARETCARET",
+                 "then",
+                 "else",
+                 "endif",
+                 "and",
+                 "or",
+                 "xor",
+                 "implies",
+                 "in",
+                 "endpackage",
+                 "EOF_TOKEN",
+                 "SINGLE_LINE_COMMENT",
+                 "MULTI_LINE_COMMENT",
+                 "ERROR_TOKEN"
+             };
+
+    public final static int numTokenKinds = orderedTerminalSymbols.length;
+    public final static boolean isValidForParser = true;
+}