aboutsummaryrefslogtreecommitdiffstats
path: root/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner
diff options
context:
space:
mode:
Diffstat (limited to 'Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner')
-rw-r--r--Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/AlloyLanguage.xtext15
-rw-r--r--Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/formatting/AlloyLanguageFormatter.xtend4
2 files changed, 11 insertions, 8 deletions
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/AlloyLanguage.xtext b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/AlloyLanguage.xtext
index 6d5fcf58..468d453a 100644
--- a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/AlloyLanguage.xtext
+++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/AlloyLanguage.xtext
@@ -128,12 +128,14 @@ enum ALSNumericOperator: plus|sub|mul|rem|div;
128ALSVariableDeclaration: name=ALSID ':' range = ALSTerm; 128ALSVariableDeclaration: name=ALSID ':' range = ALSTerm;
129 129
130ALSBasicRelationTerm returns ALSTerm: 130ALSBasicRelationTerm returns ALSTerm:
131 {ALSNone} 'none'| 131 {ALSNone} 'none'|
132 {ALSIden} 'iden'| 132 {ALSIden} 'iden'|
133 {ALSUniv} 'univ'| 133 {ALSUniv} 'univ'|
134 {ALSInt} 'Int' | 134 {ALSInt} 'Int' |
135 {ALSString} 'String' |
135 {ALSReference} referred = [ALSRelationDeclaration] | 136 {ALSReference} referred = [ALSRelationDeclaration] |
136 {ALSNumberLiteral} value = INT| 137 {ALSNumberLiteral} value = INT|
138 {ALSStringLiteral} value = STRING|
137 '(' ALSTerm ')' 139 '(' ALSTerm ')'
138; 140;
139 141
@@ -143,7 +145,8 @@ ALSBasicRelationTerm returns ALSTerm:
143ALSRunCommand: 145ALSRunCommand:
144 {ALSRunCommand} 'run' '{' '}' ('for' typeScopes+=ALSTypeScope (',' typeScopes+=ALSTypeScope)*)?; 146 {ALSRunCommand} 'run' '{' '}' ('for' typeScopes+=ALSTypeScope (',' typeScopes+=ALSTypeScope)*)?;
145 147
146ALSTypeScope: ALSSigScope | ALSIntScope; 148ALSTypeScope: ALSSigScope | ALSIntScope | ALSStringScope;
147 149
148ALSSigScope: (exactly?='exactly')? number = INT type = [ALSSignatureDeclaration]; 150ALSSigScope: (exactly?='exactly')? number = INT type = [ALSSignatureDeclaration];
149ALSIntScope: number = INT 'Int'; \ No newline at end of file 151ALSIntScope: number = INT 'Int';
152ALSStringScope: 'exactly' number = INT 'String'; \ No newline at end of file
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/formatting/AlloyLanguageFormatter.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/formatting/AlloyLanguageFormatter.xtend
index 28797bc4..2fe82e0c 100644
--- a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/formatting/AlloyLanguageFormatter.xtend
+++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/formatting/AlloyLanguageFormatter.xtend
@@ -86,8 +86,8 @@ class AlloyLanguageFormatter extends AbstractDeclarativeFormatter {
86// c.setLinewrap.before(ALSPreficedAccess.rightCurlyBracketKeyword_5_6) 86// c.setLinewrap.before(ALSPreficedAccess.rightCurlyBracketKeyword_5_6)
87// c.setIndentationDecrement.before(ALSPreficedAccess.rightCurlyBracketKeyword_5_6) 87// c.setIndentationDecrement.before(ALSPreficedAccess.rightCurlyBracketKeyword_5_6)
88 88
89 c.setNoSpace.after(ALSBasicRelationTermAccess.leftParenthesisKeyword_6_0) 89 c.setNoSpace.after(ALSBasicRelationTermAccess.leftParenthesisKeyword_8_0)
90 c.setNoSpace.before(ALSBasicRelationTermAccess.rightParenthesisKeyword_6_2) 90 c.setNoSpace.before(ALSBasicRelationTermAccess.rightParenthesisKeyword_8_2)
91 91
92 // Quantified expression 92 // Quantified expression
93 c.setNoSpace.before(ALSQuantifiedAccess.commaKeyword_0_4_0) 93 c.setNoSpace.before(ALSQuantifiedAccess.commaKeyword_0_4_0)