From 40d1e0081131101b6e96087d92f9be8798ecf0fa Mon Sep 17 00:00:00 2001 From: Ronald Tse Date: Tue, 6 Oct 2026 21:07:01 +0800 Subject: [PATCH] Conformance: instance definitions, inline mapping namespaces, corpus + README Verified against every example of RS 3001 (lutaml-lang.adoc): - instance bodies accept definition members (the normative top-level and typed instance examples carry `definition { ... }` blocks); added to the shared `attributes` member repetition so all instance forms benefit - mapping blocks accept the modernized inline two-argument namespace form (`namespace "prefix" "uri"`) beside namespace-name references - vendored the five uncovered normative examples as corpus fixtures 19-23 (top-level/typed instance definitions, instance collections, cross-collection references); every full-document example of the spec now runs in CI (the six remaining extracted blocks are single-line fragments, not documents) - added README.adoc (the repo had none): status, usage, architecture --- README.adoc | 89 + lib/lutaml/lml/grammar/lml.artifact.json | 1980 +++++++++-------- lib/lutaml/lml/grammar/lml.parg | 2 +- .../19_top_level_instance_definition.lml | 14 + .../rs3001/20_instance_typed_definition.lml | 16 + .../rs3001/21_instance_collection_studios.lml | 13 + .../rs3001/22_instance_collection_tiles.lml | 11 + .../rs3001/23_reference_cross_collection.lml | 9 + 8 files changed, 1149 insertions(+), 985 deletions(-) create mode 100644 README.adoc create mode 100644 spec/fixtures/rs3001/19_top_level_instance_definition.lml create mode 100644 spec/fixtures/rs3001/20_instance_typed_definition.lml create mode 100644 spec/fixtures/rs3001/21_instance_collection_studios.lml create mode 100644 spec/fixtures/rs3001/22_instance_collection_tiles.lml create mode 100644 spec/fixtures/rs3001/23_reference_cross_collection.lml diff --git a/README.adoc b/README.adoc new file mode 100644 index 0000000..e4d74ae --- /dev/null +++ b/README.adoc @@ -0,0 +1,89 @@ += lutaml-lml + +LutaML Model Language (LML) — a text DSL for describing UML-style +models and their data instances, parsed into typed domain models and +rendered as diagrams via GraphViz. + +== Status + +RS 3001 (LutaML language, `lutaml-lang.adoc`) is the authoritative +base and is fully implemented: classes, enums, data types, attributes +(including `values` sets, `pattern`, cardinality, defaults), the +canonical `value` construct, packages, namespacing, instances and +instance collections with references, and the validation rules +(uniqueness, mandatory attributes, type and pattern conformity, +reference validity and circularity). Every normative example of the +specification is vendored as a conformance corpus and runs in CI. + +RS 3010 (declarations extension, `lml-declarations.adoc`) covers +serialization mappings (XML elements/attributes/content, key-value +wire names, namespaces), `isa`, `derive`, `string_format`, enum +member payloads and `from_table` artifact references. + +== Installation + +.... +gem install lutaml-lml +.... + +== Usage + +Parse an LML document: + +.... +require "lutaml/lml" + +doc = Lutaml::Lml.parse_document(File.new("model.lml")) +doc.classes.first.attributes.map(&:name) +.... + +Validate against the RS 3001 rules: + +.... +violations = Lutaml::Lml::Validator.violations(doc) +.... + +Compile model definitions into anonymous `Lutaml::Model::Serializable` +classes and hydrate instance data: + +.... +compiler = Lutaml::Lml::ModelCompiler.new +compiler.compile(File.new("model.lml")) +klass = compiler.compiled_classes["Ceramic"] +instance = compiler.hydrate(File.new("data.lml")) +.... + +Command line: + +.... +lutaml generate model.lml # diagram via GraphViz +lutaml validate model.lml # parse + RS 3001 rule violations +lutaml compile model.lml # lutaml-model classes +.... + +== Architecture + +The language grammar is written in PARG +(`lib/lutaml/lml/grammar/lml.parg`) and compiled by +https://github.com/parsanol/parsanol-ruby[parsanol]; the compiled +artifact is committed for fast cold loads (`rake parg` regenerates it). +Comments and whitespace are grammar-level skip trivia. Comments are +consumed between any two tokens; quoted strings never start comments. + +Pipeline: preprocessor (include expansion) → PARG parser → transform → +data processor → document builder → post-parse resolvers (imports, +views, association labels). + +== Development + +.... +bundle install +bundle exec rake spec # test suite incl. the RS 3001 corpus +bundle exec rake parg # regenerate the compiled grammar artifact +bundle exec rubocop +.... + +== Documentation + +* RS 3001 — LutaML language: link:../docs/sources/lutaml-lang.adoc[lutaml-lang.adoc] +* RS 3010 — declarations extension: link:../docs/sources/lml-declarations.adoc[lml-declarations.adoc] diff --git a/lib/lutaml/lml/grammar/lml.artifact.json b/lib/lutaml/lml/grammar/lml.artifact.json index f7cc97d..743efae 100644 --- a/lib/lutaml/lml/grammar/lml.artifact.json +++ b/lib/lutaml/lml/grammar/lml.artifact.json @@ -611,12 +611,12 @@ }, { "Entity": { - "atom": 1997 + "atom": 1999 } }, { "Entity": { - "atom": 1684 + "atom": 1686 } }, { @@ -1127,12 +1127,12 @@ }, { "Entity": { - "atom": 1676 + "atom": 1678 } }, { "Entity": { - "atom": 1675 + "atom": 1677 } }, { @@ -2795,7 +2795,7 @@ }, { "Entity": { - "atom": 1203 + "atom": 1205 } }, { @@ -3274,7 +3274,7 @@ }, { "Entity": { - "atom": 1201 + "atom": 1203 } }, { @@ -3305,12 +3305,12 @@ }, { "Entity": { - "atom": 1198 + "atom": 1200 } }, { "Entity": { - "atom": 1195 + "atom": 1197 } }, { @@ -4972,7 +4972,7 @@ }, { "Entity": { - "atom": 1114 + "atom": 1116 } }, { @@ -5068,7 +5068,7 @@ }, { "Entity": { - "atom": 1105 + "atom": 1107 } }, { @@ -5797,7 +5797,7 @@ }, { "Entity": { - "atom": 1102 + "atom": 1104 } }, { @@ -5884,17 +5884,17 @@ }, { "Entity": { - "atom": 1098 + "atom": 1100 } }, { "Entity": { - "atom": 1097 + "atom": 1099 } }, { "Entity": { - "atom": 1096 + "atom": 1098 } }, { @@ -6041,12 +6041,12 @@ }, { "Entity": { - "atom": 1088 + "atom": 1090 } }, { "Entity": { - "atom": 1087 + "atom": 1089 } }, { @@ -6217,12 +6217,12 @@ }, { "Entity": { - "atom": 1078 + "atom": 1080 } }, { "Entity": { - "atom": 1077 + "atom": 1079 } }, { @@ -6375,17 +6375,17 @@ }, { "Entity": { - "atom": 1069 + "atom": 1071 } }, { "Entity": { - "atom": 1066 + "atom": 1068 } }, { "Entity": { - "atom": 1063 + "atom": 1065 } }, { @@ -6455,22 +6455,32 @@ }, { "Entity": { - "atom": 1058 + "atom": 1060 } }, { "Entity": { - "atom": 1054 + "atom": 529 } }, { "Entity": { - "atom": 1048 + "atom": 543 } }, { "Entity": { - "atom": 988 + "atom": 1056 + } + }, + { + "Entity": { + "atom": 1050 + } + }, + { + "Entity": { + "atom": 990 } }, { @@ -6482,7 +6492,7 @@ "Sequence": { "atoms": [ 36, - 977 + 979 ] } }, @@ -6495,15 +6505,15 @@ "Sequence": { "atoms": [ 36, - 979 + 981 ] } }, { "Alternative": { "atoms": [ - 978, - 980 + 980, + 982 ] } }, @@ -6514,7 +6524,7 @@ }, { "Lookahead": { - "atom": 982, + "atom": 984, "positive": false } }, @@ -6526,14 +6536,14 @@ { "Sequence": { "atoms": [ - 983, - 984 + 985, + 986 ] } }, { "Repetition": { - "atom": 985, + "atom": 987, "min": 0, "max": null, "tag": "Repetition" @@ -6542,16 +6552,16 @@ { "Named": { "name": "comments", - "atom": 986 + "atom": 988 } }, { "Sequence": { "atoms": [ 36, - 981, + 983, 36, - 987 + 989 ] } }, @@ -6563,7 +6573,7 @@ { "Named": { "name": "key", - "atom": 989 + "atom": 991 } }, { @@ -6574,12 +6584,12 @@ { "Named": { "name": "add", - "atom": 991 + "atom": 993 } }, { "Repetition": { - "atom": 992, + "atom": 994, "min": 0, "max": 1, "tag": "Maybe" @@ -6592,7 +6602,7 @@ }, { "Repetition": { - "atom": 994, + "atom": 996, "min": 0, "max": 1, "tag": "Maybe" @@ -6600,12 +6610,12 @@ }, { "Entity": { - "atom": 1045 + "atom": 1047 } }, { "Entity": { - "atom": 1018 + "atom": 1020 } }, { @@ -6617,7 +6627,7 @@ "Sequence": { "atoms": [ 36, - 998 + 1000 ] } }, @@ -6628,7 +6638,7 @@ }, { "Repetition": { - "atom": 1000, + "atom": 1002, "min": 0, "max": 1, "tag": "Maybe" @@ -6636,12 +6646,12 @@ }, { "Entity": { - "atom": 1006 + "atom": 1008 } }, { "Entity": { - "atom": 1004 + "atom": 1006 } }, { @@ -6661,8 +6671,8 @@ { "Alternative": { "atoms": [ - 1003, - 1005 + 1005, + 1007 ] } }, @@ -6673,7 +6683,7 @@ }, { "Repetition": { - "atom": 1007, + "atom": 1009, "min": 0, "max": 1, "tag": "Maybe" @@ -6686,7 +6696,7 @@ }, { "Repetition": { - "atom": 1009, + "atom": 1011, "min": 0, "max": 1, "tag": "Maybe" @@ -6696,15 +6706,15 @@ "Sequence": { "atoms": [ 36, - 1002, - 1008, - 1010 + 1004, + 1010, + 1012 ] } }, { "Repetition": { - "atom": 1011, + "atom": 1013, "min": 0, "max": null, "tag": "Repetition" @@ -6713,7 +6723,7 @@ { "Named": { "name": "list", - "atom": 1012 + "atom": 1014 } }, { @@ -6723,7 +6733,7 @@ }, { "Repetition": { - "atom": 1014, + "atom": 1016, "min": 0, "max": 1, "tag": "Maybe" @@ -6738,29 +6748,29 @@ "Sequence": { "atoms": [ 36, - 1016 + 1018 ] } }, { "Sequence": { "atoms": [ - 36, - 999, 36, 1001, 36, - 1013, + 1003, 36, 1015, 36, - 1017 + 1017, + 36, + 1019 ] } }, { "Entity": { - "atom": 1038 + "atom": 1040 } }, { @@ -6772,7 +6782,7 @@ "Sequence": { "atoms": [ 36, - 1020 + 1022 ] } }, @@ -6783,7 +6793,7 @@ }, { "Repetition": { - "atom": 1022, + "atom": 1024, "min": 0, "max": 1, "tag": "Maybe" @@ -6791,7 +6801,7 @@ }, { "Entity": { - "atom": 1031 + "atom": 1033 } }, { @@ -6802,7 +6812,7 @@ { "Named": { "name": "key", - "atom": 1025 + "atom": 1027 } }, { @@ -6812,7 +6822,7 @@ }, { "Repetition": { - "atom": 1027, + "atom": 1029, "min": 0, "max": 1, "tag": "Maybe" @@ -6826,18 +6836,18 @@ { "Named": { "name": "value", - "atom": 1029 + "atom": 1031 } }, { "Sequence": { "atoms": [ - 36, - 1026, 36, 1028, 36, - 1030 + 1030, + 36, + 1032 ] } }, @@ -6850,15 +6860,15 @@ "Sequence": { "atoms": [ 36, - 1024, + 1026, 36, - 1032 + 1034 ] } }, { "Repetition": { - "atom": 1033, + "atom": 1035, "min": 0, "max": null, "tag": "Repetition" @@ -6867,7 +6877,7 @@ { "Named": { "name": "key_value_map", - "atom": 1034 + "atom": 1036 } }, { @@ -6879,21 +6889,21 @@ "Sequence": { "atoms": [ 36, - 1036 + 1038 ] } }, { "Sequence": { "atoms": [ - 36, - 1021, 36, 1023, 36, - 1035, + 1025, 36, - 1037 + 1037, + 36, + 1039 ] } }, @@ -6909,7 +6919,7 @@ }, { "Lookahead": { - "atom": 1040, + "atom": 1042, "positive": false } }, @@ -6921,14 +6931,14 @@ { "Sequence": { "atoms": [ - 1041, - 1042 + 1043, + 1044 ] } }, { "Repetition": { - "atom": 1043, + "atom": 1045, "min": 1, "max": null, "tag": "Repetition" @@ -6938,38 +6948,38 @@ "Alternative": { "atoms": [ 884, - 997, - 1019, - 1039, - 1044 + 999, + 1021, + 1041, + 1046 ] } }, { "Named": { "name": "value", - "atom": 996 + "atom": 998 } }, { "Sequence": { "atoms": [ 36, - 990, - 36, - 993, + 992, 36, 995, 36, - 1046 + 997, + 36, + 1048 ] } }, { "Alternative": { "atoms": [ - 976, - 1047 + 978, + 1049 ] } }, @@ -6980,7 +6990,7 @@ }, { "Repetition": { - "atom": 1049, + "atom": 1051, "min": 0, "max": 1, "tag": "Maybe" @@ -6994,15 +7004,15 @@ { "Sequence": { "atoms": [ - 1050, + 1052, 36, - 1051 + 1053 ] } }, { "Repetition": { - "atom": 1052, + "atom": 1054, "min": 0, "max": 1, "tag": "Maybe" @@ -7012,9 +7022,9 @@ "Sequence": { "atoms": [ 36, - 975, + 977, 36, - 1053 + 1055 ] } }, @@ -7027,13 +7037,15 @@ "Alternative": { "atoms": [ 974, - 1055 + 975, + 976, + 1057 ] } }, { "Repetition": { - "atom": 1056, + "atom": 1058, "min": 0, "max": null, "tag": "Repetition" @@ -7042,7 +7054,7 @@ { "Named": { "name": "attributes", - "atom": 1057 + "atom": 1059 } }, { @@ -7052,7 +7064,7 @@ }, { "Repetition": { - "atom": 1059, + "atom": 1061, "min": 0, "max": 1, "tag": "Maybe" @@ -7067,7 +7079,7 @@ "Sequence": { "atoms": [ 36, - 1061 + 1063 ] } }, @@ -7087,9 +7099,9 @@ 36, 973, 36, - 1060, + 1062, 36, - 1062 + 1064 ] } }, @@ -7101,14 +7113,14 @@ }, { "Entity": { - "atom": 1058 + "atom": 1060 } }, { "Alternative": { "atoms": [ - 1064, - 1065 + 1066, + 1067 ] } }, @@ -7119,7 +7131,7 @@ }, { "Repetition": { - "atom": 1067, + "atom": 1069, "min": 0, "max": 1, "tag": "Maybe" @@ -7131,7 +7143,7 @@ 36, 961, 36, - 1068 + 1070 ] } }, @@ -7152,7 +7164,7 @@ "Sequence": { "atoms": [ 36, - 1071 + 1073 ] } }, @@ -7174,16 +7186,16 @@ 36, 959, 36, - 1070, + 1072, 36, - 1072 + 1074 ] } }, { "Named": { "name": "instance", - "atom": 1073 + "atom": 1075 } }, { @@ -7193,7 +7205,7 @@ }, { "Repetition": { - "atom": 1075, + "atom": 1077, "min": 0, "max": 1, "tag": "Maybe" @@ -7203,9 +7215,9 @@ "Sequence": { "atoms": [ 36, - 1074, + 1076, 36, - 1076 + 1078 ] } }, @@ -7220,14 +7232,14 @@ }, { "Entity": { - "atom": 1058 + "atom": 1060 } }, { "Alternative": { "atoms": [ 935, - 1079 + 1081 ] } }, @@ -7240,7 +7252,7 @@ "Sequence": { "atoms": [ 36, - 1081 + 1083 ] } }, @@ -7260,16 +7272,16 @@ 36, 934, 36, - 1080, + 1082, 36, - 1082 + 1084 ] } }, { "Named": { "name": "instance", - "atom": 1083 + "atom": 1085 } }, { @@ -7279,7 +7291,7 @@ }, { "Repetition": { - "atom": 1085, + "atom": 1087, "min": 0, "max": 1, "tag": "Maybe" @@ -7289,9 +7301,9 @@ "Sequence": { "atoms": [ 36, - 1084, + 1086, 36, - 1086 + 1088 ] } }, @@ -7306,14 +7318,14 @@ }, { "Entity": { - "atom": 1058 + "atom": 1060 } }, { "Alternative": { "atoms": [ 908, - 1089 + 1091 ] } }, @@ -7326,7 +7338,7 @@ "Sequence": { "atoms": [ 36, - 1091 + 1093 ] } }, @@ -7337,7 +7349,7 @@ }, { "Repetition": { - "atom": 1093, + "atom": 1095, "min": 0, "max": 1, "tag": "Maybe" @@ -7359,18 +7371,18 @@ 36, 907, 36, - 1090, - 36, 1092, 36, - 1094 + 1094, + 36, + 1096 ] } }, { "Named": { "name": "instance", - "atom": 1095 + "atom": 1097 } }, { @@ -7386,10 +7398,10 @@ "Alternative": { "atoms": [ 884, - 997, - 1019, - 1039, - 1044 + 999, + 1021, + 1041, + 1046 ] } }, @@ -7406,7 +7418,7 @@ }, { "Repetition": { - "atom": 1100, + "atom": 1102, "min": 0, "max": 1, "tag": "Maybe" @@ -7420,9 +7432,9 @@ 36, 882, 36, - 1099, + 1101, 36, - 1101 + 1103 ] } }, @@ -7439,13 +7451,13 @@ 771, 779, 846, - 1103 + 1105 ] } }, { "Repetition": { - "atom": 1104, + "atom": 1106, "min": 0, "max": null, "tag": "Repetition" @@ -7458,7 +7470,7 @@ }, { "Repetition": { - "atom": 1106, + "atom": 1108, "min": 0, "max": 1, "tag": "Maybe" @@ -7476,14 +7488,14 @@ 760, 36, 761, - 1107, - 1108 + 1109, + 1110 ] } }, { "Repetition": { - "atom": 1109, + "atom": 1111, "min": 0, "max": 1, "tag": "Maybe" @@ -7496,7 +7508,7 @@ }, { "Repetition": { - "atom": 1111, + "atom": 1113, "min": 0, "max": 1, "tag": "Maybe" @@ -7516,16 +7528,16 @@ 36, 757, 36, - 1110, + 1112, 36, - 1112 + 1114 ] } }, { "Named": { "name": "attributes", - "atom": 1113 + "atom": 1115 } }, { @@ -7535,13 +7547,13 @@ }, { "Lookahead": { - "atom": 1115, + "atom": 1117, "positive": false } }, { "Entity": { - "atom": 1162 + "atom": 1164 } }, { @@ -7551,7 +7563,7 @@ }, { "Repetition": { - "atom": 1118, + "atom": 1120, "min": 0, "max": 1, "tag": "Maybe" @@ -7560,12 +7572,12 @@ { "Named": { "name": "visibility", - "atom": 1119 + "atom": 1121 } }, { "Entity": { - "atom": 1137 + "atom": 1139 } }, { @@ -7616,20 +7628,20 @@ { "Alternative": { "atoms": [ - 1123, - 1124, 1125, 1126, 1127, 1128, 1129, - 1130 + 1130, + 1131, + 1132 ] } }, { "Repetition": { - "atom": 1131, + "atom": 1133, "min": 1, "max": null, "tag": "Repetition" @@ -7638,7 +7650,7 @@ { "Named": { "name": "name", - "atom": 1132 + "atom": 1134 } }, { @@ -7650,11 +7662,11 @@ "Sequence": { "atoms": [ 36, - 1122, + 1124, 36, - 1133, + 1135, 36, - 1134 + 1136 ] } }, @@ -7666,14 +7678,14 @@ { "Alternative": { "atoms": [ - 1135, - 1136 + 1137, + 1138 ] } }, { "Entity": { - "atom": 1150 + "atom": 1152 } }, { @@ -7683,7 +7695,7 @@ }, { "Repetition": { - "atom": 1139, + "atom": 1141, "min": 0, "max": 1, "tag": "Maybe" @@ -7696,7 +7708,7 @@ }, { "Repetition": { - "atom": 1141, + "atom": 1143, "min": 0, "max": 1, "tag": "Maybe" @@ -7710,12 +7722,12 @@ { "Named": { "name": "type_literal", - "atom": 1143 + "atom": 1145 } }, { "Repetition": { - "atom": 1144, + "atom": 1146, "min": 0, "max": 1, "tag": "Maybe" @@ -7729,7 +7741,7 @@ { "Named": { "name": "type", - "atom": 1146 + "atom": 1148 } }, { @@ -7739,7 +7751,7 @@ }, { "Repetition": { - "atom": 1148, + "atom": 1150, "min": 0, "max": 1, "tag": "Maybe" @@ -7748,22 +7760,22 @@ { "Sequence": { "atoms": [ - 36, - 1140, 36, 1142, 36, - 1145, + 1144, 36, 1147, 36, - 1149 + 1149, + 36, + 1151 ] } }, { "Repetition": { - "atom": 1138, + "atom": 1140, "min": 0, "max": 1, "tag": "Maybe" @@ -7776,7 +7788,7 @@ }, { "Repetition": { - "atom": 1152, + "atom": 1154, "min": 0, "max": 1, "tag": "Maybe" @@ -7784,7 +7796,7 @@ }, { "Entity": { - "atom": 1159 + "atom": 1161 } }, { @@ -7798,7 +7810,7 @@ { "Named": { "name": "members", - "atom": 1155 + "atom": 1157 } }, { @@ -7810,7 +7822,7 @@ "Sequence": { "atoms": [ 36, - 1157 + 1159 ] } }, @@ -7822,15 +7834,15 @@ 36, 499, 36, - 1156, + 1158, 36, - 1158 + 1160 ] } }, { "Repetition": { - "atom": 1154, + "atom": 1156, "min": 0, "max": 1, "tag": "Maybe" @@ -7840,37 +7852,37 @@ "Sequence": { "atoms": [ 36, - 1120, - 36, - 1121, + 1122, 36, - 1151, + 1123, 36, 1153, 36, - 1160 + 1155, + 36, + 1162 ] } }, { "Named": { "name": "attributes", - "atom": 1161 + "atom": 1163 } }, { "Sequence": { "atoms": [ 36, - 1116, + 1118, 36, - 1117 + 1119 ] } }, { "Entity": { - "atom": 1179 + "atom": 1181 } }, { @@ -7885,7 +7897,7 @@ }, { "Entity": { - "atom": 1177 + "atom": 1179 } }, { @@ -7897,7 +7909,7 @@ "Sequence": { "atoms": [ 36, - 1168 + 1170 ] } }, @@ -7908,7 +7920,7 @@ }, { "Repetition": { - "atom": 1170, + "atom": 1172, "min": 0, "max": 1, "tag": "Maybe" @@ -7916,7 +7928,7 @@ }, { "Entity": { - "atom": 1105 + "atom": 1107 } }, { @@ -7926,7 +7938,7 @@ }, { "Repetition": { - "atom": 1173, + "atom": 1175, "min": 0, "max": 1, "tag": "Maybe" @@ -7941,23 +7953,23 @@ "Sequence": { "atoms": [ 36, - 1175 + 1177 ] } }, { "Sequence": { "atoms": [ - 36, - 1169, 36, 1171, 36, - 1172, + 1173, 36, 1174, 36, - 1176 + 1176, + 36, + 1178 ] } }, @@ -7965,28 +7977,28 @@ "Sequence": { "atoms": [ 36, - 1165, + 1167, 36, - 1166, + 1168, 36, - 1167 + 1169 ] } }, { "Named": { "name": "attributes", - "atom": 1178 + "atom": 1180 } }, { "Entity": { - "atom": 988 + "atom": 990 } }, { "Entity": { - "atom": 1194 + "atom": 1196 } }, { @@ -7998,7 +8010,7 @@ "Sequence": { "atoms": [ 36, - 1182 + 1184 ] } }, @@ -8009,7 +8021,7 @@ }, { "Lookahead": { - "atom": 1184, + "atom": 1186, "positive": false } }, @@ -8021,14 +8033,14 @@ { "Sequence": { "atoms": [ - 1185, - 1186 + 1187, + 1188 ] } }, { "Repetition": { - "atom": 1187, + "atom": 1189, "min": 0, "max": null, "tag": "Repetition" @@ -8037,7 +8049,7 @@ { "Named": { "name": "comments", - "atom": 1188 + "atom": 1190 } }, { @@ -8047,7 +8059,7 @@ }, { "Repetition": { - "atom": 1190, + "atom": 1192, "min": 0, "max": 1, "tag": "Maybe" @@ -8062,7 +8074,7 @@ "Sequence": { "atoms": [ 36, - 1192 + 1194 ] } }, @@ -8070,13 +8082,13 @@ "Sequence": { "atoms": [ 36, - 1183, - 36, - 1189, + 1185, 36, 1191, 36, - 1193 + 1193, + 36, + 1195 ] } }, @@ -8090,10 +8102,10 @@ 611, 744, 745, - 1163, - 1164, - 1180, - 1181 + 1165, + 1166, + 1182, + 1183 ] } }, @@ -8104,7 +8116,7 @@ }, { "Repetition": { - "atom": 1196, + "atom": 1198, "min": 0, "max": 1, "tag": "Maybe" @@ -8116,7 +8128,7 @@ 36, 501, 36, - 1197 + 1199 ] } }, @@ -8131,7 +8143,7 @@ { "Named": { "name": "members", - "atom": 1199 + "atom": 1201 } }, { @@ -8142,9 +8154,9 @@ 36, 499, 36, - 1200, + 1202, 36, - 1158 + 1160 ] } }, @@ -8174,7 +8186,7 @@ 36, 494, 36, - 1202 + 1204 ] } }, @@ -8186,7 +8198,7 @@ }, { "Entity": { - "atom": 1365 + "atom": 1367 } }, { @@ -8196,7 +8208,7 @@ }, { "Repetition": { - "atom": 1206, + "atom": 1208, "min": 0, "max": 1, "tag": "Maybe" @@ -8209,7 +8221,7 @@ }, { "Repetition": { - "atom": 1208, + "atom": 1210, "min": 0, "max": 1, "tag": "Maybe" @@ -8217,7 +8229,7 @@ }, { "Entity": { - "atom": 1214 + "atom": 1216 } }, { @@ -8232,7 +8244,7 @@ }, { "Repetition": { - "atom": 1212, + "atom": 1214, "min": 1, "max": null, "tag": "Repetition" @@ -8241,8 +8253,8 @@ { "Sequence": { "atoms": [ - 1211, - 1213 + 1213, + 1215 ] } }, @@ -8253,7 +8265,7 @@ }, { "Repetition": { - "atom": 1215, + "atom": 1217, "min": 0, "max": 1, "tag": "Maybe" @@ -8267,7 +8279,7 @@ { "Named": { "name": "name", - "atom": 1217 + "atom": 1219 } }, { @@ -8277,7 +8289,7 @@ }, { "Repetition": { - "atom": 1219, + "atom": 1221, "min": 0, "max": 1, "tag": "Maybe" @@ -8290,7 +8302,7 @@ }, { "Repetition": { - "atom": 1221, + "atom": 1223, "min": 0, "max": 1, "tag": "Maybe" @@ -8298,7 +8310,7 @@ }, { "Entity": { - "atom": 1363 + "atom": 1365 } }, { @@ -8310,7 +8322,7 @@ "Sequence": { "atoms": [ 36, - 1224 + 1226 ] } }, @@ -8321,7 +8333,7 @@ }, { "Repetition": { - "atom": 1226, + "atom": 1228, "min": 0, "max": 1, "tag": "Maybe" @@ -8329,12 +8341,12 @@ }, { "Entity": { - "atom": 1358 + "atom": 1360 } }, { "Entity": { - "atom": 1355 + "atom": 1357 } }, { @@ -8349,7 +8361,7 @@ }, { "Entity": { - "atom": 1258 + "atom": 1260 } }, { @@ -8359,7 +8371,7 @@ }, { "Repetition": { - "atom": 1233, + "atom": 1235, "min": 0, "max": 1, "tag": "Maybe" @@ -8374,7 +8386,7 @@ "Sequence": { "atoms": [ 36, - 1235 + 1237 ] } }, @@ -8385,7 +8397,7 @@ }, { "Repetition": { - "atom": 1237, + "atom": 1239, "min": 0, "max": 1, "tag": "Maybe" @@ -8400,7 +8412,7 @@ "Sequence": { "atoms": [ 36, - 1239 + 1241 ] } }, @@ -8411,7 +8423,7 @@ }, { "Repetition": { - "atom": 1241, + "atom": 1243, "min": 0, "max": 1, "tag": "Maybe" @@ -8419,7 +8431,7 @@ }, { "Entity": { - "atom": 1250 + "atom": 1252 } }, { @@ -8434,7 +8446,7 @@ }, { "Repetition": { - "atom": 1245, + "atom": 1247, "min": 1, "max": null, "tag": "Repetition" @@ -8443,7 +8455,7 @@ { "Named": { "name": "member_field_type", - "atom": 1246 + "atom": 1248 } }, { @@ -8453,7 +8465,7 @@ }, { "Repetition": { - "atom": 1248, + "atom": 1250, "min": 0, "max": 1, "tag": "Maybe" @@ -8463,17 +8475,17 @@ "Sequence": { "atoms": [ 36, - 1244, + 1246, 36, - 1247, + 1249, 36, - 1249 + 1251 ] } }, { "Repetition": { - "atom": 1243, + "atom": 1245, "min": 0, "max": null, "tag": "Repetition" @@ -8482,7 +8494,7 @@ { "Named": { "name": "member_fields", - "atom": 1251 + "atom": 1253 } }, { @@ -8492,7 +8504,7 @@ }, { "Repetition": { - "atom": 1253, + "atom": 1255, "min": 0, "max": 1, "tag": "Maybe" @@ -8507,15 +8519,13 @@ "Sequence": { "atoms": [ 36, - 1255 + 1257 ] } }, { "Sequence": { "atoms": [ - 36, - 1234, 36, 1236, 36, @@ -8525,23 +8535,25 @@ 36, 1242, 36, - 1252, + 1244, 36, 1254, 36, - 1256 + 1256, + 36, + 1258 ] } }, { "Named": { "name": "member_fields_decl", - "atom": 1257 + "atom": 1259 } }, { "Entity": { - "atom": 1293 + "atom": 1295 } }, { @@ -8551,7 +8563,7 @@ }, { "Repetition": { - "atom": 1260, + "atom": 1262, "min": 0, "max": 1, "tag": "Maybe" @@ -8566,13 +8578,13 @@ "Sequence": { "atoms": [ 36, - 1262 + 1264 ] } }, { "Entity": { - "atom": 1271 + "atom": 1273 } }, { @@ -8598,15 +8610,15 @@ { "Alternative": { "atoms": [ - 1266, - 1267, - 1268 + 1268, + 1269, + 1270 ] } }, { "Repetition": { - "atom": 1269, + "atom": 1271, "min": 1, "max": null, "tag": "Repetition" @@ -8615,15 +8627,15 @@ { "Alternative": { "atoms": [ - 1265, - 1270 + 1267, + 1272 ] } }, { "Named": { "name": "from_table_name", - "atom": 1264 + "atom": 1266 } }, { @@ -8638,7 +8650,7 @@ }, { "Repetition": { - "atom": 1274, + "atom": 1276, "min": 0, "max": 1, "tag": "Maybe" @@ -8646,7 +8658,7 @@ }, { "Entity": { - "atom": 1280 + "atom": 1282 } }, { @@ -8661,7 +8673,7 @@ }, { "Repetition": { - "atom": 1278, + "atom": 1280, "min": 1, "max": null, "tag": "Repetition" @@ -8670,20 +8682,20 @@ { "Sequence": { "atoms": [ - 1277, - 1279 + 1279, + 1281 ] } }, { "Entity": { - "atom": 1271 + "atom": 1273 } }, { "Named": { "name": "artifact_table", - "atom": 1281 + "atom": 1283 } }, { @@ -8693,7 +8705,7 @@ }, { "Repetition": { - "atom": 1283, + "atom": 1285, "min": 0, "max": 1, "tag": "Maybe" @@ -8702,15 +8714,15 @@ { "Sequence": { "atoms": [ - 1276, - 1282, - 1284 + 1278, + 1284, + 1286 ] } }, { "Repetition": { - "atom": 1285, + "atom": 1287, "min": 0, "max": null, "tag": "Repetition" @@ -8724,16 +8736,16 @@ { "Sequence": { "atoms": [ - 1273, 1275, - 1286, - 1287 + 1277, + 1288, + 1289 ] } }, { "Repetition": { - "atom": 1288, + "atom": 1290, "min": 0, "max": 1, "tag": "Maybe" @@ -8746,7 +8758,7 @@ }, { "Repetition": { - "atom": 1290, + "atom": 1292, "min": 0, "max": 1, "tag": "Maybe" @@ -8755,28 +8767,28 @@ { "Sequence": { "atoms": [ - 36, - 1261, 36, 1263, 36, - 1272, + 1265, + 36, + 1274, 36, - 1289, + 1291, 36, - 1291 + 1293 ] } }, { "Named": { "name": "from_table_decl", - "atom": 1292 + "atom": 1294 } }, { "Entity": { - "atom": 1302 + "atom": 1304 } }, { @@ -8786,7 +8798,7 @@ }, { "Repetition": { - "atom": 1295, + "atom": 1297, "min": 0, "max": 1, "tag": "Maybe" @@ -8809,7 +8821,7 @@ }, { "Repetition": { - "atom": 1299, + "atom": 1301, "min": 0, "max": 1, "tag": "Maybe" @@ -8819,25 +8831,25 @@ "Sequence": { "atoms": [ 36, - 1296, + 1298, 36, - 1297, + 1299, 36, - 1298, + 1300, 36, - 1300 + 1302 ] } }, { "Named": { "name": "value_set_decl", - "atom": 1301 + "atom": 1303 } }, { "Entity": { - "atom": 1341 + "atom": 1343 } }, { @@ -8847,7 +8859,7 @@ }, { "Repetition": { - "atom": 1304, + "atom": 1306, "min": 0, "max": 1, "tag": "Maybe" @@ -8855,7 +8867,7 @@ }, { "Entity": { - "atom": 1310 + "atom": 1312 } }, { @@ -8870,7 +8882,7 @@ }, { "Repetition": { - "atom": 1308, + "atom": 1310, "min": 1, "max": null, "tag": "Repetition" @@ -8879,14 +8891,14 @@ { "Sequence": { "atoms": [ - 1307, - 1309 + 1309, + 1311 ] } }, { "Entity": { - "atom": 1314 + "atom": 1316 } }, { @@ -8896,26 +8908,26 @@ }, { "Entity": { - "atom": 1271 + "atom": 1273 } }, { "Alternative": { "atoms": [ - 1312, - 1313 + 1314, + 1315 ] } }, { "Named": { "name": "value_name", - "atom": 1311 + "atom": 1313 } }, { "Entity": { - "atom": 1336 + "atom": 1338 } }, { @@ -8927,7 +8939,7 @@ "Sequence": { "atoms": [ 36, - 1317 + 1319 ] } }, @@ -8938,7 +8950,7 @@ }, { "Repetition": { - "atom": 1319, + "atom": 1321, "min": 0, "max": 1, "tag": "Maybe" @@ -8946,7 +8958,7 @@ }, { "Entity": { - "atom": 1331 + "atom": 1333 } }, { @@ -8961,33 +8973,33 @@ }, { "Entity": { - "atom": 1097 + "atom": 1099 } }, { "Entity": { - "atom": 1054 + "atom": 1056 } }, { "Entity": { - "atom": 988 + "atom": 990 } }, { "Entity": { - "atom": 1194 + "atom": 1196 } }, { "Alternative": { "atoms": [ - 1322, - 1323, 1324, 1325, 1326, - 1327 + 1327, + 1328, + 1329 ] } }, @@ -8998,7 +9010,7 @@ }, { "Repetition": { - "atom": 1329, + "atom": 1331, "min": 0, "max": 1, "tag": "Maybe" @@ -9008,15 +9020,15 @@ "Sequence": { "atoms": [ 36, - 1328, + 1330, 36, - 1330 + 1332 ] } }, { "Repetition": { - "atom": 1321, + "atom": 1323, "min": 0, "max": null, "tag": "Repetition" @@ -9025,7 +9037,7 @@ { "Named": { "name": "members", - "atom": 1332 + "atom": 1334 } }, { @@ -9037,27 +9049,27 @@ "Sequence": { "atoms": [ 36, - 1334 + 1336 ] } }, { "Sequence": { "atoms": [ - 36, - 1318, 36, 1320, 36, - 1333, + 1322, + 36, + 1335, 36, - 1335 + 1337 ] } }, { "Repetition": { - "atom": 1316, + "atom": 1318, "min": 0, "max": 1, "tag": "Maybe" @@ -9070,7 +9082,7 @@ }, { "Repetition": { - "atom": 1338, + "atom": 1340, "min": 0, "max": 1, "tag": "Maybe" @@ -9080,27 +9092,27 @@ "Sequence": { "atoms": [ 36, - 1305, + 1307, 36, - 1306, + 1308, 36, - 1315, + 1317, 36, - 1337, + 1339, 36, - 1339 + 1341 ] } }, { "Named": { "name": "value_decl", - "atom": 1340 + "atom": 1342 } }, { "Entity": { - "atom": 1350 + "atom": 1352 } }, { @@ -9110,7 +9122,7 @@ }, { "Repetition": { - "atom": 1343, + "atom": 1345, "min": 0, "max": 1, "tag": "Maybe" @@ -9123,19 +9135,19 @@ }, { "Entity": { - "atom": 1201 + "atom": 1203 } }, { "Entity": { - "atom": 1177 + "atom": 1179 } }, { "Alternative": { "atoms": [ - 1346, - 1347 + 1348, + 1349 ] } }, @@ -9143,54 +9155,54 @@ "Sequence": { "atoms": [ 36, - 1344, + 1346, 36, - 1345, + 1347, 36, - 1348 + 1350 ] } }, { "Named": { "name": "attributes", - "atom": 1349 + "atom": 1351 } }, { "Entity": { - "atom": 1114 + "atom": 1116 } }, { "Entity": { - "atom": 1162 + "atom": 1164 } }, { "Entity": { - "atom": 988 + "atom": 990 } }, { "Entity": { - "atom": 1194 + "atom": 1196 } }, { "Alternative": { "atoms": [ - 1230, - 1231, 1232, - 1259, - 1294, - 1303, - 1342, - 1351, - 1352, + 1233, + 1234, + 1261, + 1296, + 1305, + 1344, 1353, - 1354 + 1354, + 1355, + 1356 ] } }, @@ -9201,7 +9213,7 @@ }, { "Repetition": { - "atom": 1356, + "atom": 1358, "min": 0, "max": 1, "tag": "Maybe" @@ -9211,15 +9223,15 @@ "Sequence": { "atoms": [ 36, - 1229, + 1231, 36, - 1357 + 1359 ] } }, { "Repetition": { - "atom": 1228, + "atom": 1230, "min": 0, "max": null, "tag": "Repetition" @@ -9228,7 +9240,7 @@ { "Named": { "name": "members", - "atom": 1359 + "atom": 1361 } }, { @@ -9240,27 +9252,27 @@ "Sequence": { "atoms": [ 36, - 1361 + 1363 ] } }, { "Sequence": { "atoms": [ - 36, - 1225, 36, 1227, 36, - 1360, + 1229, + 36, + 1362, 36, - 1362 + 1364 ] } }, { "Repetition": { - "atom": 1223, + "atom": 1225, "min": 0, "max": 1, "tag": "Maybe" @@ -9269,14 +9281,12 @@ { "Sequence": { "atoms": [ - 36, - 1207, 36, 1209, 36, - 1210, + 1211, 36, - 1216, + 1212, 36, 1218, 36, @@ -9284,19 +9294,21 @@ 36, 1222, 36, - 1364 + 1224, + 36, + 1366 ] } }, { "Named": { "name": "enums", - "atom": 1205 + "atom": 1207 } }, { "Entity": { - "atom": 1383 + "atom": 1385 } }, { @@ -9306,7 +9318,7 @@ }, { "Repetition": { - "atom": 1368, + "atom": 1370, "min": 0, "max": 1, "tag": "Maybe" @@ -9319,7 +9331,7 @@ }, { "Repetition": { - "atom": 1370, + "atom": 1372, "min": 0, "max": 1, "tag": "Maybe" @@ -9327,7 +9339,7 @@ }, { "Entity": { - "atom": 1376 + "atom": 1378 } }, { @@ -9342,7 +9354,7 @@ }, { "Repetition": { - "atom": 1374, + "atom": 1376, "min": 1, "max": null, "tag": "Repetition" @@ -9351,8 +9363,8 @@ { "Sequence": { "atoms": [ - 1373, - 1375 + 1375, + 1377 ] } }, @@ -9363,7 +9375,7 @@ }, { "Repetition": { - "atom": 1377, + "atom": 1379, "min": 0, "max": 1, "tag": "Maybe" @@ -9377,7 +9389,7 @@ { "Named": { "name": "name", - "atom": 1379 + "atom": 1381 } }, { @@ -9387,7 +9399,7 @@ }, { "Repetition": { - "atom": 1381, + "atom": 1383, "min": 0, "max": 1, "tag": "Maybe" @@ -9396,30 +9408,30 @@ { "Sequence": { "atoms": [ - 36, - 1369, 36, 1371, 36, - 1372, + 1373, 36, - 1378, + 1374, 36, 1380, 36, - 1382 + 1382, + 36, + 1384 ] } }, { "Named": { "name": "primitives", - "atom": 1367 + "atom": 1369 } }, { "Entity": { - "atom": 1415 + "atom": 1417 } }, { @@ -9429,7 +9441,7 @@ }, { "Repetition": { - "atom": 1386, + "atom": 1388, "min": 0, "max": 1, "tag": "Maybe" @@ -9442,7 +9454,7 @@ }, { "Repetition": { - "atom": 1388, + "atom": 1390, "min": 0, "max": 1, "tag": "Maybe" @@ -9450,7 +9462,7 @@ }, { "Entity": { - "atom": 1394 + "atom": 1396 } }, { @@ -9465,7 +9477,7 @@ }, { "Repetition": { - "atom": 1392, + "atom": 1394, "min": 1, "max": null, "tag": "Repetition" @@ -9474,8 +9486,8 @@ { "Sequence": { "atoms": [ - 1391, - 1393 + 1393, + 1395 ] } }, @@ -9486,7 +9498,7 @@ }, { "Repetition": { - "atom": 1395, + "atom": 1397, "min": 0, "max": 1, "tag": "Maybe" @@ -9500,7 +9512,7 @@ { "Named": { "name": "name", - "atom": 1397 + "atom": 1399 } }, { @@ -9510,7 +9522,7 @@ }, { "Repetition": { - "atom": 1399, + "atom": 1401, "min": 0, "max": 1, "tag": "Maybe" @@ -9523,7 +9535,7 @@ }, { "Repetition": { - "atom": 1401, + "atom": 1403, "min": 0, "max": 1, "tag": "Maybe" @@ -9531,7 +9543,7 @@ }, { "Entity": { - "atom": 1413 + "atom": 1415 } }, { @@ -9543,7 +9555,7 @@ "Sequence": { "atoms": [ 36, - 1404 + 1406 ] } }, @@ -9554,7 +9566,7 @@ }, { "Repetition": { - "atom": 1406, + "atom": 1408, "min": 0, "max": 1, "tag": "Maybe" @@ -9562,12 +9574,12 @@ }, { "Entity": { - "atom": 1358 + "atom": 1360 } }, { "Repetition": { - "atom": 1408, + "atom": 1410, "min": 0, "max": null, "tag": "Repetition" @@ -9576,7 +9588,7 @@ { "Named": { "name": "members", - "atom": 1409 + "atom": 1411 } }, { @@ -9588,27 +9600,27 @@ "Sequence": { "atoms": [ 36, - 1411 + 1413 ] } }, { "Sequence": { "atoms": [ - 36, - 1405, 36, 1407, 36, - 1410, + 1409, 36, - 1412 + 1412, + 36, + 1414 ] } }, { "Repetition": { - "atom": 1403, + "atom": 1405, "min": 0, "max": 1, "tag": "Maybe" @@ -9617,14 +9629,12 @@ { "Sequence": { "atoms": [ - 36, - 1387, 36, 1389, 36, - 1390, + 1391, 36, - 1396, + 1392, 36, 1398, 36, @@ -9632,19 +9642,21 @@ 36, 1402, 36, - 1414 + 1404, + 36, + 1416 ] } }, { "Named": { "name": "data_types", - "atom": 1385 + "atom": 1387 } }, { "Entity": { - "atom": 1444 + "atom": 1446 } }, { @@ -9654,7 +9666,7 @@ }, { "Repetition": { - "atom": 1418, + "atom": 1420, "min": 0, "max": 1, "tag": "Maybe" @@ -9662,7 +9674,7 @@ }, { "Entity": { - "atom": 1424 + "atom": 1426 } }, { @@ -9677,7 +9689,7 @@ }, { "Repetition": { - "atom": 1422, + "atom": 1424, "min": 1, "max": null, "tag": "Repetition" @@ -9686,8 +9698,8 @@ { "Sequence": { "atoms": [ - 1421, - 1423 + 1423, + 1425 ] } }, @@ -9699,12 +9711,12 @@ { "Named": { "name": "name", - "atom": 1425 + "atom": 1427 } }, { "Entity": { - "atom": 1440 + "atom": 1442 } }, { @@ -9716,7 +9728,7 @@ "Sequence": { "atoms": [ 36, - 1428 + 1430 ] } }, @@ -9727,7 +9739,7 @@ }, { "Repetition": { - "atom": 1430, + "atom": 1432, "min": 0, "max": 1, "tag": "Maybe" @@ -9735,7 +9747,7 @@ }, { "Entity": { - "atom": 1435 + "atom": 1437 } }, { @@ -9745,7 +9757,7 @@ }, { "Repetition": { - "atom": 1433, + "atom": 1435, "min": 0, "max": 1, "tag": "Maybe" @@ -9757,13 +9769,13 @@ 36, 173, 36, - 1434 + 1436 ] } }, { "Repetition": { - "atom": 1432, + "atom": 1434, "min": 0, "max": null, "tag": "Repetition" @@ -9772,7 +9784,7 @@ { "Named": { "name": "members", - "atom": 1436 + "atom": 1438 } }, { @@ -9784,21 +9796,21 @@ "Sequence": { "atoms": [ 36, - 1438 + 1440 ] } }, { "Sequence": { "atoms": [ - 36, - 1429, 36, 1431, 36, - 1437, + 1433, 36, - 1439 + 1439, + 36, + 1441 ] } }, @@ -9809,7 +9821,7 @@ }, { "Repetition": { - "atom": 1441, + "atom": 1443, "min": 0, "max": 1, "tag": "Maybe" @@ -9819,27 +9831,27 @@ "Sequence": { "atoms": [ 36, - 1419, + 1421, 36, - 1420, + 1422, 36, - 1426, + 1428, 36, - 1427, + 1429, 36, - 1442 + 1444 ] } }, { "Named": { "name": "packages", - "atom": 1443 + "atom": 1445 } }, { "Entity": { - "atom": 1491 + "atom": 1493 } }, { @@ -9849,7 +9861,7 @@ }, { "Repetition": { - "atom": 1446, + "atom": 1448, "min": 0, "max": 1, "tag": "Maybe" @@ -9857,7 +9869,7 @@ }, { "Entity": { - "atom": 1452 + "atom": 1454 } }, { @@ -9872,7 +9884,7 @@ }, { "Repetition": { - "atom": 1450, + "atom": 1452, "min": 1, "max": null, "tag": "Repetition" @@ -9881,14 +9893,14 @@ { "Sequence": { "atoms": [ - 1449, - 1451 + 1451, + 1453 ] } }, { "Entity": { - "atom": 1490 + "atom": 1492 } }, { @@ -9903,7 +9915,7 @@ }, { "Lookahead": { - "atom": 1455, + "atom": 1457, "positive": false } }, @@ -9915,14 +9927,14 @@ { "Sequence": { "atoms": [ - 1456, - 1457 + 1458, + 1459 ] } }, { "Repetition": { - "atom": 1458, + "atom": 1460, "min": 1, "max": null, "tag": "Repetition" @@ -9931,7 +9943,7 @@ { "Named": { "name": "title", - "atom": 1459 + "atom": 1461 } }, { @@ -9942,9 +9954,9 @@ { "Sequence": { "atoms": [ - 1454, - 1460, - 1461 + 1456, + 1462, + 1463 ] } }, @@ -9960,7 +9972,7 @@ }, { "Lookahead": { - "atom": 1464, + "atom": 1466, "positive": false } }, @@ -9972,14 +9984,14 @@ { "Sequence": { "atoms": [ - 1465, - 1466 + 1467, + 1468 ] } }, { "Repetition": { - "atom": 1467, + "atom": 1469, "min": 1, "max": null, "tag": "Repetition" @@ -9988,7 +10000,7 @@ { "Named": { "name": "title", - "atom": 1468 + "atom": 1470 } }, { @@ -9999,9 +10011,9 @@ { "Sequence": { "atoms": [ - 1463, - 1469, - 1470 + 1465, + 1471, + 1472 ] } }, @@ -10083,8 +10095,6 @@ { "Alternative": { "atoms": [ - 1472, - 1473, 1474, 1475, 1476, @@ -10097,13 +10107,15 @@ 1483, 1484, 1485, - 1486 + 1486, + 1487, + 1488 ] } }, { "Repetition": { - "atom": 1487, + "atom": 1489, "min": 1, "max": null, "tag": "Repetition" @@ -10112,15 +10124,15 @@ { "Named": { "name": "title", - "atom": 1488 + "atom": 1490 } }, { "Alternative": { "atoms": [ - 1462, - 1471, - 1489 + 1464, + 1473, + 1491 ] } }, @@ -10128,17 +10140,17 @@ "Sequence": { "atoms": [ 36, - 1447, + 1449, 36, - 1448, + 1450, 36, - 1453 + 1455 ] } }, { "Entity": { - "atom": 1538 + "atom": 1540 } }, { @@ -10148,7 +10160,7 @@ }, { "Repetition": { - "atom": 1493, + "atom": 1495, "min": 0, "max": 1, "tag": "Maybe" @@ -10156,7 +10168,7 @@ }, { "Entity": { - "atom": 1499 + "atom": 1501 } }, { @@ -10171,7 +10183,7 @@ }, { "Repetition": { - "atom": 1497, + "atom": 1499, "min": 1, "max": null, "tag": "Repetition" @@ -10180,14 +10192,14 @@ { "Sequence": { "atoms": [ - 1496, - 1498 + 1498, + 1500 ] } }, { "Entity": { - "atom": 1537 + "atom": 1539 } }, { @@ -10202,7 +10214,7 @@ }, { "Lookahead": { - "atom": 1502, + "atom": 1504, "positive": false } }, @@ -10214,14 +10226,14 @@ { "Sequence": { "atoms": [ - 1503, - 1504 + 1505, + 1506 ] } }, { "Repetition": { - "atom": 1505, + "atom": 1507, "min": 1, "max": null, "tag": "Repetition" @@ -10230,7 +10242,7 @@ { "Named": { "name": "caption", - "atom": 1506 + "atom": 1508 } }, { @@ -10241,9 +10253,9 @@ { "Sequence": { "atoms": [ - 1501, - 1507, - 1508 + 1503, + 1509, + 1510 ] } }, @@ -10259,7 +10271,7 @@ }, { "Lookahead": { - "atom": 1511, + "atom": 1513, "positive": false } }, @@ -10271,14 +10283,14 @@ { "Sequence": { "atoms": [ - 1512, - 1513 + 1514, + 1515 ] } }, { "Repetition": { - "atom": 1514, + "atom": 1516, "min": 1, "max": null, "tag": "Repetition" @@ -10287,7 +10299,7 @@ { "Named": { "name": "caption", - "atom": 1515 + "atom": 1517 } }, { @@ -10298,9 +10310,9 @@ { "Sequence": { "atoms": [ - 1510, - 1516, - 1517 + 1512, + 1518, + 1519 ] } }, @@ -10382,8 +10394,6 @@ { "Alternative": { "atoms": [ - 1519, - 1520, 1521, 1522, 1523, @@ -10396,13 +10406,15 @@ 1530, 1531, 1532, - 1533 + 1533, + 1534, + 1535 ] } }, { "Repetition": { - "atom": 1534, + "atom": 1536, "min": 1, "max": null, "tag": "Repetition" @@ -10411,15 +10423,15 @@ { "Named": { "name": "caption", - "atom": 1535 + "atom": 1537 } }, { "Alternative": { "atoms": [ - 1509, - 1518, - 1536 + 1511, + 1520, + 1538 ] } }, @@ -10427,17 +10439,17 @@ "Sequence": { "atoms": [ 36, - 1494, + 1496, 36, - 1495, + 1497, 36, - 1500 + 1502 ] } }, { "Entity": { - "atom": 1562 + "atom": 1564 } }, { @@ -10447,7 +10459,7 @@ }, { "Repetition": { - "atom": 1540, + "atom": 1542, "min": 0, "max": 1, "tag": "Maybe" @@ -10455,7 +10467,7 @@ }, { "Entity": { - "atom": 1546 + "atom": 1548 } }, { @@ -10470,7 +10482,7 @@ }, { "Repetition": { - "atom": 1544, + "atom": 1546, "min": 1, "max": null, "tag": "Repetition" @@ -10479,14 +10491,14 @@ { "Sequence": { "atoms": [ - 1543, - 1545 + 1545, + 1547 ] } }, { "Entity": { - "atom": 1561 + "atom": 1563 } }, { @@ -10496,7 +10508,7 @@ }, { "Repetition": { - "atom": 1548, + "atom": 1550, "min": 0, "max": 1, "tag": "Maybe" @@ -10535,18 +10547,18 @@ { "Alternative": { "atoms": [ - 1550, - 1551, 1552, 1553, 1554, - 1555 + 1555, + 1556, + 1557 ] } }, { "Repetition": { - "atom": 1556, + "atom": 1558, "min": 1, "max": null, "tag": "Repetition" @@ -10555,7 +10567,7 @@ { "Named": { "name": "fontname", - "atom": 1557 + "atom": 1559 } }, { @@ -10565,7 +10577,7 @@ }, { "Repetition": { - "atom": 1559, + "atom": 1561, "min": 0, "max": 1, "tag": "Maybe" @@ -10575,11 +10587,11 @@ "Sequence": { "atoms": [ 36, - 1549, + 1551, 36, - 1558, + 1560, 36, - 1560 + 1562 ] } }, @@ -10587,17 +10599,17 @@ "Sequence": { "atoms": [ 36, - 1541, + 1543, 36, - 1542, + 1544, 36, - 1547 + 1549 ] } }, { "Entity": { - "atom": 1671 + "atom": 1673 } }, { @@ -10607,7 +10619,7 @@ }, { "Repetition": { - "atom": 1564, + "atom": 1566, "min": 0, "max": 1, "tag": "Maybe" @@ -10615,7 +10627,7 @@ }, { "Entity": { - "atom": 1570 + "atom": 1572 } }, { @@ -10630,7 +10642,7 @@ }, { "Repetition": { - "atom": 1568, + "atom": 1570, "min": 1, "max": null, "tag": "Repetition" @@ -10639,8 +10651,8 @@ { "Sequence": { "atoms": [ - 1567, - 1569 + 1569, + 1571 ] } }, @@ -10652,12 +10664,12 @@ { "Named": { "name": "name", - "atom": 1571 + "atom": 1573 } }, { "Repetition": { - "atom": 1572, + "atom": 1574, "min": 0, "max": 1, "tag": "Maybe" @@ -10665,7 +10677,7 @@ }, { "Entity": { - "atom": 1670 + "atom": 1672 } }, { @@ -10677,7 +10689,7 @@ "Sequence": { "atoms": [ 36, - 1575 + 1577 ] } }, @@ -10688,7 +10700,7 @@ }, { "Repetition": { - "atom": 1577, + "atom": 1579, "min": 0, "max": 1, "tag": "Maybe" @@ -10696,12 +10708,12 @@ }, { "Entity": { - "atom": 1665 + "atom": 1667 } }, { "Entity": { - "atom": 1590 + "atom": 1592 } }, { @@ -10711,7 +10723,7 @@ }, { "Repetition": { - "atom": 1581, + "atom": 1583, "min": 0, "max": 1, "tag": "Maybe" @@ -10719,7 +10731,7 @@ }, { "Entity": { - "atom": 1587 + "atom": 1589 } }, { @@ -10734,7 +10746,7 @@ }, { "Repetition": { - "atom": 1585, + "atom": 1587, "min": 1, "max": null, "tag": "Repetition" @@ -10743,8 +10755,8 @@ { "Sequence": { "atoms": [ - 1584, - 1586 + 1586, + 1588 ] } }, @@ -10756,24 +10768,24 @@ { "Named": { "name": "owner_end_type", - "atom": 1588 + "atom": 1590 } }, { "Sequence": { "atoms": [ 36, - 1582, + 1584, 36, - 1583, + 1585, 36, - 1589 + 1591 ] } }, { "Entity": { - "atom": 1601 + "atom": 1603 } }, { @@ -10783,7 +10795,7 @@ }, { "Repetition": { - "atom": 1592, + "atom": 1594, "min": 0, "max": 1, "tag": "Maybe" @@ -10791,7 +10803,7 @@ }, { "Entity": { - "atom": 1598 + "atom": 1600 } }, { @@ -10806,7 +10818,7 @@ }, { "Repetition": { - "atom": 1596, + "atom": 1598, "min": 1, "max": null, "tag": "Repetition" @@ -10815,8 +10827,8 @@ { "Sequence": { "atoms": [ - 1595, - 1597 + 1597, + 1599 ] } }, @@ -10828,24 +10840,24 @@ { "Named": { "name": "member_end_type", - "atom": 1599 + "atom": 1601 } }, { "Sequence": { "atoms": [ 36, - 1593, + 1595, 36, - 1594, + 1596, 36, - 1600 + 1602 ] } }, { "Entity": { - "atom": 1630 + "atom": 1632 } }, { @@ -10855,7 +10867,7 @@ }, { "Repetition": { - "atom": 1603, + "atom": 1605, "min": 0, "max": 1, "tag": "Maybe" @@ -10863,7 +10875,7 @@ }, { "Entity": { - "atom": 1609 + "atom": 1611 } }, { @@ -10878,7 +10890,7 @@ }, { "Repetition": { - "atom": 1607, + "atom": 1609, "min": 1, "max": null, "tag": "Repetition" @@ -10887,8 +10899,8 @@ { "Sequence": { "atoms": [ - 1606, - 1608 + 1608, + 1610 ] } }, @@ -10900,12 +10912,12 @@ { "Named": { "name": "owner_end", - "atom": 1610 + "atom": 1612 } }, { "Entity": { - "atom": 1619 + "atom": 1621 } }, { @@ -10917,7 +10929,7 @@ "Sequence": { "atoms": [ 36, - 1613 + 1615 ] } }, @@ -10928,7 +10940,7 @@ }, { "Repetition": { - "atom": 1615, + "atom": 1617, "min": 0, "max": 1, "tag": "Maybe" @@ -10942,24 +10954,24 @@ { "Named": { "name": "owner_end_attribute_name", - "atom": 1617 + "atom": 1619 } }, { "Sequence": { "atoms": [ - 36, - 1614, 36, 1616, 36, - 1618 + 1618, + 36, + 1620 ] } }, { "Repetition": { - "atom": 1612, + "atom": 1614, "min": 0, "max": 1, "tag": "Maybe" @@ -10967,7 +10979,7 @@ }, { "Entity": { - "atom": 1628 + "atom": 1630 } }, { @@ -10979,7 +10991,7 @@ "Sequence": { "atoms": [ 36, - 1622 + 1624 ] } }, @@ -10991,7 +11003,7 @@ { "Named": { "name": "owner_end_cardinality", - "atom": 1624 + "atom": 1626 } }, { @@ -11003,25 +11015,25 @@ "Sequence": { "atoms": [ 36, - 1626 + 1628 ] } }, { "Sequence": { "atoms": [ - 36, - 1623, 36, 1625, 36, - 1627 + 1627, + 36, + 1629 ] } }, { "Repetition": { - "atom": 1621, + "atom": 1623, "min": 0, "max": 1, "tag": "Maybe" @@ -11031,21 +11043,21 @@ "Sequence": { "atoms": [ 36, - 1604, + 1606, 36, - 1605, + 1607, 36, - 1611, + 1613, 36, - 1620, + 1622, 36, - 1629 + 1631 ] } }, { "Entity": { - "atom": 1659 + "atom": 1661 } }, { @@ -11055,7 +11067,7 @@ }, { "Repetition": { - "atom": 1632, + "atom": 1634, "min": 0, "max": 1, "tag": "Maybe" @@ -11063,7 +11075,7 @@ }, { "Entity": { - "atom": 1638 + "atom": 1640 } }, { @@ -11078,7 +11090,7 @@ }, { "Repetition": { - "atom": 1636, + "atom": 1638, "min": 1, "max": null, "tag": "Repetition" @@ -11087,8 +11099,8 @@ { "Sequence": { "atoms": [ - 1635, - 1637 + 1637, + 1639 ] } }, @@ -11100,12 +11112,12 @@ { "Named": { "name": "member_end", - "atom": 1639 + "atom": 1641 } }, { "Entity": { - "atom": 1648 + "atom": 1650 } }, { @@ -11117,7 +11129,7 @@ "Sequence": { "atoms": [ 36, - 1642 + 1644 ] } }, @@ -11128,7 +11140,7 @@ }, { "Repetition": { - "atom": 1644, + "atom": 1646, "min": 0, "max": 1, "tag": "Maybe" @@ -11142,24 +11154,24 @@ { "Named": { "name": "member_end_attribute_name", - "atom": 1646 + "atom": 1648 } }, { "Sequence": { "atoms": [ - 36, - 1643, 36, 1645, 36, - 1647 + 1647, + 36, + 1649 ] } }, { "Repetition": { - "atom": 1641, + "atom": 1643, "min": 0, "max": 1, "tag": "Maybe" @@ -11167,7 +11179,7 @@ }, { "Entity": { - "atom": 1657 + "atom": 1659 } }, { @@ -11179,7 +11191,7 @@ "Sequence": { "atoms": [ 36, - 1651 + 1653 ] } }, @@ -11191,7 +11203,7 @@ { "Named": { "name": "member_end_cardinality", - "atom": 1653 + "atom": 1655 } }, { @@ -11203,25 +11215,25 @@ "Sequence": { "atoms": [ 36, - 1655 + 1657 ] } }, { "Sequence": { "atoms": [ - 36, - 1652, 36, 1654, 36, - 1656 + 1656, + 36, + 1658 ] } }, { "Repetition": { - "atom": 1650, + "atom": 1652, "min": 0, "max": 1, "tag": "Maybe" @@ -11231,37 +11243,37 @@ "Sequence": { "atoms": [ 36, - 1633, + 1635, 36, - 1634, + 1636, 36, - 1640, + 1642, 36, - 1649, + 1651, 36, - 1658 + 1660 ] } }, { "Entity": { - "atom": 988 + "atom": 990 } }, { "Entity": { - "atom": 1194 + "atom": 1196 } }, { "Alternative": { "atoms": [ - 1580, - 1591, - 1602, - 1631, - 1660, - 1661 + 1582, + 1593, + 1604, + 1633, + 1662, + 1663 ] } }, @@ -11272,7 +11284,7 @@ }, { "Repetition": { - "atom": 1663, + "atom": 1665, "min": 0, "max": 1, "tag": "Maybe" @@ -11282,15 +11294,15 @@ "Sequence": { "atoms": [ 36, - 1662, + 1664, 36, - 1664 + 1666 ] } }, { "Repetition": { - "atom": 1579, + "atom": 1581, "min": 0, "max": null, "tag": "Repetition" @@ -11299,7 +11311,7 @@ { "Named": { "name": "members", - "atom": 1666 + "atom": 1668 } }, { @@ -11311,21 +11323,21 @@ "Sequence": { "atoms": [ 36, - 1668 + 1670 ] } }, { "Sequence": { "atoms": [ - 36, - 1576, 36, 1578, 36, - 1667, + 1580, + 36, + 1669, 36, - 1669 + 1671 ] } }, @@ -11333,30 +11345,30 @@ "Sequence": { "atoms": [ 36, - 1565, + 1567, 36, - 1566, + 1568, 36, - 1573, + 1575, 36, - 1574 + 1576 ] } }, { "Named": { "name": "associations", - "atom": 1563 + "atom": 1565 } }, { "Entity": { - "atom": 988 + "atom": 990 } }, { "Entity": { - "atom": 1194 + "atom": 1196 } }, { @@ -11364,17 +11376,17 @@ "atoms": [ 174, 241, - 1204, - 1366, - 1384, - 1416, - 1417, - 1445, - 1492, - 1539, - 1672, - 1673, - 1674 + 1206, + 1368, + 1386, + 1418, + 1419, + 1447, + 1494, + 1541, + 1674, + 1675, + 1676 ] } }, @@ -11384,7 +11396,7 @@ 36, 173, 36, - 1434 + 1436 ] } }, @@ -11398,7 +11410,7 @@ }, { "Repetition": { - "atom": 1677, + "atom": 1679, "min": 0, "max": null, "tag": "Repetition" @@ -11407,7 +11419,7 @@ { "Named": { "name": "members", - "atom": 1678 + "atom": 1680 } }, { @@ -11419,7 +11431,7 @@ "Sequence": { "atoms": [ 36, - 1680 + 1682 ] } }, @@ -11430,7 +11442,7 @@ }, { "Repetition": { - "atom": 1682, + "atom": 1684, "min": 0, "max": 1, "tag": "Maybe" @@ -11452,22 +11464,22 @@ 36, 114, 36, - 1679, - 36, 1681, 36, - 1683 + 1683, + 36, + 1685 ] } }, { "Entity": { - "atom": 1709 + "atom": 1711 } }, { "Entity": { - "atom": 1706 + "atom": 1708 } }, { @@ -11477,7 +11489,7 @@ }, { "Repetition": { - "atom": 1687, + "atom": 1689, "min": 0, "max": 1, "tag": "Maybe" @@ -11492,7 +11504,7 @@ "Sequence": { "atoms": [ 36, - 1689 + 1691 ] } }, @@ -11504,12 +11516,12 @@ { "Named": { "name": "name", - "atom": 1691 + "atom": 1693 } }, { "Entity": { - "atom": 1703 + "atom": 1705 } }, { @@ -11521,7 +11533,7 @@ "Sequence": { "atoms": [ 36, - 1694 + 1696 ] } }, @@ -11532,7 +11544,7 @@ }, { "Repetition": { - "atom": 1696, + "atom": 1698, "min": 0, "max": 1, "tag": "Maybe" @@ -11540,12 +11552,12 @@ }, { "Entity": { - "atom": 1676 + "atom": 1678 } }, { "Repetition": { - "atom": 1698, + "atom": 1700, "min": 0, "max": null, "tag": "Repetition" @@ -11554,7 +11566,7 @@ { "Named": { "name": "members", - "atom": 1699 + "atom": 1701 } }, { @@ -11566,21 +11578,21 @@ "Sequence": { "atoms": [ 36, - 1701 + 1703 ] } }, { "Sequence": { "atoms": [ - 36, - 1695, 36, 1697, 36, - 1700, + 1699, 36, - 1702 + 1702, + 36, + 1704 ] } }, @@ -11591,7 +11603,7 @@ }, { "Repetition": { - "atom": 1704, + "atom": 1706, "min": 0, "max": 1, "tag": "Maybe" @@ -11600,16 +11612,16 @@ { "Sequence": { "atoms": [ - 36, - 1688, 36, 1690, 36, 1692, 36, - 1693, + 1694, + 36, + 1695, 36, - 1705 + 1707 ] } }, @@ -11620,7 +11632,7 @@ }, { "Repetition": { - "atom": 1707, + "atom": 1709, "min": 0, "max": 1, "tag": "Maybe" @@ -11630,20 +11642,20 @@ "Sequence": { "atoms": [ 36, - 1686, + 1688, 36, - 1708 + 1710 ] } }, { "Entity": { - "atom": 1817 + "atom": 1819 } }, { "Entity": { - "atom": 1814 + "atom": 1816 } }, { @@ -11653,7 +11665,7 @@ }, { "Repetition": { - "atom": 1712, + "atom": 1714, "min": 0, "max": 1, "tag": "Maybe" @@ -11668,7 +11680,7 @@ "Sequence": { "atoms": [ 36, - 1714 + 1716 ] } }, @@ -11680,12 +11692,12 @@ { "Named": { "name": "name", - "atom": 1716 + "atom": 1718 } }, { "Entity": { - "atom": 1811 + "atom": 1813 } }, { @@ -11697,7 +11709,7 @@ "Sequence": { "atoms": [ 36, - 1719 + 1721 ] } }, @@ -11708,7 +11720,7 @@ }, { "Repetition": { - "atom": 1721, + "atom": 1723, "min": 0, "max": 1, "tag": "Maybe" @@ -11716,22 +11728,22 @@ }, { "Entity": { - "atom": 1806 + "atom": 1808 } }, { "Entity": { - "atom": 1803 + "atom": 1805 } }, { "Entity": { - "atom": 1801 + "atom": 1803 } }, { "Entity": { - "atom": 1757 + "atom": 1759 } }, { @@ -11741,7 +11753,7 @@ }, { "Repetition": { - "atom": 1727, + "atom": 1729, "min": 0, "max": 1, "tag": "Maybe" @@ -11749,7 +11761,7 @@ }, { "Entity": { - "atom": 1733 + "atom": 1735 } }, { @@ -11764,7 +11776,7 @@ }, { "Repetition": { - "atom": 1731, + "atom": 1733, "min": 1, "max": null, "tag": "Repetition" @@ -11773,14 +11785,14 @@ { "Sequence": { "atoms": [ - 1730, - 1732 + 1732, + 1734 ] } }, { "Entity": { - "atom": 1743 + "atom": 1745 } }, { @@ -11795,7 +11807,7 @@ }, { "Lookahead": { - "atom": 1736, + "atom": 1738, "positive": false } }, @@ -11807,14 +11819,14 @@ { "Sequence": { "atoms": [ - 1737, - 1738 + 1739, + 1740 ] } }, { "Repetition": { - "atom": 1739, + "atom": 1741, "min": 0, "max": null, "tag": "Repetition" @@ -11823,7 +11835,7 @@ { "Named": { "name": "path", - "atom": 1740 + "atom": 1742 } }, { @@ -11834,15 +11846,15 @@ { "Sequence": { "atoms": [ - 1735, - 1741, - 1742 + 1737, + 1743, + 1744 ] } }, { "Entity": { - "atom": 1753 + "atom": 1755 } }, { @@ -11857,7 +11869,7 @@ }, { "Lookahead": { - "atom": 1746, + "atom": 1748, "positive": false } }, @@ -11869,14 +11881,14 @@ { "Sequence": { "atoms": [ - 1747, - 1748 + 1749, + 1750 ] } }, { "Repetition": { - "atom": 1749, + "atom": 1751, "min": 0, "max": null, "tag": "Repetition" @@ -11885,7 +11897,7 @@ { "Named": { "name": "path", - "atom": 1750 + "atom": 1752 } }, { @@ -11896,17 +11908,17 @@ { "Sequence": { "atoms": [ - 1745, - 1751, - 1752 + 1747, + 1753, + 1754 ] } }, { "Alternative": { "atoms": [ - 1734, - 1744 + 1736, + 1746 ] } }, @@ -11917,7 +11929,7 @@ }, { "Repetition": { - "atom": 1755, + "atom": 1757, "min": 0, "max": 1, "tag": "Maybe" @@ -11927,25 +11939,25 @@ "Sequence": { "atoms": [ 36, - 1728, + 1730, 36, - 1729, + 1731, 36, - 1754, + 1756, 36, - 1756 + 1758 ] } }, { "Named": { "name": "view_imports", - "atom": 1726 + "atom": 1728 } }, { "Entity": { - "atom": 1787 + "atom": 1789 } }, { @@ -11955,7 +11967,7 @@ }, { "Repetition": { - "atom": 1760, + "atom": 1762, "min": 0, "max": 1, "tag": "Maybe" @@ -11963,7 +11975,7 @@ }, { "Entity": { - "atom": 1766 + "atom": 1768 } }, { @@ -11978,7 +11990,7 @@ }, { "Repetition": { - "atom": 1764, + "atom": 1766, "min": 1, "max": null, "tag": "Repetition" @@ -11987,19 +11999,19 @@ { "Sequence": { "atoms": [ - 1763, - 1765 + 1765, + 1767 ] } }, { "Entity": { - "atom": 1783 + "atom": 1785 } }, { "Entity": { - "atom": 1778 + "atom": 1780 } }, { @@ -12040,19 +12052,19 @@ { "Alternative": { "atoms": [ - 1769, - 1770, 1771, 1772, 1773, 1774, - 1775 + 1775, + 1776, + 1777 ] } }, { "Repetition": { - "atom": 1776, + "atom": 1778, "min": 1, "max": null, "tag": "Repetition" @@ -12061,7 +12073,7 @@ { "Named": { "name": "entity_name", - "atom": 1777 + "atom": 1779 } }, { @@ -12071,21 +12083,21 @@ }, { "Entity": { - "atom": 1778 + "atom": 1780 } }, { "Sequence": { "atoms": [ - 1779, + 1781, 36, - 1780 + 1782 ] } }, { "Repetition": { - "atom": 1781, + "atom": 1783, "min": 0, "max": null, "tag": "Repetition" @@ -12095,16 +12107,16 @@ "Sequence": { "atoms": [ 36, - 1768, + 1770, 36, - 1782 + 1784 ] } }, { "Named": { "name": "show_list", - "atom": 1767 + "atom": 1769 } }, { @@ -12114,7 +12126,7 @@ }, { "Repetition": { - "atom": 1785, + "atom": 1787, "min": 0, "max": 1, "tag": "Maybe" @@ -12124,19 +12136,19 @@ "Sequence": { "atoms": [ 36, - 1761, + 1763, 36, - 1762, + 1764, 36, - 1784, + 1786, 36, - 1786 + 1788 ] } }, { "Entity": { - "atom": 1800 + "atom": 1802 } }, { @@ -12146,7 +12158,7 @@ }, { "Repetition": { - "atom": 1789, + "atom": 1791, "min": 0, "max": 1, "tag": "Maybe" @@ -12154,7 +12166,7 @@ }, { "Entity": { - "atom": 1795 + "atom": 1797 } }, { @@ -12169,7 +12181,7 @@ }, { "Repetition": { - "atom": 1793, + "atom": 1795, "min": 1, "max": null, "tag": "Repetition" @@ -12178,20 +12190,20 @@ { "Sequence": { "atoms": [ - 1792, - 1794 + 1794, + 1796 ] } }, { "Entity": { - "atom": 1783 + "atom": 1785 } }, { "Named": { "name": "hide_list", - "atom": 1796 + "atom": 1798 } }, { @@ -12201,7 +12213,7 @@ }, { "Repetition": { - "atom": 1798, + "atom": 1800, "min": 0, "max": 1, "tag": "Maybe" @@ -12211,35 +12223,35 @@ "Sequence": { "atoms": [ 36, - 1790, + 1792, 36, - 1791, + 1793, 36, - 1797, + 1799, 36, - 1799 + 1801 ] } }, { "Alternative": { "atoms": [ - 1758, - 1759, - 1788 + 1760, + 1761, + 1790 ] } }, { "Entity": { - "atom": 1675 + "atom": 1677 } }, { "Alternative": { "atoms": [ - 1725, - 1802 + 1727, + 1804 ] } }, @@ -12250,7 +12262,7 @@ }, { "Repetition": { - "atom": 1804, + "atom": 1806, "min": 0, "max": 1, "tag": "Maybe" @@ -12260,15 +12272,15 @@ "Sequence": { "atoms": [ 36, - 1724, + 1726, 36, - 1805 + 1807 ] } }, { "Repetition": { - "atom": 1723, + "atom": 1725, "min": 0, "max": null, "tag": "Repetition" @@ -12277,7 +12289,7 @@ { "Named": { "name": "members", - "atom": 1807 + "atom": 1809 } }, { @@ -12289,21 +12301,21 @@ "Sequence": { "atoms": [ 36, - 1809 + 1811 ] } }, { "Sequence": { "atoms": [ - 36, - 1720, 36, 1722, 36, - 1808, + 1724, + 36, + 1810, 36, - 1810 + 1812 ] } }, @@ -12314,7 +12326,7 @@ }, { "Repetition": { - "atom": 1812, + "atom": 1814, "min": 0, "max": 1, "tag": "Maybe" @@ -12323,16 +12335,16 @@ { "Sequence": { "atoms": [ - 36, - 1713, 36, 1715, 36, 1717, 36, - 1718, + 1719, 36, - 1813 + 1720, + 36, + 1815 ] } }, @@ -12343,7 +12355,7 @@ }, { "Repetition": { - "atom": 1815, + "atom": 1817, "min": 0, "max": 1, "tag": "Maybe" @@ -12353,15 +12365,15 @@ "Sequence": { "atoms": [ 36, - 1711, + 1713, 36, - 1816 + 1818 ] } }, { "Entity": { - "atom": 1988 + "atom": 1990 } }, { @@ -12371,7 +12383,7 @@ }, { "Repetition": { - "atom": 1819, + "atom": 1821, "min": 0, "max": 1, "tag": "Maybe" @@ -12386,7 +12398,7 @@ "Sequence": { "atoms": [ 36, - 1821 + 1823 ] } }, @@ -12403,20 +12415,20 @@ { "Alternative": { "atoms": [ - 1823, - 1824 + 1825, + 1826 ] } }, { "Named": { "name": "name", - "atom": 1825 + "atom": 1827 } }, { "Repetition": { - "atom": 1826, + "atom": 1828, "min": 0, "max": 1, "tag": "Maybe" @@ -12429,7 +12441,7 @@ }, { "Repetition": { - "atom": 1828, + "atom": 1830, "min": 0, "max": 1, "tag": "Maybe" @@ -12444,7 +12456,7 @@ "Sequence": { "atoms": [ 36, - 1830 + 1832 ] } }, @@ -12455,7 +12467,7 @@ }, { "Repetition": { - "atom": 1832, + "atom": 1834, "min": 0, "max": 1, "tag": "Maybe" @@ -12463,17 +12475,17 @@ }, { "Entity": { - "atom": 1982 + "atom": 1984 } }, { "Entity": { - "atom": 1977 + "atom": 1979 } }, { "Entity": { - "atom": 1871 + "atom": 1873 } }, { @@ -12483,7 +12495,7 @@ }, { "Repetition": { - "atom": 1837, + "atom": 1839, "min": 0, "max": 1, "tag": "Maybe" @@ -12498,7 +12510,7 @@ "Sequence": { "atoms": [ 36, - 1839 + 1841 ] } }, @@ -12511,7 +12523,7 @@ "Sequence": { "atoms": [ 36, - 1841 + 1843 ] } }, @@ -12522,7 +12534,7 @@ }, { "Repetition": { - "atom": 1843, + "atom": 1845, "min": 0, "max": 1, "tag": "Maybe" @@ -12530,7 +12542,7 @@ }, { "Entity": { - "atom": 1864 + "atom": 1866 } }, { @@ -12540,7 +12552,7 @@ }, { "Repetition": { - "atom": 1846, + "atom": 1848, "min": 1, "max": null, "tag": "Repetition" @@ -12549,7 +12561,7 @@ { "Named": { "name": "format_type", - "atom": 1847 + "atom": 1849 } }, { @@ -12560,7 +12572,7 @@ { "Named": { "name": "file", - "atom": 1849 + "atom": 1851 } }, { @@ -12570,7 +12582,7 @@ }, { "Repetition": { - "atom": 1851, + "atom": 1853, "min": 0, "max": 1, "tag": "Maybe" @@ -12585,7 +12597,7 @@ "Sequence": { "atoms": [ 36, - 1853 + 1855 ] } }, @@ -12596,7 +12608,7 @@ }, { "Repetition": { - "atom": 1855, + "atom": 1857, "min": 0, "max": 1, "tag": "Maybe" @@ -12604,7 +12616,7 @@ }, { "Entity": { - "atom": 1058 + "atom": 1060 } }, { @@ -12614,7 +12626,7 @@ }, { "Repetition": { - "atom": 1858, + "atom": 1860, "min": 0, "max": 1, "tag": "Maybe" @@ -12629,7 +12641,7 @@ "Sequence": { "atoms": [ 36, - 1860 + 1862 ] } }, @@ -12640,7 +12652,7 @@ }, { "Repetition": { - "atom": 1862, + "atom": 1864, "min": 0, "max": 1, "tag": "Maybe" @@ -12649,8 +12661,6 @@ { "Sequence": { "atoms": [ - 36, - 1848, 36, 1850, 36, @@ -12660,19 +12670,21 @@ 36, 1856, 36, - 1857, + 1858, 36, 1859, 36, 1861, 36, - 1863 + 1863, + 36, + 1865 ] } }, { "Repetition": { - "atom": 1845, + "atom": 1847, "min": 0, "max": null, "tag": "Repetition" @@ -12681,7 +12693,7 @@ { "Named": { "name": "imports", - "atom": 1865 + "atom": 1867 } }, { @@ -12693,7 +12705,7 @@ "Sequence": { "atoms": [ 36, - 1867 + 1869 ] } }, @@ -12704,7 +12716,7 @@ }, { "Repetition": { - "atom": 1869, + "atom": 1871, "min": 0, "max": 1, "tag": "Maybe" @@ -12713,8 +12725,6 @@ { "Sequence": { "atoms": [ - 36, - 1838, 36, 1840, 36, @@ -12722,17 +12732,19 @@ 36, 1844, 36, - 1866, + 1846, 36, 1868, 36, - 1870 + 1870, + 36, + 1872 ] } }, { "Entity": { - "atom": 1931 + "atom": 1933 } }, { @@ -12742,7 +12754,7 @@ }, { "Repetition": { - "atom": 1873, + "atom": 1875, "min": 0, "max": 1, "tag": "Maybe" @@ -12750,7 +12762,7 @@ }, { "Entity": { - "atom": 1879 + "atom": 1881 } }, { @@ -12765,7 +12777,7 @@ }, { "Repetition": { - "atom": 1877, + "atom": 1879, "min": 1, "max": null, "tag": "Repetition" @@ -12774,8 +12786,8 @@ { "Sequence": { "atoms": [ - 1876, - 1878 + 1878, + 1880 ] } }, @@ -12787,7 +12799,7 @@ { "Named": { "name": "name", - "atom": 1880 + "atom": 1882 } }, { @@ -12799,7 +12811,7 @@ "Sequence": { "atoms": [ 36, - 1882 + 1884 ] } }, @@ -12810,7 +12822,7 @@ }, { "Repetition": { - "atom": 1884, + "atom": 1886, "min": 0, "max": 1, "tag": "Maybe" @@ -12818,7 +12830,7 @@ }, { "Entity": { - "atom": 1893 + "atom": 1895 } }, { @@ -12828,7 +12840,7 @@ }, { "Repetition": { - "atom": 1887, + "atom": 1889, "min": 0, "max": 1, "tag": "Maybe" @@ -12843,36 +12855,36 @@ "Sequence": { "atoms": [ 36, - 1889 + 1891 ] } }, { "Entity": { - "atom": 1018 + "atom": 1020 } }, { "Named": { "name": "includes", - "atom": 1891 + "atom": 1893 } }, { "Sequence": { "atoms": [ - 36, - 1888, 36, 1890, 36, - 1892 + 1892, + 36, + 1894 ] } }, { "Repetition": { - "atom": 1886, + "atom": 1888, "min": 0, "max": 1, "tag": "Maybe" @@ -12885,7 +12897,7 @@ }, { "Repetition": { - "atom": 1895, + "atom": 1897, "min": 0, "max": 1, "tag": "Maybe" @@ -12893,7 +12905,7 @@ }, { "Entity": { - "atom": 1923 + "atom": 1925 } }, { @@ -12903,7 +12915,7 @@ }, { "Repetition": { - "atom": 1898, + "atom": 1900, "min": 0, "max": 1, "tag": "Maybe" @@ -12918,7 +12930,7 @@ "Sequence": { "atoms": [ 36, - 1900 + 1902 ] } }, @@ -12931,7 +12943,7 @@ "Sequence": { "atoms": [ 36, - 1902 + 1904 ] } }, @@ -12942,7 +12954,7 @@ }, { "Repetition": { - "atom": 1904, + "atom": 1906, "min": 0, "max": 1, "tag": "Maybe" @@ -12950,7 +12962,7 @@ }, { "Entity": { - "atom": 1918 + "atom": 1920 } }, { @@ -12960,7 +12972,7 @@ }, { "Repetition": { - "atom": 1907, + "atom": 1909, "min": 0, "max": 1, "tag": "Maybe" @@ -12968,7 +12980,7 @@ }, { "Entity": { - "atom": 1913 + "atom": 1915 } }, { @@ -12983,7 +12995,7 @@ }, { "Repetition": { - "atom": 1911, + "atom": 1913, "min": 1, "max": null, "tag": "Repetition" @@ -12992,8 +13004,8 @@ { "Sequence": { "atoms": [ - 1910, - 1912 + 1912, + 1914 ] } }, @@ -13005,7 +13017,7 @@ { "Named": { "name": "condition", - "atom": 1914 + "atom": 1916 } }, { @@ -13015,7 +13027,7 @@ }, { "Repetition": { - "atom": 1916, + "atom": 1918, "min": 0, "max": 1, "tag": "Maybe" @@ -13025,19 +13037,19 @@ "Sequence": { "atoms": [ 36, - 1908, + 1910, 36, - 1909, + 1911, 36, - 1915, + 1917, 36, - 1917 + 1919 ] } }, { "Repetition": { - "atom": 1906, + "atom": 1908, "min": 0, "max": null, "tag": "Repetition" @@ -13046,7 +13058,7 @@ { "Named": { "name": "validations", - "atom": 1919 + "atom": 1921 } }, { @@ -13058,15 +13070,13 @@ "Sequence": { "atoms": [ 36, - 1921 + 1923 ] } }, { "Sequence": { "atoms": [ - 36, - 1899, 36, 1901, 36, @@ -13074,15 +13084,17 @@ 36, 1905, 36, - 1920, + 1907, 36, - 1922 + 1922, + 36, + 1924 ] } }, { "Repetition": { - "atom": 1897, + "atom": 1899, "min": 0, "max": 1, "tag": "Maybe" @@ -13095,7 +13107,7 @@ }, { "Repetition": { - "atom": 1925, + "atom": 1927, "min": 0, "max": 1, "tag": "Maybe" @@ -13110,7 +13122,7 @@ "Sequence": { "atoms": [ 36, - 1927 + 1929 ] } }, @@ -13121,7 +13133,7 @@ }, { "Repetition": { - "atom": 1929, + "atom": 1931, "min": 0, "max": 1, "tag": "Maybe" @@ -13131,39 +13143,39 @@ "Sequence": { "atoms": [ 36, - 1874, - 36, - 1875, + 1876, 36, - 1881, + 1877, 36, 1883, 36, 1885, 36, - 1894, + 1887, 36, 1896, 36, - 1924, + 1898, 36, 1926, 36, 1928, 36, - 1930 + 1930, + 36, + 1932 ] } }, { "Named": { "name": "collections", - "atom": 1872 + "atom": 1874 } }, { "Entity": { - "atom": 1975 + "atom": 1977 } }, { @@ -13173,7 +13185,7 @@ }, { "Repetition": { - "atom": 1934, + "atom": 1936, "min": 0, "max": 1, "tag": "Maybe" @@ -13188,7 +13200,7 @@ "Sequence": { "atoms": [ 36, - 1936 + 1938 ] } }, @@ -13199,7 +13211,7 @@ }, { "Repetition": { - "atom": 1938, + "atom": 1940, "min": 0, "max": 1, "tag": "Maybe" @@ -13214,7 +13226,7 @@ "Sequence": { "atoms": [ 36, - 1940 + 1942 ] } }, @@ -13225,7 +13237,7 @@ }, { "Repetition": { - "atom": 1942, + "atom": 1944, "min": 0, "max": 1, "tag": "Maybe" @@ -13233,7 +13245,7 @@ }, { "Entity": { - "atom": 1965 + "atom": 1967 } }, { @@ -13243,7 +13255,7 @@ }, { "Repetition": { - "atom": 1945, + "atom": 1947, "min": 0, "max": 1, "tag": "Maybe" @@ -13251,7 +13263,7 @@ }, { "Entity": { - "atom": 1951 + "atom": 1953 } }, { @@ -13266,7 +13278,7 @@ }, { "Repetition": { - "atom": 1949, + "atom": 1951, "min": 1, "max": null, "tag": "Repetition" @@ -13275,8 +13287,8 @@ { "Sequence": { "atoms": [ - 1948, - 1950 + 1950, + 1952 ] } }, @@ -13288,7 +13300,7 @@ { "Named": { "name": "format_type", - "atom": 1952 + "atom": 1954 } }, { @@ -13298,7 +13310,7 @@ }, { "Repetition": { - "atom": 1954, + "atom": 1956, "min": 0, "max": 1, "tag": "Maybe" @@ -13313,7 +13325,7 @@ "Sequence": { "atoms": [ 36, - 1956 + 1958 ] } }, @@ -13324,7 +13336,7 @@ }, { "Repetition": { - "atom": 1958, + "atom": 1960, "min": 0, "max": 1, "tag": "Maybe" @@ -13332,7 +13344,7 @@ }, { "Entity": { - "atom": 1058 + "atom": 1060 } }, { @@ -13344,7 +13356,7 @@ "Sequence": { "atoms": [ 36, - 1961 + 1963 ] } }, @@ -13355,7 +13367,7 @@ }, { "Repetition": { - "atom": 1963, + "atom": 1965, "min": 0, "max": 1, "tag": "Maybe" @@ -13365,11 +13377,9 @@ "Sequence": { "atoms": [ 36, - 1946, - 36, - 1947, + 1948, 36, - 1953, + 1949, 36, 1955, 36, @@ -13377,11 +13387,13 @@ 36, 1959, 36, - 1960, + 1961, 36, 1962, 36, - 1964 + 1964, + 36, + 1966 ] } }, @@ -13392,7 +13404,7 @@ }, { "Repetition": { - "atom": 1966, + "atom": 1968, "min": 0, "max": 1, "tag": "Maybe" @@ -13402,14 +13414,14 @@ "Sequence": { "atoms": [ 36, - 1944, - 1967 + 1946, + 1969 ] } }, { "Repetition": { - "atom": 1968, + "atom": 1970, "min": 0, "max": null, "tag": "Repetition" @@ -13418,7 +13430,7 @@ { "Named": { "name": "exports", - "atom": 1969 + "atom": 1971 } }, { @@ -13430,7 +13442,7 @@ "Sequence": { "atoms": [ 36, - 1971 + 1973 ] } }, @@ -13441,7 +13453,7 @@ }, { "Repetition": { - "atom": 1973, + "atom": 1975, "min": 0, "max": 1, "tag": "Maybe" @@ -13450,8 +13462,6 @@ { "Sequence": { "atoms": [ - 36, - 1935, 36, 1937, 36, @@ -13461,26 +13471,28 @@ 36, 1943, 36, - 1970, + 1945, 36, 1972, 36, - 1974 + 1974, + 36, + 1976 ] } }, { "Entity": { - "atom": 1097 + "atom": 1099 } }, { "Alternative": { "atoms": [ - 1836, - 1932, - 1933, - 1976 + 1838, + 1934, + 1935, + 1978 ] } }, @@ -13491,7 +13503,7 @@ }, { "Repetition": { - "atom": 1978, + "atom": 1980, "min": 0, "max": 1, "tag": "Maybe" @@ -13501,14 +13513,14 @@ "Sequence": { "atoms": [ 36, - 1835, - 1979 + 1837, + 1981 ] } }, { "Repetition": { - "atom": 1980, + "atom": 1982, "min": 0, "max": null, "tag": "Repetition" @@ -13517,12 +13529,12 @@ { "Named": { "name": "instances", - "atom": 1981 + "atom": 1983 } }, { "Repetition": { - "atom": 1834, + "atom": 1836, "min": 0, "max": 1, "tag": "Maybe" @@ -13537,7 +13549,7 @@ "Sequence": { "atoms": [ 36, - 1984 + 1986 ] } }, @@ -13548,7 +13560,7 @@ }, { "Repetition": { - "atom": 1986, + "atom": 1988, "min": 0, "max": 1, "tag": "Maybe" @@ -13557,12 +13569,10 @@ { "Sequence": { "atoms": [ - 36, - 1820, 36, 1822, 36, - 1827, + 1824, 36, 1829, 36, @@ -13570,32 +13580,34 @@ 36, 1833, 36, - 1983, + 1835, 36, 1985, 36, - 1987 + 1987, + 36, + 1989 ] } }, { "Entity": { - "atom": 1097 + "atom": 1099 } }, { "Entity": { - "atom": 1993 + "atom": 1995 } }, { "Entity": { - "atom": 1676 + "atom": 1678 } }, { "Repetition": { - "atom": 1991, + "atom": 1993, "min": 1, "max": null, "tag": "Repetition" @@ -13604,18 +13616,18 @@ { "Named": { "name": "members", - "atom": 1992 + "atom": 1994 } }, { "Alternative": { "atoms": [ 93, - 1685, - 1710, - 1818, - 1989, - 1990 + 1687, + 1712, + 1820, + 1991, + 1992 ] } }, @@ -13626,7 +13638,7 @@ }, { "Repetition": { - "atom": 1995, + "atom": 1997, "min": 0, "max": 1, "tag": "Maybe" @@ -13636,9 +13648,9 @@ "Sequence": { "atoms": [ 36, - 1994, + 1996, 36, - 1996 + 1998 ] } }, @@ -13653,7 +13665,7 @@ { "Named": { "name": "members", - "atom": 1998 + "atom": 2000 } }, { @@ -13662,7 +13674,7 @@ 36, 91, 36, - 1999 + 2001 ] } }, @@ -13670,13 +13682,13 @@ "Sequence": { "atoms": [ 36, - 2000, + 2002, 36 ] } } ], - "root": 2001 + "root": 2003 }, "bindings": [] } @@ -13883,7 +13895,7 @@ } ], "docs": {}, - "source": "# LutaML Model Language (LML) — PARG grammar\n#\n# Ported from the original Parslet grammar (removed 2026-10; git history\n# has the reference implementation if the port needs re-checking).\n# PEG semantics: ordered choice, greedy repetition. Rule order within\n# alternatives preserves the original Parslet backtracking order.\n#\n# Capture discipline: repetitions are parenthesized before `as` so a\n# capture binds the whole match (Parslet's `.repeat.as(:x)` shape);\n# `[ x as k ]` yields k: nil when absent (Parslet omits the key —\n# consumers treat nil and absent as equivalent).\ngrammar Lml version \"1.0.0\" {\n # ---- Trivia (parsanol-ruby#134 skip rule) ----\n # Grammar-native trivia replaces the pre-parse comment stripping:\n # `//` line and `/* */` block comments (RS 3001 par. Comment) plus\n # blanks/tabs are consumed and ignored between tokens. Newlines stay\n # grammar-visible (line-oriented rules keep their semantics; the\n # preprocessor preserved them too). Atomic token rules keep string\n # literals and identifiers contiguous.\n skip = trivia\n trivia = 1*( ( 1*( \" \" / %x09 ) ) / ( line_comment [ ( [ %x0D ] %x0A / %x0D ) ] ) / block_comment )\n line_comment = \"//\" ( *( !newline any_char ) )\n block_comment = \"/*\" ( *( !\"*/\" any_char ) ) \"*/\"\n atomic kw_association_sp = \"association\" 1*\" \"\n atomic kw_artifact_sp = \"artifact\" 1*\" \"\n atomic kw_attribute_sp = \"attribute\" 1*\" \"\n atomic kw_caption_sp = \"caption\" 1*\" \"\n atomic kw_class_sp = \"class\" 1*\" \"\n atomic kw_collection_sp = \"collection\" 1*\" \"\n atomic kw_condition_sp = \"condition\" 1*\" \"\n atomic kw_data_type_sp = \"data_type\" 1*\" \"\n atomic kw_definition_sp = \"definition\" 1*\" \"\n atomic kw_derive_sp = \"derive\" 1*\" \"\n atomic kw_element_sp = \"element\" 1*\" \"\n atomic kw_enum_sp = \"enum\" 1*\" \"\n atomic kw_fontname_sp = \"fontname\" 1*\" \"\n atomic kw_format_sp = \"format\" 1*\" \"\n atomic kw_hide_sp = \"hide\" 1*\" \"\n atomic kw_import_sp = \"import\" 1*\" \"\n atomic kw_instance_sp = \"instance\" 1*\" \"\n atomic kw_isa_sp = \"isa\" 1*\" \"\n atomic kw_map_sp = \"map\" 1*\" \"\n atomic kw_map_attribute_sp = \"map_attribute\" 1*\" \"\n atomic kw_map_content_sp = \"map_content\" 1*\" \"\n atomic kw_map_element_sp = \"map_element\" 1*\" \"\n atomic kw_map_key_sp = \"map_key\" 1*\" \"\n atomic kw_map_value_sp = \"map_value\" 1*\" \"\n atomic kw_mapping_sp = \"mapping\" 1*\" \"\n atomic kw_member_sp = \"member\" 1*\" \"\n atomic kw_member_type_sp = \"member_type\" 1*\" \"\n atomic kw_namespace_sp = \"namespace\" 1*\" \"\n atomic kw_owner_sp = \"owner\" 1*\" \"\n atomic kw_owner_type_sp = \"owner_type\" 1*\" \"\n atomic kw_package_sp = \"package\" 1*\" \"\n atomic kw_pattern_sp = \"pattern\" 1*\" \"\n atomic kw_prefix_sp = \"prefix\" 1*\" \"\n atomic kw_primitive_sp = \"primitive\" 1*\" \"\n atomic kw_require_sp = \"require\" 1*\" \"\n atomic kw_show_sp = \"show\" 1*\" \"\n atomic kw_string_format_sp = \"string_format\" 1*\" \"\n atomic kw_title_sp = \"title\" 1*\" \"\n atomic kw_to_instance_sp = \"to_instance\" 1*\" \"\n atomic kw_uri_sp = \"uri\" 1*\" \"\n atomic kw_value_sp = \"value\" 1*\" \"\n atomic kw_values_sp = \"values\" 1*\" \"\n # ---- Character primitives ----\n alpha = %x41-5A / %x61-7A\n atomic word = %x41-5A / %x61-7A / %x30-39 / \"_\"\n cardchar = %x30-39 / %x61-7A / \"*\"\n # Parslet's `any`: any Unicode character (not just bytes)\n any_char = %x00-10FFFF\n # [^\\s\\n\\r] — regex \\s covers space, tab, CR, LF, VT, FF\n atomic nonspace = !\" \" !%x09 !%x0A !%x0B !%x0C !%x0D any_char\n quote = %x22 / %x27\n newline = %x0D / %x0A\n\n whitespace = 1*( ( 1*( \" \" / %x09 ) ) / ( [ %x0D ] %x0A ) / %x0D / \";\" / line_comment / block_comment )\n\n # match['\"\\'']\n quotes = %x22 / %x27\n\n # quoted('\"', :string) | quoted(\"'\", :string)\n atomic dq_string = %x22 until \"\\\"\" as string %x22\n atomic sq_string = %x27 until \"'\" as string %x27\n quoted_string = dq_string / sq_string\n # any_quoted(:path) for view import\n atomic dq_path = %x22 until \"\\\"\" as path %x22\n atomic sq_path = %x27 until \"'\" as path %x27\n\n boolean = ( \"true\" / \"false\" ) as boolean\n number = ( 1*%x30-39 \".\" 1*%x30-39 ) as float / ( 1*%x30-39 ) as number\n variable = quoted_string / 1*word\n reference = ( \"reference:(\" / \"ref:(\" ) ( variable *( \".\" variable ) ) as reference \")\"\n range = ( variable as start \"..\" variable as end ) as range\n namespaced_identifier = variable *( \"::\" variable )\n comment_definition = ( \"**\" / \"#\" ) ( *( !newline ANY ) ) as comments\n comment_multiline_definition = \"*|\" until \"|*\" as comments [ whitespace ] \"|*\"\n\n class_name_chars = 1*( %x41-5A / %x61-7A / %x30-39 / \" \" / \"_\" / \"-\" / \":\" / \".\" )\n class_name = class_name_chars [ \"(\" class_name_chars \")\" ]\n cardinality_body_definition = cardchar as min [ \"..\" [ cardchar as max ] ]\n cardinality = \"[\" cardinality_body_definition as cardinality \"]\"\n\n data_value = boolean / reference / range / number / quoted_string\n key_value_pair = variable as key [ \"=\" ] data_value as value\n key_value_map = \"{\" [ whitespace ] ( *( key_value_pair whitespace ) ) as key_value_map \"}\"\n kw_visibility_modifier = \"+\" / \"-\" / \"#\" / \"~\"\n\n # ---- Attributes ----\n attribute = comment_definition / ( variable as key [ \"+\" as add ] [ \"=\" ] attribute_value as value )\n attributes = ( *( attribute_line / whitespace ) ) as attributes\n attribute_line = attribute [ [ \",\" ] whitespace ]\n visibility = kw_visibility_modifier as visibility_modifier\n attribute_stereotype = \"<<\" ( 1*( %x41-5A / %x61-7A / %x30-39 / \"_\" / \"-\" / \"/\" ) ) as stereotype \">>\"\n atomic type_token = 1*( !( \"//\" / \"/*\" ) typechar )\n atomic typechar = %x41-5A / %x61-7A / %x30-39 / \"_\" / \"-\" / \" \" / \":\" / \"/\" / \"+\"\n atomic namechar = %x41-5A / %x61-7A / %x30-39 / \"_\" / \"-\" / \"/\" / \"+\"\n attribute_type = [ \":\" ] [ attribute_stereotype ] [ quotes as type_literal ] ( type_token ) as type [ quotes ]\n attribute_name = ( 1*namechar ) as name\n attribute_definition_name = ( quotes ( 1*( %x41-5A / %x61-7A / %x30-39 / \"_\" / \"-\" / \" \" / \"/\" / \"+\" ) ) as name quotes ) / attribute_name\n attribute_definition = ( [ visibility ] as visibility attribute_definition_name [ attribute_type ] [ cardinality ] [ class_body ] ) as attributes\n\n keyword_type_argument = \"type\" ( 1*nonspace ) as type [ whitespace ]\n keyword_cardinality_argument = \"cardinality\" cardinality_body_definition as cardinality [ whitespace ]\n keyword_any_argument = ( keyword_any_name ) as name [ \"=\" / \":\" ] attribute_value as value [ whitespace ]\n atomic keyword_any_name = 1*( !( \"{\" / \"}\" ) nonspace )\n keyword_values_argument = kw_values_sp ( ( value_set_body ) as value_set / ( variable ) as value_set_ref ) [ whitespace ]\n keyword_pattern_argument = ( kw_pattern_sp \"/\" ( *( ( \"\\\\\" any_char ) / ( !\"/\" any_char ) ) ) as pattern \"/\" [ whitespace ] )\n value_set_body = \"{\" [ whitespace ] ( *( ( ( data_value / variable ) as item ) [ \",\" ] [ whitespace ] ) ) as items \"}\"\n keyword_attribute_options = *( keyword_type_argument / keyword_cardinality_argument / keyword_values_argument / keyword_pattern_argument / ( keyword_any_argument ) as properties )\n keyword_attribute_body = \"{\" [ whitespace ] keyword_attribute_options [ whitespace ] \"}\"\n keyword_attribute_definition = ( kw_attribute_sp attribute_name keyword_attribute_body ) as attributes\n\n # ---- Associations ----\n owner_cardinality = \"[\" cardinality_body_definition as owner_end_cardinality \"]\"\n owner_attribute_name = \"#\" [ visibility ] variable as owner_end_attribute_name\n owner_definition = [ whitespace ] kw_owner_sp variable as owner_end [ owner_attribute_name ] [ owner_cardinality ]\n owner_type = [ whitespace ] kw_owner_type_sp variable as owner_end_type\n member_cardinality = \"[\" cardinality_body_definition as member_end_cardinality \"]\"\n member_attribute_name = \"#\" [ visibility ] variable as member_end_attribute_name\n member_definition = [ whitespace ] kw_member_sp variable as member_end [ member_attribute_name ] [ member_cardinality ]\n member_type = [ whitespace ] kw_member_type_sp variable as member_end_type\n association_inner_definition = ( owner_type / member_type / owner_definition / member_definition / comment_definition / comment_multiline_definition ) [ whitespace ]\n association_body = \"{\" [ whitespace ] ( *( association_inner_definition ) ) as members \"}\"\n association_definition = [ whitespace ] kw_association_sp [ variable as name ] association_body\n\n # ---- Definitions ----\n # ---- Operations (class methods) ----\n # Symbol visibility reuses the attribute prefix (+ - # ~); the\n # transform maps it to public/private/protected/friendly.\n operation_definition = [ whitespace ] [ visibility ] ( 1*word ) as name \"(\" [ ( operation_params ) as owned_parameter ] \")\" [ operation_return ] [ operation_body ] [ whitespace ]\n operation_params = operation_param *( \",\" [ whitespace ] operation_param )\n operation_return = \":\" ( type_token ) as return_type [ cardinality ]\n # A parenthesized alternative is not an Entity, so an optional body\n # of `x as k` around it gets no skip injection - the blank after \"=\"\n # was unconsumable. Reference a rule instead.\n operation_param = ( [ ( \"in\" / \"out\" / \"inout\" ) as direction 1*\" \" ] ( 1*word ) as name [ \":\" ] param_type as type [ \"=\" ] param_default_value as param_default )\n param_default_value = [ quoted_string / ( 1*word ) / number ]\n # The attribute pattern: separator as its own optional, value as a\n # rule sibling. A `x as k` optional body gets no interior skip\n # injection, so [ \":\" type as t ] cannot consume the blank after\n # the separator.\n param_type = [ type_token ]\n operation_body = \"{\" [ whitespace ] [ ( *( ( 1*word ) as stereotype [ \",\" ] [ whitespace ] ) ) as stereotype ] [ whitespace ] \"}\"\n\n class_modifier = [ [ whitespace ] modifier_token ]\n atomic modifier_token = ( ( \"abstract\" / \"interface\" ) as modifier 1*\" \" )\n # RS 3001 element visibility modifier (keyword form, symmetric with\n # abstract/interface; `package` is the UML \"friendly\" (~) level).\n atomic element_visibility = ( ( \"public\" / \"private\" / \"protected\" / \"package\" ) as visibility 1*\" \" )\n # ---- Namespaces (RS 3010 extension: lutaml-model XmlNamespace) ----\n namespace_uri_line = ( kw_uri_sp ( quoted_string / ( 1*word ) ) as uri [ whitespace ] )\n namespace_prefix_line = ( kw_prefix_sp ( quoted_string / ( 1*word ) ) as prefix [ whitespace ] )\n namespace_body = \"{\" [ whitespace ] ( *( namespace_uri_line / namespace_prefix_line ) ) as members \"}\"\n namespace_inline = ( ( quoted_string ) as uri [ kw_prefix_sp ( quoted_string / ( 1*word ) ) as prefix ] )\n namespace_definition = ( [ whitespace ] kw_namespace_sp ( 1*word ) as name ( namespace_body / namespace_inline ) [ whitespace ] ) as namespaces\n\n # ---- Serialization mappings (RS 3010 extension: sibling-linked) ----\n serialization_body = \"{\" [ whitespace ] ( *( serialization_line ) ) as rules \"}\"\n serialization_line = ( mapping_element_name_line / mapping_element_line / mapping_attribute_line / mapping_content_line / mapping_namespace_line / mapping_mixed_line / legacy_map_line / mapping_map_line / mapping_map_key_line / mapping_map_value_line ) [ whitespace ]\n legacy_map_line = ( kw_map_sp dq_string as wire \",\" \"to:\" ( quoted_string / ( 1*word ) ) as to [ whitespace ] ) as legacy_map\n mapping_element_name_line = ( kw_element_sp dq_string as element_name [ whitespace ] ) as element_name\n mapping_element_line = ( kw_map_element_sp ( element_args ) ) as map_element\n element_args = ( dq_string as wire [ ( 1*word ) as field ] / ( 1*word ) as field )\n mapping_attribute_line = ( kw_map_attribute_sp ( attribute_args ) ) as map_attribute\n attribute_args = ( dq_string as wire [ ( 1*word ) as field ] / ( 1*word ) as field )\n mapping_content_line = ( kw_map_content_sp ( 1*word ) as field ) as map_content\n mapping_namespace_line = ( kw_namespace_sp ( 1*word ) as namespace_ref ) as map_namespace\n mapping_mixed_line = ( \"mixed_content\" ) as mixed_content\n mapping_map_line = ( kw_map_sp map_args ) as map\n map_args = ( dq_string as wire ( 1*word ) as field / dq_string as wire / ( 1*word ) as field )\n mapping_map_key_line = ( kw_map_key_sp kw_to_instance_sp ( 1*word ) as field ) as map_key\n mapping_map_value_line = ( kw_map_value_sp map_value_mode ( 1*word ) as field ) as map_value\n atomic map_value_mode = ( ( \"to_instance\" / \"as_attribute\" ) as mode 1*\" \" )\n mapping_definition = ( [ whitespace ] kw_mapping_sp ( 1*word ) as format ( 1*word ) as target serialization_body [ whitespace ] ) as serialization_mappings\n\n # ---- Mapping blocks (lutaml-model wire names) ----\n map_name = ( quoted_string / 1*( word / \"-\" / \".\" ) )\n map_line = kw_map_sp ( map_name ) as wire \",\" \"to:\" ( map_name ) as to [ whitespace ]\n mapping_body = \"{\" [ whitespace ] ( *( map_line ) ) as maps \"}\"\n class_mapping_section = ( [ whitespace ] kw_mapping_sp ( 1*word ) as format serialization_body [ whitespace ] ) as serialization_mappings\n\n derive_definition = ( [ whitespace ] kw_derive_sp attribute_name \":\" [ quotes ] ( type_token ) as type [ quotes ] ) as derived_field [ whitespace ]\n string_format_item = ( sf_key_token ( quoted_string / 1*nonspace ) as value [ whitespace ] )\n atomic sf_key_token = ( ( \"artifact\" / \"root\" ) as key 1*\" \" )\n string_format_body = \"{\" [ whitespace ] ( *( string_format_item ) ) as items [ whitespace ] \"}\"\n string_format_definition = ( [ whitespace ] kw_string_format_sp ( variable ) as format string_format_body ) as string_format\n\n class_inner_definitions = definition_body / definition_line / class_mapping_section / derive_definition / string_format_definition / ( operation_definition ) as operations / attribute_comma_definition / ( !( kw_attribute_sp ) attribute_definition ) / keyword_attribute_definition / comment_definition / comment_multiline_definition\n class_inner_definition = class_inner_definitions [ whitespace ]\n class_body = \"{\" [ whitespace ] ( *( class_inner_definition ) ) as members \"}\"\n parent_class = \"<\" ( class_name_chars ) as parent_class\n class_definition = [ element_visibility ] class_modifier [ whitespace ] kw_class_sp class_name as name [ parent_class ] [ attribute_stereotype ] [ class_body ]\n\n # Balanced-brace definition text: nested \"{...}\" and \"\\\"-escapes allowed\n definition_content = *( ( \"\\\\\" any_char ) / ( \"{\" definition_content \"}\" ) / ( !\"}\" any_char ) )\n definition_body = \"definition\" [ whitespace ] \"{\" ( definition_content ) as definition \"}\"\n definition_line = ( kw_definition_sp ( dq_string / sq_string ) ) as definition [ whitespace ]\n\n member_field_line = attribute_name ( 1*nonspace ) as member_field_type [ whitespace ]\n member_fields_definition = ( [ whitespace ] \"member_fields\" [ whitespace ] \"{\" [ whitespace ] ( *( member_field_line ) ) as member_fields [ whitespace ] \"}\" ) as member_fields_decl\n attribute_comma_definition = ( [ whitespace ] kw_attribute_sp attribute_name \",\" ( type_token ) as type [ \"{\" [ whitespace ] keyword_attribute_options [ whitespace ] \"}\" ] [ whitespace ] ) as attributes\n enum_member_with_payload = ( [ whitespace ] attribute_name ( class_body / keyword_attribute_body ) ) as attributes\n\n # ---- Canonical value construct (RS 3001 par. Value / par. Enums) ----\n # `value { block }` is the canonical enum member; the bare\n # identifier member is its documented shortcut. from_table expands to\n # value members at compile time.\n value_name = quoted_string / map_name\n value_inner_definition = ( definition_body / definition_line / instance / attribute_line / comment_definition / comment_multiline_definition ) [ whitespace ]\n value_body = \"{\" [ whitespace ] ( *( value_inner_definition ) ) as members \"}\"\n value_definition = ( [ whitespace ] kw_value_sp ( value_name ) as value_name [ value_body ] [ whitespace ] ) as value_decl\n\n from_table_definition = ( [ whitespace ] \"from_table\" ( map_name ) as from_table_name [ \"{\" [ whitespace ] *( kw_artifact_sp ( map_name ) as artifact_table [ whitespace ] ) \"}\" ] [ whitespace ] ) as from_table_decl\n\n enum_values_shorthand = ( [ whitespace ] kw_values_sp value_set_body [ whitespace ] ) as value_set_decl\n enum_inner_definitions = definition_body / definition_line / member_fields_definition / from_table_definition / enum_values_shorthand / value_definition / enum_member_with_payload / attribute_comma_definition / attribute_definition / comment_definition / comment_multiline_definition\n enum_inner_definition = enum_inner_definitions [ whitespace ]\n enum_body = \"{\" [ whitespace ] ( *( enum_inner_definition ) ) as members \"}\"\n enum_definition = [ whitespace ] [ element_visibility ] kw_enum_sp [ quotes ] class_name as name [ quotes ] [ attribute_stereotype ] [ enum_body ]\n data_type_body = \"{\" [ whitespace ] ( *( enum_inner_definition ) ) as members \"}\"\n data_type_definition = [ whitespace ] [ element_visibility ] kw_data_type_sp [ quotes ] class_name as name [ quotes ] [ attribute_stereotype ] [ data_type_body ]\n primitive_definition = [ whitespace ] [ element_visibility ] kw_primitive_sp [ quotes ] class_name as name [ quotes ]\n\n package_body = \"{\" [ whitespace ] ( *( diagram_inner_definition ) ) as members \"}\"\n package_definition = ( [ whitespace ] kw_package_sp class_name as name package_body [ whitespace ] ) as packages\n diagram_inner_definitions = namespace_definition / mapping_definition / ( class_definition ) as classes / ( enum_definition ) as enums / ( primitive_definition ) as primitives / ( data_type_definition ) as data_types / package_definition / title_definition / caption_definition / fontname_definition / ( association_definition ) as associations / comment_definition / comment_multiline_definition\n diagram_inner_definition = diagram_inner_definitions [ whitespace ]\n diagram_body = \"{\" [ whitespace ] ( *( diagram_inner_definition ) ) as members \"}\"\n diagram_definition = [ whitespace ] \"diagram\" class_name as name diagram_body [ whitespace ]\n diagram_definitions = diagram_definition [ whitespace ]\n model_definitions = ( 1*( diagram_inner_definition ) ) as members\n\n view_only_definitions = ( view_import ) as view_imports / show_directive / hide_directive\n view_inner_definitions = view_only_definitions / diagram_inner_definitions\n view_inner_definition = view_inner_definitions [ whitespace ]\n view_body = \"{\" [ whitespace ] ( *( view_inner_definition ) ) as members \"}\"\n view_definition = [ whitespace ] \"view\" class_name as name view_body [ whitespace ]\n view_definitions = view_definition [ whitespace ]\n\n atomic title_text = ( %x22 ( 1*( !%x22 ANY ) ) as title %x22 ) / ( %x27 ( 1*( !%x27 ANY ) ) as title %x27 ) / ( 1*( %x41-5A / %x61-7A / %x30-39 / \"_\" / \"-\" / \" \" / \",\" / \".\" / \":\" / \";\" / \"(\" / \")\" / \"+\" / \"'\" / \"/\" ) ) as title\n title_definition = [ whitespace ] kw_title_sp title_text\n atomic caption_text = ( %x22 ( 1*( !%x22 ANY ) ) as caption %x22 ) / ( %x27 ( 1*( !%x27 ANY ) ) as caption %x27 ) / ( 1*( %x41-5A / %x61-7A / %x30-39 / \"_\" / \"-\" / \" \" / \",\" / \".\" / \":\" / \";\" / \"(\" / \")\" / \"+\" / \"'\" / \"/\" ) ) as caption\n caption_definition = [ whitespace ] kw_caption_sp caption_text\n fontname_text = [ quotes ] ( 1*( %x41-5A / %x61-7A / %x30-39 / \"_\" / \"-\" / \" \" ) ) as fontname [ quotes ]\n fontname_definition = [ whitespace ] kw_fontname_sp fontname_text\n\n # ---- Views ----\n # `import` here carries a required trailing space (word boundary)\n view_import = [ whitespace ] kw_import_sp ( dq_path / sq_path ) [ whitespace ]\n entity_name_atom = ( 1*( %x41-5A / %x61-7A / %x30-39 / \"_\" / \".\" / \":\" / \"-\" ) ) as entity_name\n entity_name_list = entity_name_atom *( \",\" entity_name_atom )\n show_directive = [ whitespace ] kw_show_sp ( entity_name_list ) as show_list [ whitespace ]\n hide_directive = [ whitespace ] kw_hide_sp ( entity_name_list ) as hide_list [ whitespace ]\n\n # ---- Requires ----\n require_stmt = [ whitespace ] kw_require_sp quoted_string as require [ whitespace ]\n require_block = ( *( require_stmt [ whitespace ] ) ) as requires\n\n # ---- Instances ----\n instance = instance_named / keyword_instance / class_instance\n instance_named = ( [ whitespace ] kw_instance_sp quoted_string as name [ ( namespaced_identifier ) as instance_type ] \"{\" [ whitespace ] ( ( instance ) / attributes ) \"}\" [ whitespace ] ) as instance\n isa_definition = [ whitespace ] kw_isa_sp ( namespaced_identifier ) as isa [ whitespace ]\n keyword_instance = ( [ whitespace ] \"instance\" [ ( namespaced_identifier ) as instance_type ] \"{\" [ whitespace ] [ isa_definition ] ( ( instance ) / attributes ) \"}\" ) as instance [ whitespace ]\n class_instance = ( variable as instance_type [ whitespace ] quoted_string as name [ whitespace ] [ [ whitespace ] \"extends\" [ whitespace ] quoted_string as parent [ whitespace ] ] \"{\" [ whitespace ] [ lml_instance_body ] \"}\" ) as instance [ whitespace ]\n lml_instance_body = lml_instance_members [ whitespace ]\n instance_template = [ whitespace ] \"template\" [ whitespace ] \"{\" [ whitespace ] attributes [ whitespace ] \"}\"\n lml_instance_members = ( instance_template ) as template / attributes\n models = [ whitespace ] \"models\" [ whitespace ] variable as name [ whitespace ] \"{\" ( *( ( ( string_format_definition ) as default_string_formats ) / model_body ) ) as members \"}\" [ whitespace ]\n model_body = diagram_inner_definition\n\n # ---- Data structures ----\n attribute_value = instance / list / key_value_map / data_value / 1*( !%x0A ANY )\n list_item = instance / data_value\n list = \"[\" [ whitespace ] ( *( list_item [ \",\" ] [ whitespace ] ) ) as list [ whitespace ] \"]\"\n collection = [ whitespace ] kw_collection_sp quoted_string as name \"{\" [ whitespace ] [ includes ] [ whitespace ] [ validation ] [ whitespace ] \"}\" [ whitespace ]\n includes = [ whitespace ] \"includes\" ( list ) as includes\n validation = [ whitespace ] \"validation\" \"{\" [ whitespace ] ( *( condition ) ) as validations \"}\"\n condition = [ whitespace ] kw_condition_sp quoted_string as condition [ whitespace ]\n import = [ whitespace ] \"import\" \"{\" [ whitespace ] ( *( import_definition ) ) as imports \"}\" [ whitespace ]\n import_definition = ( 1*nonspace ) as format_type quoted_string as file [ whitespace ] \"{\" [ whitespace ] attributes [ whitespace ] \"}\" [ whitespace ]\n instances = [ whitespace ] \"instances\" [ ( quoted_string / variable ) as name ] [ whitespace ] \"{\" [ whitespace ] [ instances_body ] \"}\" [ whitespace ]\n instances_body = ( *( instances_member [ whitespace ] ) ) as instances\n instances_member = import / ( collection ) as collections / export / instance\n export = [ whitespace ] \"export\" [ whitespace ] \"{\" [ whitespace ] ( *( export_format [ whitespace ] ) ) as exports \"}\" [ whitespace ]\n export_format = [ whitespace ] kw_format_sp variable as format_type [ whitespace ] \"{\" [ whitespace ] attributes \"}\" [ whitespace ]\n\n # ---- Root (RS 3001: a document interleaves declarations) ----\n diagram = [ require_block ] ( *( top_level_definition ) ) as members\n\n top_level_definition = ( models / diagram_definitions / view_definitions / instances / instance / model_definitions ) [ whitespace ]\n}\n\nentry diagram: diagram\n\n# Compile-time contract tests for the trivia/skip behavior (run by\n# `rake parg` and any in-memory compile; a failure fails the build).\ntest diagram {\n accept \"// leading\\nclass Ceramic { }\\n\"\n accept \"class /* inline */ Ceramic { }\\n\"\n accept \"class Ceramic { } // trailing\"\n accept \"instances {\\n P \\\"p\\\" {\\n url = \\\"http://a//b\\\"\\n }\\n}\\n\"\n reject \"classCeramic Foo { }\"\n reject \"abstractclass Ceramic { }\"\n reject \"class\\tCeramic { }\"\n reject \"class Ceramic { /* unterminated\"\n}\n", + "source": "# LutaML Model Language (LML) — PARG grammar\n#\n# Ported from the original Parslet grammar (removed 2026-10; git history\n# has the reference implementation if the port needs re-checking).\n# PEG semantics: ordered choice, greedy repetition. Rule order within\n# alternatives preserves the original Parslet backtracking order.\n#\n# Capture discipline: repetitions are parenthesized before `as` so a\n# capture binds the whole match (Parslet's `.repeat.as(:x)` shape);\n# `[ x as k ]` yields k: nil when absent (Parslet omits the key —\n# consumers treat nil and absent as equivalent).\ngrammar Lml version \"1.0.0\" {\n # ---- Trivia (parsanol-ruby#134 skip rule) ----\n # Grammar-native trivia replaces the pre-parse comment stripping:\n # `//` line and `/* */` block comments (RS 3001 par. Comment) plus\n # blanks/tabs are consumed and ignored between tokens. Newlines stay\n # grammar-visible (line-oriented rules keep their semantics; the\n # preprocessor preserved them too). Atomic token rules keep string\n # literals and identifiers contiguous.\n skip = trivia\n trivia = 1*( ( 1*( \" \" / %x09 ) ) / ( line_comment [ ( [ %x0D ] %x0A / %x0D ) ] ) / block_comment )\n line_comment = \"//\" ( *( !newline any_char ) )\n block_comment = \"/*\" ( *( !\"*/\" any_char ) ) \"*/\"\n atomic kw_association_sp = \"association\" 1*\" \"\n atomic kw_artifact_sp = \"artifact\" 1*\" \"\n atomic kw_attribute_sp = \"attribute\" 1*\" \"\n atomic kw_caption_sp = \"caption\" 1*\" \"\n atomic kw_class_sp = \"class\" 1*\" \"\n atomic kw_collection_sp = \"collection\" 1*\" \"\n atomic kw_condition_sp = \"condition\" 1*\" \"\n atomic kw_data_type_sp = \"data_type\" 1*\" \"\n atomic kw_definition_sp = \"definition\" 1*\" \"\n atomic kw_derive_sp = \"derive\" 1*\" \"\n atomic kw_element_sp = \"element\" 1*\" \"\n atomic kw_enum_sp = \"enum\" 1*\" \"\n atomic kw_fontname_sp = \"fontname\" 1*\" \"\n atomic kw_format_sp = \"format\" 1*\" \"\n atomic kw_hide_sp = \"hide\" 1*\" \"\n atomic kw_import_sp = \"import\" 1*\" \"\n atomic kw_instance_sp = \"instance\" 1*\" \"\n atomic kw_isa_sp = \"isa\" 1*\" \"\n atomic kw_map_sp = \"map\" 1*\" \"\n atomic kw_map_attribute_sp = \"map_attribute\" 1*\" \"\n atomic kw_map_content_sp = \"map_content\" 1*\" \"\n atomic kw_map_element_sp = \"map_element\" 1*\" \"\n atomic kw_map_key_sp = \"map_key\" 1*\" \"\n atomic kw_map_value_sp = \"map_value\" 1*\" \"\n atomic kw_mapping_sp = \"mapping\" 1*\" \"\n atomic kw_member_sp = \"member\" 1*\" \"\n atomic kw_member_type_sp = \"member_type\" 1*\" \"\n atomic kw_namespace_sp = \"namespace\" 1*\" \"\n atomic kw_owner_sp = \"owner\" 1*\" \"\n atomic kw_owner_type_sp = \"owner_type\" 1*\" \"\n atomic kw_package_sp = \"package\" 1*\" \"\n atomic kw_pattern_sp = \"pattern\" 1*\" \"\n atomic kw_prefix_sp = \"prefix\" 1*\" \"\n atomic kw_primitive_sp = \"primitive\" 1*\" \"\n atomic kw_require_sp = \"require\" 1*\" \"\n atomic kw_show_sp = \"show\" 1*\" \"\n atomic kw_string_format_sp = \"string_format\" 1*\" \"\n atomic kw_title_sp = \"title\" 1*\" \"\n atomic kw_to_instance_sp = \"to_instance\" 1*\" \"\n atomic kw_uri_sp = \"uri\" 1*\" \"\n atomic kw_value_sp = \"value\" 1*\" \"\n atomic kw_values_sp = \"values\" 1*\" \"\n # ---- Character primitives ----\n alpha = %x41-5A / %x61-7A\n atomic word = %x41-5A / %x61-7A / %x30-39 / \"_\"\n cardchar = %x30-39 / %x61-7A / \"*\"\n # Parslet's `any`: any Unicode character (not just bytes)\n any_char = %x00-10FFFF\n # [^\\s\\n\\r] — regex \\s covers space, tab, CR, LF, VT, FF\n atomic nonspace = !\" \" !%x09 !%x0A !%x0B !%x0C !%x0D any_char\n quote = %x22 / %x27\n newline = %x0D / %x0A\n\n whitespace = 1*( ( 1*( \" \" / %x09 ) ) / ( [ %x0D ] %x0A ) / %x0D / \";\" / line_comment / block_comment )\n\n # match['\"\\'']\n quotes = %x22 / %x27\n\n # quoted('\"', :string) | quoted(\"'\", :string)\n atomic dq_string = %x22 until \"\\\"\" as string %x22\n atomic sq_string = %x27 until \"'\" as string %x27\n quoted_string = dq_string / sq_string\n # any_quoted(:path) for view import\n atomic dq_path = %x22 until \"\\\"\" as path %x22\n atomic sq_path = %x27 until \"'\" as path %x27\n\n boolean = ( \"true\" / \"false\" ) as boolean\n number = ( 1*%x30-39 \".\" 1*%x30-39 ) as float / ( 1*%x30-39 ) as number\n variable = quoted_string / 1*word\n reference = ( \"reference:(\" / \"ref:(\" ) ( variable *( \".\" variable ) ) as reference \")\"\n range = ( variable as start \"..\" variable as end ) as range\n namespaced_identifier = variable *( \"::\" variable )\n comment_definition = ( \"**\" / \"#\" ) ( *( !newline ANY ) ) as comments\n comment_multiline_definition = \"*|\" until \"|*\" as comments [ whitespace ] \"|*\"\n\n class_name_chars = 1*( %x41-5A / %x61-7A / %x30-39 / \" \" / \"_\" / \"-\" / \":\" / \".\" )\n class_name = class_name_chars [ \"(\" class_name_chars \")\" ]\n cardinality_body_definition = cardchar as min [ \"..\" [ cardchar as max ] ]\n cardinality = \"[\" cardinality_body_definition as cardinality \"]\"\n\n data_value = boolean / reference / range / number / quoted_string\n key_value_pair = variable as key [ \"=\" ] data_value as value\n key_value_map = \"{\" [ whitespace ] ( *( key_value_pair whitespace ) ) as key_value_map \"}\"\n kw_visibility_modifier = \"+\" / \"-\" / \"#\" / \"~\"\n\n # ---- Attributes ----\n attribute = comment_definition / ( variable as key [ \"+\" as add ] [ \"=\" ] attribute_value as value )\n attributes = ( *( definition_body / definition_line / attribute_line / whitespace ) ) as attributes\n attribute_line = attribute [ [ \",\" ] whitespace ]\n visibility = kw_visibility_modifier as visibility_modifier\n attribute_stereotype = \"<<\" ( 1*( %x41-5A / %x61-7A / %x30-39 / \"_\" / \"-\" / \"/\" ) ) as stereotype \">>\"\n atomic type_token = 1*( !( \"//\" / \"/*\" ) typechar )\n atomic typechar = %x41-5A / %x61-7A / %x30-39 / \"_\" / \"-\" / \" \" / \":\" / \"/\" / \"+\"\n atomic namechar = %x41-5A / %x61-7A / %x30-39 / \"_\" / \"-\" / \"/\" / \"+\"\n attribute_type = [ \":\" ] [ attribute_stereotype ] [ quotes as type_literal ] ( type_token ) as type [ quotes ]\n attribute_name = ( 1*namechar ) as name\n attribute_definition_name = ( quotes ( 1*( %x41-5A / %x61-7A / %x30-39 / \"_\" / \"-\" / \" \" / \"/\" / \"+\" ) ) as name quotes ) / attribute_name\n attribute_definition = ( [ visibility ] as visibility attribute_definition_name [ attribute_type ] [ cardinality ] [ class_body ] ) as attributes\n\n keyword_type_argument = \"type\" ( 1*nonspace ) as type [ whitespace ]\n keyword_cardinality_argument = \"cardinality\" cardinality_body_definition as cardinality [ whitespace ]\n keyword_any_argument = ( keyword_any_name ) as name [ \"=\" / \":\" ] attribute_value as value [ whitespace ]\n atomic keyword_any_name = 1*( !( \"{\" / \"}\" ) nonspace )\n keyword_values_argument = kw_values_sp ( ( value_set_body ) as value_set / ( variable ) as value_set_ref ) [ whitespace ]\n keyword_pattern_argument = ( kw_pattern_sp \"/\" ( *( ( \"\\\\\" any_char ) / ( !\"/\" any_char ) ) ) as pattern \"/\" [ whitespace ] )\n value_set_body = \"{\" [ whitespace ] ( *( ( ( data_value / variable ) as item ) [ \",\" ] [ whitespace ] ) ) as items \"}\"\n keyword_attribute_options = *( keyword_type_argument / keyword_cardinality_argument / keyword_values_argument / keyword_pattern_argument / ( keyword_any_argument ) as properties )\n keyword_attribute_body = \"{\" [ whitespace ] keyword_attribute_options [ whitespace ] \"}\"\n keyword_attribute_definition = ( kw_attribute_sp attribute_name keyword_attribute_body ) as attributes\n\n # ---- Associations ----\n owner_cardinality = \"[\" cardinality_body_definition as owner_end_cardinality \"]\"\n owner_attribute_name = \"#\" [ visibility ] variable as owner_end_attribute_name\n owner_definition = [ whitespace ] kw_owner_sp variable as owner_end [ owner_attribute_name ] [ owner_cardinality ]\n owner_type = [ whitespace ] kw_owner_type_sp variable as owner_end_type\n member_cardinality = \"[\" cardinality_body_definition as member_end_cardinality \"]\"\n member_attribute_name = \"#\" [ visibility ] variable as member_end_attribute_name\n member_definition = [ whitespace ] kw_member_sp variable as member_end [ member_attribute_name ] [ member_cardinality ]\n member_type = [ whitespace ] kw_member_type_sp variable as member_end_type\n association_inner_definition = ( owner_type / member_type / owner_definition / member_definition / comment_definition / comment_multiline_definition ) [ whitespace ]\n association_body = \"{\" [ whitespace ] ( *( association_inner_definition ) ) as members \"}\"\n association_definition = [ whitespace ] kw_association_sp [ variable as name ] association_body\n\n # ---- Definitions ----\n # ---- Operations (class methods) ----\n # Symbol visibility reuses the attribute prefix (+ - # ~); the\n # transform maps it to public/private/protected/friendly.\n operation_definition = [ whitespace ] [ visibility ] ( 1*word ) as name \"(\" [ ( operation_params ) as owned_parameter ] \")\" [ operation_return ] [ operation_body ] [ whitespace ]\n operation_params = operation_param *( \",\" [ whitespace ] operation_param )\n operation_return = \":\" ( type_token ) as return_type [ cardinality ]\n # A parenthesized alternative is not an Entity, so an optional body\n # of `x as k` around it gets no skip injection - the blank after \"=\"\n # was unconsumable. Reference a rule instead.\n operation_param = ( [ ( \"in\" / \"out\" / \"inout\" ) as direction 1*\" \" ] ( 1*word ) as name [ \":\" ] param_type as type [ \"=\" ] param_default_value as param_default )\n param_default_value = [ quoted_string / ( 1*word ) / number ]\n # The attribute pattern: separator as its own optional, value as a\n # rule sibling. A `x as k` optional body gets no interior skip\n # injection, so [ \":\" type as t ] cannot consume the blank after\n # the separator.\n param_type = [ type_token ]\n operation_body = \"{\" [ whitespace ] [ ( *( ( 1*word ) as stereotype [ \",\" ] [ whitespace ] ) ) as stereotype ] [ whitespace ] \"}\"\n\n class_modifier = [ [ whitespace ] modifier_token ]\n atomic modifier_token = ( ( \"abstract\" / \"interface\" ) as modifier 1*\" \" )\n # RS 3001 element visibility modifier (keyword form, symmetric with\n # abstract/interface; `package` is the UML \"friendly\" (~) level).\n atomic element_visibility = ( ( \"public\" / \"private\" / \"protected\" / \"package\" ) as visibility 1*\" \" )\n # ---- Namespaces (RS 3010 extension: lutaml-model XmlNamespace) ----\n namespace_uri_line = ( kw_uri_sp ( quoted_string / ( 1*word ) ) as uri [ whitespace ] )\n namespace_prefix_line = ( kw_prefix_sp ( quoted_string / ( 1*word ) ) as prefix [ whitespace ] )\n namespace_body = \"{\" [ whitespace ] ( *( namespace_uri_line / namespace_prefix_line ) ) as members \"}\"\n namespace_inline = ( ( quoted_string ) as uri [ kw_prefix_sp ( quoted_string / ( 1*word ) ) as prefix ] )\n namespace_definition = ( [ whitespace ] kw_namespace_sp ( 1*word ) as name ( namespace_body / namespace_inline ) [ whitespace ] ) as namespaces\n\n # ---- Serialization mappings (RS 3010 extension: sibling-linked) ----\n serialization_body = \"{\" [ whitespace ] ( *( serialization_line ) ) as rules \"}\"\n serialization_line = ( mapping_element_name_line / mapping_element_line / mapping_attribute_line / mapping_content_line / mapping_namespace_line / mapping_mixed_line / legacy_map_line / mapping_map_line / mapping_map_key_line / mapping_map_value_line ) [ whitespace ]\n legacy_map_line = ( kw_map_sp dq_string as wire \",\" \"to:\" ( quoted_string / ( 1*word ) ) as to [ whitespace ] ) as legacy_map\n mapping_element_name_line = ( kw_element_sp dq_string as element_name [ whitespace ] ) as element_name\n mapping_element_line = ( kw_map_element_sp ( element_args ) ) as map_element\n element_args = ( dq_string as wire [ ( 1*word ) as field ] / ( 1*word ) as field )\n mapping_attribute_line = ( kw_map_attribute_sp ( attribute_args ) ) as map_attribute\n attribute_args = ( dq_string as wire [ ( 1*word ) as field ] / ( 1*word ) as field )\n mapping_content_line = ( kw_map_content_sp ( 1*word ) as field ) as map_content\n mapping_namespace_line = ( kw_namespace_sp ( 1*word ) as namespace_ref ) as map_namespace\n mapping_mixed_line = ( \"mixed_content\" ) as mixed_content\n mapping_map_line = ( kw_map_sp map_args ) as map\n map_args = ( dq_string as wire ( 1*word ) as field / dq_string as wire / ( 1*word ) as field )\n mapping_map_key_line = ( kw_map_key_sp kw_to_instance_sp ( 1*word ) as field ) as map_key\n mapping_map_value_line = ( kw_map_value_sp map_value_mode ( 1*word ) as field ) as map_value\n atomic map_value_mode = ( ( \"to_instance\" / \"as_attribute\" ) as mode 1*\" \" )\n mapping_definition = ( [ whitespace ] kw_mapping_sp ( 1*word ) as format ( 1*word ) as target serialization_body [ whitespace ] ) as serialization_mappings\n\n # ---- Mapping blocks (lutaml-model wire names) ----\n map_name = ( quoted_string / 1*( word / \"-\" / \".\" ) )\n map_line = kw_map_sp ( map_name ) as wire \",\" \"to:\" ( map_name ) as to [ whitespace ]\n mapping_body = \"{\" [ whitespace ] ( *( map_line ) ) as maps \"}\"\n class_mapping_section = ( [ whitespace ] kw_mapping_sp ( 1*word ) as format serialization_body [ whitespace ] ) as serialization_mappings\n\n derive_definition = ( [ whitespace ] kw_derive_sp attribute_name \":\" [ quotes ] ( type_token ) as type [ quotes ] ) as derived_field [ whitespace ]\n string_format_item = ( sf_key_token ( quoted_string / 1*nonspace ) as value [ whitespace ] )\n atomic sf_key_token = ( ( \"artifact\" / \"root\" ) as key 1*\" \" )\n string_format_body = \"{\" [ whitespace ] ( *( string_format_item ) ) as items [ whitespace ] \"}\"\n string_format_definition = ( [ whitespace ] kw_string_format_sp ( variable ) as format string_format_body ) as string_format\n\n class_inner_definitions = definition_body / definition_line / class_mapping_section / derive_definition / string_format_definition / ( operation_definition ) as operations / attribute_comma_definition / ( !( kw_attribute_sp ) attribute_definition ) / keyword_attribute_definition / comment_definition / comment_multiline_definition\n class_inner_definition = class_inner_definitions [ whitespace ]\n class_body = \"{\" [ whitespace ] ( *( class_inner_definition ) ) as members \"}\"\n parent_class = \"<\" ( class_name_chars ) as parent_class\n class_definition = [ element_visibility ] class_modifier [ whitespace ] kw_class_sp class_name as name [ parent_class ] [ attribute_stereotype ] [ class_body ]\n\n # Balanced-brace definition text: nested \"{...}\" and \"\\\"-escapes allowed\n definition_content = *( ( \"\\\\\" any_char ) / ( \"{\" definition_content \"}\" ) / ( !\"}\" any_char ) )\n definition_body = \"definition\" [ whitespace ] \"{\" ( definition_content ) as definition \"}\"\n definition_line = ( kw_definition_sp ( dq_string / sq_string ) ) as definition [ whitespace ]\n\n member_field_line = attribute_name ( 1*nonspace ) as member_field_type [ whitespace ]\n member_fields_definition = ( [ whitespace ] \"member_fields\" [ whitespace ] \"{\" [ whitespace ] ( *( member_field_line ) ) as member_fields [ whitespace ] \"}\" ) as member_fields_decl\n attribute_comma_definition = ( [ whitespace ] kw_attribute_sp attribute_name \",\" ( type_token ) as type [ \"{\" [ whitespace ] keyword_attribute_options [ whitespace ] \"}\" ] [ whitespace ] ) as attributes\n enum_member_with_payload = ( [ whitespace ] attribute_name ( class_body / keyword_attribute_body ) ) as attributes\n\n # ---- Canonical value construct (RS 3001 par. Value / par. Enums) ----\n # `value { block }` is the canonical enum member; the bare\n # identifier member is its documented shortcut. from_table expands to\n # value members at compile time.\n value_name = quoted_string / map_name\n value_inner_definition = ( definition_body / definition_line / instance / attribute_line / comment_definition / comment_multiline_definition ) [ whitespace ]\n value_body = \"{\" [ whitespace ] ( *( value_inner_definition ) ) as members \"}\"\n value_definition = ( [ whitespace ] kw_value_sp ( value_name ) as value_name [ value_body ] [ whitespace ] ) as value_decl\n\n from_table_definition = ( [ whitespace ] \"from_table\" ( map_name ) as from_table_name [ \"{\" [ whitespace ] *( kw_artifact_sp ( map_name ) as artifact_table [ whitespace ] ) \"}\" ] [ whitespace ] ) as from_table_decl\n\n enum_values_shorthand = ( [ whitespace ] kw_values_sp value_set_body [ whitespace ] ) as value_set_decl\n enum_inner_definitions = definition_body / definition_line / member_fields_definition / from_table_definition / enum_values_shorthand / value_definition / enum_member_with_payload / attribute_comma_definition / attribute_definition / comment_definition / comment_multiline_definition\n enum_inner_definition = enum_inner_definitions [ whitespace ]\n enum_body = \"{\" [ whitespace ] ( *( enum_inner_definition ) ) as members \"}\"\n enum_definition = [ whitespace ] [ element_visibility ] kw_enum_sp [ quotes ] class_name as name [ quotes ] [ attribute_stereotype ] [ enum_body ]\n data_type_body = \"{\" [ whitespace ] ( *( enum_inner_definition ) ) as members \"}\"\n data_type_definition = [ whitespace ] [ element_visibility ] kw_data_type_sp [ quotes ] class_name as name [ quotes ] [ attribute_stereotype ] [ data_type_body ]\n primitive_definition = [ whitespace ] [ element_visibility ] kw_primitive_sp [ quotes ] class_name as name [ quotes ]\n\n package_body = \"{\" [ whitespace ] ( *( diagram_inner_definition ) ) as members \"}\"\n package_definition = ( [ whitespace ] kw_package_sp class_name as name package_body [ whitespace ] ) as packages\n diagram_inner_definitions = namespace_definition / mapping_definition / ( class_definition ) as classes / ( enum_definition ) as enums / ( primitive_definition ) as primitives / ( data_type_definition ) as data_types / package_definition / title_definition / caption_definition / fontname_definition / ( association_definition ) as associations / comment_definition / comment_multiline_definition\n diagram_inner_definition = diagram_inner_definitions [ whitespace ]\n diagram_body = \"{\" [ whitespace ] ( *( diagram_inner_definition ) ) as members \"}\"\n diagram_definition = [ whitespace ] \"diagram\" class_name as name diagram_body [ whitespace ]\n diagram_definitions = diagram_definition [ whitespace ]\n model_definitions = ( 1*( diagram_inner_definition ) ) as members\n\n view_only_definitions = ( view_import ) as view_imports / show_directive / hide_directive\n view_inner_definitions = view_only_definitions / diagram_inner_definitions\n view_inner_definition = view_inner_definitions [ whitespace ]\n view_body = \"{\" [ whitespace ] ( *( view_inner_definition ) ) as members \"}\"\n view_definition = [ whitespace ] \"view\" class_name as name view_body [ whitespace ]\n view_definitions = view_definition [ whitespace ]\n\n atomic title_text = ( %x22 ( 1*( !%x22 ANY ) ) as title %x22 ) / ( %x27 ( 1*( !%x27 ANY ) ) as title %x27 ) / ( 1*( %x41-5A / %x61-7A / %x30-39 / \"_\" / \"-\" / \" \" / \",\" / \".\" / \":\" / \";\" / \"(\" / \")\" / \"+\" / \"'\" / \"/\" ) ) as title\n title_definition = [ whitespace ] kw_title_sp title_text\n atomic caption_text = ( %x22 ( 1*( !%x22 ANY ) ) as caption %x22 ) / ( %x27 ( 1*( !%x27 ANY ) ) as caption %x27 ) / ( 1*( %x41-5A / %x61-7A / %x30-39 / \"_\" / \"-\" / \" \" / \",\" / \".\" / \":\" / \";\" / \"(\" / \")\" / \"+\" / \"'\" / \"/\" ) ) as caption\n caption_definition = [ whitespace ] kw_caption_sp caption_text\n fontname_text = [ quotes ] ( 1*( %x41-5A / %x61-7A / %x30-39 / \"_\" / \"-\" / \" \" ) ) as fontname [ quotes ]\n fontname_definition = [ whitespace ] kw_fontname_sp fontname_text\n\n # ---- Views ----\n # `import` here carries a required trailing space (word boundary)\n view_import = [ whitespace ] kw_import_sp ( dq_path / sq_path ) [ whitespace ]\n entity_name_atom = ( 1*( %x41-5A / %x61-7A / %x30-39 / \"_\" / \".\" / \":\" / \"-\" ) ) as entity_name\n entity_name_list = entity_name_atom *( \",\" entity_name_atom )\n show_directive = [ whitespace ] kw_show_sp ( entity_name_list ) as show_list [ whitespace ]\n hide_directive = [ whitespace ] kw_hide_sp ( entity_name_list ) as hide_list [ whitespace ]\n\n # ---- Requires ----\n require_stmt = [ whitespace ] kw_require_sp quoted_string as require [ whitespace ]\n require_block = ( *( require_stmt [ whitespace ] ) ) as requires\n\n # ---- Instances ----\n instance = instance_named / keyword_instance / class_instance\n instance_named = ( [ whitespace ] kw_instance_sp quoted_string as name [ ( namespaced_identifier ) as instance_type ] \"{\" [ whitespace ] ( ( instance ) / attributes ) \"}\" [ whitespace ] ) as instance\n isa_definition = [ whitespace ] kw_isa_sp ( namespaced_identifier ) as isa [ whitespace ]\n keyword_instance = ( [ whitespace ] \"instance\" [ ( namespaced_identifier ) as instance_type ] \"{\" [ whitespace ] [ isa_definition ] ( ( instance ) / attributes ) \"}\" ) as instance [ whitespace ]\n class_instance = ( variable as instance_type [ whitespace ] quoted_string as name [ whitespace ] [ [ whitespace ] \"extends\" [ whitespace ] quoted_string as parent [ whitespace ] ] \"{\" [ whitespace ] [ lml_instance_body ] \"}\" ) as instance [ whitespace ]\n lml_instance_body = lml_instance_members [ whitespace ]\n instance_template = [ whitespace ] \"template\" [ whitespace ] \"{\" [ whitespace ] attributes [ whitespace ] \"}\"\n lml_instance_members = ( instance_template ) as template / attributes\n models = [ whitespace ] \"models\" [ whitespace ] variable as name [ whitespace ] \"{\" ( *( ( ( string_format_definition ) as default_string_formats ) / model_body ) ) as members \"}\" [ whitespace ]\n model_body = diagram_inner_definition\n\n # ---- Data structures ----\n attribute_value = instance / list / key_value_map / data_value / 1*( !%x0A ANY )\n list_item = instance / data_value\n list = \"[\" [ whitespace ] ( *( list_item [ \",\" ] [ whitespace ] ) ) as list [ whitespace ] \"]\"\n collection = [ whitespace ] kw_collection_sp quoted_string as name \"{\" [ whitespace ] [ includes ] [ whitespace ] [ validation ] [ whitespace ] \"}\" [ whitespace ]\n includes = [ whitespace ] \"includes\" ( list ) as includes\n validation = [ whitespace ] \"validation\" \"{\" [ whitespace ] ( *( condition ) ) as validations \"}\"\n condition = [ whitespace ] kw_condition_sp quoted_string as condition [ whitespace ]\n import = [ whitespace ] \"import\" \"{\" [ whitespace ] ( *( import_definition ) ) as imports \"}\" [ whitespace ]\n import_definition = ( 1*nonspace ) as format_type quoted_string as file [ whitespace ] \"{\" [ whitespace ] attributes [ whitespace ] \"}\" [ whitespace ]\n instances = [ whitespace ] \"instances\" [ ( quoted_string / variable ) as name ] [ whitespace ] \"{\" [ whitespace ] [ instances_body ] \"}\" [ whitespace ]\n instances_body = ( *( instances_member [ whitespace ] ) ) as instances\n instances_member = import / ( collection ) as collections / export / instance\n export = [ whitespace ] \"export\" [ whitespace ] \"{\" [ whitespace ] ( *( export_format [ whitespace ] ) ) as exports \"}\" [ whitespace ]\n export_format = [ whitespace ] kw_format_sp variable as format_type [ whitespace ] \"{\" [ whitespace ] attributes \"}\" [ whitespace ]\n\n # ---- Root (RS 3001: a document interleaves declarations) ----\n diagram = [ require_block ] ( *( top_level_definition ) ) as members\n\n top_level_definition = ( models / diagram_definitions / view_definitions / instances / instance / model_definitions ) [ whitespace ]\n}\n\nentry diagram: diagram\n\n# Compile-time contract tests for the trivia/skip behavior (run by\n# `rake parg` and any in-memory compile; a failure fails the build).\ntest diagram {\n accept \"// leading\\nclass Ceramic { }\\n\"\n accept \"class /* inline */ Ceramic { }\\n\"\n accept \"class Ceramic { } // trailing\"\n accept \"instances {\\n P \\\"p\\\" {\\n url = \\\"http://a//b\\\"\\n }\\n}\\n\"\n reject \"classCeramic Foo { }\"\n reject \"abstractclass Ceramic { }\"\n reject \"class\\tCeramic { }\"\n reject \"class Ceramic { /* unterminated\"\n}\n", "skip": "trivia", - "checksum": "sha256:dc13eb34c5ff6eb45fa29f12360b67f16488fa2db83f72db3a82de6049e8a520" + "checksum": "sha256:01d44e7f1e6dac63e1eb6901644a031d0735e9fb28a08cba55f1d9d98a63b72a" } diff --git a/lib/lutaml/lml/grammar/lml.parg b/lib/lutaml/lml/grammar/lml.parg index e3db868..c89d1ec 100644 --- a/lib/lutaml/lml/grammar/lml.parg +++ b/lib/lutaml/lml/grammar/lml.parg @@ -108,7 +108,7 @@ grammar Lml version "1.0.0" { # ---- Attributes ---- attribute = comment_definition / ( variable as key [ "+" as add ] [ "=" ] attribute_value as value ) - attributes = ( *( attribute_line / whitespace ) ) as attributes + attributes = ( *( definition_body / definition_line / attribute_line / whitespace ) ) as attributes attribute_line = attribute [ [ "," ] whitespace ] visibility = kw_visibility_modifier as visibility_modifier attribute_stereotype = "<<" ( 1*( %x41-5A / %x61-7A / %x30-39 / "_" / "-" / "/" ) ) as stereotype ">>" diff --git a/spec/fixtures/rs3001/19_top_level_instance_definition.lml b/spec/fixtures/rs3001/19_top_level_instance_definition.lml new file mode 100644 index 0000000..221f465 --- /dev/null +++ b/spec/fixtures/rs3001/19_top_level_instance_definition.lml @@ -0,0 +1,14 @@ +class Studio { + attribute location, String + attribute potter, String + attribute kiln, String +} + +instance "Studio" { + location = "Paris" + potter = "Marie" + kiln = "Electric" + definition { + Marie's studio in Paris. + } +} diff --git a/spec/fixtures/rs3001/20_instance_typed_definition.lml b/spec/fixtures/rs3001/20_instance_typed_definition.lml new file mode 100644 index 0000000..0c46eeb --- /dev/null +++ b/spec/fixtures/rs3001/20_instance_typed_definition.lml @@ -0,0 +1,16 @@ +class CeramicTile { + attribute dimensions, Float { cardinality 2 } + attribute firing_profile, FiringProfile + definition { + Types of ceramic tiles. + } +} + +instance "square" CeramicTile { + dimensions = [30.5, 30.5] + firing_profile = "high" + + definition { + A square ceramic tile used for various applications. + } +} diff --git a/spec/fixtures/rs3001/21_instance_collection_studios.lml b/spec/fixtures/rs3001/21_instance_collection_studios.lml new file mode 100644 index 0000000..a3a6a17 --- /dev/null +++ b/spec/fixtures/rs3001/21_instance_collection_studios.lml @@ -0,0 +1,13 @@ +instances "Studios" { + instance Studio { + location = "Paris" + potter = "Marie" + kiln = "Electric" + } + + instance Studio { + location = "Berlin" + potter = "Hans" + kiln = "Gas" + } +} diff --git a/spec/fixtures/rs3001/22_instance_collection_tiles.lml b/spec/fixtures/rs3001/22_instance_collection_tiles.lml new file mode 100644 index 0000000..316b68f --- /dev/null +++ b/spec/fixtures/rs3001/22_instance_collection_tiles.lml @@ -0,0 +1,11 @@ +instances "Tiles" { + instance "square" CeramicTile { + dimensions = [30.5, 30.5] + firing_profile = "high" + } + + instance "circle" CeramicTile { + dimensions = [20.5, 20.5] + firing_profile = "medium" + } +} diff --git a/spec/fixtures/rs3001/23_reference_cross_collection.lml b/spec/fixtures/rs3001/23_reference_cross_collection.lml new file mode 100644 index 0000000..4c7acda --- /dev/null +++ b/spec/fixtures/rs3001/23_reference_cross_collection.lml @@ -0,0 +1,9 @@ +instances Glazes { + GlazeFormula "blue_matte" { + components = ["silica", "cobalt"] + } + + CeramicTile "tile_002" { + glaze = ref:(Glazes.blue_matte) + } +}