expressir 0.2.9-x86-linux → 0.2.14-x86-linux

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/exe/format +20 -0
  3. data/expressir.gemspec +1 -0
  4. data/lib/expressir/express_exp/2.4/express_parser.so +0 -0
  5. data/lib/expressir/express_exp/2.5/express_parser.so +0 -0
  6. data/lib/expressir/express_exp/2.6/express_parser.so +0 -0
  7. data/lib/expressir/express_exp/2.7/express_parser.so +0 -0
  8. data/lib/expressir/express_exp/3.0/express_parser.so +0 -0
  9. data/lib/expressir/express_exp/formatter.rb +146 -105
  10. data/lib/expressir/express_exp/hyperlink_formatter.rb +25 -0
  11. data/lib/expressir/express_exp/parser.rb +2 -0
  12. data/lib/expressir/express_exp/schema_head_formatter.rb +14 -0
  13. data/lib/expressir/express_exp/visitor.rb +132 -82
  14. data/lib/expressir/model.rb +2 -1
  15. data/lib/expressir/model/attribute.rb +5 -1
  16. data/lib/expressir/model/constant.rb +5 -1
  17. data/lib/expressir/model/entity.rb +13 -22
  18. data/lib/expressir/model/enumeration_item.rb +5 -1
  19. data/lib/expressir/model/expressions/aggregate_initializer.rb +4 -2
  20. data/lib/expressir/model/expressions/aggregate_item.rb +3 -1
  21. data/lib/expressir/model/expressions/attribute_reference.rb +3 -1
  22. data/lib/expressir/model/expressions/binary_expression.rb +3 -1
  23. data/lib/expressir/model/expressions/call.rb +4 -2
  24. data/lib/expressir/model/expressions/entity_constructor.rb +4 -2
  25. data/lib/expressir/model/expressions/group_reference.rb +3 -1
  26. data/lib/expressir/model/expressions/index_reference.rb +3 -1
  27. data/lib/expressir/model/expressions/interval.rb +3 -1
  28. data/lib/expressir/model/expressions/query_expression.rb +5 -2
  29. data/lib/expressir/model/expressions/simple_reference.rb +3 -1
  30. data/lib/expressir/model/expressions/unary_expression.rb +3 -1
  31. data/lib/expressir/model/function.rb +28 -39
  32. data/lib/expressir/model/identifier.rb +1 -3
  33. data/lib/expressir/model/informal_proposition.rb +5 -1
  34. data/lib/expressir/model/interface.rb +4 -2
  35. data/lib/expressir/model/literals/binary.rb +3 -1
  36. data/lib/expressir/model/literals/integer.rb +3 -1
  37. data/lib/expressir/model/literals/logical.rb +3 -1
  38. data/lib/expressir/model/literals/real.rb +3 -1
  39. data/lib/expressir/model/literals/string.rb +3 -1
  40. data/lib/expressir/model/model_element.rb +140 -0
  41. data/lib/expressir/model/parameter.rb +5 -1
  42. data/lib/expressir/model/procedure.rb +29 -40
  43. data/lib/expressir/model/renamed_ref.rb +3 -1
  44. data/lib/expressir/model/repository.rb +5 -5
  45. data/lib/expressir/model/rule.rb +32 -43
  46. data/lib/expressir/model/schema.rb +48 -48
  47. data/lib/expressir/model/statements/alias.rb +6 -3
  48. data/lib/expressir/model/statements/assignment.rb +3 -1
  49. data/lib/expressir/model/statements/call.rb +4 -2
  50. data/lib/expressir/model/statements/case.rb +4 -2
  51. data/lib/expressir/model/statements/case_action.rb +4 -2
  52. data/lib/expressir/model/statements/compound.rb +4 -2
  53. data/lib/expressir/model/statements/escape.rb +1 -1
  54. data/lib/expressir/model/statements/if.rb +5 -3
  55. data/lib/expressir/model/statements/null.rb +1 -1
  56. data/lib/expressir/model/statements/repeat.rb +6 -3
  57. data/lib/expressir/model/statements/return.rb +3 -1
  58. data/lib/expressir/model/statements/skip.rb +1 -1
  59. data/lib/expressir/model/subtype_constraint.rb +5 -2
  60. data/lib/expressir/model/type.rb +10 -11
  61. data/lib/expressir/model/types/aggregate.rb +5 -1
  62. data/lib/expressir/model/types/array.rb +3 -1
  63. data/lib/expressir/model/types/bag.rb +3 -1
  64. data/lib/expressir/model/types/binary.rb +3 -1
  65. data/lib/expressir/model/types/boolean.rb +1 -1
  66. data/lib/expressir/model/types/enumeration.rb +5 -3
  67. data/lib/expressir/model/types/generic.rb +5 -1
  68. data/lib/expressir/model/types/generic_entity.rb +5 -1
  69. data/lib/expressir/model/types/integer.rb +1 -1
  70. data/lib/expressir/model/types/list.rb +3 -1
  71. data/lib/expressir/model/types/logical.rb +1 -1
  72. data/lib/expressir/model/types/number.rb +1 -1
  73. data/lib/expressir/model/types/real.rb +3 -1
  74. data/lib/expressir/model/types/select.rb +5 -3
  75. data/lib/expressir/model/types/set.rb +3 -1
  76. data/lib/expressir/model/types/string.rb +3 -1
  77. data/lib/expressir/model/unique.rb +6 -2
  78. data/lib/expressir/model/variable.rb +5 -1
  79. data/lib/expressir/model/where.rb +5 -1
  80. data/lib/expressir/version.rb +1 -1
  81. data/original/examples/syntax/hyperlink.exp +8 -0
  82. data/original/examples/syntax/hyperlink_formatted.exp +19 -0
  83. data/original/examples/syntax/remark_formatted.exp +0 -5
  84. data/original/examples/syntax/simple.exp +3 -0
  85. data/original/examples/syntax/syntax.exp +197 -189
  86. data/original/examples/syntax/syntax_formatted.exp +362 -800
  87. data/spec/expressir/express_exp/{format_remark_spec.rb → formatter/remark_spec.rb} +2 -2
  88. data/spec/expressir/express_exp/{format_syntax_spec.rb → formatter/syntax_spec.rb} +2 -2
  89. data/spec/expressir/express_exp/hyperlink_formatter_spec.rb +24 -0
  90. data/spec/expressir/express_exp/{head_source_spec.rb → parser/head_source_spec.rb} +2 -5
  91. data/spec/expressir/express_exp/{parse_multiple_spec.rb → parser/multiple_spec.rb} +6 -1
  92. data/spec/expressir/express_exp/{parse_remark_spec.rb → parser/remark_spec.rb} +5 -5
  93. data/spec/expressir/express_exp/{source_spec.rb → parser/source_spec.rb} +2 -5
  94. data/spec/expressir/express_exp/{parse_syntax_spec.rb → parser/syntax_spec.rb} +1619 -1582
  95. data/spec/expressir/express_exp/schema_head_formatter_spec.rb +36 -0
  96. data/spec/expressir/model/{find_spec.rb → model_element/find_spec.rb} +7 -2
  97. data/spec/expressir/model/model_element/hash_spec.rb +66 -0
  98. metadata +34 -12
  99. data/lib/expressir/model/scope.rb +0 -66
  100. data/spec/expressir/express_exp/ap233_spec.rb +0 -22
@@ -1,13 +1,15 @@
1
1
  module Expressir
2
2
  module Model
3
3
  module Types
4
- class Binary
4
+ class Binary < ModelElement
5
5
  attr_accessor :width
6
6
  attr_accessor :fixed
7
7
 
8
8
  def initialize(options = {})
9
9
  @width = options[:width]
10
10
  @fixed = options[:fixed]
11
+
12
+ super
11
13
  end
12
14
  end
13
15
  end
@@ -1,7 +1,7 @@
1
1
  module Expressir
2
2
  module Model
3
3
  module Types
4
- class Boolean
4
+ class Boolean < ModelElement
5
5
  end
6
6
  end
7
7
  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,11 @@ module Expressir
9
9
 
10
10
  def initialize(options = {})
11
11
  @extensible = options[:extensible]
12
- @items = options[:items]
12
+ @items = options.fetch(:items, [])
13
13
  @extension_type = options[:extension_type]
14
- @extension_items = options[:extension_items]
14
+ @extension_items = options.fetch(:extension_items, [])
15
+
16
+ super
15
17
  end
16
18
  end
17
19
  end
@@ -1,11 +1,15 @@
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]
11
+
12
+ super
9
13
  end
10
14
  end
11
15
  end
@@ -1,11 +1,15 @@
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]
11
+
12
+ super
9
13
  end
10
14
  end
11
15
  end
@@ -1,7 +1,7 @@
1
1
  module Expressir
2
2
  module Model
3
3
  module Types
4
- class Integer
4
+ class Integer < ModelElement
5
5
  end
6
6
  end
7
7
  end
@@ -1,7 +1,7 @@
1
1
  module Expressir
2
2
  module Model
3
3
  module Types
4
- class List
4
+ class List < ModelElement
5
5
  attr_accessor :bound1
6
6
  attr_accessor :bound2
7
7
  attr_accessor :unique
@@ -12,6 +12,8 @@ module Expressir
12
12
  @bound2 = options[:bound2]
13
13
  @unique = options[:unique]
14
14
  @base_type = options[:base_type]
15
+
16
+ super
15
17
  end
16
18
  end
17
19
  end
@@ -1,7 +1,7 @@
1
1
  module Expressir
2
2
  module Model
3
3
  module Types
4
- class Logical
4
+ class Logical < ModelElement
5
5
  end
6
6
  end
7
7
  end
@@ -1,7 +1,7 @@
1
1
  module Expressir
2
2
  module Model
3
3
  module Types
4
- class Number
4
+ class Number < ModelElement
5
5
  end
6
6
  end
7
7
  end
@@ -1,11 +1,13 @@
1
1
  module Expressir
2
2
  module Model
3
3
  module Types
4
- class Real
4
+ class Real < ModelElement
5
5
  attr_accessor :precision
6
6
 
7
7
  def initialize(options = {})
8
8
  @precision = options[:precision]
9
+
10
+ super
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,11 @@ module Expressir
11
11
  def initialize(options = {})
12
12
  @extensible = options[:extensible]
13
13
  @generic_entity = options[:generic_entity]
14
- @items = options[:items]
14
+ @items = options.fetch(:items, [])
15
15
  @extension_type = options[:extension_type]
16
- @extension_items = options[:extension_items]
16
+ @extension_items = options.fetch(:extension_items, [])
17
+
18
+ super
17
19
  end
18
20
  end
19
21
  end
@@ -1,7 +1,7 @@
1
1
  module Expressir
2
2
  module Model
3
3
  module Types
4
- class Set
4
+ class Set < ModelElement
5
5
  attr_accessor :bound1
6
6
  attr_accessor :bound2
7
7
  attr_accessor :base_type
@@ -10,6 +10,8 @@ module Expressir
10
10
  @bound1 = options[:bound1]
11
11
  @bound2 = options[:bound2]
12
12
  @base_type = options[:base_type]
13
+
14
+ super
13
15
  end
14
16
  end
15
17
  end
@@ -1,13 +1,15 @@
1
1
  module Expressir
2
2
  module Model
3
3
  module Types
4
- class String
4
+ class String < ModelElement
5
5
  attr_accessor :width
6
6
  attr_accessor :fixed
7
7
 
8
8
  def initialize(options = {})
9
9
  @width = options[:width]
10
10
  @fixed = options[:fixed]
11
+
12
+ super
11
13
  end
12
14
  end
13
15
  end
@@ -1,14 +1,18 @@
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[:attributes]
13
+ @attributes = options.fetch(:attributes, [])
14
+
15
+ super
12
16
  end
13
17
  end
14
18
  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,9 +8,13 @@ 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]
16
+
17
+ super
14
18
  end
15
19
  end
16
20
  end
@@ -1,14 +1,18 @@
1
1
  module Expressir
2
2
  module Model
3
- class Where
3
+ class Where < ModelElement
4
4
  include Identifier
5
5
 
6
6
  attr_accessor :expression
7
7
 
8
8
  def initialize(options = {})
9
9
  @id = options[:id]
10
+ @remarks = options.fetch(:remarks, [])
11
+ @source = options[:source]
10
12
 
11
13
  @expression = options[:expression]
14
+
15
+ super
12
16
  end
13
17
  end
14
18
  end
@@ -1,3 +1,3 @@
1
1
  module Expressir
2
- VERSION = "0.2.9".freeze
2
+ VERSION = "0.2.14".freeze
3
3
  end
@@ -0,0 +1,8 @@
1
+ SCHEMA hyperlink_schema;
2
+ ENTITY test; END_ENTITY;
3
+ ENTITY empty_entity; END_ENTITY;
4
+ ENTITY attribute_entity; test : BOOLEAN; END_ENTITY;
5
+ ENTITY subtype_empty_entity SUBTYPE OF (empty_entity); END_ENTITY;
6
+ ENTITY subtype_attribute_entity SUBTYPE OF (attribute_entity); SELF\attribute_entity.test : BOOLEAN; END_ENTITY;
7
+ ENTITY subtype_missing_entity SUBTYPE OF (missing_entity); END_ENTITY;
8
+ END_SCHEMA;
@@ -0,0 +1,19 @@
1
+ SCHEMA hyperlink_schema;
2
+ ENTITY test;
3
+ END_ENTITY;
4
+ ENTITY empty_entity;
5
+ END_ENTITY;
6
+ ENTITY attribute_entity;
7
+ test : BOOLEAN;
8
+ END_ENTITY;
9
+ ENTITY subtype_empty_entity
10
+ SUBTYPE OF ({{{<<express:hyperlink_schema.empty_entity,empty_entity>>}}});
11
+ END_ENTITY;
12
+ ENTITY subtype_attribute_entity
13
+ SUBTYPE OF ({{{<<express:hyperlink_schema.attribute_entity,attribute_entity>>}}});
14
+ SELF\{{{<<express:hyperlink_schema.attribute_entity,attribute_entity>>}}}.test : BOOLEAN;
15
+ END_ENTITY;
16
+ ENTITY subtype_missing_entity
17
+ SUBTYPE OF (missing_entity);
18
+ END_ENTITY;
19
+ END_SCHEMA;
@@ -6,7 +6,6 @@ TYPE remark_type = ENUMERATION OF (remark_enumeration_item);
6
6
  WHERE
7
7
  WR1 : TRUE;
8
8
  END_TYPE;
9
-
10
9
  ENTITY remark_entity;
11
10
  remark_attribute : STRING;
12
11
  DERIVE
@@ -18,10 +17,8 @@ ENTITY remark_entity;
18
17
  WHERE
19
18
  WR1 : TRUE;
20
19
  END_ENTITY;
21
-
22
20
  SUBTYPE_CONSTRAINT remark_subtype_constraint FOR remark_entity;
23
21
  END_SUBTYPE_CONSTRAINT;
24
-
25
22
  FUNCTION remark_function(remark_parameter : STRING) : BOOLEAN;
26
23
  TYPE remark_type = ENUMERATION OF (remark_enumeration_item);
27
24
  END_TYPE;
@@ -43,7 +40,6 @@ FUNCTION remark_function(remark_parameter : STRING) : BOOLEAN;
43
40
  --"remark_query" function query scope - function query
44
41
  );
45
42
  END_FUNCTION;
46
-
47
43
  PROCEDURE remark_procedure(remark_parameter : STRING);
48
44
  TYPE remark_type = ENUMERATION OF (remark_enumeration_item);
49
45
  END_TYPE;
@@ -65,7 +61,6 @@ PROCEDURE remark_procedure(remark_parameter : STRING);
65
61
  --"remark_query" procedure query scope - procedure query
66
62
  );
67
63
  END_PROCEDURE;
68
-
69
64
  RULE remark_rule FOR (remark_entity);
70
65
  TYPE remark_type = ENUMERATION OF (remark_enumeration_item);
71
66
  END_TYPE;
@@ -0,0 +1,3 @@
1
+ SCHEMA simple_schema;
2
+ ENTITY empty_entity; END_ENTITY;
3
+ END_SCHEMA;
@@ -31,23 +31,23 @@ ENTITY attribute_entity; test : BOOLEAN; END_ENTITY;
31
31
  ENTITY attribute_optional_entity; test : OPTIONAL BOOLEAN; END_ENTITY;
32
32
  ENTITY attribute_multiple_entity; test : BOOLEAN; test2 : BOOLEAN; END_ENTITY;
33
33
  ENTITY attribute_multiple_shorthand_entity; test, test2 : BOOLEAN; END_ENTITY;
34
- ENTITY attribute_redeclared_entity; SELF\attribute_entity.test : BOOLEAN; END_ENTITY;
35
- ENTITY attribute_redeclared_renamed_entity; SELF\attribute_entity.test RENAMED test2 : BOOLEAN; END_ENTITY;
34
+ ENTITY attribute_redeclared_entity SUBTYPE OF (attribute_entity); SELF\attribute_entity.test : BOOLEAN; END_ENTITY;
35
+ ENTITY attribute_redeclared_renamed_entity SUBTYPE OF (attribute_entity); SELF\attribute_entity.test RENAMED test2 : BOOLEAN; END_ENTITY;
36
36
  ENTITY derived_attribute_entity; DERIVE test : BOOLEAN := TRUE; END_ENTITY;
37
- ENTITY derived_attribute_redeclared_entity; DERIVE SELF\attribute_entity.test : BOOLEAN := TRUE; END_ENTITY;
38
- ENTITY derived_attribute_redeclared_renamed_entity; DERIVE SELF\attribute_entity.test RENAMED test2 : BOOLEAN := TRUE; END_ENTITY;
37
+ ENTITY derived_attribute_redeclared_entity SUBTYPE OF (attribute_entity); DERIVE SELF\attribute_entity.test : BOOLEAN := TRUE; END_ENTITY;
38
+ ENTITY derived_attribute_redeclared_renamed_entity SUBTYPE OF (attribute_entity); DERIVE SELF\attribute_entity.test RENAMED test2 : BOOLEAN := TRUE; END_ENTITY;
39
39
  ENTITY inverse_attribute_entity; INVERSE test : attribute_entity FOR test; END_ENTITY;
40
40
  ENTITY inverse_attribute_entity_entity; INVERSE test : attribute_entity FOR attribute_entity.test; END_ENTITY;
41
41
  ENTITY inverse_attribute_set_entity; INVERSE test : SET OF attribute_entity FOR test; END_ENTITY;
42
42
  ENTITY inverse_attribute_set_bound_entity; INVERSE test : SET [1:9] OF attribute_entity FOR test; END_ENTITY;
43
43
  ENTITY inverse_attribute_bag_entity; INVERSE test : BAG OF attribute_entity FOR test; END_ENTITY;
44
44
  ENTITY inverse_attribute_bag_bound_entity; INVERSE test : BAG [1:9] OF attribute_entity FOR test; END_ENTITY;
45
- ENTITY inverse_attribute_redeclared_entity; INVERSE SELF\attribute_entity.test : attribute_entity FOR test; END_ENTITY;
46
- ENTITY inverse_attribute_redeclared_renamed_entity; INVERSE SELF\attribute_entity.test RENAMED test2 : attribute_entity FOR test; END_ENTITY;
45
+ ENTITY inverse_attribute_redeclared_entity SUBTYPE OF (attribute_entity); INVERSE SELF\attribute_entity.test : attribute_entity FOR test; END_ENTITY;
46
+ ENTITY inverse_attribute_redeclared_renamed_entity SUBTYPE OF (attribute_entity); INVERSE SELF\attribute_entity.test RENAMED test2 : attribute_entity FOR test; END_ENTITY;
47
47
  ENTITY unique_entity; test : BOOLEAN; UNIQUE test; END_ENTITY;
48
48
  ENTITY unique_label_entity; test : BOOLEAN; UNIQUE UR1 : test; END_ENTITY;
49
- ENTITY unique_qualified_entity; UNIQUE SELF\attribute_entity.test; END_ENTITY;
50
- ENTITY unique_label_qualified_entity; UNIQUE UR1 : SELF\attribute_entity.test; END_ENTITY;
49
+ ENTITY unique_redeclared_entity SUBTYPE OF (attribute_entity); UNIQUE SELF\attribute_entity.test; END_ENTITY;
50
+ ENTITY unique_label_redeclared_entity SUBTYPE OF (attribute_entity); UNIQUE UR1 : SELF\attribute_entity.test; END_ENTITY;
51
51
  ENTITY where_entity; WHERE TRUE; END_ENTITY;
52
52
  ENTITY where_label_entity; WHERE WR1 : TRUE; END_ENTITY;
53
53
 
@@ -119,197 +119,205 @@ RULE multiple_shorthand_variable_expression_rule FOR (empty_entity); LOCAL test,
119
119
  RULE statement_rule FOR (empty_entity); ; WHERE TRUE; END_RULE;
120
120
  RULE where_label_rule FOR (empty_entity); WHERE WR1 : TRUE; END_RULE;
121
121
 
122
- -- simple types
123
- TYPE binary_type = BINARY; END_TYPE;
124
- TYPE binary_width_type = BINARY (3); END_TYPE;
125
- TYPE binary_width_fixed_type = BINARY (3) FIXED; END_TYPE;
126
- TYPE boolean_type = BOOLEAN; END_TYPE;
127
- TYPE integer_type = INTEGER; END_TYPE;
128
- TYPE logical_type = LOGICAL; END_TYPE;
129
- TYPE number_type = NUMBER; END_TYPE;
130
- TYPE real_type = REAL; END_TYPE;
131
- TYPE real_precision_type = REAL (3); END_TYPE;
132
- TYPE string_type = STRING; END_TYPE;
133
- TYPE string_width_type = STRING (3); END_TYPE;
134
- TYPE string_width_fixed_type = STRING (3) FIXED; END_TYPE;
122
+ PROCEDURE statements;
123
+ -- statements
124
+ PROCEDURE alias_simple_reference_statement; ALIAS test FOR test; ; END_ALIAS; END_PROCEDURE;
125
+ PROCEDURE alias_group_reference_statement; ALIAS test FOR test\test2; ; END_ALIAS; END_PROCEDURE;
126
+ PROCEDURE alias_index_reference_statement; ALIAS test FOR test[1]; ; END_ALIAS; END_PROCEDURE;
127
+ PROCEDURE alias_index2_reference_statement; ALIAS test FOR test[1:9]; ; END_ALIAS; END_PROCEDURE;
128
+ PROCEDURE alias_attribute_reference_statement; ALIAS test FOR test.test2; ; END_ALIAS; END_PROCEDURE;
129
+ PROCEDURE assignment_simple_reference_statement; test := TRUE; END_PROCEDURE;
130
+ PROCEDURE assignment_group_reference_statement; test\test2 := TRUE; END_PROCEDURE;
131
+ PROCEDURE assignment_index_reference_statement; test[1] := TRUE; END_PROCEDURE;
132
+ PROCEDURE assignment_index2_reference_statement; test[1:9] := TRUE; END_PROCEDURE;
133
+ PROCEDURE assignment_attribute_reference_statement; test.test2 := TRUE; END_PROCEDURE;
134
+ PROCEDURE case_statement; CASE test OF TRUE : ; END_CASE; END_PROCEDURE;
135
+ PROCEDURE case_multiple_statement; CASE test OF TRUE : ; TRUE : ; END_CASE; END_PROCEDURE;
136
+ PROCEDURE case_multiple_shorthand_statement; CASE test OF TRUE, TRUE : ; END_CASE; END_PROCEDURE;
137
+ PROCEDURE case_otherwise_statement; CASE test OF TRUE : ; OTHERWISE : ; END_CASE; END_PROCEDURE;
138
+ PROCEDURE compound_statement; BEGIN ; END; END_PROCEDURE;
139
+ PROCEDURE escape_statement; ESCAPE; END_PROCEDURE;
140
+ PROCEDURE if_statement; IF TRUE THEN ; END_IF; END_PROCEDURE;
141
+ PROCEDURE if2_statement; IF TRUE THEN ; ; END_IF; END_PROCEDURE;
142
+ PROCEDURE if_else_statement; IF TRUE THEN ; ELSE ; END_IF; END_PROCEDURE;
143
+ PROCEDURE if2_else_statement; IF TRUE THEN ; ; ELSE ; END_IF; END_PROCEDURE;
144
+ PROCEDURE if_else2_statement; IF TRUE THEN ; ELSE ; ; END_IF; END_PROCEDURE;
145
+ PROCEDURE if2_else2_statement; IF TRUE THEN ; ; ELSE ; ; END_IF; END_PROCEDURE;
146
+ PROCEDURE null_statement; ; END_PROCEDURE;
147
+ PROCEDURE call_statement; empty_procedure; END_PROCEDURE;
148
+ PROCEDURE call_parameter_statement; empty_procedure(TRUE); END_PROCEDURE;
149
+ PROCEDURE call_parameter2_statement; empty_procedure(TRUE, TRUE); END_PROCEDURE;
150
+ PROCEDURE call_insert_statement; INSERT(TRUE); END_PROCEDURE;
151
+ PROCEDURE call_remove_statement; REMOVE(TRUE); END_PROCEDURE;
152
+ PROCEDURE repeat_statement; REPEAT; ; END_REPEAT; END_PROCEDURE;
153
+ PROCEDURE repeat_variable_statement; REPEAT test := 1 TO 9; ; END_REPEAT; END_PROCEDURE;
154
+ PROCEDURE repeat_variable_increment_statement; REPEAT test := 1 TO 9 BY 2; ; END_REPEAT; END_PROCEDURE;
155
+ PROCEDURE repeat_while_statement; REPEAT WHILE TRUE; ; END_REPEAT; END_PROCEDURE;
156
+ PROCEDURE repeat_until_statement; REPEAT UNTIL TRUE; ; END_REPEAT; END_PROCEDURE;
157
+ PROCEDURE return_statement; RETURN; END_PROCEDURE;
158
+ PROCEDURE return_expression_statement; RETURN (TRUE); END_PROCEDURE;
159
+ PROCEDURE skip_statement; SKIP; END_PROCEDURE;
160
+ END_PROCEDURE;
135
161
 
136
- -- aggregation types
137
- TYPE array_type = ARRAY [1:9] OF STRING; END_TYPE;
138
- TYPE array_optional_type = ARRAY [1:9] OF OPTIONAL STRING; END_TYPE;
139
- TYPE array_unique_type = ARRAY [1:9] OF UNIQUE STRING; END_TYPE;
140
- TYPE array_optional_unique_type = ARRAY [1:9] OF OPTIONAL UNIQUE STRING; END_TYPE;
141
- TYPE bag_type = BAG OF STRING; END_TYPE;
142
- TYPE bag_bound_type = BAG [1:9] OF STRING; END_TYPE;
143
- TYPE list_type = LIST OF STRING; END_TYPE;
144
- TYPE list_bound_type = LIST [1:9] OF STRING; END_TYPE;
145
- TYPE list_unique_type = LIST OF UNIQUE STRING; END_TYPE;
146
- TYPE list_bound_unique_type = LIST [1:9] OF UNIQUE STRING; END_TYPE;
147
- TYPE set_type = SET OF STRING; END_TYPE;
148
- TYPE set_bound_type = SET [1:9] OF STRING; END_TYPE;
162
+ PROCEDURE types;
163
+ -- simple types
164
+ TYPE binary_type = BINARY; END_TYPE;
165
+ TYPE binary_width_type = BINARY (3); END_TYPE;
166
+ TYPE binary_width_fixed_type = BINARY (3) FIXED; END_TYPE;
167
+ TYPE boolean_type = BOOLEAN; END_TYPE;
168
+ TYPE integer_type = INTEGER; END_TYPE;
169
+ TYPE logical_type = LOGICAL; END_TYPE;
170
+ TYPE number_type = NUMBER; END_TYPE;
171
+ TYPE real_type = REAL; END_TYPE;
172
+ TYPE real_precision_type = REAL (3); END_TYPE;
173
+ TYPE string_type = STRING; END_TYPE;
174
+ TYPE string_width_type = STRING (3); END_TYPE;
175
+ TYPE string_width_fixed_type = STRING (3) FIXED; END_TYPE;
149
176
 
150
- -- constructed types
151
- TYPE select_type = SELECT; END_TYPE;
152
- TYPE select_extensible_type = EXTENSIBLE SELECT; END_TYPE;
153
- TYPE select_extensible_generic_entity_type = EXTENSIBLE GENERIC_ENTITY SELECT; END_TYPE;
154
- TYPE select_list_type = SELECT (empty_type); END_TYPE;
155
- TYPE select_extension_type_ref_type = SELECT BASED_ON select_type; END_TYPE;
156
- TYPE select_extension_type_ref_list_type = SELECT BASED_ON select_type WITH (empty_type); END_TYPE;
157
- TYPE enumeration_type = ENUMERATION; END_TYPE;
158
- TYPE enumeration_extensible_type = EXTENSIBLE ENUMERATION; END_TYPE;
159
- TYPE enumeration_list_type = ENUMERATION OF (test); END_TYPE;
160
- TYPE enumeration_extension_type_ref_type = ENUMERATION BASED_ON enumeration_type; END_TYPE;
161
- TYPE enumeration_extension_type_ref_list_type = ENUMERATION BASED_ON enumeration_type WITH (test); END_TYPE;
177
+ -- aggregation types
178
+ TYPE array_type = ARRAY [1:9] OF STRING; END_TYPE;
179
+ TYPE array_optional_type = ARRAY [1:9] OF OPTIONAL STRING; END_TYPE;
180
+ TYPE array_unique_type = ARRAY [1:9] OF UNIQUE STRING; END_TYPE;
181
+ TYPE array_optional_unique_type = ARRAY [1:9] OF OPTIONAL UNIQUE STRING; END_TYPE;
182
+ TYPE bag_type = BAG OF STRING; END_TYPE;
183
+ TYPE bag_bound_type = BAG [1:9] OF STRING; END_TYPE;
184
+ TYPE list_type = LIST OF STRING; END_TYPE;
185
+ TYPE list_bound_type = LIST [1:9] OF STRING; END_TYPE;
186
+ TYPE list_unique_type = LIST OF UNIQUE STRING; END_TYPE;
187
+ TYPE list_bound_unique_type = LIST [1:9] OF UNIQUE STRING; END_TYPE;
188
+ TYPE set_type = SET OF STRING; END_TYPE;
189
+ TYPE set_bound_type = SET [1:9] OF STRING; END_TYPE;
162
190
 
163
- -- statements
164
- FUNCTION alias_simple_reference_statement : BOOLEAN; ALIAS test FOR test; ; END_ALIAS; END_FUNCTION;
165
- FUNCTION alias_attribute_reference_statement : BOOLEAN; ALIAS test FOR test.test; ; END_ALIAS; END_FUNCTION;
166
- FUNCTION alias_group_reference_statement : BOOLEAN; ALIAS test FOR test\test; ; END_ALIAS; END_FUNCTION;
167
- FUNCTION alias_index_reference_statement : BOOLEAN; ALIAS test FOR test[1]; ; END_ALIAS; END_FUNCTION;
168
- FUNCTION alias_index2_reference_statement : BOOLEAN; ALIAS test FOR test[1:9]; ; END_ALIAS; END_FUNCTION;
169
- FUNCTION assignment_simple_reference_statement : BOOLEAN; test := TRUE; END_FUNCTION;
170
- FUNCTION assignment_attribute_reference_statement : BOOLEAN; test.test := TRUE; END_FUNCTION;
171
- FUNCTION assignment_group_reference_statement : BOOLEAN; test\test := TRUE; END_FUNCTION;
172
- FUNCTION assignment_index_reference_statement : BOOLEAN; test[1] := TRUE; END_FUNCTION;
173
- FUNCTION assignment_index2_reference_statement : BOOLEAN; test[1:9] := TRUE; END_FUNCTION;
174
- FUNCTION case_statement : BOOLEAN; CASE test OF TRUE : ; END_CASE; END_FUNCTION;
175
- FUNCTION case_multiple_statement : BOOLEAN; CASE test OF TRUE : ; TRUE : ; END_CASE; END_FUNCTION;
176
- FUNCTION case_multiple_shorthand_statement : BOOLEAN; CASE test OF TRUE, TRUE : ; END_CASE; END_FUNCTION;
177
- FUNCTION case_otherwise_statement : BOOLEAN; CASE test OF TRUE : ; OTHERWISE : ; END_CASE; END_FUNCTION;
178
- FUNCTION compound_statement : BOOLEAN; BEGIN ; END; END_FUNCTION;
179
- FUNCTION escape_statement : BOOLEAN; ESCAPE; END_FUNCTION;
180
- FUNCTION if_statement : BOOLEAN; IF TRUE THEN ; END_IF; END_FUNCTION;
181
- FUNCTION if2_statement : BOOLEAN; IF TRUE THEN ; ; END_IF; END_FUNCTION;
182
- FUNCTION if_else_statement : BOOLEAN; IF TRUE THEN ; ELSE ; END_IF; END_FUNCTION;
183
- FUNCTION if2_else_statement : BOOLEAN; IF TRUE THEN ; ; ELSE ; END_IF; END_FUNCTION;
184
- FUNCTION if_else2_statement : BOOLEAN; IF TRUE THEN ; ELSE ; ; END_IF; END_FUNCTION;
185
- FUNCTION if2_else2_statement : BOOLEAN; IF TRUE THEN ; ; ELSE ; ; END_IF; END_FUNCTION;
186
- FUNCTION null_statement : BOOLEAN; ; END_FUNCTION;
187
- FUNCTION call_statement : BOOLEAN; empty_procedure; END_FUNCTION;
188
- FUNCTION call_parameter_statement : BOOLEAN; empty_procedure(TRUE); END_FUNCTION;
189
- FUNCTION call_parameter2_statement : BOOLEAN; empty_procedure(TRUE, TRUE); END_FUNCTION;
190
- FUNCTION call_insert_statement : BOOLEAN; INSERT(TRUE); END_FUNCTION;
191
- FUNCTION call_remove_statement : BOOLEAN; REMOVE(TRUE); END_FUNCTION;
192
- FUNCTION repeat_statement : BOOLEAN; REPEAT; ; END_REPEAT; END_FUNCTION;
193
- FUNCTION repeat_variable_statement : BOOLEAN; REPEAT test := 1 TO 9; ; END_REPEAT; END_FUNCTION;
194
- FUNCTION repeat_variable_increment_statement : BOOLEAN; REPEAT test := 1 TO 9 BY 2; ; END_REPEAT; END_FUNCTION;
195
- FUNCTION repeat_while_statement : BOOLEAN; REPEAT WHILE TRUE; ; END_REPEAT; END_FUNCTION;
196
- FUNCTION repeat_until_statement : BOOLEAN; REPEAT UNTIL TRUE; ; END_REPEAT; END_FUNCTION;
197
- FUNCTION return_statement : BOOLEAN; RETURN; END_FUNCTION;
198
- FUNCTION return_expression_statement : BOOLEAN; RETURN (TRUE); END_FUNCTION;
199
- FUNCTION skip_statement : BOOLEAN; SKIP; END_FUNCTION;
191
+ -- constructed types
192
+ TYPE select_type = SELECT; END_TYPE;
193
+ TYPE select_extensible_type = EXTENSIBLE SELECT; END_TYPE;
194
+ TYPE select_extensible_generic_entity_type = EXTENSIBLE GENERIC_ENTITY SELECT; END_TYPE;
195
+ TYPE select_list_type = SELECT (empty_type); END_TYPE;
196
+ TYPE select_extension_type_ref_type = SELECT BASED_ON select_type; END_TYPE;
197
+ TYPE select_extension_type_ref_list_type = SELECT BASED_ON select_type WITH (empty_type); END_TYPE;
198
+ TYPE enumeration_type = ENUMERATION; END_TYPE;
199
+ TYPE enumeration_extensible_type = EXTENSIBLE ENUMERATION; END_TYPE;
200
+ TYPE enumeration_list_type = ENUMERATION OF (test); END_TYPE;
201
+ TYPE enumeration_extension_type_ref_type = ENUMERATION BASED_ON enumeration_type; END_TYPE;
202
+ TYPE enumeration_extension_type_ref_list_type = ENUMERATION BASED_ON enumeration_type WITH (test); END_TYPE;
203
+ END_PROCEDURE;
200
204
 
201
- -- literal expressions
202
- FUNCTION binary_expression : BOOLEAN; RETURN (%011110000111100001111000); END_FUNCTION;
203
- FUNCTION integer_expression : BOOLEAN; RETURN (999); END_FUNCTION;
204
- FUNCTION true_logical_expression : BOOLEAN; RETURN (TRUE); END_FUNCTION;
205
- FUNCTION false_logical_expression : BOOLEAN; RETURN (FALSE); END_FUNCTION;
206
- FUNCTION unknown_logical_expression : BOOLEAN; RETURN (UNKNOWN); END_FUNCTION;
207
- FUNCTION real_expression : BOOLEAN; RETURN (999.999); END_FUNCTION;
208
- FUNCTION simple_string_expression : BOOLEAN; RETURN ('xxx'); END_FUNCTION;
209
- FUNCTION utf8_simple_string_expression : BOOLEAN; RETURN ('UTF8 test: Příliš žluťoučký kůň úpěl ďábelské ódy.'); END_FUNCTION;
210
- FUNCTION encoded_string_expression : BOOLEAN; RETURN ("000000780000007800000078"); END_FUNCTION;
205
+ PROCEDURE expressions;
206
+ LOCAL
207
+ -- literal expressions
208
+ binary_expression : BOOLEAN := %011110000111100001111000;
209
+ integer_expression : BOOLEAN := 999;
210
+ true_logical_expression : BOOLEAN := TRUE;
211
+ false_logical_expression : BOOLEAN := FALSE;
212
+ unknown_logical_expression : BOOLEAN := UNKNOWN;
213
+ real_expression : BOOLEAN := 999.999;
214
+ simple_string_expression : BOOLEAN := 'xxx';
215
+ utf8_simple_string_expression : BOOLEAN := 'UTF8 test: Příliš žluťoučký kůň úpěl ďábelské ódy.';
216
+ encoded_string_expression : BOOLEAN := "000000780000007800000078";
211
217
 
212
- -- constant expressions
213
- FUNCTION const_e_expression : BOOLEAN; RETURN (CONST_E); END_FUNCTION;
214
- FUNCTION indeterminate_expression : BOOLEAN; RETURN (?); END_FUNCTION;
215
- FUNCTION pi_expression : BOOLEAN; RETURN (PI); END_FUNCTION;
216
- FUNCTION self_expression : BOOLEAN; RETURN (SELF); END_FUNCTION;
218
+ -- constant expressions
219
+ const_e_expression : BOOLEAN := CONST_E;
220
+ indeterminate_expression : BOOLEAN := ?;
221
+ pi_expression : BOOLEAN := PI;
222
+ self_expression : BOOLEAN := SELF;
217
223
 
218
- -- function expressions
219
- FUNCTION abs_expression : BOOLEAN; RETURN (ABS(TRUE)); END_FUNCTION;
220
- FUNCTION acos_expression : BOOLEAN; RETURN (ACOS(TRUE)); END_FUNCTION;
221
- FUNCTION asin_expression : BOOLEAN; RETURN (ASIN(TRUE)); END_FUNCTION;
222
- FUNCTION atan_expression : BOOLEAN; RETURN (ATAN(TRUE)); END_FUNCTION;
223
- FUNCTION blength_expression : BOOLEAN; RETURN (BLENGTH(TRUE)); END_FUNCTION;
224
- FUNCTION cos_expression : BOOLEAN; RETURN (COS(TRUE)); END_FUNCTION;
225
- FUNCTION exists_expression : BOOLEAN; RETURN (EXISTS(TRUE)); END_FUNCTION;
226
- FUNCTION exp_expression : BOOLEAN; RETURN (EXP(TRUE)); END_FUNCTION;
227
- FUNCTION format_expression : BOOLEAN; RETURN (FORMAT(TRUE)); END_FUNCTION;
228
- FUNCTION hibound_expression : BOOLEAN; RETURN (HIBOUND(TRUE)); END_FUNCTION;
229
- FUNCTION hiindex_expression : BOOLEAN; RETURN (HIINDEX(TRUE)); END_FUNCTION;
230
- FUNCTION length_expression : BOOLEAN; RETURN (LENGTH(TRUE)); END_FUNCTION;
231
- FUNCTION lobound_expression : BOOLEAN; RETURN (LOBOUND(TRUE)); END_FUNCTION;
232
- FUNCTION loindex_expression : BOOLEAN; RETURN (LOINDEX(TRUE)); END_FUNCTION;
233
- FUNCTION log_expression : BOOLEAN; RETURN (LOG(TRUE)); END_FUNCTION;
234
- FUNCTION log2_expression : BOOLEAN; RETURN (LOG2(TRUE)); END_FUNCTION;
235
- FUNCTION log10_expression : BOOLEAN; RETURN (LOG10(TRUE)); END_FUNCTION;
236
- FUNCTION nvl_expression : BOOLEAN; RETURN (NVL(TRUE)); END_FUNCTION;
237
- FUNCTION odd_expression : BOOLEAN; RETURN (ODD(TRUE)); END_FUNCTION;
238
- FUNCTION rolesof_expression : BOOLEAN; RETURN (ROLESOF(TRUE)); END_FUNCTION;
239
- FUNCTION sin_expression : BOOLEAN; RETURN (SIN(TRUE)); END_FUNCTION;
240
- FUNCTION sizeof_expression : BOOLEAN; RETURN (SIZEOF(TRUE)); END_FUNCTION;
241
- FUNCTION sqrt_expression : BOOLEAN; RETURN (SQRT(TRUE)); END_FUNCTION;
242
- FUNCTION tan_expression : BOOLEAN; RETURN (TAN(TRUE)); END_FUNCTION;
243
- FUNCTION typeof_expression : BOOLEAN; RETURN (TYPEOF(TRUE)); END_FUNCTION;
244
- FUNCTION usedin_expression : BOOLEAN; RETURN (USEDIN(TRUE)); END_FUNCTION;
245
- FUNCTION value_expression : BOOLEAN; RETURN (VALUE(TRUE)); END_FUNCTION;
246
- FUNCTION value_in_expression : BOOLEAN; RETURN (VALUE_IN(TRUE)); END_FUNCTION;
247
- FUNCTION value_unique_expression : BOOLEAN; RETURN (VALUE_UNIQUE(TRUE)); END_FUNCTION;
224
+ -- function expressions
225
+ abs_expression : BOOLEAN := ABS(TRUE);
226
+ acos_expression : BOOLEAN := ACOS(TRUE);
227
+ asin_expression : BOOLEAN := ASIN(TRUE);
228
+ atan_expression : BOOLEAN := ATAN(TRUE);
229
+ blength_expression : BOOLEAN := BLENGTH(TRUE);
230
+ cos_expression : BOOLEAN := COS(TRUE);
231
+ exists_expression : BOOLEAN := EXISTS(TRUE);
232
+ exp_expression : BOOLEAN := EXP(TRUE);
233
+ format_expression : BOOLEAN := FORMAT(TRUE);
234
+ hibound_expression : BOOLEAN := HIBOUND(TRUE);
235
+ hiindex_expression : BOOLEAN := HIINDEX(TRUE);
236
+ length_expression : BOOLEAN := LENGTH(TRUE);
237
+ lobound_expression : BOOLEAN := LOBOUND(TRUE);
238
+ loindex_expression : BOOLEAN := LOINDEX(TRUE);
239
+ log_expression : BOOLEAN := LOG(TRUE);
240
+ log2_expression : BOOLEAN := LOG2(TRUE);
241
+ log10_expression : BOOLEAN := LOG10(TRUE);
242
+ nvl_expression : BOOLEAN := NVL(TRUE);
243
+ odd_expression : BOOLEAN := ODD(TRUE);
244
+ rolesof_expression : BOOLEAN := ROLESOF(TRUE);
245
+ sin_expression : BOOLEAN := SIN(TRUE);
246
+ sizeof_expression : BOOLEAN := SIZEOF(TRUE);
247
+ sqrt_expression : BOOLEAN := SQRT(TRUE);
248
+ tan_expression : BOOLEAN := TAN(TRUE);
249
+ typeof_expression : BOOLEAN := TYPEOF(TRUE);
250
+ usedin_expression : BOOLEAN := USEDIN(TRUE);
251
+ value_expression : BOOLEAN := VALUE(TRUE);
252
+ value_in_expression : BOOLEAN := VALUE_IN(TRUE);
253
+ value_unique_expression : BOOLEAN := VALUE_UNIQUE(TRUE);
248
254
 
249
- -- operator expressions
250
- FUNCTION plus_expression : BOOLEAN; RETURN (+4); END_FUNCTION;
251
- FUNCTION plus_addition_expression : BOOLEAN; RETURN (+(4 + 2)); END_FUNCTION;
252
- FUNCTION minus_expression : BOOLEAN; RETURN (-4); END_FUNCTION;
253
- FUNCTION minus_addition_expression : BOOLEAN; RETURN (-(4 + 2)); END_FUNCTION;
254
- FUNCTION addition_expression : BOOLEAN; RETURN (4 + 2); END_FUNCTION;
255
- FUNCTION subtraction_expression : BOOLEAN; RETURN (4 - 2); END_FUNCTION;
256
- FUNCTION multiplication_expression : BOOLEAN; RETURN (4 * 2); END_FUNCTION;
257
- FUNCTION real_division_expression : BOOLEAN; RETURN (4 / 2); END_FUNCTION;
258
- FUNCTION integer_division_expression : BOOLEAN; RETURN (4 DIV 2); END_FUNCTION;
259
- FUNCTION modulo_expression : BOOLEAN; RETURN (4 MOD 2); END_FUNCTION;
260
- FUNCTION exponentiation_expression : BOOLEAN; RETURN (4 ** 2); END_FUNCTION;
261
- FUNCTION addition_addition_expression : BOOLEAN; RETURN (4 + 2 + 1); END_FUNCTION;
262
- FUNCTION subtraction_subtraction_expression : BOOLEAN; RETURN (4 - 2 - 1); END_FUNCTION;
263
- FUNCTION addition_subtraction_expression : BOOLEAN; RETURN (4 + 2 - 1); END_FUNCTION;
264
- FUNCTION subtraction_addition_expression : BOOLEAN; RETURN (4 - 2 + 1); END_FUNCTION;
265
- FUNCTION addition_multiplication_expression : BOOLEAN; RETURN (8 + 4 * 2); END_FUNCTION;
266
- FUNCTION multiplication_addition_expression : BOOLEAN; RETURN (8 * 4 + 2); END_FUNCTION;
267
- FUNCTION parenthesis_addition_multiplication_expression : BOOLEAN; RETURN ((8 + 4) * 2); END_FUNCTION;
268
- FUNCTION multiplication_parenthesis_addition_expression : BOOLEAN; RETURN (8 * (4 + 2)); END_FUNCTION;
269
- FUNCTION equal_expression : BOOLEAN; RETURN (4 = 2); END_FUNCTION;
270
- FUNCTION not_equal_expression : BOOLEAN; RETURN (4 <> 2); END_FUNCTION;
271
- FUNCTION instance_equal_expression : BOOLEAN; RETURN (4 :=: 2); END_FUNCTION;
272
- FUNCTION instance_not_equal_expression : BOOLEAN; RETURN (4 :<>: 2); END_FUNCTION;
273
- FUNCTION lt_expression : BOOLEAN; RETURN (4 < 2); END_FUNCTION;
274
- FUNCTION gt_expression : BOOLEAN; RETURN (4 > 2); END_FUNCTION;
275
- FUNCTION lte_expression : BOOLEAN; RETURN (4 <= 2); END_FUNCTION;
276
- FUNCTION gte_expression : BOOLEAN; RETURN (4 >= 2); END_FUNCTION;
277
- FUNCTION not_expression : BOOLEAN; RETURN (NOT TRUE); END_FUNCTION;
278
- FUNCTION not_or_expression : BOOLEAN; RETURN (NOT (TRUE OR FALSE)); END_FUNCTION;
279
- FUNCTION or_expression : BOOLEAN; RETURN (TRUE OR FALSE); END_FUNCTION;
280
- FUNCTION and_expression : BOOLEAN; RETURN (TRUE AND FALSE); END_FUNCTION;
281
- FUNCTION or_or_expression : BOOLEAN; RETURN (TRUE OR FALSE OR TRUE); END_FUNCTION;
282
- FUNCTION and_and_expression : BOOLEAN; RETURN (TRUE AND FALSE AND TRUE); END_FUNCTION;
283
- FUNCTION or_and_expression : BOOLEAN; RETURN (TRUE OR FALSE AND TRUE); END_FUNCTION;
284
- FUNCTION and_or_expression : BOOLEAN; RETURN (TRUE AND FALSE OR TRUE); END_FUNCTION;
285
- FUNCTION parenthesis_or_and_expression : BOOLEAN; RETURN ((TRUE OR FALSE) AND TRUE); END_FUNCTION;
286
- FUNCTION and_parenthesis_or_expression : BOOLEAN; RETURN (TRUE AND (FALSE OR TRUE)); END_FUNCTION;
287
- FUNCTION combine_expression : BOOLEAN; RETURN (test || test); END_FUNCTION;
288
- FUNCTION in_expression : BOOLEAN; RETURN (TRUE IN [TRUE]); END_FUNCTION;
289
- FUNCTION like_expression : BOOLEAN; RETURN ('xxx' LIKE 'xxx'); END_FUNCTION;
255
+ -- operator expressions
256
+ plus_expression : BOOLEAN := +4;
257
+ plus_addition_expression : BOOLEAN := +(4 + 2);
258
+ minus_expression : BOOLEAN := -4;
259
+ minus_addition_expression : BOOLEAN := -(4 + 2);
260
+ addition_expression : BOOLEAN := 4 + 2;
261
+ subtraction_expression : BOOLEAN := 4 - 2;
262
+ multiplication_expression : BOOLEAN := 4 * 2;
263
+ real_division_expression : BOOLEAN := 4 / 2;
264
+ integer_division_expression : BOOLEAN := 4 DIV 2;
265
+ modulo_expression : BOOLEAN := 4 MOD 2;
266
+ exponentiation_expression : BOOLEAN := 4 ** 2;
267
+ addition_addition_expression : BOOLEAN := 4 + 2 + 1;
268
+ subtraction_subtraction_expression : BOOLEAN := 4 - 2 - 1;
269
+ addition_subtraction_expression : BOOLEAN := 4 + 2 - 1;
270
+ subtraction_addition_expression : BOOLEAN := 4 - 2 + 1;
271
+ addition_multiplication_expression : BOOLEAN := 8 + 4 * 2;
272
+ multiplication_addition_expression : BOOLEAN := 8 * 4 + 2;
273
+ parenthesis_addition_multiplication_expression : BOOLEAN := (8 + 4) * 2;
274
+ multiplication_parenthesis_addition_expression : BOOLEAN := 8 * (4 + 2);
275
+ equal_expression : BOOLEAN := 4 = 2;
276
+ not_equal_expression : BOOLEAN := 4 <> 2;
277
+ instance_equal_expression : BOOLEAN := 4 :=: 2;
278
+ instance_not_equal_expression : BOOLEAN := 4 :<>: 2;
279
+ lt_expression : BOOLEAN := 4 < 2;
280
+ gt_expression : BOOLEAN := 4 > 2;
281
+ lte_expression : BOOLEAN := 4 <= 2;
282
+ gte_expression : BOOLEAN := 4 >= 2;
283
+ not_expression : BOOLEAN := NOT TRUE;
284
+ not_or_expression : BOOLEAN := NOT (TRUE OR FALSE);
285
+ or_expression : BOOLEAN := TRUE OR FALSE;
286
+ and_expression : BOOLEAN := TRUE AND FALSE;
287
+ or_or_expression : BOOLEAN := TRUE OR FALSE OR TRUE;
288
+ and_and_expression : BOOLEAN := TRUE AND FALSE AND TRUE;
289
+ or_and_expression : BOOLEAN := TRUE OR FALSE AND TRUE;
290
+ and_or_expression : BOOLEAN := TRUE AND FALSE OR TRUE;
291
+ parenthesis_or_and_expression : BOOLEAN := (TRUE OR FALSE) AND TRUE;
292
+ and_parenthesis_or_expression : BOOLEAN := TRUE AND (FALSE OR TRUE);
293
+ combine_expression : BOOLEAN := test || test2;
294
+ in_expression : BOOLEAN := TRUE IN [TRUE];
295
+ like_expression : BOOLEAN := 'xxx' LIKE 'xxx';
290
296
 
291
- -- aggregate initializer expressions
292
- FUNCTION aggregate_initializer_expression : BOOLEAN; RETURN ([4]); END_FUNCTION;
293
- FUNCTION repeated_aggregate_initializer_expression : BOOLEAN; RETURN ([4:2]); END_FUNCTION;
294
- FUNCTION complex_aggregate_initializer_expression : BOOLEAN; RETURN ([4 + 2]); END_FUNCTION;
295
- FUNCTION complex_repeated_aggregate_initializer_expression : BOOLEAN; RETURN ([4 + 2:4 + 2]); END_FUNCTION;
297
+ -- aggregate initializer expressions
298
+ aggregate_initializer_expression : BOOLEAN := [4];
299
+ repeated_aggregate_initializer_expression : BOOLEAN := [4:2];
300
+ complex_aggregate_initializer_expression : BOOLEAN := [4 + 2];
301
+ complex_repeated_aggregate_initializer_expression : BOOLEAN := [4 + 2:4 + 2];
296
302
 
297
- -- function call or entity constructor expressions
298
- FUNCTION call_expression : BOOLEAN; RETURN (parameter_function(TRUE)); END_FUNCTION;
303
+ -- function call or entity constructor expressions
304
+ call_expression : BOOLEAN := parameter_function(TRUE);
299
305
 
300
- -- reference expressions
301
- FUNCTION simple_reference_expression : BOOLEAN; RETURN (simple_string_expression); END_FUNCTION;
302
- FUNCTION attribute_reference_expression : BOOLEAN; RETURN (simple_string_expression.test); END_FUNCTION;
303
- FUNCTION group_reference_expression : BOOLEAN; RETURN (simple_string_expression\test); END_FUNCTION;
304
- FUNCTION index_reference_expression : BOOLEAN; RETURN (simple_string_expression[1]); END_FUNCTION;
305
- FUNCTION index2_reference_expression : BOOLEAN; RETURN (simple_string_expression[1:9]); END_FUNCTION;
306
+ -- reference expressions
307
+ simple_reference_expression : BOOLEAN := test;
308
+ group_reference_expression : BOOLEAN := test\test2;
309
+ index_reference_expression : BOOLEAN := test[1];
310
+ index2_reference_expression : BOOLEAN := test[1:9];
311
+ attribute_reference_expression : BOOLEAN := test.test2;
306
312
 
307
- -- interval expressions
308
- FUNCTION lt_lt_interval_expression : BOOLEAN; RETURN ({1 < 5 < 9}); END_FUNCTION;
309
- FUNCTION lte_lt_interval_expression : BOOLEAN; RETURN ({1 <= 5 < 9}); END_FUNCTION;
310
- FUNCTION lt_lte_interval_expression : BOOLEAN; RETURN ({1 < 5 <= 9}); END_FUNCTION;
311
- FUNCTION lte_lte_interval_expression : BOOLEAN; RETURN ({1 <= 5 <= 9}); END_FUNCTION;
313
+ -- interval expressions
314
+ lt_lt_interval_expression : BOOLEAN := {1 < 5 < 9};
315
+ lte_lt_interval_expression : BOOLEAN := {1 <= 5 < 9};
316
+ lt_lte_interval_expression : BOOLEAN := {1 < 5 <= 9};
317
+ lte_lte_interval_expression : BOOLEAN := {1 <= 5 <= 9};
312
318
 
313
- -- query expressions
314
- FUNCTION query_expression : BOOLEAN; RETURN (QUERY(test <* test2 | TRUE)); END_FUNCTION;
319
+ -- query expressions
320
+ query_expression : BOOLEAN := QUERY(test <* test2 | TRUE);
321
+ END_LOCAL;
322
+ END_PROCEDURE;
315
323
  END_SCHEMA;