Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 146322 Details for
Bug 242153
[parser] Modification to support IMP and exploit LPG 2
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
New OCL on LPG v2 patch
ocl242153_try4_a.patch (text/plain), 326.69 KB, created by
Adolfo Sanchez-Barbudo Herrera
on 2009-09-02 16:34:03 EDT
(
hide
)
Description:
New OCL on LPG v2 patch
Filename:
MIME Type:
Creator:
Adolfo Sanchez-Barbudo Herrera
Created:
2009-09-02 16:34:03 EDT
Size:
326.69 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ocl >Index: src/org/eclipse/ocl/expressions/impl/BooleanLiteralExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/BooleanLiteralExpImpl.java,v >retrieving revision 1.7 >diff -u -r1.7 BooleanLiteralExpImpl.java >--- src/org/eclipse/ocl/expressions/impl/BooleanLiteralExpImpl.java 23 Jan 2009 17:16:03 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/impl/BooleanLiteralExpImpl.java 2 Sep 2009 20:24:05 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Map; >+ > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.ecore.EClass; >Index: src/org/eclipse/ocl/expressions/impl/UnlimitedNaturalLiteralExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/UnlimitedNaturalLiteralExpImpl.java,v >retrieving revision 1.8 >diff -u -r1.8 UnlimitedNaturalLiteralExpImpl.java >--- src/org/eclipse/ocl/expressions/impl/UnlimitedNaturalLiteralExpImpl.java 23 Jan 2009 17:16:04 -0000 1.8 >+++ src/org/eclipse/ocl/expressions/impl/UnlimitedNaturalLiteralExpImpl.java 2 Sep 2009 20:24:09 -0000 >@@ -18,13 +18,11 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Map; >-import org.eclipse.emf.common.notify.Notification; > >+import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.ecore.EClass; >- > import org.eclipse.emf.ecore.impl.ENotificationImpl; >- > import org.eclipse.ocl.expressions.ExpressionsPackage; > import org.eclipse.ocl.expressions.UnlimitedNaturalLiteralExp; > import org.eclipse.ocl.expressions.operations.UnlimitedNaturalLiteralExpOperations; >Index: src/org/eclipse/ocl/expressions/impl/OCLExpressionImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/OCLExpressionImpl.java,v >retrieving revision 1.10 >diff -u -r1.10 OCLExpressionImpl.java >--- src/org/eclipse/ocl/expressions/impl/OCLExpressionImpl.java 23 Jan 2009 17:16:04 -0000 1.10 >+++ src/org/eclipse/ocl/expressions/impl/OCLExpressionImpl.java 2 Sep 2009 20:24:07 -0000 >@@ -23,8 +23,6 @@ > import org.eclipse.emf.ecore.impl.EObjectImpl; > import org.eclipse.ocl.expressions.ExpressionsPackage; > import org.eclipse.ocl.expressions.OCLExpression; >- >-//import org.eclipse.ocl.expressions.operations.OCLExpressionOperations; > import org.eclipse.ocl.util.ToStringVisitor; > import org.eclipse.ocl.utilities.ASTNode; > import org.eclipse.ocl.utilities.UtilitiesPackage; >Index: src/org/eclipse/ocl/expressions/impl/IfExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/IfExpImpl.java,v >retrieving revision 1.8 >diff -u -r1.8 IfExpImpl.java >--- src/org/eclipse/ocl/expressions/impl/IfExpImpl.java 23 Jan 2009 17:16:03 -0000 1.8 >+++ src/org/eclipse/ocl/expressions/impl/IfExpImpl.java 2 Sep 2009 20:24:05 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Map; >+ > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.notify.NotificationChain; > import org.eclipse.emf.common.util.DiagnosticChain; >Index: src/org/eclipse/ocl/expressions/impl/PropertyCallExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/PropertyCallExpImpl.java,v >retrieving revision 1.8 >diff -u -r1.8 PropertyCallExpImpl.java >--- src/org/eclipse/ocl/expressions/impl/PropertyCallExpImpl.java 23 Jan 2009 17:16:04 -0000 1.8 >+++ src/org/eclipse/ocl/expressions/impl/PropertyCallExpImpl.java 2 Sep 2009 20:24:07 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Map; >+ > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.ecore.EClass; >Index: src/org/eclipse/ocl/expressions/impl/EnumLiteralExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/EnumLiteralExpImpl.java,v >retrieving revision 1.8 >diff -u -r1.8 EnumLiteralExpImpl.java >--- src/org/eclipse/ocl/expressions/impl/EnumLiteralExpImpl.java 23 Jan 2009 17:16:03 -0000 1.8 >+++ src/org/eclipse/ocl/expressions/impl/EnumLiteralExpImpl.java 2 Sep 2009 20:24:05 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Map; >+ > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.ecore.EClass; >Index: src/org/eclipse/ocl/expressions/impl/CollectionLiteralExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/CollectionLiteralExpImpl.java,v >retrieving revision 1.9 >diff -u -r1.9 CollectionLiteralExpImpl.java >--- src/org/eclipse/ocl/expressions/impl/CollectionLiteralExpImpl.java 25 Jun 2009 19:23:52 -0000 1.9 >+++ src/org/eclipse/ocl/expressions/impl/CollectionLiteralExpImpl.java 2 Sep 2009 20:24:05 -0000 >@@ -18,8 +18,8 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Collection; >- > import java.util.Map; >+ > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.notify.NotificationChain; > import org.eclipse.emf.common.util.DiagnosticChain; >Index: src/org/eclipse/ocl/expressions/impl/IteratorExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/IteratorExpImpl.java,v >retrieving revision 1.7 >diff -u -r1.7 IteratorExpImpl.java >--- src/org/eclipse/ocl/expressions/impl/IteratorExpImpl.java 23 Jan 2009 17:16:03 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/impl/IteratorExpImpl.java 2 Sep 2009 20:24:06 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.ecore.EClass; > import org.eclipse.ocl.expressions.ExpressionsPackage; >Index: src/org/eclipse/ocl/expressions/impl/CollectionLiteralPartImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/CollectionLiteralPartImpl.java,v >retrieving revision 1.7 >diff -u -r1.7 CollectionLiteralPartImpl.java >--- src/org/eclipse/ocl/expressions/impl/CollectionLiteralPartImpl.java 24 Nov 2008 00:22:42 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/impl/CollectionLiteralPartImpl.java 2 Sep 2009 20:24:05 -0000 >@@ -21,8 +21,6 @@ > import org.eclipse.emf.ecore.impl.EObjectImpl; > import org.eclipse.ocl.expressions.CollectionLiteralPart; > import org.eclipse.ocl.expressions.ExpressionsPackage; >- >-//import org.eclipse.ocl.expressions.operations.CollectionLiteralPartOperations; > import org.eclipse.ocl.utilities.Visitor; > > /** >Index: src/org/eclipse/ocl/expressions/impl/CollectionItemImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/CollectionItemImpl.java,v >retrieving revision 1.8 >diff -u -r1.8 CollectionItemImpl.java >--- src/org/eclipse/ocl/expressions/impl/CollectionItemImpl.java 23 Jan 2009 17:16:04 -0000 1.8 >+++ src/org/eclipse/ocl/expressions/impl/CollectionItemImpl.java 2 Sep 2009 20:24:05 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Map; >+ > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.notify.NotificationChain; > import org.eclipse.emf.common.util.DiagnosticChain; >Index: src/org/eclipse/ocl/expressions/impl/MessageExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/MessageExpImpl.java,v >retrieving revision 1.8 >diff -u -r1.8 MessageExpImpl.java >--- src/org/eclipse/ocl/expressions/impl/MessageExpImpl.java 23 Jan 2009 17:16:04 -0000 1.8 >+++ src/org/eclipse/ocl/expressions/impl/MessageExpImpl.java 2 Sep 2009 20:24:07 -0000 >@@ -18,8 +18,8 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Collection; >- > import java.util.Map; >+ > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.notify.NotificationChain; > import org.eclipse.emf.common.util.DiagnosticChain; >Index: src/org/eclipse/ocl/expressions/impl/VariableExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/VariableExpImpl.java,v >retrieving revision 1.8 >diff -u -r1.8 VariableExpImpl.java >--- src/org/eclipse/ocl/expressions/impl/VariableExpImpl.java 23 Jan 2009 17:16:04 -0000 1.8 >+++ src/org/eclipse/ocl/expressions/impl/VariableExpImpl.java 2 Sep 2009 20:24:09 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Map; >+ > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.ecore.EClass; >Index: src/org/eclipse/ocl/expressions/impl/OperationCallExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/OperationCallExpImpl.java,v >retrieving revision 1.10 >diff -u -r1.10 OperationCallExpImpl.java >--- src/org/eclipse/ocl/expressions/impl/OperationCallExpImpl.java 25 Jun 2009 19:23:52 -0000 1.10 >+++ src/org/eclipse/ocl/expressions/impl/OperationCallExpImpl.java 2 Sep 2009 20:24:07 -0000 >@@ -18,8 +18,8 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Collection; >- > import java.util.Map; >+ > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.notify.NotificationChain; > import org.eclipse.emf.common.util.DiagnosticChain; >Index: src/org/eclipse/ocl/expressions/impl/IntegerLiteralExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/IntegerLiteralExpImpl.java,v >retrieving revision 1.7 >diff -u -r1.7 IntegerLiteralExpImpl.java >--- src/org/eclipse/ocl/expressions/impl/IntegerLiteralExpImpl.java 23 Jan 2009 17:16:04 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/impl/IntegerLiteralExpImpl.java 2 Sep 2009 20:24:05 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Map; >+ > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.ecore.EClass; >Index: src/org/eclipse/ocl/expressions/impl/RealLiteralExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/RealLiteralExpImpl.java,v >retrieving revision 1.7 >diff -u -r1.7 RealLiteralExpImpl.java >--- src/org/eclipse/ocl/expressions/impl/RealLiteralExpImpl.java 23 Jan 2009 17:16:03 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/impl/RealLiteralExpImpl.java 2 Sep 2009 20:24:08 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Map; >+ > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.ecore.EClass; >Index: src/org/eclipse/ocl/expressions/impl/CollectionRangeImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/CollectionRangeImpl.java,v >retrieving revision 1.8 >diff -u -r1.8 CollectionRangeImpl.java >--- src/org/eclipse/ocl/expressions/impl/CollectionRangeImpl.java 23 Jan 2009 17:16:04 -0000 1.8 >+++ src/org/eclipse/ocl/expressions/impl/CollectionRangeImpl.java 2 Sep 2009 20:24:05 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Map; >+ > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.notify.NotificationChain; > import org.eclipse.emf.common.util.DiagnosticChain; >Index: src/org/eclipse/ocl/expressions/impl/StringLiteralExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/StringLiteralExpImpl.java,v >retrieving revision 1.7 >diff -u -r1.7 StringLiteralExpImpl.java >--- src/org/eclipse/ocl/expressions/impl/StringLiteralExpImpl.java 23 Jan 2009 17:16:03 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/impl/StringLiteralExpImpl.java 2 Sep 2009 20:24:08 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Map; >+ > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.ecore.EClass; >Index: src/org/eclipse/ocl/expressions/impl/TupleLiteralPartImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/TupleLiteralPartImpl.java,v >retrieving revision 1.10 >diff -u -r1.10 TupleLiteralPartImpl.java >--- src/org/eclipse/ocl/expressions/impl/TupleLiteralPartImpl.java 23 Jan 2009 17:16:03 -0000 1.10 >+++ src/org/eclipse/ocl/expressions/impl/TupleLiteralPartImpl.java 2 Sep 2009 20:24:08 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Map; >+ > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.notify.NotificationChain; > import org.eclipse.emf.common.util.DiagnosticChain; >Index: src/org/eclipse/ocl/expressions/impl/TupleLiteralExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/TupleLiteralExpImpl.java,v >retrieving revision 1.8 >diff -u -r1.8 TupleLiteralExpImpl.java >--- src/org/eclipse/ocl/expressions/impl/TupleLiteralExpImpl.java 23 Jan 2009 17:16:03 -0000 1.8 >+++ src/org/eclipse/ocl/expressions/impl/TupleLiteralExpImpl.java 2 Sep 2009 20:24:08 -0000 >@@ -18,8 +18,8 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Collection; >- > import java.util.Map; >+ > import org.eclipse.emf.common.notify.NotificationChain; > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.common.util.EList; >Index: src/org/eclipse/ocl/expressions/impl/ExpressionsFactoryImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/ExpressionsFactoryImpl.java,v >retrieving revision 1.7 >diff -u -r1.7 ExpressionsFactoryImpl.java >--- src/org/eclipse/ocl/expressions/impl/ExpressionsFactoryImpl.java 12 Oct 2008 01:09:49 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/impl/ExpressionsFactoryImpl.java 2 Sep 2009 20:24:05 -0000 >@@ -23,8 +23,6 @@ > import org.eclipse.emf.ecore.EPackage; > import org.eclipse.emf.ecore.impl.EFactoryImpl; > import org.eclipse.emf.ecore.plugin.EcorePlugin; >- >-//import org.eclipse.ocl.expressions.*; > import org.eclipse.ocl.expressions.AssociationClassCallExp; > import org.eclipse.ocl.expressions.BooleanLiteralExp; > import org.eclipse.ocl.expressions.CollectionItem; >Index: src/org/eclipse/ocl/expressions/impl/IterateExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/IterateExpImpl.java,v >retrieving revision 1.8 >diff -u -r1.8 IterateExpImpl.java >--- src/org/eclipse/ocl/expressions/impl/IterateExpImpl.java 23 Jan 2009 17:16:03 -0000 1.8 >+++ src/org/eclipse/ocl/expressions/impl/IterateExpImpl.java 2 Sep 2009 20:24:06 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Map; >+ > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.notify.NotificationChain; > import org.eclipse.emf.common.util.DiagnosticChain; >Index: src/org/eclipse/ocl/expressions/impl/VariableImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/VariableImpl.java,v >retrieving revision 1.10 >diff -u -r1.10 VariableImpl.java >--- src/org/eclipse/ocl/expressions/impl/VariableImpl.java 23 Jan 2009 17:16:04 -0000 1.10 >+++ src/org/eclipse/ocl/expressions/impl/VariableImpl.java 2 Sep 2009 20:24:09 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Map; >+ > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.notify.NotificationChain; > import org.eclipse.emf.common.util.DiagnosticChain; >Index: src/org/eclipse/ocl/expressions/impl/LetExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/LetExpImpl.java,v >retrieving revision 1.8 >diff -u -r1.8 LetExpImpl.java >--- src/org/eclipse/ocl/expressions/impl/LetExpImpl.java 23 Jan 2009 17:16:04 -0000 1.8 >+++ src/org/eclipse/ocl/expressions/impl/LetExpImpl.java 2 Sep 2009 20:24:06 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Map; >+ > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.notify.NotificationChain; > import org.eclipse.emf.common.util.DiagnosticChain; >Index: src/org/eclipse/ocl/expressions/impl/LoopExpImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/impl/LoopExpImpl.java,v >retrieving revision 1.8 >diff -u -r1.8 LoopExpImpl.java >--- src/org/eclipse/ocl/expressions/impl/LoopExpImpl.java 12 Oct 2008 01:09:49 -0000 1.8 >+++ src/org/eclipse/ocl/expressions/impl/LoopExpImpl.java 2 Sep 2009 20:24:06 -0000 >@@ -18,8 +18,8 @@ > package org.eclipse.ocl.expressions.impl; > > import java.util.Collection; >- > import java.util.Map; >+ > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.notify.NotificationChain; > import org.eclipse.emf.common.util.DiagnosticChain; >Index: src/org/eclipse/ocl/types/operations/InvalidTypeOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/operations/InvalidTypeOperations.java,v >retrieving revision 1.1 >diff -u -r1.1 InvalidTypeOperations.java >--- src/org/eclipse/ocl/types/operations/InvalidTypeOperations.java 12 Oct 2008 01:09:48 -0000 1.1 >+++ src/org/eclipse/ocl/types/operations/InvalidTypeOperations.java 2 Sep 2009 20:24:24 -0000 >@@ -17,7 +17,6 @@ > package org.eclipse.ocl.types.operations; > > import org.eclipse.emf.common.util.EList; >- > import org.eclipse.ocl.types.InvalidType; > > /** >Index: src/org/eclipse/ocl/types/operations/CollectionTypeOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/operations/CollectionTypeOperations.java,v >retrieving revision 1.3 >diff -u -r1.3 CollectionTypeOperations.java >--- src/org/eclipse/ocl/types/operations/CollectionTypeOperations.java 12 Oct 2008 01:09:48 -0000 1.3 >+++ src/org/eclipse/ocl/types/operations/CollectionTypeOperations.java 2 Sep 2009 20:24:24 -0000 >@@ -23,10 +23,8 @@ > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.common.util.EList; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.types.CollectionType; >- > import org.eclipse.ocl.types.util.TypesValidator; > import org.eclipse.ocl.util.OCLUtil; > >Index: src/org/eclipse/ocl/types/operations/VoidTypeOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/operations/VoidTypeOperations.java,v >retrieving revision 1.1 >diff -u -r1.1 VoidTypeOperations.java >--- src/org/eclipse/ocl/types/operations/VoidTypeOperations.java 12 Oct 2008 01:09:48 -0000 1.1 >+++ src/org/eclipse/ocl/types/operations/VoidTypeOperations.java 2 Sep 2009 20:24:25 -0000 >@@ -17,7 +17,6 @@ > package org.eclipse.ocl.types.operations; > > import org.eclipse.emf.common.util.EList; >- > import org.eclipse.ocl.types.VoidType; > > /** >Index: src/org/eclipse/ocl/types/operations/PrimitiveTypeOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/operations/PrimitiveTypeOperations.java,v >retrieving revision 1.1 >diff -u -r1.1 PrimitiveTypeOperations.java >--- src/org/eclipse/ocl/types/operations/PrimitiveTypeOperations.java 12 Oct 2008 01:09:48 -0000 1.1 >+++ src/org/eclipse/ocl/types/operations/PrimitiveTypeOperations.java 2 Sep 2009 20:24:25 -0000 >@@ -17,7 +17,6 @@ > package org.eclipse.ocl.types.operations; > > import org.eclipse.emf.common.util.EList; >- > import org.eclipse.ocl.types.PrimitiveType; > > /** >Index: src/org/eclipse/ocl/types/operations/MessageTypeOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/operations/MessageTypeOperations.java,v >retrieving revision 1.3 >diff -u -r1.3 MessageTypeOperations.java >--- src/org/eclipse/ocl/types/operations/MessageTypeOperations.java 12 Oct 2008 01:09:48 -0000 1.3 >+++ src/org/eclipse/ocl/types/operations/MessageTypeOperations.java 2 Sep 2009 20:24:25 -0000 >@@ -23,9 +23,7 @@ > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.common.util.EList; >- > import org.eclipse.ocl.types.MessageType; >- > import org.eclipse.ocl.types.util.TypesValidator; > > /** >Index: src/org/eclipse/ocl/types/operations/SequenceTypeOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/operations/SequenceTypeOperations.java,v >retrieving revision 1.4 >diff -u -r1.4 SequenceTypeOperations.java >--- src/org/eclipse/ocl/types/operations/SequenceTypeOperations.java 12 Oct 2008 01:09:48 -0000 1.4 >+++ src/org/eclipse/ocl/types/operations/SequenceTypeOperations.java 2 Sep 2009 20:24:25 -0000 >@@ -22,10 +22,8 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.types.SequenceType; >- > import org.eclipse.ocl.types.util.TypesValidator; > import org.eclipse.ocl.util.OCLUtil; > >Index: src/org/eclipse/ocl/types/operations/BagTypeOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/operations/BagTypeOperations.java,v >retrieving revision 1.3 >diff -u -r1.3 BagTypeOperations.java >--- src/org/eclipse/ocl/types/operations/BagTypeOperations.java 12 Oct 2008 01:09:48 -0000 1.3 >+++ src/org/eclipse/ocl/types/operations/BagTypeOperations.java 2 Sep 2009 20:24:24 -0000 >@@ -22,10 +22,8 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.types.BagType; >- > import org.eclipse.ocl.types.util.TypesValidator; > import org.eclipse.ocl.util.OCLUtil; > >Index: src/org/eclipse/ocl/types/operations/SetTypeOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/operations/SetTypeOperations.java,v >retrieving revision 1.3 >diff -u -r1.3 SetTypeOperations.java >--- src/org/eclipse/ocl/types/operations/SetTypeOperations.java 12 Oct 2008 01:09:48 -0000 1.3 >+++ src/org/eclipse/ocl/types/operations/SetTypeOperations.java 2 Sep 2009 20:24:25 -0000 >@@ -22,10 +22,8 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.types.SetType; >- > import org.eclipse.ocl.types.util.TypesValidator; > import org.eclipse.ocl.util.OCLUtil; > >Index: src/org/eclipse/ocl/types/operations/TypeTypeOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/operations/TypeTypeOperations.java,v >retrieving revision 1.1 >diff -u -r1.1 TypeTypeOperations.java >--- src/org/eclipse/ocl/types/operations/TypeTypeOperations.java 12 Oct 2008 01:09:48 -0000 1.1 >+++ src/org/eclipse/ocl/types/operations/TypeTypeOperations.java 2 Sep 2009 20:24:25 -0000 >@@ -17,7 +17,6 @@ > package org.eclipse.ocl.types.operations; > > import org.eclipse.emf.common.util.EList; >- > import org.eclipse.ocl.types.TypeType; > > /** >Index: src/org/eclipse/ocl/types/operations/AnyTypeOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/operations/AnyTypeOperations.java,v >retrieving revision 1.1 >diff -u -r1.1 AnyTypeOperations.java >--- src/org/eclipse/ocl/types/operations/AnyTypeOperations.java 12 Oct 2008 01:09:48 -0000 1.1 >+++ src/org/eclipse/ocl/types/operations/AnyTypeOperations.java 2 Sep 2009 20:24:24 -0000 >@@ -17,7 +17,6 @@ > package org.eclipse.ocl.types.operations; > > import org.eclipse.emf.common.util.EList; >- > import org.eclipse.ocl.types.AnyType; > > /** >Index: src/org/eclipse/ocl/types/operations/TupleTypeOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/operations/TupleTypeOperations.java,v >retrieving revision 1.2 >diff -u -r1.2 TupleTypeOperations.java >--- src/org/eclipse/ocl/types/operations/TupleTypeOperations.java 12 Oct 2008 01:09:48 -0000 1.2 >+++ src/org/eclipse/ocl/types/operations/TupleTypeOperations.java 2 Sep 2009 20:24:25 -0000 >@@ -23,9 +23,7 @@ > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.common.util.EList; >- > import org.eclipse.ocl.types.TupleType; >- > import org.eclipse.ocl.types.util.TypesValidator; > > /** >Index: src/org/eclipse/ocl/types/operations/OrderedSetTypeOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/operations/OrderedSetTypeOperations.java,v >retrieving revision 1.3 >diff -u -r1.3 OrderedSetTypeOperations.java >--- src/org/eclipse/ocl/types/operations/OrderedSetTypeOperations.java 12 Oct 2008 01:09:48 -0000 1.3 >+++ src/org/eclipse/ocl/types/operations/OrderedSetTypeOperations.java 2 Sep 2009 20:24:25 -0000 >@@ -22,10 +22,8 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.types.OrderedSetType; >- > import org.eclipse.ocl.types.util.TypesValidator; > import org.eclipse.ocl.util.OCLUtil; > >Index: src/org/eclipse/ocl/OCL.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/OCL.java,v >retrieving revision 1.11 >diff -u -r1.11 OCL.java >--- src/org/eclipse/ocl/OCL.java 1 Sep 2009 20:11:23 -0000 1.11 >+++ src/org/eclipse/ocl/OCL.java 2 Sep 2009 20:23:47 -0000 >@@ -275,7 +275,7 @@ > rootEnvironment, contentAsString.toCharArray()); > OCLBacktrackingParser parser = new OCLBacktrackingParser(lexer); > parser.setDefaultRepairCount(parserRepairCount); >- lexer.lexToTokens(parser); >+ lexer.lexer(parser.getIPrsStream()); > analyzer = new OCLAnalyzer<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E>( > parser); > } else { >Index: src/org/eclipse/ocl/expressions/PropertyCallExp.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/PropertyCallExp.java,v >retrieving revision 1.7 >diff -u -r1.7 PropertyCallExp.java >--- src/org/eclipse/ocl/expressions/PropertyCallExp.java 30 Nov 2008 22:11:38 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/PropertyCallExp.java 2 Sep 2009 20:24:03 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > > /** >Index: src/org/eclipse/ocl/expressions/CollectionLiteralExp.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/CollectionLiteralExp.java,v >retrieving revision 1.7 >diff -u -r1.7 CollectionLiteralExp.java >--- src/org/eclipse/ocl/expressions/CollectionLiteralExp.java 30 Nov 2008 22:11:38 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/CollectionLiteralExp.java 2 Sep 2009 20:24:02 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.common.util.EList; > >Index: src/org/eclipse/ocl/expressions/LoopExp.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/LoopExp.java,v >retrieving revision 1.8 >diff -u -r1.8 LoopExp.java >--- src/org/eclipse/ocl/expressions/LoopExp.java 30 Nov 2008 22:11:38 -0000 1.8 >+++ src/org/eclipse/ocl/expressions/LoopExp.java 2 Sep 2009 20:24:03 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.common.util.EList; > >Index: src/org/eclipse/ocl/expressions/MessageExp.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/MessageExp.java,v >retrieving revision 1.7 >diff -u -r1.7 MessageExp.java >--- src/org/eclipse/ocl/expressions/MessageExp.java 30 Nov 2008 22:11:38 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/MessageExp.java 2 Sep 2009 20:24:03 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.common.util.EList; > import org.eclipse.ocl.utilities.CallingASTNode; >Index: src/org/eclipse/ocl/expressions/OperationCallExp.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/OperationCallExp.java,v >retrieving revision 1.7 >diff -u -r1.7 OperationCallExp.java >--- src/org/eclipse/ocl/expressions/OperationCallExp.java 30 Nov 2008 22:11:38 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/OperationCallExp.java 2 Sep 2009 20:24:03 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.common.util.EList; > >Index: src/org/eclipse/ocl/expressions/TupleLiteralPart.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/TupleLiteralPart.java,v >retrieving revision 1.7 >diff -u -r1.7 TupleLiteralPart.java >--- src/org/eclipse/ocl/expressions/TupleLiteralPart.java 30 Nov 2008 22:11:38 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/TupleLiteralPart.java 2 Sep 2009 20:24:03 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.ocl.utilities.TypedASTNode; > import org.eclipse.ocl.utilities.TypedElement; >Index: src/org/eclipse/ocl/expressions/UnlimitedNaturalLiteralExp.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/UnlimitedNaturalLiteralExp.java,v >retrieving revision 1.7 >diff -u -r1.7 UnlimitedNaturalLiteralExp.java >--- src/org/eclipse/ocl/expressions/UnlimitedNaturalLiteralExp.java 30 Nov 2008 22:11:38 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/UnlimitedNaturalLiteralExp.java 2 Sep 2009 20:24:03 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > > /** >Index: src/org/eclipse/ocl/expressions/BooleanLiteralExp.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/BooleanLiteralExp.java,v >retrieving revision 1.6 >diff -u -r1.6 BooleanLiteralExp.java >--- src/org/eclipse/ocl/expressions/BooleanLiteralExp.java 30 Nov 2008 22:11:38 -0000 1.6 >+++ src/org/eclipse/ocl/expressions/BooleanLiteralExp.java 2 Sep 2009 20:24:02 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > > /** >Index: src/org/eclipse/ocl/expressions/CollectionRange.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/CollectionRange.java,v >retrieving revision 1.7 >diff -u -r1.7 CollectionRange.java >--- src/org/eclipse/ocl/expressions/CollectionRange.java 30 Nov 2008 22:11:38 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/CollectionRange.java 2 Sep 2009 20:24:02 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > > /** >Index: src/org/eclipse/ocl/expressions/Variable.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/Variable.java,v >retrieving revision 1.7 >diff -u -r1.7 Variable.java >--- src/org/eclipse/ocl/expressions/Variable.java 30 Nov 2008 22:11:38 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/Variable.java 2 Sep 2009 20:24:03 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.ocl.utilities.TypedASTNode; > import org.eclipse.ocl.utilities.TypedElement; >Index: src/org/eclipse/ocl/expressions/RealLiteralExp.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/RealLiteralExp.java,v >retrieving revision 1.6 >diff -u -r1.6 RealLiteralExp.java >--- src/org/eclipse/ocl/expressions/RealLiteralExp.java 30 Nov 2008 22:11:38 -0000 1.6 >+++ src/org/eclipse/ocl/expressions/RealLiteralExp.java 2 Sep 2009 20:24:03 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > > /** >Index: src/org/eclipse/ocl/expressions/LetExp.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/LetExp.java,v >retrieving revision 1.7 >diff -u -r1.7 LetExp.java >--- src/org/eclipse/ocl/expressions/LetExp.java 30 Nov 2008 22:11:38 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/LetExp.java 2 Sep 2009 20:24:03 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > > /** >Index: src/org/eclipse/ocl/expressions/EnumLiteralExp.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/EnumLiteralExp.java,v >retrieving revision 1.7 >diff -u -r1.7 EnumLiteralExp.java >--- src/org/eclipse/ocl/expressions/EnumLiteralExp.java 30 Nov 2008 22:11:38 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/EnumLiteralExp.java 2 Sep 2009 20:24:03 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > > /** >Index: src/org/eclipse/ocl/expressions/IntegerLiteralExp.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/IntegerLiteralExp.java,v >retrieving revision 1.6 >diff -u -r1.6 IntegerLiteralExp.java >--- src/org/eclipse/ocl/expressions/IntegerLiteralExp.java 30 Nov 2008 22:11:38 -0000 1.6 >+++ src/org/eclipse/ocl/expressions/IntegerLiteralExp.java 2 Sep 2009 20:24:03 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > > /** >Index: src/org/eclipse/ocl/expressions/VariableExp.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/VariableExp.java,v >retrieving revision 1.7 >diff -u -r1.7 VariableExp.java >--- src/org/eclipse/ocl/expressions/VariableExp.java 30 Nov 2008 22:11:38 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/VariableExp.java 2 Sep 2009 20:24:03 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > > /** >Index: src/org/eclipse/ocl/expressions/StringLiteralExp.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/StringLiteralExp.java,v >retrieving revision 1.6 >diff -u -r1.6 StringLiteralExp.java >--- src/org/eclipse/ocl/expressions/StringLiteralExp.java 30 Nov 2008 22:11:38 -0000 1.6 >+++ src/org/eclipse/ocl/expressions/StringLiteralExp.java 2 Sep 2009 20:24:03 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > > /** >Index: src/org/eclipse/ocl/expressions/IteratorExp.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/IteratorExp.java,v >retrieving revision 1.5 >diff -u -r1.5 IteratorExp.java >--- src/org/eclipse/ocl/expressions/IteratorExp.java 30 Nov 2008 22:11:38 -0000 1.5 >+++ src/org/eclipse/ocl/expressions/IteratorExp.java 2 Sep 2009 20:24:03 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > > /** >Index: src/org/eclipse/ocl/expressions/CollectionItem.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/CollectionItem.java,v >retrieving revision 1.7 >diff -u -r1.7 CollectionItem.java >--- src/org/eclipse/ocl/expressions/CollectionItem.java 30 Nov 2008 22:11:38 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/CollectionItem.java 2 Sep 2009 20:24:02 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > > /** >Index: src/org/eclipse/ocl/expressions/TupleLiteralExp.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/TupleLiteralExp.java,v >retrieving revision 1.7 >diff -u -r1.7 TupleLiteralExp.java >--- src/org/eclipse/ocl/expressions/TupleLiteralExp.java 30 Nov 2008 22:11:38 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/TupleLiteralExp.java 2 Sep 2009 20:24:03 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.common.util.EList; > >Index: src/org/eclipse/ocl/expressions/IfExp.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/IfExp.java,v >retrieving revision 1.7 >diff -u -r1.7 IfExp.java >--- src/org/eclipse/ocl/expressions/IfExp.java 30 Nov 2008 22:11:38 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/IfExp.java 2 Sep 2009 20:24:03 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > > /** >Index: src/org/eclipse/ocl/expressions/IterateExp.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/IterateExp.java,v >retrieving revision 1.7 >diff -u -r1.7 IterateExp.java >--- src/org/eclipse/ocl/expressions/IterateExp.java 30 Nov 2008 22:11:38 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/IterateExp.java 2 Sep 2009 20:24:03 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.expressions; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > > /** >Index: src/org/eclipse/ocl/cst/CSTNode.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/cst/CSTNode.java,v >retrieving revision 1.3 >diff -u -r1.3 CSTNode.java >--- src/org/eclipse/ocl/cst/CSTNode.java 30 Nov 2008 22:11:38 -0000 1.3 >+++ src/org/eclipse/ocl/cst/CSTNode.java 2 Sep 2009 20:23:47 -0000 >@@ -17,7 +17,8 @@ > */ > package org.eclipse.ocl.cst; > >-import lpg.lpgjavaruntime.IToken; >+import lpg.runtime.IToken; >+ > import org.eclipse.emf.ecore.EObject; > > /** >@@ -104,7 +105,7 @@ > * If the meaning of the '<em>Start Token</em>' attribute isn't clear, > * there really should be more of a description here... > * </p> >- * @since 1.3 >+ * @since 3.0 > * <!-- end-user-doc --> > * @return the value of the '<em>Start Token</em>' attribute. > * @see #setStartToken(IToken) >@@ -117,7 +118,7 @@ > /** > * Sets the value of the '{@link org.eclipse.ocl.cst.CSTNode#getStartToken <em>Start Token</em>}' attribute. > * <!-- begin-user-doc --> >- * @since 1.3 >+ * @since 3.0 > * <!-- end-user-doc --> > * @param value the new value of the '<em>Start Token</em>' attribute. > * @see #getStartToken() >@@ -132,7 +133,7 @@ > * If the meaning of the '<em>End Token</em>' attribute isn't clear, > * there really should be more of a description here... > * </p> >- * @since 1.3 >+ * @since 3.0 > * <!-- end-user-doc --> > * @return the value of the '<em>End Token</em>' attribute. > * @see #setEndToken(IToken) >@@ -145,7 +146,7 @@ > /** > * Sets the value of the '{@link org.eclipse.ocl.cst.CSTNode#getEndToken <em>End Token</em>}' attribute. > * <!-- begin-user-doc --> >- * @since 1.3 >+ * @since 3.0 > * <!-- end-user-doc --> > * @param value the new value of the '<em>End Token</em>' attribute. > * @see #getEndToken() >Index: src/org/eclipse/ocl/cst/CSTPackage.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/cst/CSTPackage.java,v >retrieving revision 1.7 >diff -u -r1.7 CSTPackage.java >--- src/org/eclipse/ocl/cst/CSTPackage.java 5 Mar 2009 14:12:13 -0000 1.7 >+++ src/org/eclipse/ocl/cst/CSTPackage.java 2 Sep 2009 20:23:55 -0000 >@@ -4937,7 +4937,7 @@ > * The meta object id for the '<em>IToken</em>' data type. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >- * @see lpg.lpgjavaruntime.IToken >+ * @see lpg.runtime.IToken > * @see org.eclipse.ocl.cst.impl.CSTPackageImpl#getIToken() > * @generated > * @noreference This field is not intended to be referenced by clients. >@@ -6425,13 +6425,13 @@ > EEnum getDotOrArrowEnum(); > > /** >- * Returns the meta object for data type '{@link lpg.lpgjavaruntime.IToken <em>IToken</em>}'. >+ * Returns the meta object for data type '{@link lpg.runtime.IToken <em>IToken</em>}'. > * <!-- begin-user-doc --> > * @since 1.3 > * <!-- end-user-doc --> > * @return the meta object for data type '<em>IToken</em>'. >- * @see lpg.lpgjavaruntime.IToken >- * @model instanceClass="lpg.lpgjavaruntime.IToken" >+ * @see lpg.runtime.IToken >+ * @model instanceClass="lpg.runtime.IToken" > * @generated > */ > EDataType getIToken(); >@@ -7765,7 +7765,7 @@ > * <!-- begin-user-doc --> > * @since 1.3 > * <!-- end-user-doc --> >- * @see lpg.lpgjavaruntime.IToken >+ * @see lpg.runtime.IToken > * @see org.eclipse.ocl.cst.impl.CSTPackageImpl#getIToken() > * @generated > */ >Index: src/org/eclipse/ocl/cst/impl/CSTPackageImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/cst/impl/CSTPackageImpl.java,v >retrieving revision 1.7 >diff -u -r1.7 CSTPackageImpl.java >--- src/org/eclipse/ocl/cst/impl/CSTPackageImpl.java 26 May 2009 20:06:32 -0000 1.7 >+++ src/org/eclipse/ocl/cst/impl/CSTPackageImpl.java 2 Sep 2009 20:23:59 -0000 >@@ -18,7 +18,8 @@ > */ > package org.eclipse.ocl.cst.impl; > >-import lpg.lpgjavaruntime.IToken; >+import lpg.runtime.IToken; >+ > import org.eclipse.emf.ecore.EAttribute; > import org.eclipse.emf.ecore.EClass; > import org.eclipse.emf.ecore.EDataType; >Index: src/org/eclipse/ocl/cst/impl/CSTNodeImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/cst/impl/CSTNodeImpl.java,v >retrieving revision 1.4 >diff -u -r1.4 CSTNodeImpl.java >--- src/org/eclipse/ocl/cst/impl/CSTNodeImpl.java 23 Jan 2009 17:16:04 -0000 1.4 >+++ src/org/eclipse/ocl/cst/impl/CSTNodeImpl.java 2 Sep 2009 20:23:56 -0000 >@@ -17,7 +17,8 @@ > */ > package org.eclipse.ocl.cst.impl; > >-import lpg.lpgjavaruntime.IToken; >+import lpg.runtime.IToken; >+ > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.ecore.EClass; > import org.eclipse.emf.ecore.impl.ENotificationImpl; >@@ -217,7 +218,7 @@ > > /** > * <!-- begin-user-doc --> >- * @since 1.3 >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >@@ -227,7 +228,7 @@ > > /** > * <!-- begin-user-doc --> >- * @since 1.3 >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >@@ -241,7 +242,7 @@ > > /** > * <!-- begin-user-doc --> >- * @since 1.3 >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >@@ -251,7 +252,7 @@ > > /** > * <!-- begin-user-doc --> >- * @since 1.3 >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >Index: src/org/eclipse/ocl/cst/impl/ClassifierContextDeclCSImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/cst/impl/ClassifierContextDeclCSImpl.java,v >retrieving revision 1.3 >diff -u -r1.3 ClassifierContextDeclCSImpl.java >--- src/org/eclipse/ocl/cst/impl/ClassifierContextDeclCSImpl.java 30 Nov 2008 22:11:37 -0000 1.3 >+++ src/org/eclipse/ocl/cst/impl/ClassifierContextDeclCSImpl.java 2 Sep 2009 20:23:59 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.cst.impl; > > import java.util.Collection; >+ > import org.eclipse.emf.common.notify.Notification; > import org.eclipse.emf.common.notify.NotificationChain; > import org.eclipse.emf.common.util.EList; >Index: src/org/eclipse/ocl/cst/impl/CSTFactoryImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/cst/impl/CSTFactoryImpl.java,v >retrieving revision 1.5 >diff -u -r1.5 CSTFactoryImpl.java >--- src/org/eclipse/ocl/cst/impl/CSTFactoryImpl.java 2 Dec 2008 11:58:50 -0000 1.5 >+++ src/org/eclipse/ocl/cst/impl/CSTFactoryImpl.java 2 Sep 2009 20:23:56 -0000 >@@ -17,15 +17,14 @@ > */ > package org.eclipse.ocl.cst.impl; > >-import lpg.lpgjavaruntime.IToken; >+import lpg.runtime.IToken; >+ > import org.eclipse.emf.ecore.EClass; > import org.eclipse.emf.ecore.EDataType; > import org.eclipse.emf.ecore.EObject; > import org.eclipse.emf.ecore.EPackage; > import org.eclipse.emf.ecore.impl.EFactoryImpl; > import org.eclipse.emf.ecore.plugin.EcorePlugin; >- >-//import org.eclipse.ocl.cst.*; > import org.eclipse.ocl.cst.BooleanLiteralExpCS; > import org.eclipse.ocl.cst.CSTFactory; > import org.eclipse.ocl.cst.CSTPackage; >@@ -823,7 +822,7 @@ > > /** > * <!-- begin-user-doc --> >- * @since 1.3 >+ * @since 3.0 > * <!-- end-user-doc --> > * @generated > */ >Index: src/org/eclipse/ocl/cst/impl/OCLDocumentCSImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/cst/impl/OCLDocumentCSImpl.java,v >retrieving revision 1.1 >diff -u -r1.1 OCLDocumentCSImpl.java >--- src/org/eclipse/ocl/cst/impl/OCLDocumentCSImpl.java 2 Dec 2008 11:58:50 -0000 1.1 >+++ src/org/eclipse/ocl/cst/impl/OCLDocumentCSImpl.java 2 Sep 2009 20:23:59 -0000 >@@ -19,15 +19,11 @@ > import java.util.Collection; > > import org.eclipse.emf.common.notify.NotificationChain; >- > import org.eclipse.emf.common.util.EList; >- > import org.eclipse.emf.ecore.EClass; > import org.eclipse.emf.ecore.InternalEObject; >- > import org.eclipse.emf.ecore.util.EObjectContainmentEList; > import org.eclipse.emf.ecore.util.InternalEList; >- > import org.eclipse.ocl.cst.CSTPackage; > import org.eclipse.ocl.cst.OCLDocumentCS; > import org.eclipse.ocl.cst.PackageDeclarationCS; >Index: src/org/eclipse/ocl/types/impl/MessageTypeImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/impl/MessageTypeImpl.java,v >retrieving revision 1.7 >diff -u -r1.7 MessageTypeImpl.java >--- src/org/eclipse/ocl/types/impl/MessageTypeImpl.java 12 Oct 2008 01:09:48 -0000 1.7 >+++ src/org/eclipse/ocl/types/impl/MessageTypeImpl.java 2 Sep 2009 20:24:23 -0000 >@@ -18,9 +18,10 @@ > package org.eclipse.ocl.types.impl; > > import java.util.Map; >+ > import org.eclipse.emf.common.notify.Notification; >-import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.common.util.BasicEList; >+import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.common.util.ECollections; > import org.eclipse.emf.common.util.EList; > import org.eclipse.emf.ecore.EClass; >Index: src/org/eclipse/ocl/types/impl/TypesFactoryImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/impl/TypesFactoryImpl.java,v >retrieving revision 1.5 >diff -u -r1.5 TypesFactoryImpl.java >--- src/org/eclipse/ocl/types/impl/TypesFactoryImpl.java 12 Oct 2008 01:09:48 -0000 1.5 >+++ src/org/eclipse/ocl/types/impl/TypesFactoryImpl.java 2 Sep 2009 20:24:24 -0000 >@@ -25,8 +25,6 @@ > import org.eclipse.emf.ecore.EPackage; > import org.eclipse.emf.ecore.impl.EFactoryImpl; > import org.eclipse.emf.ecore.plugin.EcorePlugin; >- >-//import org.eclipse.ocl.types.*; > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.expressions.CollectionKind; > import org.eclipse.ocl.types.AnyType; >Index: src/org/eclipse/ocl/types/impl/SetTypeImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/impl/SetTypeImpl.java,v >retrieving revision 1.6 >diff -u -r1.6 SetTypeImpl.java >--- src/org/eclipse/ocl/types/impl/SetTypeImpl.java 12 Oct 2008 01:09:48 -0000 1.6 >+++ src/org/eclipse/ocl/types/impl/SetTypeImpl.java 2 Sep 2009 20:24:23 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.types.impl; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.ecore.EClass; > import org.eclipse.ocl.expressions.CollectionKind; >Index: src/org/eclipse/ocl/types/impl/AnyTypeImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/impl/AnyTypeImpl.java,v >retrieving revision 1.6 >diff -u -r1.6 AnyTypeImpl.java >--- src/org/eclipse/ocl/types/impl/AnyTypeImpl.java 24 Nov 2008 00:21:41 -0000 1.6 >+++ src/org/eclipse/ocl/types/impl/AnyTypeImpl.java 2 Sep 2009 20:24:22 -0000 >@@ -24,8 +24,6 @@ > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.types.AnyType; > import org.eclipse.ocl.types.TypesPackage; >- >-//import org.eclipse.ocl.types.operations.AnyTypeOperations; > import org.eclipse.ocl.util.OCLStandardLibraryUtil; > > /** >Index: src/org/eclipse/ocl/types/impl/TypeTypeImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/impl/TypeTypeImpl.java,v >retrieving revision 1.7 >diff -u -r1.7 TypeTypeImpl.java >--- src/org/eclipse/ocl/types/impl/TypeTypeImpl.java 24 Nov 2008 00:21:26 -0000 1.7 >+++ src/org/eclipse/ocl/types/impl/TypeTypeImpl.java 2 Sep 2009 20:24:24 -0000 >@@ -28,8 +28,6 @@ > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.types.TypeType; > import org.eclipse.ocl.types.TypesPackage; >- >-//import org.eclipse.ocl.types.operations.TypeTypeOperations; > import org.eclipse.ocl.util.OCLStandardLibraryUtil; > > /** >Index: src/org/eclipse/ocl/types/impl/OrderedSetTypeImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/impl/OrderedSetTypeImpl.java,v >retrieving revision 1.6 >diff -u -r1.6 OrderedSetTypeImpl.java >--- src/org/eclipse/ocl/types/impl/OrderedSetTypeImpl.java 12 Oct 2008 01:09:48 -0000 1.6 >+++ src/org/eclipse/ocl/types/impl/OrderedSetTypeImpl.java 2 Sep 2009 20:24:23 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.types.impl; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.ecore.EClass; > import org.eclipse.ocl.expressions.CollectionKind; >Index: src/org/eclipse/ocl/types/impl/BagTypeImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/impl/BagTypeImpl.java,v >retrieving revision 1.6 >diff -u -r1.6 BagTypeImpl.java >--- src/org/eclipse/ocl/types/impl/BagTypeImpl.java 12 Oct 2008 01:09:48 -0000 1.6 >+++ src/org/eclipse/ocl/types/impl/BagTypeImpl.java 2 Sep 2009 20:24:22 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.types.impl; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.ecore.EClass; > import org.eclipse.ocl.expressions.CollectionKind; >Index: src/org/eclipse/ocl/types/impl/SequenceTypeImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/impl/SequenceTypeImpl.java,v >retrieving revision 1.6 >diff -u -r1.6 SequenceTypeImpl.java >--- src/org/eclipse/ocl/types/impl/SequenceTypeImpl.java 12 Oct 2008 01:09:48 -0000 1.6 >+++ src/org/eclipse/ocl/types/impl/SequenceTypeImpl.java 2 Sep 2009 20:24:23 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.types.impl; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.ecore.EClass; > import org.eclipse.ocl.expressions.CollectionKind; >Index: src/org/eclipse/ocl/types/impl/TupleTypeImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/impl/TupleTypeImpl.java,v >retrieving revision 1.7 >diff -u -r1.7 TupleTypeImpl.java >--- src/org/eclipse/ocl/types/impl/TupleTypeImpl.java 12 Oct 2008 01:09:48 -0000 1.7 >+++ src/org/eclipse/ocl/types/impl/TupleTypeImpl.java 2 Sep 2009 20:24:24 -0000 >@@ -17,11 +17,11 @@ > */ > package org.eclipse.ocl.types.impl; > >-import java.util.Map; >-import org.eclipse.emf.common.util.DiagnosticChain; > import java.util.Iterator; >+import java.util.Map; > > import org.eclipse.emf.common.util.BasicEList; >+import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.common.util.EList; > import org.eclipse.emf.ecore.EClass; > import org.eclipse.emf.ecore.impl.EObjectImpl; >Index: src/org/eclipse/ocl/types/impl/CollectionTypeImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/impl/CollectionTypeImpl.java,v >retrieving revision 1.8 >diff -u -r1.8 CollectionTypeImpl.java >--- src/org/eclipse/ocl/types/impl/CollectionTypeImpl.java 23 Jan 2009 17:16:04 -0000 1.8 >+++ src/org/eclipse/ocl/types/impl/CollectionTypeImpl.java 2 Sep 2009 20:24:23 -0000 >@@ -17,12 +17,12 @@ > */ > package org.eclipse.ocl.types.impl; > >-import java.util.Map; > import java.util.List; >+import java.util.Map; > > import org.eclipse.emf.common.notify.Notification; >-import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.common.util.BasicEList; >+import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.common.util.EList; > import org.eclipse.emf.ecore.EClass; > import org.eclipse.emf.ecore.EObject; >Index: src/org/eclipse/ocl/types/impl/VoidTypeImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/impl/VoidTypeImpl.java,v >retrieving revision 1.6 >diff -u -r1.6 VoidTypeImpl.java >--- src/org/eclipse/ocl/types/impl/VoidTypeImpl.java 24 Nov 2008 00:21:34 -0000 1.6 >+++ src/org/eclipse/ocl/types/impl/VoidTypeImpl.java 2 Sep 2009 20:24:24 -0000 >@@ -24,8 +24,6 @@ > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.types.TypesPackage; > import org.eclipse.ocl.types.VoidType; >- >-//import org.eclipse.ocl.types.operations.VoidTypeOperations; > import org.eclipse.ocl.util.OCLStandardLibraryUtil; > > /** >Index: src/org/eclipse/ocl/types/impl/InvalidTypeImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/impl/InvalidTypeImpl.java,v >retrieving revision 1.6 >diff -u -r1.6 InvalidTypeImpl.java >--- src/org/eclipse/ocl/types/impl/InvalidTypeImpl.java 24 Nov 2008 00:21:31 -0000 1.6 >+++ src/org/eclipse/ocl/types/impl/InvalidTypeImpl.java 2 Sep 2009 20:24:23 -0000 >@@ -24,8 +24,6 @@ > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.types.InvalidType; > import org.eclipse.ocl.types.TypesPackage; >- >-//import org.eclipse.ocl.types.operations.InvalidTypeOperations; > import org.eclipse.ocl.util.OCLStandardLibraryUtil; > > /** >Index: src/org/eclipse/ocl/expressions/operations/BooleanLiteralExpOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/BooleanLiteralExpOperations.java,v >retrieving revision 1.3 >diff -u -r1.3 BooleanLiteralExpOperations.java >--- src/org/eclipse/ocl/expressions/operations/BooleanLiteralExpOperations.java 12 Oct 2008 01:09:49 -0000 1.3 >+++ src/org/eclipse/ocl/expressions/operations/BooleanLiteralExpOperations.java 2 Sep 2009 20:24:09 -0000 >@@ -22,10 +22,8 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.expressions.BooleanLiteralExp; >- > import org.eclipse.ocl.expressions.util.ExpressionsValidator; > import org.eclipse.ocl.internal.l10n.OCLMessages; > import org.eclipse.ocl.util.OCLUtil; >Index: src/org/eclipse/ocl/expressions/operations/IterateExpOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/IterateExpOperations.java,v >retrieving revision 1.3 >diff -u -r1.3 IterateExpOperations.java >--- src/org/eclipse/ocl/expressions/operations/IterateExpOperations.java 12 Oct 2008 01:09:49 -0000 1.3 >+++ src/org/eclipse/ocl/expressions/operations/IterateExpOperations.java 2 Sep 2009 20:24:10 -0000 >@@ -22,12 +22,10 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.expressions.IterateExp; > import org.eclipse.ocl.expressions.OCLExpression; > import org.eclipse.ocl.expressions.Variable; >- > import org.eclipse.ocl.expressions.util.ExpressionsValidator; > import org.eclipse.ocl.internal.l10n.OCLMessages; > import org.eclipse.ocl.util.OCLUtil; >Index: src/org/eclipse/ocl/expressions/operations/IfExpOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/IfExpOperations.java,v >retrieving revision 1.3 >diff -u -r1.3 IfExpOperations.java >--- src/org/eclipse/ocl/expressions/operations/IfExpOperations.java 12 Oct 2008 01:09:49 -0000 1.3 >+++ src/org/eclipse/ocl/expressions/operations/IfExpOperations.java 2 Sep 2009 20:24:10 -0000 >@@ -22,11 +22,9 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.expressions.IfExp; > import org.eclipse.ocl.expressions.OCLExpression; >- > import org.eclipse.ocl.expressions.util.ExpressionsValidator; > import org.eclipse.ocl.internal.l10n.OCLMessages; > import org.eclipse.ocl.util.OCLUtil; >Index: src/org/eclipse/ocl/expressions/operations/IteratorExpOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/IteratorExpOperations.java,v >retrieving revision 1.4 >diff -u -r1.4 IteratorExpOperations.java >--- src/org/eclipse/ocl/expressions/operations/IteratorExpOperations.java 25 Jun 2009 19:23:52 -0000 1.4 >+++ src/org/eclipse/ocl/expressions/operations/IteratorExpOperations.java 2 Sep 2009 20:24:11 -0000 >@@ -22,11 +22,9 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.expressions.IteratorExp; > import org.eclipse.ocl.expressions.OCLExpression; >- > import org.eclipse.ocl.expressions.util.ExpressionsValidator; > import org.eclipse.ocl.internal.l10n.OCLMessages; > import org.eclipse.ocl.types.BagType; >Index: src/org/eclipse/ocl/expressions/operations/OCLExpressionOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/OCLExpressionOperations.java,v >retrieving revision 1.2 >diff -u -r1.2 OCLExpressionOperations.java >--- src/org/eclipse/ocl/expressions/operations/OCLExpressionOperations.java 24 Nov 2008 00:21:50 -0000 1.2 >+++ src/org/eclipse/ocl/expressions/operations/OCLExpressionOperations.java 2 Sep 2009 20:24:11 -0000 >@@ -17,7 +17,6 @@ > package org.eclipse.ocl.expressions.operations; > > import org.eclipse.ocl.expressions.OCLExpression; >- > import org.eclipse.ocl.utilities.Visitor; > > /** >Index: src/org/eclipse/ocl/expressions/operations/VariableExpOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/VariableExpOperations.java,v >retrieving revision 1.3 >diff -u -r1.3 VariableExpOperations.java >--- src/org/eclipse/ocl/expressions/operations/VariableExpOperations.java 12 Oct 2008 01:09:49 -0000 1.3 >+++ src/org/eclipse/ocl/expressions/operations/VariableExpOperations.java 2 Sep 2009 20:24:12 -0000 >@@ -22,11 +22,9 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.expressions.Variable; > import org.eclipse.ocl.expressions.VariableExp; >- > import org.eclipse.ocl.expressions.util.ExpressionsValidator; > import org.eclipse.ocl.internal.l10n.OCLMessages; > import org.eclipse.ocl.util.OCLUtil; >Index: src/org/eclipse/ocl/expressions/operations/CollectionItemOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/CollectionItemOperations.java,v >retrieving revision 1.3 >diff -u -r1.3 CollectionItemOperations.java >--- src/org/eclipse/ocl/expressions/operations/CollectionItemOperations.java 12 Oct 2008 01:09:48 -0000 1.3 >+++ src/org/eclipse/ocl/expressions/operations/CollectionItemOperations.java 2 Sep 2009 20:24:10 -0000 >@@ -22,11 +22,9 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.expressions.CollectionItem; > import org.eclipse.ocl.expressions.OCLExpression; >- > import org.eclipse.ocl.expressions.util.ExpressionsValidator; > import org.eclipse.ocl.util.OCLUtil; > import org.eclipse.ocl.util.TypeUtil; >Index: src/org/eclipse/ocl/expressions/operations/CollectionLiteralExpOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/CollectionLiteralExpOperations.java,v >retrieving revision 1.4 >diff -u -r1.4 CollectionLiteralExpOperations.java >--- src/org/eclipse/ocl/expressions/operations/CollectionLiteralExpOperations.java 25 Jun 2009 19:23:52 -0000 1.4 >+++ src/org/eclipse/ocl/expressions/operations/CollectionLiteralExpOperations.java 2 Sep 2009 20:24:10 -0000 >@@ -23,12 +23,10 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.expressions.CollectionKind; > import org.eclipse.ocl.expressions.CollectionLiteralExp; > import org.eclipse.ocl.expressions.CollectionLiteralPart; >- > import org.eclipse.ocl.expressions.util.ExpressionsValidator; > import org.eclipse.ocl.internal.l10n.OCLMessages; > import org.eclipse.ocl.types.CollectionType; >Index: src/org/eclipse/ocl/expressions/operations/PropertyCallExpOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/PropertyCallExpOperations.java,v >retrieving revision 1.3 >diff -u -r1.3 PropertyCallExpOperations.java >--- src/org/eclipse/ocl/expressions/operations/PropertyCallExpOperations.java 12 Oct 2008 01:09:49 -0000 1.3 >+++ src/org/eclipse/ocl/expressions/operations/PropertyCallExpOperations.java 2 Sep 2009 20:24:12 -0000 >@@ -22,11 +22,9 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.expressions.OCLExpression; > import org.eclipse.ocl.expressions.PropertyCallExp; >- > import org.eclipse.ocl.expressions.util.ExpressionsValidator; > import org.eclipse.ocl.util.OCLUtil; > import org.eclipse.ocl.util.TypeUtil; >Index: src/org/eclipse/ocl/expressions/operations/EnumLiteralExpOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/EnumLiteralExpOperations.java,v >retrieving revision 1.3 >diff -u -r1.3 EnumLiteralExpOperations.java >--- src/org/eclipse/ocl/expressions/operations/EnumLiteralExpOperations.java 12 Oct 2008 01:09:49 -0000 1.3 >+++ src/org/eclipse/ocl/expressions/operations/EnumLiteralExpOperations.java 2 Sep 2009 20:24:10 -0000 >@@ -22,10 +22,8 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.expressions.EnumLiteralExp; >- > import org.eclipse.ocl.expressions.util.ExpressionsValidator; > import org.eclipse.ocl.internal.l10n.OCLMessages; > import org.eclipse.ocl.util.OCLUtil; >Index: src/org/eclipse/ocl/expressions/operations/CollectionLiteralPartOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/CollectionLiteralPartOperations.java,v >retrieving revision 1.1 >diff -u -r1.1 CollectionLiteralPartOperations.java >--- src/org/eclipse/ocl/expressions/operations/CollectionLiteralPartOperations.java 12 Oct 2008 01:09:49 -0000 1.1 >+++ src/org/eclipse/ocl/expressions/operations/CollectionLiteralPartOperations.java 2 Sep 2009 20:24:10 -0000 >@@ -17,7 +17,6 @@ > package org.eclipse.ocl.expressions.operations; > > import org.eclipse.ocl.expressions.CollectionLiteralPart; >- > import org.eclipse.ocl.utilities.Visitor; > > /** >Index: src/org/eclipse/ocl/expressions/operations/MessageExpOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/MessageExpOperations.java,v >retrieving revision 1.4 >diff -u -r1.4 MessageExpOperations.java >--- src/org/eclipse/ocl/expressions/operations/MessageExpOperations.java 25 Jun 2009 19:23:52 -0000 1.4 >+++ src/org/eclipse/ocl/expressions/operations/MessageExpOperations.java 2 Sep 2009 20:24:11 -0000 >@@ -24,11 +24,9 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.expressions.MessageExp; > import org.eclipse.ocl.expressions.OCLExpression; >- > import org.eclipse.ocl.expressions.util.ExpressionsValidator; > import org.eclipse.ocl.internal.l10n.OCLMessages; > import org.eclipse.ocl.types.CollectionType; >Index: src/org/eclipse/ocl/expressions/operations/UnlimitedNaturalLiteralExpOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/UnlimitedNaturalLiteralExpOperations.java,v >retrieving revision 1.4 >diff -u -r1.4 UnlimitedNaturalLiteralExpOperations.java >--- src/org/eclipse/ocl/expressions/operations/UnlimitedNaturalLiteralExpOperations.java 12 Oct 2008 01:09:49 -0000 1.4 >+++ src/org/eclipse/ocl/expressions/operations/UnlimitedNaturalLiteralExpOperations.java 2 Sep 2009 20:24:12 -0000 >@@ -22,10 +22,8 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.expressions.UnlimitedNaturalLiteralExp; >- > import org.eclipse.ocl.expressions.util.ExpressionsValidator; > import org.eclipse.ocl.internal.l10n.OCLMessages; > import org.eclipse.ocl.util.OCLUtil; >Index: src/org/eclipse/ocl/expressions/operations/IntegerLiteralExpOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/IntegerLiteralExpOperations.java,v >retrieving revision 1.3 >diff -u -r1.3 IntegerLiteralExpOperations.java >--- src/org/eclipse/ocl/expressions/operations/IntegerLiteralExpOperations.java 12 Oct 2008 01:09:49 -0000 1.3 >+++ src/org/eclipse/ocl/expressions/operations/IntegerLiteralExpOperations.java 2 Sep 2009 20:24:10 -0000 >@@ -22,10 +22,8 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.expressions.IntegerLiteralExp; >- > import org.eclipse.ocl.expressions.util.ExpressionsValidator; > import org.eclipse.ocl.internal.l10n.OCLMessages; > import org.eclipse.ocl.util.OCLUtil; >Index: src/org/eclipse/ocl/expressions/operations/TupleLiteralExpOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/TupleLiteralExpOperations.java,v >retrieving revision 1.4 >diff -u -r1.4 TupleLiteralExpOperations.java >--- src/org/eclipse/ocl/expressions/operations/TupleLiteralExpOperations.java 25 Jun 2009 19:23:52 -0000 1.4 >+++ src/org/eclipse/ocl/expressions/operations/TupleLiteralExpOperations.java 2 Sep 2009 20:24:12 -0000 >@@ -24,11 +24,9 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.expressions.TupleLiteralExp; > import org.eclipse.ocl.expressions.TupleLiteralPart; >- > import org.eclipse.ocl.expressions.util.ExpressionsValidator; > import org.eclipse.ocl.internal.l10n.OCLMessages; > import org.eclipse.ocl.types.TupleType; >Index: src/org/eclipse/ocl/expressions/operations/LoopExpOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/LoopExpOperations.java,v >retrieving revision 1.4 >diff -u -r1.4 LoopExpOperations.java >--- src/org/eclipse/ocl/expressions/operations/LoopExpOperations.java 25 Jun 2009 19:23:52 -0000 1.4 >+++ src/org/eclipse/ocl/expressions/operations/LoopExpOperations.java 2 Sep 2009 20:24:11 -0000 >@@ -22,12 +22,10 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.expressions.LoopExp; > import org.eclipse.ocl.expressions.OCLExpression; > import org.eclipse.ocl.expressions.Variable; >- > import org.eclipse.ocl.expressions.util.ExpressionsValidator; > import org.eclipse.ocl.internal.l10n.OCLMessages; > import org.eclipse.ocl.types.CollectionType; >Index: src/org/eclipse/ocl/expressions/operations/OperationCallExpOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/OperationCallExpOperations.java,v >retrieving revision 1.8 >diff -u -r1.8 OperationCallExpOperations.java >--- src/org/eclipse/ocl/expressions/operations/OperationCallExpOperations.java 23 Jan 2009 17:16:04 -0000 1.8 >+++ src/org/eclipse/ocl/expressions/operations/OperationCallExpOperations.java 2 Sep 2009 20:24:12 -0000 >@@ -25,11 +25,9 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.expressions.OCLExpression; > import org.eclipse.ocl.expressions.OperationCallExp; >- > import org.eclipse.ocl.expressions.util.ExpressionsValidator; > import org.eclipse.ocl.internal.l10n.OCLMessages; > import org.eclipse.ocl.util.OCLUtil; >Index: src/org/eclipse/ocl/expressions/operations/RealLiteralExpOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/RealLiteralExpOperations.java,v >retrieving revision 1.3 >diff -u -r1.3 RealLiteralExpOperations.java >--- src/org/eclipse/ocl/expressions/operations/RealLiteralExpOperations.java 12 Oct 2008 01:09:49 -0000 1.3 >+++ src/org/eclipse/ocl/expressions/operations/RealLiteralExpOperations.java 2 Sep 2009 20:24:12 -0000 >@@ -22,10 +22,8 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.expressions.RealLiteralExp; >- > import org.eclipse.ocl.expressions.util.ExpressionsValidator; > import org.eclipse.ocl.internal.l10n.OCLMessages; > import org.eclipse.ocl.util.OCLUtil; >Index: src/org/eclipse/ocl/expressions/operations/TupleLiteralPartOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/TupleLiteralPartOperations.java,v >retrieving revision 1.4 >diff -u -r1.4 TupleLiteralPartOperations.java >--- src/org/eclipse/ocl/expressions/operations/TupleLiteralPartOperations.java 25 Jun 2009 19:23:52 -0000 1.4 >+++ src/org/eclipse/ocl/expressions/operations/TupleLiteralPartOperations.java 2 Sep 2009 20:24:12 -0000 >@@ -22,17 +22,15 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.expressions.OCLExpression; > import org.eclipse.ocl.expressions.TupleLiteralExp; > import org.eclipse.ocl.expressions.TupleLiteralPart; >- > import org.eclipse.ocl.expressions.util.ExpressionsValidator; >-import org.eclipse.ocl.utilities.Visitor; > import org.eclipse.ocl.internal.l10n.OCLMessages; > import org.eclipse.ocl.util.OCLUtil; > import org.eclipse.ocl.util.TypeUtil; >+import org.eclipse.ocl.utilities.Visitor; > > /** > * <!-- begin-user-doc --> >Index: src/org/eclipse/ocl/expressions/operations/VariableOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/VariableOperations.java,v >retrieving revision 1.3 >diff -u -r1.3 VariableOperations.java >--- src/org/eclipse/ocl/expressions/operations/VariableOperations.java 12 Oct 2008 01:09:49 -0000 1.3 >+++ src/org/eclipse/ocl/expressions/operations/VariableOperations.java 2 Sep 2009 20:24:13 -0000 >@@ -22,16 +22,14 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.expressions.OCLExpression; > import org.eclipse.ocl.expressions.Variable; >- > import org.eclipse.ocl.expressions.util.ExpressionsValidator; >-import org.eclipse.ocl.utilities.Visitor; > import org.eclipse.ocl.internal.l10n.OCLMessages; > import org.eclipse.ocl.util.OCLUtil; > import org.eclipse.ocl.util.TypeUtil; >+import org.eclipse.ocl.utilities.Visitor; > > /** > * <!-- begin-user-doc --> >Index: src/org/eclipse/ocl/expressions/operations/LetExpOperations.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/operations/LetExpOperations.java,v >retrieving revision 1.3 >diff -u -r1.3 LetExpOperations.java >--- src/org/eclipse/ocl/expressions/operations/LetExpOperations.java 12 Oct 2008 01:09:49 -0000 1.3 >+++ src/org/eclipse/ocl/expressions/operations/LetExpOperations.java 2 Sep 2009 20:24:11 -0000 >@@ -22,11 +22,9 @@ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >- > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.expressions.LetExp; > import org.eclipse.ocl.expressions.OCLExpression; >- > import org.eclipse.ocl.expressions.util.ExpressionsValidator; > import org.eclipse.ocl.internal.l10n.OCLMessages; > import org.eclipse.ocl.util.OCLUtil; >Index: src/org/eclipse/ocl/lpg/AbstractAnalyzer.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/lpg/AbstractAnalyzer.java,v >retrieving revision 1.3 >diff -u -r1.3 AbstractAnalyzer.java >--- src/org/eclipse/ocl/lpg/AbstractAnalyzer.java 13 Jan 2009 19:44:29 -0000 1.3 >+++ src/org/eclipse/ocl/lpg/AbstractAnalyzer.java 2 Sep 2009 20:24:19 -0000 >@@ -79,7 +79,7 @@ > } > > public void dumpTokens() { >- parser.dumpTokens(); >+ parser.getIPrsStream().dumpTokens(); > } > > public String formatClass(Object object) { >@@ -276,7 +276,7 @@ > } > > public void setFileName(String filename) { >- getLexer().setFileName(filename); >+ getLexer().getILexStream().setFileName(filename); > } > > /** >@@ -284,9 +284,11 @@ > * > * @param buffer > * the characters >+ * >+ * @deprecated clients should invoke {@link #reset(char[], String)} > */ > public void initialize(char[] buffer) { >- getLexer().initialize(buffer); >+ reset(buffer, null); > } > > /** >@@ -296,14 +298,45 @@ > * providing the source text > * @throws IOException > * if reading fails >+ * >+ * @deprecated clients should invoke {@link #reset(Reader, String)} > */ > public void initialize(Reader reader) > throws IOException { >- getLexer().initialize(reader); >+ reset(reader, null); >+ } >+ >+ /** >+ * Define the input text as a given array of characters. >+ * >+ * @param buffer >+ * the characters >+ * @param fileName >+ * the associated finleName of the input, or <code>null</code> if none. >+ * @since 3.0 >+ */ >+ public void reset(char[] buffer, String fileName) { >+ getLexer().reset(buffer, fileName); >+ } >+ >+ /** >+ * Define the input text by reading from a reader. >+ * >+ * @param reader >+ * providing the source text >+ * @param fileName >+ * the associated finleName of the input, or <code>null</code> if none. >+ * @throws IOException >+ * if reading fails >+ * @since 3.0 >+ */ >+ public void reset(Reader reader, String fileName) >+ throws IOException { >+ getLexer().reset(reader, fileName); > } > > public void setTab(int tab) { >- getLexer().setTab(tab); >+ getLexer().getILexStream().setTab(tab); > } > > public void setTraceFlag(boolean flag) { >Index: src/org/eclipse/ocl/lpg/AbstractBasicEnvironment.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/lpg/AbstractBasicEnvironment.java,v >retrieving revision 1.7 >diff -u -r1.7 AbstractBasicEnvironment.java >--- src/org/eclipse/ocl/lpg/AbstractBasicEnvironment.java 5 Mar 2009 14:30:51 -0000 1.7 >+++ src/org/eclipse/ocl/lpg/AbstractBasicEnvironment.java 2 Sep 2009 20:24:19 -0000 >@@ -25,8 +25,8 @@ > import java.util.List; > import java.util.Map; > >-import lpg.lpgjavaruntime.IToken; >-import lpg.lpgjavaruntime.ParseErrorCodes; >+import lpg.runtime.IToken; >+import lpg.runtime.ParseErrorCodes; > > import org.eclipse.ocl.cst.CSTNode; > import org.eclipse.ocl.internal.OCLDebugOptions; >@@ -238,9 +238,9 @@ > } > int leftTokenLoc = (leftToken > rightToken ? rightToken : leftToken); > int rightTokenLoc = rightToken; >- int startOffset = parser.getStartOffset(leftTokenLoc); >- int endOffset = parser.getEndOffset(rightTokenLoc); >- int line = leftTokenLoc >= 0 ? parser.getLine(leftTokenLoc) : -1; >+ int startOffset = parser.getIPrsStream().getStartOffset(leftTokenLoc); >+ int endOffset = parser.getIPrsStream().getEndOffset(rightTokenLoc); >+ int line = leftTokenLoc >= 0 ? parser.getIPrsStream().getLine(leftTokenLoc) : -1; > String message; > if (line <= 0) { > message = OCLMessages.InvalidOCL_ERROR_; >Index: src/org/eclipse/ocl/lpg/AbstractParser.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/lpg/AbstractParser.java,v >retrieving revision 1.4 >diff -u -r1.4 AbstractParser.java >--- src/org/eclipse/ocl/lpg/AbstractParser.java 13 Jan 2009 19:44:29 -0000 1.4 >+++ src/org/eclipse/ocl/lpg/AbstractParser.java 2 Sep 2009 20:24:20 -0000 >@@ -19,15 +19,13 @@ > */ > package org.eclipse.ocl.lpg; > >-import java.util.ArrayList; >- >-import lpg.lpgjavaruntime.ErrorToken; >-import lpg.lpgjavaruntime.IToken; >-import lpg.lpgjavaruntime.LexStream; >-import lpg.lpgjavaruntime.Monitor; >-import lpg.lpgjavaruntime.ParseErrorCodes; >-import lpg.lpgjavaruntime.PrsStream; >-import lpg.lpgjavaruntime.Token; >+import lpg.runtime.ErrorToken; >+import lpg.runtime.ILexStream; >+import lpg.runtime.IToken; >+import lpg.runtime.Monitor; >+import lpg.runtime.ParseErrorCodes; >+import lpg.runtime.ParseTable; >+import lpg.runtime.PrsStream; > > import org.eclipse.ocl.cst.CSTNode; > import org.eclipse.ocl.internal.l10n.OCLMessages; >@@ -43,24 +41,28 @@ > * tokens from text parsing and analysis to support the AST and CST classes > * appropriate to a particular language. > */ >-public abstract class AbstractParser >- extends PrsStream { >- >+public abstract class AbstractParser { >+ > private final BasicEnvironment environment; > > private int defaultRepairCount = 0; >+ >+ private AbstractLexer lexer; > >- public AbstractParser(BasicEnvironment environment) { >+ /*public AbstractParser(BasicEnvironment environment) { > this.environment = environment; > environment.setParser(this); >- } >+ }*/ > > public AbstractParser(AbstractLexer lexer) { >- super(lexer); >+ this.lexer = lexer; > this.environment = lexer.getEnvironment(); >- environment.setParser(this); >+ environment.setParser(this); >+ } >+ >+ public AbstractLexer getLexer() { >+ return lexer; > } >- > /** > * Returns a single line string representation of the input chars for the > * given range. >@@ -73,7 +75,7 @@ > */ > public String computeInputString(int left, int right) { > StringBuffer result = new StringBuffer(right - left + 1); >- char[] chars = getInputChars(); >+ char[] chars = getIPrsStream().getInputChars(); > if (chars.length > 0) { > for (int i = left; i <= right; i++) { > if (chars[i] == '\t') { >@@ -97,148 +99,7 @@ > public BasicEnvironment getEnvironment() { > return environment; > } >- >- /** >- * This function returns the index of the token element containing the >- * offset specified. If such a token does not exist, it returns the negation >- * of the index of the element immediately preceding the offset. >- * >- * @since 1.3 >- */ >- public ErrorToken getErrorTokenAtCharacter(int offset) { >- ErrorToken bestToken = null; >- for (int i = getSize(); --i >= 0;) { >- IToken token = getTokenAt(i); >- if (!(token instanceof ErrorToken)) { >- break; >- } >- IToken errorToken = ((ErrorToken) token).getErrorToken(); >- if (offset >= errorToken.getStartOffset() >- && offset <= errorToken.getEndOffset()) { >- if ((bestToken == null) >- || ((bestToken.getStartOffset() <= errorToken >- .getStartOffset()) && (token.getEndOffset() <= errorToken >- .getEndOffset()))) { >- bestToken = (ErrorToken) token; >- } >- } >- } >- return bestToken; >- } >- >- /** >- * @since 1.3 >- */ >- public int getDefaultRepairCount() { >- return defaultRepairCount; >- } >- >- /** >- * @since 1.3 >- */ >- public int getErrorTokens() { >- return getTokens().size() - getStreamLength(); >- } >- >- public AbstractLexer getLexer() { >- return (AbstractLexer) super.getLexStream(); >- } >- >- /** >- * Overridden to search only the non-Error nodes, which are the only tokens >- * in monotonic order. >- */ >- @Override >- public int getTokenIndexAtCharacter(int offset) { >- int low = 0; >- int high = getSize(); >- while (high > low) { >- IToken highToken = getTokenAt(high - 1); >- if (!(highToken instanceof ErrorToken)) { >- break; >- } >- high--; >- } >- while (high > low) { >- int mid = (high + low) / 2; >- IToken mid_element = getTokenAt(mid); >- if (offset >= mid_element.getStartOffset() >- && offset <= mid_element.getEndOffset()) { >- return mid; >- } else if (offset < mid_element.getStartOffset()) { >- high = mid; >- } else { >- low = mid + 1; >- } >- } >- >- return -(low - 1); >- } >- >- @Override >- public int makeErrorToken(int firsttok, int lasttok, int errortok, int kind) { >- @SuppressWarnings("unchecked") >- ArrayList<IToken> tokens = getTokens(); >- int index = tokens.size(); // the next index >- >- // >- // Note that when creating an error token, we do not remap its kind. >- // Since this is not a lexical operation, it is the responsibility of >- // the calling program (a parser driver) to pass to us the proper kind >- // that it wants for an error token. >- // >- Token token = new ErrorToken(getIToken(firsttok), getIToken(lasttok), >- getIToken(errortok), getStartOffset(firsttok), >- getEndOffset(lasttok), kind) { >- >- @Override >- public String toString() { >- if (getPrsStream() == null) { >- return "<toString>"; //$NON-NLS-1$ >- } >- int startOffset = getStartOffset(); >- int length = getEndOffset() - startOffset; >- if (length < 0) { >- length = -length - 1; >- startOffset = getEndOffset(); >- } >- if ((startOffset + length) > getPrsStream().getInputChars().length) { >- return String.valueOf(IToken.EOF); >- } >- return new String(getPrsStream().getInputChars(), startOffset, >- length); >- } >- >- }; >- token.setTokenIndex(index); >- tokens.add(token); >- token.setAdjunctIndex(getAdjuncts().size()); >- return index; >- } >- >- public CSTNode parseTokensToCST() { >- return parseTokensToCST(null, defaultRepairCount); >- } >- >- public abstract CSTNode parseTokensToCST(Monitor monitor, >- int error_repair_count); >- >- @Override >- public void reportError(int errorCode, String locationInfo, int leftToken, >- int rightToken, String tokenText) { >- BasicEnvironment environment = getEnvironment(); >- if (environment == null) { >- super.reportError(errorCode, locationInfo, leftToken, rightToken, >- tokenText); >- } else { >- if (errorCode == DELETION_CODE || errorCode == MISPLACED_CODE) { >- tokenText = ""; //$NON-NLS-1$ >- } >- environment >- .parserError(errorCode, leftToken, rightToken, tokenText); >- } >- } >- >+ > /** > * Report error message for given error_token. > * >@@ -250,29 +111,50 @@ > * @since 1.3 > */ > public final void reportErrorTokenMessage(int error_token, String msg) { >- int firsttok = super.getFirstRealToken(error_token); >- int lasttok = super.getLastRealToken(error_token); >+ int firsttok = getIPrsStream().getFirstRealToken(error_token); >+ int lasttok = getIPrsStream().getLastRealToken(error_token); > if (firsttok > lasttok) { >- String location = super.getFileName() + ':' >+ /*String location = super.getFileName() + ':' > + super.getEndLine(lasttok) + ':' + super.getEndColumn(lasttok) >- + ": "; //$NON-NLS-1$ >- reportError(ParseErrorCodes.INSERTION_CODE, location, lasttok, >+ + ": "; //$NON-NLS-1$*/ >+ getIPrsStream().reportError(ParseErrorCodes.INSERTION_CODE, lasttok, > lasttok, msg); > } else { >- String location = super.getFileName() + ':' >+ /*String location = super.getFileName() + ':' > + super.getLine(error_token) + ':' > + super.getColumn(error_token) + ':' > + super.getEndLine(error_token) + ':' >- + super.getEndColumn(error_token) + ": "; //$NON-NLS-1$ >- reportError(ParseErrorCodes.SUBSTITUTION_CODE, location, firsttok, >+ + super.getEndColumn(error_token) + ": "; //$NON-NLS-1$*/ >+ getIPrsStream().reportError(ParseErrorCodes.SUBSTITUTION_CODE, firsttok, > lasttok, msg); > } > } > >- @Override >+ /** >+ * @return >+ * @deprecated clients should invoke {@link #parser()} >+ */ >+ public CSTNode parseTokensToCST() { >+ return parser(null, defaultRepairCount); >+ } >+ >+ /** >+ * @param monitor >+ * @param error_repair_count >+ * @return >+ * >+ * @deprecated clients should invoke {@link #parser(Monitor, int)} >+ * @since 3.0 >+ */ >+ public CSTNode parseTokensToCST(Monitor monitor, >+ int error_repair_count) { >+ return parser(monitor, error_repair_count); >+ } >+ >+ /*@Override > public void resetLexStream(LexStream lexStream) { > setLexStream((AbstractLexer) lexStream); >- } >+ }*/ > > /** > * Sets the number of repairs to be performed by a parser capable of >@@ -294,9 +176,12 @@ > > this.defaultRepairCount = defaultRepairCount; > } >- >- public void setLexStream(AbstractLexer lexStream) { >- super.resetLexStream(lexStream); >+ >+ /** >+ * @since 1.3 >+ */ >+ public int getDefaultRepairCount() { >+ return defaultRepairCount; > } > > /** >@@ -307,6 +192,7 @@ > * <code>CSTNode</code> to set offsets > * @param startEnd > * <code>IToken</code> to retrieve offsets from >+ * @since 3.0 > */ > protected void setOffsets(CSTNode cstNode, IToken startEnd) { > cstNode.setStartToken(startEnd); >@@ -368,6 +254,7 @@ > * <code>CSTNode</code> to retrieve start offset from > * @param end > * <code>IToken</code> to retrieve end offset from >+ * @since 3.0 > */ > protected void setOffsets(CSTNode cstNode, CSTNode start, IToken end) { > cstNode.setStartToken(start.getStartToken()); >@@ -387,6 +274,7 @@ > * <code>IToken</code> to retrieve start offset from > * @param end > * <code>CSTNode</code> to retrieve end offset from >+ * @since 3.0 > */ > protected void setOffsets(CSTNode cstNode, IToken start, CSTNode end) { > cstNode.setStartToken(start); >@@ -406,6 +294,7 @@ > * <code>IToken</code> to retrieve start offset from > * @param end > * <code>IToken</code> to retrieve end offset from >+ * @since 3.0 > */ > protected void setOffsets(CSTNode cstNode, IToken start, IToken end) { > cstNode.setStartToken(start); >@@ -413,6 +302,29 @@ > cstNode.setStartOffset(start.getStartOffset()); > cstNode.setEndOffset(end.getEndOffset()); > } >+ >+ /** >+ * <p> >+ * Initializes a concrete-syntax node's start and end offsets from the >+ * current token in the parser stream. >+ * <p> >+ * >+ * <p> >+ * <b>Note:</b> this method resided in the OCLEssential.g template since 1.2 >+ * It has been incorporated in the abstract parser since 3.0 >+ * </p> >+ * >+ * @param cstNode a concrete-syntax node >+ * >+ * @since 3.0 >+ */ >+ protected void setOffsets(CSTNode cstNode) { >+ IToken firstToken = getRhsIToken(1); >+ cstNode.setStartToken(firstToken); >+ cstNode.setEndToken(firstToken); >+ cstNode.setStartOffset(firstToken.getStartOffset()); >+ cstNode.setEndOffset(firstToken.getEndOffset()-1); >+ } > > /** > * Removes the "s surrounding a quoted string, if any. >@@ -457,4 +369,126 @@ > > return result; > } >+ >+ // Some useful methods which will be implemented in the generated Parser >+ abstract public String[] orderedTerminalSymbols(); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public OCLParserStream getIPrsStream(); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public void reset(ILexStream lexStream); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public CSTNode parser(); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public CSTNode parser(Monitor monitor); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public CSTNode parser(int error_repair_count); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public CSTNode parser(Monitor monitor, int error_repair_count); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public ParseTable getParseTable(); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public Object getRhsSym(int i); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public int getRhsTokenIndex(int i); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public IToken getRhsIToken(int i); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public int getRhsFirstTokenIndex(int i); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public IToken getRhsFirstIToken(int i); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public int getRhsLastTokenIndex(int i); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public IToken getRhsLastIToken(int i); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public int getLeftSpan(); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public IToken getLeftIToken(); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public int getRightSpan(); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public IToken getRightIToken(); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public int getRhsErrorTokenIndex(int i); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public ErrorToken getRhsErrorIToken(int i); >+ >+ /** >+ * @deprecated replaced by {@link #getIPrsStream()} >+ * @since 3.0 >+ * >+ */ >+ abstract public PrsStream getPrsStream(); >+ >+ /** >+ * @deprecated replaced by {@link #getIPrsStream()} >+ * @since 3.0 >+ * >+ */ >+ abstract public PrsStream getParseStream(); >+ >+ /** >+ * @since 3.0 >+ */ >+ abstract public int numTokenKinds(); > } >Index: src/org/eclipse/ocl/lpg/AbstractLexer.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/lpg/AbstractLexer.java,v >retrieving revision 1.2 >diff -u -r1.2 AbstractLexer.java >--- src/org/eclipse/ocl/lpg/AbstractLexer.java 4 Oct 2008 00:54:10 -0000 1.2 >+++ src/org/eclipse/ocl/lpg/AbstractLexer.java 2 Sep 2009 20:24:19 -0000 >@@ -23,9 +23,10 @@ > import java.io.IOException; > import java.io.Reader; > >-import lpg.lpgjavaruntime.LpgLexStream; >-import lpg.lpgjavaruntime.Monitor; >-import lpg.lpgjavaruntime.RuleAction; >+import lpg.runtime.ILexStream; >+import lpg.runtime.LexParser; >+import lpg.runtime.Monitor; >+import lpg.runtime.ParseTable; > > > /** >@@ -36,10 +37,11 @@ > * > * Derived classes should extend the abstract support for AST from CST from tokens from text > * parsing and analysis to support the AST and CST classes appropriate to a particular language. >+ * @since 3.0 > */ >-public abstract class AbstractLexer extends LpgLexStream implements RuleAction >+public abstract class AbstractLexer > { >- protected final static int ECLIPSE_TAB_VALUE = 4; >+ > > /** > * Read all input characters from a reader. >@@ -70,38 +72,62 @@ > return buffer; > } > >- private final BasicEnvironment environment; >- >- public AbstractLexer(BasicEnvironment environment, String filename, int tab) throws java.io.IOException >+ private final BasicEnvironment environment; >+ >+ // Constructor >+ public AbstractLexer(BasicEnvironment environment) > { >- super(filename, tab); > this.environment = environment; > } > >- public AbstractLexer(BasicEnvironment environment, char[] input_chars, String filename, int tab) >- { >- super(input_chars, filename, tab); >- this.environment = environment; >- } >+ public BasicEnvironment getEnvironment() { >+ return environment; >+ } > >- public AbstractLexer(BasicEnvironment environment) { >- setTab(ECLIPSE_TAB_VALUE); >- this.environment = environment; >+ /** >+ * Define the input text as a given array of characters. >+ * @param buffer the characters >+ * @deprecated clients should use {@link #reset(char[], String)} >+ */ >+ public void initialize(char[] inputChars) { >+ /*setInputChars(inputChars); >+ setStreamLength(inputChars.length); >+ computeLineOffsets();*/ >+ reset(inputChars, null); >+ } >+ >+ /** >+ * Define the input text by reading from a reader. >+ * @param reader providing the source text >+ * @throws IOException if reading fails >+ * >+ * @deprecated clients should invoke {@link #reset(Reader, String)} >+ */ >+ public void initialize(Reader reader) throws IOException { >+ char[] buffer = getInputChars(reader); >+ reset(buffer, null); > } > >- protected int computeErrorCode(int leftToken, int rightToken) { >- if (rightToken >= getStreamLength()) >- return EOF_CODE; >- else if (leftToken == rightToken) >- return LEX_ERROR_CODE; >- else >- return INVALID_TOKEN_CODE; >+ /** >+ * @param parser the {@link OCLParserStream} instance >+ * @deprecated clients should invoke {@link #lexer(OCLParserStream)} >+ * @since 3.0 >+ */ >+ public void lexToTokens(OCLParserStream parser) { >+ lexer(parser); > } > >- public BasicEnvironment getEnvironment() { >- return environment; >- } >- >+ /** >+ * @param parser the {@link OCLParserStream} instance >+ * @deprecated clients should invoke {@link #lexer(Monitor, OCLParserStream)} >+ * @since 3.0 >+ */ >+ public void lexToTokens(Monitor monitor, OCLParserStream prsStream) >+ { >+ lexer(monitor, prsStream); >+ } >+ >+ // Some methods which will be implemented by the generated lexer > /** > * Queries the token kinds, as defined by my keyword lexer, of tokens that > * are keywords in by grammar. >@@ -110,48 +136,82 @@ > * > * @since 1.3 > */ >- public int [] getKeywordKinds() { >- return new int[0]; >- } >- >- public void lexToTokens(AbstractParser parser) { >- lexToTokens(null, parser); >- } >+ public abstract int [] getKeywordKinds(); >+ >+ /** >+ * @since 3.0 >+ */ >+ public abstract AbstractLexerStream getILexStream(); > >- public abstract void lexToTokens(Monitor monitor, AbstractParser parser); >- > /** >- * Errors generated within the lexer are redirected to the error handler if there is one. >- * >- * Note that other variants of reportError either feed this one, are fed from a default implementation >- * of this one or originate in the parser, where a ParserErrorHandler can intercept them. >+ * @since 3.0 > */ >- @Override public void reportError(int leftToken, int rightToken) { >- BasicEnvironment environment = getEnvironment(); >- if (environment != null) >- environment.lexerError(computeErrorCode(leftToken, rightToken), leftToken, rightToken); >- else >- super.reportError(leftToken, rightToken); >- } >+ public abstract void reset(String filename, int tab) throws java.io.IOException; > > /** >- * Define the input text as a given array of characters. >- * @param buffer the characters >- */ >- public void initialize(char[] inputChars) { >- setInputChars(inputChars); >- setStreamLength(inputChars.length); >- computeLineOffsets(); >- } >+ * @since 3.0 >+ */ >+ public abstract void reset(char[] input_chars, String filename); >+ >+ /** >+ * @since 3.0 >+ */ >+ public abstract void reset(char[] input_chars, String filename, int tab); > >+ /** >+ * @since 3.0 >+ */ >+ public abstract void reset(Reader reader, String filename) throws java.io.IOException; >+ > /** >- * Define the input text by reading from a reader. >- * @param reader providing the source text >- * @throws IOException if reading fails >- */ >- public void initialize(Reader reader) throws IOException { >- char[] buffer = getInputChars(reader); >- initialize(buffer); >- } >+ * @since 3.0 >+ */ >+ public abstract void reset(Reader reader, String filename, int tab) throws java.io.IOException; >+ >+ /** >+ * @since 3.0 >+ */ >+ public abstract void lexer(OCLParserStream prsStream); >+ >+ /** >+ * @since 3.0 >+ */ >+ public abstract void lexer(Monitor monitor, OCLParserStream prsStream); >+ >+ /** >+ * @since 3.0 >+ */ >+ public abstract void lexer(OCLParserStream prsStream, int start_offset, int end_offset); >+ >+ /** >+ * @since 3.0 >+ */ >+ public abstract void lexer(Monitor monitor, OCLParserStream prsStream, int start_offset, int end_offset); >+ >+ // We also include some new 3.0 methods in order not to change the template with the @since >+ /** >+ * @since 3.0 >+ */ >+ public abstract ParseTable getParseTable(); >+ >+ /** >+ * @since 3.0 >+ */ >+ public abstract LexParser getParser(); >+ >+ /** >+ * @since 3.0 >+ */ >+ public abstract void resetKeywordLexer(); >+ >+ /** >+ * @since 3.0 >+ */ >+ public abstract ILexStream getLexStream(); >+ >+ /** >+ * @since 3.0 >+ */ >+ public abstract void reportLexicalError(int startLoc, int endLoc); > } > >Index: src/org/eclipse/ocl/lpg/AbstractProblemHandler.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/lpg/AbstractProblemHandler.java,v >retrieving revision 1.1 >diff -u -r1.1 AbstractProblemHandler.java >--- src/org/eclipse/ocl/lpg/AbstractProblemHandler.java 11 Oct 2007 23:04:53 -0000 1.1 >+++ src/org/eclipse/ocl/lpg/AbstractProblemHandler.java 2 Sep 2009 20:24:20 -0000 >@@ -17,7 +17,7 @@ > */ > package org.eclipse.ocl.lpg; > >-import lpg.lpgjavaruntime.ParseErrorCodes; >+import lpg.runtime.ParseErrorCodes; > > import org.eclipse.emf.common.util.Monitor; > import org.eclipse.ocl.internal.l10n.OCLMessages; >@@ -102,7 +102,7 @@ > */ > public void handleProblem(Severity problemSeverity, Phase processingPhase, > String problemMessage, String processingContext, int startOffset, int endOffset) { >- int lineNumber = parser.getTokenAtCharacter(startOffset).getLine(); >+ int lineNumber = parser.getIPrsStream().getTokenAtCharacter(startOffset).getLine(); > String message = OCLMessages.bind( > OCLMessages.ProblemMessage_ERROR_, > new Object[] { >Index: model/OCLCST.ecore >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/model/OCLCST.ecore,v >retrieving revision 1.8 >diff -u -r1.8 OCLCST.ecore >--- model/OCLCST.ecore 5 Mar 2009 14:12:13 -0000 1.8 >+++ model/OCLCST.ecore 2 Sep 2009 20:23:44 -0000 >@@ -15,7 +15,7 @@ > eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject" > transient="true"/> > </eClassifiers> >- <eClassifiers xsi:type="ecore:EDataType" name="IToken" instanceClassName="lpg.lpgjavaruntime.IToken"/> >+ <eClassifiers xsi:type="ecore:EDataType" name="IToken" instanceClassName="lpg.runtime.IToken"/> > <eClassifiers xsi:type="ecore:EClass" name="PackageDeclarationCS" eSuperTypes="#//cst/CSTNode"> > <eStructuralFeatures xsi:type="ecore:EReference" name="pathNameCS" eType="#//cst/PathNameCS" > containment="true"/> >Index: model/OCLCST.uml >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/model/OCLCST.uml,v >retrieving revision 1.5 >diff -u -r1.5 OCLCST.uml >--- model/OCLCST.uml 5 Mar 2009 14:12:13 -0000 1.5 >+++ model/OCLCST.uml 2 Sep 2009 20:23:46 -0000 >@@ -874,7 +874,7 @@ > <Ecore:EClass xmi:id="_qf-8J_8fEduhWtVvKtiQ7w" base_Class="_qdx-Vf8fEduhWtVvKtiQ7w"/> > <Ecore:EClass xmi:id="_qf-8KP8fEduhWtVvKtiQ7w" base_Class="_qdx-V_8fEduhWtVvKtiQ7w"/> > <Ecore:EAttribute xmi:id="_qf-8Kf8fEduhWtVvKtiQ7w" base_Property="_qdx-Wf8fEduhWtVvKtiQ7w"/> >- <Ecore:EDataType xmi:id="_wn-44I2FEd2mlKUM3HGxZg" instanceClassName="lpg.lpgjavaruntime.IToken" base_PrimitiveType="_tvVQwI2FEd2mlKUM3HGxZg"/> >+ <Ecore:EDataType xmi:id="_wn-44I2FEd2mlKUM3HGxZg" instanceClassName="lpg.runtime.IToken" base_PrimitiveType="_tvVQwI2FEd2mlKUM3HGxZg"/> > <Ecore:EAttribute xmi:id="_qkehgI2JEd2mlKUM3HGxZg" isTransient="true" base_Property="_PkTnII2GEd2mlKUM3HGxZg"/> > <Ecore:EAttribute xmi:id="_na5BwI2GEd2mlKUM3HGxZg" isTransient="true" base_Property="_kTt1cI2GEd2mlKUM3HGxZg"/> > <Ecore:EAttribute xmi:id="_CoEkwI2HEd2mlKUM3HGxZg" isTransient="true" base_Property="_xJpmEI2GEd2mlKUM3HGxZg"/> >Index: src/org/eclipse/ocl/parser/OCLProblemHandler.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/parser/OCLProblemHandler.java,v >retrieving revision 1.1 >diff -u -r1.1 OCLProblemHandler.java >--- src/org/eclipse/ocl/parser/OCLProblemHandler.java 11 Oct 2007 23:05:00 -0000 1.1 >+++ src/org/eclipse/ocl/parser/OCLProblemHandler.java 2 Sep 2009 20:24:22 -0000 >@@ -17,6 +17,8 @@ > */ > package org.eclipse.ocl.parser; > >+import lpg.runtime.IPrsStream; >+ > import org.eclipse.emf.common.util.BasicDiagnostic; > import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; >@@ -81,17 +83,17 @@ > @Override > public void lexerProblem(Severity problemSeverity, String problemMessage, > String processingContext, int startOffset, int endOffset) { >- int leftToken = getParser().getTokenIndexAtCharacter(startOffset); >+ int leftToken = getIPrsStream().getTokenIndexAtCharacter(startOffset); > if (leftToken < 0) { > leftToken = -leftToken; > } > String message = problemMessage >- + " (" + getParser().getKind(leftToken) + ") : " //$NON-NLS-1$//$NON-NLS-2$ >- + getParser().getStartOffset(leftToken) >- + ":" + getParser().getLineNumberOfTokenAt(leftToken) //$NON-NLS-1$ >- + ":" + getParser().getColumnOfTokenAt(leftToken) //$NON-NLS-1$ >- + ":" + getParser().getTokenLength(leftToken) //$NON-NLS-1$ >- + " " + getParser().getTokenText(leftToken); //$NON-NLS-1$ >+ + " (" + getIPrsStream().getKind(leftToken) + ") : " //$NON-NLS-1$//$NON-NLS-2$ >+ + getIPrsStream().getStartOffset(leftToken) >+ + ":" + getIPrsStream().getLineNumberOfTokenAt(leftToken) //$NON-NLS-1$ >+ + ":" + getIPrsStream().getColumnOfTokenAt(leftToken) //$NON-NLS-1$ >+ + ":" + getIPrsStream().getTokenLength(leftToken) //$NON-NLS-1$ >+ + " " + getIPrsStream().getTokenText(leftToken); //$NON-NLS-1$ > handleProblem(problemSeverity, Phase.LEXER, message, > processingContext, startOffset, endOffset); > } >@@ -99,22 +101,29 @@ > @Override > public void parserProblem(Severity problemSeverity, String problemMessage, > String processingContext, int startOffset, int endOffset) { >- int leftToken = getParser().getTokenIndexAtCharacter(startOffset); >- int rightToken = getParser().getTokenIndexAtCharacter(endOffset); >+ int leftToken = getIPrsStream().getTokenIndexAtCharacter(startOffset); >+ int rightToken = getIPrsStream().getTokenIndexAtCharacter(endOffset); > int leftTokenLoc = (leftToken > rightToken ? rightToken : leftToken); > int rightTokenLoc = rightToken; >- int line = getParser().getLine(leftTokenLoc) + getErrorReportLineOffset(); >+ int line = getIPrsStream().getLine(leftTokenLoc) + getErrorReportLineOffset(); > if (line > 0) { > String locInfo = OCLMessages.bind(OCLMessages.ErrorReport_RowColumn, > new Object[]{ >- new Integer((getParser().getLine(leftTokenLoc) + getErrorReportLineOffset())), >- new Integer(getParser().getColumn(leftTokenLoc)), >- new Integer((getParser().getEndLine(rightTokenLoc) + getErrorReportLineOffset())), >- new Integer(getParser().getEndColumn(rightTokenLoc)) >+ new Integer((getIPrsStream().getLine(leftTokenLoc) + getErrorReportLineOffset())), >+ new Integer(getIPrsStream().getColumn(leftTokenLoc)), >+ new Integer((getIPrsStream().getEndLine(rightTokenLoc) + getErrorReportLineOffset())), >+ new Integer(getIPrsStream().getEndColumn(rightTokenLoc)) > }); > problemMessage = locInfo + " " + problemMessage; //$NON-NLS-1$ > } > handleProblem(problemSeverity, Phase.PARSER, problemMessage, > processingContext, startOffset, endOffset); > } >+ >+ /** >+ * @since 3.0 >+ */ >+ protected IPrsStream getIPrsStream() { >+ return getParser().getIPrsStream(); >+ } > } >Index: src/org/eclipse/ocl/parser/OCLParser.g >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/parser/OCLParser.g,v >retrieving revision 1.3 >diff -u -r1.3 OCLParser.g >--- src/org/eclipse/ocl/parser/OCLParser.g 13 Jan 2009 19:44:29 -0000 1.3 >+++ src/org/eclipse/ocl/parser/OCLParser.g 2 Sep 2009 20:24:22 -0000 >@@ -1,7 +1,7 @@ > --/** > -- * <copyright> > -- * >--- * Copyright (c) 2005, 2009 IBM Corporation and others. >+-- * Copyright (c) 2005, 2009 IBM Corporation, Open Canarias S.L. 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 >@@ -11,6 +11,7 @@ > -- * IBM - Initial API and implementation > -- * E.D. Willink - Elimination of some shift-reduce conflicts > -- * - Bug 259818 >+-- * Adolfo Sanchez- Barbudo Herrera - LPG v 2.0.17 adoption > -- * > -- * </copyright> > -- * >@@ -22,34 +23,29 @@ > > %options escape=$ > %options la=2 >-%options table=java > %options fp=OCLParser,prefix=TK_ >-%options error-maps >-%options scopes >-%options margin=4 > %options noserialize > %options package=org.eclipse.ocl.parser >-%options import_terminals=OCLLexer.g >+%options import_terminals=OCLLexer.gi > %options ast_type=CSTNode >-%options programming_language=java >-%options action=("*.java", "/.", "./") >-%options ParseTable=lpg.lpgjavaruntime.ParseTable >+%options ParseTable=lpg.runtime.ParseTable >+%options template=dtParserTemplateF.gi > %options include_directory=".;../lpg" > >-$Start >+%Start > goal >-$End >+%End > >-$Include >- EssentialOCL.g >-$End >+%Import >+ EssentialOCL.gi >+%End > >-$Define >+%Define > $environment_class /.Environment<?,?,?,?,?,?,?,?,?,?,?,?>./ > $lex_stream_class /.OCLLexer./ >-$End >+%End > >-$Globals >+%Globals > /. > import org.eclipse.ocl.Environment; > import org.eclipse.ocl.cst.DefExpressionCS; >@@ -59,9 +55,9 @@ > import org.eclipse.ocl.cst.PackageDeclarationCS; > import org.eclipse.ocl.cst.PrePostOrBodyEnum; > ./ >-$End >+%End > >-$KeyWords >+%KeyWords > context > package > >@@ -71,9 +67,9 @@ > -- > attr > oper >-$End >+%End > >-$Rules >+%Rules > -- opt = optional > -- m = multiple > >@@ -83,56 +79,56 @@ > goal -> prePostOrBodyDeclCS > goal -> initOrDerValueCS > goal -> variableCS >- goal -> $empty >+ goal -> %empty > > packageDeclarationCSm -> packageDeclarationCS > packageDeclarationCSm ::= packageDeclarationCSm packageDeclarationCS >- /.$BeginJava >+ /.$BeginCode > PackageDeclarationCS result = (PackageDeclarationCS)$getSym(2); > result.setPackageDeclarationCS((PackageDeclarationCS) $getSym(1)); > $setResult(result); >- $EndJava >+ $EndCode > ./ > packageDeclarationCS ::= package pathNameCS contextDeclCSmopt endpackage >- /.$BeginJava >+ /.$BeginCode > CSTNode result = createPackageDeclarationCS( > (PathNameCS)$getSym(2), > (EList)$getSym(3) > ); > setOffsets(result, getIToken($getToken(1)), getIToken($getToken(4))); > $setResult(result); >- $EndJava >+ $EndCode > ./ > > packageDeclarationCS1 ::= contextDeclCSm >- /.$BeginJava >+ /.$BeginCode > EList contextDecls = (EList)$getSym(1); > CSTNode result = createPackageDeclarationCS(null, contextDecls); > if (!contextDecls.isEmpty()) { > setOffsets(result, (CSTNode)contextDecls.get(0), (CSTNode)contextDecls.get(contextDecls.size()-1)); > } > $setResult(result); >- $EndJava >+ $EndCode > ./ > > >- contextDeclCSmopt ::= $empty >+ contextDeclCSmopt ::= %empty > /.$EmptyListAction./ > contextDeclCSmopt -> contextDeclCSm > > contextDeclCSm ::= contextDeclCS >- /.$BeginJava >+ /.$BeginCode > EList result = new BasicEList(); > result.add($getSym(1)); > $setResult(result); >- $EndJava >+ $EndCode > ./ > contextDeclCSm ::= contextDeclCSm contextDeclCS >- /.$BeginJava >+ /.$BeginCode > EList result = (EList)$getSym(1); > result.add($getSym(2)); > $setResult(result); >- $EndJava >+ $EndCode > ./ > > contextDeclCS -> classifierContextDeclCS >@@ -140,7 +136,7 @@ > contextDeclCS -> propertyContextCS > > propertyContextCS ::= context pathNameCS '::' simpleNameCS ':' typeCS initOrDerValueCS >- /.$BeginJava >+ /.$BeginCode > CSTNode result = createPropertyContextCS( > (PathNameCS)$getSym(2), > (SimpleNameCS)$getSym(4), >@@ -149,11 +145,11 @@ > ); > setOffsets(result, getIToken($getToken(1)), (CSTNode)$getSym(7)); > $setResult(result); >- $EndJava >+ $EndCode > ./ > > initOrDerValueCS ::= initOrDerValueCSopt init ':' oclExpressionCS >- /.$BeginJava >+ /.$BeginCode > CSTNode result = createInitValueCS( > (InitOrDerValueCS)$getSym(1), > (OCLExpressionCS)$getSym(4) >@@ -164,11 +160,11 @@ > setOffsets(result, getIToken($getToken(2)), (CSTNode)$getSym(4)); > } > $setResult(result); >- $EndJava >+ $EndCode > ./ > > initOrDerValueCS ::= initOrDerValueCSopt derive ':' oclExpressionCS >- /.$BeginJava >+ /.$BeginCode > CSTNode result = createDerValueCS( > (InitOrDerValueCS)$getSym(1), > (OCLExpressionCS)$getSym(4) >@@ -179,15 +175,15 @@ > setOffsets(result, getIToken($getToken(2)), (CSTNode)$getSym(4)); > } > $setResult(result); >- $EndJava >+ $EndCode > ./ > >- initOrDerValueCSopt ::= $empty >+ initOrDerValueCSopt ::= %empty > /.$NullAction./ > initOrDerValueCSopt -> initOrDerValueCS > > classifierContextDeclCS ::= context pathNameCS invOrDefCSm >- /.$BeginJava >+ /.$BeginCode > EList<InvOrDefCS> list = (EList<InvOrDefCS>)$getSym(3); > CSTNode result = createClassifierContextDeclCS( > (PathNameCS)$getSym(2), >@@ -195,47 +191,47 @@ > ); > setOffsets(result, getIToken($getToken(1)), list.get(list.size()-1)); > $setResult(result); >- $EndJava >+ $EndCode > ./ > > invOrDefCSm ::= invOrDefCS >- /.$BeginJava >+ /.$BeginCode > EList<InvOrDefCS> result = new BasicEList<InvOrDefCS>(); > result.add((InvOrDefCS)$getSym(1)); > $setResult(result); >- $EndJava >+ $EndCode > ./ > invOrDefCSm ::= invOrDefCSm invOrDefCS >- /.$BeginJava >+ /.$BeginCode > EList<InvOrDefCS> result = (EList<InvOrDefCS>)$getSym(1); > result.add((InvOrDefCS)$getSym(2)); > $setResult(result); >- $EndJava >+ $EndCode > ./ > invOrDefCS ::= inv simpleNameCSopt ':' oclExpressionCS >- /.$BeginJava >+ /.$BeginCode > CSTNode result = createInvCS( > (SimpleNameCS)$getSym(2), > (OCLExpressionCS)$getSym(4) > ); > setOffsets(result, getIToken($getToken(1)), (CSTNode)$getSym(4)); > $setResult(result); >- $EndJava >+ $EndCode > ./ > > invOrDefCS ::= def simpleNameCSopt ':' defExpressionCS >- /.$BeginJava >+ /.$BeginCode > CSTNode result = createDefCS( > (SimpleNameCS)$getSym(2), > (DefExpressionCS)$getSym(4) > ); > setOffsets(result, getIToken($getToken(1)), (CSTNode)$getSym(4)); > $setResult(result); >- $EndJava >+ $EndCode > ./ > > defExpressionCS ::= typedVariableCS '=' oclExpressionCS >- /.$BeginJava >+ /.$BeginCode > VariableCS variableCS = (VariableCS)$getSym(1); > OCLExpressionCS expressionCS = (OCLExpressionCS)$getSym(3); > CSTNode result = createDefExpressionCS( >@@ -245,10 +241,10 @@ > ); > setOffsets(result, variableCS, expressionCS); > $setResult(result); >- $EndJava >+ $EndCode > ./ > defExpressionCS ::= operationCS1 '=' oclExpressionCS >- /.$BeginJava >+ /.$BeginCode > CSTNode result = createDefExpressionCS( > null, > (OperationCS)$getSym(1), >@@ -256,11 +252,11 @@ > ); > setOffsets(result, (CSTNode)$getSym(1), (CSTNode)$getSym(3)); > $setResult(result); >- $EndJava >+ $EndCode > ./ > > operationContextDeclCS ::= context operationCS2 prePostOrBodyDeclCSm >- /.$BeginJava >+ /.$BeginCode > EList prePostOrBodyDecls = (EList)$getSym(3); > CSTNode result = createOperationContextDeclCS( > (OperationCS)$getSym(2), >@@ -268,26 +264,26 @@ > ); > setOffsets(result, getIToken($getToken(1)), (CSTNode)prePostOrBodyDecls.get(prePostOrBodyDecls.size()-1)); > $setResult(result); >- $EndJava >+ $EndCode > ./ > > prePostOrBodyDeclCSm ::= prePostOrBodyDeclCS >- /.$BeginJava >+ /.$BeginCode > EList result = new BasicEList(); > result.add($getSym(1)); > $setResult(result); >- $EndJava >+ $EndCode > ./ > prePostOrBodyDeclCSm ::= prePostOrBodyDeclCSm prePostOrBodyDeclCS >- /.$BeginJava >+ /.$BeginCode > EList result = (EList)$getSym(1); > result.add($getSym(2)); > $setResult(result); >- $EndJava >+ $EndCode > ./ > > prePostOrBodyDeclCS ::= pre simpleNameCSopt ':' oclExpressionCS >- /.$BeginJava >+ /.$BeginCode > CSTNode result = createPrePostOrBodyDeclCS( > PrePostOrBodyEnum.PRE_LITERAL, > (SimpleNameCS)$getSym(2), >@@ -295,10 +291,10 @@ > ); > setOffsets(result, getIToken($getToken(1)), (CSTNode)$getSym(4)); > $setResult(result); >- $EndJava >+ $EndCode > ./ > prePostOrBodyDeclCS ::= post simpleNameCSopt ':' oclExpressionCS >- /.$BeginJava >+ /.$BeginCode > CSTNode result = createPrePostOrBodyDeclCS( > PrePostOrBodyEnum.POST_LITERAL, > (SimpleNameCS)$getSym(2), >@@ -306,10 +302,10 @@ > ); > setOffsets(result, getIToken($getToken(1)), (CSTNode)$getSym(4)); > $setResult(result); >- $EndJava >+ $EndCode > ./ > prePostOrBodyDeclCS ::= body simpleNameCSopt ':' oclExpressionCS >- /.$BeginJava >+ /.$BeginCode > CSTNode result = createPrePostOrBodyDeclCS( > PrePostOrBodyEnum.BODY_LITERAL, > (SimpleNameCS)$getSym(2), >@@ -317,6 +313,6 @@ > ); > setOffsets(result, getIToken($getToken(1)), (CSTNode)$getSym(4)); > $setResult(result); >- $EndJava >+ $EndCode > ./ >-$End >+%End >Index: src/org/eclipse/ocl/parser/OCLAnalyzer.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/parser/OCLAnalyzer.java,v >retrieving revision 1.9 >diff -u -r1.9 OCLAnalyzer.java >--- src/org/eclipse/ocl/parser/OCLAnalyzer.java 13 Jan 2009 19:44:29 -0000 1.9 >+++ src/org/eclipse/ocl/parser/OCLAnalyzer.java 2 Sep 2009 20:24:21 -0000 >@@ -86,10 +86,10 @@ > * @param environment > * the symbolic and problem handling environment > */ >- public OCLAnalyzer( >+ /*public OCLAnalyzer( > Environment<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> environment) { > this(new OCLParser(new OCLLexer(environment))); >- } >+ }*/ > > /** > * Construct an OCL semantic analyzer with default syntactic and lexical >@@ -105,7 +105,7 @@ > Environment<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> environment, > String text) { > this(new OCLParser(new OCLLexer(environment, text.toCharArray()))); >- getLexer().lexToTokens(getAbstractParser()); >+ getLexer().lexer(getAbstractParser().getIPrsStream()); > } > > /** >@@ -137,7 +137,7 @@ > * @return the parsed CST, or <code>null</code> if it could not be parsed > */ > public CSTNode parseConcreteSyntax() { >- return getAbstractParser().parseTokensToCST(); >+ return getAbstractParser().parser(); > } > > /** >Index: src/org/eclipse/ocl/parser/AbstractOCLParser.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/parser/AbstractOCLParser.java,v >retrieving revision 1.7 >diff -u -r1.7 AbstractOCLParser.java >--- src/org/eclipse/ocl/parser/AbstractOCLParser.java 5 Mar 2009 14:30:51 -0000 1.7 >+++ src/org/eclipse/ocl/parser/AbstractOCLParser.java 2 Sep 2009 20:24:21 -0000 >@@ -20,12 +20,8 @@ > */ > package org.eclipse.ocl.parser; > >-import lpg.lpgjavaruntime.IToken; >-import lpg.lpgjavaruntime.NullExportedSymbolsException; >-import lpg.lpgjavaruntime.NullTerminalSymbolsException; >-import lpg.lpgjavaruntime.ParseErrorCodes; >-import lpg.lpgjavaruntime.UndefinedEofSymbolException; >-import lpg.lpgjavaruntime.UnimplementedTerminalsException; >+import lpg.runtime.IToken; >+import lpg.runtime.ParseErrorCodes; > > import org.eclipse.emf.common.util.EList; > import org.eclipse.ocl.cst.BooleanLiteralExpCS; >@@ -82,21 +78,17 @@ > import org.eclipse.ocl.internal.l10n.OCLMessages; > import org.eclipse.ocl.lpg.AbstractLexer; > import org.eclipse.ocl.lpg.AbstractParser; >-import org.eclipse.ocl.lpg.BasicEnvironment; > import org.eclipse.ocl.lpg.ProblemHandler; > import org.eclipse.ocl.options.ParsingOptions; > import org.eclipse.ocl.options.ProblemOption; > >+ > public abstract class AbstractOCLParser > extends AbstractParser { > >- public AbstractOCLParser(BasicEnvironment environment) { >- super(environment); >- } >- >- @SuppressWarnings("nls") >- public AbstractOCLParser(AbstractLexer lexStream) { >- super(lexStream); >+ public AbstractOCLParser(AbstractLexer lexer) { >+ super(lexer); >+ /*super(lexStream); > > try { > super.remapTerminalSymbols(orderedTerminalSymbols(), >@@ -118,7 +110,7 @@ > throw new RuntimeException( > "The Lexer does not implement the Eof symbol " > + OCLParsersym.orderedTerminalSymbols[OCLParserprs.EOFT_SYMBOL]); >- } >+ }*/ > } > > protected PackageDeclarationCS createPackageDeclarationCS( >@@ -718,7 +710,7 @@ > * @param stringLiteral a string literal token with escape notation > * @return the unescaped string > * >- * @since 1.3 >+ * @since 3.0 > */ > protected String unescape(IToken stringLiteral) { > String rawString = stringLiteral.toString(); >@@ -741,9 +733,9 @@ > } > i++; > if (i >= n) { >- reportError( >+ getIPrsStream().reportError( > ParseErrorCodes.INVALID_CODE, >- "", stringLiteral.getTokenIndex(), stringLiteral.getTokenIndex(), //$NON-NLS-1$ >+ stringLiteral.getTokenIndex(), stringLiteral.getTokenIndex(), > OCLMessages.StringNotProperlyClosed_ERROR); > } > char nextCh = rawString.charAt(i); >@@ -810,9 +802,9 @@ > .append((char) unescapedChar); > } > if (unescapedChar < 0) { >- reportError( >+ getIPrsStream().reportError( > ParseErrorCodes.INVALID_CODE, >- "", stringLiteral.getTokenIndex(), stringLiteral.getTokenIndex(), //$NON-NLS-1$ >+ stringLiteral.getTokenIndex(), stringLiteral.getTokenIndex(), > OCLMessages.InvalidEscapeSequence_ERROR); > } > break; >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/META-INF/MANIFEST.MF,v >retrieving revision 1.14 >diff -u -r1.14 MANIFEST.MF >--- META-INF/MANIFEST.MF 25 Aug 2009 20:30:37 -0000 1.14 >+++ META-INF/MANIFEST.MF 2 Sep 2009 20:23:43 -0000 >@@ -32,7 +32,7 @@ > Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)", > org.eclipse.emf.ecore;bundle-version="[2.4.0,3.0.0)";visibility:=reexport, > org.eclipse.emf.ecore.xmi;bundle-version="[2.4.0,3.0.0)";visibility:=reexport, >- net.sourceforge.lpg.lpgjavaruntime;version="[1.0.0,1.2.0)";visibility:=reexport >+ lpg.runtime;bundle-version="2.0.17";visibility:=reexport > Bundle-Activator: org.eclipse.ocl.internal.OCLPlugin$Implementation > Eclipse-LazyStart: true > Bundle-ActivationPolicy: lazy >Index: src/org/eclipse/ocl/util/TypeUtil.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/util/TypeUtil.java,v >retrieving revision 1.17 >diff -u -r1.17 TypeUtil.java >--- src/org/eclipse/ocl/util/TypeUtil.java 25 Jun 2009 19:23:52 -0000 1.17 >+++ src/org/eclipse/ocl/util/TypeUtil.java 2 Sep 2009 20:24:30 -0000 >@@ -12,7 +12,7 @@ > * E.D.Willink - Refactoring to support extensibility and flexible error handling > * Zeligsoft - Bugs 244886, 245619, 233673, 179990, 242236 > * Stefan Schulze - Bug 245619 >- * Adolfo Sánchez-Barbudo Herrera - Bug 233673 >+ * Adolfo Sanchez-Barbudo Herrera - Bug 233673 > * > * </copyright> > * >@@ -33,6 +33,7 @@ > import org.eclipse.ocl.SemanticException; > import org.eclipse.ocl.TypeChecker; > import org.eclipse.ocl.expressions.CollectionKind; >+import org.eclipse.ocl.expressions.OCLExpression; > import org.eclipse.ocl.expressions.Variable; > import org.eclipse.ocl.internal.OCLPlugin; > import org.eclipse.ocl.internal.l10n.OCLMessages; >Index: src/org/eclipse/ocl/util/OCLStandardLibraryUtil.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/util/OCLStandardLibraryUtil.java,v >retrieving revision 1.14 >diff -u -r1.14 OCLStandardLibraryUtil.java >--- src/org/eclipse/ocl/util/OCLStandardLibraryUtil.java 1 Sep 2009 20:11:23 -0000 1.14 >+++ src/org/eclipse/ocl/util/OCLStandardLibraryUtil.java 2 Sep 2009 20:24:29 -0000 >@@ -19,7 +19,166 @@ > */ > package org.eclipse.ocl.util; > >-import static org.eclipse.ocl.utilities.PredefinedType.*; >+import static org.eclipse.ocl.utilities.PredefinedType.ABS; >+import static org.eclipse.ocl.utilities.PredefinedType.ABS_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.ALL_INSTANCES; >+import static org.eclipse.ocl.utilities.PredefinedType.ALL_INSTANCES_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.AND; >+import static org.eclipse.ocl.utilities.PredefinedType.AND_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.ANY; >+import static org.eclipse.ocl.utilities.PredefinedType.ANY_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.APPEND; >+import static org.eclipse.ocl.utilities.PredefinedType.APPEND_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.AS_BAG; >+import static org.eclipse.ocl.utilities.PredefinedType.AS_BAG_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.AS_ORDERED_SET; >+import static org.eclipse.ocl.utilities.PredefinedType.AS_ORDERED_SET_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.AS_SEQUENCE; >+import static org.eclipse.ocl.utilities.PredefinedType.AS_SEQUENCE_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.AS_SET; >+import static org.eclipse.ocl.utilities.PredefinedType.AS_SET_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.AT; >+import static org.eclipse.ocl.utilities.PredefinedType.AT_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.CLOSURE; >+import static org.eclipse.ocl.utilities.PredefinedType.CLOSURE_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.COLLECT; >+import static org.eclipse.ocl.utilities.PredefinedType.COLLECT_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.COLLECT_NESTED; >+import static org.eclipse.ocl.utilities.PredefinedType.COLLECT_NESTED_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.CONCAT; >+import static org.eclipse.ocl.utilities.PredefinedType.CONCAT_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.COUNT; >+import static org.eclipse.ocl.utilities.PredefinedType.COUNT_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.DIV; >+import static org.eclipse.ocl.utilities.PredefinedType.DIVIDE; >+import static org.eclipse.ocl.utilities.PredefinedType.DIVIDE_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.DIV_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.EQUAL; >+import static org.eclipse.ocl.utilities.PredefinedType.EQUAL_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.EXCLUDES; >+import static org.eclipse.ocl.utilities.PredefinedType.EXCLUDES_ALL; >+import static org.eclipse.ocl.utilities.PredefinedType.EXCLUDES_ALL_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.EXCLUDES_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.EXCLUDING; >+import static org.eclipse.ocl.utilities.PredefinedType.EXCLUDING_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.EXISTS; >+import static org.eclipse.ocl.utilities.PredefinedType.EXISTS_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.FIRST; >+import static org.eclipse.ocl.utilities.PredefinedType.FIRST_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.FLATTEN; >+import static org.eclipse.ocl.utilities.PredefinedType.FLATTEN_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.FLOOR; >+import static org.eclipse.ocl.utilities.PredefinedType.FLOOR_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.FOR_ALL; >+import static org.eclipse.ocl.utilities.PredefinedType.FOR_ALL_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.GREATER_THAN; >+import static org.eclipse.ocl.utilities.PredefinedType.GREATER_THAN_EQUAL; >+import static org.eclipse.ocl.utilities.PredefinedType.GREATER_THAN_EQUAL_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.GREATER_THAN_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.HAS_RETURNED; >+import static org.eclipse.ocl.utilities.PredefinedType.HAS_RETURNED_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.IMPLIES; >+import static org.eclipse.ocl.utilities.PredefinedType.IMPLIES_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.INCLUDES; >+import static org.eclipse.ocl.utilities.PredefinedType.INCLUDES_ALL; >+import static org.eclipse.ocl.utilities.PredefinedType.INCLUDES_ALL_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.INCLUDES_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.INCLUDING; >+import static org.eclipse.ocl.utilities.PredefinedType.INCLUDING_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.INDEX_OF; >+import static org.eclipse.ocl.utilities.PredefinedType.INDEX_OF_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.INSERT_AT; >+import static org.eclipse.ocl.utilities.PredefinedType.INSERT_AT_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.INTERSECTION; >+import static org.eclipse.ocl.utilities.PredefinedType.INTERSECTION_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.IS_EMPTY; >+import static org.eclipse.ocl.utilities.PredefinedType.IS_EMPTY_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.IS_OPERATION_CALL; >+import static org.eclipse.ocl.utilities.PredefinedType.IS_OPERATION_CALL_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.IS_SIGNAL_SENT; >+import static org.eclipse.ocl.utilities.PredefinedType.IS_SIGNAL_SENT_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.IS_UNIQUE; >+import static org.eclipse.ocl.utilities.PredefinedType.IS_UNIQUE_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.LAST; >+import static org.eclipse.ocl.utilities.PredefinedType.LAST_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.LESS_THAN; >+import static org.eclipse.ocl.utilities.PredefinedType.LESS_THAN_EQUAL; >+import static org.eclipse.ocl.utilities.PredefinedType.LESS_THAN_EQUAL_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.LESS_THAN_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.MAX; >+import static org.eclipse.ocl.utilities.PredefinedType.MAX_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.MIN; >+import static org.eclipse.ocl.utilities.PredefinedType.MINUS; >+import static org.eclipse.ocl.utilities.PredefinedType.MINUS_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.MIN_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.MOD; >+import static org.eclipse.ocl.utilities.PredefinedType.MOD_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.NOT; >+import static org.eclipse.ocl.utilities.PredefinedType.NOT_EMPTY; >+import static org.eclipse.ocl.utilities.PredefinedType.NOT_EMPTY_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.NOT_EQUAL; >+import static org.eclipse.ocl.utilities.PredefinedType.NOT_EQUAL_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.NOT_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.OCL_AS_TYPE; >+import static org.eclipse.ocl.utilities.PredefinedType.OCL_AS_TYPE_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.OCL_IS_INVALID; >+import static org.eclipse.ocl.utilities.PredefinedType.OCL_IS_INVALID_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.OCL_IS_IN_STATE; >+import static org.eclipse.ocl.utilities.PredefinedType.OCL_IS_IN_STATE_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.OCL_IS_KIND_OF; >+import static org.eclipse.ocl.utilities.PredefinedType.OCL_IS_KIND_OF_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.OCL_IS_NEW; >+import static org.eclipse.ocl.utilities.PredefinedType.OCL_IS_NEW_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.OCL_IS_TYPE_OF; >+import static org.eclipse.ocl.utilities.PredefinedType.OCL_IS_TYPE_OF_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.OCL_IS_UNDEFINED; >+import static org.eclipse.ocl.utilities.PredefinedType.OCL_IS_UNDEFINED_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.ONE; >+import static org.eclipse.ocl.utilities.PredefinedType.ONE_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.OR; >+import static org.eclipse.ocl.utilities.PredefinedType.OR_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.PLUS; >+import static org.eclipse.ocl.utilities.PredefinedType.PLUS_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.PREPEND; >+import static org.eclipse.ocl.utilities.PredefinedType.PREPEND_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.PRODUCT; >+import static org.eclipse.ocl.utilities.PredefinedType.PRODUCT_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.REJECT; >+import static org.eclipse.ocl.utilities.PredefinedType.REJECT_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.RESULT; >+import static org.eclipse.ocl.utilities.PredefinedType.RESULT_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.ROUND; >+import static org.eclipse.ocl.utilities.PredefinedType.ROUND_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.SELECT; >+import static org.eclipse.ocl.utilities.PredefinedType.SELECT_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.SIZE; >+import static org.eclipse.ocl.utilities.PredefinedType.SIZE_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.SORTED_BY; >+import static org.eclipse.ocl.utilities.PredefinedType.SORTED_BY_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.SUBSTRING; >+import static org.eclipse.ocl.utilities.PredefinedType.SUBSTRING_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.SUB_ORDERED_SET; >+import static org.eclipse.ocl.utilities.PredefinedType.SUB_ORDERED_SET_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.SUB_SEQUENCE; >+import static org.eclipse.ocl.utilities.PredefinedType.SUB_SEQUENCE_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.SUM; >+import static org.eclipse.ocl.utilities.PredefinedType.SUM_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.SYMMETRIC_DIFFERENCE; >+import static org.eclipse.ocl.utilities.PredefinedType.SYMMETRIC_DIFFERENCE_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.TIMES; >+import static org.eclipse.ocl.utilities.PredefinedType.TIMES_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.TO_INTEGER; >+import static org.eclipse.ocl.utilities.PredefinedType.TO_INTEGER_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.TO_LOWER; >+import static org.eclipse.ocl.utilities.PredefinedType.TO_LOWER_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.TO_REAL; >+import static org.eclipse.ocl.utilities.PredefinedType.TO_REAL_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.TO_UPPER; >+import static org.eclipse.ocl.utilities.PredefinedType.TO_UPPER_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.UNION; >+import static org.eclipse.ocl.utilities.PredefinedType.UNION_NAME; >+import static org.eclipse.ocl.utilities.PredefinedType.XOR; >+import static org.eclipse.ocl.utilities.PredefinedType.XOR_NAME; > > import java.util.Arrays; > import java.util.Collection; >Index: src/org/eclipse/ocl/internal/helper/OCLSyntaxHelper.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/internal/helper/OCLSyntaxHelper.java,v >retrieving revision 1.14 >diff -u -r1.14 OCLSyntaxHelper.java >--- src/org/eclipse/ocl/internal/helper/OCLSyntaxHelper.java 25 Jun 2009 19:23:52 -0000 1.14 >+++ src/org/eclipse/ocl/internal/helper/OCLSyntaxHelper.java 2 Sep 2009 20:24:19 -0000 >@@ -28,7 +28,8 @@ > import java.util.ListIterator; > import java.util.Set; > >-import lpg.lpgjavaruntime.IToken; >+import lpg.runtime.IPrsStream; >+import lpg.runtime.IToken; > > import org.eclipse.emf.ecore.EObject; > import org.eclipse.emf.ecore.util.EcoreUtil; >@@ -69,7 +70,6 @@ > import org.eclipse.ocl.helper.Choice; > import org.eclipse.ocl.helper.ChoiceKind; > import org.eclipse.ocl.helper.ConstraintKind; >-import org.eclipse.ocl.lpg.AbstractParser; > import org.eclipse.ocl.lpg.ProblemHandler; > import org.eclipse.ocl.parser.AbstractOCLAnalyzer; > import org.eclipse.ocl.parser.OCLAnalyzer; >@@ -865,7 +865,7 @@ > private List<IToken> tokenize(OCLAnalyzer<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> analyzer) { > IToken token = null; > List<IToken> result = new ArrayList<IToken>(); >- AbstractParser parser = analyzer.getAbstractParser(); >+ IPrsStream parser = analyzer.getAbstractParser().getIPrsStream(); > for (;;) { > try { > token = parser.getIToken(parser.getToken()); >@@ -949,7 +949,7 @@ > OCLAnalyzer<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> analyzer = > new OCLAnalyzer<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E>( > environment, txt); >- AbstractParser parser = analyzer.getAbstractParser(); >+ IPrsStream parser = analyzer.getAbstractParser().getIPrsStream(); > List<IToken> tokens = tokenize(analyzer); > > ListIterator<IToken> iter = tokens.listIterator(tokens.size()); >@@ -1100,7 +1100,7 @@ > private List<String> parseTokensPathNameCS( > OCLAnalyzer<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> analyzer, > List<IToken> tokens) { >- AbstractParser parser = analyzer.getAbstractParser(); >+ IPrsStream parser = analyzer.getAbstractParser().getIPrsStream(); > ArrayList<String> path = new ArrayList<String>(); > IToken token; > int index = tokens.size() - 1; >@@ -1145,7 +1145,7 @@ > // right-most subexpression that parses > > // initialize the token list >- analyzer.getLexer().reset(); >+ analyzer.getLexer().getILexStream().reset(); > List<IToken> tokens = tokenize(analyzer); > > ListIterator<IToken> it = tokens.listIterator(tokens.size()); >@@ -1350,7 +1350,7 @@ > env, variables); > > if (!parseVariableDeclaration(env, mainAnalyzer)) { >- AbstractParser parser = mainAnalyzer.getAbstractParser(); >+ IPrsStream parser = mainAnalyzer.getAbstractParser().getIPrsStream(); > parser.reset(); > OCLAnalyzer<PK, C, O, P, EL, PM, S, COA, SSA, CT, CLS, E> analyzer; > String newTxt; >Index: src/org/eclipse/ocl/cst/util/CSTSwitch.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/cst/util/CSTSwitch.java,v >retrieving revision 1.5 >diff -u -r1.5 CSTSwitch.java >--- src/org/eclipse/ocl/cst/util/CSTSwitch.java 2 Dec 2008 11:58:50 -0000 1.5 >+++ src/org/eclipse/ocl/cst/util/CSTSwitch.java 2 Sep 2009 20:24:02 -0000 >@@ -21,8 +21,6 @@ > > import org.eclipse.emf.ecore.EClass; > import org.eclipse.emf.ecore.EObject; >- >-//import org.eclipse.ocl.cst.*; > import org.eclipse.ocl.cst.BooleanLiteralExpCS; > import org.eclipse.ocl.cst.CSTNode; > import org.eclipse.ocl.cst.CSTPackage; >Index: src/org/eclipse/ocl/cst/util/CSTAdapterFactory.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/cst/util/CSTAdapterFactory.java,v >retrieving revision 1.6 >diff -u -r1.6 CSTAdapterFactory.java >--- src/org/eclipse/ocl/cst/util/CSTAdapterFactory.java 2 Dec 2008 11:58:50 -0000 1.6 >+++ src/org/eclipse/ocl/cst/util/CSTAdapterFactory.java 2 Sep 2009 20:24:00 -0000 >@@ -21,8 +21,6 @@ > import org.eclipse.emf.common.notify.Notifier; > import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; > import org.eclipse.emf.ecore.EObject; >- >-//import org.eclipse.ocl.cst.*; > import org.eclipse.ocl.cst.BooleanLiteralExpCS; > import org.eclipse.ocl.cst.CSTNode; > import org.eclipse.ocl.cst.CSTPackage; >Index: src/org/eclipse/ocl/types/TupleType.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/TupleType.java,v >retrieving revision 1.7 >diff -u -r1.7 TupleType.java >--- src/org/eclipse/ocl/types/TupleType.java 30 Nov 2008 22:11:38 -0000 1.7 >+++ src/org/eclipse/ocl/types/TupleType.java 2 Sep 2009 20:24:22 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.types; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.common.util.EList; > import org.eclipse.ocl.utilities.PredefinedType; >Index: src/org/eclipse/ocl/types/MessageType.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/MessageType.java,v >retrieving revision 1.7 >diff -u -r1.7 MessageType.java >--- src/org/eclipse/ocl/types/MessageType.java 30 Nov 2008 22:11:38 -0000 1.7 >+++ src/org/eclipse/ocl/types/MessageType.java 2 Sep 2009 20:24:22 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.types; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.common.util.EList; > import org.eclipse.ocl.utilities.PredefinedType; >Index: src/org/eclipse/ocl/types/CollectionType.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/CollectionType.java,v >retrieving revision 1.7 >diff -u -r1.7 CollectionType.java >--- src/org/eclipse/ocl/types/CollectionType.java 30 Nov 2008 22:11:38 -0000 1.7 >+++ src/org/eclipse/ocl/types/CollectionType.java 2 Sep 2009 20:24:22 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.ocl.types; > > import java.util.Map; >+ > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.common.util.EList; > import org.eclipse.ocl.expressions.CollectionKind; >Index: .settings/.api_filters >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/.settings/.api_filters,v >retrieving revision 1.7 >diff -u -r1.7 .api_filters >--- .settings/.api_filters 1 Sep 2009 20:11:23 -0000 1.7 >+++ .settings/.api_filters 2 Sep 2009 20:23:43 -0000 >@@ -1,8 +1,207 @@ > <?xml version="1.0" encoding="UTF-8" standalone="no"?> > <component id="org.eclipse.ocl" version="2"> >+ <resource path="src/org/eclipse/ocl/parser/OCLKWLexerprs.java" type="org.eclipse.ocl.parser.OCLKWLexerprs"> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="MAX_NAME_LENGTH"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="isNullable"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="SCOPE_SIZE"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="SCOPE_UBOUND"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="prosthesesIndex"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="isNullable(int)"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="getIdentifier_SYMBOL()"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="ERROR_SYMBOL"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="prosthesesIndex(int)"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/OCLKWLexerprs.java" type="org.eclipse.ocl.parser.OCLKWLexerprs$IsNullable"> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="IsNullable"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/OCLKWLexerprs.java" type="org.eclipse.ocl.parser.OCLKWLexerprs$ProsthesesIndex"> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="ProsthesesIndex"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/OCLKWLexersym.java" type="org.eclipse.ocl.parser.OCLKWLexersym"> >+ <filter id="1211105284"> >+ <message_arguments> >+ <message_argument value="Char__"/> >+ </message_arguments> >+ </filter> >+ <filter id="1211105284"> >+ <message_arguments> >+ <message_argument value="numTokenKinds"/> >+ </message_arguments> >+ </filter> >+ <filter id="1211105284"> >+ <message_arguments> >+ <message_argument value="Char_Percent"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/OCLLexerprs.java" type="org.eclipse.ocl.parser.OCLLexerprs"> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="SCOPE_UBOUND"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="MAX_NAME_LENGTH"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="isNullable(int)"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="getIdentifier_SYMBOL()"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="SCOPE_SIZE"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="isNullable"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="prosthesesIndex(int)"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="ERROR_SYMBOL"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="prosthesesIndex"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/OCLLexerprs.java" type="org.eclipse.ocl.parser.OCLLexerprs$IsNullable"> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="IsNullable"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/OCLLexerprs.java" type="org.eclipse.ocl.parser.OCLLexerprs$ProsthesesIndex"> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="ProsthesesIndex"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/OCLLexersym.java" type="org.eclipse.ocl.parser.OCLLexersym"> >+ <filter id="1211105284"> >+ <message_arguments> >+ <message_argument value="numTokenKinds"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/OCLParser.java" type="org.eclipse.ocl.parser.OCLParser"> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="getParser()"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/OCLParserprs.java" type="org.eclipse.ocl.parser.OCLParserprs"> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="prosthesesIndex(int)"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="prosthesesIndex"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="isNullable(int)"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="isNullable"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="getIdentifier_SYMBOL()"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/OCLParserprs.java" type="org.eclipse.ocl.parser.OCLParserprs$IsNullable"> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="IsNullable"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/OCLParserprs.java" type="org.eclipse.ocl.parser.OCLParserprs$ProsthesesIndex"> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="ProsthesesIndex"/> >+ </message_arguments> >+ </filter> >+ </resource> > <resource path="src/org/eclipse/ocl/parser/OCLParsersym.java" type="org.eclipse.ocl.parser.OCLParsersym"> > <filter id="1211105284"> > <message_arguments> >+ <message_argument value="numTokenKinds"/> >+ </message_arguments> >+ </filter> >+ <filter id="1211105284"> >+ <message_arguments> > <message_argument value="TK_MULTI_LINE_COMMENT"/> > </message_arguments> > </filter> >@@ -17,6 +216,200 @@ > </message_arguments> > </filter> > </resource> >+ <resource path="src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingKWLexerprs.java" type="org.eclipse.ocl.parser.backtracking.OCLBacktrackingKWLexerprs"> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="MAX_NAME_LENGTH"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="prosthesesIndex"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="isNullable"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="ERROR_SYMBOL"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="getIdentifier_SYMBOL()"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="SCOPE_SIZE"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="SCOPE_UBOUND"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="prosthesesIndex(int)"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="isNullable(int)"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingKWLexerprs.java" type="org.eclipse.ocl.parser.backtracking.OCLBacktrackingKWLexerprs$IsNullable"> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="IsNullable"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingKWLexerprs.java" type="org.eclipse.ocl.parser.backtracking.OCLBacktrackingKWLexerprs$ProsthesesIndex"> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="ProsthesesIndex"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingKWLexersym.java" type="org.eclipse.ocl.parser.backtracking.OCLBacktrackingKWLexersym"> >+ <filter id="1211105284"> >+ <message_arguments> >+ <message_argument value="Char__"/> >+ </message_arguments> >+ </filter> >+ <filter id="1211105284"> >+ <message_arguments> >+ <message_argument value="Char_Percent"/> >+ </message_arguments> >+ </filter> >+ <filter id="1211105284"> >+ <message_arguments> >+ <message_argument value="numTokenKinds"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingLexerprs.java" type="org.eclipse.ocl.parser.backtracking.OCLBacktrackingLexerprs"> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="isNullable"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="isNullable(int)"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="getIdentifier_SYMBOL()"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="MAX_NAME_LENGTH"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="ERROR_SYMBOL"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="prosthesesIndex"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="SCOPE_SIZE"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="SCOPE_UBOUND"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="prosthesesIndex(int)"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingLexerprs.java" type="org.eclipse.ocl.parser.backtracking.OCLBacktrackingLexerprs$IsNullable"> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="IsNullable"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingLexerprs.java" type="org.eclipse.ocl.parser.backtracking.OCLBacktrackingLexerprs$ProsthesesIndex"> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="ProsthesesIndex"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingLexersym.java" type="org.eclipse.ocl.parser.backtracking.OCLBacktrackingLexersym"> >+ <filter id="1211105284"> >+ <message_arguments> >+ <message_argument value="numTokenKinds"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingParser.java" type="org.eclipse.ocl.parser.backtracking.OCLBacktrackingParser"> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="getParser()"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingParserprs.java" type="org.eclipse.ocl.parser.backtracking.OCLBacktrackingParserprs"> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="prosthesesIndex(int)"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="prosthesesIndex"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="getIdentifier_SYMBOL()"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="isNullable(int)"/> >+ </message_arguments> >+ </filter> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="isNullable"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingParserprs.java" type="org.eclipse.ocl.parser.backtracking.OCLBacktrackingParserprs$IsNullable"> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="IsNullable"/> >+ </message_arguments> >+ </filter> >+ </resource> >+ <resource path="src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingParserprs.java" type="org.eclipse.ocl.parser.backtracking.OCLBacktrackingParserprs$ProsthesesIndex"> >+ <filter id="1143996420"> >+ <message_arguments> >+ <message_argument value="ProsthesesIndex"/> >+ </message_arguments> >+ </filter> >+ </resource> > <resource path="src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingParsersym.java" type="org.eclipse.ocl.parser.backtracking.OCLBacktrackingParsersym"> > <filter id="1211105284"> > <message_arguments> >@@ -33,5 +426,10 @@ > <message_argument value="TK_invalid"/> > </message_arguments> > </filter> >+ <filter id="1211105284"> >+ <message_arguments> >+ <message_argument value="numTokenKinds"/> >+ </message_arguments> >+ </filter> > </resource> > </component> >Index: src/org/eclipse/ocl/utilities/util/UtilitiesSwitch.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/utilities/util/UtilitiesSwitch.java,v >retrieving revision 1.8 >diff -u -r1.8 UtilitiesSwitch.java >--- src/org/eclipse/ocl/utilities/util/UtilitiesSwitch.java 23 Jan 2009 17:16:04 -0000 1.8 >+++ src/org/eclipse/ocl/utilities/util/UtilitiesSwitch.java 2 Sep 2009 20:24:30 -0000 >@@ -19,8 +19,6 @@ > > import org.eclipse.emf.ecore.EClass; > import org.eclipse.emf.ecore.EObject; >- >-//import org.eclipse.ocl.utilities.*; > import org.eclipse.ocl.utilities.ASTNode; > import org.eclipse.ocl.utilities.CallingASTNode; > import org.eclipse.ocl.utilities.ExpressionInOCL; >Index: src/org/eclipse/ocl/utilities/util/UtilitiesAdapterFactory.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/utilities/util/UtilitiesAdapterFactory.java,v >retrieving revision 1.8 >diff -u -r1.8 UtilitiesAdapterFactory.java >--- src/org/eclipse/ocl/utilities/util/UtilitiesAdapterFactory.java 23 Jan 2009 17:16:04 -0000 1.8 >+++ src/org/eclipse/ocl/utilities/util/UtilitiesAdapterFactory.java 2 Sep 2009 20:24:30 -0000 >@@ -19,8 +19,6 @@ > import org.eclipse.emf.common.notify.Notifier; > import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; > import org.eclipse.emf.ecore.EObject; >- >-//import org.eclipse.ocl.utilities.*; > import org.eclipse.ocl.utilities.ASTNode; > import org.eclipse.ocl.utilities.CallingASTNode; > import org.eclipse.ocl.utilities.ExpressionInOCL; >Index: src/org/eclipse/ocl/utilities/impl/UtilitiesFactoryImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/utilities/impl/UtilitiesFactoryImpl.java,v >retrieving revision 1.6 >diff -u -r1.6 UtilitiesFactoryImpl.java >--- src/org/eclipse/ocl/utilities/impl/UtilitiesFactoryImpl.java 23 Jan 2009 17:16:04 -0000 1.6 >+++ src/org/eclipse/ocl/utilities/impl/UtilitiesFactoryImpl.java 2 Sep 2009 20:24:30 -0000 >@@ -20,8 +20,6 @@ > import org.eclipse.emf.ecore.EPackage; > import org.eclipse.emf.ecore.impl.EFactoryImpl; > import org.eclipse.emf.ecore.plugin.EcorePlugin; >- >-//import org.eclipse.ocl.utilities.*; > import org.eclipse.ocl.utilities.UtilitiesFactory; > import org.eclipse.ocl.utilities.UtilitiesPackage; > >Index: src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingParser.g >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingParser.g,v >retrieving revision 1.1 >diff -u -r1.1 OCLBacktrackingParser.g >--- src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingParser.g 13 Jan 2009 20:31:30 -0000 1.1 >+++ src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingParser.g 2 Sep 2009 20:24:22 -0000 >@@ -1,7 +1,7 @@ > --/** > -- * <copyright> > -- * >--- * Copyright (c) 2008, 2009 Eclipse.org and others. >+-- * Copyright (c) 2008, 2009 Eclipse.org, Open Canarias S.L. 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 >@@ -9,6 +9,7 @@ > -- * > -- * Contributors: > -- * E.D. Willink - Initial API and implementation >+-- * Adolfo Sanchez-Barbudo Herrera - LPG v2.0.17 adoption > -- * > -- * </copyright> > -- * >@@ -25,35 +26,31 @@ > > %options escape=$ > %options la=2 >-%options table=java > %options fp=OCLBacktrackingParser,prefix=TK_ >-%options error-maps >-%options scopes >-%options margin=4 > %options backtrack > %options noserialize > %options package=org.eclipse.ocl.parser.backtracking >-%options import_terminals=OCLBacktrackingLexer.g >+%options import_terminals=OCLBacktrackingLexer.gi > %options ast_type=CSTNode >-%options programming_language=java >-%options action=("*.java", "/.", "./") >-%options ParseTable=lpg.lpgjavaruntime.ParseTable >+%options ParseTable=lpg.runtime.ParseTable >+%options template=dtParserTemplateF.gi > %options include_directory=".;..;../../lpg" > >-$Include >- OCLParserErrors.g >-$End >+%Import >+ OCLParserErrors.gi >+%End > >-$Globals >+%Globals > /. > import org.eclipse.ocl.parser.AbstractOCLParser; > ./ >-$End >+%End > >-$Define >+%Define > $lex_stream_class /.OCLBacktrackingLexer./ > $prs_parser_class /.BacktrackingParser./ > $prs_parser_exception /.NotBacktrackParseTableException./ > $prs_parser_throw /.throw new RuntimeException("****Error: Regenerate $prs_type.java with -BACKTRACK option")./ > $prs_parse_args /.error_repair_count./ >-$End >+%End >+ >Index: src/org/eclipse/ocl/types/util/TypesSwitch.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/util/TypesSwitch.java,v >retrieving revision 1.6 >diff -u -r1.6 TypesSwitch.java >--- src/org/eclipse/ocl/types/util/TypesSwitch.java 12 Oct 2008 01:09:50 -0000 1.6 >+++ src/org/eclipse/ocl/types/util/TypesSwitch.java 2 Sep 2009 20:24:26 -0000 >@@ -20,8 +20,6 @@ > //import java.util.List; > import org.eclipse.emf.ecore.EClass; > import org.eclipse.emf.ecore.EObject; >- >-//import org.eclipse.ocl.types.*; > import org.eclipse.ocl.types.AnyType; > import org.eclipse.ocl.types.BagType; > import org.eclipse.ocl.types.CollectionType; >Index: src/org/eclipse/ocl/types/util/TypesValidator.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/util/TypesValidator.java,v >retrieving revision 1.3 >diff -u -r1.3 TypesValidator.java >--- src/org/eclipse/ocl/types/util/TypesValidator.java 24 Nov 2008 00:22:24 -0000 1.3 >+++ src/org/eclipse/ocl/types/util/TypesValidator.java 2 Sep 2009 20:24:27 -0000 >@@ -19,14 +19,11 @@ > > import java.util.Map; > >-//import org.eclipse.emf.common.util.Diagnostic; > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.common.util.ResourceLocator; > import org.eclipse.emf.ecore.EPackage; > import org.eclipse.emf.ecore.util.EObjectValidator; > import org.eclipse.ocl.internal.OCLPlugin; >- >-//import org.eclipse.ocl.types.*; > import org.eclipse.ocl.types.AnyType; > import org.eclipse.ocl.types.BagType; > import org.eclipse.ocl.types.CollectionType; >Index: src/org/eclipse/ocl/types/util/TypesAdapterFactory.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/types/util/TypesAdapterFactory.java,v >retrieving revision 1.7 >diff -u -r1.7 TypesAdapterFactory.java >--- src/org/eclipse/ocl/types/util/TypesAdapterFactory.java 12 Oct 2008 01:09:50 -0000 1.7 >+++ src/org/eclipse/ocl/types/util/TypesAdapterFactory.java 2 Sep 2009 20:24:26 -0000 >@@ -21,8 +21,6 @@ > import org.eclipse.emf.common.notify.Notifier; > import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; > import org.eclipse.emf.ecore.EObject; >- >-//import org.eclipse.ocl.types.*; > import org.eclipse.ocl.types.AnyType; > import org.eclipse.ocl.types.BagType; > import org.eclipse.ocl.types.CollectionType; >Index: src/org/eclipse/ocl/expressions/util/ExpressionsValidator.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/util/ExpressionsValidator.java,v >retrieving revision 1.2 >diff -u -r1.2 ExpressionsValidator.java >--- src/org/eclipse/ocl/expressions/util/ExpressionsValidator.java 12 Oct 2008 01:09:50 -0000 1.2 >+++ src/org/eclipse/ocl/expressions/util/ExpressionsValidator.java 2 Sep 2009 20:24:17 -0000 >@@ -21,12 +21,45 @@ > > import org.eclipse.emf.common.util.DiagnosticChain; > import org.eclipse.emf.common.util.ResourceLocator; >- > import org.eclipse.emf.ecore.EPackage; >- > import org.eclipse.emf.ecore.util.EObjectValidator; >- >-import org.eclipse.ocl.expressions.*; >+import org.eclipse.ocl.expressions.AssociationClassCallExp; >+import org.eclipse.ocl.expressions.BooleanLiteralExp; >+import org.eclipse.ocl.expressions.CallExp; >+import org.eclipse.ocl.expressions.CollectionItem; >+import org.eclipse.ocl.expressions.CollectionKind; >+import org.eclipse.ocl.expressions.CollectionLiteralExp; >+import org.eclipse.ocl.expressions.CollectionLiteralPart; >+import org.eclipse.ocl.expressions.CollectionRange; >+import org.eclipse.ocl.expressions.EnumLiteralExp; >+import org.eclipse.ocl.expressions.ExpressionsPackage; >+import org.eclipse.ocl.expressions.FeatureCallExp; >+import org.eclipse.ocl.expressions.IfExp; >+import org.eclipse.ocl.expressions.IntegerLiteralExp; >+import org.eclipse.ocl.expressions.InvalidLiteralExp; >+import org.eclipse.ocl.expressions.IterateExp; >+import org.eclipse.ocl.expressions.IteratorExp; >+import org.eclipse.ocl.expressions.LetExp; >+import org.eclipse.ocl.expressions.LiteralExp; >+import org.eclipse.ocl.expressions.LoopExp; >+import org.eclipse.ocl.expressions.MessageExp; >+import org.eclipse.ocl.expressions.NavigationCallExp; >+import org.eclipse.ocl.expressions.NullLiteralExp; >+import org.eclipse.ocl.expressions.NumericLiteralExp; >+import org.eclipse.ocl.expressions.OCLExpression; >+import org.eclipse.ocl.expressions.OperationCallExp; >+import org.eclipse.ocl.expressions.PrimitiveLiteralExp; >+import org.eclipse.ocl.expressions.PropertyCallExp; >+import org.eclipse.ocl.expressions.RealLiteralExp; >+import org.eclipse.ocl.expressions.StateExp; >+import org.eclipse.ocl.expressions.StringLiteralExp; >+import org.eclipse.ocl.expressions.TupleLiteralExp; >+import org.eclipse.ocl.expressions.TupleLiteralPart; >+import org.eclipse.ocl.expressions.TypeExp; >+import org.eclipse.ocl.expressions.UnlimitedNaturalLiteralExp; >+import org.eclipse.ocl.expressions.UnspecifiedValueExp; >+import org.eclipse.ocl.expressions.Variable; >+import org.eclipse.ocl.expressions.VariableExp; > import org.eclipse.ocl.internal.OCLPlugin; > > /** >Index: src/org/eclipse/ocl/expressions/util/ExpressionsSwitch.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/util/ExpressionsSwitch.java,v >retrieving revision 1.7 >diff -u -r1.7 ExpressionsSwitch.java >--- src/org/eclipse/ocl/expressions/util/ExpressionsSwitch.java 12 Oct 2008 01:09:50 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/util/ExpressionsSwitch.java 2 Sep 2009 20:24:15 -0000 >@@ -21,8 +21,6 @@ > > import org.eclipse.emf.ecore.EClass; > import org.eclipse.emf.ecore.EObject; >- >-//import org.eclipse.ocl.expressions.*; > import org.eclipse.ocl.expressions.AssociationClassCallExp; > import org.eclipse.ocl.expressions.BooleanLiteralExp; > import org.eclipse.ocl.expressions.CallExp; >Index: src/org/eclipse/ocl/expressions/util/ExpressionsAdapterFactory.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/expressions/util/ExpressionsAdapterFactory.java,v >retrieving revision 1.7 >diff -u -r1.7 ExpressionsAdapterFactory.java >--- src/org/eclipse/ocl/expressions/util/ExpressionsAdapterFactory.java 12 Oct 2008 01:09:50 -0000 1.7 >+++ src/org/eclipse/ocl/expressions/util/ExpressionsAdapterFactory.java 2 Sep 2009 20:24:14 -0000 >@@ -21,8 +21,6 @@ > import org.eclipse.emf.common.notify.Notifier; > import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; > import org.eclipse.emf.ecore.EObject; >- >-//import org.eclipse.ocl.expressions.*; > import org.eclipse.ocl.expressions.AssociationClassCallExp; > import org.eclipse.ocl.expressions.BooleanLiteralExp; > import org.eclipse.ocl.expressions.CallExp; >Index: src/org/eclipse/ocl/lpg/KeywordTemplateF.gi >=================================================================== >RCS file: src/org/eclipse/ocl/lpg/KeywordTemplateF.gi >diff -N src/org/eclipse/ocl/lpg/KeywordTemplateF.gi >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/lpg/KeywordTemplateF.gi 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,119 @@ >+-- >+-- An LPG Lexer Template Using lpg.jar >+-- >+-- An instance of this template must have a $Export section and the export_terminals option >+-- There must be only one non-terminal, the start symbol, for the keywords >+-- The action for each keyword should be a call to $setResult(terminal_symbol) >+-- >+-- Macro that may be redefined in an instance of this template >+-- >+-- $eof_char >+-- >+-- B E G I N N I N G O F T E M P L A T E KeywordTemplateF (Similar to KeywordTemplateD) >+-- >+%Options Programming_Language=java,margin=4 >+%Options table >+%options action-block=("*.java", "/.", "./") >+%options ParseTable=lpg.runtime.ParseTable >+%Options prefix=Char_ >+%Options single-productions >+ >+-- >+-- This template requires that the name of the EOF token be set >+-- to EOF and that the prefix be "Char_" to be consistent with >+-- LexerTemplateD. >+-- >+%Eof >+ EOF >+%End >+ >+%Define >+ -- >+ -- Macro that may be respecified in an instance of this template >+ -- >+ $eof_char /.$sym_type$.$prefix$EOF$suffix$./ >+ >+ -- >+ -- Macros useful for specifying actions >+ -- >+ $setResult /.keywordKind[$rule_number] = ./ >+ >+ $Header >+ /. >+ // >+ // Rule $rule_number: $rule_text >+ // >+ ./ >+ >+ $BeginAction /.$Header./ >+ >+ $EndAction /../ >+ >+ $BeginJava /.$BeginAction./ >+ >+ $EndJava /.$EndAction./ >+%End >+ >+%Headers >+ /. >+ public class $action_type extends $prs_type >+ { >+ private char[] inputChars; >+ private final int keywordKind[] = new int[$num_rules + 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 >+ ? $eof_char >+ : 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; } >+ >+ ./ >+%End >+ >+%Rules >+ /. >+ >+ public $action_type(char[] inputChars, int identifierKind) >+ { >+ this.inputChars = inputChars; >+ keywordKind[0] = identifierKind; >+ ./ >+%End >+ >+%Trailers >+ /. >+ for (int i = 0; i < keywordKind.length; i++) >+ { >+ if (keywordKind[i] == 0) >+ keywordKind[i] = identifierKind; >+ } >+ } >+ } >+ ./ >+%End >+ >+-- >+-- E N D O F T E M P L A T E >+-- >Index: src/org/eclipse/ocl/parser/backtracking/OCLParserErrors.gi >=================================================================== >RCS file: src/org/eclipse/ocl/parser/backtracking/OCLParserErrors.gi >diff -N src/org/eclipse/ocl/parser/backtracking/OCLParserErrors.gi >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/parser/backtracking/OCLParserErrors.gi 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,205 @@ >+--/** >+-- * <copyright> >+-- * >+-- * Copyright (c) 2008 Eclipse.org, Open Canarias S.L. 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: >+-- * E.D. Willink - Initial API and implementation >+-- * Adolfo Sanchez-Barbudo Herrera - LPG v2.0.17 adoption >+-- * >+-- * </copyright> >+-- * >+-- * $Id: OCLParserErrors.g,v 1.1 2009/01/13 20:31:30 cdamus Exp $ >+-- */ >+-- >+-- Additional ERROR_TOKEN rules for The OCL Parser >+-- >+ >+%Import >+ OCLParser.g >+%End >+ >+%Import >+ EssentialOCLErrors.gi >+%End >+ >+%Rules >+ >+ classifierContextDeclCS ::= context pathNameCS ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(3), OCLParserErrors.MISSING_INV_OR_DEF); >+ CSTNode result = createClassifierContextDeclCS( >+ (PathNameCS)$getSym(2), >+ new BasicEList<InvOrDefCS>() >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(3))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ defExpressionCS ::= typedVariableCS ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(2), OCLParserErrors.MISSING_EQUALS); >+ VariableCS variableCS = (VariableCS)$getSym(1); >+ CSTNode result = createDefExpressionCS( >+ variableCS, >+ null, >+ null >+ ); >+ setOffsets(result, variableCS, getIToken($getToken(2))); >+ $setResult(result); >+ $EndCode >+ ./ >+ defExpressionCS ::= IDENTIFIER ERROR_Colon >+ /.$BeginCode >+ VariableCS variableCS = createVariableCS( >+ getTokenText($getToken(1)), >+ null, >+ null >+ ); >+ setOffsets(variableCS, getIToken($getToken(1)), getIToken($getToken(2))); >+ CSTNode result = createDefExpressionCS( >+ variableCS, >+ null, >+ null >+ ); >+ setOffsets(result, variableCS, getIToken($getToken(2))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ initOrDerValueCS ::= initOrDerValueCSopt init ERROR_Colon >+ /.$BeginCode >+ CSTNode result = createInitValueCS( >+ (InitOrDerValueCS)$getSym(1), >+ null >+ ); >+ if ($getSym(1) != null) { >+ setOffsets(result, (CSTNode)$getSym(1), getIToken($getToken(3))); >+ } else { >+ setOffsets(result, getIToken($getToken(2)), getIToken($getToken(3))); >+ } >+ $setResult(result); >+ $EndCode >+ ./ >+ initOrDerValueCS ::= initOrDerValueCSopt derive ERROR_Colon >+ /.$BeginCode >+ CSTNode result = createDerValueCS( >+ (InitOrDerValueCS)$getSym(1), >+ null >+ ); >+ if ($getSym(1) != null) { >+ setOffsets(result, (CSTNode)$getSym(1), getIToken($getToken(3))); >+ } else { >+ setOffsets(result, getIToken($getToken(2)), getIToken($getToken(3))); >+ } >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ invOrDefCS ::= inv simpleNameCS ERROR_Colon >+ /.$BeginCode >+ CSTNode result = createInvCS( >+ (SimpleNameCS)$getSym(2), >+ null >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(3))); >+ $setResult(result); >+ $EndCode >+ ./ >+ invOrDefCS ::= def simpleNameCS ERROR_Colon >+ /.$BeginCode >+ CSTNode result = createDefCS( >+ (SimpleNameCS)$getSym(2), >+ null >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(3))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ packageDeclarationCS ::= package pathNameCS contextDeclCSmopt ERROR_Empty endpackage >+ /.$BeginCode >+ CSTNode result = createPackageDeclarationCS( >+ (PathNameCS)$getSym(2), >+ (EList)$getSym(3) >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(5))); >+ $setResult(result); >+ $EndCode >+ ./ >+ packageDeclarationCS ::= package pathNameCS contextDeclCSmopt ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(4), OCLParserErrors.MISSING_ENDPACKAGE); >+ CSTNode result = createPackageDeclarationCS( >+ (PathNameCS)$getSym(2), >+ (EList)$getSym(3) >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(4))); >+ $setResult(result); >+ $EndCode >+ ./ >+ packageDeclarationCS ::= package ERROR_PathNameCS >+ /.$BeginCode >+ CSTNode result = createPackageDeclarationCS( >+ (PathNameCS)$getSym(2), >+ new BasicEList() >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(2))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ prePostOrBodyDeclCS ::= pre simpleNameCS ERROR_Colon >+ /.$BeginCode >+ CSTNode result = createPrePostOrBodyDeclCS( >+ PrePostOrBodyEnum.PRE_LITERAL, >+ (SimpleNameCS)$getSym(2), >+ createInvalidLiteralExpCS(getTokenText($getToken(3))) >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(3))); >+ $setResult(result); >+ $EndCode >+ ./ >+ prePostOrBodyDeclCS ::= post simpleNameCS ERROR_Colon >+ /.$BeginCode >+ CSTNode result = createPrePostOrBodyDeclCS( >+ PrePostOrBodyEnum.POST_LITERAL, >+ (SimpleNameCS)$getSym(2), >+ createInvalidLiteralExpCS(getTokenText($getToken(3))) >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(3))); >+ $setResult(result); >+ $EndCode >+ ./ >+ prePostOrBodyDeclCS ::= body simpleNameCS ERROR_Colon >+ /.$BeginCode >+ CSTNode result = createPrePostOrBodyDeclCS( >+ PrePostOrBodyEnum.BODY_LITERAL, >+ (SimpleNameCS)$getSym(2), >+ createInvalidLiteralExpCS(getTokenText($getToken(3))) >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(3))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ propertyContextCS ::= context pathNameCS '::' ERROR_SimpleNameCS >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = (SimpleNameCS)$getSym(4); >+ CSTNode result = createPropertyContextCS( >+ (PathNameCS)$getSym(2), >+ simpleNameCS, >+ null, >+ null >+ ); >+ setOffsets(result, getIToken($getToken(1)), simpleNameCS); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+%End >Index: src/org/eclipse/ocl/parser/OCLKWLexer.gi >=================================================================== >RCS file: src/org/eclipse/ocl/parser/OCLKWLexer.gi >diff -N src/org/eclipse/ocl/parser/OCLKWLexer.gi >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/parser/OCLKWLexer.gi 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,547 @@ >+--/** >+-- * <copyright> >+-- * >+-- * Copyright (c) 2005, 2009 IBM Corporation Zeligsoft Inc, Open Canarias S.L., 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 >+-- * Adolfo Sanchez-Barbudo Herrera - LPG v2.0.17 adoption >+-- * >+-- * </copyright> >+-- * >+-- * $Id: OCLKWLexer.g,v 1.1 2007/10/11 23:05:00 cdamus Exp $ >+-- */ >+-- >+-- The OCL KeyWord Lexer >+-- >+ >+%Options slr >+%Options fp=OCLKWLexer,prefix=Char_ >+%options noserialize >+%options package=org.eclipse.ocl.parser >+%options template=../lpg/KeywordTemplateF.gi >+%options export_terminals=("OCLParsersym.java", "TK_") >+%options include_directory="../lpg" >+ >+%Define >+ >+ -- >+ -- Definition of macros used in the template >+ -- >+ $action_class /.$file_prefix./ >+ $eof_char /.Char_EOF./ >+ $copyright_contributions /.*./ >+ >+%End >+ >+%Notice >+ /./** >+ * <copyright> >+ * >+ * Copyright (c) 2005, 2009 IBM Corporation, Zeligsoft Inc, Open Canarias S.L., 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 >+ * Adolfo Sanchez-Barbudo Herrera - LPG v2.0.17 adoption >+$copyright_contributions >+ * </copyright> >+ * >+ * >+ */ >+ ./ >+%End >+ >+%Globals >+ /../ >+%End >+ >+%Import >+ KWLexerMapF.gi >+%End >+ >+%Export >+ self >+ inv >+ pre >+ post >+ context >+ package >+ endpackage >+ def >+ if >+ then >+ else >+ endif >+ and >+ or >+ xor >+ not >+ implies >+ let >+ in >+ true >+ false >+ >+ -- >+ -- the following appear to have been omitted from the list of >+ -- OCL reserved words in Section 7.4.9. They will be treated >+ -- as unreserved for compliance >+ -- >+ body >+ derive >+ init >+ null >+ invalid >+-- return -- don't need a keyword for LPG purposes >+ >+ -- >+ -- the following are not used in the OCL concrete syntax, but >+ -- are defined as reserved words in the Spec 7.4.9 >+ -- >+ attr >+ oper >+ >+ -- >+ -- the remainder of the LPG keywords are defined as such for the >+ -- purpose of constructing the CST grammar. They are not OCL >+ -- reserved words >+ -- >+ Set >+ Bag >+ Sequence >+ Collection >+ OrderedSet >+ >+ iterate >+ forAll >+ exists >+ isUnique >+ any >+ one >+ >+ collect >+ select >+ reject >+ collectNested >+ sortedBy >+ >+ closure >+ >+ oclIsKindOf >+ oclIsTypeOf >+ oclAsType >+ oclIsNew >+ oclIsUndefined >+ oclIsInvalid >+ oclIsInState >+ allInstances >+ >+ String >+ Integer >+ UnlimitedNatural >+ Real >+ Boolean >+ Tuple >+ OclAny >+ OclVoid >+ OclInvalid >+ OclMessage >+%End >+ >+%Start >+ KeyWord >+%End >+ >+%Rules >+ >+-- The Goal for the parser is a single Keyword >+ >+ KeyWord ::= >+ s e l f >+ /.$BeginAction >+ $setResult($_self); >+ $EndAction >+ ./ >+ >+ | i n v >+ /.$BeginAction >+ $setResult($_inv); >+ $EndAction >+ ./ >+ >+ | p r e >+ /.$BeginAction >+ $setResult($_pre); >+ $EndAction >+ ./ >+ >+ | p o s t >+ /.$BeginAction >+ $setResult($_post); >+ $EndAction >+ ./ >+ >+ | b o d y >+ /.$BeginAction >+ $setResult($_body); >+ $EndAction >+ ./ >+ >+ | c o n t e x t >+ /.$BeginAction >+ $setResult($_context); >+ $EndAction >+ ./ >+ >+ | p a c k a g e >+ /.$BeginAction >+ $setResult($_package); >+ $EndAction >+ ./ >+ >+ | e n d p a c k a g e >+ /.$BeginAction >+ $setResult($_endpackage); >+ $EndAction >+ ./ >+ >+ | d e f >+ /.$BeginAction >+ $setResult($_def); >+ $EndAction >+ ./ >+ >+ | d e r i v e >+ /.$BeginAction >+ $setResult($_derive); >+ $EndAction >+ ./ >+ >+ | i n i t >+ /.$BeginAction >+ $setResult($_init); >+ $EndAction >+ ./ >+ >+ | i f >+ /.$BeginAction >+ $setResult($_if); >+ $EndAction >+ ./ >+ >+ | t h e n >+ /.$BeginAction >+ $setResult($_then); >+ $EndAction >+ ./ >+ >+ | e l s e >+ /.$BeginAction >+ $setResult($_else); >+ $EndAction >+ ./ >+ >+ | e n d i f >+ /.$BeginAction >+ $setResult($_endif); >+ $EndAction >+ ./ >+ >+ | a n d >+ /.$BeginAction >+ $setResult($_and); >+ $EndAction >+ ./ >+ >+ | o r >+ /.$BeginAction >+ $setResult($_or); >+ $EndAction >+ ./ >+ >+ | x o r >+ /.$BeginAction >+ $setResult($_xor); >+ $EndAction >+ ./ >+ >+ | n o t >+ /.$BeginAction >+ $setResult($_not); >+ $EndAction >+ ./ >+ >+ | i m p l i e s >+ /.$BeginAction >+ $setResult($_implies); >+ $EndAction >+ ./ >+ >+ | l e t >+ /.$BeginAction >+ $setResult($_let); >+ $EndAction >+ ./ >+ >+ | i n >+ /.$BeginAction >+ $setResult($_in); >+ $EndAction >+ ./ >+ >+ | t r u e >+ /.$BeginAction >+ $setResult($_true); >+ $EndAction >+ ./ >+ >+ | f a l s e >+ /.$BeginAction >+ $setResult($_false); >+ $EndAction >+ ./ >+ >+ | S e t >+ /.$BeginAction >+ $setResult($_Set); >+ $EndAction >+ ./ >+ >+ | B a g >+ /.$BeginAction >+ $setResult($_Bag); >+ $EndAction >+ ./ >+ >+ | S e q u e n c e >+ /.$BeginAction >+ $setResult($_Sequence); >+ $EndAction >+ ./ >+ >+ | C o l l e c t i o n >+ /.$BeginAction >+ $setResult($_Collection); >+ $EndAction >+ ./ >+ >+ | O r d e r e d S e t >+ /.$BeginAction >+ $setResult($_OrderedSet); >+ $EndAction >+ ./ >+ >+ | i t e r a t e >+ /.$BeginAction >+ $setResult($_iterate); >+ $EndAction >+ ./ >+ >+ | f o r A l l >+ /.$BeginAction >+ $setResult($_forAll); >+ $EndAction >+ ./ >+ >+ | e x i s t s >+ /.$BeginAction >+ $setResult($_exists); >+ $EndAction >+ ./ >+ >+ | i s U n i q u e >+ /.$BeginAction >+ $setResult($_isUnique); >+ $EndAction >+ ./ >+ >+ | a n y >+ /.$BeginAction >+ $setResult($_any); >+ $EndAction >+ ./ >+ >+ | o n e >+ /.$BeginAction >+ $setResult($_one); >+ $EndAction >+ ./ >+ >+ | c o l l e c t >+ /.$BeginAction >+ $setResult($_collect); >+ $EndAction >+ ./ >+ >+ | s e l e c t >+ /.$BeginAction >+ $setResult($_select); >+ $EndAction >+ ./ >+ >+ | r e j e c t >+ /.$BeginAction >+ $setResult($_reject); >+ $EndAction >+ ./ >+ >+ | c o l l e c t N e s t e d >+ /.$BeginAction >+ $setResult($_collectNested); >+ $EndAction >+ ./ >+ >+ | s o r t e d B y >+ /.$BeginAction >+ $setResult($_sortedBy); >+ $EndAction >+ ./ >+ >+ | c l o s u r e >+ /.$BeginAction >+ $setResult($_closure); >+ $EndAction >+ ./ >+ >+ | o c l I s K i n d O f >+ /.$BeginAction >+ $setResult($_oclIsKindOf); >+ $EndAction >+ ./ >+ >+ | o c l I s T y p e O f >+ /.$BeginAction >+ $setResult($_oclIsTypeOf); >+ $EndAction >+ ./ >+ >+ | o c l A s T y p e >+ /.$BeginAction >+ $setResult($_oclAsType); >+ $EndAction >+ ./ >+ >+ | o c l I s N e w >+ /.$BeginAction >+ $setResult($_oclIsNew); >+ $EndAction >+ ./ >+ >+ | o c l I s U n d e f i n e d >+ /.$BeginAction >+ $setResult($_oclIsUndefined); >+ $EndAction >+ ./ >+ >+ | o c l I s I n v a l i d >+ /.$BeginAction >+ $setResult($_oclIsInvalid); >+ $EndAction >+ ./ >+ >+ | o c l I s I n S t a t e >+ /.$BeginAction >+ $setResult($_oclIsInState); >+ $EndAction >+ ./ >+ >+ | a l l I n s t a n c e s >+ /.$BeginAction >+ $setResult($_allInstances); >+ $EndAction >+ ./ >+ >+ | S t r i n g >+ /.$BeginAction >+ $setResult($_String); >+ $EndAction >+ ./ >+ >+ | I n t e g e r >+ /.$BeginAction >+ $setResult($_Integer); >+ $EndAction >+ ./ >+ >+ | U n l i m i t e d N a t u r a l >+ /.$BeginAction >+ $setResult($_UnlimitedNatural); >+ $EndAction >+ ./ >+ >+ | R e a l >+ /.$BeginAction >+ $setResult($_Real); >+ $EndAction >+ ./ >+ >+ | B o o l e a n >+ /.$BeginAction >+ $setResult($_Boolean); >+ $EndAction >+ ./ >+ >+ | T u p l e >+ /.$BeginAction >+ $setResult($_Tuple); >+ $EndAction >+ ./ >+ >+ | O c l A n y >+ /.$BeginAction >+ $setResult($_OclAny); >+ $EndAction >+ ./ >+ >+ | O c l V o i d >+ /.$BeginAction >+ $setResult($_OclVoid); >+ $EndAction >+ ./ >+ >+ | O c l I n v a l i d >+ /.$BeginAction >+ $setResult($_OclInvalid); >+ $EndAction >+ ./ >+ >+ | O c l M e s s a g e >+ /.$BeginAction >+ $setResult($_OclMessage); >+ $EndAction >+ ./ >+ >+ | n u l l >+ /.$BeginAction >+ $setResult($_null); >+ $EndAction >+ ./ >+ >+ | i n v a l i d >+ /.$BeginAction >+ $setResult($_invalid); >+ $EndAction >+ ./ >+ >+ | a t t r >+ /.$BeginAction >+ $setResult($_attr); >+ $EndAction >+ ./ >+ >+ | o p e r >+ /.$BeginAction >+ $setResult($_oper); >+ $EndAction >+ ./ >+%End >Index: src/org/eclipse/ocl/lpg/KWLexerMapF.gi >=================================================================== >RCS file: src/org/eclipse/ocl/lpg/KWLexerMapF.gi >diff -N src/org/eclipse/ocl/lpg/KWLexerMapF.gi >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/lpg/KWLexerMapF.gi 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,78 @@ >+%Terminals >+ DollarSign ::= '$' >+ Percent ::= '%' >+ _ >+ a b c d e 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 E F G H I J K L M N O P Q R S T U V W X Y Z >+%End >+ >+%Headers >+ /. >+ final static int tokenKind[] = new int[128]; >+ static >+ { >+ tokenKind['$'] = $sym_type.$prefix$DollarSign$suffix$; >+ tokenKind['%'] = $sym_type.$prefix$Percent$suffix$; >+ tokenKind['_'] = $sym_type.$prefix$_$suffix$; >+ >+ tokenKind['a'] = $sym_type.$prefix$a$suffix$; >+ tokenKind['b'] = $sym_type.$prefix$b$suffix$; >+ tokenKind['c'] = $sym_type.$prefix$c$suffix$; >+ tokenKind['d'] = $sym_type.$prefix$d$suffix$; >+ tokenKind['e'] = $sym_type.$prefix$e$suffix$; >+ tokenKind['f'] = $sym_type.$prefix$f$suffix$; >+ tokenKind['g'] = $sym_type.$prefix$g$suffix$; >+ tokenKind['h'] = $sym_type.$prefix$h$suffix$; >+ tokenKind['i'] = $sym_type.$prefix$i$suffix$; >+ tokenKind['j'] = $sym_type.$prefix$j$suffix$; >+ tokenKind['k'] = $sym_type.$prefix$k$suffix$; >+ tokenKind['l'] = $sym_type.$prefix$l$suffix$; >+ tokenKind['m'] = $sym_type.$prefix$m$suffix$; >+ tokenKind['n'] = $sym_type.$prefix$n$suffix$; >+ tokenKind['o'] = $sym_type.$prefix$o$suffix$; >+ tokenKind['p'] = $sym_type.$prefix$p$suffix$; >+ tokenKind['q'] = $sym_type.$prefix$q$suffix$; >+ tokenKind['r'] = $sym_type.$prefix$r$suffix$; >+ tokenKind['s'] = $sym_type.$prefix$s$suffix$; >+ tokenKind['t'] = $sym_type.$prefix$t$suffix$; >+ tokenKind['u'] = $sym_type.$prefix$u$suffix$; >+ tokenKind['v'] = $sym_type.$prefix$v$suffix$; >+ tokenKind['w'] = $sym_type.$prefix$w$suffix$; >+ tokenKind['x'] = $sym_type.$prefix$x$suffix$; >+ tokenKind['y'] = $sym_type.$prefix$y$suffix$; >+ tokenKind['z'] = $sym_type.$prefix$z$suffix$; >+ >+ tokenKind['A'] = $sym_type.$prefix$A$suffix$; >+ tokenKind['B'] = $sym_type.$prefix$B$suffix$; >+ tokenKind['C'] = $sym_type.$prefix$C$suffix$; >+ tokenKind['D'] = $sym_type.$prefix$D$suffix$; >+ tokenKind['E'] = $sym_type.$prefix$E$suffix$; >+ tokenKind['F'] = $sym_type.$prefix$F$suffix$; >+ tokenKind['G'] = $sym_type.$prefix$G$suffix$; >+ tokenKind['H'] = $sym_type.$prefix$H$suffix$; >+ tokenKind['I'] = $sym_type.$prefix$I$suffix$; >+ tokenKind['J'] = $sym_type.$prefix$J$suffix$; >+ tokenKind['K'] = $sym_type.$prefix$K$suffix$; >+ tokenKind['L'] = $sym_type.$prefix$L$suffix$; >+ tokenKind['M'] = $sym_type.$prefix$M$suffix$; >+ tokenKind['N'] = $sym_type.$prefix$N$suffix$; >+ tokenKind['O'] = $sym_type.$prefix$O$suffix$; >+ tokenKind['P'] = $sym_type.$prefix$P$suffix$; >+ tokenKind['Q'] = $sym_type.$prefix$Q$suffix$; >+ tokenKind['R'] = $sym_type.$prefix$R$suffix$; >+ tokenKind['S'] = $sym_type.$prefix$S$suffix$; >+ tokenKind['T'] = $sym_type.$prefix$T$suffix$; >+ tokenKind['U'] = $sym_type.$prefix$U$suffix$; >+ tokenKind['V'] = $sym_type.$prefix$V$suffix$; >+ tokenKind['W'] = $sym_type.$prefix$W$suffix$; >+ tokenKind['X'] = $sym_type.$prefix$X$suffix$; >+ tokenKind['Y'] = $sym_type.$prefix$Y$suffix$; >+ tokenKind['Z'] = $sym_type.$prefix$Z$suffix$; >+ }; >+ >+ final int getKind(char c) >+ { >+ return (((c & 0xFFFFFF80) == 0) /* 0 <= c < 128? */ ? tokenKind[c] : 0); >+ } >+ ./ >+%End >Index: src/org/eclipse/ocl/lpg/LexerBasicMapF.gi >=================================================================== >RCS file: src/org/eclipse/ocl/lpg/LexerBasicMapF.gi >diff -N src/org/eclipse/ocl/lpg/LexerBasicMapF.gi >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/lpg/LexerBasicMapF.gi 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,269 @@ >+%Headers >+ -- >+ -- Additional methods for the action class not provided in the template >+ -- >+ >+ -- >+ -- In grammar file including this .gi file should define the following macros >+ -- $kw_lexeR_class => the keyword lexer class >+ -- $super_stream_class => the class which the generated lexer inherits from >+ -- >+ -- [cwd] Template provided by LPG defines a constructor that uses an Option >+ -- class that does not exist in LPG Runtime. Deleted this constructor >+ >+ -- [adolfosbh] The previous old cwd's comment has been corrected in this >+ -- template version >+ >+ -- [adolfosbh] a constructor method has been moved to LexerTemplate D.gi file >+ /. >+ // >+ // 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. >+ // >+ $kw_lexer_class kwLexer; >+ boolean printTokens; >+ private final static int ECLIPSE_TAB_VALUE = 4; >+ >+ public int [] getKeywordKinds() { return kwLexer.getKeywordKinds(); } >+ >+ >+ /** >+ * @deprecated function replaced by {@link #reset(char [] content, String filename)} >+ */ >+ 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 == $_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 $super_stream_class extends AbstractLexerStream >+ { >+ public final static int tokenKind[] = >+ { >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 000 0x00 >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 001 0x01 >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 002 0x02 >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 003 0x03 >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 004 0x04 >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 005 0x05 >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 006 0x06 >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 007 0x07 >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 008 0x08 >+ $sym_type.$prefix$HT$suffix$, // 009 0x09 >+ $sym_type.$prefix$LF$suffix$, // 010 0x0A >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 011 0x0B >+ $sym_type.$prefix$FF$suffix$, // 012 0x0C >+ $sym_type.$prefix$CR$suffix$, // 013 0x0D >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 014 0x0E >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 015 0x0F >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 016 0x10 >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 017 0x11 >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 018 0x12 >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 019 0x13 >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 020 0x14 >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 021 0x15 >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 022 0x16 >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 023 0x17 >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 024 0x18 >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 025 0x19 >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 026 0x1A >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 027 0x1B >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 028 0x1C >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 029 0x1D >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 030 0x1E >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 031 0x1F >+ $sym_type.$prefix$Space$suffix$, // 032 0x20 >+ $sym_type.$prefix$Exclamation$suffix$, // 033 0x21 >+ $sym_type.$prefix$DoubleQuote$suffix$, // 034 0x22 >+ $sym_type.$prefix$Sharp$suffix$, // 035 0x23 >+ $sym_type.$prefix$DollarSign$suffix$, // 036 0x24 >+ $sym_type.$prefix$Percent$suffix$, // 037 0x25 >+ $sym_type.$prefix$Ampersand$suffix$, // 038 0x26 >+ $sym_type.$prefix$SingleQuote$suffix$, // 039 0x27 >+ $sym_type.$prefix$LeftParen$suffix$, // 040 0x28 >+ $sym_type.$prefix$RightParen$suffix$, // 041 0x29 >+ $sym_type.$prefix$Star$suffix$, // 042 0x2A >+ $sym_type.$prefix$Plus$suffix$, // 043 0x2B >+ $sym_type.$prefix$Comma$suffix$, // 044 0x2C >+ $sym_type.$prefix$Minus$suffix$, // 045 0x2D >+ $sym_type.$prefix$Dot$suffix$, // 046 0x2E >+ $sym_type.$prefix$Slash$suffix$, // 047 0x2F >+ $sym_type.$prefix$0$suffix$, // 048 0x30 >+ $sym_type.$prefix$1$suffix$, // 049 0x31 >+ $sym_type.$prefix$2$suffix$, // 050 0x32 >+ $sym_type.$prefix$3$suffix$, // 051 0x33 >+ $sym_type.$prefix$4$suffix$, // 052 0x34 >+ $sym_type.$prefix$5$suffix$, // 053 0x35 >+ $sym_type.$prefix$6$suffix$, // 054 0x36 >+ $sym_type.$prefix$7$suffix$, // 055 0x37 >+ $sym_type.$prefix$8$suffix$, // 056 0x38 >+ $sym_type.$prefix$9$suffix$, // 057 0x39 >+ $sym_type.$prefix$Colon$suffix$, // 058 0x3A >+ $sym_type.$prefix$SemiColon$suffix$, // 059 0x3B >+ $sym_type.$prefix$LessThan$suffix$, // 060 0x3C >+ $sym_type.$prefix$Equal$suffix$, // 061 0x3D >+ $sym_type.$prefix$GreaterThan$suffix$, // 062 0x3E >+ $sym_type.$prefix$QuestionMark$suffix$, // 063 0x3F >+ $sym_type.$prefix$AtSign$suffix$, // 064 0x40 >+ $sym_type.$prefix$A$suffix$, // 065 0x41 >+ $sym_type.$prefix$B$suffix$, // 066 0x42 >+ $sym_type.$prefix$C$suffix$, // 067 0x43 >+ $sym_type.$prefix$D$suffix$, // 068 0x44 >+ $sym_type.$prefix$E$suffix$, // 069 0x45 >+ $sym_type.$prefix$F$suffix$, // 070 0x46 >+ $sym_type.$prefix$G$suffix$, // 071 0x47 >+ $sym_type.$prefix$H$suffix$, // 072 0x48 >+ $sym_type.$prefix$I$suffix$, // 073 0x49 >+ $sym_type.$prefix$J$suffix$, // 074 0x4A >+ $sym_type.$prefix$K$suffix$, // 075 0x4B >+ $sym_type.$prefix$L$suffix$, // 076 0x4C >+ $sym_type.$prefix$M$suffix$, // 077 0x4D >+ $sym_type.$prefix$N$suffix$, // 078 0x4E >+ $sym_type.$prefix$O$suffix$, // 079 0x4F >+ $sym_type.$prefix$P$suffix$, // 080 0x50 >+ $sym_type.$prefix$Q$suffix$, // 081 0x51 >+ $sym_type.$prefix$R$suffix$, // 082 0x52 >+ $sym_type.$prefix$S$suffix$, // 083 0x53 >+ $sym_type.$prefix$T$suffix$, // 084 0x54 >+ $sym_type.$prefix$U$suffix$, // 085 0x55 >+ $sym_type.$prefix$V$suffix$, // 086 0x56 >+ $sym_type.$prefix$W$suffix$, // 087 0x57 >+ $sym_type.$prefix$X$suffix$, // 088 0x58 >+ $sym_type.$prefix$Y$suffix$, // 089 0x59 >+ $sym_type.$prefix$Z$suffix$, // 090 0x5A >+ $sym_type.$prefix$LeftBracket$suffix$, // 091 0x5B >+ $sym_type.$prefix$BackSlash$suffix$, // 092 0x5C >+ $sym_type.$prefix$RightBracket$suffix$, // 093 0x5D >+ $sym_type.$prefix$Caret$suffix$, // 094 0x5E >+ $sym_type.$prefix$_$suffix$, // 095 0x5F >+ $sym_type.$prefix$BackQuote$suffix$, // 096 0x60 >+ $sym_type.$prefix$a$suffix$, // 097 0x61 >+ $sym_type.$prefix$b$suffix$, // 098 0x62 >+ $sym_type.$prefix$c$suffix$, // 099 0x63 >+ $sym_type.$prefix$d$suffix$, // 100 0x64 >+ $sym_type.$prefix$e$suffix$, // 101 0x65 >+ $sym_type.$prefix$f$suffix$, // 102 0x66 >+ $sym_type.$prefix$g$suffix$, // 103 0x67 >+ $sym_type.$prefix$h$suffix$, // 104 0x68 >+ $sym_type.$prefix$i$suffix$, // 105 0x69 >+ $sym_type.$prefix$j$suffix$, // 106 0x6A >+ $sym_type.$prefix$k$suffix$, // 107 0x6B >+ $sym_type.$prefix$l$suffix$, // 108 0x6C >+ $sym_type.$prefix$m$suffix$, // 109 0x6D >+ $sym_type.$prefix$n$suffix$, // 110 0x6E >+ $sym_type.$prefix$o$suffix$, // 111 0x6F >+ $sym_type.$prefix$p$suffix$, // 112 0x70 >+ $sym_type.$prefix$q$suffix$, // 113 0x71 >+ $sym_type.$prefix$r$suffix$, // 114 0x72 >+ $sym_type.$prefix$s$suffix$, // 115 0x73 >+ $sym_type.$prefix$t$suffix$, // 116 0x74 >+ $sym_type.$prefix$u$suffix$, // 117 0x75 >+ $sym_type.$prefix$v$suffix$, // 118 0x76 >+ $sym_type.$prefix$w$suffix$, // 119 0x77 >+ $sym_type.$prefix$x$suffix$, // 120 0x78 >+ $sym_type.$prefix$y$suffix$, // 121 0x79 >+ $sym_type.$prefix$z$suffix$, // 122 0x7A >+ $sym_type.$prefix$LeftBrace$suffix$, // 123 0x7B >+ $sym_type.$prefix$VerticalBar$suffix$, // 124 0x7C >+ $sym_type.$prefix$RightBrace$suffix$, // 125 0x7D >+ $sym_type.$prefix$Tilde$suffix$, // 126 0x7E >+ $sym_type.$prefix$CtlCharNotWS$suffix$, // 127 0x7F >+ >+ $sym_type.$prefix$Acute$suffix$, // for the acute accent 0xb4 >+ $sym_type.$prefix$AfterASCIINotAcute$suffix$, // for all chars in range 0x80..0xfffe excluding the acute accent >+ $sym_type.$prefix$EOF$suffix$ // for '\uffff' or 65535 >+ }; >+ >+ 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') >+ ?$sym_type.$prefix$EOF$suffix$ >+ : (c == '\u00b4') >+ ? $sym_type.$prefix$EOF$suffix$ >+ : $sym_type.$prefix$AfterASCIINotAcute$suffix$; >+ } >+ >+ public String[] orderedExportedSymbols() { return $exp_type.orderedTerminalSymbols; } >+ >+ public $super_stream_class($environment_class environment, String filename, int tab) throws java.io.IOException >+ { >+ super($adapt_environment, filename, tab); >+ } >+ >+ public $super_stream_class($environment_class environment, char[] input_chars, String filename, int tab) >+ { >+ super($adapt_environment, input_chars, filename, tab); >+ } >+ >+ public $super_stream_class($environment_class environment, char[] input_chars, String filename) >+ { >+ super($adapt_environment, input_chars, filename, 1); >+ } >+ } >+ ./ >+%End >Index: src/org/eclipse/ocl/lpg/AbstractLexerStream.java >=================================================================== >RCS file: src/org/eclipse/ocl/lpg/AbstractLexerStream.java >diff -N src/org/eclipse/ocl/lpg/AbstractLexerStream.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/lpg/AbstractLexerStream.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,63 @@ >+package org.eclipse.ocl.lpg; >+ >+import lpg.runtime.LpgLexStream; >+ >+ >+/** >+ * @since 3.0 >+ */ >+public abstract class AbstractLexerStream extends LpgLexStream { >+ >+ protected final static int ECLIPSE_TAB_VALUE = 4; >+ private BasicEnvironment environment; >+ >+ public AbstractLexerStream(BasicEnvironment environment, String filename, int tab) throws java.io.IOException >+ { >+ super(filename, tab); >+ this.environment = environment; >+ } >+ >+ public AbstractLexerStream(BasicEnvironment environment, char[] input_chars, String filename, int tab) >+ { >+ super(input_chars, filename, tab); >+ this.environment = environment; >+ } >+ >+ public AbstractLexerStream() { >+ super(); >+ setTab(ECLIPSE_TAB_VALUE); >+ } >+ >+ protected int computeErrorCode(int leftToken, int rightToken) { >+ if (rightToken >= getStreamLength()) >+ return EOF_CODE; >+ else if (leftToken == rightToken) >+ return LEX_ERROR_CODE; >+ else >+ return INVALID_TOKEN_CODE; >+ } >+ >+ /** >+ * Define the input text as a given array of characters. >+ * @param buffer the characters >+ */ >+ public void initialize(char[] inputChars) { >+ setInputChars(inputChars); >+ setStreamLength(inputChars.length); >+ computeLineOffsets(); >+ } >+ >+ /** >+ * Errors generated within the lexer are redirected to the error handler if there is one. >+ * >+ * Note that other variants of reportError either feed this one, are fed from a default implementation >+ * of this one or originate in the parser, where a ParserErrorHandler can intercept them. >+ */ >+ public void reportError(int errorCode, int leftToken, int errorToken, >+ int rightToken, String[] errorInfo) { >+ if (environment != null) >+ environment.lexerError(errorCode, errorToken, rightToken); >+ reportError(errorCode, leftToken, errorToken, rightToken, errorInfo); >+ } >+ >+} >Index: src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingKWLexer.gi >=================================================================== >RCS file: src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingKWLexer.gi >diff -N src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingKWLexer.gi >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingKWLexer.gi 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,35 @@ >+--/** >+-- * <copyright> >+-- * >+-- * Copyright (c) 2008, 2009 IBM Corporation, Open Canarias S.L. 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 >+-- * Adolfo Sanchez-Barbudo Herrera - LPG v2.0.17 adoption >+-- * >+-- * </copyright> >+-- * >+-- * $Id: OCLBacktrackingKWLexer.g,v 1.1 2009/01/13 20:31:30 cdamus Exp $ >+-- */ >+-- >+-- The OCL Backtracking KeyWord Lexer, which is nominally identical to the >+-- normal KeyWord Lexer, however the extra ERROR_TOKEN symbol makes it difficult >+-- to share reliably. >+-- >+ >+%options slr >+%options fp=OCLBacktrackingKWLexer,prefix=Char_ >+%options noserialize >+%options package=org.eclipse.ocl.parser.backtracking >+%options template=../../lpg/KeywordTemplateF.gi >+%options export_terminals=("OCLBacktrackingParsersym.java", "TK_") >+%options include_directory="..;../../lpg" >+ >+%Import >+ OCLKWLexer.gi >+%End >Index: src/org/eclipse/ocl/lpg/OCLParserStream.java >=================================================================== >RCS file: src/org/eclipse/ocl/lpg/OCLParserStream.java >diff -N src/org/eclipse/ocl/lpg/OCLParserStream.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/lpg/OCLParserStream.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,150 @@ >+package org.eclipse.ocl.lpg; >+ >+import java.util.ArrayList; >+ >+import lpg.runtime.ErrorToken; >+import lpg.runtime.ILexStream; >+import lpg.runtime.IToken; >+import lpg.runtime.PrsStream; >+import lpg.runtime.Token; >+ >+ >+/** >+ * @since 3.0 >+ */ >+public class OCLParserStream extends PrsStream { >+ >+ private BasicEnvironment environment; >+ >+ public OCLParserStream(BasicEnvironment env, ILexStream iLexStream) { >+ super(iLexStream); >+ this.environment = env; >+ } >+ >+ @Override >+ public void reportError(int errorCode, int leftToken, int errorToken, >+ int rightToken, String errorInfo[]) { >+ if (environment == null) { >+ super.reportError(errorCode, leftToken, errorToken, rightToken, errorInfo); >+ } else { >+ // TODO Revise this. BasicEnvironment.parserError doesn't have a String[] argument >+ String tokenText = errorInfo.length > 0 ? errorInfo[0] : ""; //$NON-NLS-1$ >+ if (errorCode == PrsStream.DELETION_CODE || errorCode == PrsStream.MISPLACED_CODE) { >+ tokenText = ""; //$NON-NLS-1$ >+ } >+ environment >+ .parserError(errorCode, leftToken, rightToken, tokenText); >+ } >+ } >+ /** >+ * Overridden to search only the non-Error nodes, which are the only tokens >+ * in monotonic order. >+ */ >+ @Override >+ public int getTokenIndexAtCharacter(int offset) { >+ int low = 0; >+ int high = getSize(); >+ while (high > low) { >+ IToken highToken = getTokenAt(high - 1); >+ if (!(highToken instanceof ErrorToken)) { >+ break; >+ } >+ high--; >+ } >+ while (high > low) { >+ int mid = (high + low) / 2; >+ IToken mid_element = getTokenAt(mid); >+ if (offset >= mid_element.getStartOffset() >+ && offset <= mid_element.getEndOffset()) { >+ return mid; >+ } else if (offset < mid_element.getStartOffset()) { >+ high = mid; >+ } else { >+ low = mid + 1; >+ } >+ } >+ >+ return -(low - 1); >+ } >+ >+ @Override >+ public int makeErrorToken(int firsttok, int lasttok, int errortok, int kind) { >+ @SuppressWarnings("unchecked") >+ ArrayList<IToken> tokens = getTokens(); >+ int index = tokens.size(); // the next index >+ >+ // >+ // Note that when creating an error token, we do not remap its kind. >+ // Since this is not a lexical operation, it is the responsibility of >+ // the calling program (a parser driver) to pass to us the proper kind >+ // that it wants for an error token. >+ // >+ Token token = new ErrorToken(getIToken(firsttok), getIToken(lasttok), >+ getIToken(errortok), getStartOffset(firsttok), >+ getEndOffset(lasttok), kind) { >+ >+ @Override >+ public String toString() { >+ if (getIPrsStream() == null) { >+ return "<toString>"; //$NON-NLS-1$ >+ } >+ int startOffset = getStartOffset(); >+ int length = getEndOffset() - startOffset; >+ if (length < 0) { >+ length = -length - 1; >+ startOffset = getEndOffset(); >+ } >+ if ((startOffset + length) > getIPrsStream().getInputChars().length) { >+ return String.valueOf(IToken.EOF); >+ } >+ return new String(getIPrsStream().getInputChars(), startOffset, >+ length); >+ } >+ >+ }; >+ token.setTokenIndex(index); >+ tokens.add(token); >+ token.setAdjunctIndex(getAdjuncts().size()); >+ return index; >+ } >+ >+ /** >+ * @since 1.3 >+ */ >+ public int getErrorTokens() { >+ return getTokens().size() - getStreamLength(); >+ } >+ >+ /** >+ * This function returns the index of the token element containing the >+ * offset specified. If such a token does not exist, it returns the negation >+ * of the index of the element immediately preceding the offset. >+ * >+ * @since 1.3 >+ */ >+ public ErrorToken getErrorTokenAtCharacter(int offset) { >+ ErrorToken bestToken = null; >+ for (int i = getSize(); --i >= 0;) { >+ IToken token = getTokenAt(i); >+ if (!(token instanceof ErrorToken)) { >+ break; >+ } >+ IToken errorToken = ((ErrorToken) token).getErrorToken(); >+ if (offset >= errorToken.getStartOffset() >+ && offset <= errorToken.getEndOffset()) { >+ if ((bestToken == null) >+ || ((bestToken.getStartOffset() <= errorToken >+ .getStartOffset()) && (token.getEndOffset() <= errorToken >+ .getEndOffset()))) { >+ bestToken = (ErrorToken) token; >+ } >+ } >+ } >+ return bestToken; >+ } >+ public AbstractLexer getLexer() { >+ return (AbstractLexer) super.getILexStream(); >+ } >+ >+ >+} >\ No newline at end of file >Index: src/org/eclipse/ocl/lpg/dtParserTemplateF.gi >=================================================================== >RCS file: src/org/eclipse/ocl/lpg/dtParserTemplateF.gi >diff -N src/org/eclipse/ocl/lpg/dtParserTemplateF.gi >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/lpg/dtParserTemplateF.gi 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,377 @@ >+-- >+-- In a parser using this template, the following macro may be redefined: >+-- >+-- $additional_interfaces >+-- $ast_class >+-- >+-- B E G I N N I N G O F T E M P L A T E dtParserTemplateF >+-- >+%Options programming_language=java,margin=4 >+%Options table,error_maps,scopes >+%Options prefix=TK_ >+%Options action-block=("*.java", "/.", "./") >+%Options ParseTable=lpg.runtime.ParseTable >+ >+-- >+-- This template requires that the name of the EOF token be set >+-- to EOF_TOKEN to be consistent with LexerTemplateD and LexerTemplateE >+-- >+%EOF >+ EOF_TOKEN >+%End >+ >+%ERROR >+ ERROR_TOKEN >+%End >+ >+%Define >+ $Header >+ /. >+ // >+ // Rule $rule_number: $rule_text >+ // >+ ./ >+ >+ $BeginAction >+ /.$Header$case $rule_number: {./ >+ >+ $EndAction >+ /. break; >+ }./ >+ >+ -- BeginJava does nothing >+ -- block-actions should call BeginCode, instead >+ $BeginJava /../ >+ >+ -- EndJava does nothing >+ -- block-actions should call EndCode, instead >+ $EndJava /../ >+ >+ $BeginCode >+ /.$BeginAction >+ $symbol_declarations./ >+ >+ $EndCode /.$EndAction./ >+ >+ $NoAction >+ /.$Header$case $rule_number: >+ break;./ >+ >+ $BadAction >+ /.$Header$case $rule_number: >+ throw new Error("No action specified for rule " + $rule_number);./ >+ >+ $NullAction >+ /.$Header$case $rule_number: >+ setResult(null); >+ break;./ >+ >+ $EmptyListAction >+ /. $Header >+ case $rule_number: >+ setResult(new BasicEList()); >+ break;./ >+ >+ $BeginActions >+ /. >+ @SuppressWarnings("unchecked") >+ public void ruleAction(int ruleNumber) >+ { >+ switch (ruleNumber) >+ {./ >+ >+ $SplitActions >+ /. >+ default: >+ ruleAction$rule_number(ruleNumber); >+ break; >+ } >+ return; >+ } >+ >+ public void ruleAction$rule_number(int ruleNumber) >+ { >+ switch (ruleNumber) >+ {./ >+ >+ $EndActions >+ /. >+ default: >+ break; >+ } >+ return; >+ }./ >+ >+ $entry_declarations >+ /. >+ public $ast_class parse$entry_name() >+ { >+ return parse$entry_name(null, getDefaultRepairCount()); >+ } >+ >+ public $ast_class parse$entry_name(Monitor monitor) >+ { >+ return parse$entry_name(monitor, getDefaultRepairCount()); >+ } >+ >+ public $ast_class parse$entry_name(int error_repair_count) >+ { >+ return parse$entry_name(null, error_repair_count); >+ } >+ >+ public void resetParse$entry_name() >+ { >+ dtParser.resetParserEntry($sym_type.$entry_marker); >+ } >+ >+ public $ast_class parse$entry_name(Monitor monitor, int error_repair_count) >+ { >+ dtParser.setMonitor(monitor); >+ >+ try >+ { >+ return ($ast_class) dtParser.parseEntry($sym_type.$entry_marker); >+ } >+ catch (BadParseException e) >+ { >+ prsStream.reset(e.error_token); // point to error token >+ >+ DiagnoseParser diagnoseParser = new DiagnoseParser(prsStream, prsTable); >+ diagnoseParser.diagnoseEntry($sym_type.$entry_marker, e.error_token); >+ } >+ >+ return null; >+ } >+ ./ >+ >+ $additional_interfaces /../ >+ $ast_class /.$ast_type./ >+ $unimplemented_symbols_warning /.false./ >+ >+ $setSym1 /. // macro setSym1 is deprecated. Use function setResult >+ getParser().setSym1./ >+ $setResult /. // macro setResult is deprecated. Use function setResult >+ getParser().setSym1./ >+ $getSym /. // macro getSym is deprecated. Use function getRhsSym >+ getParser().getSym./ >+ $getToken /. // macro getToken is deprecated. Use function getRhsTokenIndex >+ getParser().getToken./ >+ $getIToken /. // macro getIToken is deprecated. Use function getRhsIToken >+ prsStream.getIToken./ >+ $getLeftSpan /. // macro getLeftSpan is deprecated. Use function getLeftSpan >+ getParser().getFirstToken./ >+ $getRightSpan /. // macro getRightSpan is deprecated. Use function getRightSpan >+ getParser().getLastToken./ >+ >+ $prs_stream /.prsStream./ -- DEPRECATED >+ >+ -- modified to include throwing exceptions >+ $parserCore >+ /. >+ >+ ./ >+ -- OCL ADDITIONS >+ >+ -- Definition of macros used in the parser template >+ -- >+ $super_parser_class /.AbstractOCLParser./ >+ $prs_stream_class /.OCLParserStream./ >+ $prs_parser_class /.DeterministicParser./ >+ $prs_parser_exception /.NotDeterministicParseTableException./ >+ $prs_parser_throw /.throw new RuntimeException("****Error: Regenerate $prs_type.java with -NOBACKTRACK option")./ >+ $prs_parse_args /../ >+ $lex_stream_class /.AbstractLexer./ >+ $action_class /.$file_prefix./ -- DEPRECATED >+ $copyright_contributions /.*./ >+ >+ -- package namespace of the LPG Runtime API >+ $lpg_ns /.lpg.runtime./ >+ >+ $NewCase >+ /. $Header >+ case $rule_number:./ >+%End >+ >+%Headers >+ /. >+ public class $action_type extends $super_parser_class implements RuleAction$additional_interfaces >+ { >+ private $prs_stream_class prsStream = null; >+ >+ private boolean unimplementedSymbolsWarning = $unimplemented_symbols_warning; >+ >+ private static ParseTable prsTable = new $prs_type(); >+ public ParseTable getParseTable() { return prsTable; } >+ >+ private $prs_parser_class dtParser = null; >+ public $prs_parser_class getParser() { return dtParser; } >+ >+ private void setResult(Object object) { dtParser.setSym1(object); } >+ public Object getRhsSym(int i) { return dtParser.getSym(i); } >+ >+ public int getRhsTokenIndex(int i) { return dtParser.getToken(i); } >+ public IToken getRhsIToken(int i) { return prsStream.getIToken(getRhsTokenIndex(i)); } >+ >+ public int getRhsFirstTokenIndex(int i) { return dtParser.getFirstToken(i); } >+ public IToken getRhsFirstIToken(int i) { return prsStream.getIToken(getRhsFirstTokenIndex(i)); } >+ >+ public int getRhsLastTokenIndex(int i) { return dtParser.getLastToken(i); } >+ public IToken getRhsLastIToken(int i) { return prsStream.getIToken(getRhsLastTokenIndex(i)); } >+ >+ public int getLeftSpan() { return dtParser.getFirstToken(); } >+ public IToken getLeftIToken() { return prsStream.getIToken(getLeftSpan()); } >+ >+ public int getRightSpan() { return dtParser.getLastToken(); } >+ public IToken getRightIToken() { return prsStream.getIToken(getRightSpan()); } >+ >+ public int getRhsErrorTokenIndex(int i) >+ { >+ int index = dtParser.getToken(i); >+ IToken err = prsStream.getIToken(index); >+ return (err instanceof ErrorToken ? index : 0); >+ } >+ public ErrorToken getRhsErrorIToken(int i) >+ { >+ int index = dtParser.getToken(i); >+ IToken err = prsStream.getIToken(index); >+ return (ErrorToken) (err instanceof ErrorToken ? err : null); >+ } >+ >+ public void reset(ILexStream lexStream) >+ { >+ prsStream = new $prs_stream_class(getEnvironment(), lexStream); >+ dtParser.reset(prsStream); >+ >+ try >+ { >+ prsStream.remapTerminalSymbols(orderedTerminalSymbols(), prsTable.getEoftSymbol()); >+ } >+ catch(NullExportedSymbolsException e) { >+ } >+ catch(NullTerminalSymbolsException e) { >+ } >+ catch(UnimplementedTerminalsException e) >+ { >+ if (unimplementedSymbolsWarning) { >+ java.util.ArrayList<?> unimplemented_symbols = e.getSymbols(); >+ System.out.println("The Lexer will not scan the following token(s):"); >+ for (int i = 0; i < unimplemented_symbols.size(); i++) >+ { >+ Integer id = (Integer) unimplemented_symbols.get(i); >+ System.out.println(" " + $sym_type.orderedTerminalSymbols[id.intValue()]); >+ } >+ System.out.println(); >+ } >+ } >+ catch(UndefinedEofSymbolException e) >+ { >+ throw new Error(new UndefinedEofSymbolException >+ ("The Lexer does not implement the Eof symbol " + >+ $sym_type.orderedTerminalSymbols[prsTable.getEoftSymbol()])); >+ } >+ } >+ >+ public $action_type($lex_stream_class lexer) >+ { >+ super(lexer); >+ try >+ { >+ dtParser = new $prs_parser_class(prsStream, prsTable, this); >+ } >+ catch ($prs_parser_exception e) >+ { >+ $prs_parser_throw; >+ } >+ catch (BadParseSymFileException e) >+ { >+ throw new Error(new BadParseSymFileException("Bad Parser Symbol File -- $sym_type.java. Regenerate $prs_type.java")); >+ } >+ >+ reset(lexer.getILexStream()); >+ } >+ >+ public int numTokenKinds() { return $sym_type.numTokenKinds; } >+ public String[] orderedTerminalSymbols() { return $sym_type.orderedTerminalSymbols; } >+ public String getTokenKindName(int kind) { return $sym_type.orderedTerminalSymbols[kind]; } >+ public int getEOFTokenKind() { return prsTable.getEoftSymbol(); } >+ public $prs_stream_class getIPrsStream() { return prsStream; } >+ >+ /** >+ * @deprecated replaced by {@link #getIPrsStream()} >+ * >+ */ >+ public PrsStream getPrsStream() { return prsStream; } >+ >+ /** >+ * @deprecated replaced by {@link #getIPrsStream()} >+ * >+ */ >+ public PrsStream getParseStream() { return prsStream; } >+ >+ public $ast_class parser() >+ { >+ return parser(null, getDefaultRepairCount()); >+ } >+ >+ public $ast_class parser(Monitor monitor) >+ { >+ return parser(monitor, getDefaultRepairCount()); >+ } >+ >+ public $ast_class parser(int error_repair_count) >+ { >+ return parser(null, error_repair_count); >+ } >+ >+ public $ast_class parser(Monitor monitor, int error_repair_count) >+ { >+ dtParser.setMonitor(monitor); >+ >+ try >+ { >+ return ($ast_class) dtParser.parse(); >+ } >+ catch (BadParseException e) >+ { >+ prsStream.reset(e.error_token); // point to error token >+ >+ DiagnoseParser diagnoseParser = new DiagnoseParser(prsStream, prsTable); >+ diagnoseParser.diagnose(e.error_token); >+ } >+ >+ return null; >+ } >+ >+ // >+ // Additional entry points, if any >+ // >+ $entry_declarations >+ >+ // OCL Additions >+ >+ public $environment_class getOCLEnvironment() { >+ return getLexer().getOCLEnvironment(); >+ } >+ >+ @Override >+ public $lex_stream_class getLexer() { >+ return ($lex_stream_class) super.getLexer(); >+ } >+ ./ >+ >+%End >+ >+%Rules >+ /.$BeginActions./ >+%End >+ >+%Trailers >+ /. >+ $EndActions >+ } >+ ./ >+%End >+ >+-- >+-- E N D O F T E M P L A T E >+-- >Index: src/org/eclipse/ocl/parser/EssentialOCL.gi >=================================================================== >RCS file: src/org/eclipse/ocl/parser/EssentialOCL.gi >diff -N src/org/eclipse/ocl/parser/EssentialOCL.gi >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/parser/EssentialOCL.gi 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,1573 @@ >+--/** >+-- * <copyright> >+-- * >+-- * Copyright (c) 2005, 2009 IBM Corporation, Zeligsoft Inc., Borland Software Corp., >+-- * Open Canarias S.L 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 225493, 243976, 259818 >+-- * Zeligsoft - Bug 243976 >+-- * Borland - Bug 242880 >+-- * Adolfo Sanchez-Barbudo Herrera - LPG v 2.0.17 adoption >+-- * >+-- * </copyright> >+-- * >+-- * $Id: EssentialOCL.gi,v 1.7 2009/03/05 14:12:14 cdamus Exp $ >+-- */ >+-- >+-- The EssentialOCL Parser >+-- >+ >+ >+%Notice >+ /./** >+ * <copyright> >+ * >+ * Copyright (c) 2005, 2009 IBM Corporation, Zeligsoft Inc., Borland Software Corp., >+ * Open Canarias S.L. 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 225493, 243976, 259818 >+ * Zeligsoft - Bug 243976 >+ * Borland - Bug 242880 >+ * E.D.Willink - Bug 282882 resolve invalid confusion >+ * Adolfo Sanchez- Barbudo Herrera - LPG v 2.0.17 adoption >+$copyright_contributions >+ * </copyright> >+ * >+ * $Id: EssentialOCL.g,v 1.7 2009/03/05 14:12:14 cdamus Exp $ >+ */ >+ ./ >+%End >+ >+%Globals >+ /.import org.eclipse.emf.common.util.BasicEList; >+ import org.eclipse.emf.common.util.EList; >+ import org.eclipse.ocl.cst.CSTNode; >+ import org.eclipse.ocl.cst.CallExpCS; >+ import org.eclipse.ocl.cst.CollectionTypeIdentifierEnum; >+ import org.eclipse.ocl.cst.DotOrArrowEnum; >+ import org.eclipse.ocl.cst.IntegerLiteralExpCS; >+ import org.eclipse.ocl.cst.IsMarkedPreCS; >+ import org.eclipse.ocl.cst.MessageExpCS; >+ import org.eclipse.ocl.cst.OCLExpressionCS; >+ import org.eclipse.ocl.cst.OCLMessageArgCS; >+ import org.eclipse.ocl.cst.OperationCallExpCS; >+ import org.eclipse.ocl.cst.PathNameCS; >+ import org.eclipse.ocl.cst.SimpleNameCS; >+ import org.eclipse.ocl.cst.SimpleTypeEnum; >+ import org.eclipse.ocl.cst.StateExpCS; >+ import org.eclipse.ocl.cst.StringLiteralExpCS; >+ import org.eclipse.ocl.cst.TypeCS; >+ import org.eclipse.ocl.cst.VariableCS; >+ import org.eclipse.ocl.util.OCLStandardLibraryUtil; >+ import org.eclipse.ocl.utilities.PredefinedType; >+ import org.eclipse.ocl.lpg.OCLParserStream; >+ >+ import $lpg_ns.BadParseException; >+ import $lpg_ns.BadParseSymFileException; >+ import $lpg_ns.$prs_parser_class; >+ import $lpg_ns.DiagnoseParser; >+ import $lpg_ns.ErrorToken; >+ import $lpg_ns.IToken; >+ import $lpg_ns.ILexStream; >+ import $lpg_ns.Monitor; >+ import $lpg_ns.$prs_parser_exception; >+ import $lpg_ns.NullExportedSymbolsException; >+ import $lpg_ns.NullTerminalSymbolsException; >+ import $lpg_ns.ParseTable; >+ import $lpg_ns.PrsStream; >+ import $lpg_ns.RuleAction; >+ import $lpg_ns.UndefinedEofSymbolException; >+ import $lpg_ns.UnimplementedTerminalsException; >+ ./ >+%End >+ >+%KeyWords >+ self >+ inv >+ pre >+ post >+ endpackage >+ def >+ if >+ then >+ else >+ endif >+ and >+ or >+ xor >+ not >+ implies >+ let >+ in >+ true >+ false >+ >+ -- >+ -- the following appear to have been omitted from the list of >+ -- OCL reserved words in Section 7.4.9. They will be treated >+ -- as unreserved for compliance >+ -- >+ body >+ derive >+ init >+ null >+ invalid >+-- return -- don't need a keyword for LPG purposes >+ >+ -- >+ -- the remainder of the LPG keywords are defined as such for the >+ -- purpose of constructing the CST grammar. They are not OCL >+ -- reserved words >+ -- >+ Set >+ Bag >+ Sequence >+ Collection >+ OrderedSet >+ >+ iterate >+ forAll >+ exists >+ isUnique >+ any >+ one >+ >+ collect >+ select >+ reject >+ collectNested >+ sortedBy >+ >+ closure >+ >+ oclIsKindOf >+ oclIsTypeOf >+ oclAsType >+ oclIsNew >+ oclIsUndefined >+ oclIsInvalid >+ oclIsInState >+ allInstances >+ >+ String >+ Integer >+ UnlimitedNatural >+ Real >+ Boolean >+ Tuple >+ OclAny >+ OclVoid >+ Invalid >+ OclInvalid >+ OclMessage >+%End >+ >+%Identifier >+ IDENTIFIER >+%End >+ >+%Terminals >+ >+ NUMERIC_OPERATION >+ >+ STRING_LITERAL >+ INTEGER_LITERAL >+ REAL_LITERAL >+ >+ PLUS ::= '+' >+ MINUS ::= '-' >+ MULTIPLY ::= '*' >+ DIVIDE ::= '/' >+ >+ GREATER ::= '>' >+ LESS ::= '<' >+ EQUAL ::= '=' >+ GREATER_EQUAL ::= '>=' >+ LESS_EQUAL ::= '<=' >+ NOT_EQUAL ::= '<>' >+ >+ LPAREN ::= '(' >+ RPAREN ::= ')' >+ LBRACE ::= '{' >+ RBRACE ::= '}' >+ LBRACKET ::= '[' >+ RBRACKET ::= ']' >+ >+ ARROW ::= '->' >+ BAR ::= '|' >+ COMMA ::= ',' >+ COLON ::= ':' >+ COLONCOLON ::= '::' >+ SEMICOLON ::= ';' >+ DOT ::= '.' >+ DOTDOT ::= '..' >+ ATPRE ::= '@pre' >+ >+ CARET ::= '^' >+ CARETCARET ::= '^^' >+ QUESTIONMARK ::= '?' >+ >+%End >+ >+--$EOL >+-- SEMICOLON >+--$End >+ >+--$Start >+-- goal >+--$End >+ >+%Headers >+ /. >+ >+ // Some methods to keep compatibility backwards >+ /** >+ * @since 3.0 >+ */ >+ protected IToken getIToken(int i) { >+ return prsStream.getIToken(i); >+ } >+ >+ protected String getTokenText(int i) { >+ return prsStream.getTokenText(i); >+ } >+ >+ ./ >+%End >+ >+%Rules >+ >+ -- opt = optional >+ -- m = multiple >+ >+ -- >+ -- Define a group of names that we define as keywords for the purpose >+ -- of constructing an LPG grammar, but that are not reserved by OCL >+ -- and are commonly used in models such as the UML metamodel, itself >+ -- >+ >+ binaryIdentifier -> oclIsUndefined >+ binaryIdentifier -> oclIsInvalid >+ binaryIdentifier -> oclIsNew >+ binaryIdentifier -> oclAsType >+ binaryIdentifier -> oclIsKindOf >+ binaryIdentifier -> oclIsTypeOf >+ binaryIdentifier -> EQUAL >+ binaryIdentifier -> NOT_EQUAL >+ binaryIdentifier -> PLUS >+ binaryIdentifier -> MULTIPLY >+ binaryIdentifier -> DIVIDE >+ binaryIdentifier -> GREATER >+ binaryIdentifier -> LESS >+ binaryIdentifier -> GREATER_EQUAL >+ binaryIdentifier -> LESS_EQUAL >+ binaryIdentifier -> and >+ binaryIdentifier -> or >+ binaryIdentifier -> xor >+ >+ unaryIdentifier -> MINUS >+ unaryIdentifier -> not >+ >+ iteratorIdentifier -> forAll >+ iteratorIdentifier -> exists >+ iteratorIdentifier -> isUnique >+ iteratorIdentifier -> any >+ iteratorIdentifier -> one >+ iteratorIdentifier -> collect >+ iteratorIdentifier -> select >+ iteratorIdentifier -> reject >+ iteratorIdentifier -> collectNested >+ iteratorIdentifier -> sortedBy >+ iteratorIdentifier -> closure >+ >+ keywordAsIdentifier1 -> iterate >+ keywordAsIdentifier1 -> iteratorIdentifier >+ keywordAsIdentifier1 -> allInstances >+ keywordAsIdentifier1 -> body >+ keywordAsIdentifier1 -> derive >+ keywordAsIdentifier1 -> init >+ keywordAsIdentifier1 -> Set >+ keywordAsIdentifier1 -> Bag >+ keywordAsIdentifier1 -> Sequence >+ keywordAsIdentifier1 -> Collection >+ keywordAsIdentifier1 -> OrderedSet >+ -------- >+ keywordAsIdentifier -> keywordAsIdentifier1 >+ keywordAsIdentifier -> null >+ >+ binaryName -> simpleNameCS >+ binaryName ::= binaryIdentifier >+ /.$NewCase./ >+ keywordAsName ::= keywordAsIdentifier >+ /.$NewCase./ >+ keywordAsName1 ::= keywordAsIdentifier1 >+ /.$NewCase./ >+ unaryName ::= unaryIdentifier >+ /.$BeginCode >+ SimpleNameCS result = createSimpleNameCS( >+ SimpleTypeEnum.IDENTIFIER_LITERAL, >+ getTokenText($getToken(1)) >+ ); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ iterateName ::= iterate >+ /.$NewCase./ >+ iteratorName ::= iteratorIdentifier >+ /.$NewCase./ >+ oclIsInStateName ::= oclIsInState >+ /.$BeginCode >+ SimpleNameCS result = createSimpleNameCS( >+ SimpleTypeEnum.KEYWORD_LITERAL, >+ getTokenText($getToken(1)) >+ ); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ -- >+ -- the 'operationCS' non-terminal is not referenced in this grammar >+ -- >+ operationCS -> operationCS1 >+ operationCS -> operationCS2 >+ operationCS1 ::= IDENTIFIER '(' parametersCSopt ')' ':' typeCSopt >+ /.$BeginCode >+ CSTNode result = createOperationCS( >+ getTokenText($getToken(1)), >+ (EList)$getSym(3), >+ (TypeCS)$getSym(6) >+ ); >+ if ($getSym(6) != null) { >+ setOffsets(result, getIToken($getToken(1)), (CSTNode)$getSym(6)); >+ } else { >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(5))); >+ } >+ $setResult(result); >+ $EndCode >+ ./ >+ operationCS2 ::= pathNameCS '::' simpleNameCS '(' parametersCSopt ')' ':' typeCSopt >+ /.$BeginCode >+ CSTNode result = createOperationCS( >+ (PathNameCS)$getSym(1), >+ (SimpleNameCS)$getSym(3), >+ (EList)$getSym(5), >+ (TypeCS)$getSym(8) >+ ); >+ if ($getSym(8) != null) { >+ setOffsets(result, (CSTNode)$getSym(1), (CSTNode)$getSym(8)); >+ } else { >+ setOffsets(result, (CSTNode)$getSym(1), getIToken($getToken(7))); >+ } >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ >+ parametersCSopt ::= %empty >+ /.$EmptyListAction./ >+ parametersCSopt -> parametersCS >+ parametersCS ::= variableCS >+ /.$BeginCode >+ EList result = new BasicEList(); >+ result.add($getSym(1)); >+ $setResult(result); >+ $EndCode >+ ./ >+ parametersCS ::= parametersCS ',' variableCS >+ /.$BeginCode >+ EList result = (EList)$getSym(1); >+ result.add($getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ simpleNameCSopt ::= %empty >+ /.$NullAction./ >+ simpleNameCSopt -> simpleNameCS >+ >+ oclExpressionCS -> impliesExpCS >+ oclExpressionCS -> impliesWithLet >+ >+ impliesExpCS -> andOrXorExpCS >+ impliesWithLet -> andOrXorWithLet >+ impliesExpCS ::= impliesExpCS implies andOrXorExpCS >+ /.$NewCase./ >+ impliesWithLet ::= impliesExpCS implies andOrXorWithLet >+ /.$NewCase./ >+ >+ andOrXorExpCS -> equalityExpCS >+ andOrXorWithLet -> equalityWithLet >+ andOrXorExpCS ::= andOrXorExpCS and equalityExpCS >+ /.$NewCase./ >+ andOrXorExpCS ::= andOrXorExpCS or equalityExpCS >+ /.$NewCase./ >+ andOrXorExpCS ::= andOrXorExpCS xor equalityExpCS >+ /.$NewCase./ >+ andOrXorWithLet ::= andOrXorExpCS and equalityWithLet >+ /.$NewCase./ >+ andOrXorWithLet ::= andOrXorExpCS or equalityWithLet >+ /.$NewCase./ >+ andOrXorWithLet ::= andOrXorExpCS xor equalityWithLet >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = createSimpleNameCS( >+ SimpleTypeEnum.STRING_LITERAL, >+ getTokenText($getToken(2)) >+ ); >+ setOffsets(simpleNameCS, getIToken($getToken(2))); >+ EList args = new BasicEList(); >+ args.add($getSym(3)); >+ CSTNode result = createOperationCallExpCS( >+ (OCLExpressionCS)$getSym(1), >+ simpleNameCS, >+ args >+ ); >+ setOffsets(result, (CSTNode)$getSym(1), (CSTNode)$getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ equalityExpCS -> relationalExpCS >+ equalityWithLet -> relationalWithLet >+ equalityExpCS ::= equalityExpCS '=' relationalExpCS >+ /.$NewCase./ >+ equalityWithLet ::= equalityExpCS '=' relationalWithLet >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = createSimpleNameCS( >+ SimpleTypeEnum.STRING_LITERAL, >+ OCLStandardLibraryUtil.getOperationName(PredefinedType.EQUAL) >+ ); >+ setOffsets(simpleNameCS, getIToken($getToken(2))); >+ EList args = new BasicEList(); >+ args.add($getSym(3)); >+ CSTNode result = createOperationCallExpCS( >+ (OCLExpressionCS)$getSym(1), >+ simpleNameCS, >+ args >+ ); >+ setOffsets(result, (CSTNode)$getSym(1), (CSTNode)$getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ equalityExpCS ::= equalityExpCS '<>' relationalExpCS >+ /.$NewCase./ >+ equalityWithLet ::= equalityExpCS '<>' relationalWithLet >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = createSimpleNameCS( >+ SimpleTypeEnum.STRING_LITERAL, >+ OCLStandardLibraryUtil.getOperationName(PredefinedType.NOT_EQUAL) >+ ); >+ setOffsets(simpleNameCS, getIToken($getToken(2))); >+ EList args = new BasicEList(); >+ args.add($getSym(3)); >+ CSTNode result = createOperationCallExpCS( >+ (OCLExpressionCS)$getSym(1), >+ simpleNameCS, >+ args >+ ); >+ setOffsets(result, (CSTNode)$getSym(1), (CSTNode)$getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ relationalExpCS -> ifExpCSPrec >+ -- Note that ifExp already embeds let, so we needn't deal with it here >+ relationalWithLet -> additiveWithLet >+ relationalExpCS ::= relationalExpCS '>' ifExpCSPrec >+ /.$NewCase./ >+ relationalWithLet ::= relationalExpCS '>' additiveWithLet >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = createSimpleNameCS( >+ SimpleTypeEnum.STRING_LITERAL, >+ OCLStandardLibraryUtil.getOperationName(PredefinedType.GREATER_THAN) >+ ); >+ setOffsets(simpleNameCS, getIToken($getToken(2))); >+ EList args = new BasicEList(); >+ args.add($getSym(3)); >+ CSTNode result = createOperationCallExpCS( >+ (OCLExpressionCS)$getSym(1), >+ simpleNameCS, >+ args >+ ); >+ setOffsets(result, (CSTNode)$getSym(1), (CSTNode)$getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ relationalExpCS ::= relationalExpCS '<' ifExpCSPrec >+ /.$NewCase./ >+ relationalWithLet ::= relationalExpCS '<' additiveWithLet >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = createSimpleNameCS( >+ SimpleTypeEnum.STRING_LITERAL, >+ OCLStandardLibraryUtil.getOperationName(PredefinedType.LESS_THAN) >+ ); >+ setOffsets(simpleNameCS, getIToken($getToken(2))); >+ EList args = new BasicEList(); >+ args.add($getSym(3)); >+ CSTNode result = createOperationCallExpCS( >+ (OCLExpressionCS)$getSym(1), >+ simpleNameCS, >+ args >+ ); >+ setOffsets(result, (CSTNode)$getSym(1), (CSTNode)$getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ relationalExpCS ::= relationalExpCS '>=' ifExpCSPrec >+ /.$NewCase./ >+ relationalWithLet ::= relationalExpCS '>=' additiveWithLet >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = createSimpleNameCS( >+ SimpleTypeEnum.STRING_LITERAL, >+ OCLStandardLibraryUtil.getOperationName(PredefinedType.GREATER_THAN_EQUAL) >+ ); >+ setOffsets(simpleNameCS, getIToken($getToken(2))); >+ EList args = new BasicEList(); >+ args.add($getSym(3)); >+ CSTNode result = createOperationCallExpCS( >+ (OCLExpressionCS)$getSym(1), >+ simpleNameCS, >+ args >+ ); >+ setOffsets(result, (CSTNode)$getSym(1), (CSTNode)$getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ relationalExpCS ::= relationalExpCS '<=' ifExpCSPrec >+ /.$NewCase./ >+ relationalWithLet ::= relationalExpCS '<=' additiveWithLet >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = createSimpleNameCS( >+ SimpleTypeEnum.STRING_LITERAL, >+ OCLStandardLibraryUtil.getOperationName(PredefinedType.LESS_THAN_EQUAL) >+ ); >+ setOffsets(simpleNameCS, getIToken($getToken(2))); >+ EList args = new BasicEList(); >+ args.add($getSym(3)); >+ CSTNode result = createOperationCallExpCS( >+ (OCLExpressionCS)$getSym(1), >+ simpleNameCS, >+ args >+ ); >+ setOffsets(result, (CSTNode)$getSym(1), (CSTNode)$getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ ifExpCSPrec -> additiveExpCS >+ ifExpCSPrec -> ifExpCS >+ >+ additiveExpCS -> multiplicativeExpCS >+ additiveWithLet -> multiplicativeWithLet >+ additiveExpCS ::= additiveExpCS '+' multiplicativeExpCS >+ /.$NewCase./ >+ additiveWithLet ::= additiveExpCS '+' multiplicativeWithLet >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = createSimpleNameCS( >+ SimpleTypeEnum.STRING_LITERAL, >+ OCLStandardLibraryUtil.getOperationName(PredefinedType.PLUS) >+ ); >+ setOffsets(simpleNameCS, getIToken($getToken(2))); >+ EList args = new BasicEList(); >+ args.add($getSym(3)); >+ CSTNode result = createOperationCallExpCS( >+ (OCLExpressionCS)$getSym(1), >+ simpleNameCS, >+ args >+ ); >+ setOffsets(result, (CSTNode)$getSym(1), (CSTNode)$getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ additiveExpCS ::= additiveExpCS '-' multiplicativeExpCS >+ /.$NewCase./ >+ additiveWithLet ::= additiveExpCS '-' multiplicativeWithLet >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = createSimpleNameCS( >+ SimpleTypeEnum.STRING_LITERAL, >+ OCLStandardLibraryUtil.getOperationName(PredefinedType.MINUS) >+ ); >+ setOffsets(simpleNameCS, getIToken($getToken(2))); >+ EList args = new BasicEList(); >+ args.add($getSym(3)); >+ CSTNode result = createOperationCallExpCS( >+ (OCLExpressionCS)$getSym(1), >+ simpleNameCS, >+ args >+ ); >+ setOffsets(result, (CSTNode)$getSym(1), (CSTNode)$getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ multiplicativeExpCS -> unaryExpCS >+ multiplicativeWithLet -> unaryWithLet >+ multiplicativeExpCS ::= multiplicativeExpCS '*' unaryExpCS >+ /.$NewCase./ >+ multiplicativeWithLet ::= multiplicativeExpCS '*' unaryWithLet >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = createSimpleNameCS( >+ SimpleTypeEnum.STRING_LITERAL, >+ OCLStandardLibraryUtil.getOperationName(PredefinedType.TIMES) >+ ); >+ setOffsets(simpleNameCS, getIToken($getToken(2))); >+ EList args = new BasicEList(); >+ args.add($getSym(3)); >+ CSTNode result = createOperationCallExpCS( >+ (OCLExpressionCS)$getSym(1), >+ simpleNameCS, >+ args >+ ); >+ setOffsets(result, (CSTNode)$getSym(1), (CSTNode)$getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ multiplicativeExpCS ::= multiplicativeExpCS '/' unaryExpCS >+ /.$NewCase./ >+ multiplicativeWithLet ::= multiplicativeExpCS '/' unaryWithLet >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = createSimpleNameCS( >+ SimpleTypeEnum.STRING_LITERAL, >+ OCLStandardLibraryUtil.getOperationName(PredefinedType.DIVIDE) >+ ); >+ setOffsets(simpleNameCS, getIToken($getToken(2))); >+ EList args = new BasicEList(); >+ args.add($getSym(3)); >+ CSTNode result = createOperationCallExpCS( >+ (OCLExpressionCS)$getSym(1), >+ simpleNameCS, >+ args >+ ); >+ setOffsets(result, (CSTNode)$getSym(1), (CSTNode)$getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ unaryExpCS -> dotArrowExpCS >+ unaryWithLet -> letExpCS >+ unaryExpCS ::= '-' unaryExpCS >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = createSimpleNameCS( >+ SimpleTypeEnum.STRING_LITERAL, >+ OCLStandardLibraryUtil.getOperationName(PredefinedType.MINUS) >+ ); >+ setOffsets(simpleNameCS, getIToken($getToken(1))); >+ CSTNode result = createOperationCallExpCS( >+ (OCLExpressionCS)$getSym(2), >+ simpleNameCS, >+ new BasicEList() >+ ); >+ setOffsets(result, getIToken($getToken(1)), (CSTNode)$getSym(2)); >+ $setResult(result); >+ $EndCode >+ ./ >+ unaryExpCS ::= not unaryExpCS >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = createSimpleNameCS( >+ SimpleTypeEnum.STRING_LITERAL, >+ getTokenText($getToken(1)) >+ ); >+ setOffsets(simpleNameCS, getIToken($getToken(1))); >+ CSTNode result = createOperationCallExpCS( >+ (OCLExpressionCS)$getSym(2), >+ simpleNameCS, >+ new BasicEList() >+ ); >+ setOffsets(result, getIToken($getToken(1)), (CSTNode)$getSym(2)); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ dotArrowExpCS -> oclExpCS >+ dotArrowExpCS ::= dotArrowExpCS callExpCS >+ /.$BeginCode >+ CallExpCS result = (CallExpCS)$getSym(2); >+ result.setSource((OCLExpressionCS)$getSym(1)); >+ setOffsets(result, (CSTNode)$getSym(1), result); >+ $setResult(result); >+ $EndCode >+ ./ >+ dotArrowExpCS ::= dotArrowExpCS messageExpCS >+ /.$BeginCode >+ MessageExpCS result = (MessageExpCS)$getSym(2); >+ result.setTarget((OCLExpressionCS)$getSym(1)); >+ setOffsets(result, (CSTNode)$getSym(1), (CSTNode)$getSym(2)); >+ $setResult(result); >+ $EndCode >+ ./ >+ dotArrowExpCS ::= NUMERIC_OPERATION '(' argumentsCSopt ')' >+ /.$BeginCode >+ // NUMERIC_OPERATION -> Integer '.' Identifier >+ String text = getTokenText(dtParser.getToken(1)); >+ int index = text.indexOf('.'); >+ String integer = text.substring(0, index); >+ String simpleName = text.substring(index + 1); >+ >+ // create the IntegerLiteralExpCS >+ IToken numericToken = getIToken($getToken(1)); >+ int startOffset = numericToken.getStartOffset(); >+ int endOffset = startOffset + integer.length() - 1; // inclusive >+ >+ IntegerLiteralExpCS integerLiteralExpCS = createIntegerLiteralExpCS(integer); >+ integerLiteralExpCS.setStartOffset(startOffset); >+ integerLiteralExpCS.setEndOffset(endOffset); >+ integerLiteralExpCS.setStartToken(numericToken); >+ integerLiteralExpCS.setEndToken(numericToken); >+ >+ startOffset = endOffset + 2; // end of integerLiteral + 1('.') + 1(start of simpleName) >+ endOffset = getIToken($getToken(1)).getEndOffset(); >+ >+ // create the SimpleNameCS >+ SimpleNameCS simpleNameCS = createSimpleNameCS( >+ SimpleTypeEnum.IDENTIFIER_LITERAL, >+ simpleName >+ ); >+ simpleNameCS.setStartOffset(startOffset); >+ simpleNameCS.setEndOffset(endOffset); >+ simpleNameCS.setStartToken(numericToken); >+ simpleNameCS.setEndToken(numericToken); >+ >+ // create the OperationCallExpCS >+ CSTNode result = createOperationCallExpCS( >+ integerLiteralExpCS, >+ simpleNameCS, >+ (EList)$getSym(3) >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(4))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ -- static operation call (@pre is not permitted in this context) >+ dotArrowExpCS ::= pathNameCS '::' simpleNameCS '(' argumentsCSopt ')' >+ /.$BeginCode >+ OperationCallExpCS result = createOperationCallExpCS( >+ (PathNameCS)$getSym(1), >+ (SimpleNameCS)$getSym(3), >+ (EList)$getSym(5) >+ ); >+ setOffsets(result, (CSTNode)$getSym(1), getIToken($getToken(6))); >+ result.setAccessor(DotOrArrowEnum.DOT_LITERAL); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ >+ oclExpCS -> variableExpCS >+ oclExpCS -> literalExpCS >+ oclExpCS -> operationCallExpCS >+ oclExpCS -> keywordOperationCallExpCS >+ >+ oclExpCS ::= '(' oclExpressionCS ')' >+ /.$BeginCode >+ CSTNode result = (CSTNode)$getSym(2); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(3))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ variableExpCS ::= simpleNameCS isMarkedPreCS >+ /.$NewCase./ >+ variableExpCS ::= keywordAsName1 isMarkedPreCS >+ /.$BeginCode >+ IsMarkedPreCS isMarkedPreCS = (IsMarkedPreCS)$getSym(2); >+ CSTNode result = createVariableExpCS( >+ (SimpleNameCS)$getSym(1), >+ new BasicEList(), >+ isMarkedPreCS >+ ); >+ if (isMarkedPreCS.isPre()) { >+ setOffsets(result, (CSTNode)$getSym(1), (CSTNode)$getSym(2)); >+ } else { >+ setOffsets(result, (CSTNode)$getSym(1)); >+ } >+ $setResult(result); >+ $EndCode >+ ./ >+ variableExpCS ::= simpleNameCS '[' argumentsCS ']' isMarkedPreCS >+ /.$NewCase./ >+ variableExpCS ::= keywordAsName1 '[' argumentsCS ']' isMarkedPreCS >+ /.$BeginCode >+ IsMarkedPreCS isMarkedPreCS = (IsMarkedPreCS)$getSym(5); >+ CSTNode result = createVariableExpCS( >+ (SimpleNameCS)$getSym(1), >+ (EList)$getSym(3), >+ isMarkedPreCS >+ ); >+ if (isMarkedPreCS.isPre()) { >+ setOffsets(result, (CSTNode)$getSym(1), (CSTNode)$getSym(5)); >+ } else { >+ setOffsets(result, (CSTNode)$getSym(1), getIToken($getToken(4))); >+ } >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ >+ simpleNameCS -> primitiveTypeCS >+ simpleNameCS ::= self >+ /.$BeginCode >+ CSTNode result = createSimpleNameCS( >+ SimpleTypeEnum.SELF_LITERAL, >+ getTokenText($getToken(1)) >+ ); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ simpleNameCS ::= IDENTIFIER >+ /.$BeginCode >+ CSTNode result = createSimpleNameCS( >+ SimpleTypeEnum.IDENTIFIER_LITERAL, >+ getTokenText($getToken(1)) >+ ); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ primitiveTypeCS ::= Integer >+ /.$BeginCode >+ CSTNode result = createPrimitiveTypeCS( >+ SimpleTypeEnum.INTEGER_LITERAL, >+ getTokenText($getToken(1)) >+ ); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ primitiveTypeCS ::= UnlimitedNatural >+ /.$BeginCode >+ CSTNode result = createPrimitiveTypeCS( >+ SimpleTypeEnum.UNLIMITED_NATURAL_LITERAL, >+ getTokenText($getToken(1)) >+ ); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ primitiveTypeCS ::= String >+ /.$BeginCode >+ CSTNode result = createPrimitiveTypeCS( >+ SimpleTypeEnum.STRING_LITERAL, >+ getTokenText($getToken(1)) >+ ); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ primitiveTypeCS ::= Real >+ /.$BeginCode >+ CSTNode result = createPrimitiveTypeCS( >+ SimpleTypeEnum.REAL_LITERAL, >+ getTokenText($getToken(1)) >+ ); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ primitiveTypeCS ::= Boolean >+ /.$BeginCode >+ CSTNode result = createPrimitiveTypeCS( >+ SimpleTypeEnum.BOOLEAN_LITERAL, >+ getTokenText($getToken(1)) >+ ); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ primitiveTypeCS ::= OclAny >+ /.$BeginCode >+ CSTNode result = createPrimitiveTypeCS( >+ SimpleTypeEnum.OCL_ANY_LITERAL, >+ getTokenText($getToken(1)) >+ ); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ primitiveTypeCS ::= OclVoid >+ /.$BeginCode >+ CSTNode result = createPrimitiveTypeCS( >+ SimpleTypeEnum.OCL_VOID_LITERAL, >+ getTokenText($getToken(1)) >+ ); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ primitiveTypeCS ::= OclInvalid >+ /.$BeginCode >+ CSTNode result = createPrimitiveTypeCS( >+ SimpleTypeEnum.INVALID_LITERAL, >+ getTokenText($getToken(1)) >+ ); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ primitiveTypeCS ::= OclMessage >+ /.$BeginCode >+ CSTNode result = createPrimitiveTypeCS( >+ SimpleTypeEnum.OCL_MESSAGE_LITERAL, >+ getTokenText($getToken(1)) >+ ); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ pathNameCS ::= IDENTIFIER >+ /.$BeginCode >+ CSTNode result = createPathNameCS(getTokenText($getToken(1))); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ pathNameCS ::= pathNameCS '::' simpleNameCS >+ /.$BeginCode >+ PathNameCS result = (PathNameCS)$getSym(1); >+ result = extendPathNameCS(result, getTokenText(dtParser.getToken(3))); >+ setOffsets(result, result, (CSTNode)$getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ pathNameCSOpt ::= %empty >+ /.$BeginCode >+ CSTNode result = createPathNameCS(); >+ $setResult(result); >+ $EndCode >+ ./ >+ pathNameCSOpt -> pathNameCS >+ >+ literalExpCS -> enumLiteralExpCS >+ literalExpCS -> collectionLiteralExpCS >+ literalExpCS -> tupleLiteralExpCS >+ literalExpCS -> primitiveLiteralExpCS >+ literalExpCS -> nullLiteralExpCS >+ literalExpCS -> invalidLiteralExpCS >+ >+ -- also covers the case of static attribute call, in which >+ -- case @pre is not allowed anyway >+ enumLiteralExpCS ::= pathNameCS '::' keywordAsName >+ /.$NewCase./ >+ enumLiteralExpCS ::= pathNameCS '::' simpleNameCS >+ /.$BeginCode >+ CSTNode result = createEnumLiteralExpCS( >+ (PathNameCS)$getSym(1), >+ (SimpleNameCS)$getSym(3) >+ ); >+ setOffsets(result, (CSTNode)$getSym(1), (CSTNode)$getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ collectionLiteralExpCS ::= collectionTypeIdentifierCS '{' collectionLiteralPartsCSopt '}' >+ /.$BeginCode >+ Object[] objs = (Object[])$getSym(1); >+ CSTNode result = createCollectionLiteralExpCS( >+ (CollectionTypeIdentifierEnum)objs[1], >+ (EList)$getSym(3) >+ ); >+ setOffsets(result, (IToken)objs[0], getIToken($getToken(4))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ collectionTypeIdentifierCS ::= Set >+ /.$BeginCode >+ $setResult(new Object[]{getIToken($getToken(1)), CollectionTypeIdentifierEnum.SET_LITERAL}); >+ $EndCode >+ ./ >+ collectionTypeIdentifierCS ::= Bag >+ /.$BeginCode >+ $setResult(new Object[]{getIToken($getToken(1)), CollectionTypeIdentifierEnum.BAG_LITERAL}); >+ $EndCode >+ ./ >+ collectionTypeIdentifierCS ::= Sequence >+ /.$BeginCode >+ $setResult(new Object[]{getIToken($getToken(1)), CollectionTypeIdentifierEnum.SEQUENCE_LITERAL}); >+ $EndCode >+ ./ >+ collectionTypeIdentifierCS ::= Collection >+ /.$BeginCode >+ $setResult(new Object[]{getIToken($getToken(1)), CollectionTypeIdentifierEnum.COLLECTION_LITERAL}); >+ $EndCode >+ ./ >+ collectionTypeIdentifierCS ::= OrderedSet >+ /.$BeginCode >+ $setResult(new Object[]{getIToken($getToken(1)), CollectionTypeIdentifierEnum.ORDERED_SET_LITERAL}); >+ $EndCode >+ ./ >+ >+ collectionLiteralPartsCSopt ::= %empty >+ /.$EmptyListAction./ >+ collectionLiteralPartsCSopt -> collectionLiteralPartsCS >+ >+ collectionLiteralPartsCS ::= collectionLiteralPartCS >+ /.$BeginCode >+ EList result = new BasicEList(); >+ result.add($getSym(1)); >+ $setResult(result); >+ $EndCode >+ ./ >+ collectionLiteralPartsCS ::= collectionLiteralPartsCS ',' collectionLiteralPartCS >+ /.$BeginCode >+ EList result = (EList)$getSym(1); >+ result.add($getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ collectionLiteralPartCS -> collectionRangeCS >+ collectionLiteralPartCS ::= oclExpressionCS >+ /.$BeginCode >+ CSTNode result = createCollectionLiteralPartCS( >+ (OCLExpressionCS)$getSym(1) >+ ); >+ setOffsets(result, (CSTNode)$getSym(1)); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ collectionRangeCS ::= '-' INTEGER_RANGE_START oclExpressionCS >+ /.$BeginCode >+ OCLExpressionCS rangeStart = createRangeStart( >+ getTokenText($getToken(2)), true); >+ CSTNode result = createCollectionRangeCS( >+ rangeStart, >+ (OCLExpressionCS)$getSym(3) >+ ); >+ setOffsets(result, rangeStart, (CSTNode)$getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ collectionRangeCS ::= INTEGER_RANGE_START oclExpressionCS >+ /.$BeginCode >+ OCLExpressionCS rangeStart = createRangeStart( >+ getTokenText($getToken(1)), false); >+ CSTNode result = createCollectionRangeCS( >+ rangeStart, >+ (OCLExpressionCS)$getSym(2) >+ ); >+ setOffsets(result, rangeStart, (CSTNode)$getSym(2)); >+ $setResult(result); >+ $EndCode >+ ./ >+ collectionRangeCS ::= oclExpressionCS '..' oclExpressionCS >+ /.$BeginCode >+ CSTNode result = createCollectionRangeCS( >+ (OCLExpressionCS)$getSym(1), >+ (OCLExpressionCS)$getSym(3) >+ ); >+ setOffsets(result, (CSTNode)$getSym(1), (CSTNode)$getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ primitiveLiteralExpCS -> integerLiteralExpCS >+ primitiveLiteralExpCS -> unlimitedNaturalLiteralExpCS >+ primitiveLiteralExpCS -> realLiteralExpCS >+ primitiveLiteralExpCS -> stringLiteralExpCS >+ primitiveLiteralExpCS -> booleanLiteralExpCS >+ >+ tupleLiteralExpCS ::= Tuple '{' variableListCS2 '}' >+ /.$BeginCode >+ CSTNode result = createTupleLiteralExpCS((EList)$getSym(3)); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(4))); >+ $setResult(result); >+ $EndCode >+ ./ >+ integerLiteralExpCS ::= INTEGER_LITERAL >+ /.$BeginCode >+ CSTNode result = createIntegerLiteralExpCS(getTokenText($getToken(1))); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ unlimitedNaturalLiteralExpCS ::= '*' >+ /.$BeginCode >+ CSTNode result = createUnlimitedNaturalLiteralExpCS(getTokenText($getToken(1))); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ realLiteralExpCS ::= REAL_LITERAL >+ /.$BeginCode >+ CSTNode result = createRealLiteralExpCS(getTokenText($getToken(1))); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ stringLiteralExpCS ::= STRING_LITERAL >+ /.$BeginCode >+ IToken literalToken = getIToken($getToken(1)); >+ StringLiteralExpCS result = createStringLiteralExpCS(literalToken.toString()); >+ result.setUnescapedStringSymbol(unescape(literalToken)); >+ setOffsets(result, literalToken); >+ $setResult(result); >+ $EndCode >+ ./ >+ booleanLiteralExpCS ::= true >+ /.$BeginCode >+ CSTNode result = createBooleanLiteralExpCS(getTokenText($getToken(1))); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ booleanLiteralExpCS ::= false >+ /.$BeginCode >+ CSTNode result = createBooleanLiteralExpCS(getTokenText($getToken(1))); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ nullLiteralExpCS ::= null >+ /.$BeginCode >+ CSTNode result = createNullLiteralExpCS(getTokenText($getToken(1))); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ invalidLiteralExpCS ::= invalid >+ /.$BeginCode >+ CSTNode result = createInvalidLiteralExpCS(getTokenText($getToken(1))); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ >+ callExpCS ::= '->' featureCallExpCS >+ /.$NewCase./ >+ callExpCS ::= '->' loopExpCS >+ /.$BeginCode >+ CallExpCS result = (CallExpCS)$getSym(2); >+ result.setAccessor(DotOrArrowEnum.ARROW_LITERAL); >+ $setResult(result); >+ $EndCode >+ ./ >+ callExpCS ::= '.' keywordOperationCallExpCS >+ /.$NewCase./ >+ callExpCS ::= '.' featureCallExpCS >+ /.$BeginCode >+ CallExpCS result = (CallExpCS)$getSym(2); >+ result.setAccessor(DotOrArrowEnum.DOT_LITERAL); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ loopExpCS -> iteratorExpCS >+ loopExpCS -> iterateExpCS >+ >+ iteratorExpCS ::= iteratorName '(' oclExpressionCS ')' >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = (SimpleNameCS)$getSym(1); >+ CSTNode result = createIteratorExpCS( >+ simpleNameCS, >+ null, >+ null, >+ (OCLExpressionCS)$getSym(3) >+ ); >+ setOffsets(result, simpleNameCS, getIToken($getToken(4))); >+ $setResult(result); >+ $EndCode >+ ./ >+ iteratorExpCS ::= iteratorName '(' variableCS '|' oclExpressionCS ')' >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = (SimpleNameCS)$getSym(1); >+ CSTNode result = createIteratorExpCS( >+ simpleNameCS, >+ (VariableCS)$getSym(3), >+ null, >+ (OCLExpressionCS)$getSym(5) >+ ); >+ setOffsets(result, simpleNameCS, getIToken($getToken(6))); >+ $setResult(result); >+ $EndCode >+ ./ >+ iteratorExpCS ::= iteratorName '(' variableCS ',' variableCS '|' oclExpressionCS ')' >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = (SimpleNameCS)$getSym(1); >+ CSTNode result = createIteratorExpCS( >+ simpleNameCS, >+ (VariableCS)$getSym(3), >+ (VariableCS)$getSym(5), >+ (OCLExpressionCS)$getSym(7) >+ ); >+ setOffsets(result, simpleNameCS, getIToken($getToken(8))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ iterateExpCS ::= iterateName '(' variableCS '|' oclExpressionCS ')' >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = (SimpleNameCS)$getSym(1); >+ CSTNode result = createIterateExpCS( >+ simpleNameCS, >+ (VariableCS)$getSym(3), >+ null, >+ (OCLExpressionCS)$getSym(5) >+ ); >+ setOffsets(result, simpleNameCS, getIToken($getToken(6))); >+ $setResult(result); >+ $EndCode >+ ./ >+ iterateExpCS ::= iterateName '(' variableCS ';' variableCS '|' oclExpressionCS ')' >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = (SimpleNameCS)$getSym(1); >+ CSTNode result = createIterateExpCS( >+ simpleNameCS, >+ (VariableCS)$getSym(3), >+ (VariableCS)$getSym(5), >+ (OCLExpressionCS)$getSym(7) >+ ); >+ setOffsets(result, simpleNameCS, getIToken($getToken(8))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ variableCS ::= IDENTIFIER >+ /.$BeginCode >+ CSTNode result = createVariableCS( >+ getTokenText($getToken(1)), >+ null, >+ null >+ ); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ typedVariableCS ::= IDENTIFIER ':' typeCS >+ /.$BeginCode >+ CSTNode result = createVariableCS( >+ getTokenText($getToken(1)), >+ (TypeCS)$getSym(3), >+ null >+ ); >+ setOffsets(result, getIToken($getToken(1)), (CSTNode)$getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ variableCS -> typedVariableCS >+ variableCS ::= IDENTIFIER ':' typeCS '=' oclExpressionCS >+ /.$BeginCode >+ CSTNode result = createVariableCS( >+ getTokenText($getToken(1)), >+ (TypeCS)$getSym(3), >+ (OCLExpressionCS)$getSym(5) >+ ); >+ setOffsets(result, getIToken($getToken(1)), (CSTNode)$getSym(5)); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ -- this form of variable declaration is only used in tuple literals >+ variableCS2 ::= IDENTIFIER '=' oclExpressionCS >+ /.$BeginCode >+ CSTNode result = createVariableCS( >+ getTokenText($getToken(1)), >+ null, >+ (OCLExpressionCS)$getSym(3) >+ ); >+ setOffsets(result, getIToken($getToken(1)), (CSTNode)$getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ typeCSopt ::= %empty >+ /.$NullAction./ >+ typeCSopt -> typeCS >+ >+ -- the order of these rules is important! Try to match primitives >+ -- first, then tuples (more complex), and finally collections. >+ -- Looking for type names in the Ecore model is a last resort >+ typeCS -> primitiveTypeCS >+ typeCS -> tupleTypeCS >+ typeCS -> collectionTypeCS >+ typeCS -> pathNameCS >+ >+ collectionTypeCS ::= collectionTypeIdentifierCS '(' typeCS ')' >+ /.$BeginCode >+ Object[] objs = (Object[])$getSym(1); >+ CSTNode result = createCollectionTypeCS( >+ (CollectionTypeIdentifierEnum)objs[1], >+ (TypeCS)$getSym(3) >+ ); >+ setOffsets(result, (IToken)objs[0], getIToken($getToken(4))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ tupleTypeCS ::= Tuple '(' variableListCSopt ')' >+ /.$BeginCode >+ CSTNode result = createTupleTypeCS((EList)$getSym(3)); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(4))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ >+ variableListCSopt ::= %empty >+ /.$EmptyListAction./ >+ variableListCSopt -> variableListCS >+ variableListCS ::= variableCS >+ /.$BeginCode >+ EList result = new BasicEList(); >+ result.add($getSym(1)); >+ $setResult(result); >+ $EndCode >+ ./ >+ variableListCS ::= variableListCS ',' variableCS >+ /.$BeginCode >+ EList result = (EList)$getSym(1); >+ result.add($getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ -- this form of variable declaration list is only used in tuple literals >+ variableListCS2 ::= variableCS2 >+ /.$NewCase./ >+ variableListCS2 ::= variableCS >+ /.$BeginCode >+ EList result = new BasicEList(); >+ result.add($getSym(1)); >+ $setResult(result); >+ $EndCode >+ ./ >+ variableListCS2 ::= variableListCS2 ',' variableCS2 >+ /.$NewCase./ >+ variableListCS2 ::= variableListCS2 ',' variableCS >+ /.$BeginCode >+ EList result = (EList)$getSym(1); >+ result.add($getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ -- covers attributeCallExpCS and navigationCallExpCS >+ featureCallExpCS -> attrOrNavCallExpCS >+ >+ featureCallExpCS -> operationCallExpCS >+ featureCallExpCS ::= unaryName isMarkedPreCS '(' argumentsCSopt ')' >+ /.$NewCase./ >+ -- even though these operations do not use @pre or do not accept multiple arguments >+ -- in order to get better error reporting, the rule signature must comply with >+ -- the full rule of an operationCallExpCS >+ -- the alternative would be to remove these as keywords, but then the parser >+ -- would accept variable declarations where the var can be named "oclIsNew" for example >+ operationCallExpCS ::= binaryName isMarkedPreCS '(' argumentsCSopt ')' >+ /.$NewCase./ >+ keywordOperationCallExpCS ::= keywordAsName isMarkedPreCS '(' argumentsCSopt ')' >+ /.$BeginCode >+ CSTNode result = createOperationCallExpCS( >+ (SimpleNameCS)$getSym(1), >+ (IsMarkedPreCS)$getSym(2), >+ (EList)$getSym(4) >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(5))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ stateExpCS ::= pathNameCSOpt >+ /.$BeginCode >+ PathNameCS pathNameCS = (PathNameCS)$getSym(1); >+ StateExpCS result = createStateExpCS(pathNameCS); >+ setOffsets(result, pathNameCS); >+ $setResult(result); >+ $EndCode >+ ./ >+ -- FIXME StateExpCS creates a needless irregularity; unwrap its content as an argument list >+ operationCallExpCS ::= oclIsInStateName isMarkedPreCS '(' stateExpCS ')' >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = (SimpleNameCS)$getSym(1); >+ CSTNode result = createOperationCallExpCS( >+ simpleNameCS, >+ (IsMarkedPreCS)$getSym(2), >+ (StateExpCS)$getSym(4) >+ ); >+ setOffsets(result, simpleNameCS, getIToken($getToken(5))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ attrOrNavCallExpCS ::= simpleNameCS isMarkedPreCS >+ /.$NewCase./ >+ attrOrNavCallExpCS ::= keywordAsName isMarkedPreCS >+ /.$BeginCode >+ IsMarkedPreCS isMarkedPreCS = (IsMarkedPreCS)$getSym(2); >+ CSTNode result = createFeatureCallExpCS( >+ (SimpleNameCS)$getSym(1), >+ new BasicEList(), >+ isMarkedPreCS >+ ); >+ if (isMarkedPreCS.isPre()) { >+ setOffsets(result, (CSTNode)$getSym(1), (CSTNode)$getSym(2)); >+ } else { >+ setOffsets(result, (CSTNode)$getSym(1)); >+ } >+ $setResult(result); >+ $EndCode >+ ./ >+ attrOrNavCallExpCS ::= simpleNameCS '[' argumentsCS ']' isMarkedPreCS >+ /.$BeginCode >+ IsMarkedPreCS isMarkedPreCS = (IsMarkedPreCS)$getSym(5); >+ CSTNode result = createFeatureCallExpCS( >+ (SimpleNameCS)$getSym(1), >+ (EList)$getSym(3), >+ isMarkedPreCS >+ ); >+ if (isMarkedPreCS.isPre()) { >+ setOffsets(result, (CSTNode)$getSym(1), (CSTNode)$getSym(5)); >+ } else { >+ setOffsets(result, (CSTNode)$getSym(1), getIToken($getToken(4))); >+ } >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ isMarkedPreCS ::= %empty >+ /.$BeginCode >+ CSTNode result = createIsMarkedPreCS(false); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ isMarkedPreCS ::= '@pre' >+ /.$BeginCode >+ CSTNode result = createIsMarkedPreCS(true); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ argumentsCSopt ::= %empty >+ /.$EmptyListAction./ >+ argumentsCSopt -> argumentsCS >+ >+ argumentsCS ::= oclExpressionCS >+ /.$BeginCode >+ EList result = new BasicEList(); >+ result.add($getSym(1)); >+ $setResult(result); >+ $EndCode >+ ./ >+ argumentsCS ::= argumentsCS ',' oclExpressionCS >+ /.$BeginCode >+ EList result = (EList)$getSym(1); >+ result.add($getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ letExpCS ::= let variableListCS in oclExpressionCS >+ /.$BeginCode >+ CSTNode result = createLetExpCS( >+ (EList)$getSym(2), >+ (OCLExpressionCS)$getSym(4) >+ ); >+ setOffsets(result, getIToken($getToken(1)), (CSTNode)$getSym(4)); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ ifExpCS ::= if oclExpressionCS then oclExpressionCS else oclExpressionCS endif >+ /.$BeginCode >+ CSTNode result = createIfExpCS( >+ (OCLExpressionCS)$getSym(2), >+ (OCLExpressionCS)$getSym(4), >+ (OCLExpressionCS)$getSym(6) >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(7))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ messageExpCS ::= '^' simpleNameCS '(' oclMessageArgumentsCSopt ')' >+ /.$NewCase./ >+ messageExpCS ::= '^^' simpleNameCS '(' oclMessageArgumentsCSopt ')' >+ /.$BeginCode >+ CSTNode result = createMessageExpCS( >+ getIToken($getToken(1)).getKind() == $sym_type.TK_CARET, >+ (SimpleNameCS)$getSym(2), >+ (EList<OCLMessageArgCS>)$getSym(4) >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(5))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ oclMessageArgumentsCSopt ::= %empty >+ /.$EmptyListAction./ >+ oclMessageArgumentsCSopt -> oclMessageArgumentsCS >+ >+ oclMessageArgumentsCS ::= oclMessageArgCS >+ /.$BeginCode >+ EList result = new BasicEList(); >+ result.add($getSym(1)); >+ $setResult(result); >+ $EndCode >+ ./ >+ oclMessageArgumentsCS ::= oclMessageArgumentsCS ',' oclMessageArgCS >+ /.$BeginCode >+ EList result = (EList)$getSym(1); >+ result.add($getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ oclMessageArgCS ::= oclExpressionCS >+ /.$BeginCode >+ CSTNode result = createOCLMessageArgCS( >+ null, >+ (OCLExpressionCS)$getSym(1) >+ ); >+ setOffsets(result, (CSTNode)$getSym(1)); >+ $setResult(result); >+ $EndCode >+ ./ >+ oclMessageArgCS ::= '?' >+ /.$BeginCode >+ CSTNode result = createOCLMessageArgCS( >+ null, >+ null >+ ); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ oclMessageArgCS ::= '?' ':' typeCS >+ /.$BeginCode >+ CSTNode result = createOCLMessageArgCS( >+ (TypeCS)$getSym(3), >+ null >+ ); >+ setOffsets(result, getIToken($getToken(1)), (CSTNode)$getSym(3)); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+%End >Index: src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingLexer.gi >=================================================================== >RCS file: src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingLexer.gi >diff -N src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingLexer.gi >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/parser/backtracking/OCLBacktrackingLexer.gi 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,42 @@ >+--/** >+-- * <copyright> >+-- * >+-- * Copyright (c) 2008, 2009 Eclipse.org, Open Canarias S.L., 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 >+-- * Adolfo Sanchez-Barbudo Herrera - LPG v2.0.17 adoption >+-- * >+-- * </copyright> >+-- * >+-- * $Id: OCLBacktrackingLexer.g,v 1.1 2009/01/13 20:31:30 cdamus Exp $ >+-- */ >+-- >+-- The OCL Backtracking Lexer, which is nominally identical to the >+-- normal Lexer, however the extra ERROR_TOKEN symbol makes it difficult >+-- to share reliably. >+-- >+ >+%options escape=$ >+%options la=2 >+%options fp=OCLBacktrackingLexer,prefix=Char_ >+%options single-productions >+%options noserialize >+%options package=org.eclipse.ocl.parser.backtracking >+%options template=../../lpg/LexerTemplateF.gi >+%options filter=OCLBacktrackingKWLexer.gi >+%options export_terminals=("OCLBacktrackingParsersym.java", "TK_") >+%options include_directory="..;../../lpg" >+ >+%Import >+ OCLLexer.gi >+%End >+ >+%Define >+ $kw_lexer_class /.OCLBacktrackingKWLexer./ >+%End >Index: src/org/eclipse/ocl/parser/backtracking/EssentialOCLErrors.gi >=================================================================== >RCS file: src/org/eclipse/ocl/parser/backtracking/EssentialOCLErrors.gi >diff -N src/org/eclipse/ocl/parser/backtracking/EssentialOCLErrors.gi >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/parser/backtracking/EssentialOCLErrors.gi 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,419 @@ >+--/** >+-- * <copyright> >+-- * >+-- * Copyright (c) 2008, 2009 Eclipse.org, Open Canarias S.L, 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: >+-- * E.D.Willink - Initial API and implementation >+-- * Adolfo Sanchez-Barbudo Herrera - LPG v2.0.17 adoption >+-- * >+-- * </copyright> >+-- * >+-- * $Id: EssentialOCLErrors.g,v 1.1 2009/01/13 20:31:30 cdamus Exp $ >+-- */ >+-- >+-- Additional ERROR_TOKEN rules for The EssentialOCL Backtracking Parser >+-- >+ >+%Rules >+ ERROR_Colon ::= ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(1), OCLParserErrors.MISSING_COLON); >+ $EndCode >+ ./ >+ ERROR_Empty ::= ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(1), OCLParserErrors.EXTRA_TOKENS); >+ $EndCode >+ ./ >+ ERROR_IsMarkedPreCS ::= ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(1), OCLParserErrors.MISSING_AT_PRE); >+ IsMarkedPreCS result = createIsMarkedPreCS(false); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ ERROR_PathNameCS ::= ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(1), OCLParserErrors.MISSING_PATH_NAME); >+ CSTNode result = createPathNameCS(getTokenText($getToken(1))); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ ERROR_SimpleNameCS ::= ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(1), OCLParserErrors.MISSING_SIMPLE_NAME); >+ SimpleNameCS result = createSimpleNameCS( >+ SimpleTypeEnum.IDENTIFIER_LITERAL, >+ getTokenText($getToken(1)) >+ ); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ attrOrNavCallExpCS ::= simpleNameCS '[' argumentsCS ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(4), OCLParserErrors.MISSING_RBRACK); >+ CSTNode result = createFeatureCallExpCS( >+ (SimpleNameCS)$getSym(1), >+ (EList)$getSym(3), >+ createIsMarkedPreCS(false) >+ ); >+ setOffsets(result, (CSTNode)$getSym(1), getIToken($getToken(4))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ collectionTypeCS ::= collectionTypeIdentifierCS '(' typeCS ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(4), OCLParserErrors.MISSING_RPAREN); >+ Object[] objs = (Object[])$getSym(1); >+ CSTNode result = createCollectionTypeCS( >+ (CollectionTypeIdentifierEnum)objs[1], >+ (TypeCS)$getSym(3) >+ ); >+ setOffsets(result, (IToken)objs[0], getIToken($getToken(4))); >+ $setResult(result); >+ $EndCode >+ ./ >+ collectionTypeCS ::= collectionTypeIdentifierCS ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(2), OCLParserErrors.MISSING_LPAREN); >+ Object[] objs = (Object[])$getSym(1); >+ CSTNode result = createCollectionTypeCS( >+ (CollectionTypeIdentifierEnum)objs[1], >+ null >+ ); >+ setOffsets(result, (IToken)objs[0], getIToken($getToken(2))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ dotArrowExpCS ::= pathNameCS '::' ERROR_SimpleNameCS '(' argumentsCSopt ')' >+ /.$BeginCode >+ OperationCallExpCS result = createOperationCallExpCS( >+ (PathNameCS)$getSym(1), >+ (SimpleNameCS)$getSym(3), >+ (EList)$getSym(5) >+ ); >+ setOffsets(result, (CSTNode)$getSym(1), getIToken($getToken(6))); >+ result.setAccessor(DotOrArrowEnum.DOT_LITERAL); >+ $setResult(result); >+ $EndCode >+ ./ >+-- FIXME dotArrowExpCS ::= NUMERIC_OPERATION ERROR_SimpleNameCS >+ >+ enumLiteralExpCS ::= pathNameCS '::' ERROR_SimpleNameCS >+ /.$BeginCode >+ PathNameCS pathNameCS = (PathNameCS)$getSym(1); >+ SimpleNameCS simpleNameCS = (SimpleNameCS)$getSym(3); >+ CSTNode result = createEnumLiteralExpCS( >+ pathNameCS, >+ simpleNameCS >+ ); >+ setOffsets(result, pathNameCS, simpleNameCS); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ featureCallExpCS ::= unaryName ERROR_IsMarkedPreCS '(' argumentsCSopt ')' >+ /.$NewCase./ >+ keywordOperationCallExpCS ::= keywordAsName ERROR_IsMarkedPreCS '(' argumentsCSopt ')' >+ /.$NewCase./ >+ operationCallExpCS ::= binaryName ERROR_IsMarkedPreCS '(' argumentsCSopt ')' >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = (SimpleNameCS)$getSym(1); >+ CSTNode result = createOperationCallExpCS( >+ simpleNameCS, >+ (IsMarkedPreCS)$getSym(2), >+ (EList)$getSym(4) >+ ); >+ setOffsets(result, simpleNameCS, getIToken($getToken(5))); >+ $setResult(result); >+ $EndCode >+ ./ >+ operationCallExpCS ::= oclIsInStateName ERROR_IsMarkedPreCS '(' stateExpCS ')' >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = (SimpleNameCS)$getSym(1); >+ CSTNode result = createOperationCallExpCS( >+ simpleNameCS, >+ (IsMarkedPreCS)$getSym(2), >+ (StateExpCS)$getSym(4) >+ ); >+ setOffsets(result, simpleNameCS, getIToken($getToken(5))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ ifExpCS ::= if oclExpressionCS then oclExpressionCS else oclExpressionCS ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(7), OCLParserErrors.MISSING_ENDIF); >+ CSTNode result = createIfExpCS( >+ (OCLExpressionCS)$getSym(2), >+ (OCLExpressionCS)$getSym(4), >+ (OCLExpressionCS)$getSym(6) >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(7))); >+ $setResult(result); >+ $EndCode >+ ./ >+ ifExpCS ::= if oclExpressionCS then oclExpressionCS ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(5), OCLParserErrors.MISSING_ELSE_ENDIF); >+ CSTNode result = createIfExpCS( >+ (OCLExpressionCS)$getSym(2), >+ (OCLExpressionCS)$getSym(4), >+ createInvalidLiteralExpCS(getTokenText($getToken(5))) >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(5))); >+ $setResult(result); >+ $EndCode >+ ./ >+ ifExpCS ::= if oclExpressionCS ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(3), OCLParserErrors.MISSING_THEN_ELSE_ENDIF); >+ CSTNode result = createIfExpCS( >+ (OCLExpressionCS)$getSym(2), >+ createInvalidLiteralExpCS(getTokenText($getToken(3))), >+ createInvalidLiteralExpCS(getTokenText($getToken(3))) >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(3))); >+ $setResult(result); >+ $EndCode >+ ./ >+ ifExpCS ::= if ERROR_TOKEN endif >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(3), OCLParserErrors.MISSING_THEN_ELSE); >+ CSTNode result = createIfExpCS( >+ createInvalidLiteralExpCS(getTokenText($getToken(2))), >+ createInvalidLiteralExpCS(getTokenText($getToken(2))), >+ createInvalidLiteralExpCS(getTokenText($getToken(2))) >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(3))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ messageExpCS ::= '^' simpleNameCS ERROR_TOKEN >+ /.$NewCase./ >+ messageExpCS ::= '^^' simpleNameCS ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(1), OCLParserErrors.MISSING_MESSAGE_ARGUMENTS); >+ CSTNode result = createMessageExpCS( >+ getIToken($getToken(1)).getKind() == $sym_type.TK_CARET, >+ (SimpleNameCS)$getSym(2), >+ new BasicEList<OCLMessageArgCS>() >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(3))); >+ $setResult(result); >+ $EndCode >+ ./ >+ messageExpCS ::= '^' ERROR_SimpleNameCS >+ /.$NewCase./ >+ messageExpCS ::= '^^' ERROR_SimpleNameCS >+ /.$BeginCode >+ SimpleNameCS simpleNameCS = (SimpleNameCS)$getSym(2); >+ CSTNode result = createMessageExpCS( >+ getIToken($getToken(1)).getKind() == $sym_type.TK_CARET, >+ simpleNameCS, >+ new BasicEList<OCLMessageArgCS>() >+ ); >+ setOffsets(result, getIToken($getToken(1)), simpleNameCS); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ oclExpCS ::= ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(1), OCLParserErrors.MISSING_EXPR); >+ CSTNode result = createInvalidLiteralExpCS(getTokenText($getToken(1))); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ oclExpCS ::= '(' oclExpressionCS ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(3), OCLParserErrors.MISSING_RPAREN); >+ CSTNode result = (CSTNode)$getSym(2); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(3))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ operationCS1 ::= IDENTIFIER '(' parametersCSopt ')' ERROR_Colon >+ /.$BeginCode >+ CSTNode result = createOperationCS( >+ getTokenText($getToken(1)), >+ (EList)$getSym(3), >+ null >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(5))); >+ $setResult(result); >+ $EndCode >+ ./ >+ operationCS1 ::= IDENTIFIER '(' parametersCSopt ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(4), OCLParserErrors.MISSING_RPAREN); >+ CSTNode result = createOperationCS( >+ getTokenText($getToken(1)), >+ (EList)$getSym(3), >+ null >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(4))); >+ $setResult(result); >+ $EndCode >+ ./ >+ operationCS1 ::= IDENTIFIER ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(2), OCLParserErrors.MISSING_LPAREN); >+ CSTNode result = createOperationCS( >+ getTokenText($getToken(1)), >+ new BasicEList(), >+ null >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(2))); >+ $setResult(result); >+ $EndCode >+ ./ >+ operationCS1 ::= ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(1), OCLParserErrors.MISSING_IDENTIFIER); >+ CSTNode result = createOperationCS( >+ getTokenText($getToken(1)), >+ new BasicEList(), >+ null >+ ); >+ setOffsets(result, getIToken($getToken(1))); >+ $setResult(result); >+ $EndCode >+ ./ >+ operationCS2 ::= pathNameCS '::' simpleNameCS '(' parametersCSopt ')' ERROR_Colon >+ /.$BeginCode >+ PathNameCS pathNameCS = (PathNameCS)$getSym(1); >+ CSTNode result = createOperationCS( >+ pathNameCS, >+ (SimpleNameCS)$getSym(3), >+ (EList)$getSym(5), >+ (TypeCS)$getSym(8) >+ ); >+ setOffsets(result, pathNameCS, getIToken($getToken(7))); >+ $setResult(result); >+ $EndCode >+ ./ >+ operationCS2 ::= pathNameCS '::' simpleNameCS '(' parametersCSopt ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(6), OCLParserErrors.MISSING_RPAREN); >+ PathNameCS pathNameCS = (PathNameCS)$getSym(1); >+ CSTNode result = createOperationCS( >+ pathNameCS, >+ (SimpleNameCS)$getSym(3), >+ (EList)$getSym(5), >+ null >+ ); >+ setOffsets(result, pathNameCS, getIToken($getToken(7))); >+ $setResult(result); >+ $EndCode >+ ./ >+ operationCS2 ::= pathNameCS '::' simpleNameCS ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(4), OCLParserErrors.MISSING_LPAREN); >+ PathNameCS pathNameCS = (PathNameCS)$getSym(1); >+ CSTNode result = createOperationCS( >+ pathNameCS, >+ (SimpleNameCS)$getSym(3), >+ new BasicEList(), >+ null >+ ); >+ setOffsets(result, pathNameCS, getIToken($getToken(4))); >+ $setResult(result); >+ $EndCode >+ ./ >+ operationCS2 ::= pathNameCS '::' ERROR_SimpleNameCS >+ /.$BeginCode >+ PathNameCS pathNameCS = (PathNameCS)$getSym(1); >+ SimpleNameCS simpleNameCS = (SimpleNameCS)$getSym(3); >+ CSTNode result = createOperationCS( >+ pathNameCS, >+ simpleNameCS, >+ new BasicEList(), >+ null >+ ); >+ setOffsets(result, pathNameCS, simpleNameCS); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ parametersCS ::= ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(1), OCLParserErrors.MISSING_PARAMETERS); >+ EList result = new BasicEList(); >+ $setResult(result); >+ $EndCode >+ ./ >+ parametersCS ::= parametersCS ',' ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(3), OCLParserErrors.MISSING_PARAMETER); >+ $EndCode >+ ./ >+ >+ pathNameCS -> ERROR_PathNameCS >+ >+ simpleNameCSopt -> ERROR_SimpleNameCS >+ >+ tupleLiteralExpCS ::= Tuple ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(7), OCLParserErrors.MISSING_LBRACE); >+ CSTNode result = createTupleLiteralExpCS((EList)$getSym(3)); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(4))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ variableCS ::= IDENTIFIER ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(2), OCLParserErrors.MISSING_VARIABLE_TYPE); >+ CSTNode result = createVariableCS( >+ getTokenText($getToken(1)), >+ null, >+ null >+ ); >+ setOffsets(result, getIToken($getToken(1)), getIToken($getToken(2))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ variableExpCS ::= simpleNameCS '[' argumentsCS ERROR_TOKEN >+ /.$NewCase./ >+ variableExpCS ::= keywordAsName1 '[' argumentsCS ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(4), OCLParserErrors.MISSING_RBRACK); >+ CSTNode result = createVariableExpCS( >+ (SimpleNameCS)$getSym(1), >+ (EList)$getSym(3), >+ createIsMarkedPreCS(false) >+ ); >+ setOffsets(result, (CSTNode)$getSym(1), getIToken($getToken(4))); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+ variableListCS ::= ERROR_TOKEN >+ /.$NewCase./ >+ variableListCS2 ::= ERROR_TOKEN >+ /.$BeginCode >+ reportErrorTokenMessage($getToken(1), OCLParserErrors.MISSING_VARIABLES); >+ EList result = new BasicEList(); >+ $setResult(result); >+ $EndCode >+ ./ >+ >+%End >Index: src/org/eclipse/ocl/lpg/LexerTemplateF.gi >=================================================================== >RCS file: src/org/eclipse/ocl/lpg/LexerTemplateF.gi >diff -N src/org/eclipse/ocl/lpg/LexerTemplateF.gi >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/lpg/LexerTemplateF.gi 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,331 @@ >+-- >+-- An instance of this template must have a $Export section and the export_terminals option >+-- >+-- Macros that may be redefined in an instance of this template >+-- >+-- $eof_token >+-- $additional_interfaces >+-- $super_stream_class -- subclass com.ibm.lpg.LpgLexStream for getKind >+-- $prs_stream_class -- use /.PrsStream./ if not subclassing >+-- >+-- B E G I N N I N G O F T E M P L A T E LexerTemplateF >+-- >+%Options programming_language=java,margin=4 >+%Options table >+%options action-block=("*.java", "/.", "./") >+%options ParseTable=lpg.runtime.ParseTable >+%Options prefix=Char_ >+ >+-- >+-- This template requires that the name of the EOF token be set >+-- to EOF and that the prefix be "Char_" to be consistent with >+-- KeywordTemplateD. >+-- >+%Eof >+ EOF >+%End >+ >+-- >+-- This template also requires that the name of the parser EOF >+-- Token to be exported be set to EOF_TOKEN >+-- >+%Export >+ EOF_TOKEN >+%End >+ >+%Define >+ -- >+ -- Macros that are be needed in an instance of this template >+ -- >+ $eof_token /.$_EOF_TOKEN./ >+ >+ $additional_interfaces /../ >+ $super_lexer_class /.AbstractLexer./ >+ $super_stream_class /.$file_prefix$Stream./ >+ $prs_stream_class /.OCLParserStream./ >+ >+ $environment_class /.BasicEnvironment./ >+ $adapt_environment /.environment./ >+ >+ $prs_stream /. // macro prs_stream is deprecated. Use function getPrsStream >+ getPrsStream()./ >+ $setSym1 /. // macro setSym1 is deprecated. Use function setResult >+ lexParser.setSym1./ >+ $setResult /. // macro setResult is deprecated. Use function setResult >+ lexParser.setSym1./ >+ $getSym /. // macro getSym is deprecated. Use function getLastToken >+ lexParser.getSym./ >+ $getToken /. // macro getToken is deprecated. Use function getToken >+ lexParser.getToken./ >+ $getLeftSpan /. // macro getLeftSpan is deprecated. Use function getLeftSpan >+ lexParser.getFirstToken./ >+ $getRightSpan /. // macro getRightSpan is deprecated. Use function getRightSpan >+ lexParser.getLastToken./ >+ >+ -- >+ -- Macros useful for specifying actions >+ -- >+ $Header >+ /. >+ // >+ // Rule $rule_number: $rule_text >+ // >+ ./ >+ >+ $DefaultAction >+ /.$Header$case $rule_number: { ./ >+ >+ $BeginAction /.$DefaultAction./ >+ >+ $EndAction >+ /. break; >+ }./ >+ >+ $BeginJava >+ /.$BeginAction >+ $symbol_declarations./ >+ >+ $EndJava /.$EndAction./ >+ >+ $NoAction >+ /.$Header$case $rule_number: >+ break; ./ >+ >+ $BeginActions >+ /. >+ public void ruleAction(int ruleNumber) >+ { >+ switch(ruleNumber) >+ {./ >+ >+ $SplitActions >+ /. >+ default: >+ ruleAction$rule_number(ruleNumber); >+ break; >+ } >+ return; >+ } >+ >+ public void ruleAction$rule_number(int ruleNumber) >+ { >+ switch (ruleNumber) >+ {./ >+ >+ $EndActions >+ /. >+ default: >+ break; >+ } >+ return; >+ }./ >+%End >+ >+%Globals >+ /.import lpg.runtime.*; >+ import org.eclipse.ocl.lpg.AbstractLexer; >+ import org.eclipse.ocl.lpg.AbstractLexerStream; >+ import org.eclipse.ocl.lpg.OCLParserStream; >+ ./ >+%End >+ >+%Headers >+ /. >+ @SuppressWarnings("nls") >+ public class $action_type extends $super_lexer_class implements RuleAction$additional_interfaces >+ { >+ private $super_stream_class lexStream; >+ >+ private static ParseTable prs = new $prs_type(); >+ public ParseTable getParseTable() { return prs; } >+ >+ private LexParser lexParser = new LexParser(); >+ 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(); } >+ >+ public void resetKeywordLexer() >+ { >+ if (kwLexer == null) >+ this.kwLexer = new $kw_lexer_class(lexStream.getInputChars(), $_IDENTIFIER); >+ else this.kwLexer.setInputChars(lexStream.getInputChars()); >+ } >+ >+ public void reset(String filename, int tab) throws java.io.IOException >+ { >+ lexStream = new $super_stream_class(getOCLEnvironment(), filename, tab); >+ lexParser.reset(lexStream, prs, this); >+ resetKeywordLexer(); >+ } >+ >+ public void reset(char[] input_chars, String filename) >+ { >+ reset(input_chars, filename, ECLIPSE_TAB_VALUE); >+ } >+ >+ public void reset(char[] input_chars, String filename, int tab) >+ { >+ lexStream = new $super_stream_class(getOCLEnvironment(), input_chars, filename, tab); >+ lexParser.reset(lexStream, prs, this); >+ resetKeywordLexer(); >+ } >+ >+ // OCL addition to reset the lexer stream from an input reader >+ public void reset(Reader reader, String filename) throws java.io.IOException { >+ reset(reader, filename, ECLIPSE_TAB_VALUE); >+ } >+ >+ // OCL addition to reset the lexer stream from an input reader >+ public void reset(Reader reader, String filename, int tab) throws java.io.IOException { >+ char[] input_chars = getInputChars(reader); >+ reset(input_chars, filename, tab); >+ } >+ >+ /** >+ * @since 3.0 >+ */ >+ public $action_type($environment_class environment, String filename, int tab) throws java.io.IOException { >+ super($adapt_environment); >+ reset(filename, tab); >+ oclEnvironment = environment; >+ } >+ >+ /** >+ * @since 3.0 >+ */ >+ public $action_type($environment_class environment, String filename) throws java.io.IOException{ >+ this(environment, filename, ECLIPSE_TAB_VALUE); >+ } >+ >+ public $action_type($environment_class environment, char[] input_chars, String filename, int tab) { >+ super($adapt_environment); >+ reset(input_chars, filename, tab); >+ oclEnvironment = environment; >+ } >+ >+ public $action_type($environment_class environment, char[] chars) { >+ this(environment, chars, "OCL", ECLIPSE_TAB_VALUE); >+ } >+ >+ /** >+ * @since 3.0 >+ */ >+ public $action_type($environment_class environment, Reader reader) throws java.io.IOException { >+ this(environment, reader, "OCL"); >+ } >+ >+ /** >+ * @since 3.0 >+ */ >+ public $action_type($environment_class environment, Reader reader, String filename) throws java.io.IOException { >+ this(environment, reader, filename, ECLIPSE_TAB_VALUE); >+ } >+ >+ /** >+ * @since 3.0 >+ */ >+ public $action_type($environment_class environment, Reader reader, String filename, int tab) throws java.io.IOException { >+ super($adapt_environment); >+ reset(reader, filename, tab); >+ oclEnvironment = environment; >+ } >+ >+ private final $environment_class oclEnvironment; >+ >+ public $environment_class getOCLEnvironment() { >+ return oclEnvironment; >+ } >+ >+ public AbstractLexerStream getILexStream() { return lexStream; } >+ >+ /** >+ * @deprecated replaced by {@link #getILexStream()} >+ */ >+ public ILexStream getLexStream() { return lexStream; } >+ >+ private void initializeLexer($prs_stream_class 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($prs_stream_class prsStream, int end_offset) >+ { >+ prsStream.makeToken(end_offset, end_offset, $eof_token); // and end with the end of file token >+ prsStream.setStreamLength(prsStream.getSize()); >+ } >+ >+ public void lexer($prs_stream_class prsStream) >+ { >+ lexer(null, prsStream); >+ } >+ >+ public void lexer(Monitor monitor, $prs_stream_class prsStream) >+ { >+ initializeLexer(prsStream, 0, -1); >+ lexParser.parseCharacters(monitor); // Lex the input characters >+ addEOF(prsStream, lexStream.getStreamIndex()); >+ } >+ >+ public void lexer($prs_stream_class prsStream, int start_offset, int end_offset) >+ { >+ lexer(null, prsStream, start_offset, end_offset); >+ } >+ >+ public void lexer(Monitor monitor, $prs_stream_class 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. >+ */ >+ 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 >+ } >+ } >+ ./ >+%End >+ >+%Rules >+ /.$BeginActions./ >+%End >+ >+%Trailers >+ /. >+ $EndActions >+ } >+ ./ >+%End >+ >+-- >+-- E N D O F T E M P L A T E >+-- >Index: src/org/eclipse/ocl/parser/OCLLexer.gi >=================================================================== >RCS file: src/org/eclipse/ocl/parser/OCLLexer.gi >diff -N src/org/eclipse/ocl/parser/OCLLexer.gi >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ocl/parser/OCLLexer.gi 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,620 @@ >+--/** >+-- * <copyright> >+-- * >+-- * Copyright (c) 2005, 2009 IBM Corporation, Borland Software Corp., Open Canarias S.L. 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 >+-- * - Bug 259818 >+-- * Borland - Bug 242880 >+-- * Adolfo Sanchez-Barbudo Herrera - LPG v2.0.17 adoption >+-- * >+-- * </copyright> >+-- * >+-- * $Id: OCLLexer.g,v 1.2 2009/02/12 00:04:09 cdamus Exp $ >+-- */ >+-- >+-- The OCL Lexer >+-- >+ >+%options escape=$ >+%options la=2 >+%options fp=OCLLexer,prefix=Char_ >+%options single-productions >+%options noserialize >+%options package=org.eclipse.ocl.parser >+%options template=../lpg/LexerTemplateF.gi >+%options filter=OCLKWLexer.gi >+%options export_terminals=("OCLParsersym.java", "TK_") >+%options include_directory="../lpg" >+ >+%Define >+ >+ -- >+ -- Definition of macros used in the template >+ -- >+ $action_class /.$file_prefix./ -- Deprecated. >+ $eof_token /.$_EOF_TOKEN./ >+ $environment_class /.Environment<?,?,?,?,?,?,?,?,?,?,?,?>./ >+ $adapt_environment /.OCLUtil.getAdapter(environment, BasicEnvironment.class)./ >+ $environment_import /.org.eclipse.ocl.Environment./ >+ >+ -- >+ -- Definition of macro used in the included file LexerBasicMap.g >+ -- >+ $kw_lexer_class /.OCLKWLexer./ >+ $copyright_contributions /.*./ >+ >+%End >+ >+%Notice >+ /./** >+ * <copyright> >+ * >+ * Copyright (c) 2005, 2009 IBM Corporation, Borland Software Corp., Open Canarias S.L. 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 >+ * - Bug 259818 >+ * Borland - Bug 242880 >+ * Adolfo Sanchez-Barbudo Herrera - LPG v2.0.17 adoption >+ $copyright_contributions >+ * </copyright> >+ * >+ * $Id$ >+ */ >+ ./ >+%End >+ >+%Import >+ LexerBasicMapF.gi >+%End >+ >+%Globals >+ /. >+ import java.io.Reader; >+ >+ import $environment_import; >+ import org.eclipse.ocl.lpg.BasicEnvironment; >+ import org.eclipse.ocl.util.OCLUtil; >+ ./ >+%End >+ >+%Export >+ >+ IDENTIFIER >+ STRING_LITERAL >+ INTEGER_LITERAL >+ REAL_LITERAL >+ NUMERIC_OPERATION >+ INTEGER_RANGE_START >+ >+ PLUS >+ MINUS >+ MULTIPLY >+ DIVIDE >+ >+ GREATER >+ LESS >+ EQUAL >+ GREATER_EQUAL >+ LESS_EQUAL >+ NOT_EQUAL >+ >+ LPAREN >+ RPAREN >+ LBRACE >+ RBRACE >+ LBRACKET >+ RBRACKET >+ >+ ARROW >+ BAR >+ COMMA >+ COLON >+ COLONCOLON >+ SEMICOLON >+ DOT >+ DOTDOT >+ ATPRE >+ >+ CARET >+ CARETCARET >+ QUESTIONMARK >+ >+ SINGLE_LINE_COMMENT >+ MULTI_LINE_COMMENT >+ >+%End >+ >+%Terminals >+ CtlCharNotWS >+ >+ LF CR HT FF >+ >+ a b c d e 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 E F G H I J K L M N O P Q R S T U V W X Y Z >+ >+ 0 1 2 3 4 5 6 7 8 9 >+ >+ AfterASCIINotAcute >+ Space ::= ' ' >+ LF ::= NewLine >+ CR ::= Return >+ HT ::= HorizontalTab >+ FF ::= FormFeed >+ DoubleQuote ::= '"' >+ SingleQuote ::= "'" >+ Percent ::= '%' >+ VerticalBar ::= '|' >+ Exclamation ::= '!' >+ AtSign ::= '@' >+ BackQuote ::= '`' >+ Acute ::= 'ïÿý' >+ Tilde ::= '~' >+ Sharp ::= '#' >+ DollarSign ::= '$' >+ Ampersand ::= '&' >+ Caret ::= '^' >+ Colon ::= ':' >+ SemiColon ::= ';' >+ BackSlash ::= '\' >+ LeftBrace ::= '{' >+ RightBrace ::= '}' >+ LeftBracket ::= '[' >+ RightBracket ::= ']' >+ QuestionMark ::= '?' >+ Comma ::= ',' >+ Dot ::= '.' >+ LessThan ::= '<' >+ GreaterThan ::= '>' >+ Plus ::= '+' >+ Minus ::= '-' >+ Slash ::= '/' >+ Star ::= '*' >+ LeftParen ::= '(' >+ RightParen ::= ')' >+ Equal ::= '=' >+ >+%End >+ >+%Start >+ Token >+%End >+ >+%Rules >+ >+ --------------------- Rules for Scanned Tokens -------------------------------- >+ -- The lexer creates an array list of tokens which is defined in the PrsStream class. >+ -- A token has three attributes: a start offset, an end offset and a kind. >+ -- >+ -- Only rules that produce complete tokens have actions to create token objects. >+ -- When making a token, calls to the methods, $getToken(1) and $getRightSpan(), >+ -- provide the offsets (i.e. the span) of a rule's right hand side (rhs) and thus of the token. >+ -- For a rule of the form A ::= A1 A2 ... An, the start offset of the rhs of A is given by >+ -- $getToken(1) or by $getLeftSpan() and the end offset by $getRightSpan(). >+ -- >+ -- Regarding rules for parsing in general, note that for a rhs symbol Ai, the >+ -- method $getToken(i) returns the location of the leftmost character derived from Ai. >+ -- The method $getLeftSpan(i) returns the same location unless Ai produces %empty in which case >+ -- it returns the location of the last character derived before reducing Ai to %empty. >+ -- The method $getRightSpan(i) returns the location of the rightmost character derived from Ai >+ -- unless Ai produces %empty in which case it returns the location of the last character >+ -- derived before reducing Ai to %empty. >+ -------------------------------------------------------------------------------- >+ Token ::= Identifier >+ /.$BeginAction >+ checkForKeyWord(); >+ $EndAction >+ ./ >+ >+ -- an empty String literal looks just like an escaped single-quote >+ Token ::= EscapedSQ >+ /.$BeginAction >+ makeToken($_STRING_LITERAL); >+ $EndAction >+ ./ >+ >+ Token ::= SingleQuote SLNotSQ SingleQuote >+ /.$BeginAction >+ makeToken($_STRING_LITERAL); >+ $EndAction >+ ./ >+ >+ Token ::= Acute SLNotSQOpt Acute >+ /.$BeginAction >+ makeToken($_STRING_LITERAL); >+ $EndAction >+ ./ >+ >+ Token ::= BackQuote SLNotSQOpt Acute >+ /.$BeginAction >+ makeToken($_STRING_LITERAL); >+ $EndAction >+ ./ >+ >+ Token ::= IntegerLiteral >+ /.$BeginAction >+ makeToken($_INTEGER_LITERAL); >+ $EndAction >+ ./ >+ >+ Token ::= RealLiteral >+ /.$BeginAction >+ makeToken($_REAL_LITERAL); >+ $EndAction >+ ./ >+ >+ Token ::= NumericOperation >+ /.$BeginAction >+ makeToken($_NUMERIC_OPERATION); >+ $EndAction >+ ./ >+ >+ Token ::= IntegerRangeStart >+ /.$BeginAction >+ makeToken($_INTEGER_RANGE_START); >+ $EndAction >+ ./ >+ >+ Token ::= SLC >+ /.$BeginAction >+ makeComment($_SINGLE_LINE_COMMENT); >+ $EndAction >+ ./ >+ >+ Token ::= '/' '*' Inside Stars '/' >+ /.$BeginAction >+ makeComment($_MULTI_LINE_COMMENT); >+ $EndAction >+ ./ >+ >+ Token ::= WS -- White Space is scanned but not added to output vector >+ /.$BeginAction >+ skipToken(); >+ $EndAction >+ ./ >+ >+ Token ::= '+' >+ /.$BeginAction >+ makeToken($_PLUS); >+ $EndAction >+ ./ >+ >+ Token ::= '-' >+ /.$BeginAction >+ makeToken($_MINUS); >+ $EndAction >+ ./ >+ >+ Token ::= '*' >+ /.$BeginAction >+ makeToken($_MULTIPLY); >+ $EndAction >+ ./ >+ >+ Token ::= '/' >+ /.$BeginAction >+ makeToken($_DIVIDE); >+ $EndAction >+ ./ >+ >+ Token ::= '(' >+ /.$BeginAction >+ makeToken($_LPAREN); >+ $EndAction >+ ./ >+ >+ Token ::= ')' >+ /.$BeginAction >+ makeToken($_RPAREN); >+ $EndAction >+ ./ >+ >+ Token ::= '>' >+ /.$BeginAction >+ makeToken($_GREATER); >+ $EndAction >+ ./ >+ >+ Token ::= '<' >+ /.$BeginAction >+ makeToken($_LESS); >+ $EndAction >+ ./ >+ >+ Token ::= '=' >+ /.$BeginAction >+ makeToken($_EQUAL); >+ $EndAction >+ ./ >+ >+ Token ::= '>' '=' >+ /.$BeginAction >+ makeToken($_GREATER_EQUAL); >+ $EndAction >+ ./ >+ >+ Token ::= '<' '=' >+ /.$BeginAction >+ makeToken($_LESS_EQUAL); >+ $EndAction >+ ./ >+ >+ Token ::= '<' '>' >+ /.$BeginAction >+ makeToken($_NOT_EQUAL); >+ $EndAction >+ ./ >+ >+ Token ::= '[' >+ /.$BeginAction >+ makeToken($_LBRACKET); >+ $EndAction >+ ./ >+ >+ Token ::= ']' >+ /.$BeginAction >+ makeToken($_RBRACKET); >+ $EndAction >+ ./ >+ >+ Token ::= '{' >+ /.$BeginAction >+ makeToken($_LBRACE); >+ $EndAction >+ ./ >+ >+ Token ::= '}' >+ /.$BeginAction >+ makeToken($_RBRACE); >+ $EndAction >+ ./ >+ >+ Token ::= '-' '>' >+ /.$BeginAction >+ makeToken($_ARROW); >+ $EndAction >+ ./ >+ >+ Token ::= '|' >+ /.$BeginAction >+ makeToken($_BAR); >+ $EndAction >+ ./ >+ >+ Token ::= ',' >+ /.$BeginAction >+ makeToken($_COMMA); >+ $EndAction >+ ./ >+ >+ Token ::= ':' >+ /.$BeginAction >+ makeToken($_COLON); >+ $EndAction >+ ./ >+ >+ Token ::= ':' ':' >+ /.$BeginAction >+ makeToken($_COLONCOLON); >+ $EndAction >+ ./ >+ >+ Token ::= ';' >+ /.$BeginAction >+ makeToken($_SEMICOLON); >+ $EndAction >+ ./ >+ >+ Token ::= '.' >+ /.$BeginAction >+ makeToken($_DOT); >+ $EndAction >+ ./ >+ >+ Token ::= '.' '.' >+ /.$BeginAction >+ makeToken($_DOTDOT); >+ $EndAction >+ ./ >+ >+ Token ::= '@' p r e >+ /.$BeginAction >+ makeToken($_ATPRE); >+ $EndAction >+ ./ >+ >+ >+ Token ::= '^' >+ /.$BeginAction >+ makeToken($_CARET); >+ $EndAction >+ ./ >+ >+ Token ::= '^' '^' >+ /.$BeginAction >+ makeToken($_CARETCARET); >+ $EndAction >+ ./ >+ >+ Token ::= '?' >+ /.$BeginAction >+ makeToken($_QUESTIONMARK); >+ $EndAction >+ ./ >+ >+ >+ IntegerLiteral -> Integer >+ -- | '0' LetterXx HexDigits >+ >+ RealLiteral -> Decimal >+ | Decimal Exponent >+ | Integer Exponent >+ >+ Inside ::= Inside Stars NotSlashOrStar >+ | Inside '/' >+ | Inside NotSlashOrStar >+ | %empty >+ >+ Stars -> '*' >+ | Stars '*' >+ >+ SLC -> '-' '-' >+ | SLC NotEol >+ >+ Integer -> Digit >+ | Integer Digit >+ >+ HexDigits -> HexDigit >+ | HexDigits HexDigit >+ >+ Decimal -> Integer '.' Integer >+ >+ Exponent -> LetterEe Integer >+ | LetterEe '-' Integer >+ | LetterEe '+' Integer >+ >+ WSChar -> Space >+ | LF >+ | CR >+ | HT >+ | FF >+ >+ Letter -> LowerCaseLetter >+ | UpperCaseLetter >+ | _ >+ | AfterASCIINotAcute >+ >+ LowerCaseLetter -> a | b | c | d | e | f | g | h | i | j | k | l | m | >+ n | o | p | q | r | s | t | u | v | w | x | y | z >+ >+ UpperCaseLetter -> A | B | C | D | E | F | G | H | I | J | K | L | M | >+ N | O | P | Q | R | S | T | U | V | W | X | Y | Z >+ >+ Digit -> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 >+ >+ OctalDigit -> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 >+ >+ a..fA..F -> a | b | c | d | e | f | A | B | C | D | E | F >+ >+ HexDigit -> Digit >+ | a..fA..F >+ >+ OctalDigits3 -> OctalDigit >+ | OctalDigit OctalDigit >+ | OctalDigit OctalDigit OctalDigit >+ >+ LetterEe -> 'E' >+ | 'e' >+ >+ LetterXx -> 'X' >+ | 'x' >+ >+ WS -> WSChar >+ | WS WSChar >+ >+ Identifier -> Letter >+ | Identifier Letter >+ | Identifier Digit >+ | Identifier DollarSign >+ | QuotedName >+ >+ SpecialNotStar -> '+' | '-' | '/' | '(' | ')' | '"' | '!' | '@' | '`' | '~' | >+ '%' | '&' | '^' | ':' | ';' | "'" | '\' | '|' | '{' | '}' | >+ '[' | ']' | '?' | ',' | '.' | '<' | '>' | '=' | '#' | DollarSign >+ >+ SpecialNotSlash -> '+' | '-' | -- exclude the star as well >+ '(' | ')' | '"' | '!' | '@' | '`' | '~' | >+ '%' | '&' | '^' | ':' | ';' | "'" | '\' | '|' | '{' | '}' | >+ '[' | ']' | '?' | ',' | '.' | '<' | '>' | '=' | '#' | DollarSign >+ >+ SpecialNotSQNotDQ -> '+' | '-' | '/' | '(' | ')' | '*' | '!' | '@' | '`' | '~' | >+ '%' | '&' | '^' | ':' | ';' | '|' | '{' | '}' | >+ '[' | ']' | '?' | ',' | '.' | '<' | '>' | '=' | '#' | DollarSign >+ >+ >+ SpecialNotDQ -> SpecialNotSQNotDQ | "'" >+ SpecialNotSQ -> SpecialNotSQNotDQ | '"' >+ >+ EscapedSymbols -> NotSQNotDQ | '"' | "'" | '\' >+ BackslashEscapedSymbol -> '\' EscapedSymbols >+ >+ NotSlashOrStar -> Letter >+ | Digit >+ | SpecialNotSlash >+ | WSChar >+ >+ NotEol -> Letter >+ | Digit >+ | Space >+ | '*' >+ | SpecialNotStar >+ | HT >+ | FF >+ | CtlCharNotWS >+ >+ NotSQNotDQ -> Letter >+ | Digit >+ | SpecialNotSQNotDQ >+ | Space >+ >+ NotDQ -> Letter >+ | Digit >+ | SpecialNotDQ >+ | Space >+ | EscapedDQ >+ --| '\' u HexDigit HexDigit HexDigit HexDigit >+ --| '\' OctalDigit >+ >+ NotSQ -> Letter >+ | Digit >+ | SpecialNotSQ >+ | Space >+ | EscapedSQ >+ | BackslashEscapedSymbol >+ --| '\' u HexDigit HexDigit HexDigit HexDigit >+ --| '\' OctalDigit >+ >+ EscapedSQ -> SingleQuote SingleQuote >+ >+ -- maintain this for compatibility with the "...\"..." escapes in an >+ -- escape mechanism (double-quotes) that isn't compliant, anyway >+ EscapedDQ -> '\' DoubleQuote >+ >+ SLNotDQ -> NotDQ >+ | SLNotDQ NotDQ >+ >+ SLNotSQ -> NotSQ >+ | SLNotSQ NotSQ >+ >+ SLNotSQOpt -> %empty >+ | SLNotSQ >+ >+ QuotedName -> '"' SLNotDQ '"' >+ >+ NumericOperation -> Integer '.' Identifier >+ NumericOperation -> Integer '.' '+' >+ NumericOperation -> Integer '.' '-' >+ NumericOperation -> Integer '.' '*' >+ NumericOperation -> Integer '.' '/' >+ NumericOperation -> Integer '.' '<' >+ NumericOperation -> Integer '.' '<' '=' >+ NumericOperation -> Integer '.' '>' '=' >+ NumericOperation -> Integer '.' '>' >+ >+ IntegerRangeStart -> Integer '.' '.' >+ >+%End
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 242153
:
113562
|
144433
|
144559
|
144561
|
146213
|
146215
|
146307
|
146308
|
146322
|
146527
|
146557
|
154939
|
154947
|
155049
|
155227
|
155269