diff options
author | 2018-02-15 23:03:20 +0100 | |
---|---|---|
committer | 2018-02-15 23:03:20 +0100 | |
commit | 92f94b063ec9a65d04178788f3858c750fbf16e7 (patch) | |
tree | 5e1d9d7b64075931a8200080f5b2736685d14c71 /Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/util/VQLParser.xtend | |
parent | First complete scope grammar (diff) | |
download | VIATRA-Generator-92f94b063ec9a65d04178788f3858c750fbf16e7.tar.gz VIATRA-Generator-92f94b063ec9a65d04178788f3858c750fbf16e7.tar.zst VIATRA-Generator-92f94b063ec9a65d04178788f3858c750fbf16e7.zip |
Generation specification -> execution
Diffstat (limited to 'Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/util/VQLParser.xtend')
-rw-r--r-- | Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/util/VQLParser.xtend | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/util/VQLParser.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/util/VQLParser.xtend index 6eb9e3c8..e6d516f4 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/util/VQLParser.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/util/VQLParser.xtend | |||
@@ -3,7 +3,6 @@ package hu.bme.mit.inf.dslreasoner.application.execution.util | |||
3 | import com.google.inject.Guice | 3 | import com.google.inject.Guice |
4 | import com.google.inject.Injector | 4 | import com.google.inject.Injector |
5 | import com.google.inject.Module | 5 | import com.google.inject.Module |
6 | import hu.bme.mit.inf.dslreasoner.application.execution.Context | ||
7 | import java.util.LinkedHashMap | 6 | import java.util.LinkedHashMap |
8 | import java.util.List | 7 | import java.util.List |
9 | import org.eclipse.emf.common.util.URI | 8 | import org.eclipse.emf.common.util.URI |
@@ -21,6 +20,7 @@ import org.eclipse.viatra.query.patternlanguage.emf.eMFPatternLanguage.PatternMo | |||
21 | import org.eclipse.viatra.query.patternlanguage.emf.specification.SpecificationBuilder | 20 | import org.eclipse.viatra.query.patternlanguage.emf.specification.SpecificationBuilder |
22 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification | 21 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification |
23 | import org.eclipse.xtext.resource.XtextResourceSet | 22 | import org.eclipse.xtext.resource.XtextResourceSet |
23 | import hu.bme.mit.inf.dslreasoner.application.execution.ScriptConsole | ||
24 | 24 | ||
25 | class MyModule extends EMFPatternLanguageRuntimeModule implements Module { | 25 | class MyModule extends EMFPatternLanguageRuntimeModule implements Module { |
26 | def public Class<? extends IAnnotationValidatorLoader> bindAnnotationValidatorLoader() { | 26 | def public Class<? extends IAnnotationValidatorLoader> bindAnnotationValidatorLoader() { |
@@ -58,7 +58,7 @@ class VQLParser { | |||
58 | * the linked patterns are loaded validated and translated to a {@link IQuerySpecification} object. | 58 | * the linked patterns are loaded validated and translated to a {@link IQuerySpecification} object. |
59 | * @returns uri -> (name -> pattern) | 59 | * @returns uri -> (name -> pattern) |
60 | */ | 60 | */ |
61 | public def parse(List<String> uris, ResourceSet resourceSet, Context context) { | 61 | public def parse(List<String> uris, ResourceSet resourceSet, ScriptConsole context) { |
62 | val res = new LinkedHashMap | 62 | val res = new LinkedHashMap |
63 | val uri2resource = new LinkedHashMap | 63 | val uri2resource = new LinkedHashMap |
64 | 64 | ||
@@ -91,7 +91,7 @@ class VQLParser { | |||
91 | return res | 91 | return res |
92 | } | 92 | } |
93 | 93 | ||
94 | def private validate(Resource resource, String URI, Context context) { | 94 | def private validate(Resource resource, String URI, ScriptConsole context) { |
95 | val errors = resource.errors | 95 | val errors = resource.errors |
96 | errors.forEach[context.writeError('''Error in loading pattern "«URI»": «it»''')] | 96 | errors.forEach[context.writeError('''Error in loading pattern "«URI»": «it»''')] |
97 | } | 97 | } |