expressir 1.2.3-aarch64-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.cross_rubies +21 -0
- data/.github/workflows/rake.yml +96 -0
- data/.github/workflows/release.yml +120 -0
- data/.gitignore +17 -0
- data/.gitmodules +3 -0
- data/.hound.yml +3 -0
- data/.rspec +2 -0
- data/.rubocop.yml +8 -0
- data/.yardopts +11 -0
- data/Gemfile +4 -0
- data/README.adoc +147 -0
- data/Rakefile +14 -0
- data/bin/console +12 -0
- data/bin/rspec +29 -0
- data/bin/setup +8 -0
- data/demo.rb +18 -0
- data/docs/development.md +90 -0
- data/exe/expressir +20 -0
- data/exe/format +18 -0
- data/exe/format-test +81 -0
- data/exe/generate-parser +48 -0
- data/expressir.gemspec +46 -0
- data/lib/expressir/cli/ui.rb +36 -0
- data/lib/expressir/cli.rb +21 -0
- data/lib/expressir/config.rb +23 -0
- data/lib/expressir/express/2.7/express_parser.so +0 -0
- data/lib/expressir/express/3.0/express_parser.so +0 -0
- data/lib/expressir/express/3.1/express_parser.so +0 -0
- data/lib/expressir/express/cache.rb +51 -0
- data/lib/expressir/express/formatter.rb +1608 -0
- data/lib/expressir/express/hyperlink_formatter.rb +36 -0
- data/lib/expressir/express/model_visitor.rb +24 -0
- data/lib/expressir/express/parser.rb +81 -0
- data/lib/expressir/express/resolve_references_model_visitor.rb +31 -0
- data/lib/expressir/express/schema_head_formatter.rb +23 -0
- data/lib/expressir/express/visitor.rb +2574 -0
- data/lib/expressir/model/cache.rb +17 -0
- data/lib/expressir/model/data_type.rb +9 -0
- data/lib/expressir/model/data_types/aggregate.rb +31 -0
- data/lib/expressir/model/data_types/array.rb +31 -0
- data/lib/expressir/model/data_types/bag.rb +25 -0
- data/lib/expressir/model/data_types/binary.rb +22 -0
- data/lib/expressir/model/data_types/boolean.rb +10 -0
- data/lib/expressir/model/data_types/enumeration.rb +25 -0
- data/lib/expressir/model/data_types/enumeration_item.rb +26 -0
- data/lib/expressir/model/data_types/generic.rb +26 -0
- data/lib/expressir/model/data_types/generic_entity.rb +26 -0
- data/lib/expressir/model/data_types/integer.rb +10 -0
- data/lib/expressir/model/data_types/list.rb +28 -0
- data/lib/expressir/model/data_types/logical.rb +10 -0
- data/lib/expressir/model/data_types/number.rb +10 -0
- data/lib/expressir/model/data_types/real.rb +19 -0
- data/lib/expressir/model/data_types/select.rb +28 -0
- data/lib/expressir/model/data_types/set.rb +25 -0
- data/lib/expressir/model/data_types/string.rb +22 -0
- data/lib/expressir/model/declaration.rb +9 -0
- data/lib/expressir/model/declarations/attribute.rb +47 -0
- data/lib/expressir/model/declarations/constant.rb +34 -0
- data/lib/expressir/model/declarations/entity.rb +53 -0
- data/lib/expressir/model/declarations/function.rb +67 -0
- data/lib/expressir/model/declarations/interface.rb +28 -0
- data/lib/expressir/model/declarations/interface_item.rb +23 -0
- data/lib/expressir/model/declarations/interfaced_item.rb +37 -0
- data/lib/expressir/model/declarations/parameter.rb +34 -0
- data/lib/expressir/model/declarations/procedure.rb +64 -0
- data/lib/expressir/model/declarations/remark_item.rb +21 -0
- data/lib/expressir/model/declarations/rule.rb +71 -0
- data/lib/expressir/model/declarations/schema.rb +117 -0
- data/lib/expressir/model/declarations/schema_version.rb +22 -0
- data/lib/expressir/model/declarations/schema_version_item.rb +22 -0
- data/lib/expressir/model/declarations/subtype_constraint.rb +40 -0
- data/lib/expressir/model/declarations/type.rb +45 -0
- data/lib/expressir/model/declarations/unique_rule.rb +31 -0
- data/lib/expressir/model/declarations/variable.rb +34 -0
- data/lib/expressir/model/declarations/where_rule.rb +31 -0
- data/lib/expressir/model/expression.rb +9 -0
- data/lib/expressir/model/expressions/aggregate_initializer.rb +19 -0
- data/lib/expressir/model/expressions/aggregate_initializer_item.rb +22 -0
- data/lib/expressir/model/expressions/binary_expression.rb +53 -0
- data/lib/expressir/model/expressions/entity_constructor.rb +22 -0
- data/lib/expressir/model/expressions/function_call.rb +22 -0
- data/lib/expressir/model/expressions/interval.rb +34 -0
- data/lib/expressir/model/expressions/query_expression.rb +35 -0
- data/lib/expressir/model/expressions/unary_expression.rb +27 -0
- data/lib/expressir/model/identifier.rb +34 -0
- data/lib/expressir/model/literal.rb +9 -0
- data/lib/expressir/model/literals/binary.rb +19 -0
- data/lib/expressir/model/literals/integer.rb +19 -0
- data/lib/expressir/model/literals/logical.rb +23 -0
- data/lib/expressir/model/literals/real.rb +19 -0
- data/lib/expressir/model/literals/string.rb +22 -0
- data/lib/expressir/model/model_element.rb +208 -0
- data/lib/expressir/model/reference.rb +9 -0
- data/lib/expressir/model/references/attribute_reference.rb +22 -0
- data/lib/expressir/model/references/group_reference.rb +22 -0
- data/lib/expressir/model/references/index_reference.rb +27 -0
- data/lib/expressir/model/references/simple_reference.rb +24 -0
- data/lib/expressir/model/repository.rb +23 -0
- data/lib/expressir/model/statement.rb +9 -0
- data/lib/expressir/model/statements/alias.rb +35 -0
- data/lib/expressir/model/statements/assignment.rb +22 -0
- data/lib/expressir/model/statements/case.rb +25 -0
- data/lib/expressir/model/statements/case_action.rb +22 -0
- data/lib/expressir/model/statements/compound.rb +19 -0
- data/lib/expressir/model/statements/escape.rb +10 -0
- data/lib/expressir/model/statements/if.rb +25 -0
- data/lib/expressir/model/statements/null.rb +10 -0
- data/lib/expressir/model/statements/procedure_call.rb +22 -0
- data/lib/expressir/model/statements/repeat.rb +47 -0
- data/lib/expressir/model/statements/return.rb +19 -0
- data/lib/expressir/model/statements/skip.rb +10 -0
- data/lib/expressir/model/supertype_expression.rb +9 -0
- data/lib/expressir/model/supertype_expressions/binary_supertype_expression.rb +29 -0
- data/lib/expressir/model/supertype_expressions/oneof_supertype_expression.rb +19 -0
- data/lib/expressir/model.rb +79 -0
- data/lib/expressir/version.rb +3 -0
- data/lib/expressir.rb +20 -0
- data/original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.exp +9589 -0
- data/original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.owl +36619 -0
- data/original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.xml +13294 -0
- data/original/examples/employment/eclipse/.project +17 -0
- data/original/examples/employment/eclipse/Export/Employment.png +0 -0
- data/original/examples/employment/eclipse/Express/employment_schema.exp +33 -0
- data/original/examples/employment/eclipse/Express/employment_schema.xmi +77 -0
- data/original/examples/employment/eclipse/Express/employment_schema.xml +93 -0
- data/original/examples/employment/eclipse/Models/Employment.uml +4 -0
- data/original/examples/employment/eclipse/Models/Employment.umldi +240 -0
- data/original/examples/employment/eclipse/readme.txt +7 -0
- data/original/examples/employment/employment_schema.exp +33 -0
- data/original/examples/employment/employment_schema.rb +232 -0
- data/original/examples/employment/employment_schema.xml +93 -0
- data/original/examples/employment/employment_schema___module.rb +46 -0
- data/original/examples/employment/employment_schema___p28attr.rb +126 -0
- data/original/examples/employment/employment_schema___p28inst.rb +26 -0
- data/original/examples/employment/example_employment_data.xml +1 -0
- data/original/examples/employment/example_employment_data_copy.xml +1 -0
- data/original/examples/employment/example_employment_reader.rb +30 -0
- data/original/examples/employment/example_employment_writer.rb +51 -0
- data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.exp +3710 -0
- data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.owl +35880 -0
- data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.xmi +15357 -0
- data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.xml +9468 -0
- data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.exp +8404 -0
- data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.owl +43147 -0
- data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.xmi +18341 -0
- data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.xml +11632 -0
- data/original/exp2ruby.rb +525 -0
- data/original/expsm.rb +34 -0
- data/original/mapping_owl.rb +1018 -0
- data/original/mapping_sysml.rb +2281 -0
- data/original/mapping_uml2.rb +599 -0
- data/original/mapping_uml2_eclipse.rb +433 -0
- data/original/reeper.rb +134 -0
- data/rakelib/cross-ruby.rake +316 -0
- data/spec/acceptance/version_spec.rb +12 -0
- data/spec/expressir/express/cache_spec.rb +64 -0
- data/spec/expressir/express/formatter_spec.rb +127 -0
- data/spec/expressir/express/parser_spec.rb +98 -0
- data/spec/expressir/model/model_element_spec.rb +266 -0
- data/spec/expressr_spec.rb +5 -0
- data/spec/spec_helper.rb +17 -0
- data/spec/support/console_helper.rb +29 -0
- data/spec/syntax/multiple.exp +23 -0
- data/spec/syntax/multiple.yaml +198 -0
- data/spec/syntax/multiple_formatted.exp +71 -0
- data/spec/syntax/multiple_hyperlink_formatted.exp +71 -0
- data/spec/syntax/multiple_schema_head_hyperlink_formatted.exp +13 -0
- data/spec/syntax/remark.exp +191 -0
- data/spec/syntax/remark.yaml +466 -0
- data/spec/syntax/remark_formatted.exp +227 -0
- data/spec/syntax/single.exp +4 -0
- data/spec/syntax/single.yaml +18 -0
- data/spec/syntax/single_formatted.exp +10 -0
- data/spec/syntax/single_formatted.yaml +36 -0
- data/spec/syntax/syntax.exp +333 -0
- data/spec/syntax/syntax.yaml +3509 -0
- data/spec/syntax/syntax_formatted.exp +902 -0
- data/spec/syntax/syntax_hyperlink_formatted.exp +902 -0
- data/spec/syntax/syntax_schema_head_formatted.exp +18 -0
- metadata +398 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
---
|
2
|
+
_class: Expressir::Model::Repository
|
3
|
+
schemas:
|
4
|
+
- _class: Expressir::Model::Declarations::Schema
|
5
|
+
file: spec/syntax/single.exp
|
6
|
+
id: single_schema
|
7
|
+
version:
|
8
|
+
_class: Expressir::Model::Declarations::SchemaVersion
|
9
|
+
value: version
|
10
|
+
entities:
|
11
|
+
- _class: Expressir::Model::Declarations::Entity
|
12
|
+
id: empty_entity
|
13
|
+
- _class: Expressir::Model::Declarations::Entity
|
14
|
+
id: subtype_empty_entity
|
15
|
+
subtype_of:
|
16
|
+
- _class: Expressir::Model::References::SimpleReference
|
17
|
+
id: empty_entity
|
18
|
+
base_path: single_schema.empty_entity
|
@@ -0,0 +1,36 @@
|
|
1
|
+
---
|
2
|
+
_class: Expressir::Model::Repository
|
3
|
+
schemas:
|
4
|
+
- _class: Expressir::Model::Declarations::Schema
|
5
|
+
file: spec/syntax/single.exp
|
6
|
+
id: single_schema
|
7
|
+
version:
|
8
|
+
_class: Expressir::Model::Declarations::SchemaVersion
|
9
|
+
value: version
|
10
|
+
entities:
|
11
|
+
- _class: Expressir::Model::Declarations::Entity
|
12
|
+
id: empty_entity
|
13
|
+
source: |-
|
14
|
+
ENTITY empty_entity;
|
15
|
+
END_ENTITY;
|
16
|
+
- _class: Expressir::Model::Declarations::Entity
|
17
|
+
id: subtype_empty_entity
|
18
|
+
subtype_of:
|
19
|
+
- _class: Expressir::Model::References::SimpleReference
|
20
|
+
id: empty_entity
|
21
|
+
base_path: single_schema.empty_entity
|
22
|
+
source: |-
|
23
|
+
ENTITY subtype_empty_entity
|
24
|
+
SUBTYPE OF (empty_entity);
|
25
|
+
END_ENTITY;
|
26
|
+
source: |-
|
27
|
+
SCHEMA single_schema 'version';
|
28
|
+
|
29
|
+
ENTITY empty_entity;
|
30
|
+
END_ENTITY;
|
31
|
+
|
32
|
+
ENTITY subtype_empty_entity
|
33
|
+
SUBTYPE OF (empty_entity);
|
34
|
+
END_ENTITY;
|
35
|
+
|
36
|
+
END_SCHEMA;
|
@@ -0,0 +1,333 @@
|
|
1
|
+
-- schema
|
2
|
+
SCHEMA syntax_schema '{ISO standard 10303 part(41) object(1) version(8)}';
|
3
|
+
|
4
|
+
-- interfaces
|
5
|
+
USE FROM contract_schema;
|
6
|
+
USE FROM contract_schema (contract);
|
7
|
+
USE FROM contract_schema (contract, contract2);
|
8
|
+
USE FROM contract_schema (contract AS contract2);
|
9
|
+
REFERENCE FROM contract_schema;
|
10
|
+
REFERENCE FROM contract_schema (contract);
|
11
|
+
REFERENCE FROM contract_schema (contract, contract2);
|
12
|
+
REFERENCE FROM contract_schema (contract AS contract2);
|
13
|
+
|
14
|
+
-- constants
|
15
|
+
CONSTANT empty_constant : BOOLEAN := TRUE; END_CONSTANT;
|
16
|
+
|
17
|
+
-- types
|
18
|
+
TYPE empty_type = BOOLEAN; END_TYPE;
|
19
|
+
TYPE where_type = BOOLEAN; WHERE TRUE; END_TYPE;
|
20
|
+
TYPE where_label_type = BOOLEAN; WHERE WR1: TRUE; END_TYPE;
|
21
|
+
|
22
|
+
-- entities
|
23
|
+
ENTITY empty_entity; END_ENTITY;
|
24
|
+
ENTITY abstract_entity ABSTRACT; END_ENTITY;
|
25
|
+
ENTITY abstract_supertype_entity ABSTRACT SUPERTYPE; END_ENTITY;
|
26
|
+
ENTITY abstract_supertype_constraint_entity ABSTRACT SUPERTYPE OF (empty_entity); END_ENTITY;
|
27
|
+
ENTITY supertype_constraint_entity SUPERTYPE OF (empty_entity); END_ENTITY;
|
28
|
+
ENTITY subtype_entity SUBTYPE OF (empty_entity); END_ENTITY;
|
29
|
+
ENTITY supertype_constraint_subtype_entity SUPERTYPE OF (empty_entity) SUBTYPE OF (empty_entity); END_ENTITY;
|
30
|
+
ENTITY attribute_entity; test : BOOLEAN; END_ENTITY;
|
31
|
+
ENTITY attribute_optional_entity; test : OPTIONAL BOOLEAN; END_ENTITY;
|
32
|
+
ENTITY attribute_multiple_entity; test : BOOLEAN; test2 : BOOLEAN; END_ENTITY;
|
33
|
+
ENTITY attribute_multiple_shorthand_entity; test, 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
|
+
ENTITY derived_attribute_entity; DERIVE test : 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
|
+
ENTITY inverse_attribute_entity; INVERSE test : attribute_entity FOR test; END_ENTITY;
|
40
|
+
ENTITY inverse_attribute_entity_entity; INVERSE test : attribute_entity FOR attribute_entity.test; END_ENTITY;
|
41
|
+
ENTITY inverse_attribute_set_entity; INVERSE test : SET OF attribute_entity FOR test; END_ENTITY;
|
42
|
+
ENTITY inverse_attribute_set_bound_entity; INVERSE test : SET [1:9] OF attribute_entity FOR test; END_ENTITY;
|
43
|
+
ENTITY inverse_attribute_bag_entity; INVERSE test : BAG OF attribute_entity FOR test; END_ENTITY;
|
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 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
|
+
ENTITY unique_entity; test : BOOLEAN; UNIQUE test; END_ENTITY;
|
48
|
+
ENTITY unique_label_entity; test : BOOLEAN; UNIQUE UR1: 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
|
+
ENTITY where_entity; WHERE TRUE; END_ENTITY;
|
52
|
+
ENTITY where_label_entity; WHERE WR1: TRUE; END_ENTITY;
|
53
|
+
|
54
|
+
-- subtype constraints
|
55
|
+
SUBTYPE_CONSTRAINT empty_subtype_constraint FOR empty_entity; END_SUBTYPE_CONSTRAINT;
|
56
|
+
SUBTYPE_CONSTRAINT abstract_supertype_subtype_constraint FOR empty_entity; ABSTRACT SUPERTYPE; END_SUBTYPE_CONSTRAINT;
|
57
|
+
SUBTYPE_CONSTRAINT total_over_subtype_constraint FOR empty_entity; TOTAL_OVER(a); END_SUBTYPE_CONSTRAINT;
|
58
|
+
SUBTYPE_CONSTRAINT supertype_expression_subtype_constraint FOR empty_entity; a; END_SUBTYPE_CONSTRAINT;
|
59
|
+
SUBTYPE_CONSTRAINT supertype_expression_andor_subtype_constraint FOR empty_entity; a ANDOR b; END_SUBTYPE_CONSTRAINT;
|
60
|
+
SUBTYPE_CONSTRAINT supertype_expression_and_subtype_constraint FOR empty_entity; a AND b; END_SUBTYPE_CONSTRAINT;
|
61
|
+
SUBTYPE_CONSTRAINT supertype_expression_andor_and_subtype_constraint FOR empty_entity; a ANDOR b AND c; END_SUBTYPE_CONSTRAINT;
|
62
|
+
SUBTYPE_CONSTRAINT supertype_expression_and_andor_subtype_constraint FOR empty_entity; a AND b ANDOR c; END_SUBTYPE_CONSTRAINT;
|
63
|
+
SUBTYPE_CONSTRAINT supertype_expression_parenthesis_andor_and_subtype_constraint FOR empty_entity; (a ANDOR b) AND c; END_SUBTYPE_CONSTRAINT;
|
64
|
+
SUBTYPE_CONSTRAINT supertype_expression_and_parenthesis_andor_subtype_constraint FOR empty_entity; a AND (b ANDOR c); END_SUBTYPE_CONSTRAINT;
|
65
|
+
SUBTYPE_CONSTRAINT supertype_expression_oneof_subtype_constraint FOR empty_entity; ONEOF(a, b); END_SUBTYPE_CONSTRAINT;
|
66
|
+
SUBTYPE_CONSTRAINT supertype_expression_and_oneof_subtype_constraint FOR empty_entity; a AND ONEOF(b, c); END_SUBTYPE_CONSTRAINT;
|
67
|
+
SUBTYPE_CONSTRAINT supertype_expression_andor_oneof_subtype_constraint FOR empty_entity; a ANDOR ONEOF(b, c); END_SUBTYPE_CONSTRAINT;
|
68
|
+
SUBTYPE_CONSTRAINT supertype_expression_oneof_and_subtype_constraint FOR empty_entity; ONEOF(a, b) AND c; END_SUBTYPE_CONSTRAINT;
|
69
|
+
SUBTYPE_CONSTRAINT supertype_expression_oneof_andor_subtype_constraint FOR empty_entity; ONEOF(a, b) ANDOR c; END_SUBTYPE_CONSTRAINT;
|
70
|
+
SUBTYPE_CONSTRAINT supertype_expression_oneof_and_oneof_subtype_constraint FOR empty_entity; ONEOF(a, b) AND ONEOF(c, d); END_SUBTYPE_CONSTRAINT;
|
71
|
+
SUBTYPE_CONSTRAINT supertype_expression_oneof_andor_oneof_subtype_constraint FOR empty_entity; ONEOF(a, b) ANDOR ONEOF(c, d); END_SUBTYPE_CONSTRAINT;
|
72
|
+
|
73
|
+
-- functions
|
74
|
+
FUNCTION empty_function : BOOLEAN; ; END_FUNCTION;
|
75
|
+
FUNCTION parameter_function(test : BOOLEAN) : BOOLEAN; ; END_FUNCTION;
|
76
|
+
FUNCTION multiple_parameter_function(test : BOOLEAN; test2 : BOOLEAN) : BOOLEAN; ; END_FUNCTION;
|
77
|
+
FUNCTION multiple_shorthand_parameter_function(test, test2 : BOOLEAN) : BOOLEAN; ; END_FUNCTION;
|
78
|
+
FUNCTION type_function : BOOLEAN; TYPE test = BOOLEAN; END_TYPE; ; END_FUNCTION;
|
79
|
+
FUNCTION constant_function : BOOLEAN; CONSTANT test : BOOLEAN := TRUE; END_CONSTANT; ; END_FUNCTION;
|
80
|
+
FUNCTION multiple_constant_function : BOOLEAN; CONSTANT test : BOOLEAN := TRUE; test2 : BOOLEAN := TRUE; END_CONSTANT; ; END_FUNCTION;
|
81
|
+
FUNCTION variable_function : BOOLEAN; LOCAL test : BOOLEAN; END_LOCAL; ; END_FUNCTION;
|
82
|
+
FUNCTION multiple_variable_function : BOOLEAN; LOCAL test : BOOLEAN; test2 : BOOLEAN; END_LOCAL; ; END_FUNCTION;
|
83
|
+
FUNCTION multiple_shorthand_variable_function : BOOLEAN; LOCAL test, test2 : BOOLEAN; END_LOCAL; ; END_FUNCTION;
|
84
|
+
FUNCTION variable_expression_function : BOOLEAN; LOCAL test : BOOLEAN := TRUE; END_LOCAL; ; END_FUNCTION;
|
85
|
+
FUNCTION multiple_variable_expression_function : BOOLEAN; LOCAL test : BOOLEAN := TRUE; test2 : BOOLEAN := TRUE; END_LOCAL; ; END_FUNCTION;
|
86
|
+
FUNCTION multiple_shorthand_variable_expression_function : BOOLEAN; LOCAL test, test2 : BOOLEAN := TRUE; END_LOCAL; ; END_FUNCTION;
|
87
|
+
|
88
|
+
-- rules
|
89
|
+
RULE empty_rule FOR (empty_entity); WHERE TRUE; END_RULE;
|
90
|
+
RULE type_rule FOR (empty_entity); TYPE test = BOOLEAN; END_TYPE; WHERE TRUE; END_RULE;
|
91
|
+
RULE constant_rule FOR (empty_entity); CONSTANT test : BOOLEAN := TRUE; END_CONSTANT; WHERE TRUE; END_RULE;
|
92
|
+
RULE multiple_constant_rule FOR (empty_entity); CONSTANT test : BOOLEAN := TRUE; test2 : BOOLEAN := TRUE; END_CONSTANT; WHERE TRUE; END_RULE;
|
93
|
+
RULE variable_rule FOR (empty_entity); LOCAL test : BOOLEAN; END_LOCAL; WHERE TRUE; END_RULE;
|
94
|
+
RULE multiple_variable_rule FOR (empty_entity); LOCAL test : BOOLEAN; test2 : BOOLEAN; END_LOCAL; WHERE TRUE; END_RULE;
|
95
|
+
RULE multiple_shorthand_variable_rule FOR (empty_entity); LOCAL test, test2 : BOOLEAN; END_LOCAL; WHERE TRUE; END_RULE;
|
96
|
+
RULE variable_expression_rule FOR (empty_entity); LOCAL test : BOOLEAN := TRUE; END_LOCAL; WHERE TRUE; END_RULE;
|
97
|
+
RULE multiple_variable_expression_rule FOR (empty_entity); LOCAL test : BOOLEAN := TRUE; test2 : BOOLEAN := TRUE; END_LOCAL; WHERE TRUE; END_RULE;
|
98
|
+
RULE multiple_shorthand_variable_expression_rule FOR (empty_entity); LOCAL test, test2 : BOOLEAN := TRUE; END_LOCAL; WHERE TRUE; END_RULE;
|
99
|
+
RULE statement_rule FOR (empty_entity); ; WHERE TRUE; END_RULE;
|
100
|
+
RULE where_label_rule FOR (empty_entity); WHERE WR1: TRUE; END_RULE;
|
101
|
+
|
102
|
+
-- procedures
|
103
|
+
PROCEDURE empty_procedure; END_PROCEDURE;
|
104
|
+
PROCEDURE parameter_procedure(test : BOOLEAN); END_PROCEDURE;
|
105
|
+
PROCEDURE multiple_parameter_procedure(test : BOOLEAN; test2 : BOOLEAN); END_PROCEDURE;
|
106
|
+
PROCEDURE multiple_shorthand_parameter_procedure(test, test2 : BOOLEAN); END_PROCEDURE;
|
107
|
+
PROCEDURE variable_parameter_procedure(VAR test : BOOLEAN); END_PROCEDURE;
|
108
|
+
PROCEDURE multiple_variable_parameter_procedure(VAR test : BOOLEAN; test2 : BOOLEAN); END_PROCEDURE;
|
109
|
+
PROCEDURE multiple_variable_parameter2_procedure(test : BOOLEAN; VAR test2 : BOOLEAN); END_PROCEDURE;
|
110
|
+
PROCEDURE multiple_shorthand_variable_parameter_procedure(VAR test, test2 : BOOLEAN); END_PROCEDURE;
|
111
|
+
PROCEDURE type_procedure; TYPE test = BOOLEAN; END_TYPE; END_PROCEDURE;
|
112
|
+
PROCEDURE constant_procedure; CONSTANT test : BOOLEAN := TRUE; END_CONSTANT; END_PROCEDURE;
|
113
|
+
PROCEDURE multiple_constant_procedure; CONSTANT test : BOOLEAN := TRUE; test2 : BOOLEAN := TRUE; END_CONSTANT; END_PROCEDURE;
|
114
|
+
PROCEDURE variable_procedure; LOCAL test : BOOLEAN; END_LOCAL; END_PROCEDURE;
|
115
|
+
PROCEDURE multiple_variable_procedure; LOCAL test : BOOLEAN; test2 : BOOLEAN; END_LOCAL; END_PROCEDURE;
|
116
|
+
PROCEDURE multiple_shorthand_variable_procedure; LOCAL test, test2 : BOOLEAN; END_LOCAL; END_PROCEDURE;
|
117
|
+
PROCEDURE variable_expression_procedure; LOCAL test : BOOLEAN := TRUE; END_LOCAL; END_PROCEDURE;
|
118
|
+
PROCEDURE multiple_variable_expression_procedure; LOCAL test : BOOLEAN := TRUE; test2 : BOOLEAN := TRUE; END_LOCAL; END_PROCEDURE;
|
119
|
+
PROCEDURE multiple_shorthand_variable_expression_procedure; LOCAL test, test2 : BOOLEAN := TRUE; END_LOCAL; END_PROCEDURE;
|
120
|
+
PROCEDURE statement_procedure; ; END_PROCEDURE;
|
121
|
+
|
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;
|
161
|
+
|
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;
|
176
|
+
|
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;
|
190
|
+
|
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_item_type = SELECT (empty_type); END_TYPE;
|
196
|
+
TYPE select_multiple_item_type = SELECT (empty_type, empty_type); END_TYPE;
|
197
|
+
TYPE select_based_on_type = SELECT BASED_ON select_type; END_TYPE;
|
198
|
+
TYPE select_based_on_item_type = SELECT BASED_ON select_type WITH (empty_type); END_TYPE;
|
199
|
+
TYPE select_based_on_multiple_item_type = SELECT BASED_ON select_type WITH (empty_type, empty_type); END_TYPE;
|
200
|
+
TYPE enumeration_type = ENUMERATION; END_TYPE;
|
201
|
+
TYPE enumeration_extensible_type = EXTENSIBLE ENUMERATION; END_TYPE;
|
202
|
+
TYPE enumeration_item_type = ENUMERATION OF (test); END_TYPE;
|
203
|
+
TYPE enumeration_multiple_item_type = ENUMERATION OF (test, test2); END_TYPE;
|
204
|
+
TYPE enumeration_based_on_type = ENUMERATION BASED_ON enumeration_type; END_TYPE;
|
205
|
+
TYPE enumeration_based_on_item_type = ENUMERATION BASED_ON enumeration_type WITH (test); END_TYPE;
|
206
|
+
TYPE enumeration_based_on_multiple_item_type = ENUMERATION BASED_ON enumeration_type WITH (test, test2); END_TYPE;
|
207
|
+
|
208
|
+
-- generic types
|
209
|
+
FUNCTION generic_type : GENERIC; ; END_FUNCTION;
|
210
|
+
FUNCTION generic_label_type : GENERIC:label; ; END_FUNCTION;
|
211
|
+
FUNCTION generic_entity_type : GENERIC_ENTITY; ; END_FUNCTION;
|
212
|
+
FUNCTION generic_entity_label_type : GENERIC_ENTITY:label; ; END_FUNCTION;
|
213
|
+
END_PROCEDURE;
|
214
|
+
|
215
|
+
PROCEDURE expressions;
|
216
|
+
LOCAL
|
217
|
+
-- literal expressions
|
218
|
+
binary_expression : BOOLEAN := %011110000111100001111000;
|
219
|
+
integer_expression : BOOLEAN := 999;
|
220
|
+
true_logical_expression : BOOLEAN := TRUE;
|
221
|
+
false_logical_expression : BOOLEAN := FALSE;
|
222
|
+
unknown_logical_expression : BOOLEAN := UNKNOWN;
|
223
|
+
real_expression : BOOLEAN := 999.999;
|
224
|
+
simple_string_expression : BOOLEAN := 'xxx';
|
225
|
+
utf8_simple_string_expression : BOOLEAN := 'UTF8 test: Příliš žluťoučký kůň úpěl ďábelské ódy.';
|
226
|
+
encoded_string_expression : BOOLEAN := "000000780000007800000078";
|
227
|
+
|
228
|
+
-- constant expressions
|
229
|
+
const_e_expression : BOOLEAN := CONST_E;
|
230
|
+
indeterminate_expression : BOOLEAN := ?;
|
231
|
+
pi_expression : BOOLEAN := PI;
|
232
|
+
self_expression : BOOLEAN := SELF;
|
233
|
+
|
234
|
+
-- function expressions
|
235
|
+
abs_expression : BOOLEAN := ABS(TRUE);
|
236
|
+
acos_expression : BOOLEAN := ACOS(TRUE);
|
237
|
+
asin_expression : BOOLEAN := ASIN(TRUE);
|
238
|
+
atan_expression : BOOLEAN := ATAN(TRUE);
|
239
|
+
blength_expression : BOOLEAN := BLENGTH(TRUE);
|
240
|
+
cos_expression : BOOLEAN := COS(TRUE);
|
241
|
+
exists_expression : BOOLEAN := EXISTS(TRUE);
|
242
|
+
exp_expression : BOOLEAN := EXP(TRUE);
|
243
|
+
format_expression : BOOLEAN := FORMAT(TRUE);
|
244
|
+
hibound_expression : BOOLEAN := HIBOUND(TRUE);
|
245
|
+
hiindex_expression : BOOLEAN := HIINDEX(TRUE);
|
246
|
+
length_expression : BOOLEAN := LENGTH(TRUE);
|
247
|
+
lobound_expression : BOOLEAN := LOBOUND(TRUE);
|
248
|
+
loindex_expression : BOOLEAN := LOINDEX(TRUE);
|
249
|
+
log_expression : BOOLEAN := LOG(TRUE);
|
250
|
+
log2_expression : BOOLEAN := LOG2(TRUE);
|
251
|
+
log10_expression : BOOLEAN := LOG10(TRUE);
|
252
|
+
nvl_expression : BOOLEAN := NVL(TRUE);
|
253
|
+
odd_expression : BOOLEAN := ODD(TRUE);
|
254
|
+
rolesof_expression : BOOLEAN := ROLESOF(TRUE);
|
255
|
+
sin_expression : BOOLEAN := SIN(TRUE);
|
256
|
+
sizeof_expression : BOOLEAN := SIZEOF(TRUE);
|
257
|
+
sqrt_expression : BOOLEAN := SQRT(TRUE);
|
258
|
+
tan_expression : BOOLEAN := TAN(TRUE);
|
259
|
+
typeof_expression : BOOLEAN := TYPEOF(TRUE);
|
260
|
+
usedin_expression : BOOLEAN := USEDIN(TRUE);
|
261
|
+
value_expression : BOOLEAN := VALUE(TRUE);
|
262
|
+
value_in_expression : BOOLEAN := VALUE_IN(TRUE);
|
263
|
+
value_unique_expression : BOOLEAN := VALUE_UNIQUE(TRUE);
|
264
|
+
|
265
|
+
-- operator expressions
|
266
|
+
plus_expression : BOOLEAN := +4;
|
267
|
+
plus_addition_expression : BOOLEAN := +(4 + 2);
|
268
|
+
minus_expression : BOOLEAN := -4;
|
269
|
+
minus_addition_expression : BOOLEAN := -(4 + 2);
|
270
|
+
addition_expression : BOOLEAN := 4 + 2;
|
271
|
+
subtraction_expression : BOOLEAN := 4 - 2;
|
272
|
+
multiplication_expression : BOOLEAN := 4 * 2;
|
273
|
+
real_division_expression : BOOLEAN := 4 / 2;
|
274
|
+
integer_division_expression : BOOLEAN := 4 DIV 2;
|
275
|
+
modulo_expression : BOOLEAN := 4 MOD 2;
|
276
|
+
exponentiation_expression : BOOLEAN := 4 ** 2;
|
277
|
+
addition_addition_expression : BOOLEAN := 4 + 2 + 1;
|
278
|
+
subtraction_subtraction_expression : BOOLEAN := 4 - 2 - 1;
|
279
|
+
addition_subtraction_expression : BOOLEAN := 4 + 2 - 1;
|
280
|
+
subtraction_addition_expression : BOOLEAN := 4 - 2 + 1;
|
281
|
+
addition_multiplication_expression : BOOLEAN := 8 + 4 * 2;
|
282
|
+
multiplication_addition_expression : BOOLEAN := 8 * 4 + 2;
|
283
|
+
parenthesis_addition_multiplication_expression : BOOLEAN := (8 + 4) * 2;
|
284
|
+
multiplication_parenthesis_addition_expression : BOOLEAN := 8 * (4 + 2);
|
285
|
+
equal_expression : BOOLEAN := 4 = 2;
|
286
|
+
not_equal_expression : BOOLEAN := 4 <> 2;
|
287
|
+
instance_equal_expression : BOOLEAN := 4 :=: 2;
|
288
|
+
instance_not_equal_expression : BOOLEAN := 4 :<>: 2;
|
289
|
+
lt_expression : BOOLEAN := 4 < 2;
|
290
|
+
gt_expression : BOOLEAN := 4 > 2;
|
291
|
+
lte_expression : BOOLEAN := 4 <= 2;
|
292
|
+
gte_expression : BOOLEAN := 4 >= 2;
|
293
|
+
not_expression : BOOLEAN := NOT TRUE;
|
294
|
+
not_or_expression : BOOLEAN := NOT (TRUE OR FALSE);
|
295
|
+
or_expression : BOOLEAN := TRUE OR FALSE;
|
296
|
+
and_expression : BOOLEAN := TRUE AND FALSE;
|
297
|
+
or_or_expression : BOOLEAN := TRUE OR FALSE OR TRUE;
|
298
|
+
and_and_expression : BOOLEAN := TRUE AND FALSE AND TRUE;
|
299
|
+
or_and_expression : BOOLEAN := TRUE OR FALSE AND TRUE;
|
300
|
+
and_or_expression : BOOLEAN := TRUE AND FALSE OR TRUE;
|
301
|
+
parenthesis_or_and_expression : BOOLEAN := (TRUE OR FALSE) AND TRUE;
|
302
|
+
and_parenthesis_or_expression : BOOLEAN := TRUE AND (FALSE OR TRUE);
|
303
|
+
combine_expression : BOOLEAN := test || test2;
|
304
|
+
in_expression : BOOLEAN := TRUE IN [TRUE];
|
305
|
+
like_expression : BOOLEAN := 'xxx' LIKE 'xxx';
|
306
|
+
|
307
|
+
-- aggregate initializer expressions
|
308
|
+
aggregate_initializer_expression : BOOLEAN := [4];
|
309
|
+
repeated_aggregate_initializer_expression : BOOLEAN := [4:2];
|
310
|
+
complex_aggregate_initializer_expression : BOOLEAN := [4 + 2];
|
311
|
+
complex_repeated_aggregate_initializer_expression : BOOLEAN := [4 + 2:4 + 2];
|
312
|
+
|
313
|
+
-- function call or entity constructor expressions
|
314
|
+
call_expression : BOOLEAN := parameter_function(TRUE);
|
315
|
+
|
316
|
+
-- reference expressions
|
317
|
+
simple_reference_expression : BOOLEAN := test;
|
318
|
+
group_reference_expression : BOOLEAN := test\test2;
|
319
|
+
index_reference_expression : BOOLEAN := test[1];
|
320
|
+
index2_reference_expression : BOOLEAN := test[1:9];
|
321
|
+
attribute_reference_expression : BOOLEAN := test.test2;
|
322
|
+
|
323
|
+
-- interval expressions
|
324
|
+
lt_lt_interval_expression : BOOLEAN := {1 < 5 < 9};
|
325
|
+
lte_lt_interval_expression : BOOLEAN := {1 <= 5 < 9};
|
326
|
+
lt_lte_interval_expression : BOOLEAN := {1 < 5 <= 9};
|
327
|
+
lte_lte_interval_expression : BOOLEAN := {1 <= 5 <= 9};
|
328
|
+
|
329
|
+
-- query expressions
|
330
|
+
query_expression : BOOLEAN := QUERY(test <* test2 | TRUE);
|
331
|
+
END_LOCAL;
|
332
|
+
END_PROCEDURE;
|
333
|
+
END_SCHEMA;
|