expressir 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/lib/expressir/express_exp/formatter.rb +1444 -0
  4. data/lib/expressir/express_exp/visitor.rb +288 -280
  5. data/lib/expressir/model.rb +13 -42
  6. data/lib/expressir/model/{derived.rb → attribute.rb} +13 -4
  7. data/lib/expressir/model/constant.rb +2 -1
  8. data/lib/expressir/model/entity.rb +22 -17
  9. data/lib/expressir/model/enumeration_item.rb +2 -1
  10. data/lib/expressir/model/expressions/aggregate_initializer.rb +9 -9
  11. data/lib/expressir/model/expressions/aggregate_item.rb +15 -0
  12. data/lib/expressir/model/expressions/{attribute_qualifier.rb → attribute_reference.rb} +3 -1
  13. data/lib/expressir/model/expressions/binary_expression.rb +40 -0
  14. data/lib/expressir/model/expressions/{function_call.rb → call.rb} +3 -3
  15. data/lib/expressir/model/expressions/entity_constructor.rb +11 -11
  16. data/lib/expressir/model/expressions/{group_qualifier.rb → group_reference.rb} +3 -1
  17. data/lib/expressir/model/expressions/{index_qualifier.rb → index_reference.rb} +3 -1
  18. data/lib/expressir/model/expressions/interval.rb +17 -17
  19. data/lib/expressir/model/expressions/query_expression.rb +26 -0
  20. data/lib/expressir/model/expressions/simple_reference.rb +13 -0
  21. data/lib/expressir/model/expressions/{expression.rb → unary_expression.rb} +7 -3
  22. data/lib/expressir/model/function.rb +14 -6
  23. data/lib/expressir/model/{reference.rb → interface.rb} +6 -1
  24. data/lib/expressir/model/literals/logical.rb +4 -0
  25. data/lib/expressir/model/parameter.rb +4 -3
  26. data/lib/expressir/model/procedure.rb +14 -6
  27. data/lib/expressir/model/repository.rb +1 -1
  28. data/lib/expressir/model/rule.rb +16 -8
  29. data/lib/expressir/model/schema.rb +22 -6
  30. data/lib/expressir/model/statements/alias.rb +3 -2
  31. data/lib/expressir/model/statements/{procedure_call.rb → call.rb} +3 -3
  32. data/lib/expressir/model/statements/case.rb +2 -2
  33. data/lib/expressir/model/statements/case_action.rb +2 -2
  34. data/lib/expressir/model/statements/repeat.rb +3 -2
  35. data/lib/expressir/model/subtype_constraint.rb +6 -5
  36. data/lib/expressir/model/type.rb +3 -2
  37. data/lib/expressir/model/types/aggregate.rb +2 -1
  38. data/lib/expressir/model/types/generic.rb +2 -1
  39. data/lib/expressir/model/types/generic_entity.rb +2 -1
  40. data/lib/expressir/model/unique.rb +2 -1
  41. data/lib/expressir/model/{local.rb → variable.rb} +3 -2
  42. data/lib/expressir/model/where.rb +2 -1
  43. data/lib/expressir/version.rb +1 -1
  44. data/original/examples/syntax/remark.exp +126 -108
  45. data/original/examples/syntax/remark_formatted.exp +172 -0
  46. data/original/examples/syntax/syntax.exp +287 -277
  47. data/original/examples/syntax/syntax_formatted.exp +1176 -0
  48. data/spec/expressir/express_exp/format_remark_spec.rb +28 -0
  49. data/spec/expressir/express_exp/format_syntax_spec.rb +28 -0
  50. data/spec/expressir/express_exp/{remark_spec.rb → parse_remark_spec.rb} +80 -36
  51. data/spec/expressir/express_exp/parse_syntax_spec.rb +2998 -0
  52. metadata +22 -46
  53. data/lib/expressir/model/explicit.rb +0 -19
  54. data/lib/expressir/model/expressions/aggregate_element.rb +0 -15
  55. data/lib/expressir/model/expressions/qualified_ref.rb +0 -15
  56. data/lib/expressir/model/expressions/query.rb +0 -25
  57. data/lib/expressir/model/inverse.rb +0 -19
  58. data/lib/expressir/model/operators/addition.rb +0 -8
  59. data/lib/expressir/model/operators/and.rb +0 -8
  60. data/lib/expressir/model/operators/andor.rb +0 -8
  61. data/lib/expressir/model/operators/combine.rb +0 -8
  62. data/lib/expressir/model/operators/equal.rb +0 -8
  63. data/lib/expressir/model/operators/exponentiation.rb +0 -8
  64. data/lib/expressir/model/operators/greater_than.rb +0 -8
  65. data/lib/expressir/model/operators/greater_than_or_equal.rb +0 -8
  66. data/lib/expressir/model/operators/in.rb +0 -8
  67. data/lib/expressir/model/operators/instance_equal.rb +0 -8
  68. data/lib/expressir/model/operators/instance_not_equal.rb +0 -8
  69. data/lib/expressir/model/operators/integer_division.rb +0 -8
  70. data/lib/expressir/model/operators/less_than.rb +0 -8
  71. data/lib/expressir/model/operators/less_than_or_equal.rb +0 -8
  72. data/lib/expressir/model/operators/like.rb +0 -8
  73. data/lib/expressir/model/operators/modulo.rb +0 -8
  74. data/lib/expressir/model/operators/multiplication.rb +0 -8
  75. data/lib/expressir/model/operators/not.rb +0 -8
  76. data/lib/expressir/model/operators/not_equal.rb +0 -8
  77. data/lib/expressir/model/operators/oneof.rb +0 -8
  78. data/lib/expressir/model/operators/or.rb +0 -8
  79. data/lib/expressir/model/operators/real_division.rb +0 -8
  80. data/lib/expressir/model/operators/subtraction.rb +0 -8
  81. data/lib/expressir/model/operators/unary_minus.rb +0 -8
  82. data/lib/expressir/model/operators/unary_plus.rb +0 -8
  83. data/lib/expressir/model/operators/xor.rb +0 -8
  84. data/lib/expressir/model/ref.rb +0 -11
  85. data/lib/expressir/model/use.rb +0 -13
  86. data/spec/expressir/express_exp/syntax_spec.rb +0 -2992
@@ -3,11 +3,12 @@ module Expressir
3
3
  module Types
4
4
  class GenericEntity
5
5
  attr_accessor :label
6
+
7
+ attr_accessor :parent
6
8
  attr_accessor :remarks
7
9
 
8
10
  def initialize(options = {})
9
11
  @label = options[:label]
10
- @remarks = options[:remarks]
11
12
  end
12
13
  end
13
14
  end
@@ -3,12 +3,13 @@ module Expressir
3
3
  class Unique
4
4
  attr_accessor :id
5
5
  attr_accessor :attributes
6
+
7
+ attr_accessor :parent
6
8
  attr_accessor :remarks
7
9
 
8
10
  def initialize(options = {})
9
11
  @id = options[:id]
10
12
  @attributes = options[:attributes]
11
- @remarks = options[:remarks]
12
13
  end
13
14
  end
14
15
  end
@@ -1,16 +1,17 @@
1
1
  module Expressir
2
2
  module Model
3
- class Local
3
+ class Variable
4
4
  attr_accessor :id
5
5
  attr_accessor :type
6
6
  attr_accessor :expression
7
+
8
+ attr_accessor :parent
7
9
  attr_accessor :remarks
8
10
 
9
11
  def initialize(options = {})
10
12
  @id = options[:id]
11
13
  @type = options[:type]
12
14
  @expression = options[:expression]
13
- @remarks = options[:remarks]
14
15
  end
15
16
  end
16
17
  end
@@ -3,12 +3,13 @@ module Expressir
3
3
  class Where
4
4
  attr_accessor :id
5
5
  attr_accessor :expression
6
+
7
+ attr_accessor :parent
6
8
  attr_accessor :remarks
7
9
 
8
10
  def initialize(options = {})
9
11
  @id = options[:id]
10
12
  @expression = options[:expression]
11
- @remarks = options[:remarks]
12
13
  end
13
14
  end
14
15
  end
@@ -1,3 +1,3 @@
1
1
  module Expressir
2
- VERSION = "0.2.2".freeze
2
+ VERSION = "0.2.3".freeze
3
3
  end
@@ -1,127 +1,145 @@
1
- --"remarkSchema" universal scope - schema before
1
+ (*"remark_schema"
2
+ Any character within the EXPRESS character set may occur between the start and end of
3
+ an embedded remark including the newline character; therefore, embedded remarks can span
4
+ several physical lines.
5
+ *)
6
+ --"remark_schema" The tail remark is written at the end of a physical line.
2
7
 
3
- SCHEMA remarkSchema;
8
+ --"remark_schema" universal scope - schema before
4
9
 
5
- CONSTANT remarkConstant : STRING := 'xxx'; END_CONSTANT;
6
- TYPE remarkType = STRING; END_TYPE;
7
- ENTITY remarkEntity;
8
- remarkExplicit : STRING;
9
- DERIVE remarkDerived : STRING := 'xxx';
10
- INVERSE remarkInverse : remarkEntity FOR remarkExplicit;
11
- UNIQUE remarkUnique : remarkExplicit;
12
- WHERE remarkWhere : TRUE;
13
- --"remarkExplicit" entity scope - entity explicit
14
- --"remarkDerived" entity scope - entity derived
15
- --"remarkInverse" entity scope - entity inverse
16
- --"remarkUnique" entity scope - entity unique
17
- --"remarkWhere" entity scope - entity where
10
+ SCHEMA remark_schema;
11
+
12
+ CONSTANT remark_constant : STRING := 'xxx'; END_CONSTANT;
13
+ TYPE remark_type = ENUMERATION OF (remark_enumeration_item); END_TYPE;
14
+ ENTITY remark_entity;
15
+ remark_attribute : STRING;
16
+ DERIVE remark_derived_attribute : STRING := 'xxx';
17
+ INVERSE remark_inverse_attribute : remark_entity FOR remark_attribute;
18
+ UNIQUE remark_unique : remark_attribute;
19
+ WHERE remark_where : TRUE;
20
+ --"remark_attribute" entity scope - entity attribute
21
+ --"remark_derived_attribute" entity scope - entity derived attribute
22
+ --"remark_inverse_attribute" entity scope - entity inverse attribute
23
+ --"remark_unique" entity scope - entity unique
24
+ --"remark_where" entity scope - entity where
18
25
  END_ENTITY;
19
- SUBTYPE_CONSTRAINT remarkSubtypeConstraint FOR remarkEntity; END_SUBTYPE_CONSTRAINT;
20
- FUNCTION remarkFunction (remarkParameter : STRING) : BOOLEAN;
21
- TYPE remarkType = STRING; END_TYPE;
22
- CONSTANT remarkConstant : STRING := 'xxx'; END_CONSTANT;
23
- LOCAL remarkLocal : STRING; END_LOCAL;
24
- ALIAS remarkAlias FOR remarkLocal; ;
25
- --"remarkAlias" function alias scope - function alias
26
+ SUBTYPE_CONSTRAINT remark_subtype_constraint FOR remark_entity; END_SUBTYPE_CONSTRAINT;
27
+ FUNCTION remark_function(remark_parameter : STRING) : BOOLEAN;
28
+ TYPE remark_type = ENUMERATION OF (remark_enumeration_item); END_TYPE;
29
+ CONSTANT remark_constant : STRING := 'xxx'; END_CONSTANT;
30
+ LOCAL remark_variable : STRING; END_LOCAL;
31
+ ALIAS remark_alias FOR remark_variable; ;
32
+ --"remark_alias" function alias scope - function alias
26
33
  END_ALIAS;
27
- REPEAT remarkRepeat := 1 TO 9; ;
28
- --"remarkRepeat" function repeat scope - function repeat
34
+ REPEAT remark_repeat := 1 TO 9; ;
35
+ --"remark_repeat" function repeat scope - function repeat
29
36
  END_REPEAT;
30
- remarkLocal := QUERY(remarkQuery <* remarkLocal | TRUE
31
- --"remarkQuery" function query scope - function query
37
+ remark_variable := QUERY(remark_query <* remark_variable | TRUE
38
+ --"remark_query" function query scope - function query
32
39
  );
33
- --"remarkParameter" function scope - function parameter
34
- --"remarkType" function scope - function type
35
- --"remarkConstant" function scope - function constant
36
- --"remarkLocal" function scope - function local
40
+ --"remark_parameter" function scope - function parameter
41
+ --"remark_type" function scope - function type
42
+ --"remark_enumeration_item" function scope - function enumeration item
43
+ --"remark_constant" function scope - function constant
44
+ --"remark_variable" function scope - function variable
37
45
  END_FUNCTION;
38
- PROCEDURE remarkProcedure (remarkParameter : STRING);
39
- TYPE remarkType = STRING; END_TYPE;
40
- CONSTANT remarkConstant : STRING := 'xxx'; END_CONSTANT;
41
- LOCAL remarkLocal : STRING; END_LOCAL;
42
- ALIAS remarkAlias FOR remarkLocal; ;
43
- --"remarkAlias" procedure alias scope - procedure alias
46
+ PROCEDURE remark_procedure(remark_parameter : STRING);
47
+ TYPE remark_type = ENUMERATION OF (remark_enumeration_item); END_TYPE;
48
+ CONSTANT remark_constant : STRING := 'xxx'; END_CONSTANT;
49
+ LOCAL remark_variable : STRING; END_LOCAL;
50
+ ALIAS remark_alias FOR remark_variable; ;
51
+ --"remark_alias" procedure alias scope - procedure alias
44
52
  END_ALIAS;
45
- REPEAT remarkRepeat := 1 TO 9; ;
46
- --"remarkRepeat" procedure repeat scope - procedure repeat
53
+ REPEAT remark_repeat := 1 TO 9; ;
54
+ --"remark_repeat" procedure repeat scope - procedure repeat
47
55
  END_REPEAT;
48
- remarkLocal := QUERY(remarkQuery <* remarkLocal | TRUE
49
- --"remarkQuery" procedure query scope - procedure query
56
+ remark_variable := QUERY(remark_query <* remark_variable | TRUE
57
+ --"remark_query" procedure query scope - procedure query
50
58
  );
51
- --"remarkParameter" procedure scope - procedure parameter
52
- --"remarkType" procedure scope - procedure type
53
- --"remarkConstant" procedure scope - procedure constant
54
- --"remarkLocal" procedure scope - procedure local
59
+ --"remark_parameter" procedure scope - procedure parameter
60
+ --"remark_type" procedure scope - procedure type
61
+ --"remark_enumeration_item" procedure scope - procedure enumeration item
62
+ --"remark_constant" procedure scope - procedure constant
63
+ --"remark_variable" procedure scope - procedure variable
55
64
  END_PROCEDURE;
56
- RULE remarkRule FOR (remarkEntity);
57
- TYPE remarkType = STRING; END_TYPE;
58
- CONSTANT remarkConstant : STRING := 'xxx'; END_CONSTANT;
59
- LOCAL remarkLocal : STRING; END_LOCAL;
60
- ALIAS remarkAlias FOR remarkLocal; ;
61
- --"remarkAlias" rule alias scope - rule alias
65
+ RULE remark_rule FOR (remark_entity);
66
+ TYPE remark_type = ENUMERATION OF (remark_enumeration_item); END_TYPE;
67
+ CONSTANT remark_constant : STRING := 'xxx'; END_CONSTANT;
68
+ LOCAL remark_variable : STRING; END_LOCAL;
69
+ ALIAS remark_alias FOR remark_variable; ;
70
+ --"remark_alias" rule alias scope - rule alias
62
71
  END_ALIAS;
63
- REPEAT remarkRepeat := 1 TO 9; ;
64
- --"remarkRepeat" rule repeat scope - rule repeat
72
+ REPEAT remark_repeat := 1 TO 9; ;
73
+ --"remark_repeat" rule repeat scope - rule repeat
65
74
  END_REPEAT;
66
- remarkLocal := QUERY(remarkQuery <* remarkLocal | TRUE
67
- --"remarkQuery" rule query scope - rule query
75
+ remark_variable := QUERY(remark_query <* remark_variable | TRUE
76
+ --"remark_query" rule query scope - rule query
68
77
  );
69
- WHERE remarkWhere : TRUE;
70
- --"remarkType" rule scope - rule type
71
- --"remarkConstant" rule scope - rule constant
72
- --"remarkLocal" rule scope - rule local
73
- --"remarkWhere" rule scope - rule where
78
+ WHERE remark_where : TRUE;
79
+ --"remark_type" rule scope - rule type
80
+ --"remark_enumeration_item" rule scope - rule enumeration item
81
+ --"remark_constant" rule scope - rule constant
82
+ --"remark_variable" rule scope - rule variable
83
+ --"remark_where" rule scope - rule where
74
84
  END_RULE;
75
85
 
76
- --"remarkConstant" schema scope - constant
77
- --"remarkType" schema scope - type
78
- --"remarkEntity" schema scope - entity
79
- --"remarkEntity.remarkExplicit" schema scope - entity explicit
80
- --"remarkEntity.remarkDerived" schema scope - entity derived
81
- --"remarkEntity.remarkInverse" schema scope - entity inverse
82
- --"remarkEntity.remarkUnique" schema scope - entity unique
83
- --"remarkEntity.remarkWhere" schema scope - entity where
84
- --"remarkSubtypeConstraint" schema scope - subtype constraint
85
- --"remarkFunction" schema scope - function
86
- --"remarkFunction.remarkParameter" schema scope - function parameter
87
- --"remarkFunction.remarkType" schema scope - function type
88
- --"remarkFunction.remarkConstant" schema scope - function constant
89
- --"remarkFunction.remarkLocal" schema scope - function local
90
- --"remarkProcedure" schema scope - procedure
91
- --"remarkProcedure.remarkParameter" schema scope - procedure parameter
92
- --"remarkProcedure.remarkType" schema scope - procedure type
93
- --"remarkProcedure.remarkConstant" schema scope - procedure constant
94
- --"remarkProcedure.remarkLocal" schema scope - procedure local
95
- --"remarkRule" schema scope - rule
96
- --"remarkRule.remarkType" schema scope - rule type
97
- --"remarkRule.remarkConstant" schema scope - rule constant
98
- --"remarkRule.remarkLocal" schema scope - rule local
99
- --"remarkRule.remarkWhere" schema scope - rule where
86
+ --"remark_constant" schema scope - constant
87
+ --"remark_type" schema scope - type
88
+ --"remark_enumeration_item" schema scope - enumeration item
89
+ --"remark_entity" schema scope - entity
90
+ --"remark_entity.remark_attribute" schema scope - entity attribute
91
+ --"remark_entity.remark_derived_attribute" schema scope - entity derived attribute
92
+ --"remark_entity.remark_inverse_attribute" schema scope - entity inverse attribute
93
+ --"remark_entity.remark_unique" schema scope - entity unique
94
+ --"remark_entity.remark_where" schema scope - entity where
95
+ --"remark_subtype_constraint" schema scope - subtype constraint
96
+ --"remark_function" schema scope - function
97
+ --"remark_function.remark_parameter" schema scope - function parameter
98
+ --"remark_function.remark_type" schema scope - function type
99
+ --"remark_function.remark_enumeration_item" schema scope - function enumeration item
100
+ --"remark_function.remark_constant" schema scope - function constant
101
+ --"remark_function.remark_variable" schema scope - function variable
102
+ --"remark_procedure" schema scope - procedure
103
+ --"remark_procedure.remark_parameter" schema scope - procedure parameter
104
+ --"remark_procedure.remark_type" schema scope - procedure type
105
+ --"remark_procedure.remark_enumeration_item" schema scope - procedure enumeration item
106
+ --"remark_procedure.remark_constant" schema scope - procedure constant
107
+ --"remark_procedure.remark_variable" schema scope - procedure variable
108
+ --"remark_rule" schema scope - rule
109
+ --"remark_rule.remark_type" schema scope - rule type
110
+ --"remark_rule.remark_enumeration_item" schema scope - rule enumeration item
111
+ --"remark_rule.remark_constant" schema scope - rule constant
112
+ --"remark_rule.remark_variable" schema scope - rule variable
113
+ --"remark_rule.remark_where" schema scope - rule where
100
114
 
101
115
  END_SCHEMA;
102
116
 
103
- --"remarkSchema" universal scope - schema
104
- --"remarkSchema.remarkConstant" universal scope - constant
105
- --"remarkSchema.remarkType" universal scope - type
106
- --"remarkSchema.remarkEntity" universal scope - entity
107
- --"remarkSchema.remarkEntity.remarkExplicit" universal scope - entity explicit
108
- --"remarkSchema.remarkEntity.remarkDerived" universal scope - entity derived
109
- --"remarkSchema.remarkEntity.remarkInverse" universal scope - entity inverse
110
- --"remarkSchema.remarkEntity.remarkUnique" universal scope - entity unique
111
- --"remarkSchema.remarkEntity.remarkWhere" universal scope - entity where
112
- --"remarkSchema.remarkSubtypeConstraint" universal scope - subtype constraint
113
- --"remarkSchema.remarkFunction" universal scope - function
114
- --"remarkSchema.remarkFunction.remarkParameter" universal scope - function parameter
115
- --"remarkSchema.remarkFunction.remarkType" universal scope - function type
116
- --"remarkSchema.remarkFunction.remarkConstant" universal scope - function constant
117
- --"remarkSchema.remarkFunction.remarkLocal" universal scope - function local
118
- --"remarkSchema.remarkProcedure" universal scope - procedure
119
- --"remarkSchema.remarkProcedure.remarkParameter" universal scope - procedure parameter
120
- --"remarkSchema.remarkProcedure.remarkType" universal scope - procedure type
121
- --"remarkSchema.remarkProcedure.remarkConstant" universal scope - procedure constant
122
- --"remarkSchema.remarkProcedure.remarkLocal" universal scope - procedure local
123
- --"remarkSchema.remarkRule" universal scope - rule
124
- --"remarkSchema.remarkRule.remarkType" universal scope - rule type
125
- --"remarkSchema.remarkRule.remarkConstant" universal scope - rule constant
126
- --"remarkSchema.remarkRule.remarkLocal" universal scope - rule local
127
- --"remarkSchema.remarkRule.remarkWhere" universal scope - rule where
117
+ --"remark_schema" universal scope - schema
118
+ --"remark_schema.remark_constant" universal scope - constant
119
+ --"remark_schema.remark_type" universal scope - type
120
+ --"remark_schema.remark_enumeration_item" universal scope - enumeration item
121
+ --"remark_schema.remark_entity" universal scope - entity
122
+ --"remark_schema.remark_entity.remark_attribute" universal scope - entity attribute
123
+ --"remark_schema.remark_entity.remark_derived_attribute" universal scope - entity derived attribute
124
+ --"remark_schema.remark_entity.remark_inverse_attribute" universal scope - entity inverse attribute
125
+ --"remark_schema.remark_entity.remark_unique" universal scope - entity unique
126
+ --"remark_schema.remark_entity.remark_where" universal scope - entity where
127
+ --"remark_schema.remark_subtype_constraint" universal scope - subtype constraint
128
+ --"remark_schema.remark_function" universal scope - function
129
+ --"remark_schema.remark_function.remark_parameter" universal scope - function parameter
130
+ --"remark_schema.remark_function.remark_type" universal scope - function type
131
+ --"remark_schema.remark_function.remark_enumeration_item" universal scope - function enumeration item
132
+ --"remark_schema.remark_function.remark_constant" universal scope - function constant
133
+ --"remark_schema.remark_function.remark_variable" universal scope - function variable
134
+ --"remark_schema.remark_procedure" universal scope - procedure
135
+ --"remark_schema.remark_procedure.remark_parameter" universal scope - procedure parameter
136
+ --"remark_schema.remark_procedure.remark_type" universal scope - procedure type
137
+ --"remark_schema.remark_procedure.remark_enumeration_item" universal scope - procedure enumeration item
138
+ --"remark_schema.remark_procedure.remark_constant" universal scope - procedure constant
139
+ --"remark_schema.remark_procedure.remark_variable" universal scope - procedure variable
140
+ --"remark_schema.remark_rule" universal scope - rule
141
+ --"remark_schema.remark_rule.remark_type" universal scope - rule type
142
+ --"remark_schema.remark_rule.remark_enumeration_item" universal scope - rule enumeration item
143
+ --"remark_schema.remark_rule.remark_constant" universal scope - rule constant
144
+ --"remark_schema.remark_rule.remark_variable" universal scope - rule variable
145
+ --"remark_schema.remark_rule.remark_where" universal scope - rule where
@@ -0,0 +1,172 @@
1
+ SCHEMA remark_schema;
2
+ CONSTANT
3
+ remark_constant : STRING := 'xxx';
4
+ END_CONSTANT;
5
+ TYPE remark_type = ENUMERATION OF (remark_enumeration_item);
6
+ END_TYPE;
7
+
8
+ ENTITY remark_entity;
9
+ remark_attribute : STRING;
10
+ DERIVE remark_derived_attribute : STRING := 'xxx';
11
+ INVERSE remark_inverse_attribute : remark_entity FOR remark_attribute;
12
+ UNIQUE
13
+ remark_unique : remark_attribute;
14
+ WHERE
15
+ remark_where : TRUE;
16
+ --"remark_entity.remark_attribute" entity scope - entity attribute
17
+ --"remark_entity.remark_attribute" schema scope - entity attribute
18
+ --"remark_entity.remark_attribute" universal scope - entity attribute
19
+ --"remark_entity.remark_derived_attribute" entity scope - entity derived attribute
20
+ --"remark_entity.remark_derived_attribute" schema scope - entity derived attribute
21
+ --"remark_entity.remark_derived_attribute" universal scope - entity derived attribute
22
+ --"remark_entity.remark_inverse_attribute" entity scope - entity inverse attribute
23
+ --"remark_entity.remark_inverse_attribute" schema scope - entity inverse attribute
24
+ --"remark_entity.remark_inverse_attribute" universal scope - entity inverse attribute
25
+ --"remark_entity.remark_unique" entity scope - entity unique
26
+ --"remark_entity.remark_unique" schema scope - entity unique
27
+ --"remark_entity.remark_unique" universal scope - entity unique
28
+ --"remark_entity.remark_where" entity scope - entity where
29
+ --"remark_entity.remark_where" schema scope - entity where
30
+ --"remark_entity.remark_where" universal scope - entity where
31
+ END_ENTITY;
32
+
33
+ SUBTYPE_CONSTRAINT remark_subtype_constraint FOR remark_entity;
34
+ END_SUBTYPE_CONSTRAINT;
35
+
36
+ FUNCTION remark_function(remark_parameter : STRING) : BOOLEAN;
37
+ TYPE remark_type = ENUMERATION OF (remark_enumeration_item);
38
+ END_TYPE;
39
+ CONSTANT
40
+ remark_constant : STRING := 'xxx';
41
+ END_CONSTANT;
42
+ LOCAL
43
+ remark_variable : STRING;
44
+ END_LOCAL;
45
+ ALIAS remark_alias FOR remark_variable;
46
+ ;
47
+ --"remark_alias" function alias scope - function alias
48
+ END_ALIAS;
49
+ REPEAT remark_repeat := 1 TO 9;
50
+ ;
51
+ --"remark_repeat" function repeat scope - function repeat
52
+ END_REPEAT;
53
+ remark_variable := QUERY(remark_query <* remark_variable | TRUE
54
+ --"remark_query" function query scope - function query
55
+ );
56
+ --"remark_function.remark_parameter" function scope - function parameter
57
+ --"remark_function.remark_parameter" schema scope - function parameter
58
+ --"remark_function.remark_parameter" universal scope - function parameter
59
+ --"remark_function.remark_type" function scope - function type
60
+ --"remark_function.remark_type" schema scope - function type
61
+ --"remark_function.remark_type" universal scope - function type
62
+ --"remark_function.remark_enumeration_item" function scope - function enumeration item
63
+ --"remark_function.remark_enumeration_item" schema scope - function enumeration item
64
+ --"remark_function.remark_enumeration_item" universal scope - function enumeration item
65
+ --"remark_function.remark_constant" function scope - function constant
66
+ --"remark_function.remark_constant" schema scope - function constant
67
+ --"remark_function.remark_constant" universal scope - function constant
68
+ --"remark_function.remark_variable" function scope - function variable
69
+ --"remark_function.remark_variable" schema scope - function variable
70
+ --"remark_function.remark_variable" universal scope - function variable
71
+ END_FUNCTION;
72
+
73
+ PROCEDURE remark_procedure(remark_parameter : STRING);
74
+ TYPE remark_type = ENUMERATION OF (remark_enumeration_item);
75
+ END_TYPE;
76
+ CONSTANT
77
+ remark_constant : STRING := 'xxx';
78
+ END_CONSTANT;
79
+ LOCAL
80
+ remark_variable : STRING;
81
+ END_LOCAL;
82
+ ALIAS remark_alias FOR remark_variable;
83
+ ;
84
+ --"remark_alias" procedure alias scope - procedure alias
85
+ END_ALIAS;
86
+ REPEAT remark_repeat := 1 TO 9;
87
+ ;
88
+ --"remark_repeat" procedure repeat scope - procedure repeat
89
+ END_REPEAT;
90
+ remark_variable := QUERY(remark_query <* remark_variable | TRUE
91
+ --"remark_query" procedure query scope - procedure query
92
+ );
93
+ --"remark_procedure.remark_parameter" procedure scope - procedure parameter
94
+ --"remark_procedure.remark_parameter" schema scope - procedure parameter
95
+ --"remark_procedure.remark_parameter" universal scope - procedure parameter
96
+ --"remark_procedure.remark_type" procedure scope - procedure type
97
+ --"remark_procedure.remark_type" schema scope - procedure type
98
+ --"remark_procedure.remark_type" universal scope - procedure type
99
+ --"remark_procedure.remark_enumeration_item" procedure scope - procedure enumeration item
100
+ --"remark_procedure.remark_enumeration_item" schema scope - procedure enumeration item
101
+ --"remark_procedure.remark_enumeration_item" universal scope - procedure enumeration item
102
+ --"remark_procedure.remark_constant" procedure scope - procedure constant
103
+ --"remark_procedure.remark_constant" schema scope - procedure constant
104
+ --"remark_procedure.remark_constant" universal scope - procedure constant
105
+ --"remark_procedure.remark_variable" procedure scope - procedure variable
106
+ --"remark_procedure.remark_variable" schema scope - procedure variable
107
+ --"remark_procedure.remark_variable" universal scope - procedure variable
108
+ END_PROCEDURE;
109
+
110
+ RULE remark_rule FOR (remark_entity);
111
+ TYPE remark_type = ENUMERATION OF (remark_enumeration_item);
112
+ END_TYPE;
113
+ CONSTANT
114
+ remark_constant : STRING := 'xxx';
115
+ END_CONSTANT;
116
+ LOCAL
117
+ remark_variable : STRING;
118
+ END_LOCAL;
119
+ ALIAS remark_alias FOR remark_variable;
120
+ ;
121
+ --"remark_alias" rule alias scope - rule alias
122
+ END_ALIAS;
123
+ REPEAT remark_repeat := 1 TO 9;
124
+ ;
125
+ --"remark_repeat" rule repeat scope - rule repeat
126
+ END_REPEAT;
127
+ remark_variable := QUERY(remark_query <* remark_variable | TRUE
128
+ --"remark_query" rule query scope - rule query
129
+ );
130
+ WHERE
131
+ remark_where : TRUE;
132
+ --"remark_rule.remark_type" rule scope - rule type
133
+ --"remark_rule.remark_type" schema scope - rule type
134
+ --"remark_rule.remark_type" universal scope - rule type
135
+ --"remark_rule.remark_enumeration_item" rule scope - rule enumeration item
136
+ --"remark_rule.remark_enumeration_item" schema scope - rule enumeration item
137
+ --"remark_rule.remark_enumeration_item" universal scope - rule enumeration item
138
+ --"remark_rule.remark_constant" rule scope - rule constant
139
+ --"remark_rule.remark_constant" schema scope - rule constant
140
+ --"remark_rule.remark_constant" universal scope - rule constant
141
+ --"remark_rule.remark_variable" rule scope - rule variable
142
+ --"remark_rule.remark_variable" schema scope - rule variable
143
+ --"remark_rule.remark_variable" universal scope - rule variable
144
+ --"remark_rule.remark_where" rule scope - rule where
145
+ --"remark_rule.remark_where" schema scope - rule where
146
+ --"remark_rule.remark_where" universal scope - rule where
147
+ END_RULE;
148
+ --"remark_schema.remark_constant" schema scope - constant
149
+ --"remark_schema.remark_constant" universal scope - constant
150
+ --"remark_schema.remark_type" schema scope - type
151
+ --"remark_schema.remark_type" universal scope - type
152
+ --"remark_schema.remark_enumeration_item" schema scope - enumeration item
153
+ --"remark_schema.remark_enumeration_item" universal scope - enumeration item
154
+ --"remark_schema.remark_entity" schema scope - entity
155
+ --"remark_schema.remark_entity" universal scope - entity
156
+ --"remark_schema.remark_subtype_constraint" schema scope - subtype constraint
157
+ --"remark_schema.remark_subtype_constraint" universal scope - subtype constraint
158
+ --"remark_schema.remark_function" schema scope - function
159
+ --"remark_schema.remark_function" universal scope - function
160
+ --"remark_schema.remark_procedure" schema scope - procedure
161
+ --"remark_schema.remark_procedure" universal scope - procedure
162
+ --"remark_schema.remark_rule" schema scope - rule
163
+ --"remark_schema.remark_rule" universal scope - rule
164
+ END_SCHEMA;
165
+ (*"remark_schema"
166
+ Any character within the EXPRESS character set may occur between the start and end of
167
+ an embedded remark including the newline character; therefore, embedded remarks can span
168
+ several physical lines.
169
+ *)
170
+ --"remark_schema" The tail remark is written at the end of a physical line.
171
+ --"remark_schema" universal scope - schema before
172
+ --"remark_schema" universal scope - schema