eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

Cleanup inelegant CST artefacts #420

Closed eclipse-ocl-bot closed 2 hours ago

eclipse-ocl-bot commented 2 hours ago

| --- | --- | | Bugzilla Link | 287993 | | Status | CLOSED FIXED | | Importance | P3 enhancement | | Reported | Aug 28, 2009 12:57 EDT | | Modified | May 27, 2011 02:48 EDT | | Version | 1.3.0 | | Blocks | 294548 | | Reporter | Ed Willink |

Description

Created attachment 145961\ Changes to clean OCL CST

Attached cleans up a number of CST inelegancies.


Delete IsMarkedAtPreCS.isPre

This is currently an isPre true/false boolean.

Change to not-null/null object so that no object is created for the almost ubiquitous use case. This should give a useful performance improvement.

AbstractOCLParser.createIsMarkedAtPreCS no longer takes a boolean argument.\ Call only when true. Use null when false.

IsMarkedPreAtCS.isPre no longer exists.


Delete ClassifierContextDecl.invOrDefCS, InvOrDefCS.invOrDefCS

This is a redundant artefact of an early grammar, that created a backwards daisy chain.

1.3.0 replaced its use by a ClassifierContextDecl.constraints array but regenerated the daisy-chain for comptibility.

AbstractOCLParser.createClassifierContextDeclCS with 'linked-list' of invOrDefCS argument removed.\ AbstractOCLParser.createInvCS with parent argument removed.\ AbstractOCLParser.createDefCS with parent argument removed.


Delete InitOrDerValueCS.initOrDerValueCS\ Change PropertyContextCS.initOrDerValueCS to PropertyContextCS.constraints

(same change as above wrt 1.2.0, but no 1.3.0 halfway house).

AbstractOCLParser.createPropertyContextCS now takes a list rather a 'linked-list' of InitOrDerValueCS.\ AbstractOCLParser.createDerValueCS no longer takes a parent argument.\ AbstractOCLParser.createInitValueCS no longer takes a parent argument.\ grammar restructured to parse list.


PathNameCS/StateExpCS.sequenceOfNames change to simpleNames.

This makes the individual CST elements traceable back to tokens for finer-grained Editor and other usages.

This also enables a refinement of the Environment interface to lookup PathNameCS rather than List allowing finer-grained eror message locaility.

AbstractOCLParser.createPathNameCS now requires a SimpleNameCS argument\ AbstractOCLParser.extendPathNameCS now requires a SimpleNameCS argument\ grammar restructured to provide redusable simpleIdentifierCS

:notepad_spiral: OCLCSTCleanup.patch

eclipse-ocl-bot commented 2 hours ago

By Adolfo Sanchez-Barbudo Herrera on Sep 04, 2009 07:25

Nice patch.

All the changes make sense. I haven't found any problem and the test cases pass.

Go on this: +1.

eclipse-ocl-bot commented 2 hours ago

By Ed Willink on Sep 04, 2009 09:39

Committed to HEAD.

Also restored the lost NLS anntoiations from commit of 288526.

Also simplified EssentialOCL.g copyright to redirect from first to active copy.

eclipse-ocl-bot commented 2 hours ago

By Ed Willink on Sep 04, 2009 09:44

Forgot to resolve.

eclipse-ocl-bot commented 2 hours ago

By Ed Willink on May 27, 2011 02:48

Closing after over 18 months in resolved state.