expressir 0.2.9-x64-mingw32 → 0.2.10-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/expressir/express_exp/2.4/express_parser.so +0 -0
- data/lib/expressir/express_exp/2.5/express_parser.so +0 -0
- data/lib/expressir/express_exp/2.6/express_parser.so +0 -0
- data/lib/expressir/express_exp/2.7/express_parser.so +0 -0
- data/lib/expressir/express_exp/3.0/express_parser.so +0 -0
- data/lib/expressir/express_exp/formatter.rb +71 -16
- data/lib/expressir/express_exp/visitor.rb +95 -41
- data/lib/expressir/model.rb +2 -0
- data/lib/expressir/model/attribute.rb +3 -1
- data/lib/expressir/model/constant.rb +3 -1
- data/lib/expressir/model/entity.rb +11 -21
- data/lib/expressir/model/enumeration_item.rb +3 -1
- data/lib/expressir/model/expressions/aggregate_initializer.rb +2 -2
- data/lib/expressir/model/expressions/aggregate_item.rb +1 -1
- data/lib/expressir/model/expressions/attribute_reference.rb +1 -1
- data/lib/expressir/model/expressions/binary_expression.rb +1 -1
- data/lib/expressir/model/expressions/call.rb +2 -2
- data/lib/expressir/model/expressions/entity_constructor.rb +2 -2
- data/lib/expressir/model/expressions/group_reference.rb +1 -1
- data/lib/expressir/model/expressions/index_reference.rb +1 -1
- data/lib/expressir/model/expressions/interval.rb +1 -1
- data/lib/expressir/model/expressions/query_expression.rb +3 -1
- data/lib/expressir/model/expressions/simple_reference.rb +1 -1
- data/lib/expressir/model/expressions/unary_expression.rb +1 -1
- data/lib/expressir/model/function.rb +32 -38
- data/lib/expressir/model/identifier.rb +1 -2
- data/lib/expressir/model/informal_proposition.rb +3 -1
- data/lib/expressir/model/interface.rb +2 -2
- data/lib/expressir/model/literals/binary.rb +1 -1
- data/lib/expressir/model/literals/integer.rb +1 -1
- data/lib/expressir/model/literals/logical.rb +1 -1
- data/lib/expressir/model/literals/real.rb +1 -1
- data/lib/expressir/model/literals/string.rb +1 -1
- data/lib/expressir/model/model_element.rb +67 -0
- data/lib/expressir/model/parameter.rb +3 -1
- data/lib/expressir/model/procedure.rb +33 -39
- data/lib/expressir/model/renamed_ref.rb +1 -1
- data/lib/expressir/model/repository.rb +3 -3
- data/lib/expressir/model/rule.rb +34 -40
- data/lib/expressir/model/schema.rb +35 -48
- data/lib/expressir/model/scope.rb +0 -3
- data/lib/expressir/model/statements/alias.rb +4 -2
- data/lib/expressir/model/statements/assignment.rb +1 -1
- data/lib/expressir/model/statements/call.rb +2 -2
- data/lib/expressir/model/statements/case.rb +2 -2
- data/lib/expressir/model/statements/case_action.rb +2 -2
- data/lib/expressir/model/statements/compound.rb +2 -2
- data/lib/expressir/model/statements/escape.rb +1 -1
- data/lib/expressir/model/statements/if.rb +3 -3
- data/lib/expressir/model/statements/null.rb +1 -1
- data/lib/expressir/model/statements/repeat.rb +4 -2
- data/lib/expressir/model/statements/return.rb +1 -1
- data/lib/expressir/model/statements/skip.rb +1 -1
- data/lib/expressir/model/subtype_constraint.rb +3 -1
- data/lib/expressir/model/type.rb +7 -5
- data/lib/expressir/model/types/aggregate.rb +3 -1
- data/lib/expressir/model/types/array.rb +1 -1
- data/lib/expressir/model/types/bag.rb +1 -1
- data/lib/expressir/model/types/binary.rb +1 -1
- data/lib/expressir/model/types/boolean.rb +1 -1
- data/lib/expressir/model/types/enumeration.rb +3 -3
- data/lib/expressir/model/types/generic.rb +3 -1
- data/lib/expressir/model/types/generic_entity.rb +3 -1
- data/lib/expressir/model/types/integer.rb +1 -1
- data/lib/expressir/model/types/list.rb +1 -1
- data/lib/expressir/model/types/logical.rb +1 -1
- data/lib/expressir/model/types/number.rb +1 -1
- data/lib/expressir/model/types/real.rb +1 -1
- data/lib/expressir/model/types/select.rb +3 -3
- data/lib/expressir/model/types/set.rb +1 -1
- data/lib/expressir/model/types/string.rb +1 -1
- data/lib/expressir/model/unique.rb +4 -2
- data/lib/expressir/model/variable.rb +3 -1
- data/lib/expressir/model/where.rb +3 -1
- data/lib/expressir/version.rb +1 -1
- data/original/examples/syntax/remark_formatted.exp +0 -5
- data/original/examples/syntax/simple.exp +3 -0
- data/original/examples/syntax/syntax.exp +189 -181
- data/original/examples/syntax/syntax_formatted.exp +346 -792
- data/spec/expressir/express_exp/head_source_spec.rb +1 -4
- data/spec/expressir/express_exp/parse_remark_spec.rb +3 -3
- data/spec/expressir/express_exp/parse_syntax_spec.rb +1583 -1578
- data/spec/expressir/express_exp/source_spec.rb +1 -4
- data/spec/expressir/model/model_element_spec.rb +59 -0
- data/spec/expressir/model/{find_spec.rb → scope_spec.rb} +1 -1
- metadata +6 -3
@@ -1,13 +1,13 @@
|
|
1
1
|
module Expressir
|
2
2
|
module Model
|
3
3
|
module Statements
|
4
|
-
class Call
|
4
|
+
class Call < ModelElement
|
5
5
|
attr_accessor :ref
|
6
6
|
attr_accessor :parameters
|
7
7
|
|
8
8
|
def initialize(options = {})
|
9
9
|
@ref = options[:ref]
|
10
|
-
@parameters = options
|
10
|
+
@parameters = options.fetch(:parameters, [])
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
module Expressir
|
2
2
|
module Model
|
3
3
|
module Statements
|
4
|
-
class Case
|
4
|
+
class Case < ModelElement
|
5
5
|
attr_accessor :expression
|
6
6
|
attr_accessor :actions
|
7
7
|
attr_accessor :otherwise_statement
|
8
8
|
|
9
9
|
def initialize(options = {})
|
10
10
|
@expression = options[:expression]
|
11
|
-
@actions = options
|
11
|
+
@actions = options.fetch(:actions, [])
|
12
12
|
@otherwise_statement = options[:otherwise_statement]
|
13
13
|
end
|
14
14
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
module Expressir
|
2
2
|
module Model
|
3
3
|
module Statements
|
4
|
-
class CaseAction
|
4
|
+
class CaseAction < ModelElement
|
5
5
|
attr_accessor :labels
|
6
6
|
attr_accessor :statement
|
7
7
|
|
8
8
|
def initialize(options = {})
|
9
|
-
@labels = options
|
9
|
+
@labels = options.fetch(:labels, [])
|
10
10
|
@statement = options[:statement]
|
11
11
|
end
|
12
12
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module Expressir
|
2
2
|
module Model
|
3
3
|
module Statements
|
4
|
-
class Compound
|
4
|
+
class Compound < ModelElement
|
5
5
|
attr_accessor :statements
|
6
6
|
|
7
7
|
def initialize(options = {})
|
8
|
-
@statements = options
|
8
|
+
@statements = options.fetch(:statements, [])
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
@@ -1,15 +1,15 @@
|
|
1
1
|
module Expressir
|
2
2
|
module Model
|
3
3
|
module Statements
|
4
|
-
class If
|
4
|
+
class If < ModelElement
|
5
5
|
attr_accessor :expression
|
6
6
|
attr_accessor :statements
|
7
7
|
attr_accessor :else_statements
|
8
8
|
|
9
9
|
def initialize(options = {})
|
10
10
|
@expression = options[:expression]
|
11
|
-
@statements = options
|
12
|
-
@else_statements = options
|
11
|
+
@statements = options.fetch(:statements, [])
|
12
|
+
@else_statements = options.fetch(:else_statements, [])
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Expressir
|
2
2
|
module Model
|
3
3
|
module Statements
|
4
|
-
class Repeat
|
4
|
+
class Repeat < ModelElement
|
5
5
|
include Scope
|
6
6
|
include Identifier
|
7
7
|
|
@@ -14,13 +14,15 @@ module Expressir
|
|
14
14
|
|
15
15
|
def initialize(options = {})
|
16
16
|
@id = options[:id]
|
17
|
+
@remarks = options.fetch(:remarks, [])
|
18
|
+
@source = options[:source]
|
17
19
|
|
18
20
|
@bound1 = options[:bound1]
|
19
21
|
@bound2 = options[:bound2]
|
20
22
|
@increment = options[:increment]
|
21
23
|
@while_expression = options[:while_expression]
|
22
24
|
@until_expression = options[:until_expression]
|
23
|
-
@statements = options
|
25
|
+
@statements = options.fetch(:statements, [])
|
24
26
|
end
|
25
27
|
|
26
28
|
def children
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Expressir
|
2
2
|
module Model
|
3
|
-
class SubtypeConstraint
|
3
|
+
class SubtypeConstraint < ModelElement
|
4
4
|
include Scope
|
5
5
|
include Identifier
|
6
6
|
|
@@ -11,6 +11,8 @@ module Expressir
|
|
11
11
|
|
12
12
|
def initialize(options = {})
|
13
13
|
@id = options[:id]
|
14
|
+
@remarks = options.fetch(:remarks, [])
|
15
|
+
@source = options[:source]
|
14
16
|
|
15
17
|
@applies_to = options[:applies_to]
|
16
18
|
@abstract = options[:abstract]
|
data/lib/expressir/model/type.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Expressir
|
2
2
|
module Model
|
3
|
-
class Type
|
3
|
+
class Type < ModelElement
|
4
4
|
include Scope
|
5
5
|
include Identifier
|
6
6
|
|
@@ -10,10 +10,12 @@ module Expressir
|
|
10
10
|
|
11
11
|
def initialize(options = {})
|
12
12
|
@id = options[:id]
|
13
|
+
@remarks = options.fetch(:remarks, [])
|
14
|
+
@source = options[:source]
|
13
15
|
|
14
16
|
@type = options[:type]
|
15
|
-
@where = options
|
16
|
-
@informal_propositions = options
|
17
|
+
@where = options.fetch(:where, [])
|
18
|
+
@informal_propositions = options.fetch(:informal_propositions, [])
|
17
19
|
end
|
18
20
|
|
19
21
|
def children
|
@@ -23,8 +25,8 @@ module Expressir
|
|
23
25
|
@type.items
|
24
26
|
end
|
25
27
|
])
|
26
|
-
items.push(*@where)
|
27
|
-
items.push(*@informal_propositions)
|
28
|
+
items.push(*@where)
|
29
|
+
items.push(*@informal_propositions)
|
28
30
|
items
|
29
31
|
end
|
30
32
|
end
|
@@ -1,13 +1,15 @@
|
|
1
1
|
module Expressir
|
2
2
|
module Model
|
3
3
|
module Types
|
4
|
-
class Aggregate
|
4
|
+
class Aggregate < ModelElement
|
5
5
|
include Identifier
|
6
6
|
|
7
7
|
attr_accessor :base_type
|
8
8
|
|
9
9
|
def initialize(options = {})
|
10
10
|
@id = options[:id]
|
11
|
+
@remarks = options.fetch(:remarks, [])
|
12
|
+
@source = options[:source]
|
11
13
|
|
12
14
|
@base_type = options[:base_type]
|
13
15
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Expressir
|
2
2
|
module Model
|
3
3
|
module Types
|
4
|
-
class Enumeration
|
4
|
+
class Enumeration < ModelElement
|
5
5
|
attr_accessor :extensible
|
6
6
|
attr_accessor :items
|
7
7
|
attr_accessor :extension_type
|
@@ -9,9 +9,9 @@ module Expressir
|
|
9
9
|
|
10
10
|
def initialize(options = {})
|
11
11
|
@extensible = options[:extensible]
|
12
|
-
@items = options
|
12
|
+
@items = options.fetch(:items, [])
|
13
13
|
@extension_type = options[:extension_type]
|
14
|
-
@extension_items = options
|
14
|
+
@extension_items = options.fetch(:extension_items, [])
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -1,11 +1,13 @@
|
|
1
1
|
module Expressir
|
2
2
|
module Model
|
3
3
|
module Types
|
4
|
-
class Generic
|
4
|
+
class Generic < ModelElement
|
5
5
|
include Identifier
|
6
6
|
|
7
7
|
def initialize(options = {})
|
8
8
|
@id = options[:id]
|
9
|
+
@remarks = options.fetch(:remarks, [])
|
10
|
+
@source = options[:source]
|
9
11
|
end
|
10
12
|
end
|
11
13
|
end
|
@@ -1,11 +1,13 @@
|
|
1
1
|
module Expressir
|
2
2
|
module Model
|
3
3
|
module Types
|
4
|
-
class GenericEntity
|
4
|
+
class GenericEntity < ModelElement
|
5
5
|
include Identifier
|
6
6
|
|
7
7
|
def initialize(options = {})
|
8
8
|
@id = options[:id]
|
9
|
+
@remarks = options.fetch(:remarks, [])
|
10
|
+
@source = options[:source]
|
9
11
|
end
|
10
12
|
end
|
11
13
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Expressir
|
2
2
|
module Model
|
3
3
|
module Types
|
4
|
-
class Select
|
4
|
+
class Select < ModelElement
|
5
5
|
attr_accessor :extensible
|
6
6
|
attr_accessor :generic_entity
|
7
7
|
attr_accessor :items
|
@@ -11,9 +11,9 @@ module Expressir
|
|
11
11
|
def initialize(options = {})
|
12
12
|
@extensible = options[:extensible]
|
13
13
|
@generic_entity = options[:generic_entity]
|
14
|
-
@items = options
|
14
|
+
@items = options.fetch(:items, [])
|
15
15
|
@extension_type = options[:extension_type]
|
16
|
-
@extension_items = options
|
16
|
+
@extension_items = options.fetch(:extension_items, [])
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -1,14 +1,16 @@
|
|
1
1
|
module Expressir
|
2
2
|
module Model
|
3
|
-
class Unique
|
3
|
+
class Unique < ModelElement
|
4
4
|
include Identifier
|
5
5
|
|
6
6
|
attr_accessor :attributes
|
7
7
|
|
8
8
|
def initialize(options = {})
|
9
9
|
@id = options[:id]
|
10
|
+
@remarks = options.fetch(:remarks, [])
|
11
|
+
@source = options[:source]
|
10
12
|
|
11
|
-
@attributes = options
|
13
|
+
@attributes = options.fetch(:attributes, [])
|
12
14
|
end
|
13
15
|
end
|
14
16
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Expressir
|
2
2
|
module Model
|
3
|
-
class Variable
|
3
|
+
class Variable < ModelElement
|
4
4
|
include Identifier
|
5
5
|
|
6
6
|
attr_accessor :type
|
@@ -8,6 +8,8 @@ module Expressir
|
|
8
8
|
|
9
9
|
def initialize(options = {})
|
10
10
|
@id = options[:id]
|
11
|
+
@remarks = options.fetch(:remarks, [])
|
12
|
+
@source = options[:source]
|
11
13
|
|
12
14
|
@type = options[:type]
|
13
15
|
@expression = options[:expression]
|