Skip to content

Commit

Permalink
Merge branch 'master' of github.com:SciSpike/yaktor-dsl-xtext
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewadams committed Sep 19, 2016
2 parents e6384d9 + ce06325 commit 1687dae
Show file tree
Hide file tree
Showing 42 changed files with 87 additions and 98 deletions.
12 changes: 0 additions & 12 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@ module.exports = function (grunt) {
scope: 'devDependencies'
})

var yaktorHome = grunt.option('yaktor-home')
if (yaktorHome === true) yaktorHome = null
if (!yaktorHome) {
var err = new Error('no target yaktor version given; argument --yaktor-home=<path> required')
grunt.log.error(err)
throw err
}
if (!yaktorHome.match(new RegExp('^/'))) {
var err = new Error('argument --yaktor-home must be an absolute path')
grunt.log.error(err)
throw err
}
var skipBuild = grunt.option('skip-build') // helpful when testing the release process
var dir = null
var basePath = grunt.option('basePath') || './'
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Yaktor DSLs
[![Yakor Logo](yaktor.io/pics/yaktor-logo.png)](https://github.com/Scispike/yaktor)

Yaktor DSLs created by SciSpike creating data models and behavior for your Yaktor Application

[![master status](https://img.shields.io/travis/SciSpike/yaktor-dsl-xtext/master.svg?maxAge=3600)](https://travis-ci.org/SciSpike/yaktor-dsl-xtext)
[![Maven Central](https://img.shields.io/maven-central/v/io.yaktor/xtext-dsl-cli.svg?maxAge=3600)](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22xtext-dsl-cli%22)
Expand All @@ -22,7 +24,7 @@ There are two ways to build: Docker (recommended) & natively.
### Building with Docker

```
$ docker build -t yaktor-mvn-build docker`
docker build -t yaktor-mvn-build docker
./build.sh mvn clean install
```

Expand Down
2 changes: 1 addition & 1 deletion cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.yaktor</groupId>
<artifactId>dsl-xtext-parent</artifactId>
<version>0.51.0-SNAPSHOT</version>
<version>0.52.0-SNAPSHOT</version>
</parent>
<name>${project.groupId}:${project.artifactId}</name>
<description>A command-line code generator that reads Yaktor's DSLs and produces Node.js Yaktor applications.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: io.yaktor.conversation.as
Bundle-SymbolicName: io.yaktor.conversation.as;singleton:=true
Bundle-Version: 0.51.0.qualifier
Bundle-Version: 0.52.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: SciSpike LLC
Bundle-Localization: plugin
Expand Down
2 changes: 1 addition & 1 deletion conversation/io.yaktor.conversation.as/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<parent>
<groupId>io.yaktor</groupId>
<artifactId>conversation-xtext-dsl</artifactId>
<version>0.51.0-SNAPSHOT</version>
<version>0.52.0-SNAPSHOT</version>
</parent>

<groupId>io.yaktor.dsl</groupId>
Expand Down
8 changes: 4 additions & 4 deletions conversation/io.yaktor.conversation.cs.sdk/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@
<feature
id="io.yaktor.conversation.cs.sdk"
label="Conversation SDK Feature "
version="0.51.0.qualifier">
version="0.52.0.qualifier">

<plugin
id="io.yaktor.conversation.cs"
download-size="0"
install-size="0"
version="0.51.0.qualifier"
version="0.52.0.qualifier"
unpack="false"/>

<plugin
id="io.yaktor.conversation.as"
download-size="0"
install-size="0"
version="0.51.0.qualifier"
version="0.52.0.qualifier"
unpack="false"/>

<plugin
id="io.yaktor.conversation.cs.ui"
download-size="0"
install-size="0"
version="0.51.0.qualifier"
version="0.52.0.qualifier"
unpack="false"/>

</feature>
2 changes: 1 addition & 1 deletion conversation/io.yaktor.conversation.cs.sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<parent>
<groupId>io.yaktor</groupId>
<artifactId>conversation-xtext-dsl</artifactId>
<version>0.51.0-SNAPSHOT</version>
<version>0.52.0-SNAPSHOT</version>
</parent>

<groupId>io.yaktor.dsl</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: io.yaktor.conversation.cs.ui
Bundle-Vendor: SciSpike LLC
Bundle-Version: 0.51.0.qualifier
Bundle-Version: 0.52.0.qualifier
Bundle-SymbolicName: io.yaktor.conversation.cs.ui; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: io.yaktor.conversation.cs;visibility:=reexport,
Expand Down
12 changes: 6 additions & 6 deletions conversation/io.yaktor.conversation.cs.ui/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
default="true"
icon="icons/cdsl.png"
extensions="cl"
extensions="yc"
id="io.yaktor.Conversation"
name="Conversation Editor">
</editor>
Expand Down Expand Up @@ -214,13 +214,13 @@
point="org.eclipse.emf.ecore.extension_parser">
<parser
class="io.yaktor.ui.ConversationExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
type="cl">
type="yc">
</parser>
</extension>
<extension point="org.eclipse.xtext.extension_resourceServiceProvider">
<resourceServiceProvider
class="io.yaktor.ui.ConversationExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
uriExtension="cl">
uriExtension="yc">
</resourceServiceProvider>
</extension>

Expand Down Expand Up @@ -378,19 +378,19 @@
<extension point="org.eclipse.compare.contentViewers">
<viewer id="io.yaktor.Conversation.compare.contentViewers"
class="io.yaktor.ui.ConversationExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
extensions="cl">
extensions="yc">
</viewer>
</extension>
<extension point="org.eclipse.compare.contentMergeViewers">
<viewer id="io.yaktor.Conversation.compare.contentMergeViewers"
class="io.yaktor.ui.ConversationExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
extensions="cl" label="Conversation Compare">
extensions="yc" label="Conversation Compare">
</viewer>
</extension>
<extension point="org.eclipse.ui.editors.documentProviders">
<provider id="io.yaktor.Conversation.editors.documentProviders"
class="io.yaktor.ui.ConversationExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"
extensions="cl">
extensions="yc">
</provider>
</extension>

Expand Down
2 changes: 1 addition & 1 deletion conversation/io.yaktor.conversation.cs.ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<parent>
<groupId>io.yaktor</groupId>
<artifactId>conversation-xtext-dsl</artifactId>
<version>0.51.0-SNAPSHOT</version>
<version>0.52.0-SNAPSHOT</version>
</parent>

<groupId>io.yaktor.dsl</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: io.yaktor.conversation.cs
Bundle-Vendor: SciSpike LLC
Bundle-Version: 0.51.0.qualifier
Bundle-Version: 0.52.0.qualifier
Bundle-SymbolicName: io.yaktor.conversation.cs; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.xtext;bundle-version="[2.7.0,2.9.0)",
Expand Down
2 changes: 1 addition & 1 deletion conversation/io.yaktor.conversation.cs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<parent>
<groupId>io.yaktor</groupId>
<artifactId>conversation-xtext-dsl</artifactId>
<version>0.51.0-SNAPSHOT</version>
<version>0.52.0-SNAPSHOT</version>
</parent>

<groupId>io.yaktor.dsl</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// automatically generated by Xtext
grammar io.yaktor.Conversation with io.yaktor.Domain

import "http://www.eclipse.org/Xtext/io.yaktor.conversation"
Expand Down Expand Up @@ -26,7 +25,7 @@ AgentImport:
'agent' agent=[Agent|QualifiedName] ('as' alias=ID)?;

TypeImport:
'type' type=[Projection|QualifiedName] ('as' alias=ID)?;
('type' | 'message') type=[Projection|QualifiedName] ('as' alias=ID)?;

QualifiedName:
ID ('.' ID)+;
Expand Down Expand Up @@ -65,7 +64,7 @@ Junction returns Junction:


Join returns Join:
'while' 'in' (requiresExecution?="custom")? name=ID 'waits' 'for' joins+=Junction (','|'and' joins+=Junction)*
'while' ('in')? (requiresExecution?="custom")? name=ID 'waits' 'for' joins+=Junction (','|'and' joins+=Junction)*
'{'
(transitions+=Transition)*
'}';
Expand All @@ -77,7 +76,7 @@ Decision returns Decision:
'}';

State returns State:
('while' 'in')? (requiresExecution?="custom")? name=ID
('while' ('in')?)? (requiresExecution?="custom")? name=ID
'{'
(transitions+=Transition)*
'}';
Expand Down Expand Up @@ -112,23 +111,23 @@ ProjectionContainmentField:
TypeContainmentField:
{TypeContainmentField}
=> 'val' newField=TypeField
projection=Projection;
projection=NestedProjection;

NewField:
{NewField}
(newField=SimpleField | newField = AnyField);

MappedField:
{MappedField}
(oldField=[domain::Field|ID] ('as' alias=ID)? (projection=Projection)?);
(oldField=[domain::Field|ID] ('as' alias=ID)? (projection=NestedProjection)?);

TopLevelProjection returns Projection:
'type' name=ID ('from' entity=[domain::Entity|PossiblyQualifiedName])?
('type' | 'message') name=ID ('from' entity=[domain::Entity|PossiblyQualifiedName])?
'{'
(fields+=ProjectionField)*
'}';

Projection returns Projection:
NestedProjection returns Projection:
{Projection}
'{'
(fields+=ProjectionField)*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.eclipse.xtext.ui.generator.*

var projectName = "io.yaktor.conversation.cs"
var grammarURI = "platform:/resource/${projectName}/src/io/yaktor/Conversation.xtext"
var fileExtensions = "cl"
var fileExtensions = "yc"
var runtimeProject = "../${projectName}"
var generateXtendStub = true

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected void runGenerator(String... strings) {
for (Resource resource : set.getResources()) {
System.out.println(resource.getURI());
try {
if (resource.getURI().fileExtension().matches("dm")) {
if (resource.getURI().fileExtension().matches("ydm")) {
domainGenerator.doGenerate(resource, fileAccess);
} else {
conversationGenerator.doGenerate(resource, fileAccess);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class ConversationDocGenerator {
None of the agents fire events containing information.
«ELSE»
The following data type«IF ets.size>1»s are«ELSE» is«ENDIF» used to carry information along with the events.
In this section we'll simply list them with the documentation provided in the +cl+ files.
In this section we'll simply list them with the documentation provided in the +yc+ files.
For further details (that is, for full schema and documenation of the individual fields), see the implementation documentation.

«FOR et : ets»
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ class JsSimulator {
process.on('uncaughtException', function (err) {
console.log(err.stack)
})
var mongo = require('../config/initializers/02_mongo.js"')
mongo.call({ settings: { env: process.env.NODE_ENV || 'development' } }, function () { })
require('../src-gen/modelAll')
var path = require('path')
var mongo = require(path.resolve('config', 'global', '02_mongo.js'))
mongo({mongo: {host: 'mongo'}}, function () {})
require(path.resolve('src-gen', 'modelAll'))
«FOR dto : c.reachableAgents.filter[a|a.projection != null].map[a|a.projection.fullName].toSet»
var «dto.replace(".", "$")» = require('../conversations/types/«dto»')
var «dto.replace(".", "$")» = require(path.resolve('conversations', 'types', '«dto»'))
«ENDFOR»
var argv = require('commander')
var async = require('async')
var request = require('request')
var cookie = require('cookie')
var path = require('path')
var mocker = require('conversation/test/mocker')
var mocker = require('yaktor/test/mocker')
argv.option('-i, --iterations [n]', 'how many times to run a simulation', parseInt, 50)
.option('-u, --urlPrefix [value]', 'override urlPrefix', String.valueOf(), 'http://localhost:3000')
Expand Down
4 changes: 2 additions & 2 deletions conversation/io.yaktor.conversation.update/site.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="features/io.yaktor.conversation_1.1.2.200.51.091426.jar" id="io.yaktor.conversation" version="1.1.2.200.51.091426"/>
<feature url="features/io.yaktor.conversation.cs.sdk_0.51.0.200.51.091426.jar" id="io.yaktor.conversation.cs.sdk" version="0.51.0.200.51.091426"/>
<feature url="features/io.yaktor.conversation_1.1.2.200.52.091426.jar" id="io.yaktor.conversation" version="1.1.2.200.52.091426"/>
<feature url="features/io.yaktor.conversation.cs.sdk_0.52.0.200.52.091426.jar" id="io.yaktor.conversation.cs.sdk" version="0.52.0.200.52.091426"/>
</site>
8 changes: 4 additions & 4 deletions conversation/io.yaktor.conversation/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="io.yaktor.conversation"
label="conversation"
version="0.51.0.qualifier"
version="0.52.0.qualifier"
provider-name="Yaktor">

<description url="http://yaktor.io">
Expand All @@ -21,21 +21,21 @@
id="io.yaktor.conversation.as"
download-size="0"
install-size="0"
version="0.51.0.qualifier"
version="0.52.0.qualifier"
unpack="false"/>

<plugin
id="io.yaktor.conversation.cs"
download-size="0"
install-size="0"
version="0.51.0.qualifier"
version="0.52.0.qualifier"
unpack="false"/>

<plugin
id="io.yaktor.conversation.cs.ui"
download-size="0"
install-size="0"
version="0.51.0.qualifier"
version="0.52.0.qualifier"
unpack="false"/>

</feature>
2 changes: 1 addition & 1 deletion conversation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<parent>
<groupId>io.yaktor</groupId>
<artifactId>dsl-xtext-parent</artifactId>
<version>0.51.0-SNAPSHOT</version>
<version>0.52.0-SNAPSHOT</version>
</parent>
<groupId>io.yaktor</groupId>
<artifactId>conversation-xtext-dsl</artifactId>
Expand Down
12 changes: 6 additions & 6 deletions conversation/update.all/site.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="features/io.yaktor.domain.cs.sdk_0.51.0.qualifier.jar" id="io.yaktor.domain.cs.sdk" version="0.51.0.qualifier">
<category name="domain_0.51.0"/>
<feature url="features/io.yaktor.domain.cs.sdk_0.52.0.qualifier.jar" id="io.yaktor.domain.cs.sdk" version="0.52.0.qualifier">
<category name="domain_0.52.0"/>
</feature>
<feature url="features/io.yaktor.conversation.cs.sdk_0.51.0.qualifier.jar" id="io.yaktor.conversation.cs.sdk" version="0.51.0.qualifier">
<category name="conversation_0.51.0"/>
<feature url="features/io.yaktor.conversation.cs.sdk_0.52.0.qualifier.jar" id="io.yaktor.conversation.cs.sdk" version="0.52.0.qualifier">
<category name="conversation_0.52.0"/>
</feature>
<category-def name="domain_0.51.0" label="domain_0.51.0"/>
<category-def name="conversation_0.51.0" label="conversation_0.51.0"/>
<category-def name="domain_0.52.0" label="domain_0.52.0"/>
<category-def name="conversation_0.52.0" label="conversation_0.52.0"/>
</site>
2 changes: 1 addition & 1 deletion domain/io.yaktor.domain.as/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: io.yaktor.domain.as
Bundle-SymbolicName: io.yaktor.domain.as;singleton:=true
Bundle-Version: 0.51.0.qualifier
Bundle-Version: 0.52.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: SciSpike LLC
Bundle-Localization: plugin
Expand Down
2 changes: 1 addition & 1 deletion domain/io.yaktor.domain.as/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<parent>
<groupId>io.yaktor</groupId>
<artifactId>domain-xtext-dsl</artifactId>
<version>0.51.0-SNAPSHOT</version>
<version>0.52.0-SNAPSHOT</version>
</parent>

<groupId>io.yaktor.dsl</groupId>
Expand Down
Loading

0 comments on commit 1687dae

Please sign in to comment.