gisele 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +39 -1
- data/gisele.noespec +1 -1
- data/lib/gisele/command.rb +13 -4
- data/lib/gisele/errors.rb +21 -0
- data/lib/gisele/language/ast/helpers.rb +37 -0
- data/lib/gisele/language/ast/node.rb +54 -0
- data/lib/gisele/language/ast/unit.rb +10 -0
- data/lib/gisele/language/ast.rb +14 -0
- data/lib/gisele/language/sugar_removal.rb +53 -0
- data/lib/gisele/language/syntax/bool_and.rb +14 -0
- data/lib/gisele/language/syntax/bool_lit.rb +14 -0
- data/lib/gisele/language/syntax/bool_not.rb +14 -0
- data/lib/gisele/language/syntax/bool_or.rb +14 -0
- data/lib/gisele/language/syntax/bool_paren.rb +14 -0
- data/lib/gisele/language/syntax/else_clause.rb +14 -0
- data/lib/gisele/language/syntax/elsif_clause.rb +16 -0
- data/lib/gisele/language/syntax/event_set.rb +15 -0
- data/lib/gisele/language/syntax/fluent_def.rb +18 -0
- data/lib/gisele/language/syntax/grammar.citrus +202 -0
- data/lib/gisele/language/syntax/if_st.rb +18 -0
- data/lib/gisele/language/syntax/implicit_seq_st.rb +16 -0
- data/lib/gisele/language/syntax/node.rb +35 -0
- data/lib/gisele/language/syntax/par_st.rb +14 -0
- data/lib/gisele/language/syntax/seq_st.rb +14 -0
- data/lib/gisele/language/syntax/st_list.rb +14 -0
- data/lib/gisele/language/syntax/task_call_st.rb +14 -0
- data/lib/gisele/language/syntax/task_def.rb +17 -0
- data/lib/gisele/language/syntax/task_refinement.rb +15 -0
- data/lib/gisele/language/syntax/task_signature.rb +15 -0
- data/lib/gisele/language/syntax/trackvar_def.rb +19 -0
- data/lib/gisele/language/syntax/unit.rb +14 -0
- data/lib/gisele/language/syntax/var_ref.rb +14 -0
- data/lib/gisele/language/syntax/while_st.rb +16 -0
- data/lib/gisele/language/syntax.rb +29 -0
- data/lib/gisele/language/transformer.rb +38 -0
- data/lib/gisele/language.rb +15 -1
- data/lib/gisele/version.rb +2 -2
- data/lib/gisele.rb +7 -1
- data/spec/command/main/gisele_ast_ruby.stdout +38 -28
- data/spec/command/main/gisele_help.stdout +5 -0
- data/spec/command/main/gisele_no_sugar.cmd +1 -0
- data/spec/command/main/gisele_no_sugar.stdout +61 -0
- data/spec/fixtures/tasks/simple.ast +18 -14
- data/spec/fixtures/tasks/simple.gis +2 -0
- data/spec/spec_helper.rb +3 -3
- data/spec/test_examples.rb +3 -3
- data/spec/unit/language/ast/test_node.rb +61 -0
- data/spec/unit/language/sugar_removal/test_if_to_guarded_commands.rb +90 -0
- data/spec/unit/language/{test_grammar.rb → syntax/test_grammar.rb} +18 -30
- data/spec/unit/language/syntax/test_to_ast.rb +245 -0
- data/spec/unit/language/test_ast.rb +21 -247
- data/spec/unit/language/test_syntax.rb +48 -0
- data/spec/unit/language/test_transformer.rb +68 -0
- data/spec/unit/test_language.rb +35 -0
- metadata +69 -25
- data/lib/gisele/language/grammar.citrus +0 -246
- data/lib/gisele/language/parser.rb +0 -30
- data/spec/unit/language/test_parser.rb +0 -27
@@ -1,264 +1,38 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
module Gisele::Language
|
3
|
-
describe
|
3
|
+
describe AST do
|
4
4
|
|
5
|
-
|
5
|
+
describe 'ast' do
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
describe "the bool_expr rule" do
|
12
|
-
|
13
|
-
it 'returns expected ast on simple expressions' do
|
14
|
-
expected = [:and, [:varref, "diagKnown"], [:varref, "platLow"]]
|
15
|
-
ast("diagKnown and platLow", :bool_expr).should eq(expected)
|
16
|
-
end
|
17
|
-
|
18
|
-
it 'respects priorities' do
|
19
|
-
expected = [:or, [:and, [:varref, "diagKnown"], [:varref, "platLow"]], [:varref, "platHigh"]]
|
20
|
-
ast("diagKnown and platLow or platHigh", :bool_expr).should eq(expected)
|
21
|
-
end
|
22
|
-
|
23
|
-
it 'supports double negations' do
|
24
|
-
expected = [:not, [:not, [:varref, "diagKnown"]]]
|
25
|
-
ast("not not(diagKnown)", :bool_expr).should eq(expected)
|
26
|
-
end
|
27
|
-
|
28
|
-
end # bool_expr
|
29
|
-
|
30
|
-
describe 'the event_commalist rule' do
|
31
|
-
|
32
|
-
it 'parses singleton lists as expected' do
|
33
|
-
expr = 'Diagnosis:start'
|
34
|
-
expected = ["Diagnosis:start"]
|
35
|
-
ast(expr, :event_commalist).should eq(expected)
|
36
|
-
end
|
37
|
-
|
38
|
-
it 'parses non empty lists as expected' do
|
39
|
-
expr = 'Diagnosis:start, an_event'
|
40
|
-
expected = ["Diagnosis:start", "an_event"]
|
41
|
-
ast(expr, :event_commalist).should eq(expected)
|
42
|
-
end
|
43
|
-
|
44
|
-
end # event_commalist
|
45
|
-
|
46
|
-
describe 'the event_set rule' do
|
47
|
-
|
48
|
-
it 'parses non empty lists as expected' do
|
49
|
-
expr = '{Diagnosis:start, an_event}'
|
50
|
-
expected = [:event_set, "Diagnosis:start", "an_event"]
|
51
|
-
ast(expr, :event_set).should eq(expected)
|
52
|
-
end
|
53
|
-
|
54
|
-
end # event_set
|
55
|
-
|
56
|
-
describe "the fluent_def rule" do
|
57
|
-
|
58
|
-
it 'parses fluent definitions as expected' do
|
59
|
-
defn = "fluent diagKnown {Diagnosis:start, diagnosis}, {Treatment:end} initially false"
|
60
|
-
expected = [:fluent,
|
61
|
-
"diagKnown",
|
62
|
-
[:event_set, "Diagnosis:start", "diagnosis"],
|
63
|
-
[:event_set, "Treatment:end"],
|
64
|
-
false]
|
65
|
-
ast(defn, :fluent_def).should eq(expected)
|
66
|
-
end
|
67
|
-
|
68
|
-
it 'does not require the initial value' do
|
69
|
-
defn = "fluent diagKnown {Diagnosis:start, diagnosis}, {Treatment:end}"
|
70
|
-
expected = [:fluent,
|
71
|
-
"diagKnown",
|
72
|
-
[:event_set, "Diagnosis:start", "diagnosis"],
|
73
|
-
[:event_set, "Treatment:end"],
|
74
|
-
nil]
|
75
|
-
ast(defn, :fluent_def).should eq(expected)
|
76
|
-
end
|
77
|
-
|
78
|
-
end # fluent_def rule
|
79
|
-
|
80
|
-
describe "the trackvar_def rule" do
|
81
|
-
|
82
|
-
it 'parses tracking variable definitions as expected' do
|
83
|
-
defn = "trackvar mplus {Diagnosis:start}"
|
84
|
-
expected = [:trackvar,
|
85
|
-
"mplus",
|
86
|
-
[:event_set, "Diagnosis:start"],
|
87
|
-
[:event_set],
|
88
|
-
nil]
|
89
|
-
ast(defn, :trackvar_def).should eq(expected)
|
90
|
-
end
|
91
|
-
|
92
|
-
it 'supports obsolete events and initial value' do
|
93
|
-
defn = "trackvar mplus {Diagnosis:start}, {Treatment:end} initially true"
|
94
|
-
expected = [:trackvar,
|
95
|
-
"mplus",
|
96
|
-
[:event_set, "Diagnosis:start"],
|
97
|
-
[:event_set, "Treatment:end"],
|
98
|
-
true]
|
99
|
-
ast(defn, :trackvar_def).should eq(expected)
|
100
|
-
end
|
101
|
-
|
102
|
-
end # trackvar_def rule
|
103
|
-
|
104
|
-
describe "the task_call_statement rule" do
|
105
|
-
|
106
|
-
it 'parses as expected' do
|
107
|
-
ast("Diagnosis", :task_call_statement).should eq([:task_call, "Diagnosis"])
|
108
|
-
end
|
109
|
-
|
110
|
-
end # task_call_statement
|
111
|
-
|
112
|
-
describe "the statement_list rule" do
|
113
|
-
|
114
|
-
it 'parses a list of 2 elements' do
|
115
|
-
expr = "Task1 Task2"
|
116
|
-
expected = [[:task_call, "Task1"], [:task_call, "Task2"]]
|
117
|
-
ast(expr, :statement_list).should eq(expected)
|
7
|
+
it 'returns a node' do
|
8
|
+
node = [:unit].extend(AST::Node)
|
9
|
+
AST.node(node).object_id.should eq(node.object_id)
|
118
10
|
end
|
119
11
|
|
120
|
-
it '
|
121
|
-
|
122
|
-
|
123
|
-
ast(expr, :statement_list).should eq(expected)
|
12
|
+
it 'coerces an array' do
|
13
|
+
AST.node([:unit]).should eq([:unit])
|
14
|
+
AST.node([:unit]).should be_a(AST::Unit)
|
124
15
|
end
|
125
16
|
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
it 'parses as expected' do
|
131
|
-
expr = "par Task1 Task2 end"
|
132
|
-
expected = [:par, [:task_call, "Task1"], [:task_call, "Task2"]]
|
133
|
-
ast(expr, :par_statement).should eq(expected)
|
134
|
-
end
|
135
|
-
|
136
|
-
end # par_statement
|
137
|
-
|
138
|
-
describe "the seq_statement rule" do
|
139
|
-
|
140
|
-
it 'parses as expected' do
|
141
|
-
expr = "seq Task1 Task2 end"
|
142
|
-
expected = [:seq, [:task_call, "Task1"], [:task_call, "Task2"]]
|
143
|
-
ast(expr, :seq_statement).should eq(expected)
|
144
|
-
end
|
145
|
-
|
146
|
-
end # seq_statement
|
147
|
-
|
148
|
-
describe "the while_statement rule" do
|
149
|
-
|
150
|
-
it 'parses as expected' do
|
151
|
-
expr = "while goodCond Task1 end"
|
152
|
-
expected = \
|
153
|
-
[:while,
|
154
|
-
[:varref, "goodCond"],
|
155
|
-
[:task_call, "Task1"]]
|
156
|
-
ast(expr, :while_statement).should eq(expected)
|
157
|
-
end
|
158
|
-
|
159
|
-
it 'recognizes implicit sequences' do
|
160
|
-
expr = "while goodCond Task1 Task2 end"
|
161
|
-
expected = \
|
162
|
-
[:while,
|
163
|
-
[:varref, "goodCond"],
|
164
|
-
[:seq, [:task_call, "Task1"], [:task_call, "Task2"]]]
|
165
|
-
ast(expr, :while_statement).should eq(expected)
|
166
|
-
end
|
167
|
-
|
168
|
-
end # while_statement
|
169
|
-
|
170
|
-
describe "the else_clause rule" do
|
171
|
-
|
172
|
-
it 'parses as expected' do
|
173
|
-
expr = "else Task1 "
|
174
|
-
expected = \
|
175
|
-
[:else, [:task_call, "Task1"]]
|
176
|
-
ast(expr, :else_clause).should eq(expected)
|
177
|
-
end
|
178
|
-
|
179
|
-
end # else_clause
|
180
|
-
|
181
|
-
describe "the elsif_clause rule" do
|
182
|
-
|
183
|
-
it 'parses as expected' do
|
184
|
-
expr = "elsif goodCond Task1 "
|
185
|
-
expected = \
|
186
|
-
[:elsif, [:varref, "goodCond"], [:task_call, "Task1"]]
|
187
|
-
ast(expr, :elsif_clause).should eq(expected)
|
188
|
-
end
|
189
|
-
|
190
|
-
end # elsif_clause
|
191
|
-
|
192
|
-
describe "the if_statement rule" do
|
193
|
-
|
194
|
-
it 'parses as expected' do
|
195
|
-
expr = "if goodCond Task1 end"
|
196
|
-
expected = \
|
197
|
-
[:if, [:varref, "goodCond"], [:task_call, "Task1"]]
|
198
|
-
ast(expr, :if_statement).should eq(expected)
|
199
|
-
end
|
200
|
-
|
201
|
-
it 'supports a else clause' do
|
202
|
-
expr = "if goodCond Task1 else Task2 end"
|
203
|
-
expected = \
|
204
|
-
[:if,
|
205
|
-
[:varref, "goodCond"], [:task_call, "Task1"],
|
206
|
-
[:else, [:task_call, "Task2"]] ]
|
207
|
-
ast(expr, :if_statement).should eq(expected)
|
208
|
-
end
|
209
|
-
|
210
|
-
it 'supports elsif clauses' do
|
211
|
-
expr = "if goodCond Task1 elsif otherCond Task2 elsif stillAnother Task3 else Task4 end"
|
212
|
-
expected = \
|
213
|
-
[:if,
|
214
|
-
[:varref, "goodCond"], [:task_call, "Task1"],
|
215
|
-
[:elsif,
|
216
|
-
[:varref, "otherCond"], [:task_call, "Task2"]],
|
217
|
-
[:elsif,
|
218
|
-
[:varref, "stillAnother"], [:task_call, "Task3"]],
|
219
|
-
[:else,
|
220
|
-
[:task_call, "Task4"]] ]
|
221
|
-
ast(expr, :if_statement).should eq(expected)
|
17
|
+
it 'falls back to Node' do
|
18
|
+
AST.node([:nosuchnode]).should eq([:nosuchnode])
|
19
|
+
AST.node([:nosuchnode]).should be_a(AST::Node)
|
222
20
|
end
|
223
21
|
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
it 'parses as expected' do
|
229
|
-
expr = "refinement Task1 end"
|
230
|
-
expected = [:task_call, "Task1"]
|
231
|
-
ast(expr, :task_refinement).should eq(expected)
|
22
|
+
it 'applies coercions recursively' do
|
23
|
+
source = [:unit, [:hello, "world"]]
|
24
|
+
AST.node(source).should eq(source)
|
25
|
+
AST.node(source).last.should be_a(AST::Node)
|
232
26
|
end
|
233
27
|
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
expr = "fluent diagKnown {}, {}\ntrackvar mplus {}"
|
240
|
-
expected = \
|
241
|
-
[ [:fluent, "diagKnown", [:event_set], [:event_set], nil],
|
242
|
-
[:trackvar, "mplus", [:event_set], [:event_set], nil]]
|
243
|
-
ast(expr, :task_signature).should eq(expected)
|
244
|
-
end
|
245
|
-
|
246
|
-
end # task_signature
|
247
|
-
|
248
|
-
describe 'the task_def rule' do
|
249
|
-
|
250
|
-
it 'parses as expected' do
|
251
|
-
expr = "task Task1 fluent diagKnown {}, {} refinement Task2 end end"
|
252
|
-
expected = \
|
253
|
-
[:task, "Task1",
|
254
|
-
[:signature,
|
255
|
-
[:fluent, "diagKnown", [:event_set], [:event_set], nil]],
|
256
|
-
[:refinement,
|
257
|
-
[:task_call, "Task2"]]]
|
258
|
-
ast(expr, :task_def).should eq(expected)
|
28
|
+
it 'raises unless a ast node array' do
|
29
|
+
lambda{ AST.node("foo") }.should raise_error(ArgumentError, /foo/)
|
30
|
+
lambda{ AST.node(nil) }.should raise_error(ArgumentError, /nil/)
|
31
|
+
lambda{ AST.node([]) }.should raise_error(ArgumentError, /\[\]/)
|
32
|
+
lambda{ AST.node(["foo"]) }.should raise_error(ArgumentError, /foo/)
|
259
33
|
end
|
260
34
|
|
261
|
-
end #
|
35
|
+
end # .ast
|
262
36
|
|
263
37
|
end
|
264
38
|
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
module Gisele::Language
|
3
|
+
describe Syntax do
|
4
|
+
include Syntax
|
5
|
+
|
6
|
+
describe "parse" do
|
7
|
+
|
8
|
+
it 'works with a file' do
|
9
|
+
parsed = parse(fixtures_dir/:tasks/"simple.gis")
|
10
|
+
parsed.should be_a(Citrus::Match)
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'works on a String' do
|
14
|
+
parsed = parse("task Hello end")
|
15
|
+
parsed.should be_a(Citrus::Match)
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'accepts parse options' do
|
19
|
+
parsed = parse("if goodCond Task1 end", :root => :if_st)
|
20
|
+
parsed.should be_a(Citrus::Match)
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
describe "ast" do
|
26
|
+
|
27
|
+
it 'accepts parse options' do
|
28
|
+
ast = ast("if goodCond Task1 end", :root => :if_st)
|
29
|
+
ast.should be_a(AST::Node)
|
30
|
+
ast.first.should eq(:if_st)
|
31
|
+
end
|
32
|
+
|
33
|
+
fixture_files('tasks/**/*.gis').each do |file|
|
34
|
+
it "works on #{file}" do
|
35
|
+
parsed = Syntax.ast(file)
|
36
|
+
parsed.should be_a(Array)
|
37
|
+
parsed.should be_a(AST::Node)
|
38
|
+
parsed.first.should eq(:unit)
|
39
|
+
if (astfile = file.sub_ext(".ast")).exist?
|
40
|
+
parsed.should eq(Kernel::eval(astfile.read, TOPLEVEL_BINDING, astfile.to_s))
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
end # ast
|
46
|
+
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
module Gisele::Language
|
3
|
+
describe Transformer do
|
4
|
+
|
5
|
+
let(:transformer_class){
|
6
|
+
Class.new(Transformer) do
|
7
|
+
|
8
|
+
def on_hello(node)
|
9
|
+
[:seen_hello, node]
|
10
|
+
end
|
11
|
+
|
12
|
+
def on_copy(node)
|
13
|
+
copy_and_applyall(node)
|
14
|
+
end
|
15
|
+
|
16
|
+
def on_missing(node)
|
17
|
+
if node.rule_name == :nosuchone
|
18
|
+
[:seen_missing, node]
|
19
|
+
else
|
20
|
+
super
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
}
|
26
|
+
let(:transformer){ transformer_class.new }
|
27
|
+
|
28
|
+
describe 'call' do
|
29
|
+
|
30
|
+
it 'dispatches to existing methods' do
|
31
|
+
ast = [:hello, "world"]
|
32
|
+
transformer.call(ast).should eq([:seen_hello, [:hello, "world"]])
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'calls on_missing when not found' do
|
36
|
+
ast = [:nosuchone, "world"]
|
37
|
+
transformer.call(ast).should eq([:seen_missing, [:nosuchone, "world"]])
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'raises unexpected by default in on_missing' do
|
41
|
+
ast = [:nonono, "world"]
|
42
|
+
lambda{ transformer.call(ast) }.should raise_error(Gisele::UnexpectedNodeError, /nonono/)
|
43
|
+
end
|
44
|
+
|
45
|
+
it 'performs post node transformation if required' do
|
46
|
+
ast = [:hello, "world"]
|
47
|
+
transformer.call(ast).should be_a(AST::Node)
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'raises an ArgumentError unless called on a non terminal' do
|
51
|
+
lambda{
|
52
|
+
transformer.call("world").should raise_error(ArgumentError, /world/)
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
|
58
|
+
describe "copy_and_applyall" do
|
59
|
+
|
60
|
+
it 'provides a friendly way of applying copy/recurse' do
|
61
|
+
ast = [:copy, [:hello, 'world'], "!"]
|
62
|
+
transformer.call(ast).should eq([:copy, [:seen_hello, [:hello, "world"]], "!"])
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
module Gisele
|
3
|
+
describe Language do
|
4
|
+
include Language
|
5
|
+
|
6
|
+
describe "rule2mod" do
|
7
|
+
|
8
|
+
it 'work on simple rule name' do
|
9
|
+
rule2mod(:test).should eq(:Test)
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'works when underscores are present' do
|
13
|
+
rule2mod(:a_rule_name).should eq(:ARuleName)
|
14
|
+
end
|
15
|
+
|
16
|
+
end # rule2mod
|
17
|
+
|
18
|
+
describe "mod2rule" do
|
19
|
+
|
20
|
+
it 'work on simple module name' do
|
21
|
+
mod2rule(:Test).should eq(:test)
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'work on complex module name' do
|
25
|
+
mod2rule(:ThisIsATest).should eq(:this_is_a_test)
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'works with a module' do
|
29
|
+
mod2rule(::Gisele::Language::Syntax::WhileSt).should eq(:while_st)
|
30
|
+
end
|
31
|
+
|
32
|
+
end # rule2mod
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gisele
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-17 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &70134950121580 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.9.2
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70134950121580
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: bundler
|
27
|
-
requirement: &
|
27
|
+
requirement: &70134950028240 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '1.0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70134950028240
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70134950027180 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 2.8.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70134950027180
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: wlang
|
49
|
-
requirement: &
|
49
|
+
requirement: &70134950026340 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 0.10.2
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70134950026340
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: citrus
|
60
|
-
requirement: &
|
60
|
+
requirement: &70134950025360 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '2.4'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70134950025360
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: epath
|
71
|
-
requirement: &
|
71
|
+
requirement: &70134950024560 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 0.0.1
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70134950024560
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: quickl
|
82
|
-
requirement: &
|
82
|
+
requirement: &70134950023760 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 0.4.3
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70134950023760
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: awesome_print
|
93
|
-
requirement: &
|
93
|
+
requirement: &70134950022720 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ~>
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
version: '1.0'
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70134950022720
|
102
102
|
description: ! 'This is a fresh-new implementation of the process analysis techniques
|
103
103
|
|
104
104
|
developed in the Gisele and PIPAS research projects at UCLouvain'
|
@@ -120,8 +120,38 @@ files:
|
|
120
120
|
- bin/gisele
|
121
121
|
- examples/meeting-scheduler/MeetingScheduling.gis
|
122
122
|
- lib/gisele/command.rb
|
123
|
-
- lib/gisele/
|
124
|
-
- lib/gisele/language/
|
123
|
+
- lib/gisele/errors.rb
|
124
|
+
- lib/gisele/language/ast/helpers.rb
|
125
|
+
- lib/gisele/language/ast/node.rb
|
126
|
+
- lib/gisele/language/ast/unit.rb
|
127
|
+
- lib/gisele/language/ast.rb
|
128
|
+
- lib/gisele/language/sugar_removal.rb
|
129
|
+
- lib/gisele/language/syntax/bool_and.rb
|
130
|
+
- lib/gisele/language/syntax/bool_lit.rb
|
131
|
+
- lib/gisele/language/syntax/bool_not.rb
|
132
|
+
- lib/gisele/language/syntax/bool_or.rb
|
133
|
+
- lib/gisele/language/syntax/bool_paren.rb
|
134
|
+
- lib/gisele/language/syntax/else_clause.rb
|
135
|
+
- lib/gisele/language/syntax/elsif_clause.rb
|
136
|
+
- lib/gisele/language/syntax/event_set.rb
|
137
|
+
- lib/gisele/language/syntax/fluent_def.rb
|
138
|
+
- lib/gisele/language/syntax/grammar.citrus
|
139
|
+
- lib/gisele/language/syntax/if_st.rb
|
140
|
+
- lib/gisele/language/syntax/implicit_seq_st.rb
|
141
|
+
- lib/gisele/language/syntax/node.rb
|
142
|
+
- lib/gisele/language/syntax/par_st.rb
|
143
|
+
- lib/gisele/language/syntax/seq_st.rb
|
144
|
+
- lib/gisele/language/syntax/st_list.rb
|
145
|
+
- lib/gisele/language/syntax/task_call_st.rb
|
146
|
+
- lib/gisele/language/syntax/task_def.rb
|
147
|
+
- lib/gisele/language/syntax/task_refinement.rb
|
148
|
+
- lib/gisele/language/syntax/task_signature.rb
|
149
|
+
- lib/gisele/language/syntax/trackvar_def.rb
|
150
|
+
- lib/gisele/language/syntax/unit.rb
|
151
|
+
- lib/gisele/language/syntax/var_ref.rb
|
152
|
+
- lib/gisele/language/syntax/while_st.rb
|
153
|
+
- lib/gisele/language/syntax.rb
|
154
|
+
- lib/gisele/language/transformer.rb
|
125
155
|
- lib/gisele/language.rb
|
126
156
|
- lib/gisele/loader.rb
|
127
157
|
- lib/gisele/version.rb
|
@@ -134,6 +164,8 @@ files:
|
|
134
164
|
- spec/command/main/gisele_ast_ruby.stdout
|
135
165
|
- spec/command/main/gisele_help.cmd
|
136
166
|
- spec/command/main/gisele_help.stdout
|
167
|
+
- spec/command/main/gisele_no_sugar.cmd
|
168
|
+
- spec/command/main/gisele_no_sugar.stdout
|
137
169
|
- spec/command/main/gisele_version.cmd
|
138
170
|
- spec/command/main/gisele_version.stdout
|
139
171
|
- spec/command/test_command.rb
|
@@ -141,10 +173,15 @@ files:
|
|
141
173
|
- spec/fixtures/tasks/simple.gis
|
142
174
|
- spec/spec_helper.rb
|
143
175
|
- spec/test_examples.rb
|
176
|
+
- spec/unit/language/ast/test_node.rb
|
177
|
+
- spec/unit/language/sugar_removal/test_if_to_guarded_commands.rb
|
178
|
+
- spec/unit/language/syntax/test_grammar.rb
|
179
|
+
- spec/unit/language/syntax/test_to_ast.rb
|
144
180
|
- spec/unit/language/test_ast.rb
|
145
|
-
- spec/unit/language/
|
146
|
-
- spec/unit/language/
|
181
|
+
- spec/unit/language/test_syntax.rb
|
182
|
+
- spec/unit/language/test_transformer.rb
|
147
183
|
- spec/unit/test_gisele.rb
|
184
|
+
- spec/unit/test_language.rb
|
148
185
|
- tasks/debug_mail.rake
|
149
186
|
- tasks/debug_mail.txt
|
150
187
|
- tasks/gem.rake
|
@@ -165,7 +202,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
165
202
|
version: '0'
|
166
203
|
segments:
|
167
204
|
- 0
|
168
|
-
hash: -
|
205
|
+
hash: -2777835670012084504
|
169
206
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
170
207
|
none: false
|
171
208
|
requirements:
|
@@ -183,6 +220,8 @@ test_files:
|
|
183
220
|
- spec/command/main/gisele_ast_ruby.stdout
|
184
221
|
- spec/command/main/gisele_help.cmd
|
185
222
|
- spec/command/main/gisele_help.stdout
|
223
|
+
- spec/command/main/gisele_no_sugar.cmd
|
224
|
+
- spec/command/main/gisele_no_sugar.stdout
|
186
225
|
- spec/command/main/gisele_version.cmd
|
187
226
|
- spec/command/main/gisele_version.stdout
|
188
227
|
- spec/command/test_command.rb
|
@@ -190,7 +229,12 @@ test_files:
|
|
190
229
|
- spec/fixtures/tasks/simple.gis
|
191
230
|
- spec/spec_helper.rb
|
192
231
|
- spec/test_examples.rb
|
232
|
+
- spec/unit/language/ast/test_node.rb
|
233
|
+
- spec/unit/language/sugar_removal/test_if_to_guarded_commands.rb
|
234
|
+
- spec/unit/language/syntax/test_grammar.rb
|
235
|
+
- spec/unit/language/syntax/test_to_ast.rb
|
193
236
|
- spec/unit/language/test_ast.rb
|
194
|
-
- spec/unit/language/
|
195
|
-
- spec/unit/language/
|
237
|
+
- spec/unit/language/test_syntax.rb
|
238
|
+
- spec/unit/language/test_transformer.rb
|
196
239
|
- spec/unit/test_gisele.rb
|
240
|
+
- spec/unit/test_language.rb
|